diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result index 8ad0d8c6589..0745f082993 100644 --- a/mysql-test/r/union.result +++ b/mysql-test/r/union.result @@ -197,3 +197,5 @@ a 11 set SQL_SELECT_LIMIT=DEFAULT; drop table t1,t2; +select * union select 1; +No tables used diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test index c547d25ba9b..f43308f2f55 100644 --- a/mysql-test/t/union.test +++ b/mysql-test/t/union.test @@ -98,3 +98,6 @@ set SQL_SELECT_LIMIT=2; (select * from t1 limit 1) union (select * from t2 limit 3); set SQL_SELECT_LIMIT=DEFAULT; drop table t1,t2; + +--error 1096 +select * union select 1;