mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
Fix for Bug#36874 : main.slow_launch_time_func test fails
This commit is contained in:
@@ -1,37 +1,17 @@
|
|||||||
SET @global_slow_launch_time = @@GLOBAL.slow_launch_time;
|
SET @global_slow_launch_time = @@GLOBAL.slow_launch_time;
|
||||||
'#--------------------FN_DYNVARS_124_01-------------------------#'
|
|
||||||
** Connection default **
|
** Connection default **
|
||||||
|
'#--------------------FN_DYNVARS_124_01-------------------------#'
|
||||||
SET @@GLOBAL.slow_launch_time=0;
|
SET @@GLOBAL.slow_launch_time=0;
|
||||||
SELECT @@GLOBAL.slow_launch_time;
|
SELECT @@GLOBAL.slow_launch_time;
|
||||||
@@GLOBAL.slow_launch_time
|
@@GLOBAL.slow_launch_time
|
||||||
0
|
0
|
||||||
** Connecting conn5 using username 'root' **
|
** Connecting conn1 using username 'root' **
|
||||||
** Connecting conn6 using username 'root' **
|
** Switch to connection default and disconnect conn1 **
|
||||||
** Connecting conn7 using username 'root' **
|
'#--------------------FN_DYNVARS_124_02-------------------------#'
|
||||||
** Connecting conn8 using username 'root' **
|
SET @@GLOBAL.slow_launch_time= 1000;
|
||||||
** Connecting conn9 using username 'root' **
|
SELECT @@GLOBAL.slow_launch_time;
|
||||||
** Connecting conn10 using username 'root' **
|
@@GLOBAL.slow_launch_time
|
||||||
** Connecting conn11 using username 'root' **
|
1000
|
||||||
** Connecting conn12 using username 'root' **
|
** Connecting conn2 using username 'root' **
|
||||||
** Connecting conn13 using username 'root' **
|
** Switch to connection default and disconnect conn2 **
|
||||||
** Connecting conn14 using username 'root' **
|
|
||||||
** Connecting conn15 using username 'root' **
|
|
||||||
** Connecting conn16 using username 'root' **
|
|
||||||
show status like 'slow_launch_threads';
|
|
||||||
Variable_name Value
|
|
||||||
Slow_launch_threads 12
|
|
||||||
12 Expected
|
|
||||||
** Connection default **
|
|
||||||
** Disconnecting conn5 **
|
|
||||||
** Disconnecting conn6 **
|
|
||||||
** Disconnecting conn7 **
|
|
||||||
** Disconnecting conn8 **
|
|
||||||
** Disconnecting conn9 **
|
|
||||||
** Disconnecting conn10 **
|
|
||||||
** Disconnecting conn11 **
|
|
||||||
** Disconnecting conn12 **
|
|
||||||
** Disconnecting conn13 **
|
|
||||||
** Disconnecting conn14 **
|
|
||||||
** Disconnecting conn15 **
|
|
||||||
** Disconnecting conn16 **
|
|
||||||
SET @@GLOBAL.slow_launch_time = @global_slow_launch_time;
|
SET @@GLOBAL.slow_launch_time = @global_slow_launch_time;
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
############# mysql-test\t\SLOW_LAUNCH_time_func.test ##########################
|
############# mysql-test\t\slow_launch_time_func.test ##########################
|
||||||
# #
|
# #
|
||||||
# Variable Name: slow_launch_time #
|
# Variable Name: slow_launch_time #
|
||||||
# Scope: SESSION #
|
# Scope: SESSION #
|
||||||
@@ -11,11 +11,17 @@
|
|||||||
# Creation Date: 2008-03-02 #
|
# Creation Date: 2008-03-02 #
|
||||||
# Author: Sharique Abdullah #
|
# Author: Sharique Abdullah #
|
||||||
# #
|
# #
|
||||||
|
# Last change: 2008-09-09 mleich Reimplementation of this test #
|
||||||
|
# - Fix Bug#36874 : main.slow_launch_time_func test fails #
|
||||||
|
# randomly #
|
||||||
|
# - Fix other failures and streamline the test #
|
||||||
|
# #
|
||||||
# Description: Test Cases of Dynamic System Variable "slow_launch_time " #
|
# Description: Test Cases of Dynamic System Variable "slow_launch_time " #
|
||||||
# that checks behavior of this variable in the following ways #
|
# that checks behavior of this variable in the following ways #
|
||||||
# * Functionality based on different values #
|
# * Functionality based on different values #
|
||||||
# #
|
# #
|
||||||
#Reference: http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#
|
# Reference: #
|
||||||
|
# http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html #
|
||||||
# option_mysqld_slow_launch_time #
|
# option_mysqld_slow_launch_time #
|
||||||
# #
|
# #
|
||||||
################################################################################
|
################################################################################
|
||||||
@@ -28,82 +34,71 @@
|
|||||||
|
|
||||||
SET @global_slow_launch_time = @@GLOBAL.slow_launch_time;
|
SET @global_slow_launch_time = @@GLOBAL.slow_launch_time;
|
||||||
|
|
||||||
|
--echo ** Connection default **
|
||||||
|
connection default;
|
||||||
|
|
||||||
--echo '#--------------------FN_DYNVARS_124_01-------------------------#'
|
--echo '#--------------------FN_DYNVARS_124_01-------------------------#'
|
||||||
|
|
||||||
#####################################
|
########################################################################
|
||||||
# Increase number of connection #
|
# Reveal that a new connect gets counted as "slow launched thread" if #
|
||||||
#####################################
|
# @@GLOBAL.slow_launch_time = 0. #
|
||||||
|
# The value of slow_launch_threads must be increased by 1. #
|
||||||
--echo ** Connection default **
|
########################################################################
|
||||||
connection default;
|
|
||||||
|
|
||||||
SET @@GLOBAL.slow_launch_time=0;
|
SET @@GLOBAL.slow_launch_time=0;
|
||||||
SELECT @@GLOBAL.slow_launch_time;
|
SELECT @@GLOBAL.slow_launch_time;
|
||||||
|
|
||||||
--echo ** Connecting conn5 using username 'root' **
|
let $value_before=
|
||||||
CONNECT (conn5,localhost,root,,);
|
query_get_value(show status like 'slow_launch_threads', Value, 1);
|
||||||
--echo ** Connecting conn6 using username 'root' **
|
--echo ** Connecting conn1 using username 'root' **
|
||||||
CONNECT (conn6,localhost,root,,);
|
CONNECT (conn1,localhost,root,,);
|
||||||
--echo ** Connecting conn7 using username 'root' **
|
let $value_after=
|
||||||
CONNECT (conn7,localhost,root,,);
|
query_get_value(show status like 'slow_launch_threads', Value, 1);
|
||||||
--echo ** Connecting conn8 using username 'root' **
|
if (!`SELECT $value_after = $value_before + 1`)
|
||||||
CONNECT (conn8,localhost,root,,);
|
{
|
||||||
--echo ** Connecting conn9 using username 'root' **
|
--echo ERROR: Subtest FN_DYNVARS_124_01 failed
|
||||||
CONNECT (conn9,localhost,root,,);
|
--echo A new connect should be counted as 'slow_launch_thread' if
|
||||||
--echo ** Connecting conn10 using username 'root' **
|
--echo @@GLOBAL.slow_launch_time=0
|
||||||
CONNECT (conn10,localhost,root,,);
|
SELECT @@GLOBAL.slow_launch_time;
|
||||||
--echo ** Connecting conn11 using username 'root' **
|
echo Number of slow_launch_threads before new connect: $value_before;
|
||||||
CONNECT (conn11,localhost,root,,);
|
echo Number of slow_launch_threads after new connect: $value_after;
|
||||||
--echo ** Connecting conn12 using username 'root' **
|
}
|
||||||
CONNECT (conn12,localhost,root,,);
|
--echo ** Switch to connection default and disconnect conn1 **
|
||||||
--echo ** Connecting conn13 using username 'root' **
|
connection default;
|
||||||
CONNECT (conn13,localhost,root,,);
|
disconnect conn1;
|
||||||
--echo ** Connecting conn14 using username 'root' **
|
|
||||||
CONNECT (conn14,localhost,root,,);
|
|
||||||
--echo ** Connecting conn15 using username 'root' **
|
|
||||||
CONNECT (conn15,localhost,root,,);
|
|
||||||
--echo ** Connecting conn16 using username 'root' **
|
|
||||||
CONNECT (conn16,localhost,root,,);
|
|
||||||
|
|
||||||
|
--echo '#--------------------FN_DYNVARS_124_02-------------------------#'
|
||||||
|
|
||||||
#
|
########################################################################
|
||||||
# Checking status of slow_launch_threads
|
# Reveal that a new connect gets not counted as "slow launched thread" #
|
||||||
#
|
# if @@GLOBAL.slow_launch_time is sufficient big. #
|
||||||
|
# The value of slow_launch_threads must not change. #
|
||||||
|
########################################################################
|
||||||
|
|
||||||
show status like 'slow_launch_threads';
|
SET @@GLOBAL.slow_launch_time= 1000;
|
||||||
--echo 12 Expected
|
SELECT @@GLOBAL.slow_launch_time;
|
||||||
|
|
||||||
|
let $value_before=
|
||||||
|
query_get_value(show status like 'slow_launch_threads', Value, 1);
|
||||||
|
--echo ** Connecting conn2 using username 'root' **
|
||||||
|
CONNECT (conn2,localhost,root,,);
|
||||||
|
let $value_after=
|
||||||
|
query_get_value(show status like 'slow_launch_threads', Value, 1);
|
||||||
|
if (!`SELECT $value_after = $value_before`)
|
||||||
|
{
|
||||||
|
--echo ERROR: Subtest FN_DYNVARS_124_02 failed
|
||||||
|
--echo A new connect must not be counted as 'slow_launch_thread' if
|
||||||
|
--echo @@GLOBAL.slow_launch_time is sufficient big.
|
||||||
|
SELECT @@GLOBAL.slow_launch_time;
|
||||||
|
echo Number of slow_launch_threads before new connect: $value_before;
|
||||||
|
echo Number of slow_launch_threads after new connect: $value_after;
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Cleanup
|
# Cleanup
|
||||||
#
|
#
|
||||||
|
|
||||||
--echo ** Connection default **
|
--echo ** Switch to connection default and disconnect conn2 **
|
||||||
connection default;
|
connection default;
|
||||||
|
disconnect conn2;
|
||||||
--echo ** Disconnecting conn5 **
|
|
||||||
disconnect conn5;
|
|
||||||
--echo ** Disconnecting conn6 **
|
|
||||||
disconnect conn6;
|
|
||||||
--echo ** Disconnecting conn7 **
|
|
||||||
disconnect conn7;
|
|
||||||
--echo ** Disconnecting conn8 **
|
|
||||||
disconnect conn8;
|
|
||||||
--echo ** Disconnecting conn9 **
|
|
||||||
disconnect conn9;
|
|
||||||
--echo ** Disconnecting conn10 **
|
|
||||||
disconnect conn10;
|
|
||||||
--echo ** Disconnecting conn11 **
|
|
||||||
disconnect conn11;
|
|
||||||
--echo ** Disconnecting conn12 **
|
|
||||||
disconnect conn12;
|
|
||||||
--echo ** Disconnecting conn13 **
|
|
||||||
disconnect conn13;
|
|
||||||
--echo ** Disconnecting conn14 **
|
|
||||||
disconnect conn14;
|
|
||||||
--echo ** Disconnecting conn15 **
|
|
||||||
disconnect conn15;
|
|
||||||
--echo ** Disconnecting conn16 **
|
|
||||||
disconnect conn16;
|
|
||||||
|
|
||||||
SET @@GLOBAL.slow_launch_time = @global_slow_launch_time;
|
SET @@GLOBAL.slow_launch_time = @global_slow_launch_time;
|
||||||
|
Reference in New Issue
Block a user