mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.1
into radha.patg.net:/Users/patg/mysql-build/mysql-5.1-arch-merge mysql-test/t/disabled.def: Auto merged sql/mysqld.cc: Auto merged storage/innobase/handler/ha_innodb.cc: Auto merged
This commit is contained in:
37
mysql-test/include/innodb_rollback_on_timeout.inc
Normal file
37
mysql-test/include/innodb_rollback_on_timeout.inc
Normal file
@ -0,0 +1,37 @@
|
||||
#
|
||||
# Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
|
||||
# transaction timeout"
|
||||
#
|
||||
show variables like 'innodb_rollback_on_timeout';
|
||||
create table t1 (a int unsigned not null primary key) engine = innodb;
|
||||
insert into t1 values (1);
|
||||
commit;
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
|
||||
connection con2;
|
||||
begin work;
|
||||
insert into t1 values (2);
|
||||
select * from t1;
|
||||
|
||||
connection con1;
|
||||
begin work;
|
||||
insert into t1 values (5);
|
||||
select * from t1;
|
||||
# Lock wait timeout set to 2 seconds in <THIS TEST>-master.opt; this
|
||||
# statement will time out; in 5.0.13+, it will not roll back transaction.
|
||||
--error ER_LOCK_WAIT_TIMEOUT
|
||||
insert into t1 values (2);
|
||||
# On 5.0.13+, this should give ==> 1, 5
|
||||
select * from t1;
|
||||
commit;
|
||||
|
||||
connection con2;
|
||||
select * from t1;
|
||||
commit;
|
||||
|
||||
connection default;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
disconnect con1;
|
||||
disconnect con2;
|
@ -462,6 +462,8 @@ EXPLAIN SELECT b, SUM(c) FROM t1 GROUP BY b;
|
||||
EXPLAIN SELECT SQL_BIG_RESULT b, SUM(c) FROM t1 GROUP BY b;
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/innodb_rollback_on_timeout.inc
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user