~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/parts/t/partition_debug_sync_innodb.test

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100621153105-pbbz3t6nyrf9t2zq
Tags: upstream-5.1.48
ImportĀ upstreamĀ versionĀ 5.1.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--source include/have_innodb.inc
 
2
--source include/have_partition.inc
 
3
--source include/have_debug_sync.inc
 
4
 
 
5
let $MYSQLD_DATADIR=`SELECT @@datadir`;
 
6
 
 
7
--echo #
 
8
--echo # Bug#50561: ALTER PARTITIONS does not have adequate lock, breaks with
 
9
--echo #            concurrent I_S query
 
10
create table t1 (a int)
 
11
engine = innodb
 
12
partition by range (a)
 
13
(partition p0 values less than MAXVALUE);
 
14
insert into t1 values (1), (11), (21), (33);
 
15
SELECT * FROM t1;
 
16
SHOW CREATE TABLE t1;
 
17
--list_files $MYSQLD_DATADIR/test
 
18
 
 
19
SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open';
 
20
SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish';
 
21
send
 
22
SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
 
23
 
 
24
connect (con1, localhost, root,,);
 
25
SET DEBUG_SYNC = 'now WAIT_FOR parked';
 
26
--echo # When waiting for the name lock in get_all_tables in sql_show.cc
 
27
--echo # this will not be concurrent any more, thus the TIMEOUT
 
28
SET DEBUG_SYNC = 'before_rename_partitions SIGNAL open WAIT_FOR alter TIMEOUT 1';
 
29
--echo # Needs to be executed twice, since first is this 'SET DEBUG_SYNC ...'
 
30
SET DEBUG_SYNC = 'before_close_thread_tables SIGNAL finish EXECUTE 2';
 
31
--error 0,ER_TABLE_EXISTS_ERROR
 
32
ALTER TABLE t1 REORGANIZE PARTITION p0 INTO
 
33
(PARTITION p0 VALUES LESS THAN (10),
 
34
 PARTITION p10 VALUES LESS THAN MAXVALUE);
 
35
 
 
36
disconnect con1;
 
37
connection default;
 
38
--reap
 
39
--list_files $MYSQLD_DATADIR/test
 
40
SHOW CREATE TABLE t1;
 
41
SELECT * FROM t1;
 
42
drop table t1;
 
43
--list_files $MYSQLD_DATADIR/test
 
44
SET DEBUG_SYNC = 'RESET';