Skip to content
Snippets Groups Projects
Commit 1b62e98e authored by Mergen Imeev's avatar Mergen Imeev Committed by Kirill Yukhin
Browse files

sql: increase row_count when adding CHECK constraint

If CHECK constraint is added using ALTER TABLE statement, row_count
should be incremented. Note that row_count does not increase if CHECK
constraint is created during the execution of CREATE TABLE statement.
For example:

box.execute('CREATE TABLE t1(id INTEGER PRIMARY KEY);')
box.execute('ALTER TABLE t1 ADD CONSTRAINT ck1 CHECK(id > 0);')

Should return:
- row_count: 1

However, prior to this patch it was always equal to zero. Let's fix
this passing appropriate flag to OP_SInsert opcode.

Closes #4363
parent 47b91e90
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment