~mathiaz/ubuntu/lucid/mysql-dfsg-5.1/zap-bug-552053

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Mathias Gug
  • Date: 2009-06-25 12:55:45 UTC
  • mfrom: (1.1.2 upstream) (0.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20090625125545-m8ogs96zzsri74xe
Tags: 5.1.34-1ubuntu1
* Merge from debian experimental (and 5.0 from main), 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)
    + don't ask for root password when upgrading from a 5.0 install.
  - debian/control:
    + Make libmysqlclient16-dev a transitional package depending on
      libmysqlclient-dev.
    + Make libmysqlclient-dev conflict with libmysqlclient15-dev.
    + Don't build mysql-server, mysql-client, mysql-common and
      libmysqlclient15-dev binary packages since they're still provided
      by mysql-dfsg-5.0.
    + 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.
    + Lower mailx from a Recommends to a Suggests to avoid pulling in
      a full MTA on all installs of mysql-server. (LP: #259477)
  - debian/rules:
    + added -fno-strict-aliasing to CFLAGS to get around mysql testsuite
      build failures.
    + install mysql-test and sql-bench to /usr/share/mysql/ rather than
      /usr/.
  - debian/additions/debian-start.inc.sh: support ANSI mode (LP: #310211)
  - Add AppArmor profile:
    - debian/apparmor-profile: apparmor profile.
    - debian/rules, debian/mysql-server-5.0.files: install apparmor profile.
    - debian/mysql-server-5.0.dirs: add etc/apparmor.d/force-complain
    - debian/mysql-server-5.0.postrm: remove symlink in force-complain/ on
      purge.
    - debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    - debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    - debian/mysql-server-5.1.postinst: reload apparmor profiles.
  - debian/additions/my.cnf: remove language option. Error message files are
    located in a different directory in MySQL 5.0. Setting the language
    option to use /usr/share/mysql/english breaks 5.0. Both 5.0 and 5.1
    use a default value that works. (LP: #316974)
  - debian/mysql-server-5.1.mysql.init:
    + Clearly indicate that we do not support running multiple instances
      of mysqld by duplicating the init script.
      (closes: #314785, #324834, #435165, #444216)
    + Properly parameterize all existing references to the mysql config
      file (/etc/mysql/my.cnf).
  - debian/mysql-server-5.0.postinst: Clear out the second password
    when setting up mysql. (LP: #344816)
  - mysql-server-core-5.1 package for files needed by Akonadi:
    + debian/control: create mysql-server-core-5.1 package.
    + debian/mysql-server-core-5.1.files, debian/mysql-server-5.1.files:
      move core mysqld files to mysql-server-core-5.1 package.
  - Don't package sql-bench and mysql-test file.
* Dropped changes:
  - debian/patches/92_ssl_test_cert.dpatch: certificate expiration in
    test suite (LP: #323755). Included upstream.
* Dropped from 5.0:
  - apparmor profile:
    - debian/control: Recommends apparmor >= 2.1+1075-0ubuntu6. All version
      of apparmor-profile (>hardy) are higher than this version.
    - debian/mysql-server-5.0.preinst: create symlink for force-complain/
      on pre-feisty upgrades, upgrades where apparmor-profiles profile is
      unchanged (ie non-enforcing) and upgrades where the profile
      doesn't exist. Support for pre-hardy upgrades is no longer needed.
* debian/mysql-server-5.1.postinst: fix debian-sys-maint user creation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
########################### 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: system dependend                                              #
8
 
# Range: 1024-system dependend                                                 #
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
 
# Modified: 2008-12-04 HHunger                                                 #
21
 
#              removed the differences between 64 and 32 bit platforms         #
22
 
#                                                                              #
23
 
# Reference:                                                                   #
24
 
#    http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html       #
25
 
#                                                                              #
26
 
################################################################################
27
 
 
28
 
--source include/load_sysvars.inc
29
 
 
30
 
##############################################################
31
 
#           START OF tmp_table_size TESTS                    #
32
 
##############################################################
33
 
 
34
 
#############################################################
35
 
#                 Save initial value                        #
36
 
#############################################################
37
 
 
38
 
SET @start_global_value = @@global.tmp_table_size;
39
 
SET @start_session_value = @@session.tmp_table_size;
40
 
 
41
 
--echo '#--------------------FN_DYNVARS_005_01-------------------------#'
42
 
##############################################################
43
 
#     Display the DEFAULT value of tmp_table_size            #
44
 
##############################################################
45
 
 
46
 
SET @@global.tmp_table_size = 100;
47
 
SET @@global.tmp_table_size = DEFAULT;
48
 
 
49
 
SET @@session.tmp_table_size = 200;
50
 
SET @@session.tmp_table_size = DEFAULT;
51
 
 
52
 
--echo '#--------------------FN_DYNVARS_005_02-------------------------#'
53
 
########################################################################
54
 
#     Check the DEFAULT value of tmp_table_size                        #
55
 
########################################################################
56
 
# The DEFAULT value is system dependend.
57
 
# Therefore we have only a plausibility check here
58
 
SELECT @@global.tmp_table_size >= 16777216;
59
 
 
60
 
SELECT @@session.tmp_table_size >= 16777216;
61
 
 
62
 
--echo '#--------------------FN_DYNVARS_005_03-------------------------#'
63
 
########################################################################
64
 
# Change the value of tmp_table_size to a valid value for GLOBAL Scope #
65
 
########################################################################
66
 
 
67
 
SET @@global.tmp_table_size = 1024;
68
 
SELECT @@global.tmp_table_size;
69
 
SET @@global.tmp_table_size = 60020;
70
 
SELECT @@global.tmp_table_size;
71
 
SET @@global.tmp_table_size = 4294967295;
72
 
SELECT @@global.tmp_table_size;
73
 
 
74
 
 
75
 
--echo '#--------------------FN_DYNVARS_005_04-------------------------#'
76
 
#########################################################################
77
 
# Change the value of tmp_table_size to a valid value for SESSION Scope #
78
 
#########################################################################
79
 
 
80
 
SET @@session.tmp_table_size = 1024;
81
 
SELECT @@session.tmp_table_size;
82
 
 
83
 
SET @@session.tmp_table_size = 4294967295;
84
 
SELECT @@session.tmp_table_size;
85
 
SET @@session.tmp_table_size = 65535;
86
 
SELECT @@session.tmp_table_size;
87
 
 
88
 
 
89
 
--echo '#------------------FN_DYNVARS_005_05-----------------------#'
90
 
##########################################################
91
 
# Change the value of tmp_table_size to an invalid value #
92
 
##########################################################
93
 
 
94
 
SET @@global.tmp_table_size = 0;
95
 
SELECT @@global.tmp_table_size;
96
 
 
97
 
SET @@global.tmp_table_size = -1024;
98
 
SELECT @@global.tmp_table_size;
99
 
 
100
 
SET @@global.tmp_table_size = 1000;
101
 
SELECT @@global.tmp_table_size;
102
 
 
103
 
--Error ER_WRONG_TYPE_FOR_VAR
104
 
SET @@global.tmp_table_size = ON;
105
 
 
106
 
--Error ER_WRONG_TYPE_FOR_VAR
107
 
SET @@global.tmp_table_size = OFF;
108
 
 
109
 
SET @@global.tmp_table_size = True;
110
 
SELECT @@global.tmp_table_size;
111
 
 
112
 
SET @@global.tmp_table_size = False;
113
 
SELECT @@global.tmp_table_size;
114
 
 
115
 
--Error ER_WRONG_TYPE_FOR_VAR
116
 
SET @@global.tmp_table_size = 65530.34;
117
 
 
118
 
--Error ER_WRONG_TYPE_FOR_VAR
119
 
SET @@global.tmp_table_size ="Test";
120
 
 
121
 
--Error ER_WRONG_TYPE_FOR_VAR
122
 
SET @@session.tmp_table_size = ON;
123
 
 
124
 
--Error ER_WRONG_TYPE_FOR_VAR
125
 
SET @@session.tmp_table_size = OFF;
126
 
 
127
 
SET @@session.tmp_table_size = True;
128
 
SELECT @@session.tmp_table_size;
129
 
 
130
 
SET @@session.tmp_table_size = False;
131
 
SELECT @@session.tmp_table_size;
132
 
 
133
 
--Error ER_WRONG_TYPE_FOR_VAR
134
 
SET @@session.tmp_table_size = "Test";
135
 
 
136
 
SET @@session.tmp_table_size = 12345678901;
137
 
 
138
 
# With a 64 bit mysqld:12345678901,with a 32 bit mysqld: 4294967295
139
 
SELECT @@session.tmp_table_size IN (12345678901,4294967295);
140
 
 
141
 
--echo '#------------------FN_DYNVARS_005_06-----------------------#'
142
 
####################################################################
143
 
#   Check if the value in GLOBAL Table matches value in variable   #
144
 
####################################################################
145
 
 
146
 
SELECT @@global.tmp_table_size = VARIABLE_VALUE
147
 
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
148
 
WHERE VARIABLE_NAME='tmp_table_size';
149
 
 
150
 
--echo '#------------------FN_DYNVARS_005_07-----------------------#'
151
 
####################################################################
152
 
#  Check if the value in SESSION Table matches value in variable   #
153
 
####################################################################
154
 
 
155
 
SELECT @@session.tmp_table_size = VARIABLE_VALUE
156
 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES
157
 
WHERE VARIABLE_NAME='tmp_table_size';
158
 
 
159
 
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
160
 
########################################################################
161
 
#  Check if global and session variables are independent of each other #
162
 
########################################################################
163
 
 
164
 
SET @@global.tmp_table_size = 1024;
165
 
SET @@tmp_table_size = 4294967295;
166
 
SELECT @@tmp_table_size = @@global.tmp_table_size;
167
 
 
168
 
--echo '#---------------------FN_DYNVARS_001_10----------------------#'
169
 
##################################################################
170
 
#    Check if accessing variable with SESSION,LOCAL and without  #
171
 
#    SCOPE points to same session variable                       #
172
 
##################################################################
173
 
 
174
 
SET @@tmp_table_size = 100;
175
 
SELECT @@tmp_table_size = @@local.tmp_table_size;
176
 
SELECT @@local.tmp_table_size = @@session.tmp_table_size;
177
 
 
178
 
 
179
 
--echo '#---------------------FN_DYNVARS_001_11----------------------#'
180
 
#########################################################################
181
 
#   Check if tmp_table_size can be accessed with and without @@ sign    #
182
 
#########################################################################
183
 
 
184
 
SET tmp_table_size = 1027;
185
 
SELECT @@tmp_table_size;
186
 
 
187
 
--Error ER_UNKNOWN_TABLE
188
 
SELECT local.tmp_table_size;
189
 
 
190
 
--Error ER_UNKNOWN_TABLE
191
 
SELECT global.tmp_table_size;
192
 
 
193
 
--Error ER_BAD_FIELD_ERROR
194
 
SELECT tmp_table_size = @@session.tmp_table_size;
195
 
 
196
 
####################################
197
 
#     Restore initial value        #
198
 
####################################
199
 
 
200
 
SET @@global.tmp_table_size = @start_global_value;
201
 
SET @@session.tmp_table_size = @start_session_value;
202
 
 
203
 
###################################################
204
 
#                 END OF tmp_table_size TESTS     #
205
 
###################################################
206