Open midenok opened 1 year ago
#0 thd_get_error_context_description (thd=0x7f45a000b9d8, buffer=0x7f45880f2be0 "MySQL thread id 10, OS thread handle 139936611886784, query id 10 localhost root Sending data\nUPDATE t4 SET d = 1 WHERE d in ( SELECT a FROM t1 ) ORDER BY c LIMIT 6", length=1024, max_query_len=3000) at ../src/sql/sql_show.cc:10529
#1 0x00005651652767de in innobase_mysql_print_thd (f=0x7f45b4df7680 <_IO_2_1_stderr_>, thd=0x7f45a000b9d8, max_query_len=3000) at ../src/storage/innobase/handler/ha_innodb.cc:2092
#2 0x0000565165757390 in trx_print_low (f=0x7f45b4df7680 <_IO_2_1_stderr_>, trx=0x7f45ae32e300, max_query_len=3000, n_rec_locks=2, n_trx_locks=4, heap_size=1152) at ../src/storage/innobase/trx/trx0trx.cc:1881
#3 0x0000565165544ad5 in DeadlockChecker::print (trx=0x7f45ae32e300, max_query_len=3000) at ../src/storage/innobase/lock/lock0lock.cc:6569
#4 0x0000565165545609 in DeadlockChecker::notify (this=0x7f45880f3160, lock=0x7f45ae32d330) at ../src/storage/innobase/lock/lock0lock.cc:6711
#5 0x0000565165545fa5 in DeadlockChecker::search (this=0x7f45880f3160) at ../src/storage/innobase/lock/lock0lock.cc:6827
#6 0x000056516553370b in DeadlockChecker::check_and_resolve (lock=0x7f45ae32d5e0, trx=0x7f45ae32d208) at ../src/storage/innobase/lock/lock0lock.cc:6968
#7 0x0000565165532bba in lock_rec_enqueue_waiting (type_mode=3, block=0x7f45adb59568, heap_no=2, index=0x7f459808ab70, thr=0x7f45a4035cc0, prdt=0x0) at ../src/storage/innobase/lock/lock0lock.cc:1717
#8 0x00005651655406d9 in lock_rec_lock (impl=false, mode=3, block=0x7f45adb59568, heap_no=2, index=0x7f459808ab70, thr=0x7f45a4035cc0) at ../src/storage/innobase/lock/lock0lock.cc:1947
#9 0x0000565165541ab9 in lock_clust_rec_read_check_and_lock (flags=0, block=0x7f45adb59568, rec=0x7f45ae08807e "", index=0x7f459808ab70, offsets=0x7f45880f4630, mode=LOCK_X, gap_mode=0, thr=0x7f45a4035cc0) at ../src/storage/innobase/lock/lock0lock.cc:5871
#10 0x00005651656acf76 in sel_set_rec_lock (pcur=0x7f45a40357b8, rec=0x7f45ae08807e "", index=0x7f459808ab70, offsets=0x7f45880f4630, mode=3, type=0, thr=0x7f45a4035cc0, mtr=0x7f45880f4890) at ../src/storage/innobase/row/row0sel.cc:1321
#11 0x00005651656a86bf in row_search_mvcc (buf=0x7f45a402e018 "\377", mode=PAGE_CUR_G, prebuilt=0x7f45a40355f0, match_mode=0, direction=0) at ../src/storage/innobase/row/row0sel.cc:5147
#12 0x0000565165284f47 in ha_innobase::index_read (this=0x7f45a4032f30, buf=0x7f45a402e018 "\377", key_ptr=0x0, key_len=0, find_flag=HA_READ_AFTER_KEY) at ../src/storage/innobase/handler/ha_innodb.cc:9368
#13 0x0000565165285ae0 in ha_innobase::index_first (this=0x7f45a4032f30, buf=0x7f45a402e018 "\377") at ../src/storage/innobase/handler/ha_innodb.cc:9742
#14 0x0000565165285d37 in ha_innobase::rnd_next (this=0x7f45a4032f30, buf=0x7f45a402e018 "\377") at ../src/storage/innobase/handler/ha_innodb.cc:9835
#15 0x0000565164c04a5f in handler::ha_rnd_next (this=0x7f45a4032f30, buf=0x7f45a402e018 "\377") at ../src/sql/handler.cc:2866
#16 0x0000565164d4c450 in rr_sequential (info=0x7f45880f59b8) at ../src/sql/records.cc:485
#17 0x0000565164d38466 in READ_RECORD::read_record (this=0x7f45880f59b8) at ../src/sql/records.h:70
#18 0x00005651650181c1 in mysql_update (thd=0x7f45a400a928, table_list=0x7f45a401bd30, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, ignore=false, found_return=0x7f45880f7280, updated_return=0x7f45880f7278) at ../src/sql/sql_update.cc:995
#19 0x0000565164ecc258 in mysql_execute_command (thd=0x7f45a400a928) at ../src/sql/sql_parse.cc:4436
#20 0x0000565164ec3b3b in mysql_parse (thd=0x7f45a400a928, rawbuf=0x7f45a401bc60 "UPDATE t4 SET d = 9", length=19, parser_state=0x7f45880f85d0, is_com_multi=false, is_next_command=false) at ../src/sql/sql_parse.cc:8015
#0 DeadlockChecker::trx_rollback (this=0x7f45880f3160) at ../src/storage/innobase/lock/lock0lock.cc:6906
#1 0x0000565165533950 in DeadlockChecker::check_and_resolve (lock=0x7f45ae32d5e0, trx=0x7f45ae32d208) at ../src/storage/innobase/lock/lock0lock.cc:6989
#2 0x0000565165532bba in lock_rec_enqueue_waiting (type_mode=3, block=0x7f45adb59568, heap_no=2, index=0x7f459808ab70, thr=0x7f45a4035cc0, prdt=0x0) at ../src/storage/innobase/lock/lock0lock.cc:1717
#0 rec_print_comp (file=0x5574f1ad04c0, rec=0x7f33198a8070 "supremum", offsets=0x7f330805c940) at ../src/storage/innobase/rem/rem0rec.cc:2341
#1 0x00005574f0169368 in rec_print_new (file=0x5574f1ad04c0, rec=0x7f33198a8070 "supremum", offsets=0x7f330805c940) at ../src/storage/innobase/rem/rem0rec.cc:2534
#2 0x00005574f00a4f56 in lock_rec_print (file=0x5574f1ad04c0, lock=0x7f3319b7c330, mtr=...) at ../src/storage/innobase/lock/lock0lock.cc:4489
#3 0x00005574f00acc87 in DeadlockChecker::print (lock=0x7f3319b7c330) at ../src/storage/innobase/lock/lock0lock.cc:6583
#4 0x00005574f00ad6e4 in DeadlockChecker::notify (this=0x7f330805d160, lock=0x7f3319b7c330) at ../src/storage/innobase/lock/lock0lock.cc:6723
#5 0x00005574f00ae035 in DeadlockChecker::search (this=0x7f330805d160) at ../src/storage/innobase/lock/lock0lock.cc:6827
#6 0x00005574f009b79b in DeadlockChecker::check_and_resolve (lock=0x7f3319b7c5e0, trx=0x7f3319b7c208) at ../src/storage/innobase/lock/lock0lock.cc:6968
#7 0x00005574f009ac4a in lock_rec_enqueue_waiting (type_mode=3, block=0x7f33193a8568, heap_no=2, index=0x7f330408ab90, thr=0x7f3310035cf0, prdt=0x0) at ../src/storage/innobase/lock/lock0lock.cc:1717
#8 0x00005574f00a8769 in lock_rec_lock (impl=false, mode=3, block=0x7f33193a8568, heap_no=2, index=0x7f330408ab90, thr=0x7f3310035cf0) at ../src/storage/innobase/lock/lock0lock.cc:1947
#9 0x00005574f00a9b49 in lock_clust_rec_read_check_and_lock (flags=0, block=0x7f33193a8568, rec=0x7f33198d807e "", index=0x7f330408ab90, offsets=0x7f330805e630, mode=LOCK_X, gap_mode=0, thr=0x7f3310035cf0) at ../src/storage/innobase/lock/lock0lock.cc:5871
#10 0x00005574f0215006 in sel_set_rec_lock (pcur=0x7f33100357e8, rec=0x7f33198d807e "", index=0x7f330408ab90, offsets=0x7f330805e630, mode=3, type=0, thr=0x7f3310035cf0, mtr=0x7f330805e890) at ../src/storage/innobase/row/row0sel.cc:1321
#11 0x00005574f021074f in row_search_mvcc (buf=0x7f331002e048 "\377", mode=PAGE_CUR_G, prebuilt=0x7f3310035620, match_mode=0, direction=0) at ../src/storage/innobase/row/row0sel.cc:5147
#12 0x00005574efdecfd7 in ha_innobase::index_read (this=0x7f3310032f60, buf=0x7f331002e048 "\377", key_ptr=0x0, key_len=0, find_flag=HA_READ_AFTER_KEY) at ../src/storage/innobase/handler/ha_innodb.cc:9368
#13 0x00005574efdedb70 in ha_innobase::index_first (this=0x7f3310032f60, buf=0x7f331002e048 "\377") at ../src/storage/innobase/handler/ha_innodb.cc:9742
#14 0x00005574efdeddc7 in ha_innobase::rnd_next (this=0x7f3310032f60, buf=0x7f331002e048 "\377") at ../src/storage/innobase/handler/ha_innodb.cc:9835
#15 0x00005574ef76ca5f in handler::ha_rnd_next (this=0x7f3310032f60, buf=0x7f331002e048 "\377") at ../src/sql/handler.cc:2866
#16 0x00005574ef8b4450 in rr_sequential (info=0x7f330805f9b8) at ../src/sql/records.cc:485
#17 0x00005574ef8a0466 in READ_RECORD::read_record (this=0x7f330805f9b8) at ../src/sql/records.h:70
#18 0x00005574efb80251 in mysql_update (thd=0x7f331000a958, table_list=0x7f331001bd60, fields=..., values=..., conds=0x0, order_num=0, order=0x0, limit=18446744073709551615, ignore=false, found_return=0x7f3308061280, updated_return=0x7f3308061278) at ../src/sql/sql_update.cc:995
#19 0x00005574efa34258 in mysql_execute_command (thd=0x7f331000a958) at ../src/sql/sql_parse.cc:4436
#20 0x00005574efa2bb3b in mysql_parse (thd=0x7f331000a958, rawbuf=0x7f331001bc90 "UPDATE t4 SET d = 9", length=19, parser_state=0x7f33080625d0, is_com_multi=false, is_next_command=false) at ../src/sql/sql_parse.cc:8015
--source include/have_debug.inc
--source include/have_innodb.inc
--source include/have_binlog_format_statement.inc
--let $rpl_topology=1->2
--source include/rpl_init.inc
--connection server_2
set @old_parallel_threads= @@global.slave_parallel_threads;
set @old_parallel_mode= @@global.slave_parallel_mode;
--source include/stop_slave.inc
change master to master_use_gtid= slave_pos;
set global slave_parallel_threads= 10;
set global slave_parallel_mode= optimistic;
--source include/start_slave.inc
set global innodb_print_all_deadlocks= on;
--connection server_1
create table `tu`(`id` int(11), `a` int(11) default null, `b` varchar(10) default null, `c` varchar(10) default null, primary key(`id`), unique key `u`(`a`,`b`)) engine=innodb default charset=latin1 stats_persistent=0;
--save_master_pos
--connection server_2
--sync_with_master
insert into tu values(1,1,'a','a'),(2,9999,'xxxx','x'),(3,10000,'b','b'),(4,4,'c','c');
--connection server_1
--connect (m1,localhost,root,,test)
--connect (m2,localhost,root,,test)
--connect (m3,localhost,root,,test)
--connect (m4,localhost,root,,test)
--connect (m5,localhost,root,,test)
--connect (m6,localhost,root,,test)
--connection m1
set @@session.gtid_domain_id= 1;
send delete from tu where a = 9999 and b = 'xxxx';
--connection m2
set @@session.gtid_domain_id= 2;
send delete from tu where a = 9999 and b = 'xxxx';
--connection m3
set @@session.gtid_domain_id= 3;
send delete from tu where a = 9999 and b = 'xxxx';
--connection m4
set @@session.gtid_domain_id= 4;
send delete from tu where a = 9999 and b = 'xxxx';
--connection m5
set @@session.gtid_domain_id= 5;
send delete from tu where a = 9999 and b = 'xxxx';
--connection m6
set @@session.gtid_domain_id= 6;
send delete from tu where a = 9999 and b = 'xxxx';
--connection m1
reap;
--connection m2
reap;
--connection m3
reap;
--connection m4
reap;
--connection m5
reap;
--connection m6
reap;
--save_master_pos
--connection server_2
--sync_with_master
# Cleanup
--source include/stop_slave.inc
set global slave_parallel_threads= @old_parallel_threads;
set global slave_parallel_mode= @old_parallel_mode;
--source include/start_slave.inc
set global innodb_print_all_deadlocks= default;
--disconnect m1
--disconnect m2
--disconnect m3
--disconnect m4
--disconnect m5
--disconnect m6
--connection server_1
drop table tu;
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction");
call mtr.add_suppression("Sort aborted.*");
set global innodb_print_all_deadlocks= default;
--source include/rpl_end.inc
Another, unrelated task
--source include/have_innodb.inc
# https://mariadbcorp.atlassian.net/browse/SAMU-132
create table doublelocks (
pk int unsigned auto_increment primary key,
id int,
x varchar(10),
unique key uk(id, x)
) engine innodb;
show session variables like 'autocommit';
insert into doublelocks (id, x) values (1, 'a');
insert into doublelocks (id, x) values (2, 'b');
insert into doublelocks (id, x) values (3, 'c');
start transaction;
delete from doublelocks where id = 2 and x = 'b';
show engine innodb status;
delete from doublelocks where id = 2 and x = 'b';
delete from doublelocks where id = 2 and x = 'b';
delete from doublelocks where id = 2 and x = 'b';
delete from doublelocks where id = 2 and x = 'b';
delete from doublelocks where id = 2 and x = 'b';
show engine innodb status;
show session variables like 'autocommit';
drop table doublelocks;
#0 lock_rec_lock (impl=false, mode=1027, block=0x7f77b7000be0, heap_no=3, index=0x7f779805a448, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:1486
#1 0x000055a889ee148e in lock_sec_rec_read_check_and_lock (flags=0, block=0x7f77b7000be0, rec=0x7f77b70dc08f "\200", index=0x7f779805a448, offsets=0x7f77b4055a60, mode=LOCK_X, gap_mode=1024, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:5537
#2 0x000055a88a044321 in sel_set_rec_lock (pcur=0x7f779805d268, rec=0x7f77b70dc08f "\200", index=0x7f779805a448, offsets=0x7f77b4055a60, mode=3, type=1024, thr=0x7f779805da68, mtr=0x7f77b4055cc0) at ../src/storage/innobase/row/row0sel.cc:1369
#3 0x000055a88a03f8ff in row_search_mvcc (buf=0x7f77980551e0 "\377", mode=PAGE_CUR_GE, prebuilt=0x7f779805d098, match_mode=1, direction=0) at ../src/storage/innobase/row/row0sel.cc:5228
#4 0x000055a889c5253f in ha_innobase::index_read (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key_ptr=0x7f7798965680 "", key_len=18, find_flag=HA_READ_KEY_EXACT) at ../src/storage/innobase/handler/ha_innodb.cc:8986
#5 0x000055a88937fdca in handler::index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f7798965680 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.h:3925
#6 0x000055a889368fe0 in handler::ha_index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f7798965680 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.cc:3471
#7 0x000055a88937419b in handler::read_range_first (this=0x7f77980555f0, start_key=0x7f77980556f0, end_key=0x7f7798055710, eq_range_arg=true, sorted=true) at ../src/sql/handler.cc:6539
#8 0x000055a88999c7b2 in handler::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:518
#9 0x000055a88999c949 in Mrr_simple_index_reader::get_next (this=0x7f7798055c28, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:555
#10 0x000055a88999fa3a in DsMrr_impl::dsmrr_next (this=0x7f7798055ad8, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:1655
#11 0x000055a889c6a094 in ha_innobase::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/storage/innobase/handler/ha_innodb.cc:20012
#12 0x000055a8894c7057 in QUICK_RANGE_SELECT::get_next (this=0x7f7798022ec0) at ../src/sql/opt_range.cc:12727
#13 0x000055a8894eeded in rr_quick (info=0x7f77b40570b0) at ../src/sql/records.cc:403
#14 0x000055a8894d90a6 in READ_RECORD::read_record (this=0x7f77b40570b0) at ../src/sql/records.h:81
#15 0x000055a88969d335 in mysql_delete (thd=0x7f77980020f8, table_list=0x7f779802dfa8, conds=0x7f779802ee58, order_list=0x7f7798007030, limit=18446744073709551615, options=0, result=0x0) at ../src/sql/sql_delete.cc:812
#16 0x000055a889711b63 in mysql_execute_command (thd=0x7f77980020f8, is_called_from_prepared_stmt=false) at ../src/sql/sql_parse.cc:4812
#17 0x000055a88970727f in mysql_parse (thd=0x7f77980020f8, rawbuf=0x7f779802de90 "delete from doublelocks where id = 2 and x = 'b'", length=48, parser_state=0x7f77b4059288) at ../src/sql/sql_parse.cc:8005
#0 lock_rec_lock (impl=false, mode=1027, block=0x7f77b7000b10, heap_no=3, index=0x7f7798058d48, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:1486
#1 0x000055a889ee1b00 in lock_clust_rec_read_check_and_lock (flags=0, block=0x7f77b7000b10, rec=0x7f77b70d809c "", index=0x7f7798058d48, offsets=0x7f77b4055a60, mode=LOCK_X, gap_mode=1024, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:5607
#2 0x000055a88a03aa0a in Row_sel_get_clust_rec_for_mysql::operator() (this=0x7f77b4055f98, prebuilt=0x7f779805d098, sec_index=0x7f779805a448, rec=0x7f77b70dc08f "\200", thr=0x7f779805da68, out_rec=0x7f77b4055fb8, offsets=0x7f77b4055a58, offset_heap=0x7f77b4055cb8, vrow=0x0, mtr=0x7f77b4055cc0) at ../src/storage/innobase/row/row0sel.cc:3497
#3 0x000055a88a040956 in row_search_mvcc (buf=0x7f77980551e0 "\377", mode=PAGE_CUR_GE, prebuilt=0x7f779805d098, match_mode=1, direction=0) at ../src/storage/innobase/row/row0sel.cc:5503
#4 0x000055a889c5253f in ha_innobase::index_read (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key_ptr=0x7f7798965680 "", key_len=18, find_flag=HA_READ_KEY_EXACT) at ../src/storage/innobase/handler/ha_innodb.cc:8986
#5 0x000055a88937fdca in handler::index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f7798965680 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.h:3925
#6 0x000055a889368fe0 in handler::ha_index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f7798965680 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.cc:3471
#7 0x000055a88937419b in handler::read_range_first (this=0x7f77980555f0, start_key=0x7f77980556f0, end_key=0x7f7798055710, eq_range_arg=true, sorted=true) at ../src/sql/handler.cc:6539
#8 0x000055a88999c7b2 in handler::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:518
#9 0x000055a88999c949 in Mrr_simple_index_reader::get_next (this=0x7f7798055c28, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:555
#10 0x000055a88999fa3a in DsMrr_impl::dsmrr_next (this=0x7f7798055ad8, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:1655
#11 0x000055a889c6a094 in ha_innobase::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/storage/innobase/handler/ha_innodb.cc:20012
#12 0x000055a8894c7057 in QUICK_RANGE_SELECT::get_next (this=0x7f7798022ec0) at ../src/sql/opt_range.cc:12727
#13 0x000055a8894eeded in rr_quick (info=0x7f77b40570b0) at ../src/sql/records.cc:403
#14 0x000055a8894d90a6 in READ_RECORD::read_record (this=0x7f77b40570b0) at ../src/sql/records.h:81
#15 0x000055a88969d335 in mysql_delete (thd=0x7f77980020f8, table_list=0x7f779802dfa8, conds=0x7f779802ee58, order_list=0x7f7798007030, limit=18446744073709551615, options=0, result=0x0) at ../src/sql/sql_delete.cc:812
#16 0x000055a889711b63 in mysql_execute_command (thd=0x7f77980020f8, is_called_from_prepared_stmt=false) at ../src/sql/sql_parse.cc:4812
#17 0x000055a88970727f in mysql_parse (thd=0x7f77980020f8, rawbuf=0x7f779802de90 "delete from doublelocks where id = 2 and x = 'b'", length=48, parser_state=0x7f77b4059288) at ../src/sql/sql_parse.cc:8005
#0 lock_rec_lock (impl=true, mode=1027, block=0x7f77b7000be0, heap_no=3, index=0x7f779805a448, thr=0x7f7798966708) at ../src/storage/innobase/lock/lock0lock.cc:1486
#1 0x000055a889ee0ca4 in lock_sec_rec_modify_check_and_lock (flags=0, block=0x7f77b7000be0, rec=0x7f77b70dc08f "\200", index=0x7f779805a448, thr=0x7f7798966708, mtr=0x7f77b4055e28) at ../src/storage/innobase/lock/lock0lock.cc:5428
#2 0x000055a88a06fc80 in row_upd_sec_index_entry (node=0x7f779805db08, thr=0x7f7798966708) at ../src/storage/innobase/row/row0upd.cc:1944
#3 0x000055a88a06aaca in row_upd_sec_step (node=0x7f779805db08, thr=0x7f7798966708) at ../src/storage/innobase/row/row0upd.cc:2058
#4 0x000055a88a068ac7 in row_upd (node=0x7f779805db08, thr=0x7f7798966708) at ../src/storage/innobase/row/row0upd.cc:2782
#5 0x000055a88a068414 in row_upd_step (thr=0x7f7798966708) at ../src/storage/innobase/row/row0upd.cc:2897
#6 0x000055a88a00126c in row_update_for_mysql (prebuilt=0x7f779805d098) at ../src/storage/innobase/row/row0mysql.cc:1678
#7 0x000055a889c50d5d in ha_innobase::delete_row (this=0x7f77980555f0, record=0x7f77980551e0 "\374\002") at ../src/storage/innobase/handler/ha_innodb.cc:8689
#8 0x000055a889378442 in handler::ha_delete_row (this=0x7f77980555f0, buf=0x7f77980551e0 "\374\002") at ../src/sql/handler.cc:7647
#9 0x000055a8896a1b96 in TABLE::delete_row (this=0x7f77980527a8) at ../src/sql/sql_delete.cc:281
#10 0x000055a88969d5bf in mysql_delete (thd=0x7f77980020f8, table_list=0x7f779802dfa8, conds=0x7f779802ee58, order_list=0x7f7798007030, limit=18446744073709551615, options=0, result=0x0) at ../src/sql/sql_delete.cc:846
#11 0x000055a889711b63 in mysql_execute_command (thd=0x7f77980020f8, is_called_from_prepared_stmt=false) at ../src/sql/sql_parse.cc:4812
#12 0x000055a88970727f in mysql_parse (thd=0x7f77980020f8, rawbuf=0x7f779802de90 "delete from doublelocks where id = 2 and x = 'b'", length=48, parser_state=0x7f77b4059288) at ../src/sql/sql_parse.cc:8005
#0 lock_rec_lock (impl=false, mode=3, block=0x7f77b7000be0, heap_no=3, index=0x7f779805a448, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:1486
#1 0x000055a889ee148e in lock_sec_rec_read_check_and_lock (flags=0, block=0x7f77b7000be0, rec=0x7f77b70dc08f "\200", index=0x7f779805a448, offsets=0x7f77b4055a60, mode=LOCK_X, gap_mode=0, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:5537
#2 0x000055a88a044321 in sel_set_rec_lock (pcur=0x7f779805d268, rec=0x7f77b70dc08f "\200", index=0x7f779805a448, offsets=0x7f77b4055a60, mode=3, type=0, thr=0x7f779805da68, mtr=0x7f77b4055cc0) at ../src/storage/innobase/row/row0sel.cc:1369
#3 0x000055a88a03f8ff in row_search_mvcc (buf=0x7f77980551e0 "\377", mode=PAGE_CUR_GE, prebuilt=0x7f779805d098, match_mode=1, direction=0) at ../src/storage/innobase/row/row0sel.cc:5228
#4 0x000055a889c5253f in ha_innobase::index_read (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key_ptr=0x7f779896bd60 "", key_len=18, find_flag=HA_READ_KEY_EXACT) at ../src/storage/innobase/handler/ha_innodb.cc:8986
#5 0x000055a88937fdca in handler::index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f779896bd60 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.h:3925
#6 0x000055a889368fe0 in handler::ha_index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f779896bd60 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.cc:3471
#7 0x000055a88937419b in handler::read_range_first (this=0x7f77980555f0, start_key=0x7f77980556f0, end_key=0x7f7798055710, eq_range_arg=true, sorted=true) at ../src/sql/handler.cc:6539
#8 0x000055a88999c7b2 in handler::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:518
#9 0x000055a88999c949 in Mrr_simple_index_reader::get_next (this=0x7f7798055c28, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:555
#10 0x000055a88999fa3a in DsMrr_impl::dsmrr_next (this=0x7f7798055ad8, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:1655
#11 0x000055a889c6a094 in ha_innobase::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/storage/innobase/handler/ha_innodb.cc:20012
#12 0x000055a8894c7057 in QUICK_RANGE_SELECT::get_next (this=0x7f7798022ec0) at ../src/sql/opt_range.cc:12727
#13 0x000055a8894eeded in rr_quick (info=0x7f77b40570b0) at ../src/sql/records.cc:403
#14 0x000055a8894d90a6 in READ_RECORD::read_record (this=0x7f77b40570b0) at ../src/sql/records.h:81
#15 0x000055a88969d335 in mysql_delete (thd=0x7f77980020f8, table_list=0x7f779802dfa8, conds=0x7f779802ee58, order_list=0x7f7798007030, limit=18446744073709551615, options=0, result=0x0) at ../src/sql/sql_delete.cc:812
#16 0x000055a889711b63 in mysql_execute_command (thd=0x7f77980020f8, is_called_from_prepared_stmt=false) at ../src/sql/sql_parse.cc:4812
#17 0x000055a88970727f in mysql_parse (thd=0x7f77980020f8, rawbuf=0x7f779802de90 "delete from doublelocks where id = 2 and x = 'b'", length=48, parser_state=0x7f77b4059288) at ../src/sql/sql_parse.cc:8005
#0 lock_rec_lock (impl=false, mode=515, block=0x7f77b7000be0, heap_no=4, index=0x7f779805a448, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:1486
#1 0x000055a889ee148e in lock_sec_rec_read_check_and_lock (flags=0, block=0x7f77b7000be0, rec=0x7f77b70dc09f "\200", index=0x7f779805a448, offsets=0x7f77b4055a60, mode=LOCK_X, gap_mode=512, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:5537
#2 0x000055a88a044321 in sel_set_rec_lock (pcur=0x7f779805d268, rec=0x7f77b70dc09f "\200", index=0x7f779805a448, offsets=0x7f77b4055a60, mode=3, type=512, thr=0x7f779805da68, mtr=0x7f77b4055cc0) at ../src/storage/innobase/row/row0sel.cc:1369
#3 0x000055a88a03f204 in row_search_mvcc (buf=0x7f77980551e0 "\377", mode=PAGE_CUR_GE, prebuilt=0x7f779805d098, match_mode=1, direction=0) at ../src/storage/innobase/row/row0sel.cc:5070
#4 0x000055a889c5253f in ha_innobase::index_read (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key_ptr=0x7f779896bd60 "", key_len=18, find_flag=HA_READ_KEY_EXACT) at ../src/storage/innobase/handler/ha_innodb.cc:8986
#5 0x000055a88937fdca in handler::index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f779896bd60 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.h:3925
#6 0x000055a889368fe0 in handler::ha_index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f779896bd60 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.cc:3471
#7 0x000055a88937419b in handler::read_range_first (this=0x7f77980555f0, start_key=0x7f77980556f0, end_key=0x7f7798055710, eq_range_arg=true, sorted=true) at ../src/sql/handler.cc:6539
#8 0x000055a88999c7b2 in handler::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:518
#9 0x000055a88999c949 in Mrr_simple_index_reader::get_next (this=0x7f7798055c28, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:555
#10 0x000055a88999fa3a in DsMrr_impl::dsmrr_next (this=0x7f7798055ad8, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:1655
#11 0x000055a889c6a094 in ha_innobase::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/storage/innobase/handler/ha_innodb.cc:20012
#12 0x000055a8894c7057 in QUICK_RANGE_SELECT::get_next (this=0x7f7798022ec0) at ../src/sql/opt_range.cc:12727
#13 0x000055a8894eeded in rr_quick (info=0x7f77b40570b0) at ../src/sql/records.cc:403
#14 0x000055a8894d90a6 in READ_RECORD::read_record (this=0x7f77b40570b0) at ../src/sql/records.h:81
#15 0x000055a88969d335 in mysql_delete (thd=0x7f77980020f8, table_list=0x7f779802dfa8, conds=0x7f779802ee58, order_list=0x7f7798007030, limit=18446744073709551615, options=0, result=0x0) at ../src/sql/sql_delete.cc:812
#16 0x000055a889711b63 in mysql_execute_command (thd=0x7f77980020f8, is_called_from_prepared_stmt=false) at ../src/sql/sql_parse.cc:4812
#17 0x000055a88970727f in mysql_parse (thd=0x7f77980020f8, rawbuf=0x7f779802de90 "delete from doublelocks where id = 2 and x = 'b'", length=48, parser_state=0x7f77b4059288) at ../src/sql/sql_parse.cc:8005
#0 lock_rec_lock (impl=false, mode=3, block=0x7f77b7000be0, heap_no=3, index=0x7f779805a448, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:1486
#1 0x000055a889ee148e in lock_sec_rec_read_check_and_lock (flags=0, block=0x7f77b7000be0, rec=0x7f77b70dc08f "\200", index=0x7f779805a448, offsets=0x7f77b4055a60, mode=LOCK_X, gap_mode=0, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:5537
#2 0x000055a88a044321 in sel_set_rec_lock (pcur=0x7f779805d268, rec=0x7f77b70dc08f "\200", index=0x7f779805a448, offsets=0x7f77b4055a60, mode=3, type=0, thr=0x7f779805da68, mtr=0x7f77b4055cc0) at ../src/storage/innobase/row/row0sel.cc:1369
#3 0x000055a88a03f8ff in row_search_mvcc (buf=0x7f77980551e0 "\377", mode=PAGE_CUR_GE, prebuilt=0x7f779805d098, match_mode=1, direction=0) at ../src/storage/innobase/row/row0sel.cc:5228
#4 0x000055a889c5253f in ha_innobase::index_read (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key_ptr=0x7f779896bd60 "", key_len=18, find_flag=HA_READ_KEY_EXACT) at ../src/storage/innobase/handler/ha_innodb.cc:8986
#5 0x000055a88937fdca in handler::index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f779896bd60 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.h:3925
#6 0x000055a889368fe0 in handler::ha_index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f779896bd60 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.cc:3471
#7 0x000055a88937419b in handler::read_range_first (this=0x7f77980555f0, start_key=0x7f77980556f0, end_key=0x7f7798055710, eq_range_arg=true, sorted=true) at ../src/sql/handler.cc:6539
#8 0x000055a88999c7b2 in handler::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:518
#9 0x000055a88999c949 in Mrr_simple_index_reader::get_next (this=0x7f7798055c28, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:555
#10 0x000055a88999fa3a in DsMrr_impl::dsmrr_next (this=0x7f7798055ad8, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:1655
#11 0x000055a889c6a094 in ha_innobase::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/storage/innobase/handler/ha_innodb.cc:20012
#12 0x000055a8894c7057 in QUICK_RANGE_SELECT::get_next (this=0x7f7798022ec0) at ../src/sql/opt_range.cc:12727
#13 0x000055a8894eeded in rr_quick (info=0x7f77b40570b0) at ../src/sql/records.cc:403
#14 0x000055a8894d90a6 in READ_RECORD::read_record (this=0x7f77b40570b0) at ../src/sql/records.h:81
#15 0x000055a88969d335 in mysql_delete (thd=0x7f77980020f8, table_list=0x7f779802dfa8, conds=0x7f779802ee58, order_list=0x7f7798007030, limit=18446744073709551615, options=0, result=0x0) at ../src/sql/sql_delete.cc:812
#16 0x000055a889711b63 in mysql_execute_command (thd=0x7f77980020f8, is_called_from_prepared_stmt=false) at ../src/sql/sql_parse.cc:4812
#17 0x000055a88970727f in mysql_parse (thd=0x7f77980020f8, rawbuf=0x7f779802de90 "delete from doublelocks where id = 2 and x = 'b'", length=48, parser_state=0x7f77b4059288) at ../src/sql/sql_parse.cc:8005
#0 lock_rec_lock (impl=false, mode=515, block=0x7f77b7000be0, heap_no=4, index=0x7f779805a448, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:1486
#1 0x000055a889ee148e in lock_sec_rec_read_check_and_lock (flags=0, block=0x7f77b7000be0, rec=0x7f77b70dc09f "\200", index=0x7f779805a448, offsets=0x7f77b4055a60, mode=LOCK_X, gap_mode=512, thr=0x7f779805da68) at ../src/storage/innobase/lock/lock0lock.cc:5537
#2 0x000055a88a044321 in sel_set_rec_lock (pcur=0x7f779805d268, rec=0x7f77b70dc09f "\200", index=0x7f779805a448, offsets=0x7f77b4055a60, mode=3, type=512, thr=0x7f779805da68, mtr=0x7f77b4055cc0) at ../src/storage/innobase/row/row0sel.cc:1369
#3 0x000055a88a03f204 in row_search_mvcc (buf=0x7f77980551e0 "\377", mode=PAGE_CUR_GE, prebuilt=0x7f779805d098, match_mode=1, direction=0) at ../src/storage/innobase/row/row0sel.cc:5070
#4 0x000055a889c5253f in ha_innobase::index_read (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key_ptr=0x7f779896bd60 "", key_len=18, find_flag=HA_READ_KEY_EXACT) at ../src/storage/innobase/handler/ha_innodb.cc:8986
#5 0x000055a88937fdca in handler::index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f779896bd60 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.h:3925
#6 0x000055a889368fe0 in handler::ha_index_read_map (this=0x7f77980555f0, buf=0x7f77980551e0 "\377", key=0x7f779896bd60 "", keypart_map=3, find_flag=HA_READ_KEY_EXACT) at ../src/sql/handler.cc:3471
#7 0x000055a88937419b in handler::read_range_first (this=0x7f77980555f0, start_key=0x7f77980556f0, end_key=0x7f7798055710, eq_range_arg=true, sorted=true) at ../src/sql/handler.cc:6539
#8 0x000055a88999c7b2 in handler::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:518
#9 0x000055a88999c949 in Mrr_simple_index_reader::get_next (this=0x7f7798055c28, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:555
#10 0x000055a88999fa3a in DsMrr_impl::dsmrr_next (this=0x7f7798055ad8, range_info=0x7f77b4056488) at ../src/sql/multi_range_read.cc:1655
#11 0x000055a889c6a094 in ha_innobase::multi_range_read_next (this=0x7f77980555f0, range_info=0x7f77b4056488) at ../src/storage/innobase/handler/ha_innodb.cc:20012
#12 0x000055a8894c7057 in QUICK_RANGE_SELECT::get_next (this=0x7f7798022ec0) at ../src/sql/opt_range.cc:12727
#13 0x000055a8894eeded in rr_quick (info=0x7f77b40570b0) at ../src/sql/records.cc:403
#14 0x000055a8894d90a6 in READ_RECORD::read_record (this=0x7f77b40570b0) at ../src/sql/records.h:81
#15 0x000055a88969d335 in mysql_delete (thd=0x7f77980020f8, table_list=0x7f779802dfa8, conds=0x7f779802ee58, order_list=0x7f7798007030, limit=18446744073709551615, options=0, result=0x0) at ../src/sql/sql_delete.cc:812
#16 0x000055a889711b63 in mysql_execute_command (thd=0x7f77980020f8, is_called_from_prepared_stmt=false) at ../src/sql/sql_parse.cc:4812
#17 0x000055a88970727f in mysql_parse (thd=0x7f77980020f8, rawbuf=0x7f779802de90 "delete from doublelocks where id = 2 and x = 'b'", length=48, parser_state=0x7f77b4059288) at ../src/sql/sql_parse.cc:8005
Reproduce
Result