1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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.
This commit is contained in:
Sachin Setiya
2018-04-19 22:11:41 +05:30
parent d71a8855ee
commit cd8b8169b6
3 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,23 @@
--source include/have_partition.inc
--source include/have_binlog_format_row.inc
CREATE TABLE t1 (a INT NOT NULL, KEY (a)) ENGINE=MEMORY PARTITION BY KEY(a) PARTITIONS 4;
INSERT INTO t1 VALUES (1),(2);
SET debug_dbug="+d,test_pseudo_invisible";
--error ER_INTERNAL_ERROR
ALTER TABLE t1 REBUILD PARTITION p2;
SET debug_dbug='';
ALTER TABLE t1 REPAIR PARTITION p1,p2,p3;
# Cleanup
Drop table t1;
#Mdev-14850
CREATE TABLE t1 (i INT) PARTITION BY HASH (i) PARTITIONS 3;
SET debug_dbug= "+d,test_pseudo_invisible";
--error ER_INTERNAL_ERROR
ALTER TABLE t1 COALESCE PARTITION 1;
SET debug_dbug= "";
SELECT * FROM t1;
# Cleanup
DROP TABLE t1;