mariadb/mysql-test/include/innodb_rollback_on_timeout.inc
unknown 47b0a0b089 Added innodb_rollback_on_timeout option to restore the 4.1
InnoDB timeout behavior (Bug #24200)


mysql-test/t/innodb_mysql-master.opt:
  Set --innodb-lock-wait-timeout=2, since test for bug #24200 times out.
  
  This *could* cause random test failures if some long-running transaction concurrency is being tested.  However, such a test really should go in innodb-big or some other test file.
2006-12-19 16:57:51 -07:00

37 lines
868 B
PHP

#
# 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;