--source include/have_innodb.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings

SET autocommit=0;
CREATE TABLE t1 (a INT) ENGINE=InnoDB;

--source percona_innodb_kill_idle_trx_show.inc
SET GLOBAL innodb_kill_idle_transaction=5;
--source percona_innodb_kill_idle_trx_show.inc

connect (conn1,localhost,root,,);
connection conn1;

BEGIN;
INSERT INTO t1 VALUES (1),(2),(3);
COMMIT;
SELECT * FROM t1;

--echo ### Locking rows. Lock should be released when idle trx is killed.
BEGIN;
SELECT * FROM t1 FOR UPDATE;

connection default;
UPDATE t1 set a=4;

SELECT * FROM t1;
DROP TABLE t1;
SET GLOBAL innodb_kill_idle_transaction=0;
--source percona_innodb_kill_idle_trx_show.inc
