Skip to content
Snippets Groups Projects
Commit d3259d7e authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Fix #273: IPROTO_ITERATOR ignored in network protocol

parent 232f0766
No related branches found
No related tags found
No related merge requests found
......@@ -78,8 +78,8 @@ enum iproto_key {
#define IPROTO_HEAD_BMAP (bit(CODE) | bit(SYNC) | bit(NODE_ID) | bit(LSN))
#define IPROTO_BODY_BMAP (bit(SPACE_ID) | bit(INDEX_ID) | bit(LIMIT) |\
bit(OFFSET) | bit(KEY) | bit(TUPLE) | \
bit(FUNCTION_NAME) | bit(USER_NAME))
bit(OFFSET) | bit(ITERATOR) | bit(KEY) | \
bit(TUPLE) | bit(FUNCTION_NAME) | bit(USER_NAME))
static inline bool
iproto_header_has_key(const char *pos, const char *end)
{
......
box.schema.user.grant('guest', 'read,write,execute', 'universe')
---
...
--------------------------------------------------------------------------------
-- Test case for #273: IPROTO_ITERATOR ignored in network protocol
--------------------------------------------------------------------------------
space = box.schema.create_space('tweedledum')
---
...
space:create_index('primary', { type = 'tree'})
---
...
for i=1,5 do space:insert{i} end
---
...
conn = box.net.box.new('127.0.0.1', tonumber(box.cfg.primary_port))
---
...
conn:select(space.n, 3, { iterator = 'GE' })
---
- - [3]
- [4]
- [5]
...
conn:select(space.n, 3, { iterator = 'LE' })
---
- - [3]
- [2]
- [1]
...
conn:select(space.n, 3, { iterator = 'GT' })
---
- - [4]
- [5]
...
conn:select(space.n, 3, { iterator = 'LT' })
---
- - [2]
- [1]
...
conn:close()
---
- true
...
space:drop()
---
...
box.schema.user.grant('guest', 'read,write,execute', 'universe')
--------------------------------------------------------------------------------
-- Test case for #273: IPROTO_ITERATOR ignored in network protocol
--------------------------------------------------------------------------------
space = box.schema.create_space('tweedledum')
space:create_index('primary', { type = 'tree'})
for i=1,5 do space:insert{i} end
conn = box.net.box.new('127.0.0.1', tonumber(box.cfg.primary_port))
conn:select(space.n, 3, { iterator = 'GE' })
conn:select(space.n, 3, { iterator = 'LE' })
conn:select(space.n, 3, { iterator = 'GT' })
conn:select(space.n, 3, { iterator = 'LT' })
conn:close()
space:drop()
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