mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#24630 Subselect query crashes mysqld
The crash happens because second filling of the same I_S table happens in case of subselect with order by. table->sort.io_cache previously allocated in create_sort_index() is deleted during second filling (function get_schema_tables_result). There are two places where I_S table can be filled: JOIN::exec and create_sort_index(). To fix the bug we should check if the table was already filled in one of these places and skip processing of the table in second.
This commit is contained in:
@ -932,7 +932,8 @@ int fill_schema_user_privileges(THD *thd, TABLE_LIST *tables, COND *cond);
|
||||
int fill_schema_schema_privileges(THD *thd, TABLE_LIST *tables, COND *cond);
|
||||
int fill_schema_table_privileges(THD *thd, TABLE_LIST *tables, COND *cond);
|
||||
int fill_schema_column_privileges(THD *thd, TABLE_LIST *tables, COND *cond);
|
||||
bool get_schema_tables_result(JOIN *join);
|
||||
bool get_schema_tables_result(JOIN *join,
|
||||
enum enum_schema_table_state executed_place);
|
||||
#define is_schema_db(X) \
|
||||
!my_strcasecmp(system_charset_info, information_schema_name.str, (X))
|
||||
|
||||
|
Reference in New Issue
Block a user