[MDEV-11348] LOAD DATA LOCAL INFILE crashes the server on loading a backslash followed by a multi-byte character Created: 2016-11-25 Updated: 2020-08-25 Resolved: 2016-11-25 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets |
| Affects Version/s: | 10.0, 10.1 |
| Fix Version/s: | 10.0.29, 10.1.20 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
This script crashes the server when loading the attached file data.txt.
Stack trace:
|
| Comments |
| Comment by Alexander Barkov [ 2016-11-25 ] | ||||||||||||||||||||||||||
|
It also crashes if I do a similar LOAD into a GEOMETRY column using the same file data.txt:
If I now remove the "LOCAL" clause, it returns an error without crashing:
Note, crash only happens with the "mysql" client. With "mysqltest" as a client the server does not crash.
If I run the same query using "mysql --execute", it also does not crash:
The problems seems to be related with a wrong order of "progress report" vs "error" packets. Hence only "mysql" in interactive mode makes the server crash. The crash happens than a my_error() call happens for any reasons during loading (e.g. a bad multi-byte sequence or a bad GEOMETRY value was found). | ||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2017-02-27 ] | ||||||||||||||||||||||||||
|
Alvin, I just checked: the fix is merged into 10.1. So no additional patches for 10.1 should be needed. | ||||||||||||||||||||||||||
| Comment by Jean-François Gagné [ 2017-02-27 ] | ||||||||||||||||||||||||||
|
Can we know in which 10.1.x it was merged ? | ||||||||||||||||||||||||||
| Comment by Alvin Richards (Inactive) [ 2017-02-27 ] | ||||||||||||||||||||||||||
|
Git commit appears to be 10.1.20 |