~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to mysql-test/suite/innodb/t/innodb-lock.test

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
100
100
drop table t1;
101
101
 
102
102
# End of 4.1 tests
 
103
 
 
104
--echo #
 
105
--echo #Bug#12842206 INNODB LOCKING REGRESSION FOR INSERT IGNORE
 
106
--echo #fixed by re-fixing Bug#7975
 
107
--echo #aka Bug#11759688 52020: InnoDB can still deadlock on just INSERT...
 
108
--echo #
 
109
 
 
110
connection default;
 
111
CREATE TABLE t1 (a INT PRIMARY KEY, b INT NOT NULL) ENGINE=InnoDB;
 
112
 
 
113
INSERT INTO t1 VALUES(3,1);
 
114
 
 
115
BEGIN;
 
116
# this used to wrongly acquire an X lock; now it takes an S lock
 
117
INSERT IGNORE INTO t1 VALUES(3,14);
 
118
 
 
119
connection con1;
 
120
BEGIN;
 
121
# this used to wrongly acquire an X lock; now it takes an S lock
 
122
INSERT IGNORE INTO t1 VALUES(3,23);
 
123
--send
 
124
SELECT * FROM t1 FOR UPDATE;
 
125
 
 
126
connection con2;
 
127
# Check that the above SELECT is blocked
 
128
let $wait_condition=
 
129
  select count(*) = 1 from information_schema.processlist
 
130
  where state = 'Sending data' and
 
131
        info = 'SELECT * FROM t1 FOR UPDATE';
 
132
--source include/wait_condition.inc
 
133
 
 
134
connection default;
 
135
COMMIT;
 
136
connection con1;
 
137
reap;
 
138
COMMIT;
 
139
disconnect con1;
 
140
disconnect con2;
 
141
 
 
142
connection default;
 
143
DROP TABLE t1;