You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
868 B

  1. #
  2. # Bug #24200: Provide backwards compatibility mode for 4.x "rollback on
  3. # transaction timeout"
  4. #
  5. show variables like 'innodb_rollback_on_timeout';
  6. create table t1 (a int unsigned not null primary key) engine = innodb;
  7. insert into t1 values (1);
  8. commit;
  9. connect (con1,localhost,root,,);
  10. connect (con2,localhost,root,,);
  11. connection con2;
  12. begin work;
  13. insert into t1 values (2);
  14. select * from t1;
  15. connection con1;
  16. begin work;
  17. insert into t1 values (5);
  18. select * from t1;
  19. # Lock wait timeout set to 2 seconds in <THIS TEST>-master.opt; this
  20. # statement will time out; in 5.0.13+, it will not roll back transaction.
  21. --error ER_LOCK_WAIT_TIMEOUT
  22. insert into t1 values (2);
  23. # On 5.0.13+, this should give ==> 1, 5
  24. select * from t1;
  25. commit;
  26. connection con2;
  27. select * from t1;
  28. commit;
  29. connection default;
  30. select * from t1;
  31. drop table t1;
  32. disconnect con1;
  33. disconnect con2;