diff options
author | unknown <bell@sanja.is.com.ua> | 2004-02-04 15:26:41 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-02-04 15:26:41 +0200 |
commit | fc248069e95958de6a8e3e2e3ebd31d523ec945e (patch) | |
tree | b2aabd3ef50274e4b7d230f304fbd12c7c3130e5 /mysql-test/t/subselect.test | |
parent | 7f6f30284e8834985884578dc723582e1e266aea (diff) | |
download | mariadb-git-fc248069e95958de6a8e3e2e3ebd31d523ec945e.tar.gz |
correct assignment of default limit (BUG#2600)
mysql-test/r/subselect.result:
test of global limit and subqueries
mysql-test/t/subselect.test:
test of global limit and subqueries
sql/sql_lex.cc:
correct detection of non-default limits
sql/sql_parse.cc:
correct assignment of default limit
sql/sql_yacc.yy:
correct assignment of default limit
Diffstat (limited to 'mysql-test/t/subselect.test')
-rw-r--r-- | mysql-test/t/subselect.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index c4392186055..e4ecddc447f 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -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; |