Type:
Bug
Priority:
Major
Resolution:
Fixed
Affects Version/s:
5.5(EOL) , 10.0(EOL) , 10.1(EOL) , 10.2(EOL) , 10.3(EOL)
This is a similar problem to one that was earlier fixed in MySQL-5.0 under terms of:
Bug#27586 Wrong autoinc value assigned by LOAD DATA in the NO_AUTO_VALUE_ON_ZERO mode
Now for LOAD XML instead of LOAD DATA .
I put a file MYSQL_HOME_DIR/test/t1.xml with this content:
< list >
< row a = "1" b = "bbb1" />
< row b = "bbb2" />
</ list >
and run this script:
SET @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
CREATE OR REPLACE TABLE t1(a INT AUTO_INCREMENT PRIMARY KEY , b TEXT);
LOAD XML INFILE 't1.xml' INTO TABLE t1 ROWS IDENTIFIED BY '<row>' ;
SELECT * FROM t1 ORDER BY b;
It returns the following data:
+---+------+
| a | b |
+---+------+
| 1 | bbb1 |
| 0 | bbb2 |
+---+------+
The auto-increment value for the second record is wrong. It should be 2 rather than 0 .
relates to
MDEV-15497
Wrong empty value in a GEOMETRY column on LOAD DATA
Closed
{"report":{"fcp":2793.199999809265,"ttfb":1487,"pageVisibility":"visible","entityId":64786,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"55f70432-e265-4c41-9cbe-388f3d579ac0","navigationType":0,"readyForUser":2870.800000190735,"redirectCount":0,"resourceLoadedEnd":3774.4000005722046,"resourceLoadedStart":1492.5,"resourceTiming":[{"duration":776.9000005722046,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":1492.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1492.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2269.4000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":777.1000003814697,"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":1492.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1492.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2269.9000005722046,"responseStart":0,"secureConnectionStart":0},{"duration":833.5999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":1493.1000003814697,"connectEnd":1493.1000003814697,"connectStart":1493.1000003814697,"domainLookupEnd":1493.1000003814697,"domainLookupStart":1493.1000003814697,"fetchStart":1493.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1493.1000003814697,"responseEnd":2326.699999809265,"responseStart":2326.699999809265,"secureConnectionStart":1493.1000003814697},{"duration":885,"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":1493.1999998092651,"connectEnd":1493.1999998092651,"connectStart":1493.1999998092651,"domainLookupEnd":1493.1999998092651,"domainLookupStart":1493.1999998092651,"fetchStart":1493.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1493.1999998092651,"responseEnd":2378.199999809265,"responseStart":2378.199999809265,"secureConnectionStart":1493.1999998092651},{"duration":888.5,"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":1493.5,"connectEnd":1493.5,"connectStart":1493.5,"domainLookupEnd":1493.5,"domainLookupStart":1493.5,"fetchStart":1493.5,"redirectEnd":0,"redirectStart":0,"requestStart":1493.5,"responseEnd":2382,"responseStart":2382,"secureConnectionStart":1493.5},{"duration":888.8999996185303,"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":1493.6000003814697,"connectEnd":1493.6000003814697,"connectStart":1493.6000003814697,"domainLookupEnd":1493.6000003814697,"domainLookupStart":1493.6000003814697,"fetchStart":1493.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1493.6000003814697,"responseEnd":2382.5,"responseStart":2382.5,"secureConnectionStart":1493.6000003814697},{"duration":889.1999998092651,"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":1493.8000001907349,"connectEnd":1493.8000001907349,"connectStart":1493.8000001907349,"domainLookupEnd":1493.8000001907349,"domainLookupStart":1493.8000001907349,"fetchStart":1493.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1493.8000001907349,"responseEnd":2383,"responseStart":2383,"secureConnectionStart":1493.8000001907349},{"duration":976.6999998092651,"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":1494,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1494,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2470.699999809265,"responseStart":0,"secureConnectionStart":0},{"duration":889.4000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":1494.1999998092651,"connectEnd":1494.1999998092651,"connectStart":1494.1999998092651,"domainLookupEnd":1494.1999998092651,"domainLookupStart":1494.1999998092651,"fetchStart":1494.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1494.1999998092651,"responseEnd":2383.6000003814697,"responseStart":2383.6000003814697,"secureConnectionStart":1494.1999998092651},{"duration":976.3999996185303,"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":1494.4000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1494.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2470.800000190735,"responseStart":0,"secureConnectionStart":0},{"duration":889.5,"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":1494.6000003814697,"connectEnd":1494.6000003814697,"connectStart":1494.6000003814697,"domainLookupEnd":1494.6000003814697,"domainLookupStart":1494.6000003814697,"fetchStart":1494.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":1494.6000003814697,"responseEnd":2384.1000003814697,"responseStart":2384.1000003814697,"secureConnectionStart":1494.6000003814697},{"duration":2014.1999998092651,"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":1495.4000005722046,"connectEnd":1495.4000005722046,"connectStart":1495.4000005722046,"domainLookupEnd":1495.4000005722046,"domainLookupStart":1495.4000005722046,"fetchStart":1495.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":1495.4000005722046,"responseEnd":3509.6000003814697,"responseStart":3509.6000003814697,"secureConnectionStart":1495.4000005722046},{"duration":2274.7000007629395,"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":1499.6999998092651,"connectEnd":1499.6999998092651,"connectStart":1499.6999998092651,"domainLookupEnd":1499.6999998092651,"domainLookupStart":1499.6999998092651,"fetchStart":1499.6999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":1499.6999998092651,"responseEnd":3774.4000005722046,"responseStart":3774.4000005722046,"secureConnectionStart":1499.6999998092651},{"duration":1056.5999994277954,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2483.1000003814697,"connectEnd":2483.1000003814697,"connectStart":2483.1000003814697,"domainLookupEnd":2483.1000003814697,"domainLookupStart":2483.1000003814697,"fetchStart":2483.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":2483.1000003814697,"responseEnd":3539.699999809265,"responseStart":3539.699999809265,"secureConnectionStart":2483.1000003814697},{"duration":1014.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":2786.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":2786.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":3801,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":1331,"responseStart":1487,"responseEnd":1492,"domLoading":1491,"domInteractive":3804,"domContentLoadedEventStart":3804,"domContentLoadedEventEnd":3848,"domComplete":5186,"loadEventStart":5186,"loadEventEnd":5188,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":3779.300000190735},{"name":"bigPipe.sidebar-id.end","time":3780.199999809265},{"name":"bigPipe.activity-panel-pipe-id.start","time":3780.4000005722046},{"name":"bigPipe.activity-panel-pipe-id.end","time":3782.9000005722046},{"name":"activityTabFullyLoaded","time":3855.300000190735}],"measures":[],"correlationId":"92b0d086c5c770","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":95,"dbReadsTimeInMs":12,"dbConnsTimeInMs":21,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}