diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-08-29 11:38:05 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-08-29 11:38:05 +0300 |
commit | 79e87471699778216740757064dda0347cc4291a (patch) | |
tree | 87130297b087a6c09815e8dc71083b38a4996d56 /mysql-test/t/status.test | |
parent | 53daf2e6740de9bab93674511474e71cb69bcc8d (diff) | |
parent | 310afbd4a96baeedc7202a3b2cac7860c76d83e2 (diff) | |
download | mariadb-git-79e87471699778216740757064dda0347cc4291a.tar.gz |
Merge magare.gmz:/home/kgeorge/mysql/work/B30377-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B30377-5.1-opt
mysql-test/t/status.test:
Auto merged
mysql-test/r/status.result:
merge 5.0->5.1 of the fix for bug 30377
sql/sql_lex.h:
merge 5.0->5.1 of the fix for bug 30377
sql/sql_select.cc:
merge 5.0->5.1 of the fix for bug 30377
Diffstat (limited to 'mysql-test/t/status.test')
-rw-r--r-- | mysql-test/t/status.test | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 7fd995e70c7..1cd5aa1726a 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -186,6 +186,38 @@ disconnect con3; disconnect con2; disconnect con1; + +# +# Bug #30377: EXPLAIN loses last_query_cost when used with UNION +# + +CREATE TABLE t1 ( a INT ); +INSERT INTO t1 VALUES (1), (2); + +SELECT a FROM t1 LIMIT 1; +SHOW SESSION STATUS LIKE 'Last_query_cost'; + +EXPLAIN SELECT a FROM t1; +SHOW SESSION STATUS LIKE 'Last_query_cost'; + +SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a; +SHOW SESSION STATUS LIKE 'Last_query_cost'; + +EXPLAIN SELECT a FROM t1 UNION SELECT a FROM t1 ORDER BY a; +SHOW SESSION STATUS LIKE 'Last_query_cost'; + +SELECT a IN (SELECT a FROM t1) FROM t1 LIMIT 1; +SHOW SESSION STATUS LIKE 'Last_query_cost'; + +SELECT (SELECT a FROM t1 LIMIT 1) x FROM t1 LIMIT 1; +SHOW SESSION STATUS LIKE 'Last_query_cost'; + +SELECT * FROM t1 a, t1 b LIMIT 1; +SHOW SESSION STATUS LIKE 'Last_query_cost'; + +DROP TABLE t1; + + # End of 5.0 tests # |