summaryrefslogtreecommitdiff
path: root/mysql-test/t/select.test
diff options
context:
space:
mode:
authormonty@mashka.mysql.fi <>2002-09-03 15:44:25 +0300
committermonty@mashka.mysql.fi <>2002-09-03 15:44:25 +0300
commita01a0840dcb9fb7622e2c994ead985174df8daab (patch)
tree14062338992e5b5bda3d4e4cc498b6dd65a5a9c0 /mysql-test/t/select.test
parenta5f9e95a932fb08d8998de2a49b7fc7b5c734b95 (diff)
downloadmariadb-git-a01a0840dcb9fb7622e2c994ead985174df8daab.tar.gz
Some trivial optimzations
Check if AND/OR expression can be NULL; Fixed bug in GROUP BY and-or-expression where expression could be NULL Bug fix for SHOW OPEN TABLES when user didn't have privilege to access all open tables. Better fix for ALTER TABLE on BDB tables.
Diffstat (limited to 'mysql-test/t/select.test')
-rw-r--r--mysql-test/t/select.test16
1 files changed, 12 insertions, 4 deletions
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 4dd833616d5..94806d44e37 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -1405,9 +1405,9 @@ drop table tmp;
# big table done
-SET OPTION SQL_BIG_TABLES=1;
+SET SQL_BIG_TABLES=1;
select distinct concat(fld3," ",fld3) as namn from t2,t3 where t2.fld1=t3.t2nr order by namn limit 10;
-SET OPTION SQL_BIG_TABLES=0;
+SET SQL_BIG_TABLES=0;
select distinct concat(fld3," ",fld3) from t2,t3 where t2.fld1=t3.t2nr order by fld3 limit 10;
select distinct fld5 from t2 limit 10;
@@ -1416,9 +1416,9 @@ select distinct fld5 from t2 limit 10;
#
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
-SET OPTION SQL_BIG_TABLES=1; # Force use of MyISAM
+SET SQL_BIG_TABLES=1; # Force use of MyISAM
select distinct fld3,count(*) from t2 group by companynr,fld3 limit 10;
-SET OPTION SQL_BIG_TABLES=0;
+SET SQL_BIG_TABLES=0;
select distinct fld3,repeat("a",length(fld3)),count(*) from t2 group by companynr,fld3 limit 100,10;
#
@@ -1440,6 +1440,14 @@ select distinct fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr orde
explain select t3.t2nr,fld3 from t2,t3 where t2.companynr = 34 and t2.fld1=t3.t2nr order by t3.t2nr,fld3;
#
+# Some test with ORDER BY and limit
+#
+
+explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period;
+explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
+explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
+
+#
# Search with a constant table.
#