Skip to content
Snippets Groups Projects
Commit 6af115ea authored by Aleksey Demakov's avatar Aleksey Demakov
Browse files

Add test for Bug #902091 (Positioned iteration over a multipart index doesn't work).

parent 102b0750
No related branches found
No related tags found
No related merge requests found
......@@ -21,6 +21,45 @@ An error occurred: ER_KEY_CARDINALITY, 'Key cardinality 3 is greater than index
call box.delete(1, 'brave')
Found 1 tuple:
['brave', 'new', 'world']
#
# A test case for Bug #902091
# "Positioned iteration over a multipart index doesn't work"
# https://bugs.launchpad.net/tarantool/+bug/902091
#
insert into t1 values ('item 1', 'alabama', 'song')
Insert OK, 1 row affected
insert into t1 values ('item 2', 'california', 'dreaming')
Insert OK, 1 row affected
insert into t1 values ('item 3', 'california', 'uber alles')
Insert OK, 1 row affected
insert into t1 values ('item 4', 'georgia', 'on my mind')
Insert OK, 1 row affected
lua iter, tuple = box.space[1].index[1]:next('california')
---
...
lua tuple
---
- 'item 2': {'california', 'dreaming'}
...
lua iter, tuple = box.space[1].index[1]:next(iter)
---
...
lua tuple
---
- 'item 3': {'california', 'uber alles'}
...
call box.delete(1, 'item 1')
Found 1 tuple:
['item 1', 'alabama', 1735290739]
call box.delete(1, 'item 2')
Found 1 tuple:
['item 2', 'california', 'dreaming']
call box.delete(1, 'item 3')
Found 1 tuple:
['item 3', 'california', 'uber alles']
call box.delete(1, 'item 4')
Found 1 tuple:
['item 4', 'georgia', 'on my mind']
insert into t5 values ('01234567', 'new', 'world')
Insert OK, 1 row affected
insert into t5 values ('00000000', 'of', 'puppets')
......
......@@ -11,6 +11,24 @@ print """#
exec sql "call box.select(1, 1, 'new', 'world', 'order')"
exec sql "call box.delete(1, 'brave')"
print """#
# A test case for Bug #902091
# "Positioned iteration over a multipart index doesn't work"
# https://bugs.launchpad.net/tarantool/+bug/902091
#"""
exec sql "insert into t1 values ('item 1', 'alabama', 'song')"
exec sql "insert into t1 values ('item 2', 'california', 'dreaming')"
exec sql "insert into t1 values ('item 3', 'california', 'uber alles')"
exec sql "insert into t1 values ('item 4', 'georgia', 'on my mind')"
exec admin "lua iter, tuple = box.space[1].index[1]:next('california')"
exec admin "lua tuple"
exec admin "lua iter, tuple = box.space[1].index[1]:next(iter)"
exec admin "lua tuple"
exec sql "call box.delete(1, 'item 1')"
exec sql "call box.delete(1, 'item 2')"
exec sql "call box.delete(1, 'item 3')"
exec sql "call box.delete(1, 'item 4')"
#
# Check range scan over multipart keys
#
......
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