~jlukas79/+junk/mysql-server

« back to all changes in this revision

Viewing changes to mysql-test/t/key_buffer_size_func.test

manual merge 6.0-main --> 6.0-bka-review

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
################### mysql-test\t\key_buffer_size_func.test ####################
 
2
#                                                                             #
 
3
# Variable Name: key_buffer_size                                              #
 
4
# Scope: GLOBAL                                                               #
 
5
# Access Type: Dynamic                                                        #
 
6
# Data Type: numeric                                                          #
 
7
# Default Value: 131072                                                       #
 
8
# Range:8-4294967295                                                          #
 
9
#                                                                             #
 
10
#                                                                             #
 
11
# Creation Date: 2008-03-07                                                   #
 
12
# Author:  Salman Rawala                                                      #
 
13
#                                                                             #
 
14
# Description: Test Cases of Dynamic System Variable key_buffer_size          #
 
15
#              that checks the functionality of this variable                 #
 
16
#                                                                             #
 
17
# Reference: http://dev.mysql.com/doc/refman/5.1/en/                          #
 
18
#  server-system-variables.html                                               #
 
19
#                                                                             #
 
20
###############################################################################
 
21
 
 
22
--disable_warnings
 
23
drop table if exists t1;
 
24
--enable_warnings
 
25
 
 
26
#########################
 
27
#   Creating new table  #
 
28
#########################
 
29
 
 
30
--echo ## Creating new table t1 ##
 
31
CREATE TABLE t1
 
32
(
 
33
id INT NOT NULL auto_increment,
 
34
PRIMARY KEY (id),
 
35
rollno int NOT NULL,
 
36
name VARCHAR(30)
 
37
);
 
38
 
 
39
FLUSH STATUS;
 
40
 
 
41
--echo '#--------------------FN_DYNVARS_055_01-------------------------#'
 
42
########################################################################
 
43
#    Setting initial value of key_buffer_size, inserting some rows
 
44
#    & creating 2 new connections
 
45
########################################################################
 
46
 
 
47
--echo ## Setting initial value of variable to 131072 ##
 
48
SET @@global.key_buffer_size = 131072;
 
49
 
 
50
 
 
51
--echo ## Creating two new connections ##
 
52
CONNECT (test_con1,localhost,root,,);
 
53
CONNECT (test_con2,localhost,root,,);
 
54
 
 
55
 
 
56
--echo '#--------------------FN_DYNVARS_055_02-------------------------#'
 
57
###############################################################################
 
58
# Verifying initial behavior of variable by concatinating values greater than 4
 
59
###############################################################################
 
60
 
 
61
--echo ## Connecting with connection test_con1 ##
 
62
CONNECTION test_con1;
 
63
SELECT @@global.key_buffer_size;
 
64
 
 
65
 
 
66
--echo ## Inserting some rows in table ##
 
67
INSERT into t1(rollno, name) values(1, 'Record_1');
 
68
INSERT into t1(rollno, name) values(2, 'Record_2');
 
69
INSERT into t1(rollno, name) values(1, 'Record_3');
 
70
INSERT into t1(rollno, name) values(3, 'Record_4');
 
71
INSERT into t1(rollno, name) values(1, 'Record_5');
 
72
INSERT into t1(rollno, name) values(3, 'Record_6');
 
73
INSERT into t1(rollno, name) values(4, 'Record_7');
 
74
INSERT into t1(rollno, name) values(4, 'Record_8');
 
75
INSERT into t1(rollno, name) values(4, 'Record_9');
 
76
INSERT into t1(rollno, name) values(4, 'Record_10');
 
77
 
 
78
--echo ## Verifying status of reading & writing variables ##
 
79
# Disabled due to differences in results
 
80
#show status like 'Key%';
 
81
 
 
82
--echo ## Switching to connection test_con2 ##
 
83
connection test_con2;
 
84
 
 
85
--echo ## Verifying status of reading & writing variables ##
 
86
# Disabled due to differences in results
 
87
#show status like 'Key%';
 
88
 
 
89
############################################################
 
90
#    Disconnecting all connection & dropping table         #
 
91
############################################################
 
92
 
 
93
--echo ## Dropping table ##
 
94
DROP table if exists t1;
 
95
 
 
96
--echo ## Disconnecting both the connections ##
 
97
DISCONNECT test_con2;
 
98
DISCONNECT test_con1;
 
99
 
 
100