diff options
author | Igor Babaev <igor@askmonty.org> | 2011-12-11 12:56:06 -0800 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-12-11 12:56:06 -0800 |
commit | fa29f18ffbc8c60c4aec3c74b4013056c7c32169 (patch) | |
tree | e0fde4651e4bb900437891ba2f7ab5c635c21b45 /sql/opt_subselect.cc | |
parent | 8a09adb3eaf036b652b11afea7d9d86a978fa566 (diff) | |
download | mariadb-git-fa29f18ffbc8c60c4aec3c74b4013056c7c32169.tar.gz |
Fixed LP bug #901478.
If the duplicate elimination strategy is used for a semi-join and potentially
one of the block-based join algorithms can be employed to join the inner
tables of the semi-join then sorting of the head (first non-constant) table
for a query with ORDER BY / GROUP BY cannot be used.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r-- | sql/opt_subselect.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc index 0819667e068..217966eb296 100644 --- a/sql/opt_subselect.cc +++ b/sql/opt_subselect.cc @@ -4138,6 +4138,16 @@ int setup_semijoin_dups_elimination(JOIN *join, ulonglong options, { /* Looks like we'll be using join buffer */ first_table= join->const_tables; + /* + Make sure that possible sorting of rows from the head table + is not to be employed. + */ + if (join->get_sort_by_join_tab()) + { + join->simple_order= 0; + join->simple_group= 0; + join->need_tmp= join->test_if_need_tmp_table(); + } break; } } |