Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
6af115ea
Commit
6af115ea
authored
13 years ago
by
Aleksey Demakov
Browse files
Options
Downloads
Patches
Plain Diff
Add test for Bug #902091 (Positioned iteration over a multipart index doesn't work).
parent
102b0750
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/box_big/lua.result
+39
-0
39 additions, 0 deletions
test/box_big/lua.result
test/box_big/lua.test
+18
-0
18 additions, 0 deletions
test/box_big/lua.test
with
57 additions
and
0 deletions
test/box_big/lua.result
+
39
−
0
View file @
6af115ea
...
...
@@ -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')
...
...
This diff is collapsed.
Click to expand it.
test/box_big/lua.test
+
18
−
0
View file @
6af115ea
...
...
@@ -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
#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment