1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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.
This commit is contained in:
mhansson/martin@riffraff.(none)
2008-03-19 14:32:28 +01:00
parent 11cd97ed6b
commit 86db2a0cd5
3 changed files with 33 additions and 0 deletions

View File

@@ -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;
}
}