~clint-fewbar/ubuntu/lucid/mysql-dfsg-5.1/increase-killtimeout

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-12-08 03:05:40 UTC
  • mfrom: (1.1.4 upstream) (0.1.15 sid)
  • Revision ID: james.westby@ubuntu.com-20091208030540-l5xq57znyuy9ctgt
Tags: 5.1.41-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - debian/control:
    + Don't provide a libmysqlclient15-dev package as long as there
      are packages still build-depending on libmysqlclient15-dev and
      mysql-dfsg-5.0 is in the archive.
    + 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.
  - 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.1.files: install apparmor profile.
    + debian/mysql-server-5.1.dirs: add etc/apparmor.d/fore-complain
    + debian/mysql-server-5.1.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-esrver-5.1.postinst: reload apparmor profiles
  - debian/additions/my.cfn: remove language options. Error message files are
    located in a different direction 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.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.
  - debian/libmysqlclient16.symbols.amd64: remove amd64 symbols as it has
    not been correcly generated in Debian.
  - Add Apport hook: (LP: #354188):
    + debian/mysql-server-5.1.py: apport package hook
    + debian/mysql-server-5.1.files, debian/rules: install apport package hook
  - debian/addtions/my.cnf:
    + drop old_password option.
    + fix commentened logging options to use general_log and general_log_file.
  - Don't upgrade if there is an ndb management node configured (LP: #413792)
  - Set thread stack size to 192K rather than 128K. 128K is only useful on 
    systems with < 64M RAM and causes stack overrides with some SQL commands.
    See http://dev.mysql.com/doc/refman/5.1/en/server-system-varriables.html
    for more details. (LP: #426919)
  - Convert to upstart:
    + Add mysql-server-5.1.mysql.upstart
    + Dropped debian/mysql-server-5.1.mysql.init,
      debian/additions/mysqld_safe_syslog.cnf
    + debian/additions/my.cnf:
      * Removed pid declaration
      * Set up error logging to /var/log/mysql since we're not piping anything
        around logger anymore
    + Remove references to mysqld_safe in these files:
      * debian/rules, mysql-server-5.1.logcheck.ignore.paranoid
        mysql-server-5.1.logcheck.ignore.workstation, 
        mysql-server-5.1.logcheck.ignore.server
    + debian/mysql-server-5.1.postinst:
      * Replace calls to /etc/init.d with regular upstart calls
      * Remove reference to mysqld_safe
    + Dropped debian/patches/38_scripts_mysqld_safe.sh_signals.dpatch:
  - Dropped already merged upstream:
    + debian/{control,rules}: add and enable hardening build for PIE.
   

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
xa prepare 'a';
150
150
xa commit 'a';
151
151
 
 
152
#
 
153
# BUG#43171 - Assertion failed: thd->transaction.xid_state.xid.is_null()
 
154
#
 
155
CREATE TABLE t1(a INT, KEY(a)) ENGINE=InnoDB;
 
156
INSERT INTO t1 VALUES(1),(2);
 
157
connect(con1,localhost,root,,);
 
158
 
 
159
# Part 1: Prepare to test XA START after regular transaction deadlock
 
160
BEGIN;
 
161
UPDATE t1 SET a=3 WHERE a=1;
 
162
 
 
163
connection default;
 
164
BEGIN;
 
165
UPDATE t1 SET a=4 WHERE a=2;
 
166
 
 
167
connection con1;
 
168
let $conn_id= `SELECT CONNECTION_ID()`;
 
169
SEND UPDATE t1 SET a=5 WHERE a=2;
 
170
 
 
171
connection default;
 
172
let $wait_timeout= 2;
 
173
let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
 
174
WHERE ID=$conn_id AND STATE='Searching rows for update';
 
175
--source include/wait_condition.inc
 
176
 
 
177
--error ER_LOCK_DEADLOCK
 
178
UPDATE t1 SET a=5 WHERE a=1;
 
179
ROLLBACK;
 
180
 
 
181
# Part 2: Prepare to test XA START after XA transaction deadlock
 
182
connection con1;
 
183
REAP;
 
184
ROLLBACK;
 
185
BEGIN;
 
186
UPDATE t1 SET a=3 WHERE a=1;
 
187
 
 
188
connection default;
 
189
XA START 'xid1';
 
190
UPDATE t1 SET a=4 WHERE a=2;
 
191
 
 
192
connection con1;
 
193
SEND UPDATE t1 SET a=5 WHERE a=2;
 
194
 
 
195
connection default;
 
196
let $wait_timeout= 2;
 
197
let $wait_condition= SELECT 1 FROM INFORMATION_SCHEMA.PROCESSLIST
 
198
WHERE ID=$conn_id AND STATE='Searching rows for update';
 
199
--source include/wait_condition.inc
 
200
 
 
201
--error ER_LOCK_DEADLOCK
 
202
UPDATE t1 SET a=5 WHERE a=1;
 
203
--error ER_XA_RBDEADLOCK
 
204
XA END 'xid1';
 
205
XA ROLLBACK 'xid1';
 
206
 
 
207
XA START 'xid1';
 
208
XA END 'xid1';
 
209
XA ROLLBACK 'xid1';
 
210
 
 
211
disconnect con1;
 
212
DROP TABLE t1;
 
213
 
152
214
# Wait till all disconnects are completed
153
215
--source include/wait_until_count_sessions.inc
154
216