Note: There seems to be many things in this test which should be redundant (like, for example, attempt to create an already existing application period in ALTER, and more), but I can't get rid of any of them.
Assertion `thd->transaction.stmt.ha_list == __null || trans == &thd->transaction.stmt' failed in ha_rollback_trans with versioned tables
--source include/have_innodb.inc
|
|
CREATE TABLE t1 (s DATE, e DATE, PERIOD FOR app(s,e)) ENGINE=InnoDB;
|
ALTER TABLE t1
|
ADD row_start BIGINT UNSIGNED AS ROW START,
|
ADD row_end BIGINT UNSIGNED AS ROW END,
|
ADD PERIOD FOR SYSTEM_TIME(row_start,row_end),
|
WITH SYSTEM VERSIONING,
|
ADD PERIOD IF NOT EXISTS FOR app(x,y);
|
|
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
START TRANSACTION;
|
INSERT INTO t1 (s,e) VALUES ('2021-07-04','2024-08-18');
|
|
--connect (con1,localhost,root,,test)
|
START TRANSACTION;
|
INSERT INTO t1 (s,e) VALUES ('2018-06-01','2021-09-15');
|
|
--connection default
|
--error ER_VERS_NO_TRX_ID
|
SELECT * FROM t1 FOR SYSTEM_TIME AS OF NOW();
|
|
--connection con1
|
SET innodb_lock_wait_timeout= 1, lock_wait_timeout= 1;
|
# Can be existing or non-existing table, does not matter
|
--error ER_LOCK_WAIT_TIMEOUT
|
ALTER TABLE xx;
|
|
# Cleanup
|
--disconnect con1
|
--connection default
|
DROP TABLE t1;
|
10.4 b615d275
|
mysqld: /data/src/10.4/sql/handler.cc:1836: int ha_rollback_trans(THD*, bool): Assertion `thd->transaction.stmt.ha_list == __null || trans == &thd->transaction.stmt' failed.
|
200204 1:57:22 [ERROR] mysqld got signal 6 ;
|
|
#7 0x00007fe5237bcf12 in __GI___assert_fail (assertion=0x55903473a140 "thd->transaction.stmt.ha_list == __null || trans == &thd->transaction.stmt", file=0x559034739ad1 "/data/src/10.4/sql/handler.cc", line=1836, function=0x55903473c9a0 <ha_rollback_trans(THD*, bool)::__PRETTY_FUNCTION__> "int ha_rollback_trans(THD*, bool)") at assert.c:101
|
#8 0x0000559033bf6f2b in ha_rollback_trans (thd=0x7fe4c4000af0, all=true) at /data/src/10.4/sql/handler.cc:1835
|
#9 0x0000559033bf689b in ha_commit_trans (thd=0x7fe4c4000af0, all=true) at /data/src/10.4/sql/handler.cc:1690
|
#10 0x0000559033a2f201 in trans_commit_implicit (thd=0x7fe4c4000af0) at /data/src/10.4/sql/transaction.cc:301
|
#11 0x0000559033894690 in mysql_execute_command (thd=0x7fe4c4000af0) at /data/src/10.4/sql/sql_parse.cc:3709
|
#12 0x00005590338a38e3 in mysql_parse (thd=0x7fe4c4000af0, rawbuf=0x7fe4c4011dd8 "ALTER TABLE xx", length=14, parser_state=0x7fe51cb1a160, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:7901
|
#13 0x000055903388eab0 in dispatch_command (command=COM_QUERY, thd=0x7fe4c4000af0, packet=0x7fe4c40083a1 "ALTER TABLE xx", packet_length=14, is_com_multi=false, is_next_command=false) at /data/src/10.4/sql/sql_parse.cc:1842
|
#14 0x000055903388d13d in do_command (thd=0x7fe4c4000af0) at /data/src/10.4/sql/sql_parse.cc:1360
|
#15 0x0000559033a16357 in do_handle_one_connection (connect=0x55903733c050) at /data/src/10.4/sql/sql_connect.cc:1412
|
#16 0x0000559033a160a6 in handle_one_connection (arg=0x55903733c050) at /data/src/10.4/sql/sql_connect.cc:1316
|
#17 0x000055903441e9c9 in pfs_spawn_thread (arg=0x559037260020) at /data/src/10.4/storage/perfschema/pfs.cc:1869
|
#18 0x00007fe5257454a4 in start_thread (arg=0x7fe51cb1b700) at pthread_create.c:456
|
#19 0x00007fe523879d0f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:97
|
Reproducible on 10.4, 10.5.
The test case is not applicable to 10.3 because of the application period (see comments in regard to 10.3).
No obvious problem on a non-debug build, but there can be hidden ones.
{"report":{"fcp":1295.6000003814697,"ttfb":400.20000076293945,"pageVisibility":"visible","entityId":82927,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"3baed23c-e4f0-4db6-a391-1145e5b26229","navigationType":0,"readyForUser":1390.7000007629395,"redirectCount":0,"resourceLoadedEnd":1552.1000003814697,"resourceLoadedStart":405.70000076293945,"resourceTiming":[{"duration":251.89999961853027,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":405.70000076293945,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":405.70000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":657.6000003814697,"responseStart":0,"secureConnectionStart":0},{"duration":251.9000005722046,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":406,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":406,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":657.9000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":262.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":406.20000076293945,"connectEnd":406.20000076293945,"connectStart":406.20000076293945,"domainLookupEnd":406.20000076293945,"domainLookupStart":406.20000076293945,"fetchStart":406.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":406.20000076293945,"responseEnd":668.7000007629395,"responseStart":668.7000007629395,"secureConnectionStart":406.20000076293945},{"duration":576.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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":406.30000019073486,"connectEnd":406.30000019073486,"connectStart":406.30000019073486,"domainLookupEnd":406.30000019073486,"domainLookupStart":406.30000019073486,"fetchStart":406.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":406.30000019073486,"responseEnd":983.2000007629395,"responseStart":983.1000003814697,"secureConnectionStart":406.30000019073486},{"duration":580.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":406.6000003814697,"connectEnd":406.6000003814697,"connectStart":406.6000003814697,"domainLookupEnd":406.6000003814697,"domainLookupStart":406.6000003814697,"fetchStart":406.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":406.6000003814697,"responseEnd":986.9000005722046,"responseStart":986.9000005722046,"secureConnectionStart":406.6000003814697},{"duration":580.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":406.80000019073486,"connectEnd":406.80000019073486,"connectStart":406.80000019073486,"domainLookupEnd":406.80000019073486,"domainLookupStart":406.80000019073486,"fetchStart":406.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":406.80000019073486,"responseEnd":987.4000005722046,"responseStart":987.4000005722046,"secureConnectionStart":406.80000019073486},{"duration":580.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":406.9000005722046,"connectEnd":406.9000005722046,"connectStart":406.9000005722046,"domainLookupEnd":406.9000005722046,"domainLookupStart":406.9000005722046,"fetchStart":406.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":406.9000005722046,"responseEnd":987.7000007629395,"responseStart":987.7000007629395,"secureConnectionStart":406.9000005722046},{"duration":581.6999998092651,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":407.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":407.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":988.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":580.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":407.20000076293945,"connectEnd":407.20000076293945,"connectStart":407.20000076293945,"domainLookupEnd":407.20000076293945,"domainLookupStart":407.20000076293945,"fetchStart":407.20000076293945,"redirectEnd":0,"redirectStart":0,"requestStart":407.20000076293945,"responseEnd":988.1000003814697,"responseStart":988.1000003814697,"secureConnectionStart":407.20000076293945},{"duration":581.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":407.4000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":407.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":988.9000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":581.2000007629395,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":407.5,"connectEnd":407.5,"connectStart":407.5,"domainLookupEnd":407.5,"domainLookupStart":407.5,"fetchStart":407.5,"redirectEnd":0,"redirectStart":0,"requestStart":407.5,"responseEnd":988.7000007629395,"responseStart":988.7000007629395,"secureConnectionStart":407.5},{"duration":1045,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":408.5,"connectEnd":408.5,"connectStart":408.5,"domainLookupEnd":408.5,"domainLookupStart":408.5,"fetchStart":408.5,"redirectEnd":0,"redirectStart":0,"requestStart":408.5,"responseEnd":1453.5,"responseStart":1453.5,"secureConnectionStart":408.5},{"duration":1122.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":413.30000019073486,"connectEnd":413.30000019073486,"connectStart":413.30000019073486,"domainLookupEnd":413.30000019073486,"domainLookupStart":413.30000019073486,"fetchStart":413.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":413.30000019073486,"responseEnd":1535.8000001907349,"responseStart":1535.8000001907349,"secureConnectionStart":413.30000019073486},{"duration":448.6000003814697,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":817.1000003814697,"connectEnd":817.1000003814697,"connectStart":817.1000003814697,"domainLookupEnd":817.1000003814697,"domainLookupStart":817.1000003814697,"fetchStart":817.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":817.1000003814697,"responseEnd":1265.7000007629395,"responseStart":1265.7000007629395,"secureConnectionStart":817.1000003814697},{"duration":271.80000019073486,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1289,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1289,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1560.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":241.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":1310.6000003814697,"connectEnd":1310.6000003814697,"connectStart":1310.6000003814697,"domainLookupEnd":1310.6000003814697,"domainLookupStart":1310.6000003814697,"fetchStart":1310.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1310.6000003814697,"responseEnd":1552.1000003814697,"responseStart":1552.1000003814697,"secureConnectionStart":1310.6000003814697}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":207,"responseStart":400,"responseEnd":407,"domLoading":404,"domInteractive":1563,"domContentLoadedEventStart":1563,"domContentLoadedEventEnd":1612,"domComplete":2003,"loadEventStart":2003,"loadEventEnd":2003,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1537.5},{"name":"bigPipe.sidebar-id.end","time":1538.3000001907349},{"name":"bigPipe.activity-panel-pipe-id.start","time":1538.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1541.2000007629395},{"name":"activityTabFullyLoaded","time":1627.3000001907349}],"measures":[],"correlationId":"e076af603fd830","effectiveType":"4g","downlink":9.3,"rtt":0,"serverDuration":119,"dbReadsTimeInMs":16,"dbConnsTimeInMs":24,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
In 10.5 the assertion was changed to this:
thd->transaction->stmt.ha_list == __null || trans == &thd->transaction->stmt
(transaction->stmt instead of transaction.stmt)