summaryrefslogtreecommitdiff
path: root/sql/sql_help.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
commit62513bb1bca33902fa909ca13b25c550046ee3ae (patch)
treee53c78a5b0f2f37f7558020f80392ae283a65bf3 /sql/sql_help.cc
parentd5077086f73cfa24b8c4c9451fb70bc5a77922ae (diff)
downloadmariadb-git-62513bb1bca33902fa909ca13b25c550046ee3ae.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). sql/filesort.cc: BUG#35478: sort_union() returns bad data when sort_buffer_size is hit - make find_all_keys() use quick->get_next() instead of init_read_record(r)/r.read_record() calls - added dbug printout sql/mysql_priv.h: BUG#35478: sort_union() returns bad data when sort_buffer_size is hit - Added parameter to init_read_record sql/opt_range.cc: 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(). sql/records.cc: BUG#35478: sort_union() returns bad data when sort_buffer_size is hit - Added disable_rr_cache parameter to init_read_record - Added comment sql/sql_acl.cc: BUG#35478: sort_union() returns bad data when sort_buffer_size is hit - Added parameter to init_read_record sql/sql_delete.cc: BUG#35478: sort_union() returns bad data when sort_buffer_size is hit - Added parameter to init_read_record sql/sql_help.cc: BUG#35478: sort_union() returns bad data when sort_buffer_size is hit - Added parameter to init_read_record sql/sql_select.cc: BUG#35478: sort_union() returns bad data when sort_buffer_size is hit - Added parameter to init_read_record sql/sql_table.cc: BUG#35478: sort_union() returns bad data when sort_buffer_size is hit - Added parameter to init_read_record sql/sql_udf.cc: BUG#35478: sort_union() returns bad data when sort_buffer_size is hit - Added parameter to init_read_record sql/sql_update.cc: BUG#35478: sort_union() returns bad data when sort_buffer_size is hit - Added parameter to init_read_record
Diffstat (limited to 'sql/sql_help.cc')
-rw-r--r--sql/sql_help.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_help.cc b/sql/sql_help.cc
index 69a257a9d37..6036a687274 100644
--- a/sql/sql_help.cc
+++ b/sql/sql_help.cc
@@ -181,7 +181,7 @@ int search_topics(THD *thd, TABLE *topics, struct st_find_field *find_fields,
int count= 0;
READ_RECORD read_record_info;
- init_read_record(&read_record_info, thd, topics, select,1,0);
+ init_read_record(&read_record_info, thd, topics, select, 1, 0, FALSE);
while (!read_record_info.read_record(&read_record_info))
{
if (!select->cond->val_int()) // Doesn't match like
@@ -221,7 +221,7 @@ int search_keyword(THD *thd, TABLE *keywords, struct st_find_field *find_fields,
int count= 0;
READ_RECORD read_record_info;
- init_read_record(&read_record_info, thd, keywords, select,1,0);
+ init_read_record(&read_record_info, thd, keywords, select, 1, 0, FALSE);
while (!read_record_info.read_record(&read_record_info) && count<2)
{
if (!select->cond->val_int()) // Dosn't match like
@@ -346,7 +346,7 @@ int search_categories(THD *thd, TABLE *categories,
DBUG_ENTER("search_categories");
- init_read_record(&read_record_info, thd, categories, select,1,0);
+ init_read_record(&read_record_info, thd, categories, select,1,0,FALSE);
while (!read_record_info.read_record(&read_record_info))
{
if (select && !select->cond->val_int())
@@ -380,7 +380,7 @@ void get_all_items_for_category(THD *thd, TABLE *items, Field *pfname,
DBUG_ENTER("get_all_items_for_category");
READ_RECORD read_record_info;
- init_read_record(&read_record_info, thd, items, select,1,0);
+ init_read_record(&read_record_info, thd, items, select,1,0,FALSE);
while (!read_record_info.read_record(&read_record_info))
{
if (!select->cond->val_int())