1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Move handler specific options into handlerton flag check

BUG#13108
This commit is contained in:
eric@mysql.com
2005-09-30 16:26:48 -07:00
parent 16cd4bd332
commit 5008a5f208
13 changed files with 111 additions and 18 deletions

View File

@ -3156,6 +3156,16 @@ bool mysql_alter_table(THD *thd,char *new_db, char *new_name,
if (create_info->row_type == ROW_TYPE_NOT_USED)
create_info->row_type= table->s->row_type;
DBUG_PRINT("info", ("old type: %d new type: %d", old_db_type, new_db_type));
if (ha_check_storage_engine_flag(old_db_type, HTON_ALTER_NOT_SUPPORTED)
|| ha_check_storage_engine_flag(new_db_type, HTON_ALTER_NOT_SUPPORTED))
{
DBUG_PRINT("info", ("doesn't support alter"));
my_error(ER_ILLEGAL_HA, MYF(0), table_name);
DBUG_RETURN(TRUE);
}
DBUG_PRINT("info", ("supports alter"));
thd->proc_info="setup";
if (!(alter_info->flags & ~(ALTER_RENAME | ALTER_KEYS_ONOFF)) &&
!table->s->tmp_table) // no need to touch frm