Zero limit is treated the same as no limit

Bug #729879 reported by Kostja Osipov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tarantool
Fix Released
High
Kostja Osipov

Bug Description

tarantool> insert into t0 values ('Osipov', 'Konstantin')
Insert OK, 1 row affected
tarantool> insert into t0 values ('Ivanov', 'Konstantin')
Insert OK, 1 row affected
tarantool> insert into t0 values ('Petrov', 'Konstantin')
Insert OK, 1 row affected
tarantool> select * from t0 where k0='Osipov'
Found 1 tuple:
['Osipov', 'Konstantin']
tarantool> select * from t0 where k0='Osipov' limit 0
Found 1 tuple:
['Osipov', 'Konstantin']
tarantool> select * from t0 where k1='Konstantin' limit 0
Found 3 tuples:
['Osipov', 'Konstantin']
['Ivanov', 'Konstantin']
['Petrov', 'Konstantin']
tarantool> select * from t0 where k1='Konstantin' limit 1
Found 1 tuple:
['Osipov', 'Konstantin']

Suggested fix:

Treat limit of 0 as "No tuples", not as "All tuples"

Kostja Osipov (kostja)
Changed in tarantool:
importance: Undecided → High
milestone: none → 1.3.5
Kostja Osipov (kostja)
Changed in tarantool:
status: New → Confirmed
Revision history for this message
Yuriy Nevinitsin (nevinitsin) wrote :

+1

Kostja Osipov (kostja)
Changed in tarantool:
assignee: nobody → Kostja Osipov (kostja)
Kostja Osipov (kostja)
Changed in tarantool:
status: Confirmed → Fix Committed
Kostja Osipov (kostja)
Changed in tarantool:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.