diff options
author | unknown <timour@mysql.com> | 2005-02-02 08:38:24 +0200 |
---|---|---|
committer | unknown <timour@mysql.com> | 2005-02-02 08:38:24 +0200 |
commit | 471053592cc23cb56329e735f657fec55f6d6071 (patch) | |
tree | e918a393d7772ab0a299bcc3ea1b6a8756f5ae7f /mysql-test/r/limit.result | |
parent | d9e80b6acdb30f3e99ecd9f9d17e78dcd019318d (diff) | |
download | mariadb-git-471053592cc23cb56329e735f657fec55f6d6071.tar.gz |
Fix for BUG#8023.
Allow LIMIT clause after DUAL.
mysql-test/r/limit.result:
Added test result for BUG#8023.
mysql-test/t/limit.test:
Added test for BUG#8023.
sql/sql_yacc.yy:
Allow the specification of a LIMIT clause after DUAL. This is needed for queries as:
select a from t1 union all select 1 from dual limit 1;
In this query LIMIT is applied to the whole UNION, so it makes sense, however, the
current parser did not allow any clause after DUAL.
Diffstat (limited to 'mysql-test/r/limit.result')
-rw-r--r-- | mysql-test/r/limit.result | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/r/limit.result b/mysql-test/r/limit.result index c82105e6a49..6a3d2bffab0 100644 --- a/mysql-test/r/limit.result +++ b/mysql-test/r/limit.result @@ -67,3 +67,12 @@ SELECT * FROM t1; id id2 3 0 DROP TABLE t1; +create table t1 (a integer); +insert into t1 values (1); +select 1 as a from t1 union all select 1 from dual limit 1; +a +1 +(select 1 as a from t1) union all (select 1 from dual) limit 1; +a +1 +drop table t1; |