DDL blocked DML operations of other databases
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL patches by Codership | Status tracked in 5.6 | |||||
5.5 |
New
|
Undecided
|
Unassigned | |||
5.6 |
Confirmed
|
Undecided
|
Unassigned | |||
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC |
Confirmed
|
High
|
Unassigned |
Bug Description
Percona XtraDB Cluster (GPL) 5.5.31-23.7.5, Revision 438, wsrep_23.7.5.r3880
use db1
CREATE TABLE `c_uid` (
`id` bigint(24) NOT NULL AUTO_INCREMENT,
`keycode` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`uid` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`poid` int(11) DEFAULT '1',
`createtime` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `c_uid_index_1` (`keycode`),
KEY `c_uid_index_2` (`uid`)
) ENGINE=InnoDB
........1000000 rows insert into c_uid .
use db2
CREATE TABLE `uid` (
`id` bigint(24) NOT NULL AUTO_INCREMENT,
`keycode` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`uid` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`poid` int(11) DEFAULT '1',
`createtime` datetime DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `c_uid_index_1` (`keycode`),
KEY `c_uid_index_2` (`uid`)
) ENGINE=InnoDB
use db1
alter table c_uid add col_test int ;
Query OK, 1000000 rows affected (29.41 sec)
Records: 1000000 Duplicates: 0 Warnings: 0
++++++++ At the same time other session on same node +++++++++
insert into uid(keycode,
Query OK, 1 row affected (28.51 sec)
++++++++ In the process of blocking state +++++++++
| 49522 | root | localhost | videodb | Query | 12 | copy to tmp table | alter table c_uid add col_test int | 0 | 0 | 0 |
| 49539 | root | localhost | testdb | Query | 10 | wsrep in pre-commit stage |insert into uid(keycode,
db1 DDL operations blocked the db2 DML oprations .
description: | updated |
description: | updated |
description: | updated |
Changed in codership-mysql: | |
status: | New → Opinion |
status: | Opinion → New |
Changed in codership-mysql: | |
status: | New → Confirmed |
Changed in percona-xtradb-cluster: | |
importance: | Undecided → High |
A duplicate of https:/ /bugs.launchpad .net/galera/ +bug/928919 reported earlier.
But, it looks like a local TOI can block all actions, which also includes DML.
Stacktrace shows it:
Thread 4 (Thread 0x7fdfc02c1700 (LWP 43744)): get_n_alloc (offsets= 0x7fdf9c015118) at /media/ Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ include/ rem0rec. ic:909 0x7fdf9c015118) at /media/ Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ include/ rem0rec. ic:944 0x7fdf9c015118, index=0x0, rec=0x0) at /media/ Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ include/ rem0rec. ic:961 0x7fdf9c015118) at /media/ Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ include/ rem0rec. ic:1486 insert_ rec_low (current_ rec=0x7fdfb06f6 b0b "", index=index@ entry=0x7fdf9c0 1dd58, rec=rec@ entry=0x7fdf9c0 1510d "", offsets= 0x7fdf9c015118, mtr=mtr@ entry=0x7fdfc02 bc950) Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ page/page0cur. c:984 tuple_insert (cursor= cursor@ entry=0x7fdfc02 bce48, tuple=tuple@ entry=0x7fdf9c0 1dbc8, index=index@ entry=0x7fdf9c0 1dd58, n_ext=0, mtr=mtr@ entry=0x7fdfc02 bc950) Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ include/ page0cur. ic:267 optimistic_ insert (flags= flags@entry= 0, cursor= cursor@ entry=0x7fdfc02 bce40, entry=entry@ entry=0x7fdf9c0 1dbc8, rec=rec@ entry=0x7fdfc02 bce38, big_rec= big_rec@ entry=0x7fdfc02 bce30, n_ext@entry= 0, thr=thr@ entry=0x7fdf9c0 1ee58, mtr=mtr@ entry=0x7fdfc02 bc950) at /media/ Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ btr/btr0cur. c:1443 index_entry_ low (mode=mode@entry=2, index=index@ entry=0x7fdf9c0 1dd58, entry=entry@ entry=0x7fdf9c0 1dbc8, n_ext=n_ ext@entry= 0, thr=thr@ entry=0x7fdf9c0 1ee58) Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ row/row0ins. c:2241 0x7fdf9c01dd58, entry=<optimized out>, n_ext=n_ ext@entry= 0, foreign= foreign@ entry=1, thr=thr@ entry=0x7fdf9c0 1ee58) Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ row/row0ins. c:2353 index_entry_ step (thr=0x7fdf9c01 ee58, node=0x7fdf9c01 e9b0) at /media/ Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ row/row0ins. c:2441 ee58, node=0x7fdf9c01 e9b0) at /media/ Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ row/row0ins. c:2573 entry=0x7fdf9c0 1ee58) at /media/ Tintin/ Work/code/ percona- xtradb- cluster/ trunk-25/ Percona- Server/ storage/ innobase/ row/row0ins. c:2690 for_mysql (mysql_ rec=<optimized out>, prebuilt= 0x7fdf9c01e488) at /media/ Tintin/ Work/code/ perco.. .
#0 0x00000000009da906 in rec_offs_
#1 rec_offs_n_fields (offsets=
#2 rec_offs_validate (offsets=
#3 rec_offs_extra_size (offsets=
#4 0x00000000009df0ca in page_cur_
at /media/
#5 0x00000000008f3746 in page_cur_
at /media/
#6 0x00000000008fa59e in btr_cur_
n_ext=
#7 0x0000000000a0f014 in row_ins_
at /media/
#8 0x0000000000a131c0 in row_ins_index_entry (index=
at /media/
#9 0x0000000000a13dc0 in row_ins_
#10 row_ins (thr=0x7fdf9c01
#11 row_ins_step (thr=thr@
#12 0x000000000086beb6 in row_insert_