Details
Description
The test ported from MDEV-32738 hangs as ALTER INPLACE is unable to abort a DML INSERT operation:
--connect con1_1,127.0.0.1,root,,test,$NODE_MYPORT_1
|
--connect con1_2,127.0.0.1,root,,test,$NODE_MYPORT_1
|
|
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1_fk(c1 INT PRIMARY KEY, c2 INT, INDEX (c2), FOREIGN KEY (c2) REFERENCES t1(c1)) ENGINE=InnoDB;
|
|
INSERT INTO t1 VALUES (1);
|
|
--connection con1_1
|
SET DEBUG_SYNC = 'ib_after_row_insert WAIT_FOR bf_abort';
|
# INSERT also grabs FK-referenced table lock.
|
--send
|
INSERT INTO t1_fk VALUES (1, 1);
|
|
--connection con1_2
|
SET DEBUG_SYNC = 'ha_write_row_start SIGNAL may_alter WAIT_FOR may_insert';
|
# Stop before doing anything, but pass wsrep_sync_wait().
|
# This should be done before ALTER enters TOI.
|
--send
|
INSERT INTO t1_fk VALUES (2, 2);
|
|
--connection node_1
|
SET DEBUG_SYNC = 'now WAIT_FOR may_alter';
|
SET DEBUG_SYNC = 'lock_wait_before_suspend SIGNAL may_insert WAIT_FOR alter_continue';
|
# ALTER BF-aborts the first INSERT and lets the second INSERT continue.
|
--send
|
ALTER TABLE t1 ADD COLUMN c2 INT;
|
|
--connection con1_1
|
# First INSERT gets BF-aborted.
|
--error ER_LOCK_DEADLOCK
|
--reap
|
|
--connection con1_2
|
# Second INSERT rolls back as ALTER is waiting on the lock.
|
--error ER_LOCK_DEADLOCK
|
--reap
|
SET DEBUG_SYNC = 'now SIGNAL alter_continue';
|
|
--connection node_1
|
# ALTER succeeds.
|
--reap
|
The reason is that ALTER's InnoDB trx has is_wsrep() == false. That might be because trx initialization has been moved to the ctor of ha_innobase_inplace_ctx() which is now done earlier in prepare_inplace_alter_table().
Attachments
Issue Links
- blocks
-
MDEV-32738 Inconsistency in Galera cluster while running add drop column
-
- Closed
-
- relates to
-
MDEV-32738 Inconsistency in Galera cluster while running add drop column
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
Status | Open [ 1 ] | In Progress [ 3 ] |
Link |
This issue blocks |
Assignee | Denis Protivensky [ JIRAUSER52676 ] | Julius Goryavsky [ sysprg ] |
Status | In Progress [ 3 ] | In Testing [ 10301 ] |
Assignee | Julius Goryavsky [ sysprg ] | Denis Protivensky [ JIRAUSER52676 ] |
Assignee | Denis Protivensky [ JIRAUSER52676 ] | Julius Goryavsky [ sysprg ] |
Status | In Testing [ 10301 ] | Stalled [ 10000 ] |
Fix Version/s | 10.6.19 [ 29833 ] | |
Fix Version/s | 10.6 [ 24028 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Fix Version/s | 10.11.9 [ 29834 ] | |
Fix Version/s | 11.1.6 [ 29835 ] | |
Fix Version/s | 11.2.5 [ 29836 ] | |
Fix Version/s | 11.4.3 [ 29837 ] |
Fix Version/s | 10.5.28 [ 29952 ] |