diff options
author | unknown <gluh@mysql.com/eagle.(none)> | 2007-02-12 16:06:14 +0400 |
---|---|---|
committer | unknown <gluh@mysql.com/eagle.(none)> | 2007-02-12 16:06:14 +0400 |
commit | b35801de39687012bf0774c7032f1263bad7a7ca (patch) | |
tree | 56268dc0683afe8350e827428cb1e5ed709d579b /sql/table.h | |
parent | 68fbbbf1e839499b973b3f0b52d9cf1ce3c2797e (diff) | |
download | mariadb-git-b35801de39687012bf0774c7032f1263bad7a7ca.tar.gz |
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.
mysql-test/r/information_schema.result:
test case
mysql-test/t/information_schema.test:
test case
sql/mysql_priv.h:
added new parameter 'executed_place' to function get_schema_tables_result()
sql/sql_select.cc:
added new parameter 'executed_place' to function get_schema_tables_result()
sql/sql_show.cc:
added more accurate check for cases when we need to refresh I_S table
sql/table.cc:
added more accurate check for cases when we need to refresh I_S table
sql/table.h:
added more accurate check for cases when we need to refresh I_S table
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/table.h b/sql/table.h index 70e64439af5..8f013f3de19 100644 --- a/sql/table.h +++ b/sql/table.h @@ -287,6 +287,12 @@ struct st_table { void reset_item_list(List<Item> *item_list) const; }; +enum enum_schema_table_state +{ + NOT_PROCESSED= 0, + PROCESSED_BY_CREATE_SORT_INDEX, + PROCESSED_BY_JOIN_EXEC +}; typedef struct st_foreign_key_info { @@ -529,7 +535,6 @@ typedef struct st_table_list st_select_lex_unit *derived; /* SELECT_LEX_UNIT of derived table */ ST_SCHEMA_TABLE *schema_table; /* Information_schema table */ st_select_lex *schema_select_lex; - bool is_schema_table_processed; /* True when the view field translation table is used to convert schema table fields for backwards compatibility with SHOW command. @@ -638,6 +643,7 @@ typedef struct st_table_list */ bool prelocking_placeholder; + enum enum_schema_table_state schema_table_state; void calc_md5(char *buffer); void set_underlying_merge(); int view_check_option(THD *thd, bool ignore_failure); |