mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-24422 Server crashes in ha_connect::GetRealType upon ALTER TABLE
The problem was that the CONNECT engine is trying to open the .frm file during drop_table(), which the code did not take into account. Fixed by adding the HA_REUSES_FILE_NAMES table flag to CONNECT. Other things: - Fixed a wrong test of HA_REUSE_FILE_NAMES of in mysql_alter_table() (Comment was correct, no the code) - Added a test in the connect engine that if the .frm it tries to use in delete is not made for connect, it will generate an error instead of crash.
This commit is contained in:
@ -10900,12 +10900,11 @@ do_continue:;
|
||||
The above is mainly true for the sequence and the partition engine.
|
||||
*/
|
||||
engine_changed= ((new_table->file->ht != table->file->ht) &&
|
||||
(((!(new_table->file->ha_table_flags() & HA_FILE_BASED) ||
|
||||
!(table->file->ha_table_flags() & HA_FILE_BASED))) ||
|
||||
(!(table->file->ha_table_flags() & HA_REUSES_FILE_NAMES) &&
|
||||
!(new_table->file->ha_table_flags() &
|
||||
HA_REUSES_FILE_NAMES))));
|
||||
|
||||
((!(new_table->file->ha_table_flags() & HA_FILE_BASED) ||
|
||||
!(table->file->ha_table_flags() & HA_FILE_BASED))) &&
|
||||
!(table->file->ha_table_flags() & HA_REUSES_FILE_NAMES) &&
|
||||
!(new_table->file->ha_table_flags() &
|
||||
HA_REUSES_FILE_NAMES));
|
||||
/*
|
||||
Close the intermediate table that will be the new table, but do
|
||||
not delete it! Even though MERGE tables do not have their children
|
||||
|
Reference in New Issue
Block a user