diff options
author | Sachin Setiya <sachinsetia1001@gmail.com> | 2018-04-19 22:11:41 +0530 |
---|---|---|
committer | Sachin Setiya <sachinsetia1001@gmail.com> | 2018-04-19 22:30:32 +0530 |
commit | cd8b8169b6f39450f10f1ba8a16ae68486bc0975 (patch) | |
tree | 7d9d10f43277a0cf38f40ed6ab6a157521f0de71 /sql/sql_partition.cc | |
parent | d71a8855eef34e5792b4939ee5e88e6625080d91 (diff) | |
download | mariadb-git-cd8b8169b6f39450f10f1ba8a16ae68486bc0975.tar.gz |
MDEV-15167 Server crashes in in bitmap_bits_set upon REPAIR PARTITION...
after rebuilding under test_pseudo_invisible
If we are doing alter related to partitioning then simple alter stmt
like adding column(or any alter stmt) can't be combined with partition
alter, this will generate a syntax error.
But IF we add
SET debug_dbug="+d,test_pseudo_invisible";
or test_completely_invisible
this will add a column to table with have an already partitioning related
alter. This execution of wrong stmt will crash the server on later stages.
(like on repair partition).
So we will simply return 1 (and ER_INTERNAL_ERROR) if we any of these
debug_dbug flags turned on.
Diffstat (limited to 'sql/sql_partition.cc')
-rw-r--r-- | sql/sql_partition.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index c5c39a26da1..634c120511a 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -4872,6 +4872,17 @@ uint prep_alter_part_table(THD *thd, TABLE *table, Alter_info *alter_info, ALTER_PARTITION_TABLE_REORG | ALTER_PARTITION_REBUILD)) { + /* + You can't add column when we are doing alter related to partition + */ + DBUG_EXECUTE_IF("test_pseudo_invisible", { + my_error(ER_INTERNAL_ERROR, MYF(0), "Don't to it with test_pseudo_invisible"); + DBUG_RETURN(1); + }); + DBUG_EXECUTE_IF("test_completely_invisible", { + my_error(ER_INTERNAL_ERROR, MYF(0), "Don't to it with test_completely_invisible"); + DBUG_RETURN(1); + }); partition_info *tab_part_info; ulonglong flags= 0; bool is_last_partition_reorged= FALSE; |