bug #25296 Truncate table converts NDB disk based tables to in-memory tables:...

bug #25296  Truncate table converts NDB disk based tables to in-memory tables: ha_ndbcluster::update_create_info should only update for TRUNCATE since we need to detect change of STORAGE at ALTER TABLE
parent 0217896b
...@@ -8311,8 +8311,10 @@ ha_ndbcluster::setup_recattr(const NdbRecAttr* curr) ...@@ -8311,8 +8311,10 @@ ha_ndbcluster::setup_recattr(const NdbRecAttr* curr)
void ha_ndbcluster::update_create_info(HA_CREATE_INFO *create_info) void ha_ndbcluster::update_create_info(HA_CREATE_INFO *create_info)
{ {
if (create_info->storage_media != HA_SM_MEMORY && THD *thd= current_thd;
get_tablespace_name(current_thd,0,0))
if (thd->lex->sql_command == SQLCOM_TRUNCATE &&
get_tablespace_name(thd,0,0))
create_info->storage_media= HA_SM_DISK; create_info->storage_media= HA_SM_DISK;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment