Skip to content
Snippets Groups Projects
Commit 8ab3eead authored by Dmitry Simonenko's avatar Dmitry Simonenko
Browse files

Fix gh-432: Sophia: ignored limit

parent 36a574ae
No related branches found
No related tags found
No related merge requests found
......@@ -227,7 +227,7 @@ s:create_index('sophia_index', {})
...
s.index[0]:len() -- exception
---
- error: SophiaIndex does not support size operation
- error: sophia does not support transactions
...
box.error()
---
......@@ -246,6 +246,62 @@ s = box.schema.create_space('tester',{engine='sophia', temporary=true})
---
- error: 'Can''t modify space 512: space does not support temporary flag'
...
---
--- gh-432: Sophia: ignored limit
---
s = box.schema.create_space('tester',{id = 89, engine='sophia'})
---
...
s:create_index('sophia_index', {})
---
...
for v=1, 100 do s:insert({v}) end
---
...
t = s:select({''},{iterator='GT', limit =1})
---
- error: 'Supplied key type of part 0 does not match index part type: expected NUM'
...
t
---
- - ['a', 'b', 'c']
...
t = s:select({},{iterator='GT', limit =1})
---
...
t
---
- - [1]
...
s:drop()
---
...
s = box.schema.create_space('tester', {id = 90, engine='sophia'})
---
...
s:create_index('sophia_index', {type = 'tree', parts = {1, 'STR'}})
---
...
for v=1, 100 do s:insert({tostring(v)}) end
---
...
t = s:select({''},{iterator='GT', limit =1})
---
...
t
---
- - ['1']
...
t = s:select({},{iterator='GT', limit =1})
---
...
t
---
- - ['1']
...
s:drop()
---
...
os.execute("rm -rf sophia")
---
- 0
......
......@@ -90,4 +90,26 @@ s:drop()
box.cfg{}
s = box.schema.create_space('tester',{engine='sophia', temporary=true})
---
--- gh-432: Sophia: ignored limit
---
s = box.schema.create_space('tester',{id = 89, engine='sophia'})
s:create_index('sophia_index', {})
for v=1, 100 do s:insert({v}) end
t = s:select({''},{iterator='GT', limit =1})
t
t = s:select({},{iterator='GT', limit =1})
t
s:drop()
s = box.schema.create_space('tester', {id = 90, engine='sophia'})
s:create_index('sophia_index', {type = 'tree', parts = {1, 'STR'}})
for v=1, 100 do s:insert({tostring(v)}) end
t = s:select({''},{iterator='GT', limit =1})
t
t = s:select({},{iterator='GT', limit =1})
t
s:drop()
os.execute("rm -rf sophia")
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