From 3c6ac6694d291dc454af6f9042c9217afd7fff9b Mon Sep 17 00:00:00 2001 From: Sergey Petrunya Date: Wed, 9 Oct 2013 13:07:46 +0400 Subject: MDEV-3798: EXPLAIN UPDATE/DELETE - Produce correct #rows for ORDER BY ... LIMIT N queries that take advantage of ordered index read to read only N rows. --- sql/sql_select.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql/sql_select.h') diff --git a/sql/sql_select.h b/sql/sql_select.h index 71760ea76f5..48515042a02 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -1833,7 +1833,8 @@ int print_fake_select_lex_join(select_result_sink *result, bool on_the_fly, SELECT_LEX *select_lex, uint8 select_options); uint get_index_for_order(ORDER *order, TABLE *table, SQL_SELECT *select, - ha_rows limit, bool *need_sort, bool *reverse); + ha_rows limit, ha_rows *scanned_limit, + bool *need_sort, bool *reverse); ORDER *simple_remove_const(ORDER *order, COND *where); bool const_expression_in_where(COND *cond, Item *comp_item, Field *comp_field= NULL, -- cgit v1.2.1