summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorSergey Petrunia <sergefp@mysql.com>2008-07-15 18:13:21 +0400
committerSergey Petrunia <sergefp@mysql.com>2008-07-15 18:13:21 +0400
commit2951f00be4c2e332686ca713f77dab39615ea083 (patch)
treee53c78a5b0f2f37f7558020f80392ae283a65bf3 /sql/sql_table.cc
parent52f510ef22d1ebb518467bdb0d29f3cb7a3e77b1 (diff)
downloadmariadb-git-2951f00be4c2e332686ca713f77dab39615ea083.tar.gz
BUG#35478: sort_union() returns bad data when sort_buffer_size is hit
- In QUICK_INDEX_MERGE_SELECT::read_keys_and_merge: when we got table->sort from Unique, tell init_read_record() not to use rr_from_cache() because a) rowids are already sorted and b) it might be that the the data is used by filesort(), which will need record rowids (which rr_from_cache() cannot provide). - Fully de-initialize the table->sort read in QUICK_INDEX_MERGE_SELECT::get_next(). This fixes BUG#35477. (bk trigger: file as fix for BUG#35478).
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index f1de63892d5..1724513eb8f 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -4177,7 +4177,7 @@ copy_data_between_tables(TABLE *from,TABLE *to,
current query id
*/
from->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
- init_read_record(&info, thd, from, (SQL_SELECT *) 0, 1,1);
+ init_read_record(&info, thd, from, (SQL_SELECT *) 0, 1, 1, FALSE);
if (ignore)
to->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
thd->row_count= 0;