LevelDB storage engine
(MDEV-3841)
|
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 10.1.0 |
| Type: | Technical task | Priority: | Minor |
| Reporter: | Elena Stepanova | Assignee: | Sergei Petrunia |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | leveldb | ||
| Issue Links: |
|
||||
| Description |
|
If an explicit value (bigger than existing values) is inserted into an auto-increment column of a LevelDB table, the AUTO_INCREMENT doesn't get increased, so the next attempt to use it causes a duplicate key error. With InnoDB it works as expected (the value grows).
Test case:
Also covered in leveldb.autoincrement test, only there it causes a result mismatch rather than ER_DUP_ENTRY because the test uses a non-unique index for the column. |
| Comments |
| Comment by Sergei Petrunia [ 2013-05-15 ] |
|
Debugging the statement insert into t1 values (2); I find that execution reaches this function void handler::adjust_next_insert_id_after_explicit_value(ulonglong nr) and there, nr=<2, or whatever I have specified>, next_insert_id=0. Since next_insert_id==0, the value is not updated. |
| Comment by Sergei Petrunia [ 2013-05-15 ] |
|
The above might be ok actually. I'll need to debug auto_increment code further to find out. |