diff options
author | Georgi Kodinov <joro@sun.com> | 2009-10-07 18:03:42 +0300 |
---|---|---|
committer | Georgi Kodinov <joro@sun.com> | 2009-10-07 18:03:42 +0300 |
commit | 1a48dd4e2bf0c6353bbf76b1f9b768620e0aa090 (patch) | |
tree | e8b98d4a75e63235bc86e6683cdea26c65b05c21 /sql/sql_parse.cc | |
parent | 9226c847f5ac5424b50da07623e6e75a60725bc0 (diff) | |
download | mariadb-git-1a48dd4e2bf0c6353bbf76b1f9b768620e0aa090.tar.gz |
Bug #43029: FORCE INDEX FOR ORDER BY is ignored when join
buffering is used
FORCE INDEX FOR ORDER BY now prevents the optimizer from
using join buffering. As a result the optimizer can use
indexed access on the first table and doesn't need to
sort the complete resultset at the end of the statement.
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 83ef525e3eb..27688e41d4f 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -6258,6 +6258,7 @@ TABLE_LIST *st_select_lex::add_table_to_list(THD *thd, ptr->table_name_length=table->table.length; ptr->lock_type= lock_type; ptr->updating= test(table_options & TL_OPTION_UPDATING); + /* TODO: remove TL_OPTION_FORCE_INDEX as it looks like it's not used */ ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX); ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES); ptr->derived= table->sel; |