[MDEV-7150] Wrong auto increment values on INSERT .. ON DUPLICATE KEY UPDATE when the inserted columns include NULL in an auto-increment column Created: 2014-11-20 Updated: 2014-12-18 Resolved: 2014-12-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Data Manipulation - Update |
| Affects Version/s: | 10.0.14, 5.5, 10.0 |
| Fix Version/s: | 5.5.41, 10.0.16 |
| Type: | Bug | Priority: | Major |
| Reporter: | Stoykov (Inactive) | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Environment: |
Red Hat Enterprise Linux |
||
| Attachments: |
|
| Description |
|
An auto increment value of 0 is created at MariaDB 10.0.13/14 when NULL is used
There are test cases at the uploaded files. |
| Comments |
| Comment by Stoykov (Inactive) [ 2014-11-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Note, in case of SBR, it will cause a severe inconsistency between the slaves data. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-11-20 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Debug assertion:
Not fresh, reproducible on 10.0.10 too. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2014-11-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Not only a InnoDB/XtraDB problem. Similar crash on debug build with MyISAM:
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2014-11-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Test case | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2014-11-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Patch to make InnoDB/Xtradb auto increment code exactly as in Oracle 5.6. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Jan Lindström (Inactive) [ 2014-11-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Percona 5.5 is affected, but not Percona 5.6. Based on my research function int handler::update_auto_increment() is different on Oracle 5.6 and Percona 5.6. Code they have does not work out-of-the-box thus I will not continue. I made changes only to XtraDB/InnoDB code to make it exactly like Oracle/Percona. Reassigning to serg for reassign someone who knows handler code better. |