1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

MCOL-128 Support ALTER TABLE...ENGINE=Columnstore

Also implements:

* ALTER TABLE from Columnstore to another engine
* MCOL-3349 CREATE TABLE ... AS SELECT.
This commit is contained in:
Andrew Hutchings
2020-01-20 14:26:39 -08:00
parent bf356cdb86
commit 4b86890cf7
2 changed files with 27 additions and 14 deletions

View File

@ -2362,8 +2362,11 @@ int ha_mcs_impl_rnd_init(TABLE* table)
}
#endif
if ( (thd->lex)->sql_command == SQLCOM_ALTER_TABLE )
// If ALTER TABLE and not ENGINE= we don't need rnd_init (gets us in a bad state)
if ((thd->lex->sql_command == SQLCOM_ALTER_TABLE) && !(thd->lex->create_info.used_fields & HA_CREATE_USED_ENGINE))
{
return 0;
}
//Update and delete code
if ( ((thd->lex)->sql_command == SQLCOM_UPDATE) || ((thd->lex)->sql_command == SQLCOM_DELETE) || ((thd->lex)->sql_command == SQLCOM_DELETE_MULTI) || ((thd->lex)->sql_command == SQLCOM_UPDATE_MULTI))