From 357b5009409ed6666bf1df48a80d76cd42a482c8 Mon Sep 17 00:00:00 2001 From: Horst Hunger Date: Fri, 19 Dec 2008 16:03:32 +0100 Subject: WL#4681: Took the system variable tests out of the main test suite, put them into "sys_vars", updated some reult files and tests. --- .../suite/sys_vars/t/key_buffer_size_func.test | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 mysql-test/suite/sys_vars/t/key_buffer_size_func.test (limited to 'mysql-test/suite/sys_vars/t/key_buffer_size_func.test') diff --git a/mysql-test/suite/sys_vars/t/key_buffer_size_func.test b/mysql-test/suite/sys_vars/t/key_buffer_size_func.test new file mode 100644 index 00000000000..05c591678dc --- /dev/null +++ b/mysql-test/suite/sys_vars/t/key_buffer_size_func.test @@ -0,0 +1,100 @@ +################### mysql-test\t\key_buffer_size_func.test #################### +# # +# Variable Name: key_buffer_size # +# Scope: GLOBAL # +# Access Type: Dynamic # +# Data Type: numeric # +# Default Value: 131072 # +# Range:8-4294967295 # +# # +# # +# Creation Date: 2008-03-07 # +# Author: Salman Rawala # +# # +# Description: Test Cases of Dynamic System Variable key_buffer_size # +# that checks the functionality of this variable # +# # +# Reference: http://dev.mysql.com/doc/refman/5.1/en/ # +# server-system-variables.html # +# # +############################################################################### + +--disable_warnings +drop table if exists t1; +--enable_warnings + +######################### +# Creating new table # +######################### + +--echo ## Creating new table t1 ## +CREATE TABLE t1 +( +id INT NOT NULL auto_increment, +PRIMARY KEY (id), +rollno int NOT NULL, +name VARCHAR(30) +); + +FLUSH STATUS; + +--echo '#--------------------FN_DYNVARS_055_01-------------------------#' +######################################################################## +# Setting initial value of key_buffer_size, inserting some rows +# & creating 2 new connections +######################################################################## + +--echo ## Setting initial value of variable to 131072 ## +SET @@global.key_buffer_size = 131072; + + +--echo ## Creating two new connections ## +CONNECT (test_con1,localhost,root,,); +CONNECT (test_con2,localhost,root,,); + + +--echo '#--------------------FN_DYNVARS_055_02-------------------------#' +############################################################################### +# Verifying initial behavior of variable by concatinating values greater than 4 +############################################################################### + +--echo ## Connecting with connection test_con1 ## +CONNECTION test_con1; +SELECT @@global.key_buffer_size; + + +--echo ## Inserting some rows in table ## +INSERT into t1(rollno, name) values(1, 'Record_1'); +INSERT into t1(rollno, name) values(2, 'Record_2'); +INSERT into t1(rollno, name) values(1, 'Record_3'); +INSERT into t1(rollno, name) values(3, 'Record_4'); +INSERT into t1(rollno, name) values(1, 'Record_5'); +INSERT into t1(rollno, name) values(3, 'Record_6'); +INSERT into t1(rollno, name) values(4, 'Record_7'); +INSERT into t1(rollno, name) values(4, 'Record_8'); +INSERT into t1(rollno, name) values(4, 'Record_9'); +INSERT into t1(rollno, name) values(4, 'Record_10'); + +--echo ## Verifying status of reading & writing variables ## +# Disabled due to differences in results +#show status like 'Key%'; + +--echo ## Switching to connection test_con2 ## +connection test_con2; + +--echo ## Verifying status of reading & writing variables ## +# Disabled due to differences in results +#show status like 'Key%'; + +############################################################ +# Disconnecting all connection & dropping table # +############################################################ + +--echo ## Dropping table ## +DROP table if exists t1; + +--echo ## Disconnecting both the connections ## +DISCONNECT test_con2; +DISCONNECT test_con1; + + -- cgit v1.2.1