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

« back to all changes in this revision

Viewing changes to mysql-test/t/auto_increment_increment_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
 
############## mysql-test\t\auto_increment_increment_basic.test ################
2
 
#                                                                              #
3
 
# Variable Name: auto_increment_increment                                      #
4
 
# Scope: GLOBAL & SESSION                                                      #
5
 
# Access Type: Dynamic                                                         #
6
 
# Data Type: Numeric                                                           #
7
 
# Default Value: 1                                                             #
8
 
# Range: 1 - 65536                                                             #
9
 
#                                                                              #
10
 
#                                                                              #
11
 
# Creation Date: 2008-02-07                                                    #
12
 
# Author:  Salman Rawala                                                       #
13
 
#                                                                              #
14
 
# Description: Test Cases of Dynamic System Variable "auto_increment_increment"#
15
 
#              that checks 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_auto-increment-increment         #
23
 
#                                                                              #
24
 
################################################################################
25
 
 
26
 
--source include/load_sysvars.inc
27
 
 
28
 
########################################################################
29
 
#           START OF auto_increment_increment TESTS                    #
30
 
########################################################################
31
 
 
32
 
 
33
 
#############################################################
34
 
#                 Save initial value                        #
35
 
#############################################################
36
 
 
37
 
SET @start_global_value = @@global.auto_increment_increment;
38
 
SELECT @start_global_value;
39
 
SET @start_session_value = @@session.auto_increment_increment;
40
 
SELECT @start_session_value;
41
 
 
42
 
 
43
 
--echo '#--------------------FN_DYNVARS_001_01-------------------------#'
44
 
########################################################################
45
 
#     Display the DEFAULT value of auto_increment_increment            #
46
 
########################################################################
47
 
 
48
 
SET @@global.auto_increment_increment = 100;
49
 
SET @@global.auto_increment_increment = DEFAULT;
50
 
SELECT @@global.auto_increment_increment;
51
 
 
52
 
SET @@session.auto_increment_increment = 200;
53
 
SET @@session.auto_increment_increment = DEFAULT;
54
 
SELECT @@session.auto_increment_increment;
55
 
 
56
 
 
57
 
--echo '#--------------------FN_DYNVARS_001_02-------------------------#'
58
 
########################################################################
59
 
#     Check the DEFAULT value of auto_increment_increment              #
60
 
########################################################################
61
 
 
62
 
SET @@global.auto_increment_increment = DEFAULT;
63
 
SELECT @@global.auto_increment_increment = 1;
64
 
 
65
 
SET @@session.auto_increment_increment = DEFAULT;
66
 
SELECT @@session.auto_increment_increment = 1;
67
 
 
68
 
 
69
 
--echo '#--------------------FN_DYNVARS_001_03-------------------------#'
70
 
##################################################################
71
 
# Change the value of variable to a valid value for GLOBAL Scope #
72
 
##################################################################
73
 
 
74
 
SET @@global.auto_increment_increment = 1;
75
 
SELECT @@global.auto_increment_increment;
76
 
SET @@global.auto_increment_increment = 60020;
77
 
SELECT @@global.auto_increment_increment;
78
 
SET @@global.auto_increment_increment = 65535;
79
 
SELECT @@global.auto_increment_increment;
80
 
 
81
 
 
82
 
--echo '#--------------------FN_DYNVARS_001_04-------------------------#'
83
 
###################################################################
84
 
# Change the value of variable to a valid value for SESSION Scope #
85
 
###################################################################
86
 
 
87
 
SET @@session.auto_increment_increment = 1;
88
 
SELECT @@session.auto_increment_increment;
89
 
SET @@session.auto_increment_increment = 50050;
90
 
SELECT @@session.auto_increment_increment;
91
 
SET @@session.auto_increment_increment = 65535;
92
 
SELECT @@session.auto_increment_increment;
93
 
 
94
 
 
95
 
--echo '#------------------FN_DYNVARS_001_05-----------------------#'
96
 
####################################################################
97
 
# Change the value of auto_increment_increment to an invalid value #
98
 
####################################################################
99
 
 
100
 
SET @@global.auto_increment_increment = 0;
101
 
SELECT @@global.auto_increment_increment;
102
 
SET @@global.auto_increment_increment = -1024;
103
 
SELECT @@global.auto_increment_increment;
104
 
SET @@global.auto_increment_increment = 65536;
105
 
SELECT @@global.auto_increment_increment;
106
 
--Error ER_PARSE_ERROR
107
 
SET @@global.auto_increment_increment = 65530.34.;
108
 
SELECT @@global.auto_increment_increment;
109
 
--Error ER_WRONG_TYPE_FOR_VAR
110
 
SET @@global.auto_increment_increment = test;
111
 
SELECT @@global.auto_increment_increment;
112
 
 
113
 
SET @@session.auto_increment_increment = 0;
114
 
SELECT @@session.auto_increment_increment;
115
 
SET @@session.auto_increment_increment = -2;
116
 
SELECT @@session.auto_increment_increment;
117
 
--Error ER_PARSE_ERROR
118
 
SET @@session.auto_increment_increment = 65530.34.;
119
 
SET @@session.auto_increment_increment = 65550;
120
 
SELECT @@session.auto_increment_increment;
121
 
--echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable';
122
 
 
123
 
--Error ER_WRONG_TYPE_FOR_VAR
124
 
SET @@session.auto_increment_increment = test;
125
 
SELECT @@session.auto_increment_increment;
126
 
 
127
 
 
128
 
--echo '#------------------FN_DYNVARS_001_06-----------------------#'
129
 
####################################################################
130
 
#   Check if the value in GLOBAL Table matches value in variable   #
131
 
####################################################################
132
 
 
133
 
SELECT @@global.auto_increment_increment = VARIABLE_VALUE 
134
 
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES 
135
 
WHERE VARIABLE_NAME='auto_increment_increment';
136
 
 
137
 
 
138
 
--echo '#------------------FN_DYNVARS_001_07-----------------------#'
139
 
####################################################################
140
 
#  Check if the value in SESSION Table matches value in variable   #
141
 
####################################################################
142
 
 
143
 
SELECT @@session.auto_increment_increment = VARIABLE_VALUE 
144
 
FROM INFORMATION_SCHEMA.SESSION_VARIABLES 
145
 
WHERE VARIABLE_NAME='auto_increment_increment';
146
 
 
147
 
 
148
 
--echo '#------------------FN_DYNVARS_001_08-----------------------#'
149
 
####################################################################
150
 
#     Check if TRUE and FALSE values can be used on variable       #
151
 
####################################################################
152
 
 
153
 
SET @@global.auto_increment_increment = TRUE;
154
 
SELECT @@global.auto_increment_increment;
155
 
SET @@global.auto_increment_increment = FALSE;
156
 
SELECT @@global.auto_increment_increment;
157
 
 
158
 
 
159
 
--echo '#---------------------FN_DYNVARS_001_09----------------------#'
160
 
###############################################################################
161
 
#  Check if global and session variables are independant of each other        #
162
 
###############################################################################
163
 
 
164
 
SET @@global.auto_increment_increment = 10;
165
 
SET @@session.auto_increment_increment = 11;
166
 
SELECT @@auto_increment_increment = @@global.auto_increment_increment;
167
 
 
168
 
 
169
 
--echo '#---------------------FN_DYNVARS_001_10----------------------#'
170
 
##############################################################################
171
 
#    Check if accessing variable with SESSION,LOCAL and without SCOPE points #
172
 
#    to same session variable                                                #
173
 
##############################################################################
174
 
 
175
 
SET @@auto_increment_increment = 100;
176
 
SELECT @@auto_increment_increment = @@local.auto_increment_increment;
177
 
SELECT @@local.auto_increment_increment = @@session.auto_increment_increment;
178
 
 
179
 
 
180
 
--echo '#---------------------FN_DYNVARS_001_11----------------------#'
181
 
###############################################################################
182
 
# Check if auto_increment_increment can be accessed with and without @@ sign  #
183
 
###############################################################################
184
 
 
185
 
SET auto_increment_increment = 1;
186
 
SELECT @@auto_increment_increment;
187
 
--Error ER_UNKNOWN_TABLE
188
 
SELECT local.auto_increment_increment;
189
 
--Error ER_UNKNOWN_TABLE
190
 
SELECT session.auto_increment_increment;
191
 
--Error ER_BAD_FIELD_ERROR
192
 
SELECT auto_increment_increment = @@session.auto_increment_increment;
193
 
 
194
 
 
195
 
####################################
196
 
#     Restore initial value        #
197
 
####################################
198
 
 
199
 
SET @@global.auto_increment_increment = @start_global_value;
200
 
SELECT @@global.auto_increment_increment;
201
 
SET @@session.auto_increment_increment = @start_session_value;
202
 
SELECT @@session.auto_increment_increment;
203
 
 
204
 
 
205
 
#############################################################
206
 
#                 END OF auto_increment_increment TESTS     #
207
 
#############################################################
208