~ubuntu-branches/ubuntu/karmic/mysql-dfsg-5.1/karmic

« back to all changes in this revision

Viewing changes to mysql-test/suite/sys_vars/inc/tmp_table_size_basic.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-02-10 16:42:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090210164205-ej41ocvm4z1s14nq
Tags: 5.1.31-1ubuntu1
* Merge from debian experimental, remaining changes: 
  - debian/mysql-server-5.1.config: ask for MySQL root password at priority
    high instead of medium so that the password prompt is seen on a default
    install. (LP: #319843)
  - debian/control: 
    + Don't build mysql-server, mysql-client, mysql-common and 
      libmysqlclient15-dev binary packages since they're still provided 
      by mysql-dfsg-5.0.
    + Rename libmysqlclient-dev package to libmysqlclient16-dev (LP: #316280).
      Make it conflict with libmysqlclient15-dev.
    + Make mysql-{client,server}-5.1 packages conflict and
      replace mysql-{client,server}-5.0, but not provide 
      mysql-{client,server}.
    + Depend on a specific version of mysql-common rather than the src 
      version of mysql-dfsg-5.1 since mysql-common is currently part of
      mysql-dfsg-5.0.
  - debian/rules: added -fno-strict-aliasing to CFLAGS to get
    around mysql testsuite build failures.
* debian/patches/92_ssl_test_cert.dpatch: certificate expiration in 
  test suite (LP: #323755).
* Dropped changes:
  - all of the changes made to support both 5.0 and 5.1 installed at the
    same time have been dropped now that amarok doesn't depend on
    mysql-server-5.1 anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
############## mysql-test\t\tmp_table_size_basic.test #########################
2
 
#                                                                             #
3
 
# Variable Name: tmp_table_size                                               #
4
 
# Scope: GLOBAL | SESSION                                                     #
5
 
# Access Type: Dynamic                                                        #
6
 
# Data Type: numeric                                                          #
7
 
# Default Value: 33554432                                                     #
8
 
# Range: 1024-4294967295                                                      #
9
 
#                                                                             #
10
 
#                                                                             #
11
 
# Creation Date: 2008-02-13                                                   #
12
 
# Author:  Salman                                                             #
13
 
#                                                                             #
14
 
# Description: Test Cases of Dynamic System Variable tmp_table_size           #
15
 
#              that checks the behavior of this variable in the following ways#
16
 
#              * Default Value                                                #
17
 
#              * Valid & Invalid values                                       #
18
 
#              * Scope & Access method                                        #
19
 
#              * Data Integrity                                               #
20
 
#                                                                             #
21
 
# Reference: http://dev.mysql.com/doc/refman/5.1/en/                          #
22
 
#  server-system-variables.html#option_mysqld_tmp_table_size                  #
23
 
#                                                                             #
24
 
###############################################################################
25
 
 
26
 
--source include/load_sysvars.inc
27
 
 
28
 
##############################################################
29
 
#           START OF tmp_table_size TESTS                    #
30
 
##############################################################
31
 
 
32
 
 
33
 
#############################################################
34
 
#                 Save initial value                        #
35
 
#############################################################
36
 
 
37
 
SET @start_global_value = @@global.tmp_table_size;
38
 
SELECT @start_global_value;
39
 
SET @start_session_value = @@session.tmp_table_size;
40
 
SELECT @start_session_value;
41
 
 
42
 
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
43
 
 
44
 
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
45
 
##############################################################
46
 
#     Display the DEFAULT value of tmp_table_size            #
47
 
##############################################################
48
 
 
49
 
SET @@global.tmp_table_size = 100;
50
 
SET @@global.tmp_table_size = DEFAULT;
51
 
SELECT @@global.tmp_table_size;
52
 
 
53
 
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
54
 
SET @@session.tmp_table_size = 200;
55
 
SET @@session.tmp_table_size = DEFAULT;
56
 
SELECT @@session.tmp_table_size;
57
 
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
58
 
 
59
 
 
60
 
--echo '#--------------------FN_DYNVARS_005_02-------------------------#'
61
 
########################################################################
62
 
#     Check the DEFAULT value of tmp_table_size              #
63
 
########################################################################
64
 
 
65
 
SET @@global.tmp_table_size = DEFAULT;
66
 
SELECT @@global.tmp_table_size = 33554432;
67
 
 
68
 
SET @@session.tmp_table_size = DEFAULT;
69
 
SELECT @@session.tmp_table_size = 33554432;
70
 
 
71
 
--echo 'Bug# 34876: This variable has invalid default value as compared to documentation';
72
 
 
73
 
--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
74
 
########################################################################
75
 
# Change the value of tmp_table_size to a valid value for GLOBAL Scope #
76
 
########################################################################
77
 
 
78
 
SET @@global.tmp_table_size = 1024;
79
 
SELECT @@global.tmp_table_size;
80
 
SET @@global.tmp_table_size = 60020;
81
 
SELECT @@global.tmp_table_size;
82
 
SET @@global.tmp_table_size = 4294967295;
83
 
SELECT @@global.tmp_table_size;
84
 
 
85
 
 
86
 
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
87
 
#########################################################################
88
 
# Change the value of tmp_table_size to a valid value for SESSION Scope #
89
 
#########################################################################
90
 
 
91
 
SET @@session.tmp_table_size = 1024;
92
 
SELECT @@session.tmp_table_size;
93
 
 
94
 
SET @@session.tmp_table_size =4294967295;
95
 
SELECT @@session.tmp_table_size;
96
 
SET @@session.tmp_table_size = 65535;
97
 
SELECT @@session.tmp_table_size;
98
 
 
99
 
 
100
 
--echo '#------------------FN_DYNVARS_005_05-----------------------#'
101
 
##########################################################
102
 
# Change the value of tmp_table_size to an invalid value #
103
 
##########################################################
104
 
 
105
 
SET @@global.tmp_table_size = 0;
106
 
SELECT @@global.tmp_table_size;
107
 
 
108
 
SET @@global.tmp_table_size = -1024;
109
 
SELECT @@global.tmp_table_size;
110
 
 
111
 
SET @@global.tmp_table_size = 1000;
112
 
SELECT @@global.tmp_table_size;
113
 
 
114
 
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
115
 
 
116
 
 
117
 
SET @@global.tmp_table_size = ON;
118
 
 
119
 
 
120
 
SET @@global.tmp_table_size = OFF;
121
 
 
122
 
 
123
 
SET @@global.tmp_table_size = True;
124
 
SELECT @@global.tmp_table_size;
125
 
 
126
 
SET @@global.tmp_table_size = False;
127
 
SELECT @@global.tmp_table_size;
128
 
--echo 'Bug:Error should be shown that variable is numeric and can not assigned boolean value';
129
 
 
130
 
 
131
 
SET @@global.tmp_table_size = 65530.34;
132
 
 
133
 
SET @@global.tmp_table_size ="Test";
134
 
 
135
 
 
136
 
SET @@session.tmp_table_size = ON;
137
 
 
138
 
 
139
 
SET @@session.tmp_table_size = OFF;
140
 
 
141
 
SET @@session.tmp_table_size = True;
142
 
SELECT @@session.tmp_table_size;
143
 
 
144
 
SET @@session.tmp_table_size = False;
145
 
SELECT @@session.tmp_table_size;
146
 
 
147
 
SET @@session.tmp_table_size = "Test";
148
 
 
149
 
SET @@session.tmp_table_size = 12345678901;
150
 
SELECT @@session.tmp_table_size;
151
 
 
152
 
 
153
 
--echo '#------------------FN_DYNVARS_005_06-----------------------#'
154
 
####################################################################
155
 
#   Check if the value in GLOBAL Table matches value in variable   #
156
 
####################################################################
157
 
 
158
 
 
159
 
SELECT @@global.tmp_table_size = VARIABLE_VALUE 
160
 
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
161
 
WHERE VARIABLE_NAME='tmp_table_size';
162
 
 
163
 
--echo '#------------------FN_DYNVARS_005_07-----------------------#'
164
 
####################################################################
165
 
#  Check if the value in SESSION Table matches value in variable   #
166
 
####################################################################
167
 
 
168
 
SELECT @@session.tmp_table_size = VARIABLE_VALUE 
169
 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES 
170
 
WHERE VARIABLE_NAME='tmp_table_size';
171
 
 
172
 
 
173
 
 
174
 
 
175
 
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
176
 
########################################################################
177
 
#  Check if global and session variables are independent of each other #
178
 
########################################################################
179
 
 
180
 
SET @@global.tmp_table_size = 1024;
181
 
SET @@tmp_table_size = 4294967295;
182
 
SELECT @@tmp_table_size = @@global.tmp_table_size;
183
 
 
184
 
--echo '#---------------------FN_DYNVARS_001_10----------------------#'
185
 
##################################################################
186
 
#    Check if accessing variable with SESSION,LOCAL and without  #
187
 
#    SCOPE points to same session variable                       #
188
 
##################################################################
189
 
 
190
 
SET @@tmp_table_size = 100;
191
 
SELECT @@tmp_table_size = @@local.tmp_table_size;
192
 
SELECT @@local.tmp_table_size = @@session.tmp_table_size;
193
 
 
194
 
 
195
 
--echo '#---------------------FN_DYNVARS_001_11----------------------#'
196
 
#########################################################################
197
 
#   Check if tmp_table_size can be accessed with and without @@ sign    #
198
 
#########################################################################
199
 
 
200
 
SET tmp_table_size = 1027;
201
 
SELECT @@tmp_table_size;
202
 
 
203
 
--Error ER_UNKNOWN_TABLE
204
 
SELECT local.tmp_table_size;
205
 
 
206
 
--Error ER_UNKNOWN_TABLE
207
 
SELECT global.tmp_table_size;
208
 
 
209
 
--Error ER_BAD_FIELD_ERROR
210
 
SELECT tmp_table_size = @@session.tmp_table_size;
211
 
 
212
 
 
213
 
####################################
214
 
#     Restore initial value        #
215
 
####################################
216
 
 
217
 
SET @@global.tmp_table_size = @start_global_value;
218
 
SELECT @@global.tmp_table_size;
219
 
SET @@session.tmp_table_size = @start_session_value;
220
 
SELECT @@session.tmp_table_size;
221
 
 
222
 
 
223
 
###################################################
224
 
#                 END OF tmp_table_size TESTS     #
225
 
###################################################
226