Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
None
Reproduce
--source include/have_partition.inc
--source include/have_innodb.inc
set timestamp = unix_timestamp( '2000-01-01 00:00:00' );
create or replace table t1 (x int primary key ) with system versioning engine innodb
partition by system_time interval 1 hour auto;
insert into t1 values (1);
start transaction ;
insert into t1 values (2);
--connect con1, localhost, root
set lock_wait_timeout= 1;
set innodb_lock_wait_timeout= 1;
set timestamp = unix_timestamp( '2000-01-01 01:00:01' );
--error 0, ER_LOCK_WAIT_TIMEOUT
update t1 set x= x + 122 where x = 1;
--disconnect con1
--connection default
select * from t1;
# cleanup
drop table t1;
Result
Expected
select * from t1;
x
2
123
Notes
The reasons for this are:
Do not disrupt main business process (the history is auxiliary
service);
Consequences are non-fatal (history is not lost, but comes into wrong
partition; fixed by partitioning rebuild);
There is more freedom for application to fail in this case or
not: it may read warning info and find corresponding error number.
While non-failing command is easy to handle by an application and
fail it, the opposite is hard to handle: there is no automatic
actions to fix failed command and retry, DBA intervention is
required and until then application is non-functioning.
Side notes
Research have been made against standard replication for both variants unversioned -> versioned and versioned -> unversioned. It appears that both are not affected by the problem above.
unversioned -> versioned generally is not affected because slave has one execution thread. Though Galera is affected because of multiple execution threads. Standard replication may be affected only in custom cases.
versioned -> unversioned is not affected because master error means slave does not execute this command.
relates to
MDEV-17554
Auto-create history partitions for system-versioned tables
Closed
{"report":{"fcp":913.6000001430511,"ttfb":155.40000009536743,"pageVisibility":"visible","entityId":85662,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"6b77eba8-5196-4ca8-bd0c-ee0e4c17866f","navigationType":0,"readyForUser":974.9000000953674,"redirectCount":0,"resourceLoadedEnd":1326.7000000476837,"resourceLoadedStart":161.5,"resourceTiming":[{"duration":321.80000019073486,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":161.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":161.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":483.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":321.60000014305115,"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":161.70000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":161.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":483.30000019073486,"responseStart":0,"secureConnectionStart":0},{"duration":330.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":161.80000019073486,"connectEnd":161.80000019073486,"connectStart":161.80000019073486,"domainLookupEnd":161.80000019073486,"domainLookupStart":161.80000019073486,"fetchStart":161.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":161.80000019073486,"responseEnd":492.30000019073486,"responseStart":492.30000019073486,"secureConnectionStart":161.80000019073486},{"duration":355.09999990463257,"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":161.90000009536743,"connectEnd":161.90000009536743,"connectStart":161.90000009536743,"domainLookupEnd":161.90000009536743,"domainLookupStart":161.90000009536743,"fetchStart":161.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":161.90000009536743,"responseEnd":517,"responseStart":517,"secureConnectionStart":161.90000009536743},{"duration":358.7000000476837,"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":162,"connectEnd":162,"connectStart":162,"domainLookupEnd":162,"domainLookupStart":162,"fetchStart":162,"redirectEnd":0,"redirectStart":0,"requestStart":162,"responseEnd":520.7000000476837,"responseStart":520.7000000476837,"secureConnectionStart":162},{"duration":359.10000014305115,"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":162,"connectEnd":162,"connectStart":162,"domainLookupEnd":162,"domainLookupStart":162,"fetchStart":162,"redirectEnd":0,"redirectStart":0,"requestStart":162,"responseEnd":521.1000001430511,"responseStart":521.1000001430511,"secureConnectionStart":162},{"duration":359.59999990463257,"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":162.10000014305115,"connectEnd":162.10000014305115,"connectStart":162.10000014305115,"domainLookupEnd":162.10000014305115,"domainLookupStart":162.10000014305115,"fetchStart":162.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":162.10000014305115,"responseEnd":521.7000000476837,"responseStart":521.7000000476837,"secureConnectionStart":162.10000014305115},{"duration":360.2999999523163,"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":162.20000004768372,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":162.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":522.5,"responseStart":0,"secureConnectionStart":0},{"duration":360.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":162.30000019073486,"connectEnd":162.30000019073486,"connectStart":162.30000019073486,"domainLookupEnd":162.30000019073486,"domainLookupStart":162.30000019073486,"fetchStart":162.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":162.30000019073486,"responseEnd":522.4000000953674,"responseStart":522.4000000953674,"secureConnectionStart":162.30000019073486},{"duration":360.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":162.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":162.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":522.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":360.39999985694885,"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":162.60000014305115,"connectEnd":162.60000014305115,"connectStart":162.60000014305115,"domainLookupEnd":162.60000014305115,"domainLookupStart":162.60000014305115,"fetchStart":162.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":162.60000014305115,"responseEnd":523,"responseStart":523,"secureConnectionStart":162.60000014305115},{"duration":648.4000000953674,"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":163.20000004768372,"connectEnd":163.20000004768372,"connectStart":163.20000004768372,"domainLookupEnd":163.20000004768372,"domainLookupStart":163.20000004768372,"fetchStart":163.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":163.20000004768372,"responseEnd":811.6000001430511,"responseStart":811.6000001430511,"secureConnectionStart":163.20000004768372},{"duration":1163.3999998569489,"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":163.30000019073486,"connectEnd":163.30000019073486,"connectStart":163.30000019073486,"domainLookupEnd":163.30000019073486,"domainLookupStart":163.30000019073486,"fetchStart":163.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":163.30000019073486,"responseEnd":1326.7000000476837,"responseStart":1326.7000000476837,"secureConnectionStart":163.30000019073486},{"duration":560.2000000476837,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":721.4000000953674,"connectEnd":721.4000000953674,"connectStart":721.4000000953674,"domainLookupEnd":721.4000000953674,"domainLookupStart":721.4000000953674,"fetchStart":721.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":721.4000000953674,"responseEnd":1281.6000001430511,"responseStart":1281.6000001430511,"secureConnectionStart":721.4000000953674},{"duration":499.60000014305115,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":893,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":893,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1392.6000001430511,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":5,"responseStart":156,"responseEnd":158,"domLoading":160,"domInteractive":1378,"domContentLoadedEventStart":1378,"domContentLoadedEventEnd":1412,"domComplete":2031,"loadEventStart":2031,"loadEventEnd":2032,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1360.5},{"name":"bigPipe.sidebar-id.end","time":1361.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1361.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1363.7000000476837},{"name":"activityTabFullyLoaded","time":1415}],"measures":[],"correlationId":"1517cb8ccd2c12","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":91,"dbReadsTimeInMs":13,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}