summaryrefslogtreecommitdiff
path: root/sql/table.cc
diff options
context:
space:
mode:
authorunknown <gluh@mysql.com/eagle.(none)>2007-02-12 16:06:14 +0400
committerunknown <gluh@mysql.com/eagle.(none)>2007-02-12 16:06:14 +0400
commit2572c82621b04cb852b29736f835bcb204f5bfc0 (patch)
tree56268dc0683afe8350e827428cb1e5ed709d579b /sql/table.cc
parent1932ac9aae05e16de322530f5215cd9b6c3f9fb3 (diff)
downloadmariadb-git-2572c82621b04cb852b29736f835bcb204f5bfc0.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.cc')
-rw-r--r--sql/table.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc
index 4f1477355b1..acfaef3d030 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -3031,7 +3031,7 @@ void st_table_list::reinit_before_use(THD *thd)
*/
table= 0;
/* Reset is_schema_table_processed value(needed for I_S tables */
- is_schema_table_processed= FALSE;
+ schema_table_state= NOT_PROCESSED;
TABLE_LIST *embedded; /* The table at the current level of nesting. */
TABLE_LIST *embedding= this; /* The parent nested table reference. */