Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
10.6.4 , 10.3(EOL) , 10.4(EOL) , 10.5 , 10.6
After upgrading to MariaDB 10.6.4, we noticed an issue with system versioned tables where it inserts a new row for update commands that don't change anything. Previous versions such as 10.5.5 would ignore such dummy updates and not change the SVT history. Small test case to illustrate:
CREATE TABLE t(
x INT,
start_timestamp TIMESTAMP(6) GENERATED ALWAYS AS ROW START,
end_timestamp TIMESTAMP(6) GENERATED ALWAYS AS ROW END,
PERIOD FOR SYSTEM_TIME(start_timestamp, end_timestamp)
) WITH SYSTEM VERSIONING;
"INSERT INTO t( x ) VALUES (1);"
"UPDATE t SET x = 1 WHERE x = 1;" # no change, dummy update
With MariaDB 10.5.5, the above prints:
Rows matched: 1 Changed: 0 Inserted: 0 Warnings: 0
With MariaDB 10.6.4:
Rows matched: 1 Changed: 0 Inserted: 1 Warnings: 0
"SELECT * FROM t for SYSTEM_TIME between (NOW() - INTERVAL 1 YEAR) AND NOW();"
The above will print 2 records (with same start_time but different end_time) for MariaDB 10.6.4 and only 1 record for MariaDB 10.5.5
Looks like the 10.6 version stores dummy updates which don't make any real change to the data. While that's okay, shouldn't the start time stamp also be updated for the new row? The current behavior is problematic because queries such as "SELECT * FROM t FOR SYSTEM_TIME AS OF ..." will print 2 records for certain timestamps which doesn't make sense.
{"report":{"fcp":791.5,"ttfb":132.60000014305115,"pageVisibility":"visible","entityId":103686,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"c4ad1826-8669-4b31-82c6-8fdb082c9214","navigationType":0,"readyForUser":843.6000001430511,"redirectCount":0,"resourceLoadedEnd":1039.6000001430511,"resourceLoadedStart":155.90000009536743,"resourceTiming":[{"duration":55.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":155.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":155.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":211.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":191,"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":156.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":156.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":347.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":200.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":156.20000004768372,"connectEnd":156.20000004768372,"connectStart":156.20000004768372,"domainLookupEnd":156.20000004768372,"domainLookupStart":156.20000004768372,"fetchStart":156.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":156.20000004768372,"responseEnd":356.40000009536743,"responseStart":356.40000009536743,"secureConnectionStart":156.20000004768372},{"duration":248.20000004768372,"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":156.40000009536743,"connectEnd":156.40000009536743,"connectStart":156.40000009536743,"domainLookupEnd":156.40000009536743,"domainLookupStart":156.40000009536743,"fetchStart":156.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":156.40000009536743,"responseEnd":404.60000014305115,"responseStart":404.60000014305115,"secureConnectionStart":156.40000009536743},{"duration":252,"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":156.5,"connectEnd":156.5,"connectStart":156.5,"domainLookupEnd":156.5,"domainLookupStart":156.5,"fetchStart":156.5,"redirectEnd":0,"redirectStart":0,"requestStart":156.5,"responseEnd":408.5,"responseStart":408.5,"secureConnectionStart":156.5},{"duration":252.39999985694885,"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":156.60000014305115,"connectEnd":156.60000014305115,"connectStart":156.60000014305115,"domainLookupEnd":156.60000014305115,"domainLookupStart":156.60000014305115,"fetchStart":156.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":156.60000014305115,"responseEnd":409,"responseStart":409,"secureConnectionStart":156.60000014305115},{"duration":252.79999995231628,"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":156.70000004768372,"connectEnd":156.70000004768372,"connectStart":156.70000004768372,"domainLookupEnd":156.70000004768372,"domainLookupStart":156.70000004768372,"fetchStart":156.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":156.70000004768372,"responseEnd":409.5,"responseStart":409.5,"secureConnectionStart":156.70000004768372},{"duration":253.30000019073486,"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":156.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":156.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":410.10000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":253.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":156.79999995231628,"connectEnd":156.79999995231628,"connectStart":156.79999995231628,"domainLookupEnd":156.79999995231628,"domainLookupStart":156.79999995231628,"fetchStart":156.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":156.79999995231628,"responseEnd":410.10000014305115,"responseStart":410.10000014305115,"secureConnectionStart":156.79999995231628},{"duration":253.40000009536743,"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":157,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":157,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":410.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":253.5,"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":157.20000004768372,"connectEnd":157.20000004768372,"connectStart":157.20000004768372,"domainLookupEnd":157.20000004768372,"domainLookupStart":157.20000004768372,"fetchStart":157.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":157.20000004768372,"responseEnd":410.7000000476837,"responseStart":410.60000014305115,"secureConnectionStart":157.20000004768372},{"duration":474.10000014305115,"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":158,"connectEnd":158,"connectStart":158,"domainLookupEnd":158,"domainLookupStart":158,"fetchStart":158,"redirectEnd":0,"redirectStart":0,"requestStart":158,"responseEnd":632.1000001430511,"responseStart":632.1000001430511,"secureConnectionStart":158},{"duration":881.5,"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":158.10000014305115,"connectEnd":158.10000014305115,"connectStart":158.10000014305115,"domainLookupEnd":158.10000014305115,"domainLookupStart":158.10000014305115,"fetchStart":158.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":158.10000014305115,"responseEnd":1039.6000001430511,"responseStart":1039.6000001430511,"secureConnectionStart":158.10000014305115},{"duration":405.7999999523163,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":597.4000000953674,"connectEnd":597.4000000953674,"connectStart":597.4000000953674,"domainLookupEnd":597.4000000953674,"domainLookupStart":597.4000000953674,"fetchStart":597.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":597.4000000953674,"responseEnd":1003.2000000476837,"responseStart":1003.2000000476837,"secureConnectionStart":597.4000000953674},{"duration":269.7000000476837,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":771,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":771,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1040.7000000476837,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":10,"responseStart":133,"responseEnd":134,"domLoading":154,"domInteractive":1057,"domContentLoadedEventStart":1057,"domContentLoadedEventEnd":1091,"domComplete":1808,"loadEventStart":1808,"loadEventEnd":1809,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1044.5},{"name":"bigPipe.sidebar-id.end","time":1045.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1045.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1047.7999999523163},{"name":"activityTabFullyLoaded","time":1098.6000001430511}],"measures":[],"correlationId":"c78c0e8f1af322","effectiveType":"4g","downlink":9,"rtt":0,"serverDuration":75,"dbReadsTimeInMs":12,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}