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

Changed static const in Alter_info and Alter_online_info to defines

Main reason was to make it easier to print the above structures in
a debugger. Additional benefits is that I was able to use same
defines for both structures, which simplifes some code.

Most of the code is just removing Alter_info:: and Alter_inplace_info::
from alter table flags.

Following renames was done:
HA_ALTER_FLAGS        -> alter_table_operations
CHANGE_CREATE_OPTION  -> ALTER_CHANGE_CREATE_OPTION
Alter_info::ADD_INDEX -> ALTER_ADD_INDEX
DROP_INDEX            -> ALTER_DROP_INDEX
ADD_UNIQUE_INDEX      -> ALTER_ADD_UNIQUE_INDEX
DROP_UNIQUE_INDEx     -> ALTER_DROP_UNIQUE_INDEX
ADD_PK_INDEX          -> ALTER_ADD_PK_INDEX
DROP_PK_INDEX         -> ALTER_DROP_PK_INDEX
Alter_info:ALTER_ADD_COLUMN    -> ALTER_PARSE_ADD_COLUMN
Alter_info:ALTER_DROP_COLUMN   -> ALTER_PARSE_DROP_COLUMN
Alter_inplace_info::ADD_INDEX  -> ALTER_ADD_NON_UNIQUE_NON_PRIM_INDEX
Alter_inplace_info::DROP_INDEX -> ALTER_DROP_NON_UNIQUE_NON_PRIM_INDEX

Other things:
- Added typedef alter_table_operatons for alter table flags
- DROP CHECK CONSTRAINT can now be done online
- Added checks for Aria tables in alter_table_online.test
- alter_table_flags now takes an ulonglong as argument.
- Don't support online operations if checksum option is used.
- sql_lex.cc doesn't add ALTER_ADD_INDEX if index is not created
This commit is contained in:
Monty
2018-02-16 10:56:03 +02:00
parent 0631f20ff7
commit 2dbeebdb16
28 changed files with 840 additions and 845 deletions

View File

@ -928,7 +928,7 @@ ha_example::check_if_supported_inplace_alter(TABLE* altered_table,
HA_CREATE_INFO *info= ha_alter_info->create_info;
DBUG_ENTER("ha_example::check_if_supported_inplace_alter");
if (ha_alter_info->handler_flags & Alter_inplace_info::CHANGE_CREATE_OPTION)
if (ha_alter_info->handler_flags & ALTER_CHANGE_CREATE_OPTION)
{
/*
This example shows how custom engine specific table and field
@ -964,7 +964,7 @@ ha_example::check_if_supported_inplace_alter(TABLE* altered_table,
}
}
if (ha_alter_info->handler_flags & Alter_inplace_info::ALTER_COLUMN_OPTION)
if (ha_alter_info->handler_flags & ALTER_COLUMN_OPTION)
{
for (uint i= 0; i < table->s->fields; i++)
{