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

« back to all changes in this revision

Viewing changes to mysql-test/suite/im/t/im_life_cycle.imtest

  • 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
 
let $UTIL=$MYSQL_TEST_DIR/suite/im/t;
2
 
 
3
 
###########################################################################
4
 
#
5
 
# This file contains test for (1.1) test suite.
6
 
#
7
 
# Consult WL#2789 for more information.
8
 
#
9
 
###########################################################################
10
 
 
11
 
--source suite/im/t/im_check_env.inc
12
 
 
13
 
###########################################################################
14
 
#
15
 
# 1.1.2. Check 'START INSTANCE' command:
16
 
#  - start the second instance;
17
 
#  - check that it is reported as online;
18
 
#  - execute some SQL-statement on mysqld2 to ensure that it is really up and
19
 
#    running;
20
 
#
21
 
###########################################################################
22
 
 
23
 
--echo
24
 
--echo --------------------------------------------------------------------
25
 
--echo -- 1.1.2.
26
 
--echo --------------------------------------------------------------------
27
 
 
28
 
START INSTANCE mysqld2;
29
 
# FIXME: START INSTANCE should be synchronous.
30
 
--exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started im_life_cycle
31
 
 
32
 
# FIXME: Result of SHOW INSTANCES here is not deterministic unless START
33
 
# INSTANCE is synchronous. Even waiting for mysqld to start by looking at
34
 
# its pid file is not enough, because it is unknown when IM detects that
35
 
# mysqld has started.
36
 
# SHOW INSTANCES;
37
 
 
38
 
--connect (mysql_con,localhost,root,,mysql,$IM_MYSQLD2_PORT,$IM_MYSQLD2_SOCK)
39
 
--connection mysql_con
40
 
 
41
 
--replace_result $IM_MYSQLD2_PORT IM_MYSQLD2_PORT
42
 
SHOW VARIABLES LIKE 'port';
43
 
 
44
 
--connection default
45
 
--disconnect mysql_con
46
 
 
47
 
###########################################################################
48
 
#
49
 
# 1.1.3. Check 'STOP INSTANCE' command:
50
 
#  - stop the second instance;
51
 
#  - check that it is reported as offline;
52
 
#  - TODO: try to execute some SQL-statement to ensure that it is really down;
53
 
#
54
 
###########################################################################
55
 
 
56
 
--echo
57
 
--echo --------------------------------------------------------------------
58
 
--echo -- 1.1.3.
59
 
--echo --------------------------------------------------------------------
60
 
 
61
 
STOP INSTANCE mysqld2;
62
 
# FIXME: STOP INSTANCE should be synchronous.
63
 
--exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 stopped im_life_cycle
64
 
 
65
 
# FIXME: Result of SHOW INSTANCES here is not deterministic unless START
66
 
# INSTANCE is synchronous. Even waiting for mysqld to start by looking at
67
 
# its pid file is not enough, because it is unknown when IM detects that
68
 
# mysqld has started.
69
 
# SHOW INSTANCES;
70
 
 
71
 
###########################################################################
72
 
#
73
 
# 1.1.4. Check that Instance Manager reports correct errors for 'START
74
 
# INSTANCE' command:
75
 
#   - if the client tries to start unregistered instance;
76
 
#   - if the client tries to start already started instance;
77
 
#   - if the client submits invalid arguments;
78
 
#
79
 
###########################################################################
80
 
 
81
 
--echo
82
 
--echo --------------------------------------------------------------------
83
 
--echo -- 1.1.4.
84
 
--echo --------------------------------------------------------------------
85
 
 
86
 
--error 3000 # ER_BAD_INSTANCE_NAME
87
 
START INSTANCE mysqld3;
88
 
 
89
 
--error 3002 # ER_INSTANCE_ALREADY_STARTED
90
 
START INSTANCE mysqld1;
91
 
 
92
 
###########################################################################
93
 
#
94
 
# 1.1.5. Check that Instance Manager reports correct errors for
95
 
#        'STOP INSTANCE' command:
96
 
#   - if the client tries to start unregistered instance;
97
 
#   - if the client tries to start already stopped instance;
98
 
#   - if the client submits invalid arguments;
99
 
#
100
 
###########################################################################
101
 
 
102
 
--echo
103
 
--echo --------------------------------------------------------------------
104
 
--echo -- 1.1.5.
105
 
--echo --------------------------------------------------------------------
106
 
 
107
 
--error 3000 # ER_BAD_INSTANCE_NAME
108
 
STOP INSTANCE mysqld3;
109
 
 
110
 
# TODO: IM should be fixed.
111
 
# BUG#12673: Instance Manager allows to stop the instance many times
112
 
# --error 3002 # ER_INSTANCE_ALREADY_STARTED
113
 
# STOP INSTANCE mysqld2;
114
 
 
115
 
###########################################################################
116
 
#
117
 
# 1.1.6. Check that Instance Manager is able to restart guarded instances.
118
 
#
119
 
###########################################################################
120
 
 
121
 
--echo
122
 
--echo --------------------------------------------------------------------
123
 
--echo -- 1.1.6.
124
 
--echo --------------------------------------------------------------------
125
 
 
126
 
--exec $UTIL/kill_n_check.sh $IM_MYSQLD1_PATH_PID restarted 30 im_life_cycle
127
 
 
128
 
# Give some time to IM to detect that mysqld was restarted. It should be
129
 
# longer than monitoring interval.
130
 
 
131
 
--sleep 3
132
 
 
133
 
SHOW INSTANCES;
134
 
 
135
 
###########################################################################
136
 
#
137
 
# 1.1.7. Check that Instance Manager does not restart non-guarded instance.
138
 
#
139
 
###########################################################################
140
 
 
141
 
--echo
142
 
--echo --------------------------------------------------------------------
143
 
--echo -- 1.1.7.
144
 
--echo --------------------------------------------------------------------
145
 
 
146
 
START INSTANCE mysqld2;
147
 
# FIXME: START INSTANCE should be synchronous.
148
 
--exec $UTIL/wait_for_process.sh $IM_MYSQLD2_PATH_PID 30 started im_life_cycle
149
 
 
150
 
# FIXME: Result of SHOW INSTANCES here is not deterministic unless START
151
 
# INSTANCE is synchronous. Even waiting for mysqld to start by looking at
152
 
# its pid file is not enough, because it is unknown when IM detects that
153
 
# mysqld has started.
154
 
# SHOW INSTANCES;
155
 
 
156
 
--exec $UTIL/kill_n_check.sh $IM_MYSQLD2_PATH_PID killed 10 im_life_cycle
157
 
 
158
 
# FIXME: Result of SHOW INSTANCES here is not deterministic unless START
159
 
# INSTANCE is synchronous. Even waiting for mysqld to start by looking at
160
 
# its pid file is not enough, because it is unknown when IM detects that
161
 
# mysqld has started.
162
 
# SHOW INSTANCES;
163
 
 
164
 
###########################################################################
165
 
#
166
 
# 1.1.8. Check that Instance Manager returns an error on
167
 
# incomplete SHOW INSTANCE STATUS command.
168
 
#
169
 
###########################################################################
170
 
 
171
 
--echo
172
 
--echo --------------------------------------------------------------------
173
 
--echo -- 1.1.8.
174
 
--echo --------------------------------------------------------------------
175
 
 
176
 
--error ER_SYNTAX_ERROR
177
 
SHOW INSTANCE STATUS;
178
 
 
179
 
#
180
 
# Tests for bug fixes
181
 
#
182
 
 
183
 
#
184
 
# Bug #12813    Instance Manager: START/STOP INSTANCE commands accept
185
 
#                                 a list as argument.
186
 
#
187
 
 
188
 
--echo
189
 
--echo --------------------------------------------------------------------
190
 
--echo -- BUG#12813
191
 
--echo --------------------------------------------------------------------
192
 
 
193
 
--error ER_SYNTAX_ERROR
194
 
START INSTANCE mysqld1,mysqld2,mysqld3;
195
 
 
196
 
--error ER_SYNTAX_ERROR
197
 
STOP INSTANCE mysqld1,mysqld2,mysqld3;
198
 
 
199
 
#
200
 
# Bug #12673: Instance Manager: allows to stop the instance many times
201
 
#
202
 
--error 3001
203
 
STOP INSTANCE mysqld2;
204
 
 
205
 
--echo End of 5.0 tests