Apparently belongs to the MDEV-14693 family.
The test is non-deterministic, run with --repeat=N. N=10 is usually enough for me, but it can vary on different machines.
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
INSERT INTO t1 VALUES (1),(2);
|
|
--connect (con1,localhost,root,,test)
|
XA START 'xid';
|
UPDATE t1 SET a = 5;
|
|
--connection default
|
SET innodb_lock_wait_timeout= 2, lock_wait_timeout= 2;
|
--error ER_NO_SUCH_TABLE
|
ALTER TABLE non_existing_table1;
|
--send
|
ALTER TABLE t1 FORCE;
|
|
--connection con1
|
--error ER_XAER_RMFAIL
|
ALTER TABLE non_existing_table2;
|
DELETE FROM t1 LIMIT 1;
|
|
--connection default
|
--error ER_LOCK_WAIT_TIMEOUT
|
--reap
|
|
# Cleanup
|
--connection con1
|
XA END 'xid';
|
XA ROLLBACK 'xid';
|
DROP TABLE t1;
|
--disconnect con1
|
10.2 a050189773c9
|
mysqld: /data/src/10.2/storage/innobase/row/row0log.cc:1884: dberr_t row_log_table_apply_delete(que_thr_t*, ulint, const mrec_t*, const ulint*, mem_heap_t*, mem_heap_t*, const row_log_t*, const row_ext_t*, ulint): Assertion `!log->same_pk' failed.
|
|
#7 0x00007fdcdc075ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
|
#8 0x000055fe179772fd in row_log_table_apply_delete (thr=0x7fdc7c0362c0, trx_id_col=1, mrec=0x7fdcd404f007 "", moffsets=0x7fdc7c068600, offsets_heap=0x7fdc7c05e0c0, heap=0x7fdc7c05a030, log=0x7fdc7c039f10, save_ext=0x0, ext_size=0) at /data/src/10.2/storage/innobase/row/row0log.cc:1884
|
#9 0x000055fe17978a00 in row_log_table_apply_op (thr=0x7fdc7c0362c0, trx_id_col=1, new_trx_id_col=1, dup=0x7fdcd44de2e0, error=0x7fdcd44de084, offsets_heap=0x7fdc7c05e0c0, heap=0x7fdc7c05a030, mrec=0x7fdcd404f007 "", mrec_end=0x7fdcd404f01a "", offsets=0x7fdc7c068600) at /data/src/10.2/storage/innobase/row/row0log.cc:2398
|
#10 0x000055fe1797a4bf in row_log_table_apply_ops (thr=0x7fdc7c0362c0, dup=0x7fdcd44de2e0, stage=0x7fdc7c113ce0) at /data/src/10.2/storage/innobase/row/row0log.cc:2909
|
#11 0x000055fe1797a9ca in row_log_table_apply (thr=0x7fdc7c0362c0, old_table=0x7fdc7c067ff8, table=0x7fdc7c11a880, stage=0x7fdc7c113ce0) at /data/src/10.2/storage/innobase/row/row0log.cc:3008
|
#12 0x000055fe178618ae in ha_innobase::inplace_alter_table (this=0x7fdc7c130d08, altered_table=0x7fdc7c11a880, ha_alter_info=0x7fdcd44de610) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:6488
|
#13 0x000055fe173778f7 in handler::ha_inplace_alter_table (this=0x7fdc7c130d08, altered_table=0x7fdc7c11a880, ha_alter_info=0x7fdcd44de610) at /data/src/10.2/sql/handler.h:3775
|
#14 0x000055fe1736e7b1 in mysql_inplace_alter_table (thd=0x7fdc7c000b00, table_list=0x7fdc7c0125d0, table=0x7fdc7c130100, altered_table=0x7fdc7c11a880, ha_alter_info=0x7fdcd44de610, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, target_mdl_request=0x7fdcd44de680, alter_ctx=0x7fdcd44df240) at /data/src/10.2/sql/sql_table.cc:7332
|
#15 0x000055fe17373de4 in mysql_alter_table (thd=0x7fdc7c000b00, new_db=0x7fdc7c012be0 "test", new_name=0x0, create_info=0x7fdcd44dfe50, table_list=0x7fdc7c0125d0, alter_info=0x7fdcd44dfda0, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9353
|
#16 0x000055fe173ed954 in Sql_cmd_alter_table::execute (this=0x7fdc7c012be8, thd=0x7fdc7c000b00) at /data/src/10.2/sql/sql_alter.cc:324
|
#17 0x000055fe172a8c57 in mysql_execute_command (thd=0x7fdc7c000b00) at /data/src/10.2/sql/sql_parse.cc:6208
|
#18 0x000055fe172ad5d1 in mysql_parse (thd=0x7fdc7c000b00, rawbuf=0x7fdc7c0124f8 "ALTER TABLE t1 FORCE", length=20, parser_state=0x7fdcd44e1200, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:7902
|
#19 0x000055fe1729b4f1 in dispatch_command (command=COM_QUERY, thd=0x7fdc7c000b00, packet=0x7fdc7c008951 "ALTER TABLE t1 FORCE", packet_length=20, is_com_multi=false, is_next_command=false) at /data/src/10.2/sql/sql_parse.cc:1806
|
#20 0x000055fe17299e54 in do_command (thd=0x7fdc7c000b00) at /data/src/10.2/sql/sql_parse.cc:1360
|
#21 0x000055fe173e8646 in do_handle_one_connection (connect=0x55fe19bc8250) at /data/src/10.2/sql/sql_connect.cc:1335
|
#22 0x000055fe173e83d3 in handle_one_connection (arg=0x55fe19bc8250) at /data/src/10.2/sql/sql_connect.cc:1241
|
#23 0x000055fe178081f8 in pfs_spawn_thread (arg=0x55fe19bd27c0) at /data/src/10.2/storage/perfschema/pfs.cc:1862
|
#24 0x00007fdcddd4c494 in start_thread (arg=0x7fdcd44e2700) at pthread_create.c:333
|
#25 0x00007fdcdc13293f in clone () from /lib/x86_64-linux-gnu/libc.so.6
|
Also reproducible on 10.0, 10.1. Could not reproduce on 5.5, 10.3, MySQL 5.6.
{"report":{"fcp":910.6000000238419,"ttfb":207.69999992847443,"pageVisibility":"visible","entityId":66252,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"2f3cfe37-e3e4-4bbe-921e-2db9110f7bc5","navigationType":0,"readyForUser":1005.7999999523163,"redirectCount":0,"resourceLoadedEnd":1368.5,"resourceLoadedStart":221.89999997615814,"resourceTiming":[{"duration":159.39999997615814,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":221.89999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":221.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":381.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":159.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":222.10000002384186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.10000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":381.60000002384186,"responseStart":0,"secureConnectionStart":0},{"duration":172.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":222.29999995231628,"connectEnd":222.29999995231628,"connectStart":222.29999995231628,"domainLookupEnd":222.29999995231628,"domainLookupStart":222.29999995231628,"fetchStart":222.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":222.29999995231628,"responseEnd":394.89999997615814,"responseStart":394.89999997615814,"secureConnectionStart":222.29999995231628},{"duration":270.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":222.5,"connectEnd":222.5,"connectStart":222.5,"domainLookupEnd":222.5,"domainLookupStart":222.5,"fetchStart":222.5,"redirectEnd":0,"redirectStart":0,"requestStart":222.5,"responseEnd":493.39999997615814,"responseStart":493.39999997615814,"secureConnectionStart":222.5},{"duration":274.6999999284744,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":222.60000002384186,"connectEnd":222.60000002384186,"connectStart":222.60000002384186,"domainLookupEnd":222.60000002384186,"domainLookupStart":222.60000002384186,"fetchStart":222.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":222.60000002384186,"responseEnd":497.2999999523163,"responseStart":497.2999999523163,"secureConnectionStart":222.60000002384186},{"duration":274.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":222.89999997615814,"connectEnd":222.89999997615814,"connectStart":222.89999997615814,"domainLookupEnd":222.89999997615814,"domainLookupStart":222.89999997615814,"fetchStart":222.89999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":222.89999997615814,"responseEnd":497.7999999523163,"responseStart":497.7999999523163,"secureConnectionStart":222.89999997615814},{"duration":275.39999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":223,"connectEnd":223,"connectStart":223,"domainLookupEnd":223,"domainLookupStart":223,"fetchStart":223,"redirectEnd":0,"redirectStart":0,"requestStart":223,"responseEnd":498.39999997615814,"responseStart":498.39999997615814,"secureConnectionStart":223},{"duration":314.7000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":223.19999992847443,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":223.19999992847443,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":537.8999999761581,"responseStart":0,"secureConnectionStart":0},{"duration":275.60000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":223.29999995231628,"connectEnd":223.29999995231628,"connectStart":223.29999995231628,"domainLookupEnd":223.29999995231628,"domainLookupStart":223.29999995231628,"fetchStart":223.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":223.29999995231628,"responseEnd":498.89999997615814,"responseStart":498.89999997615814,"secureConnectionStart":223.29999995231628},{"duration":314.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":223.39999997615814,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":223.39999997615814,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":538,"responseStart":0,"secureConnectionStart":0},{"duration":275.89999997615814,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":223.60000002384186,"connectEnd":223.60000002384186,"connectStart":223.60000002384186,"domainLookupEnd":223.60000002384186,"domainLookupStart":223.60000002384186,"fetchStart":223.60000002384186,"redirectEnd":0,"redirectStart":0,"requestStart":223.60000002384186,"responseEnd":499.5,"responseStart":499.5,"secureConnectionStart":223.60000002384186},{"duration":379.10000002384186,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":229.29999995231628,"connectEnd":229.29999995231628,"connectStart":229.29999995231628,"domainLookupEnd":229.29999995231628,"domainLookupStart":229.29999995231628,"fetchStart":229.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":229.29999995231628,"responseEnd":608.3999999761581,"responseStart":608.3999999761581,"secureConnectionStart":229.29999995231628},{"duration":1099.8999999761581,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":240.79999995231628,"connectEnd":240.79999995231628,"connectStart":240.79999995231628,"domainLookupEnd":240.79999995231628,"domainLookupStart":240.79999995231628,"fetchStart":240.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":240.79999995231628,"responseEnd":1340.6999999284744,"responseStart":1340.6999999284744,"secureConnectionStart":240.79999995231628},{"duration":58.5,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":550.1999999284744,"connectEnd":550.1999999284744,"connectStart":550.1999999284744,"domainLookupEnd":550.1999999284744,"domainLookupStart":550.1999999284744,"fetchStart":550.1999999284744,"redirectEnd":0,"redirectStart":0,"requestStart":550.1999999284744,"responseEnd":608.6999999284744,"responseStart":608.6999999284744,"secureConnectionStart":550.1999999284744},{"duration":543.2000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bu7/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":825.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":825.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1368.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":9,"responseStart":208,"responseEnd":240,"domLoading":220,"domInteractive":1372,"domContentLoadedEventStart":1372,"domContentLoadedEventEnd":1421,"domComplete":1971,"loadEventStart":1971,"loadEventEnd":1972,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1342.3999999761581},{"name":"bigPipe.sidebar-id.end","time":1343.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.start","time":1343.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1346.3999999761581},{"name":"activityTabFullyLoaded","time":1434.8999999761581}],"measures":[],"correlationId":"198c62341efa43","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":120,"dbReadsTimeInMs":17,"dbConnsTimeInMs":26,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
There is also a curious variation of a failure on the non-debug build. I consider it a "garbage in, garbage out" situation and won't report separately, but will add it here for the record.
Very non-deterministic test case, run with high value of --repeat (hundreds, thousands):
--source include/have_innodb.inc
--connect (con1,localhost,root,,test)
--send
--connection default
--error ER_XAER_RMFAIL
--connection con1
--error 0,ER_DUP_ENTRY
--reap
# Cleanup
10.2 5f1ec5cb non-debug
#3 <signal handler called>
#4 Field::is_null (row_offset=0, this=0x6) at /data/src/10.2/sql/field.h:1134
#5 field_unpack (to=to@entry=0x7fa102f999a0, field=0x6, rec=0x7fa0b4059bf0 "\375\001", max_length=3, prefix_key=false) at /data/src/10.2/sql/key.cc:363
#6 0x0000558d590645e5 in key_unpack (to=to@entry=0x7fa102f999a0, table=table@entry=0x7fa0b40da7b8, key=key@entry=0x7fa0b4010498) at /data/src/10.2/sql/key.cc:442
#7 0x0000558d58fa95e5 in print_keydup_error (table=table@entry=0x7fa0b40da7b8, key=0x7fa0b4010498, msg=0x558d5964d620 "Duplicate entry '%-.64T' for key '%-.192s'", errflag=errflag@entry=0) at /data/src/10.2/sql/handler.cc:3473
#8 0x0000558d58fa9725 in print_keydup_error (table=table@entry=0x7fa0b40da7b8, key=<optimized out>, errflag=errflag@entry=0) at /data/src/10.2/sql/handler.cc:3495
#9 0x0000558d5913fb49 in alter_rebuild_apply_log (altered_table=0x7fa0b40da7b8, ha_alter_info=0x7fa102f9b400, ctx=0x7fa0b4010680, this=<optimized out>) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:8142
#10 ha_innobase::commit_inplace_alter_table (this=0x7fa0b8049f50, altered_table=0x7fa0b40da7b8, ha_alter_info=0x7fa102f9b400, commit=<optimized out>) at /data/src/10.2/storage/innobase/handler/handler0alter.cc:8316
#11 0x0000558d58d3b6e6 in mysql_inplace_alter_table (thd=thd@entry=0x7fa0b40009a8, table_list=0x7fa0b400f2f0, table=table@entry=0x7fa0b8051be8, altered_table=altered_table@entry=0x7fa0b40da7b8, ha_alter_info=ha_alter_info@entry=0x7fa102f9b400, inplace_supported=HA_ALTER_INPLACE_NO_LOCK_AFTER_PREPARE, alter_ctx=0x7fa102f9bc60, target_mdl_request=0x7fa102f9b490) at /data/src/10.2/sql/sql_table.cc:7480
#12 0x0000558d58e92231 in mysql_alter_table (thd=thd@entry=0x7fa0b40009a8, new_db=<optimized out>, new_name=<optimized out>, create_info=create_info@entry=0x7fa102f9c860, table_list=<optimized out>, table_list@entry=0x7fa0b400f2f0, alter_info=alter_info@entry=0x7fa102f9c7b0, order_num=0, order=0x0, ignore=false) at /data/src/10.2/sql/sql_table.cc:9622
#13 0x0000558d58ede2d4 in Sql_cmd_alter_table::execute (this=<optimized out>, thd=0x7fa0b40009a8) at /data/src/10.2/sql/sql_alter.cc:333
#14 0x0000558d58e0444a in mysql_execute_command (thd=thd@entry=0x7fa0b40009a8) at /data/src/10.2/sql/sql_parse.cc:5964
#15 0x0000558d58e0b70e in mysql_parse (thd=thd@entry=0x7fa0b40009a8, rawbuf=<optimized out>, length=35, parser_state=parser_state@entry=0x7fa102f9e620, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:7733
#16 0x0000558d58e0dfa0 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fa0b40009a8, packet=packet@entry=0x7fa0b4006d09 "ALTER TABLE t1 ADD COLUMN extra INT", packet_length=packet_length@entry=35, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.2/sql/sql_parse.cc:1824
#17 0x0000558d58e0ed60 in do_command (thd=0x7fa0b40009a8) at /data/src/10.2/sql/sql_parse.cc:1377
#18 0x0000558d58edb682 in do_handle_one_connection (connect=connect@entry=0x558d5b7bdec8) at /data/src/10.2/sql/sql_connect.cc:1336
#19 0x0000558d58edb7dd in handle_one_connection (arg=arg@entry=0x558d5b7bdec8) at /data/src/10.2/sql/sql_connect.cc:1241
#20 0x0000558d5949cf01 in pfs_spawn_thread (arg=0x558d5b755888) at /data/src/10.2/storage/perfschema/pfs.cc:1869
#21 0x00007fa10dbd34a4 in start_thread (arg=0x7fa102f9f700) at pthread_create.c:456
#22 0x00007fa10cc51d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97