sql: do not change order of inserted values
Before this patch, if an ephemeral space was used during INSERT or REPLACE, the inserted values were sorted by the first column, since this was the first part of the index. This can lead to an error when using the AUTOINCREMENT feature, since changing the order of the inserted value can change the value inserted instead of NULL. To avoid this, the patch makes the rowid of the inserted row in the ephemeral space the only part of the ephemeral space index. Closes #4256
Showing
- src/box/sql.c 24 additions, 8 deletionssrc/box/sql.c
- src/box/sql/insert.c 21 additions, 0 deletionssrc/box/sql/insert.c
- src/box/sql/select.c 2 additions, 0 deletionssrc/box/sql/select.c
- src/box/sql/sqlInt.h 2 additions, 0 deletionssrc/box/sql/sqlInt.h
- src/box/sql/vdbe.c 3 additions, 16 deletionssrc/box/sql/vdbe.c
- test/sql/gh-4256-do-not-change-order-during-insertion.result 44 additions, 0 deletionstest/sql/gh-4256-do-not-change-order-during-insertion.result
- test/sql/gh-4256-do-not-change-order-during-insertion.test.sql 13 additions, 0 deletions...sql/gh-4256-do-not-change-order-during-insertion.test.sql
Loading
Please register or sign in to comment