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
da1a7a22
Commit
da1a7a22
authored
11 years ago
by
Roman Tsisyk
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for search in NUM64 TreeIndex using NUM key
parent
b7bcadb2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
test/big/lua.result
+44
-0
44 additions, 0 deletions
test/big/lua.result
test/big/lua.test
+12
-0
12 additions, 0 deletions
test/big/lua.test
test/big/tree_variants.result
+42
-0
42 additions, 0 deletions
test/big/tree_variants.result
test/big/tree_variants.test
+10
-1
10 additions, 1 deletion
test/big/tree_variants.test
with
108 additions
and
1 deletion
test/big/lua.result
+
44
−
0
View file @
da1a7a22
...
...
@@ -113,6 +113,50 @@ lua num == tonumber64('18446744073709551615')
---
- true
...
lua box.delete(8, 18446744073709551615ULL)
---
- 18446744073709551615: {'magic'}
...
lua box.insert('8', 125ULL, 'magic')
---
- 125: {'magic'}
...
lua tu = box.select('8', '0', 125)
---
...
lua tu2 = box.select('8', '0', 125LL)
---
...
lua num = box.unpack('l', tu[0])
---
...
lua num2 = box.unpack('l', tu2[0])
---
...
lua print(num)
---
125
...
lua print(num2)
---
125
...
lua type(num) == 'cdata'
---
- true
...
lua type(num2) == 'cdata'
---
- true
...
lua num == tonumber64('125')
---
- true
...
lua num2 == tonumber64('125')
---
- true
...
lua box.space[8]:truncate()
---
...
...
...
This diff is collapsed.
Click to expand it.
test/big/lua.test
+
12
−
0
View file @
da1a7a22
...
...
@@ -62,6 +62,18 @@ exec admin "lua type(num) == 'cdata'"
exec admin "lua num == tonumber64('
18446744073709551615
')"
exec admin "lua num = box.unpack('
l
', tu[0])"
exec admin "lua num == tonumber64('
18446744073709551615
')"
exec admin "lua box.delete(8, 18446744073709551615ULL)"
exec admin "lua box.insert('
8
', 125ULL, '
magic
')"
exec admin "lua tu = box.select('
8
', '
0
', 125)"
exec admin "lua tu2 = box.select('
8
', '
0
', 125LL)"
exec admin "lua num = box.unpack('
l
', tu[0])"
exec admin "lua num2 = box.unpack('
l
', tu2[0])"
exec admin "lua print(num)"
exec admin "lua print(num2)"
exec admin "lua type(num) == '
cdata
'"
exec admin "lua type(num2) == '
cdata
'"
exec admin "lua num == tonumber64('
125
')"
exec admin "lua num2 == tonumber64('
125
')"
exec admin "lua box.space[8]:truncate()"
#
...
...
This diff is collapsed.
Click to expand it.
test/big/tree_variants.result
+
42
−
0
View file @
da1a7a22
...
...
@@ -68,6 +68,44 @@ delete from t6 where k0 = 8
Delete OK, 1 row affected
delete from t6 where k0 = 9
Delete OK, 1 row affected
lua box.insert(6, 6, 6ULL, 400ULL, 'John', 'Smoker', 'Hits', 'A Pipe', 'foo', 2006 )
---
- 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006}
...
lua box.insert(6, 7, 7ULL, 400ULL, 'John', 'Smoker', 'Hits', 'A Bong', 'foo', 2007 )
---
- 7: {7, 400, 1852337994, 'Smoker', 1937008968, 'A Bong', 'foo', 2007}
...
lua box.insert(6, 8, 8ULL, 400ULL, 'John', 'Smoker', 'Rolls', 'A Joint', 'foo', 2008 )
---
- 8: {8, 400, 1852337994, 'Smoker', 'Rolls', 'A Joint', 'foo', 2008}
...
lua box.insert(6, 9, 9ULL, 400ULL, 'John', 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009 )
---
- 9: {9, 400, 1852337994, 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009}
...
lua box.select(6, 1, 6ULL)
---
- 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006}
...
lua box.select(6, 1, 6)
---
- 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006}
...
lua box.select(6, 2, 400ULL)
---
- 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006}
- 7: {7, 400, 1852337994, 'Smoker', 1937008968, 'A Bong', 'foo', 2007}
- 8: {8, 400, 1852337994, 'Smoker', 'Rolls', 'A Joint', 'foo', 2008}
- 9: {9, 400, 1852337994, 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009}
...
lua box.select(6, 2, 400)
---
- 6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006}
- 7: {7, 400, 1852337994, 'Smoker', 1937008968, 'A Bong', 'foo', 2007}
- 8: {8, 400, 1852337994, 'Smoker', 'Rolls', 'A Joint', 'foo', 2008}
- 9: {9, 400, 1852337994, 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009}
...
lua for k,v in box.space[6]:pairs() do print(v) end
---
0: {3472328296227680304, 3472329395739308080, 'Joe', 'Sixpack', 'Drinks', 'Amstel', 'bar', 2000}
...
...
@@ -76,4 +114,8 @@ lua for k,v in box.space[6]:pairs() do print(v) end
3: {3688501078341464112, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Corona Extra', 'bar', 2003}
4: {3760558672379392048, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Stella Artois', 'bar', 2004}
5: {3832616266417319984, 3472331594762563632, 'Joe', 'Sixpack', 'Drinks', 'Miller Genuine Draft', 'bar', 2005}
6: {6, 400, 1852337994, 'Smoker', 1937008968, 'A Pipe', 'foo', 2006}
7: {7, 400, 1852337994, 'Smoker', 1937008968, 'A Bong', 'foo', 2007}
8: {8, 400, 1852337994, 'Smoker', 'Rolls', 'A Joint', 'foo', 2008}
9: {9, 400, 1852337994, 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009}
...
This diff is collapsed.
Click to expand it.
test/big/tree_variants.test
+
10
−
1
View file @
da1a7a22
...
...
@@ -27,5 +27,14 @@ exec sql "delete from t6 where k0 = 7"
exec
sql
"delete from t6 where k0 = 8"
exec
sql
"delete from t6 where k0 = 9"
exec
admin
"lua for k,v in box.space[6]:pairs() do print(v) end"
exec
admin
"lua box.insert(6, 6, 6ULL, 400ULL, 'John', 'Smoker', 'Hits', 'A Pipe', 'foo', 2006 )"
exec
admin
"lua box.insert(6, 7, 7ULL, 400ULL, 'John', 'Smoker', 'Hits', 'A Bong', 'foo', 2007 )"
exec
admin
"lua box.insert(6, 8, 8ULL, 400ULL, 'John', 'Smoker', 'Rolls', 'A Joint', 'foo', 2008 )"
exec
admin
"lua box.insert(6, 9, 9ULL, 400ULL, 'John', 'Smoker', 'Rolls', 'A Blunt', 'foo', 2009 )"
exec
admin
"lua box.select(6, 1, 6ULL)"
exec
admin
"lua box.select(6, 1, 6)"
exec
admin
"lua box.select(6, 2, 400ULL)"
exec
admin
"lua box.select(6, 2, 400)"
exec
admin
"lua for k,v in box.space[6]:pairs() do print(v) end"
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