summaryrefslogtreecommitdiff
path: root/mysql-test/t/union.test
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-05-05 21:21:41 +0300
committerunknown <bell@sanja.is.com.ua>2004-05-05 21:21:41 +0300
commitf2efdcd8feb96c7a5264a05ce9a8288128647549 (patch)
treedc6fc7f740dabf7da6ce3e21af3673dc04bbd8fd /mysql-test/t/union.test
parent9362f6dfcb0f257333cc34f654458f7c214e180e (diff)
downloadmariadb-git-f2efdcd8feb96c7a5264a05ce9a8288128647549.tar.gz
caching of queries with isammerge tables forbiden using general way
SQL_SELECT_LIMIT as default will be applied only for SELECT statement if there was not explicit LIMIT clause correct table list passed to class constructor of select_update mysql-test/r/subselect.result: do not show limit if it is not explicit mysql-test/r/union.result: test of LIMIT + ORDER mysql-test/t/union.test: test of LIMIT + ORDER sql/ha_isammrg.h: caching of queries with isammerge tables forbiden sql/sql_cache.cc: removed check on isammerge sql/sql_lex.cc: tag of explicit limit in statement sql/sql_lex.h: tag of explicit limit in statement sql/sql_parse.cc: blanks in empty line removed no limit by default (SQL_SELECT_LIMIT as default will be applied only for SELECT statement if there was not explicit LIMIT clause) sql/sql_union.cc: reverted incorrect patch sql/sql_update.cc: reverted incorrect patch correct table list passed to class constructor sql/sql_yacc.yy: explicit LIMIT marked
Diffstat (limited to 'mysql-test/t/union.test')
-rw-r--r--mysql-test/t/union.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index effb0139111..21619534f49 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -504,3 +504,15 @@ select 1 union select 2;
(select 1) union (select 2) union (select 3) limit 2;
set sql_select_limit=default;
+#
+# ORDER with LIMIT
+#
+create table t1 (a int);
+insert into t1 values (100), (1);
+create table t2 (a int);
+insert into t2 values (100);
+select a from t1 union select a from t2 order by a;
+SET SQL_SELECT_LIMIT=1;
+select a from t1 union select a from t2 order by a;
+drop table t1, t2;
+set sql_select_limit=default;