mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
correct assignment of default limit (BUG#2600)
This commit is contained in:
@ -1625,3 +1625,14 @@ PIPPO
|
||||
1
|
||||
NULL
|
||||
DROP TABLE t1, t2;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1), (2), (3);
|
||||
SET SQL_SELECT_LIMIT=1;
|
||||
select sum(a) from (select * from t1) as a;
|
||||
sum(a)
|
||||
6
|
||||
select 2 in (select * from t1);
|
||||
2 in (select * from t1)
|
||||
1
|
||||
SET SQL_SELECT_LIMIT=default;
|
||||
drop table t1;
|
||||
|
@ -1075,3 +1075,14 @@ s.id_cns = cns.id ORDER BY s.anno_dep DESC LIMIT 1) AS PIPPO FROM
|
||||
t2 AS cns;
|
||||
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
#
|
||||
# GLOBAL LIMIT
|
||||
#
|
||||
create table t1 (a int);
|
||||
insert into t1 values (1), (2), (3);
|
||||
SET SQL_SELECT_LIMIT=1;
|
||||
select sum(a) from (select * from t1) as a;
|
||||
select 2 in (select * from t1);
|
||||
SET SQL_SELECT_LIMIT=default;
|
||||
drop table t1;
|
||||
|
Reference in New Issue
Block a user