mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Vanilla cleanups and refactorings
Dead code cleanup: part_info->num_parts usage was wrong and working incorrectly in mysql_drop_partitions() because num_parts is already updated in prep_alter_part_table(). We don't have to update part_info->partitions because part_info is destroyed at alter_partition_lock_handling(). Cleanups: - DBUG_EVALUATE_IF() macro replaced by shorter form DBUG_IF(); - Typo in ER_KEY_COLUMN_DOES_NOT_EXITS. Refactorings: - Splitted write_log_replace_delete_frm() into write_log_delete_frm() and write_log_replace_frm(); - partition_info via DDL_LOG_STATE; - set_part_info_exec_log_entry() removed. DBUG_EVALUATE removed DBUG_EVALUTATE was only added for consistency together with DBUG_EVALUATE_IF. It is not used anywhere in the code. DBUG_SUICIDE() fix on release build On release DBUG_SUICIDE() was statement. It was wrong as DBUG_SUICIDE() is used in expression context.
This commit is contained in:
committed by
Sergei Golubchik
parent
2dc3c32070
commit
d324c03d0c
@ -201,7 +201,7 @@ drop table t1;
|
||||
set debug_dbug= "+d,test_pseudo_invisible";
|
||||
Create table t1( a int default(99) invisible, b int);
|
||||
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXIST
|
||||
Create table t2( a int default(99) invisible, b int, unique(invisible));
|
||||
|
||||
set debug_dbug=@old_debug;
|
||||
@ -211,9 +211,9 @@ insert into t1 values(3);
|
||||
insert into t1 values(4);
|
||||
select * from t1 order by b;
|
||||
select invisible, a, b from t1 order by b;
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXIST
|
||||
alter table t1 add index(invisible);
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXIST
|
||||
alter table t1 add index(b,invisible);
|
||||
show index from t1;
|
||||
drop table t1;
|
||||
@ -223,7 +223,7 @@ drop table t1;
|
||||
set debug_dbug= "+d,test_completely_invisible";
|
||||
Create table t1( a int default(99) invisible, b int);
|
||||
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXIST
|
||||
Create table t2( a int default(99) invisible, b int, unique(invisible));
|
||||
insert into t1 values(1);
|
||||
insert into t1 values(2);
|
||||
@ -233,9 +233,9 @@ select * from t1 order by b;
|
||||
select invisible, a, b from t1 order by b;
|
||||
set debug_dbug=@old_debug;
|
||||
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXIST
|
||||
alter table t1 add index(invisible);
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXIST
|
||||
alter table t1 add index(b,invisible);
|
||||
show index from t1;
|
||||
drop table t1;
|
||||
@ -262,7 +262,7 @@ select invisible, a ,b from t1;
|
||||
set debug_dbug=@old_debug;
|
||||
Show index from t1;
|
||||
## Sytem Generated Index modification
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXITS
|
||||
--error ER_KEY_COLUMN_DOES_NOT_EXIST
|
||||
create index a1 on t1(invisible);
|
||||
set debug_dbug= "+d,test_completely_invisible,test_invisible_index";
|
||||
## index does not exist for user
|
||||
|
Reference in New Issue
Block a user