summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorunknown <kaa@polly.(none)>2007-11-07 14:00:45 +0300
committerunknown <kaa@polly.(none)>2007-11-07 14:00:45 +0300
commitf6686659551be614c835ff5f3730e87f41e06d84 (patch)
tree0f20d286300d8c795aa921bb9a5e0403df81b975 /sql-common
parent6eced1b857b8df12079603cc18b716a92e69817f (diff)
downloadmariadb-git-f6686659551be614c835ff5f3730e87f41e06d84.tar.gz
Fix for bug #30666: Incorrect order when using range conditions on 2
tables or more The problem was that the optimizer used the join buffer in cases when the result set is ordered by filesort. This resulted in the ORDER BY clause being ignored, and the records being returned in the order determined by the order of matching records in the last table in join. Fixed by relaxing the condition in make_join_readinfo() to take filesort-ordered result sets into account, not only index-ordered ones. mysql-test/r/select.result: Added a test case for bug #30666. mysql-test/t/select.test: Added a test case for bug #30666. sql/sql_select.cc: Relaxed the condition to determine when the join buffer usage must be disabled. The condition is now true for cases when the result set is ordered by filesort, that is when 'join->order && !join->skip_sort_order' is true.
Diffstat (limited to 'sql-common')
0 files changed, 0 insertions, 0 deletions