summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authormhansson/martin@riffraff.(none) <>2008-03-19 14:32:28 +0100
committermhansson/martin@riffraff.(none) <>2008-03-19 14:32:28 +0100
commit86db2a0cd5e2d3c3306d7f7ee9b5216c52fdd0a9 (patch)
tree87bc8fa431b934fa38bfb46ea4fc91fe7715403f /sql/sql_show.cc
parent11cd97ed6b3cfd59310aaf79915cfeea1454886b (diff)
downloadmariadb-git-86db2a0cd5e2d3c3306d7f7ee9b5216c52fdd0a9.tar.gz
Bug#34529: Crash on complex Falcon I_S select after ALTER .. PARTITION BY
When swapping out heap I_S tables to disk, this is done after plan refinement. Thus, READ_RECORD::file will still point to the (deleted) heap handler at start of execution. This causes segmentation fault if join buffering is used and the query is a star query where the result is found to be empty before accessing some table. In this case that table has not been initialized (i.e. had its READ_RECORD re-initialized) before the cleanup routine tries to close the handler. Fixed by updating READ_RECORD::file when changing handler.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 36d154181f8..a80319785bd 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -4073,9 +4073,11 @@ bool get_schema_tables_result(JOIN *join,
{
result= 1;
join->error= 1;
+ tab->read_record.file= table_list->table->file;
table_list->schema_table_state= executed_place;
break;
}
+ tab->read_record.file= table_list->table->file;
table_list->schema_table_state= executed_place;
}
}