summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorTimothy Smith <timothy.smith@sun.com>2009-01-16 17:33:24 +0100
committerTimothy Smith <timothy.smith@sun.com>2009-01-16 17:33:24 +0100
commit33ff35305d7b24bb629fad2a06e0984f532c6447 (patch)
tree8368002f8b2c172c50ca50455fe2b0dc5457aba9 /mysql-test/r
parent57a083d5b1e7c27ef2442e332dcd36d1e03f67a2 (diff)
parent4d8e73c8186e13d2136d15716cfeaedc55965e05 (diff)
downloadmariadb-git-33ff35305d7b24bb629fad2a06e0984f532c6447.tar.gz
Auto-merge from upstream 5.1-bugteam
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/cache_innodb.result12
-rw-r--r--mysql-test/r/change_user.result7
-rw-r--r--mysql-test/r/greedy_optimizer.result77
-rw-r--r--mysql-test/r/having.result7
-rw-r--r--mysql-test/r/mysqlcheck.result2
-rw-r--r--mysql-test/r/not_embedded_server.result7
-rw-r--r--mysql-test/r/query_cache.result51
7 files changed, 149 insertions, 14 deletions
diff --git a/mysql-test/r/cache_innodb.result b/mysql-test/r/cache_innodb.result
index 17cfcd69ec3..a6b86d8d82a 100644
--- a/mysql-test/r/cache_innodb.result
+++ b/mysql-test/r/cache_innodb.result
@@ -67,10 +67,10 @@ a
2
show status like "Qcache_queries_in_cache";
Variable_name Value
-Qcache_queries_in_cache 3
+Qcache_queries_in_cache 6
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 3
+Qcache_hits 0
insert into t1 values (3);
insert into t2 values (3);
insert into t1 values (4);
@@ -91,14 +91,14 @@ a
2
show status like "Qcache_queries_in_cache";
Variable_name Value
-Qcache_queries_in_cache 1
+Qcache_queries_in_cache 2
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 4
+Qcache_hits 1
commit;
show status like "Qcache_queries_in_cache";
Variable_name Value
-Qcache_queries_in_cache 1
+Qcache_queries_in_cache 2
drop table t3,t2,t1;
CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id));
select count(*) from t1;
@@ -217,5 +217,5 @@ Variable_name Value
Qcache_queries_in_cache 1
show status like "Qcache_hits";
Variable_name Value
-Qcache_hits 2
+Qcache_hits 1
drop table t2;
diff --git a/mysql-test/r/change_user.result b/mysql-test/r/change_user.result
index a075c01fe61..70da464a612 100644
--- a/mysql-test/r/change_user.result
+++ b/mysql-test/r/change_user.result
@@ -44,3 +44,10 @@ IS_FREE_LOCK('bug31418')
SELECT IS_USED_LOCK('bug31418');
IS_USED_LOCK('bug31418')
NULL
+FLUSH STATUS;
+SHOW GLOBAL STATUS LIKE 'com_select';
+Variable_name Value
+Com_select 112
+SHOW GLOBAL STATUS LIKE 'com_select';
+Variable_name Value
+Com_select 112
diff --git a/mysql-test/r/greedy_optimizer.result b/mysql-test/r/greedy_optimizer.result
index 9e8c66722e3..c0012c297d1 100644
--- a/mysql-test/r/greedy_optimizer.result
+++ b/mysql-test/r/greedy_optimizer.result
@@ -655,3 +655,80 @@ show status like 'Last_query_cost';
Variable_name Value
Last_query_cost 794.837037
drop table t1,t2,t3,t4,t5,t6,t7;
+CREATE TABLE t1 (a int, b int, d int, i int);
+INSERT INTO t1 VALUES (1,1,1,1);
+CREATE TABLE t2 (b int, c int, j int);
+INSERT INTO t2 VALUES (1,1,1);
+CREATE TABLE t2_1 (j int);
+INSERT INTO t2_1 VALUES (1);
+CREATE TABLE t3 (c int, f int);
+INSERT INTO t3 VALUES (1,1);
+CREATE TABLE t3_1 (f int);
+INSERT INTO t3_1 VALUES (1);
+CREATE TABLE t4 (d int, e int, k int);
+INSERT INTO t4 VALUES (1,1,1);
+CREATE TABLE t4_1 (k int);
+INSERT INTO t4_1 VALUES (1);
+CREATE TABLE t5 (g int, d int, h int, l int);
+INSERT INTO t5 VALUES (1,1,1,1);
+CREATE TABLE t5_1 (l int);
+INSERT INTO t5_1 VALUES (1);
+SET optimizer_search_depth = 3;
+SELECT 1
+FROM t1
+LEFT JOIN (
+t2 JOIN t3 ON t3.c = t2.c
+) ON t2.b = t1.b
+LEFT JOIN (
+t4 JOIN t5 ON t5.d = t4.d
+) ON t4.d = t1.d
+;
+1
+1
+SELECT 1
+FROM t1
+LEFT JOIN (
+t2 LEFT JOIN (t3 JOIN t3_1 ON t3.f = t3_1.f) ON t3.c = t2.c
+) ON t2.b = t1.b
+LEFT JOIN (
+t4 JOIN t5 ON t5.d = t4.d
+) ON t4.d = t1.d
+;
+1
+1
+SELECT 1
+FROM t1
+LEFT JOIN (
+(t2 JOIN t2_1 ON t2.j = t2_1.j) JOIN t3 ON t3.c = t2.c
+) ON t2.b = t1.b
+LEFT JOIN (
+t4 JOIN t5 ON t5.d = t4.d
+) ON t4.d = t1.d
+;
+1
+1
+SELECT 1
+FROM t1
+LEFT JOIN (
+t2 JOIN t3 ON t3.c = t2.c
+) ON t2.b = t1.b
+LEFT JOIN (
+(t4 JOIN t4_1 ON t4.k = t4_1.k) LEFT JOIN t5 ON t5.d = t4.d
+) ON t4.d = t1.d
+;
+1
+1
+SELECT 1
+FROM t1
+LEFT JOIN (
+t2 JOIN t3 ON t3.c = t2.c
+) ON t2.b = t1.b
+LEFT JOIN (
+t4 LEFT JOIN (t5 JOIN t5_1 ON t5.l = t5_1.l) ON t5.d = t4.d
+) ON t4.d = t1.d
+;
+1
+1
+SET optimizer_search_depth = DEFAULT;
+DROP TABLE t1,t2,t2_1,t3,t3_1,t4,t4_1,t5,t5_1;
+End of 5.0 tests
diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result
index a5a96fd4958..9c3cc8fc89e 100644
--- a/mysql-test/r/having.result
+++ b/mysql-test/r/having.result
@@ -424,3 +424,10 @@ select f1 from t1 group by f1 having max(f1)=f1;
f1
set session sql_mode='';
drop table t1;
+CREATE TABLE t1 ( a INT, b INT);
+INSERT INTO t1 VALUES (1, 1), (2,2), (3, NULL);
+SELECT b, COUNT(DISTINCT a) FROM t1 GROUP BY b HAVING b is NULL;
+b COUNT(DISTINCT a)
+NULL 1
+DROP TABLE t1;
+End of 5.0 tests
diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result
index 313cba51ec9..2febfcf7eb4 100644
--- a/mysql-test/r/mysqlcheck.result
+++ b/mysql-test/r/mysqlcheck.result
@@ -146,7 +146,7 @@ CREATE TABLE `я` (a INT);
SET NAMES DEFAULT;
mysqlcheck --default-character-set="latin1" --databases test
test.?
-Error : Table 'test.?' doesn't exist
+Error : Table doesn't exist
error : Corrupt
mysqlcheck --default-character-set="utf8" --databases test
test.я OK
diff --git a/mysql-test/r/not_embedded_server.result b/mysql-test/r/not_embedded_server.result
index 1b734136e6c..f2ffe28895d 100644
--- a/mysql-test/r/not_embedded_server.result
+++ b/mysql-test/r/not_embedded_server.result
@@ -3,10 +3,3 @@ execute stmt1;
ID USER HOST DB COMMAND TIME STATE INFO
number root localhost test Query time executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!='Daemon'
deallocate prepare stmt1;
-FLUSH STATUS;
-SHOW GLOBAL STATUS LIKE 'com_select';
-Variable_name Value
-Com_select 102
-SHOW GLOBAL STATUS LIKE 'com_select';
-Variable_name Value
-Com_select 102
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 3c8ff8faddc..0368fffa7c4 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -1656,6 +1656,57 @@ Qcache_hits 1
DROP TABLE t1;
SET GLOBAL concurrent_insert= @save_concurrent_insert;
SET GLOBAL query_cache_size= default;
+DROP TABLE IF EXISTS t1;
+FLUSH STATUS;
+SET GLOBAL query_cache_size=1048576;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
+SHOW STATUS LIKE 'Qcache_queries_in_cache';
+Variable_name Value
+Qcache_queries_in_cache 0
+SELECT * FROM t1;
+a
+1
+2
+3
+4
+5
+BEGIN;
+SELECT * FROM t1;
+a
+1
+2
+3
+4
+5
+COMMIT;
+SHOW STATUS LIKE 'Qcache_queries_in_cache';
+Variable_name Value
+Qcache_queries_in_cache 2
+SHOW STATUS LIKE "Qcache_hits";
+Variable_name Value
+Qcache_hits 0
+SELECT * FROM t1;
+a
+1
+2
+3
+4
+5
+BEGIN;
+SELECT * FROM t1;
+a
+1
+2
+3
+4
+5
+COMMIT;
+SHOW STATUS LIKE "Qcache_hits";
+Variable_name Value
+Qcache_hits 2
+DROP TABLE t1;
+SET GLOBAL query_cache_size= default;
End of 5.0 tests
CREATE TABLE t1 (a ENUM('rainbow'));
INSERT INTO t1 VALUES (),(),(),(),();