[MDEV-17401] LOAD DATA from very big file into MyISAM table results in EOF error and corrupt index Created: 2018-10-09 Updated: 2020-08-25 Resolved: 2019-01-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - MyISAM |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.3.10, 10.3.12, 10.2 |
| Fix Version/s: | 10.4.2, 10.2.19, 10.1.38, 5.5.63, 10.0.38, 10.3.13 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
A LOAD DATA statement is consistently failing with the following error:
The resulting table is also corrupt, and cannot seem to be repaired:
The table has the following definition:
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:
|
| Comments |
| Comment by Elena Stepanova [ 2018-10-09 ] | ||||||||||||||||||
|
I could reproduce it, and it doesn't seem to be related to a lack of space in the tmpdir (I didn't monitor mine, but it had over 1T to begin with, so it's unlikely it temporarily ran out of space). | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2018-10-09 ] | ||||||||||||||||||
|
Repeatable on non tmp dir (so it is not lack of space) and repatable only with :
| ||||||||||||||||||
| Comment by Elena Stepanova [ 2018-10-09 ] | ||||||||||||||||||
|
Right, I also tried to run with myisam_sort_buffer_size=1G and it appears it helps. Both values are dynamic, but I can't say yet with certainty whether changing the values at runtime helps; I tried to start the server with them, and at least LOAD DATA went without errors with these settings (CHECK TABLE is still running). | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2018-10-10 ] | ||||||||||||||||||
|
It fails with only - | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2018-10-10 ] | ||||||||||||||||||
|
--bulk-insert-buffer-size=2G is irrelevant to the fail, so the sort buffer is cause of the problem | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2018-10-11 ] | ||||||||||||||||||
|
problem is that linux can not read whole requested chunk of the file (see man 2 read) | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2018-10-12 ] | ||||||||||||||||||
|
revision-id: cc5c19ae5233ba90de086de76043774ae6c78cd7 (mariadb-5.5.61-30-gcc5c19ae523)
my_read fixed as in higher versions. — | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2018-10-12 ] | ||||||||||||||||||
|
I also added here patch for 10.3 (can be helpful for merges from 5.5 up) | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2018-10-30 ] | ||||||||||||||||||
|
Index checked in the new version:
| ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2018-10-30 ] | ||||||||||||||||||
|
revision-id: f95616dc4774328381044b53263d6a23ae19bfb4 (mariadb-5.5.61-39-gf95616dc477)
my_read fixed as in higher versions. — | ||||||||||||||||||
| Comment by Richard Stracke [ 2019-01-18 ] | ||||||||||||||||||
|
Issue reoccured in 10.3.12 | ||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2019-01-23 ] | ||||||||||||||||||
|
OK, the problem in 10.3 is that the flag MY_FULL_IO is not set in merge_buffers() |