Commit 35b6416f authored by andrey@lmy004's avatar andrey@lmy004

Merge lmy004.:/work/mysql-5.1-new-vanilla

into lmy004.:/work/mysql-5.1-runtime
parents ea20259a 10719727
...@@ -5,9 +5,6 @@ ...@@ -5,9 +5,6 @@
# on the presence of the log tables (which are CSV-based). # on the presence of the log tables (which are CSV-based).
--source include/have_csv.inc --source include/have_csv.inc
# This test uses chmod, can't be run with root permissions
-- source include/not_as_root.inc
# Test for information_schema.schemata & # Test for information_schema.schemata &
# show databases # show databases
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
# #
--source include/not_windows.inc --source include/not_windows.inc
# This test uses chmod, can't be run with root permissions
-- source include/not_as_root.inc
# #
# Bug #15851 Unlistable directories yield no info from information_schema # Bug #15851 Unlistable directories yield no info from information_schema
......
...@@ -4,10 +4,41 @@ ...@@ -4,10 +4,41 @@
# #
# Bug #8731: wait_timeout does not work on Mac OS X # Bug #8731: wait_timeout does not work on Mac OS X
# #
# Connect with another connection and reset counters
--disable_query_log
connect (wait_con,localhost,root,,test,,);
flush status; # Reset counters
connection wait_con;
let $retries=300;
let $aborted_clients = `SHOW STATUS LIKE 'aborted_clients'`;
set @aborted_clients= 0;
--enable_query_log
# Disable reconnect and do the query
connection default;
--disable_reconnect --disable_reconnect
select 1; select 1;
# wait_timeout is 1, so we should get disconnected now
--sleep 2 # Switch to wait_con and wait until server has aborted the connection
--disable_query_log
connection wait_con;
while (!`select @aborted_clients`)
{
sleep 0.1;
let $aborted_clients = `SHOW STATUS LIKE 'aborted_clients'`;
eval set @aborted_clients= SUBSTRING('$aborted_clients', 16)+0;
dec $retries;
if (!$retries)
{
Failed to detect that client has been aborted;
}
}
--enable_query_log
connection default;
# When the connection is closed in this way, the error code should # When the connection is closed in this way, the error code should
# be consistent see bug#2845 for an explanation # be consistent see bug#2845 for an explanation
--error 2006 --error 2006
...@@ -15,12 +46,41 @@ select 2; ...@@ -15,12 +46,41 @@ select 2;
--enable_reconnect --enable_reconnect
select 3; select 3;
#
# Do the same test as above on a TCP connection # Do the same test as above on a TCP connection
# (which we get by specifying a ip adress)
# Connect with another connection and reset counters
--disable_query_log
connection wait_con;
flush status; # Reset counters
let $retries=300;
let $aborted_clients = `SHOW STATUS LIKE 'aborted_clients'`;
set @aborted_clients= 0;
--enable_query_log
connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,); connect (con1,127.0.0.1,root,,test,$MASTER_MYPORT,);
--disable_reconnect --disable_reconnect
select 1; select 1;
# wait_timeout is 1, so we should get disconnected now
--sleep 2 # Switch to wait_con and wait until server has aborted the connection
--disable_query_log
connection wait_con;
while (!`select @aborted_clients`)
{
sleep 0.1;
let $aborted_clients = `SHOW STATUS LIKE 'aborted_clients'`;
eval set @aborted_clients= SUBSTRING('$aborted_clients', 16)+0;
dec $retries;
if (!$retries)
{
Failed to detect that client has been aborted;
}
}
--enable_query_log
connection con1;
# When the connection is closed in this way, the error code should # When the connection is closed in this way, the error code should
# be consistent see bug#2845 for an explanation # be consistent see bug#2845 for an explanation
--error 2006 --error 2006
......
...@@ -1024,7 +1024,20 @@ void kill_mysql(void) ...@@ -1024,7 +1024,20 @@ void kill_mysql(void)
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
/* Force server down. kill all connections and threads and exit */ /*
Force server down. Kill all connections and threads and exit
SYNOPSIS
kill_server
sig_ptr Signal number that caused kill_server to be called.
NOTE!
A signal number of 0 mean that the function was not called
from a signal handler and there is thus no signal to block
or stop, we just want to kill the server.
*/
#if defined(__NETWARE__) #if defined(__NETWARE__)
extern "C" void kill_server(int sig_ptr) extern "C" void kill_server(int sig_ptr)
......
...@@ -250,6 +250,7 @@ sp_get_flags_for_command(LEX *lex) ...@@ -250,6 +250,7 @@ sp_get_flags_for_command(LEX *lex)
case SQLCOM_TRUNCATE: case SQLCOM_TRUNCATE:
case SQLCOM_COMMIT: case SQLCOM_COMMIT:
case SQLCOM_ROLLBACK: case SQLCOM_ROLLBACK:
case SQLCOM_LOAD:
case SQLCOM_LOAD_MASTER_DATA: case SQLCOM_LOAD_MASTER_DATA:
case SQLCOM_LOCK_TABLES: case SQLCOM_LOCK_TABLES:
case SQLCOM_CREATE_PROCEDURE: case SQLCOM_CREATE_PROCEDURE:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment