1
############## mysql-test\t\interactive_timeout_func.test #####################
3
# Variable Name: interactive_timeout #
4
# Scope: GLOBAL | SESSION #
5
# Access Type: Dynamic #
7
# Default Value:28800 #
11
# Creation Date: 2008-03-07 #
12
# Author: Salman Rawala #
14
# Description: Test Cases of Dynamic System Variable interactive_timeout #
15
# that checks the functionality of this variable #
17
# Reference: http://dev.mysql.com/doc/refman/5.1/en/ #
18
# server-system-variables.html #
20
###############################################################################
24
drop table if exists t1;
27
##############################
28
# Creating two new tables #
29
##############################
31
--echo ## Creating new table t1 ##
34
id INT NOT NULL auto_increment,
40
--echo '#--------------------FN_DYNVARS_052_01-------------------------#'
41
#######################################################################
42
# Setting initial value of interactive_timeout to 1 and verifying its
44
#######################################################################
46
--echo ## Setting initial value of variable to 1 ##
47
SET @@global.interactive_timeout = 1;
49
--echo ## Creating new interactive connection test_con1 ##
50
connect (test_con1, localhost, root,);
53
--echo ## Inserting record in table ##
54
INSERT into t1(name) values('Record_1');
56
--echo ## Setting session value of interactive_timeout ##
57
SET @@session.interactive_timeout = 1;
59
--echo ## Verifying values of variable ##
60
SELECT @@session.interactive_timeout;
61
SELECT @@global.interactive_timeout;
63
--echo ## Using sleep to check timeout ##
67
--echo 'Bug#35377: Error should appear here because interactive_timeout value';
68
--echo 'is 1 and connection remains idle for 5 secs';
70
INSERT into t1(name) values('Record_2');