[MDEV-14628] Wrong autoinc value assigned by LOAD XML in the NO_AUTO_VALUE_ON_ZERO mode Created: 2017-12-12 Updated: 2019-02-23 Resolved: 2017-12-13 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2, 10.3 |
| Fix Version/s: | 10.3.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
This is a similar problem to one that was earlier fixed in MySQL-5.0 under terms of: Now for LOAD XML instead of LOAD DATA. I put a file MYSQL_HOME_DIR/test/t1.xml with this content:
and run this script:
It returns the following data:
The auto-increment value for the second record is wrong. It should be 2 rather than 0. |
| Comments |
| Comment by Alexander Barkov [ 2017-12-13 ] | ||||||||||||
|
A related problem happens with a GEOMETRY column. I put this XML file into MYSQL_DATA_DIR/test/a.xml:
And run this script:
Notice, it returns a wrong result. An empty string is not a valid GEOMETRY value. LOAD DATA correctly returns an error in the same context: | ||||||||||||
| Comment by Alexander Barkov [ 2019-02-23 ] | ||||||||||||
|
Backported to 10.2.23, as a part of |