diff options
author | unknown <anozdrin/alik@ibm.> | 2008-01-19 22:32:48 +0300 |
---|---|---|
committer | unknown <anozdrin/alik@ibm.> | 2008-01-19 22:32:48 +0300 |
commit | b9ec8f6aba970ab4ae4da7b8281dd6e520cc941e (patch) | |
tree | e55cc90ad546ff1606eb9c8a3fac816a5662827e /mysql-test | |
parent | 37ff91b3bfdb946743e36ddd13bfda71598f45a8 (diff) | |
parent | bab13c892d75f704cde64df7252620f4680b3722 (diff) | |
download | mariadb-git-b9ec8f6aba970ab4ae4da7b8281dd6e520cc941e.tar.gz |
Merge ibm.:/home/alik/Documents/MySQL/devel/5.1
into ibm.:/home/alik/Documents/MySQL/devel/5.1-rt-merged-5.1
configure.in:
Auto merged
client/mysqldump.c:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/unireg.cc:
Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/parser.result | 20 | ||||
-rw-r--r-- | mysql-test/r/query_cache_debug.result | 24 | ||||
-rw-r--r-- | mysql-test/r/status.result | 21 | ||||
-rw-r--r-- | mysql-test/t/parser.test | 20 | ||||
-rw-r--r-- | mysql-test/t/query_cache.test | 1 | ||||
-rw-r--r-- | mysql-test/t/query_cache_debug.test | 46 | ||||
-rw-r--r-- | mysql-test/t/status.test | 19 |
7 files changed, 150 insertions, 1 deletions
diff --git a/mysql-test/r/parser.result b/mysql-test/r/parser.result index ef53f227ec0..e10bcba36c2 100644 --- a/mysql-test/r/parser.result +++ b/mysql-test/r/parser.result @@ -527,3 +527,23 @@ SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1; a b 3 1998-01-01 00:00:00 DROP TABLE t1; +DROP TABLE IF EXISTS t1,t2,t3; +CREATE TABLE t1 (a1 INT, a2 INT, a3 INT, a4 DATETIME); +CREATE TABLE t2 LIKE t1; +CREATE TABLE t3 LIKE t1; +SELECT t1.* FROM t1 AS t0, { OJ t2 INNER JOIN t1 ON (t1.a1=t2.a1) } WHERE t0.a3=2; +a1 a2 a3 a4 +SELECT t1.*,t2.* FROM { OJ ((t1 INNER JOIN t2 ON (t1.a1=t2.a2)) LEFT OUTER JOIN t3 ON t3.a3=t2.a1)}; +a1 a2 a3 a4 a1 a2 a3 a4 +SELECT t1.*,t2.* FROM { OJ ((t1 LEFT OUTER JOIN t2 ON t1.a3=t2.a2) INNER JOIN t3 ON (t3.a1=t2.a2))}; +a1 a2 a3 a4 a1 a2 a3 a4 +SELECT t1.*,t2.* FROM { OJ (t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a2) CROSS JOIN t3 ON (t3.a2=t2.a3)}; +a1 a2 a3 a4 a1 a2 a3 a4 +SELECT * FROM {oj t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a3} WHERE t1.a2 > 10; +a1 a2 a3 a4 a1 a2 a3 a4 +SELECT {fn CONCAT(a1,a2)} FROM t1; +{fn CONCAT(a1,a2)} +UPDATE t3 SET a4={d '1789-07-14'} WHERE a1=0; +SELECT a1, a4 FROM t2 WHERE a4 LIKE {fn UCASE('1789-07-14')}; +a1 a4 +DROP TABLE t1, t2, t3; diff --git a/mysql-test/r/query_cache_debug.result b/mysql-test/r/query_cache_debug.result new file mode 100644 index 00000000000..f177bfac836 --- /dev/null +++ b/mysql-test/r/query_cache_debug.result @@ -0,0 +1,24 @@ +flush status; +set query_cache_type=DEMAND; +set global query_cache_size= 1024*1024*512; +drop table if exists t1; +create table t1 (a varchar(100)); +insert into t1 values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +Activate debug hook and attempt to retrieve the statement from the cache. +set session debug='+d,wait_in_query_cache_insert'; +select SQL_CACHE * from t1;; +On a second connection; clear the query cache. +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 1 +set global query_cache_size= 0; +Signal the debug hook to release the lock. +select id from information_schema.processlist where state='wait_in_query_cache_insert' into @thread_id; +kill query @thread_id; +Show query cache status. +show status like 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +set global query_cache_size= 0; +use test; +drop table t1; diff --git a/mysql-test/r/status.result b/mysql-test/r/status.result index c95b09597fc..fc78f4ad40f 100644 --- a/mysql-test/r/status.result +++ b/mysql-test/r/status.result @@ -162,3 +162,24 @@ Variable_name Value Com_show_status 8 rnd_diff tmp_table_diff 20 8 +show global status like 'Com%function%'; +Variable_name Value +Com_alter_function 0 +Com_create_function 0 +Com_drop_function 0 +Com_show_function_code 0 +Com_show_function_status 0 +create function f1 (x INTEGER) returns integer +begin +declare ret integer; +set ret = x * 10; +return ret; +end // +drop function f1; +show global status like 'Com%function%'; +Variable_name Value +Com_alter_function 0 +Com_create_function 1 +Com_drop_function 1 +Com_show_function_code 0 +Com_show_function_status 0 diff --git a/mysql-test/t/parser.test b/mysql-test/t/parser.test index 9170308a4f2..800d717cf6b 100644 --- a/mysql-test/t/parser.test +++ b/mysql-test/t/parser.test @@ -657,3 +657,23 @@ CREATE TABLE t1 (a INT, b DATETIME); INSERT INTO t1 VALUES (INTERVAL(3,2,1) + 1, "1997-12-31 23:59:59" + INTERVAL 1 SECOND); SELECT * FROM t1 WHERE a = INTERVAL(3,2,1) + 1; DROP TABLE t1; + +# +# Bug#28317 Left Outer Join with {oj outer-join} +# + +--disable_warnings +DROP TABLE IF EXISTS t1,t2,t3; +--enable_warnings +CREATE TABLE t1 (a1 INT, a2 INT, a3 INT, a4 DATETIME); +CREATE TABLE t2 LIKE t1; +CREATE TABLE t3 LIKE t1; +SELECT t1.* FROM t1 AS t0, { OJ t2 INNER JOIN t1 ON (t1.a1=t2.a1) } WHERE t0.a3=2; +SELECT t1.*,t2.* FROM { OJ ((t1 INNER JOIN t2 ON (t1.a1=t2.a2)) LEFT OUTER JOIN t3 ON t3.a3=t2.a1)}; +SELECT t1.*,t2.* FROM { OJ ((t1 LEFT OUTER JOIN t2 ON t1.a3=t2.a2) INNER JOIN t3 ON (t3.a1=t2.a2))}; +SELECT t1.*,t2.* FROM { OJ (t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a2) CROSS JOIN t3 ON (t3.a2=t2.a3)}; +SELECT * FROM {oj t1 LEFT OUTER JOIN t2 ON t1.a1=t2.a3} WHERE t1.a2 > 10; +SELECT {fn CONCAT(a1,a2)} FROM t1; +UPDATE t3 SET a4={d '1789-07-14'} WHERE a1=0; +SELECT a1, a4 FROM t2 WHERE a4 LIKE {fn UCASE('1789-07-14')}; +DROP TABLE t1, t2, t3; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 9e250372d51..771a32e8cd7 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -1316,6 +1316,5 @@ SELECT 1 FROM t1 GROUP BY (SELECT LAST_INSERT_ID() FROM t1 ORDER BY MIN(a) ASC LIMIT 1); DROP TABLE t1; - --echo End of 5.1 tests diff --git a/mysql-test/t/query_cache_debug.test b/mysql-test/t/query_cache_debug.test new file mode 100644 index 00000000000..b741eea0b29 --- /dev/null +++ b/mysql-test/t/query_cache_debug.test @@ -0,0 +1,46 @@ +--source include/not_embedded.inc +--source include/have_query_cache.inc +--source include/have_debug.inc + +# +# Bug #30887 Server crashes on SET GLOBAL query_cache_size=0 +# +flush status; +set query_cache_type=DEMAND; +set global query_cache_size= 1024*1024*512; +--disable_warnings +drop table if exists t1; +--enable_warnings +create table t1 (a varchar(100)); +insert into t1 values ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'),('bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'); +connect (bug30887con1, localhost, root, ,test); +connect (bug30887con2, localhost, root, ,test); + +connection bug30887con1; +--echo Activate debug hook and attempt to retrieve the statement from the cache. +set session debug='+d,wait_in_query_cache_insert'; +--send select SQL_CACHE * from t1; + +connection default; +let $wait_condition= select count(*)= 1 from information_schema.processlist where state= 'wait_in_query_cache_insert'; +--source include/wait_condition.inc + +connection bug30887con2; +--echo On a second connection; clear the query cache. +show status like 'Qcache_queries_in_cache'; +set global query_cache_size= 0; + +connection default; +--echo Signal the debug hook to release the lock. +select id from information_schema.processlist where state='wait_in_query_cache_insert' into @thread_id; +kill query @thread_id; + +--echo Show query cache status. +show status like 'Qcache_queries_in_cache'; + +disconnect bug30887con1; +disconnect bug30887con2; +set global query_cache_size= 0; +use test; +drop table t1; + diff --git a/mysql-test/t/status.test b/mysql-test/t/status.test index 6a11791924a..25bf2a6ee61 100644 --- a/mysql-test/t/status.test +++ b/mysql-test/t/status.test @@ -242,4 +242,23 @@ let $tmp_table2 = `show global status like 'Created_tmp_tables'`; eval select substring_index('$rnd_next2',0x9,-1)-substring_index('$rnd_next',0x9,-1) as rnd_diff, substring_index('$tmp_table2',0x9,-1)-substring_index('$tmp_table',0x9,-1) as tmp_table_diff; --enable_query_log +# +# Bug#30252 Com_create_function is not incremented. +# +show global status like 'Com%function%'; + +DELIMITER //; +create function f1 (x INTEGER) returns integer + begin + declare ret integer; + set ret = x * 10; + return ret; + end // +DELIMITER ;// + +drop function f1; + +show global status like 'Com%function%'; + + # End of 5.1 tests |