summaryrefslogtreecommitdiff
path: root/mysql-test/r/wait_timeout_func.result
diff options
context:
space:
mode:
authorJoerg Bruehe <joerg@mysql.com>2008-12-10 21:14:50 +0100
committerJoerg Bruehe <joerg@mysql.com>2008-12-10 21:14:50 +0100
commit2181c959183262b6b7f64c67b12f2715d8528572 (patch)
tree0808625d28751a07f6894b2bffcf47fcf1e71fbf /mysql-test/r/wait_timeout_func.result
parent96e0bf50d942258722b25e9d17d209d40eaacd28 (diff)
parentba816c14a9bc8012759da9d58f858f1e73bec708 (diff)
downloadmariadb-git-2181c959183262b6b7f64c67b12f2715d8528572.tar.gz
Merge main 5.1 into 5.1-build
Diffstat (limited to 'mysql-test/r/wait_timeout_func.result')
-rw-r--r--mysql-test/r/wait_timeout_func.result58
1 files changed, 30 insertions, 28 deletions
diff --git a/mysql-test/r/wait_timeout_func.result b/mysql-test/r/wait_timeout_func.result
index 35fe10a1889..01b4a71df87 100644
--- a/mysql-test/r/wait_timeout_func.result
+++ b/mysql-test/r/wait_timeout_func.result
@@ -1,30 +1,32 @@
-drop table if exists t1;
-## Creating new table t1 ##
-CREATE TABLE t1
-(
-id INT NOT NULL auto_increment,
-PRIMARY KEY (id),
-name VARCHAR(30)
-);
+SET @start_value= @@global.wait_timeout;
'#--------------------FN_DYNVARS_186_01-------------------------#'
-## Creating new connection test_con1 ##
-## Setting value of variable to 5 ##
-SET @@session.wait_timeout = 5;
-## Inserting record in table t1 ##
-INSERT into t1(name) values('Record_1');
-## Using sleep to check timeout ##
-'#--------------------FN_DYNVARS_186_02-------------------------#'
-## Setting value of variable ##
-SET @@global.wait_timeout = 5;
-## Creating new connection test_con2 ##
-INSERT into t1(name) values('Record_2');
-## Using sleep to check timeout ##
+SET @start_time= UNIX_TIMESTAMP();
+connect (test_con1, localhost, root,,);
+SELECT @@session.wait_timeout = @@global.wait_timeout AS 'Expect 1';
+Expect 1
+1
+SET @@session.wait_timeout = <session_value>;
+connect (test_con2, localhost, root,,);
+SET @@session.wait_timeout = <session_value> - 1;
+connection default;
+wait until connections ready
+SELECT info FROM information_schema.processlist;
+info
+SELECT info FROM information_schema.processlist
'#--------------------FN_DYNVARS_186_03-------------------------#'
-## Setting value of variable to 1 ##
-SET @@global.wait_timeout = 1;
-## Creating new connection ##
-INSERT into t1(name) values('Record_3');
-## Using sleep to check timeout ##
-## We cannot test it further because the server stops due to wait_timeout ##
-SELECT * from t1;
-ERROR HY000: MySQL server has gone away
+SET @@global.wait_timeout= <global_value>;
+SELECT @@session.wait_timeout = @start_value AS 'Expect 1';
+Expect 1
+1
+connect (test_con3, localhost, root,,);
+SELECT @@session.wait_timeout = @@global.wait_timeout AS 'Expect 1';
+Expect 1
+1
+connection default;
+SELECT info FROM information_schema.processlist;
+info
+SELECT info FROM information_schema.processlist
+SELECT UNIX_TIMESTAMP() - @start_time >= <global_value> + <session_value>;;
+UNIX_TIMESTAMP() - @start_time >= <global_value> + <session_value>;
+1
+SET @@global.wait_timeout= @start_value;