summaryrefslogtreecommitdiff
path: root/sql/sql_partition_admin.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-02-16 10:56:03 +0200
committerMonty <monty@mariadb.org>2018-03-29 13:59:40 +0300
commit2dbeebdb16436e3c2723cd483aaf21d93de799d6 (patch)
tree541a3f79353cdbd7c3b7e32e8cfb57237cc24167 /sql/sql_partition_admin.cc
parent0631f20ff75269f2ce427200d8116bb2b6c75605 (diff)
downloadmariadb-git-2dbeebdb16436e3c2723cd483aaf21d93de799d6.tar.gz
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
Diffstat (limited to 'sql/sql_partition_admin.cc')
-rw-r--r--sql/sql_partition_admin.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/sql/sql_partition_admin.cc b/sql/sql_partition_admin.cc
index 2e998878351..ea933cfd12a 100644
--- a/sql/sql_partition_admin.cc
+++ b/sql/sql_partition_admin.cc
@@ -73,7 +73,7 @@ bool Sql_cmd_alter_table_exchange_partition::execute(THD *thd)
/* Must be set in the parser */
DBUG_ASSERT(select_lex->db.str);
/* also check the table to be exchanged with the partition */
- DBUG_ASSERT(alter_info.flags & Alter_info::ALTER_EXCHANGE_PARTITION);
+ DBUG_ASSERT(alter_info.flags & ALTER_EXCHANGE_PARTITION);
if (check_access(thd, priv_needed, first_table->db.str,
&first_table->grant.privilege,
@@ -501,7 +501,7 @@ bool Sql_cmd_alter_table_exchange_partition::
uint table_counter;
bool error= TRUE;
DBUG_ENTER("mysql_exchange_partition");
- DBUG_ASSERT(alter_info->flags & Alter_info::ALTER_EXCHANGE_PARTITION);
+ DBUG_ASSERT(alter_info->flags & ALTER_EXCHANGE_PARTITION);
/* Don't allow to exchange with log table */
swap_table_list= table_list->next_local;
@@ -671,7 +671,7 @@ bool Sql_cmd_alter_table_analyze_partition::execute(THD *thd)
Flag that it is an ALTER command which administrates partitions, used
by ha_partition
*/
- thd->lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION;
+ thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
res= Sql_cmd_analyze_table::execute(thd);
@@ -688,7 +688,7 @@ bool Sql_cmd_alter_table_check_partition::execute(THD *thd)
Flag that it is an ALTER command which administrates partitions, used
by ha_partition
*/
- thd->lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION;
+ thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
res= Sql_cmd_check_table::execute(thd);
@@ -705,7 +705,7 @@ bool Sql_cmd_alter_table_optimize_partition::execute(THD *thd)
Flag that it is an ALTER command which administrates partitions, used
by ha_partition
*/
- thd->lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION;
+ thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
res= Sql_cmd_optimize_table::execute(thd);
@@ -722,7 +722,7 @@ bool Sql_cmd_alter_table_repair_partition::execute(THD *thd)
Flag that it is an ALTER command which administrates partitions, used
by ha_partition
*/
- thd->lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION;
+ thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION;
res= Sql_cmd_repair_table::execute(thd);
@@ -746,8 +746,8 @@ bool Sql_cmd_alter_table_truncate_partition::execute(THD *thd)
Flag that it is an ALTER command which administrates partitions, used
by ha_partition.
*/
- thd->lex->alter_info.flags|= Alter_info::ALTER_ADMIN_PARTITION |
- Alter_info::ALTER_TRUNCATE_PARTITION;
+ thd->lex->alter_info.flags|= ALTER_ADMIN_PARTITION |
+ ALTER_TRUNCATE_PARTITION;
/* Fix the lock types (not the same as ordinary ALTER TABLE). */
first_table->lock_type= TL_WRITE;