sql: clean-up in case constraint creation failed
This patch makes VDBE to perform a clean-up if the creation of a constraint fails because of the creation of two or more constraints of the same type with the same name and in the same CREATE TABLE statement. For example: CREATE TABLE t1( id INT PRIMARY KEY, CONSTRAINT ck1 CHECK(id > 1), CONSTRAINT ck1 CHECK(id < 10) ); Part of #4183
Showing
- src/box/sql/build.c 60 additions, 34 deletionssrc/box/sql/build.c
- src/box/sql/sqlInt.h 1 addition, 1 deletionsrc/box/sql/sqlInt.h
- src/box/sql/trigger.c 4 additions, 2 deletionssrc/box/sql/trigger.c
- test/sql/checks.result 2 additions, 1 deletiontest/sql/checks.result
- test/sql/checks.test.lua 1 addition, 1 deletiontest/sql/checks.test.lua
- test/sql/clear.result 30 additions, 0 deletionstest/sql/clear.result
- test/sql/clear.test.lua 14 additions, 0 deletionstest/sql/clear.test.lua
Loading
Please register or sign in to comment