Type:
Bug
Priority:
Major
Resolution:
Unresolved
Affects Version/s:
10.6 , 10.7(EOL) , 10.8(EOL) , 10.9(EOL) , 10.10(EOL) , 10.11 , 11.0(EOL) , 11.1(EOL) , 11.2(EOL) , 11.3(EOL)
In MDEV-31835 we found out an unintended side effect of MDEV-24818 , which affects the following test:
--source include/have_innodb.inc
SET foreign_key_checks=0, unique_checks=0;
CREATE TABLE t (a INT UNIQUE ) ENGINE=InnoDB;
BEGIN ;
INSERT INTO t VALUES (1),(2);
INSERT IGNORE INTO t VALUES (2);
COMMIT ;
SELECT * FROM t;
DROP TABLE t;
Before MDEV-24818 was implemented in the MariaDB Server 10.6 branch that was eventually released as 10.6.0, only the first INSERT statement was executed in "bulk insert into empty table" mode. After that change, also the INSERT IGNORE statement will be executed in the same mode, covered by the table-level undo log record "on rollback, make the table empty" that was written by the first INSERT statement. That is, the attempt to insert duplicate key a=2 will result in an empty table, instead of a table that contains the two rows (1),(2).
serg wrote in MDEV-31835 that the INSERT and LOAD statements containing an IGNORE clause must be rejected with an error in this case. As far as I understand, this would have to be implemented in the functions mysql_insert() and mysql_load() .
If we want to limit this to the case of InnoDB bulk insert and not the generic case of unique_checks=0 , some storage engine API change may be necessary, to query the value of InnoDB trx_t::bulk_insert .
{"report":{"fcp":1587.9000005722046,"ttfb":492.9000005722046,"pageVisibility":"visible","entityId":124433,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":32,"apdex":0.5,"journeyId":"9ea99c09-88c6-4032-b36d-9674308d58f1","navigationType":0,"readyForUser":1671.6000003814697,"redirectCount":0,"resourceLoadedEnd":1759.6000003814697,"resourceLoadedStart":499.6000003814697,"resourceTiming":[{"duration":577.8000001907349,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":499.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":499.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1077.4000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":578.1999998092651,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":499.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":499.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1078,"responseStart":0,"secureConnectionStart":0},{"duration":601.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":500,"connectEnd":500,"connectStart":500,"domainLookupEnd":500,"domainLookupStart":500,"fetchStart":500,"redirectEnd":0,"redirectStart":0,"requestStart":500,"responseEnd":1101.9000005722046,"responseStart":1101.9000005722046,"secureConnectionStart":500},{"duration":681.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":500.30000019073486,"connectEnd":500.30000019073486,"connectStart":500.30000019073486,"domainLookupEnd":500.30000019073486,"domainLookupStart":500.30000019073486,"fetchStart":500.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":500.30000019073486,"responseEnd":1182,"responseStart":1182,"secureConnectionStart":500.30000019073486},{"duration":685.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":500.5,"connectEnd":500.5,"connectStart":500.5,"domainLookupEnd":500.5,"domainLookupStart":500.5,"fetchStart":500.5,"redirectEnd":0,"redirectStart":0,"requestStart":500.5,"responseEnd":1185.6999998092651,"responseStart":1185.6999998092651,"secureConnectionStart":500.5},{"duration":685.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":500.69999980926514,"connectEnd":500.69999980926514,"connectStart":500.69999980926514,"domainLookupEnd":500.69999980926514,"domainLookupStart":500.69999980926514,"fetchStart":500.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":500.69999980926514,"responseEnd":1186.1999998092651,"responseStart":1186.1999998092651,"secureConnectionStart":500.69999980926514},{"duration":686.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":500.80000019073486,"connectEnd":500.80000019073486,"connectStart":500.80000019073486,"domainLookupEnd":500.80000019073486,"domainLookupStart":500.80000019073486,"fetchStart":500.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":500.80000019073486,"responseEnd":1186.9000005722046,"responseStart":1186.9000005722046,"secureConnectionStart":500.80000019073486},{"duration":743.9000005722046,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":501,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":501,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1244.9000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":686.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":501.1000003814697,"connectEnd":501.1000003814697,"connectStart":501.1000003814697,"domainLookupEnd":501.1000003814697,"domainLookupStart":501.1000003814697,"fetchStart":501.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":501.1000003814697,"responseEnd":1187.4000005722046,"responseStart":1187.4000005722046,"secureConnectionStart":501.1000003814697},{"duration":744.1000003814697,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":501.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":501.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1245.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":686.8999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":501.4000005722046,"connectEnd":501.4000005722046,"connectStart":501.4000005722046,"domainLookupEnd":501.4000005722046,"domainLookupStart":501.4000005722046,"fetchStart":501.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":501.4000005722046,"responseEnd":1188.3000001907349,"responseStart":1188.3000001907349,"secureConnectionStart":501.4000005722046},{"duration":1107.6999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":502.6000003814697,"connectEnd":502.6000003814697,"connectStart":502.6000003814697,"domainLookupEnd":502.6000003814697,"domainLookupStart":502.6000003814697,"fetchStart":502.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":502.6000003814697,"responseEnd":1610.3000001907349,"responseStart":1610.3000001907349,"secureConnectionStart":502.6000003814697},{"duration":1256.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":502.69999980926514,"connectEnd":502.69999980926514,"connectStart":502.69999980926514,"domainLookupEnd":502.69999980926514,"domainLookupStart":502.69999980926514,"fetchStart":502.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":502.69999980926514,"responseEnd":1759.6000003814697,"responseStart":1759.6000003814697,"secureConnectionStart":502.69999980926514},{"duration":304.30000019073486,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1314.1999998092651,"connectEnd":1314.1999998092651,"connectStart":1314.1999998092651,"domainLookupEnd":1314.1999998092651,"domainLookupStart":1314.1999998092651,"fetchStart":1314.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1314.1999998092651,"responseEnd":1618.5,"responseStart":1618.5,"secureConnectionStart":1314.1999998092651},{"duration":214.30000019073486,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1581.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1581.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1795.8000001907349,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":341,"responseStart":493,"responseEnd":495,"domLoading":497,"domInteractive":1801,"domContentLoadedEventStart":1801,"domContentLoadedEventEnd":1851,"domComplete":3102,"loadEventStart":3102,"loadEventEnd":3104,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1783.8000001907349},{"name":"bigPipe.sidebar-id.end","time":1784.6000003814697},{"name":"bigPipe.activity-panel-pipe-id.start","time":1784.6999998092651},{"name":"bigPipe.activity-panel-pipe-id.end","time":1787.6000003814697},{"name":"activityTabFullyLoaded","time":1897.6000003814697}],"measures":[],"correlationId":"3077257a3ba123","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":90,"dbReadsTimeInMs":12,"dbConnsTimeInMs":19,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}