mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-32449 Server crashes in Alter_info::add_stat_drop_index upon CREATE TABLE
Fixed missing initialization of Alter_info() This could cause crashes in some create table like scenarios where some generated indexes where automatically dropped. I also added a test that we do not try to drop from index_stats for temporary tables.
This commit is contained in:
@@ -2898,7 +2898,7 @@ mysql_prepare_create_table(THD *thd, HA_CREATE_INFO *create_info,
|
||||
key_iterator.rewind();
|
||||
while ((key=key_iterator++))
|
||||
{
|
||||
if (key->type == Key::IGNORE_KEY)
|
||||
if (key->type == Key::IGNORE_KEY && !create_info->tmp_table())
|
||||
{
|
||||
/* The key was replaced by another key */
|
||||
if (alter_info->add_stat_drop_index(thd, &key->name))
|
||||
|
Reference in New Issue
Block a user