Skip to content

Commit 3ecd9e0

Browse files
committed
Post-merge fixes for rocksdb.add_index_inplace_crash
1 parent 7c4ebec commit 3ecd9e0

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

storage/rocksdb/mysql-test/rocksdb/r/add_index_inplace_crash.result

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ INSERT INTO t1 (a, b) VALUES (2, 6);
55
INSERT INTO t1 (a, b) VALUES (3, 7);
66
# crash_during_online_index_creation
77
flush logs;
8-
SET SESSION debug="+d,crash_during_online_index_creation";
8+
SET SESSION debug_dbug="+d,crash_during_online_index_creation";
99
ALTER TABLE t1 ADD INDEX kb(b), ALGORITHM=INPLACE;
1010
ERROR HY000: Lost connection to MySQL server during query
11-
SET SESSION debug="-d,crash_during_online_index_creation";
11+
SET SESSION debug_dbug="-d,crash_during_online_index_creation";
1212
SHOW CREATE TABLE t1;
1313
Table Create Table
1414
t1 CREATE TABLE `t1` (
@@ -24,14 +24,14 @@ DROP TABLE t1;
2424
CREATE TABLE t1 (i INT, j INT, k INT, PRIMARY KEY (i), KEY(j)) ENGINE = ROCKSDB PARTITION BY KEY(i) PARTITIONS 4;
2525
# crash_during_index_creation_partition
2626
flush logs;
27-
SET SESSION debug="+d,crash_during_index_creation_partition";
27+
SET SESSION debug_dbug="+d,crash_during_index_creation_partition";
2828
ALTER TABLE t1 ADD INDEX kij(i,j), ALGORITHM=INPLACE;
2929
ERROR HY000: Lost connection to MySQL server during query
30-
SET SESSION debug="-d,crash_during_index_creation_partition";
30+
SET SESSION debug_dbug="-d,crash_during_index_creation_partition";
3131
SHOW CREATE TABLE t1;
3232
Table Create Table
3333
t1 CREATE TABLE `t1` (
34-
`i` int(11) NOT NULL DEFAULT '0',
34+
`i` int(11) NOT NULL,
3535
`j` int(11) DEFAULT NULL,
3636
`k` int(11) DEFAULT NULL,
3737
PRIMARY KEY (`i`),
@@ -59,17 +59,17 @@ DROP TABLE t1;
5959
CREATE TABLE t1 (i INT, j INT, k INT, PRIMARY KEY (i), KEY(j)) ENGINE = ROCKSDB PARTITION BY KEY(i) PARTITIONS 4;
6060
# crash_during_index_creation_partition
6161
flush logs;
62-
SET SESSION debug="+d,myrocks_simulate_index_create_rollback";
62+
SET SESSION debug_dbug="+d,myrocks_simulate_index_create_rollback";
6363
# expected assertion failure from sql layer here for alter rollback
6464
call mtr.add_suppression("Assertion `0' failed.");
6565
call mtr.add_suppression("Attempting backtrace. You can use the following information to find out");
6666
ALTER TABLE t1 ADD INDEX kij(i,j), ALGORITHM=INPLACE;
6767
ERROR HY000: Lost connection to MySQL server during query
68-
SET SESSION debug="-d,myrocks_simulate_index_create_rollback";
68+
SET SESSION debug_dbug="-d,myrocks_simulate_index_create_rollback";
6969
SHOW CREATE TABLE t1;
7070
Table Create Table
7171
t1 CREATE TABLE `t1` (
72-
`i` int(11) NOT NULL DEFAULT '0',
72+
`i` int(11) NOT NULL,
7373
`j` int(11) DEFAULT NULL,
7474
`k` int(11) DEFAULT NULL,
7575
PRIMARY KEY (`i`),
@@ -81,7 +81,7 @@ ALTER TABLE t1 ADD INDEX kij(i,j), ALGORITHM=INPLACE;
8181
SHOW CREATE TABLE t1;
8282
Table Create Table
8383
t1 CREATE TABLE `t1` (
84-
`i` int(11) NOT NULL DEFAULT '0',
84+
`i` int(11) NOT NULL,
8585
`j` int(11) DEFAULT NULL,
8686
`k` int(11) DEFAULT NULL,
8787
PRIMARY KEY (`i`),

storage/rocksdb/mysql-test/rocksdb/t/add_index_inplace_crash.test

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
--source include/have_rocksdb.inc
22
--source include/have_debug.inc
3+
--source include/have_partition.inc
34

45
--disable_warnings
56
drop table if exists t1;
@@ -18,14 +19,14 @@ INSERT INTO t1 (a, b) VALUES (3, 7);
1819
flush logs;
1920

2021
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
21-
SET SESSION debug="+d,crash_during_online_index_creation";
22+
SET SESSION debug_dbug="+d,crash_during_online_index_creation";
2223
--error 2013
2324
ALTER TABLE t1 ADD INDEX kb(b), ALGORITHM=INPLACE;
2425

2526
--enable_reconnect
2627
--source include/wait_until_connected_again.inc
2728

28-
SET SESSION debug="-d,crash_during_online_index_creation";
29+
SET SESSION debug_dbug="-d,crash_during_online_index_creation";
2930

3031
SHOW CREATE TABLE t1;
3132
CHECK TABLE t1;
@@ -51,14 +52,14 @@ while ($i <= $max) {
5152
flush logs;
5253

5354
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
54-
SET SESSION debug="+d,crash_during_index_creation_partition";
55+
SET SESSION debug_dbug="+d,crash_during_index_creation_partition";
5556
--error 2013
5657
ALTER TABLE t1 ADD INDEX kij(i,j), ALGORITHM=INPLACE;
5758

5859
--enable_reconnect
5960
--source include/wait_until_connected_again.inc
6061

61-
SET SESSION debug="-d,crash_during_index_creation_partition";
62+
SET SESSION debug_dbug="-d,crash_during_index_creation_partition";
6263

6364
SHOW CREATE TABLE t1;
6465

@@ -90,7 +91,7 @@ while ($i <= $max) {
9091
flush logs;
9192

9293
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
93-
SET SESSION debug="+d,myrocks_simulate_index_create_rollback";
94+
SET SESSION debug_dbug="+d,myrocks_simulate_index_create_rollback";
9495

9596
--echo # expected assertion failure from sql layer here for alter rollback
9697
call mtr.add_suppression("Assertion `0' failed.");
@@ -103,7 +104,7 @@ ALTER TABLE t1 ADD INDEX kij(i,j), ALGORITHM=INPLACE;
103104
--enable_reconnect
104105
--source include/wait_until_connected_again.inc
105106

106-
SET SESSION debug="-d,myrocks_simulate_index_create_rollback";
107+
SET SESSION debug_dbug="-d,myrocks_simulate_index_create_rollback";
107108

108109
SHOW CREATE TABLE t1;
109110

0 commit comments

Comments
 (0)