1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-02 17:22:27 +03:00

Merge pull request #1006 from LinuxJedi/change-engine

MCOL-128 Support ALTER TABLE...ENGINE=Columnstore
This commit is contained in:
Patrick LeBlanc
2020-01-24 09:26:13 -06:00
committed by GitHub
2 changed files with 27 additions and 14 deletions

View File

@ -2360,8 +2360,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))