Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
10.4.18 , 10.3(EOL) , 10.4(EOL) , 10.5 , 10.6 , 10.7(EOL) , 10.8(EOL) , 10.9(EOL)
Starting MariaDB server version 10.4.18 some SQL updates on the transaction precise versioned table fail.
100% reproducible with v10.4.18 and 10.4.19, see example below and detailed log in attachment v18_mariadb.log.
Attached also the same SQL commands executed against version 10.4.17 where everything works fine - v17_mariadb.log, as well as server errorlog - did not spot anything special in there.
Example:
create or replace table xxx (nid int , nstate int , ntype int , primary key (nid) );
alter table xxx add tx_start BIGINT UNSIGNED GENERATED ALWAYS AS ROW START INVISIBLE, add tx_end BIGINT UNSIGNED GENERATED ALWAYS AS ROW END INVISIBLE, add PERIOD FOR SYSTEM_TIME(tx_start, tx_end), add SYSTEM VERSIONING;
insert into xxx values (1,1,1);
Query OK, 1 row affected (0.003 sec)
select nid, nstate, tx_start, tx_end from xxx for system_time all where nid=1;
+ -----+--------+----------+----------------------+
| nid | nstate | tx_start | tx_end |
+ -----+--------+----------+----------------------+
| 1 | 1 | 189558 | 18446744073709551615 |
+ -----+--------+----------+----------------------+
1 row in set (0.000 sec)
start transaction ;
Query OK, 0 rows affected (0.000 sec)
update xxx set nstate=nstate where nid=1;
Query OK, 0 rows affected (0.001 sec)
Rows matched: 1 Changed: 0 Warnings: 0
select nid, nstate, tx_start, tx_end from xxx for system_time all where nid=1;
+ -----+--------+----------+----------------------+
| nid | nstate | tx_start | tx_end |
+ -----+--------+----------+----------------------+
| 1 | 1 | 189558 | 189561 |
| 1 | 1 | 189558 | 18446744073709551615 |
+ -----+--------+----------+----------------------+
2 rows in set (0.001 sec)
update xxx set nstate=3 where nid=1;
ERROR 1761 (23000): Foreign key constraint for table 'xxx' , record '1-18446744073709551615' would lead to a duplicate entry in table 'xxx' , key 'PRIMARY'
{"report":{"fcp":849.3000000119209,"ttfb":216.19999998807907,"pageVisibility":"visible","entityId":99529,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"8d2f9684-8787-4b87-9b60-390716597c2a","navigationType":0,"readyForUser":944.6999999880791,"redirectCount":0,"resourceLoadedEnd":981.4000000059605,"resourceLoadedStart":221.19999998807907,"resourceTiming":[{"duration":123.10000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":221.19999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":221.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":344.30000001192093,"responseStart":0,"secureConnectionStart":0},{"duration":123.19999998807907,"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":221.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":221.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":344.69999998807907,"responseStart":0,"secureConnectionStart":0},{"duration":132,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":221.69999998807907,"connectEnd":221.69999998807907,"connectStart":221.69999998807907,"domainLookupEnd":221.69999998807907,"domainLookupStart":221.69999998807907,"fetchStart":221.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":221.69999998807907,"responseEnd":353.69999998807907,"responseStart":353.69999998807907,"secureConnectionStart":221.69999998807907},{"duration":231.69999998807907,"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":221.90000000596046,"connectEnd":221.90000000596046,"connectStart":221.90000000596046,"domainLookupEnd":221.90000000596046,"domainLookupStart":221.90000000596046,"fetchStart":221.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":221.90000000596046,"responseEnd":453.59999999403954,"responseStart":453.59999999403954,"secureConnectionStart":221.90000000596046},{"duration":235.19999998807907,"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":222,"connectEnd":222,"connectStart":222,"domainLookupEnd":222,"domainLookupStart":222,"fetchStart":222,"redirectEnd":0,"redirectStart":0,"requestStart":222,"responseEnd":457.19999998807907,"responseStart":457.19999998807907,"secureConnectionStart":222},{"duration":235.5,"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":222.19999998807907,"connectEnd":222.19999998807907,"connectStart":222.19999998807907,"domainLookupEnd":222.19999998807907,"domainLookupStart":222.19999998807907,"fetchStart":222.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":222.19999998807907,"responseEnd":457.69999998807907,"responseStart":457.69999998807907,"secureConnectionStart":222.19999998807907},{"duration":235.69999998807907,"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":222.30000001192093,"connectEnd":222.30000001192093,"connectStart":222.30000001192093,"domainLookupEnd":222.30000001192093,"domainLookupStart":222.30000001192093,"fetchStart":222.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":222.30000001192093,"responseEnd":458,"responseStart":458,"secureConnectionStart":222.30000001192093},{"duration":271.7000000178814,"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":222.59999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":494.30000001192093,"responseStart":0,"secureConnectionStart":0},{"duration":235.80000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":222.69999998807907,"connectEnd":222.69999998807907,"connectStart":222.69999998807907,"domainLookupEnd":222.69999998807907,"domainLookupStart":222.69999998807907,"fetchStart":222.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":222.69999998807907,"responseEnd":458.5,"responseStart":458.5,"secureConnectionStart":222.69999998807907},{"duration":271.59999999403954,"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":222.90000000596046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":222.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":494.5,"responseStart":0,"secureConnectionStart":0},{"duration":235.80000001192093,"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":223.09999999403954,"connectEnd":223.09999999403954,"connectStart":223.09999999403954,"domainLookupEnd":223.09999999403954,"domainLookupStart":223.09999999403954,"fetchStart":223.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":223.09999999403954,"responseEnd":458.90000000596046,"responseStart":458.90000000596046,"secureConnectionStart":223.09999999403954},{"duration":333.19999998807907,"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":231.30000001192093,"connectEnd":231.30000001192093,"connectStart":231.30000001192093,"domainLookupEnd":231.30000001192093,"domainLookupStart":231.30000001192093,"fetchStart":231.30000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":231.30000001192093,"responseEnd":564.5,"responseStart":564.4000000059605,"secureConnectionStart":231.30000001192093},{"duration":368,"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":233.59999999403954,"connectEnd":233.59999999403954,"connectStart":233.59999999403954,"domainLookupEnd":233.59999999403954,"domainLookupStart":233.59999999403954,"fetchStart":233.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":233.59999999403954,"responseEnd":601.5999999940395,"responseStart":601.5999999940395,"secureConnectionStart":233.59999999403954},{"duration":59.099999994039536,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":505.80000001192093,"connectEnd":505.80000001192093,"connectStart":505.80000001192093,"domainLookupEnd":505.80000001192093,"domainLookupStart":505.80000001192093,"fetchStart":505.80000001192093,"redirectEnd":0,"redirectStart":0,"requestStart":505.80000001192093,"responseEnd":564.9000000059605,"responseStart":564.9000000059605,"secureConnectionStart":505.80000001192093},{"duration":211.19999998807907,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/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":770,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":770,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":981.1999999880791,"responseStart":0,"secureConnectionStart":0},{"duration":210.90000000596046,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2bv2/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":770.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":770.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":981.4000000059605,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":26,"responseStart":216,"responseEnd":233,"domLoading":219,"domInteractive":1011,"domContentLoadedEventStart":1011,"domContentLoadedEventEnd":1062,"domComplete":1705,"loadEventStart":1705,"loadEventEnd":1707,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":989},{"name":"bigPipe.sidebar-id.end","time":989.6999999880791},{"name":"bigPipe.activity-panel-pipe-id.start","time":989.8000000119209},{"name":"bigPipe.activity-panel-pipe-id.end","time":992.3000000119209},{"name":"activityTabFullyLoaded","time":1071.199999988079}],"measures":[],"correlationId":"fb009df24dd8d","effectiveType":"4g","downlink":9.7,"rtt":0,"serverDuration":115,"dbReadsTimeInMs":18,"dbConnsTimeInMs":27,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}