Tree Index doesn't check key sizes

Bug #1072624 reported by Roman Tsisyk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tarantool
Fix Released
Undecided
Roman Tsisyk

Bug Description

Single-part:
space[0].enabled = 1
space[0].index[0].type = "TREE"
space[0].index[0].unique = 1
space[0].index[0].key_field[0].fieldno = 0
space[0].index[0].key_field[0].type = "NUM"

localhost> INSERT INTO t0 VALUES('fdsafdsa') <!-- Incorrect behaviour
Insert OK, 1 rows affected
localhost> INSERT INTO t0 VALUES('fdsafdsadsfdsaf') <!-- Incorrect behaviour
Insert OK, 1 rows affected

Multi-part:
space[0].enabled = 1
space[0].index[0].type = "TREE"
space[0].index[0].unique = 1
space[0].index[0].key_field[0].fieldno = 0
space[0].index[0].key_field[0].type = "NUM"
space[0].index[0].key_field[1].fieldno = 1
space[0].index[0].key_field[1].type = "NUM"

localhost> INSERT into t0 VALUES('aaaaaa')
Insert ERROR, Field 2 was not found in the tuple (ER_NO_SUCH_FIELD) <!-- Correct behaviour

localhost> INSERT into t0 VALUES('aaaaaa', 'xxxxxxxx') <!-- Incorrect behaviour
Insert OK, 1 rows affected
localhost> INSERT into t0 VALUES('aaaaaa', 11111) <!-- Incorrect behaviour
Insert OK, 1 rows affected
localhost> INSERT into t0 VALUES(11111, 'yyyyyyy') <!-- Incorrect behaviour
Insert OK, 1 rows affected
localhost>

Tags: index tree
Revision history for this message
Roman Tsisyk (rtsisyk) wrote :

Fix committed to space-fields branch

Changed in tarantool:
assignee: nobody → Roman Tsisyk (rtsisyk)
Revision history for this message
Roman Tsisyk (rtsisyk) wrote :

tuple-compare-v2

Changed in tarantool:
status: New → In Progress
milestone: none → 1.5.1
Roman Tsisyk (rtsisyk)
Changed in tarantool:
status: In Progress → Fix Committed
Kostja Osipov (kostja)
Changed in tarantool:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.