From f2a610e1e072f3b50709be3f419ea3ac1d7a3aa5 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 14 Nov 2008 02:01:41 +0100 Subject: [PATCH 1/7] Bug #20430 mysqld.exe windows service stuck in "SERVICE_STOP_PENDING" status The problem appears to be a race condition, when service is being stopped right after startup. We set the service status to SERVICE_RUNNING way too early it cannot yet handle stop requests - initialization has not finished and hEventShutdown that signals server to stop is not yet created. If somebody issues "net stop MySQL" at this time, MySQL is not informed about the stop and continues to run as usual, while NTService::ServiceMain() stucks forever waiting for mysql's "main" thread to finish. Solution is to remain in SERVICE_START_PENDING status until after server initialization is fully complete and only then change the status to SERVICE_RUNNING. In SERVICE_START_PENDING we do not accept service control requests, i.e it is not possible to stop service in that time. sql/mysqld.cc: Set service status to running after all initialization is complete sql/nt_servc.cc: New method SetRunning() to be called by application to set service status to SERVICE_RUNNING when apllication has finished initialization. sql/nt_servc.h: New method SetRunning() to be called by application when initialization completes --- sql/mysqld.cc | 3 +++ sql/nt_servc.cc | 12 ++++++++---- sql/nt_servc.h | 14 +++++++++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c3e5449b22b..ba6c8c6169f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3840,6 +3840,9 @@ we force server id to 2, but this MySQL server will not act as a slave."); : mysqld_unix_port), mysqld_port, MYSQL_COMPILATION_COMMENT); +#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY) + Service.SetRunning(); +#endif #if defined(__NT__) || defined(HAVE_SMEM) handle_connections_methods(); diff --git a/sql/nt_servc.cc b/sql/nt_servc.cc index a04f284a3de..e570898f373 100644 --- a/sql/nt_servc.cc +++ b/sql/nt_servc.cc @@ -245,10 +245,6 @@ void NTService::ServiceMain(DWORD argc, LPTSTR *argv) if (!pService->StartService()) goto error; - // Check that the service is now running. - if (!pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0)) - goto error; - // wait for exit event WaitForSingleObject (pService->hExitEvent, INFINITE); @@ -264,6 +260,14 @@ error: return; } + +void NTService::SetRunning() +{ + if (pService) + pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0); +} + + /* ------------------------------------------------------------------------ StartService() - starts the appliaction thread -------------------------------------------------------------------------- */ diff --git a/sql/nt_servc.h b/sql/nt_servc.h index a3c12569114..9b689e434e1 100644 --- a/sql/nt_servc.h +++ b/sql/nt_servc.h @@ -56,7 +56,19 @@ class NTService BOOL IsService(LPCSTR ServiceName); BOOL got_service_option(char **argv, char *service_option); BOOL is_super_user(); - void Stop(void); //to be called from app. to stop service + + /* + SetRunning() is to be called by the application + when initialization completes and it can accept + stop request + */ + void SetRunning(void); + + /* + Stop() is to be called by the application to stop + the service + */ + void Stop(void); protected: LPSTR ServiceName; From 09ac30f679146ac874acfeaac7f790fe21946f6d Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Wed, 19 Nov 2008 16:02:38 +0100 Subject: [PATCH 2/7] Bug#39494 : key_buffer_size > 4GB does not work on 64 bit Windows Cache size is truncated via 32bit ulong in ha_init_key_cache() and ha_resize_key_cache() This change fixes the cast to size_t instead of ulong. This cast is safe, because key_buffer_size parameter is limited to SIZE_T_MAX --- sql/handler.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/handler.cc b/sql/handler.cc index 6d5c0c93f75..47c2ff40119 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -3627,7 +3627,7 @@ int ha_init_key_cache(const char *name, KEY_CACHE *key_cache) if (!key_cache->key_cache_inited) { pthread_mutex_lock(&LOCK_global_system_variables); - ulong tmp_buff_size= (ulong) key_cache->param_buff_size; + size_t tmp_buff_size= (size_t) key_cache->param_buff_size; uint tmp_block_size= (uint) key_cache->param_block_size; uint division_limit= key_cache->param_division_limit; uint age_threshold= key_cache->param_age_threshold; @@ -3651,7 +3651,7 @@ int ha_resize_key_cache(KEY_CACHE *key_cache) if (key_cache->key_cache_inited) { pthread_mutex_lock(&LOCK_global_system_variables); - long tmp_buff_size= (long) key_cache->param_buff_size; + size_t tmp_buff_size= (size_t) key_cache->param_buff_size; long tmp_block_size= (long) key_cache->param_block_size; uint division_limit= key_cache->param_division_limit; uint age_threshold= key_cache->param_age_threshold; From 39efef853ba172b07c3df3869e98d4b894192acc Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin Date: Fri, 21 Nov 2008 13:48:22 +0400 Subject: [PATCH 3/7] Fix for bug#36772: When using UTF8, CONVERT with GROUP BY returns truncated results Problem: performig conversion from {INT, DECIMAL, REAL} to CHAR we incorrectly set its max length in some cases that may lead to truncated results returned. Fix: properly set CONVERT({INT, DECIMAL, REAL}, CHAR) result's max length. mysql-test/r/ctype_utf8.result: Fix for bug#36772: When using UTF8, CONVERT with GROUP BY returns truncated results - test result. mysql-test/t/ctype_utf8.test: Fix for bug#36772: When using UTF8, CONVERT with GROUP BY returns truncated results - test case. sql/item_timefunc.cc: Fix for bug#36772: When using UTF8, CONVERT with GROUP BY returns truncated results - calculating Item_char_typecast::max_length use initial argument's charset mbmaxlen instead of from_cs->mbmaxlen, as from_cs may differ in some case (see comment above). --- mysql-test/r/ctype_utf8.result | 32 ++++++++++++++++++++++++++++++++ mysql-test/t/ctype_utf8.test | 17 +++++++++++++++++ sql/item_timefunc.cc | 13 ++++++++----- 3 files changed, 57 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result index 5ca1d578d2a..a4d7ca2558f 100644 --- a/mysql-test/r/ctype_utf8.result +++ b/mysql-test/r/ctype_utf8.result @@ -1813,3 +1813,35 @@ select hex(_utf8 B'001111111111'); ERROR HY000: Invalid utf8 character string: 'FF' select (_utf8 X'616263FF'); ERROR HY000: Invalid utf8 character string: 'FF' +CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL); +INSERT INTO t1 VALUES (70000, 1092), (70001, 1085), (70002, 1065); +SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; +CONVERT(a, CHAR) CONVERT(b, CHAR) +70002 1065 +70001 1085 +70000 1092 +SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1; +CONVERT(a, CHAR) CONVERT(b, CHAR) +70000 1092 +70001 1085 +70002 1065 +ALTER TABLE t1 ADD UNIQUE (b); +SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; +CONVERT(a, CHAR) CONVERT(b, CHAR) +70002 1065 +70001 1085 +70000 1092 +DROP INDEX b ON t1; +SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; +CONVERT(a, CHAR) CONVERT(b, CHAR) +70002 1065 +70001 1085 +70000 1092 +ALTER TABLE t1 ADD INDEX (b); +SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) from t1 GROUP BY b; +CONVERT(a, CHAR) CONVERT(b, CHAR) +70002 1065 +70001 1085 +70000 1092 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test index d184200ad5a..5111660bcbe 100644 --- a/mysql-test/t/ctype_utf8.test +++ b/mysql-test/t/ctype_utf8.test @@ -1437,3 +1437,20 @@ select hex(_utf8 X'616263FF'); select hex(_utf8 B'001111111111'); --error ER_INVALID_CHARACTER_STRING select (_utf8 X'616263FF'); + +# +# Bug #36772: When using UTF8, CONVERT with GROUP BY returns truncated results +# +CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL); +INSERT INTO t1 VALUES (70000, 1092), (70001, 1085), (70002, 1065); +SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; +SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1; +ALTER TABLE t1 ADD UNIQUE (b); +SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; +DROP INDEX b ON t1; +SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b; +ALTER TABLE t1 ADD INDEX (b); +SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) from t1 GROUP BY b; +DROP TABLE t1; + +--echo End of 5.0 tests diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index 0cb3c963dad..e9e92952908 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2550,6 +2550,8 @@ void Item_char_typecast::fix_length_and_dec() and thus avoid unnecessary character set conversion. - If the argument is not a number, then from_cs is set to the argument's charset. + + Note (TODO): we could use repertoire technique here. */ from_cs= (args[0]->result_type() == INT_RESULT || args[0]->result_type() == DECIMAL_RESULT || @@ -2557,12 +2559,13 @@ void Item_char_typecast::fix_length_and_dec() (cast_cs->mbminlen == 1 ? cast_cs : &my_charset_latin1) : args[0]->collation.collation; charset_conversion= (cast_cs->mbmaxlen > 1) || - !my_charset_same(from_cs, cast_cs) && - from_cs != &my_charset_bin && - cast_cs != &my_charset_bin; + (!my_charset_same(from_cs, cast_cs) && + from_cs != &my_charset_bin && + cast_cs != &my_charset_bin); collation.set(cast_cs, DERIVATION_IMPLICIT); - char_length= (cast_length >= 0) ? cast_length : - args[0]->max_length/from_cs->mbmaxlen; + char_length= (cast_length >= 0) ? + cast_length : + args[0]->max_length / args[0]->collation.collation->mbmaxlen; max_length= char_length * cast_cs->mbmaxlen; } From ff5685d701f29d2d8eb0d00dcaa4b63b9bbdeb67 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 21 Nov 2008 11:15:26 +0100 Subject: [PATCH 4/7] Fix broken link in embedded server (Windows) --- libmysqld/libmysqld.def | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libmysqld/libmysqld.def b/libmysqld/libmysqld.def index 431c0efdaa0..865475cb56c 100644 --- a/libmysqld/libmysqld.def +++ b/libmysqld/libmysqld.def @@ -17,7 +17,7 @@ EXPORTS dynstr_append_mem init_dynamic_string dynstr_free - hash_free + my_hash_free my_vsnprintf dynstr_append my_close @@ -31,7 +31,7 @@ EXPORTS fn_format dirname_part my_hash_insert - hash_search + my_hash_search test_if_hard_path my_copy my_mkdir @@ -54,7 +54,7 @@ EXPORTS my_thread_stack_size my_safe_print_str my_stat - _hash_init + _my_hash_init pthread_attr_setstacksize pthread_attr_init my_dirend From bd6376f1d17240956c1b1f243aaadde2611fcb56 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov Date: Fri, 21 Nov 2008 16:39:59 +0400 Subject: [PATCH 5/7] Bug#34760 Character set autodetection appears to fail the problem is the same as reported in bug#20835, so the fix is backport of bug#20835 patch. mysql-test/r/subselect.result: test result mysql-test/t/subselect.test: test case --- mysql-test/r/subselect.result | 15 +++++++++++++++ mysql-test/t/subselect.test | 19 ++++++++++++++++++- sql/item_cmpfunc.cc | 3 ++- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result index c5bae840214..6eeb652e3c1 100644 --- a/mysql-test/r/subselect.result +++ b/mysql-test/r/subselect.result @@ -4407,4 +4407,19 @@ pk a 3 30 2 20 DROP TABLE t1,t2; +CREATE TABLE t1 (s1 char(1)); +INSERT INTO t1 VALUES ('a'); +SELECT * FROM t1 WHERE _utf8'a' = ANY (SELECT s1 FROM t1); +s1 +a +DROP TABLE t1; +CREATE TABLE t1(id BIGINT); +CREATE TABLE t2(id1 BIGINT, id2 BIGINT); +INSERT INTO t1 VALUES (1),(2),(3); +INSERT INTO t2 VALUES (2,1),(3,1); +SELECT * FROM t1 i WHERE 1 IN (SELECT l.id2 FROM t2 l WHERE i.id=l.id1); +id +2 +3 +DROP TABLE t1, t2; End of 5.0 tests. diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test index 2dfad2c58dd..d28e31fb545 100644 --- a/mysql-test/t/subselect.test +++ b/mysql-test/t/subselect.test @@ -3307,5 +3307,22 @@ SELECT * FROM t1 WHERE EXISTS (SELECT DISTINCT a FROM t2 WHERE t1.a < t2.a ORDER BY b); DROP TABLE t1,t2; ---echo End of 5.0 tests. +# +# Bug#20835 (literal string with =any values) +# +CREATE TABLE t1 (s1 char(1)); +INSERT INTO t1 VALUES ('a'); +SELECT * FROM t1 WHERE _utf8'a' = ANY (SELECT s1 FROM t1); +DROP TABLE t1; +# +# Bug#40519 Subselect query using bigint fails +# +CREATE TABLE t1(id BIGINT); +CREATE TABLE t2(id1 BIGINT, id2 BIGINT); +INSERT INTO t1 VALUES (1),(2),(3); +INSERT INTO t2 VALUES (2,1),(3,1); +SELECT * FROM t1 i WHERE 1 IN (SELECT l.id2 FROM t2 l WHERE i.id=l.id1); +DROP TABLE t1, t2; + +--echo End of 5.0 tests. diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 0410c781590..4bfae376acc 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1434,7 +1434,8 @@ bool Item_in_optimizer::fix_left(THD *thd, Item **ref) } not_null_tables_cache= args[0]->not_null_tables(); with_sum_func= args[0]->with_sum_func; - const_item_cache= args[0]->const_item(); + if ((const_item_cache= args[0]->const_item())) + cache->store(args[0]); return 0; } From 3f2044cd6ea79467335720744db7e2d9b575896e Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Fri, 21 Nov 2008 18:15:11 +0400 Subject: [PATCH 6/7] warning of notused function fixed --- sql/mysqld.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 6db372c15e2..1ceabadc860 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7351,6 +7351,7 @@ SHOW_VAR status_vars[]= { {NullS, NullS, SHOW_LONG} }; +#ifndef EMBEDDED_LIBRARY static void print_version(void) { set_server_version(); @@ -7362,7 +7363,6 @@ static void print_version(void) server_version,SYSTEM_TYPE,MACHINE_TYPE, MYSQL_COMPILATION_COMMENT); } -#ifndef EMBEDDED_LIBRARY static void usage(void) { if (!(default_charset_info= get_charset_by_csname(default_character_set_name, From caf290203f5fdd15a046f1361dcf725ac6253fc4 Mon Sep 17 00:00:00 2001 From: Horst Hunger Date: Fri, 21 Nov 2008 15:36:13 +0100 Subject: [PATCH 7/7] Fix for bug#36873 containing the review results. --- mysql-test/r/wait_timeout_func.result | 58 ++++++++------- mysql-test/t/wait_timeout_func.test | 102 ++++++++++++-------------- 2 files changed, 78 insertions(+), 82 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 = ; +connect (test_con2, localhost, root,,); +SET @@session.wait_timeout = - 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= ; +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 >= + ;; +UNIX_TIMESTAMP() - @start_time >= + ; +1 +SET @@global.wait_timeout= @start_value; diff --git a/mysql-test/t/wait_timeout_func.test b/mysql-test/t/wait_timeout_func.test index e825b5a3a39..6b7c8d016d2 100644 --- a/mysql-test/t/wait_timeout_func.test +++ b/mysql-test/t/wait_timeout_func.test @@ -11,93 +11,87 @@ # Creation Date: 2008-03-07 # # Author: Salman Rawala # # # +# Modified: HHunger 2008-08-27 Simplified the test and replaced the sleeps. # +# # # Description: Test Cases of Dynamic System Variable wait_timeout # # that checks the functionality of this variable # # # -# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # -# server-system-variables.html#option_mysqld_wait_timeouts # +# Reference: # +# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html # # # ############################################################################### --source include/not_embedded.inc ---disable_warnings -drop table if exists t1; ---enable_warnings - -############################## -# Creating two new tables # -############################## - ---echo ## 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; --echo '#--------------------FN_DYNVARS_186_01-------------------------#' ####################################################################### -# Setting initial value of interactive_timeout greater than sleep and -# verifying its behavior on session scope +# 1. test of scope session ####################################################################### ---echo ## Creating new connection test_con1 ## +SET @start_time= UNIX_TIMESTAMP(); +--echo connect (test_con1, localhost, root,,); connect (test_con1, localhost, root,,); connection test_con1; ---echo ## Setting value of variable to 5 ## -SET @@session.wait_timeout = 5; +# If not explicitly changed, @@session.wait_timeout equals @@global.wait_timeout. +SELECT @@session.wait_timeout = @@global.wait_timeout AS 'Expect 1'; ---echo ## Inserting record in table t1 ## -INSERT into t1(name) values('Record_1'); +# Find a small value <> @@global.wait_timeout. +let $session_value = +`SELECT IF(@@global.wait_timeout <> 2 OR @@global.wait_timeout IS NULL, 2, 3)`; +--replace_result $session_value +eval SET @@session.wait_timeout = $session_value; ---echo ## Using sleep to check timeout ## -sleep 4; - - ---echo '#--------------------FN_DYNVARS_186_02-------------------------#' -####################################################################### -# Setting initial value of interactive_timeout greater than sleep and -# verifying its behavior on global scope -####################################################################### - ---echo ## Setting value of variable ## -SET @@global.wait_timeout = 5; - ---echo ## Creating new connection test_con2 ## +--echo connect (test_con2, localhost, root,,); connect (test_con2, localhost, root,,); connection test_con2; -INSERT into t1(name) values('Record_2'); - ---echo ## Using sleep to check timeout ## -sleep 4; - +--replace_result $session_value +eval SET @@session.wait_timeout = $session_value - 1; +--echo connection default; +connection default; +--echo wait until connections ready +let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist; +--source include/wait_condition.inc +SELECT info FROM information_schema.processlist; --echo '#--------------------FN_DYNVARS_186_03-------------------------#' ####################################################################### -# Setting initial value of interactive_timeout less than sleep and -# verifying its behavior on global scope +# 2. test of scope global ####################################################################### ---echo ## Setting value of variable to 1 ## -SET @@global.wait_timeout = 1; +# Find a small value <> @@global.wait_timeout. +let $global_value = $session_value + 1; +--replace_result $global_value +eval SET @@global.wait_timeout= $global_value; ---echo ## Creating new connection ## +# Changing the @@global.wait_timeout has no influence on the +# @@session.wait_timeout of already established sessions. +SELECT @@session.wait_timeout = @start_value AS 'Expect 1'; + +--echo connect (test_con3, localhost, root,,); connect (test_con3, localhost, root,,); connection test_con3; -INSERT into t1(name) values('Record_3'); +# If not explicitly changed, @@session.wait_timeout equals @@global.wait_timeout. +SELECT @@session.wait_timeout = @@global.wait_timeout AS 'Expect 1'; ---echo ## Using sleep to check timeout ## -sleep 5; +--echo connection default; +connection default; +# We can be sure that the connections test_con1 and test_con2 must be +# established because both have already executed a SET @@session.wait_timeout. +# This means they are or at least were visible within the processlist. +# Therefore we can now simply wait till both disappear from the processlist. +let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist; +--source include/wait_condition.inc +SELECT info FROM information_schema.processlist; ---echo ## We cannot test it further because the server stops due to wait_timeout ## ---Error 2006 -SELECT * from t1; +--replace_result $global_value $session_value ; +eval SELECT UNIX_TIMESTAMP() - @start_time >= $global_value + $session_value; +SET @@global.wait_timeout= @start_value;