mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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
This commit is contained in:
@@ -205,7 +205,8 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
|
||||
acl_cache->clear(1); // Clear locked hostname cache
|
||||
|
||||
init_sql_alloc(&mem, ACL_ALLOC_BLOCK_SIZE, 0);
|
||||
init_read_record(&read_record_info,thd,table= tables[0].table,NULL,1,0);
|
||||
init_read_record(&read_record_info,thd,table= tables[0].table,NULL,1,0,
|
||||
FALSE);
|
||||
VOID(my_init_dynamic_array(&acl_hosts,sizeof(ACL_HOST),20,50));
|
||||
while (!(read_record_info.read_record(&read_record_info)))
|
||||
{
|
||||
@@ -253,7 +254,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
|
||||
end_read_record(&read_record_info);
|
||||
freeze_size(&acl_hosts);
|
||||
|
||||
init_read_record(&read_record_info,thd,table=tables[1].table,NULL,1,0);
|
||||
init_read_record(&read_record_info,thd,table=tables[1].table,NULL,1,0,FALSE);
|
||||
VOID(my_init_dynamic_array(&acl_users,sizeof(ACL_USER),50,100));
|
||||
password_length= table->field[2]->field_length /
|
||||
table->field[2]->charset()->mbmaxlen;
|
||||
@@ -426,7 +427,7 @@ static my_bool acl_load(THD *thd, TABLE_LIST *tables)
|
||||
end_read_record(&read_record_info);
|
||||
freeze_size(&acl_users);
|
||||
|
||||
init_read_record(&read_record_info,thd,table=tables[2].table,NULL,1,0);
|
||||
init_read_record(&read_record_info,thd,table=tables[2].table,NULL,1,0,FALSE);
|
||||
VOID(my_init_dynamic_array(&acl_dbs,sizeof(ACL_DB),50,100));
|
||||
while (!(read_record_info.read_record(&read_record_info)))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user