Type:
Bug
Priority:
Critical
Resolution:
Fixed
Affects Version/s:
10.3.10 , 10.3.12 , 5.5(EOL) , 10.0(EOL) , 10.1(EOL) , 10.2(EOL)
A LOAD DATA statement is consistently failing with the following error:
MariaDB [(none)]> LOAD DATA LOCAL INFILE '/home/ec2-user/tab.txt' INTO TABLE db1.`tab` IGNORE 0 LINES;
ERROR 9 (HY000): Unexpected end-of-file found when reading file '/tmp/STWraeLT' (Errcode: 175 "File too short; Expected more data in file")
The resulting table is also corrupt, and cannot seem to be repaired:
MariaDB [db1]> CHECK TABLE tab;
+-------------------+-------+----------+------------------------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-------------------+-------+----------+------------------------------------------------------------------------+
| db1.tab | check | error | Can't read indexpage from filepos: -1 |
| db1.tab | check | Error | Index for table './db1/tab.MYI' is corrupt; try to repair it |
| db1.tab | check | error | Corrupt |
+-------------------+-------+----------+------------------------------------------------------------------------+
3 rows in set (1 min 51.569 sec)
MariaDB [db1]> REPAIR TABLE tab;
+-------------------+--------+----------+----------------------------------------------------------------------------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-------------------+--------+----------+----------------------------------------------------------------------------------------------------------------------------+
| db1.tab | repair | Error | Unexpected end-of-file found when reading file '/tmp/STjk9WiV' (Errcode: 175 "File too short; Expected more data in file") |
| db1.tab | repair | Error | Unexpected end-of-file found when reading file '/tmp/STpQXG9A' (Errcode: 175 "File too short; Expected more data in file") |
| db1.tab | repair | status | OK |
+-------------------+--------+----------+----------------------------------------------------------------------------------------------------------------------------+
3 rows in set (36 min 31.957 sec)
MariaDB [db1]> CHECK TABLE tab;
+-------------------+-------+----------+-------------------------------------------------------------+
| Table | Op | Msg_type | Msg_text |
+-------------------+-------+----------+-------------------------------------------------------------+
| db1.tab | check | error | Found key at page -1 that points to record outside datafile |
| db1.tab | check | error | Corrupt |
+-------------------+-------+----------+-------------------------------------------------------------+
2 rows in set (15.393 sec)
The table has the following definition:
MariaDB [(none)]> SHOW CREATE TABLE db1.tab\G
*************************** 1. row ***************************
Table: tab
Create Table: CREATE TABLE `tab` (
`tab_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`col2` int(10) unsigned NOT NULL,
`col3` int(10) unsigned NOT NULL,
`col4` int(10) unsigned NOT NULL,
`col5` int(10) unsigned NOT NULL,
`col6` tinyint(1) NOT NULL,
`col7` double DEFAULT NULL,
`col8` varchar(18) DEFAULT NULL,
PRIMARY KEY (`tab_id`),
UNIQUE KEY `unique_idx` (`col2`,`col3`,`col4`,`col6`),
UNIQUE KEY `col8_idx` (`col8`),
KEY `col3_idx` (`col3`,`col4`),
KEY `col2_idx` (`col2`)
) ENGINE=MyISAM AUTO_INCREMENT=205163534 DEFAULT CHARSET=latin1
1 row in set (0.005 sec)
The file being loaded into the table is 14 GB large, and it has 205163533 rows in it.
The only non-default values in the configuration file are:
log_error=mysqld.err
myisam_sort_buffer_size = 4G
bulk_insert_buffer_size = 2G
relates to
MDEV-16461
MyISAM creates defect indexes on varchar, if rowcount is above some threshold between 480,000,000 and 490,000,000
Confirmed
{"report":{"fcp":822.5,"ttfb":168.5,"pageVisibility":"visible","entityId":70170,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"bb00ea36-ff3b-4554-9b62-4e26d84d30ba","navigationType":0,"readyForUser":923.8000001907349,"redirectCount":0,"resourceLoadedEnd":958.3000001907349,"resourceLoadedStart":173.69999980926514,"resourceTiming":[{"duration":128.69999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":173.69999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":173.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":302.3999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":128.69999980926514,"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":174,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":174,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":302.69999980926514,"responseStart":0,"secureConnectionStart":0},{"duration":138.39999961853027,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":174.10000038146973,"connectEnd":174.10000038146973,"connectStart":174.10000038146973,"domainLookupEnd":174.10000038146973,"domainLookupStart":174.10000038146973,"fetchStart":174.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":174.10000038146973,"responseEnd":312.5,"responseStart":312.5,"secureConnectionStart":174.10000038146973},{"duration":243.19999980926514,"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":174.30000019073486,"connectEnd":174.30000019073486,"connectStart":174.30000019073486,"domainLookupEnd":174.30000019073486,"domainLookupStart":174.30000019073486,"fetchStart":174.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":174.30000019073486,"responseEnd":417.5,"responseStart":417.5,"secureConnectionStart":174.30000019073486},{"duration":247.30000019073486,"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":174.5,"connectEnd":174.5,"connectStart":174.5,"domainLookupEnd":174.5,"domainLookupStart":174.5,"fetchStart":174.5,"redirectEnd":0,"redirectStart":0,"requestStart":174.5,"responseEnd":421.80000019073486,"responseStart":421.80000019073486,"secureConnectionStart":174.5},{"duration":247.69999980926514,"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":174.69999980926514,"connectEnd":174.69999980926514,"connectStart":174.69999980926514,"domainLookupEnd":174.69999980926514,"domainLookupStart":174.69999980926514,"fetchStart":174.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":174.69999980926514,"responseEnd":422.3999996185303,"responseStart":422.3999996185303,"secureConnectionStart":174.69999980926514},{"duration":247.9000005722046,"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":174.89999961853027,"connectEnd":174.89999961853027,"connectStart":174.89999961853027,"domainLookupEnd":174.89999961853027,"domainLookupStart":174.89999961853027,"fetchStart":174.89999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":174.89999961853027,"responseEnd":422.80000019073486,"responseStart":422.80000019073486,"secureConnectionStart":174.89999961853027},{"duration":282.79999923706055,"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":175.10000038146973,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":175.10000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":457.8999996185303,"responseStart":0,"secureConnectionStart":0},{"duration":248.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":175.30000019073486,"connectEnd":175.30000019073486,"connectStart":175.30000019073486,"domainLookupEnd":175.30000019073486,"domainLookupStart":175.30000019073486,"fetchStart":175.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":175.30000019073486,"responseEnd":423.5,"responseStart":423.5,"secureConnectionStart":175.30000019073486},{"duration":282.6000003814697,"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":175.39999961853027,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":175.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":458,"responseStart":0,"secureConnectionStart":0},{"duration":248.69999980926514,"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":175.60000038146973,"connectEnd":175.60000038146973,"connectStart":175.60000038146973,"domainLookupEnd":175.60000038146973,"domainLookupStart":175.60000038146973,"fetchStart":175.60000038146973,"redirectEnd":0,"redirectStart":0,"requestStart":175.60000038146973,"responseEnd":424.30000019073486,"responseStart":424.30000019073486,"secureConnectionStart":175.60000038146973},{"duration":343.4000005722046,"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":181.39999961853027,"connectEnd":181.39999961853027,"connectStart":181.39999961853027,"domainLookupEnd":181.39999961853027,"domainLookupStart":181.39999961853027,"fetchStart":181.39999961853027,"redirectEnd":0,"redirectStart":0,"requestStart":181.39999961853027,"responseEnd":524.8000001907349,"responseStart":524.8000001907349,"secureConnectionStart":181.39999961853027},{"duration":380.19999980926514,"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":181.5,"connectEnd":181.5,"connectStart":181.5,"domainLookupEnd":181.5,"domainLookupStart":181.5,"fetchStart":181.5,"redirectEnd":0,"redirectStart":0,"requestStart":181.5,"responseEnd":561.6999998092651,"responseStart":561.6999998092651,"secureConnectionStart":181.5},{"duration":56.19999980926514,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":469.69999980926514,"connectEnd":469.69999980926514,"connectStart":469.69999980926514,"domainLookupEnd":469.69999980926514,"domainLookupStart":469.69999980926514,"fetchStart":469.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":469.69999980926514,"responseEnd":525.8999996185303,"responseStart":525.8999996185303,"secureConnectionStart":469.69999980926514},{"duration":220.19999980926514,"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":738.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":738.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":958.3000001907349,"responseStart":0,"secureConnectionStart":0}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":4,"responseStart":169,"responseEnd":181,"domLoading":172,"domInteractive":998,"domContentLoadedEventStart":999,"domContentLoadedEventEnd":1043,"domComplete":1784,"loadEventStart":1784,"loadEventEnd":1786,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":968.5},{"name":"bigPipe.sidebar-id.end","time":969.3999996185303},{"name":"bigPipe.activity-panel-pipe-id.start","time":969.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":972},{"name":"activityTabFullyLoaded","time":1051.3000001907349}],"measures":[],"correlationId":"78fe360114434b","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":91,"dbReadsTimeInMs":10,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}