Multiple issues with percona_innodb_kill_idle_trx test
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
High
|
Laurynas Biveinis | ||
5.1 |
Fix Released
|
High
|
Laurynas Biveinis | ||
5.5 |
Fix Released
|
High
|
Laurynas Biveinis |
Bug Description
This test
1) Is inherently unstable due to SLEEP 3; and main thread doing the killing. See below for example failure.
2) Is in the wrong suite (main), should be in innodb_plugin in 5.1 and innodb in 5.5.
3) On 5.1, it checks the wrong InnoDB flavour, i.e. it includes have_innodb.inc instead of have_innodb_
4) The purpose of the duplicated last "SELECT * FROM t1;" is not clear.
_StringException: Text attachment: traceback
------------
Comment:
Logfile:
CURRENT_TEST: main.percona_
mysqltest: At line 24: query 'SELECT * FROM t1' failed with wrong errno 2013: 'Lost connection to MySQL server during query', instead of 2006...
The result from queries just before the failure was:
< snip >
SELECT * FROM INFORMATION_
VARIABLE_NAME VARIABLE_VALUE
INNODB_
SET GLOBAL innodb_
SHOW GLOBAL VARIABLES LIKE 'innodb_
Variable_name Value
innodb_
SELECT * FROM INFORMATION_
VARIABLE_NAME VARIABLE_VALUE
INNODB_
BEGIN;
INSERT INTO t1 VALUES (1),(2),(3);
COMMIT;
SELECT * FROM t1;
a
1
2
3
BEGIN;
INSERT INTO t1 VALUES (4),(5),(6);
More results from queries before failure can be found in /home/jenkins/
------------
Might be related to bug 871722.
Related branches
- Stewart Smith (community): Approve
- George Ormond Lorch III (community): Approve (g2)
-
Diff: 76 lines (+9/-12)3 files modifiedPercona-Server/mysql-test/suite/innodb_plugin/r/percona_innodb_kill_idle_trx.result (+0/-2)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_innodb_kill_idle_trx.test (+5/-6)
Percona-Server/mysql-test/suite/innodb_plugin/t/percona_innodb_kill_idle_trx_locks.test (+4/-4)
- Laurynas Biveinis (community): Approve
-
Diff: 340 lines (+144/-147)10 files modifiedPercona-Server/mysql-test/include/percona_innodb_kill_idle_trx_show.inc (+0/-2)
Percona-Server/mysql-test/r/percona_innodb_kill_idle_trx.result (+0/-41)
Percona-Server/mysql-test/r/percona_innodb_kill_idle_trx_locks.result (+0/-45)
Percona-Server/mysql-test/suite/innodb/include/percona_innodb_kill_idle_trx_show.inc (+2/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_innodb_kill_idle_trx.result (+39/-0)
Percona-Server/mysql-test/suite/innodb/r/percona_innodb_kill_idle_trx_locks.result (+45/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_innodb_kill_idle_trx.test (+27/-0)
Percona-Server/mysql-test/suite/innodb/t/percona_innodb_kill_idle_trx_locks.test (+31/-0)
Percona-Server/mysql-test/t/percona_innodb_kill_idle_trx.test (+0/-28)
Percona-Server/mysql-test/t/percona_innodb_kill_idle_trx_locks.test (+0/-31)
Changed in percona-server: | |
importance: | Undecided → High |
summary: |
- Sporadic percona_innodb_kill_idle_trx failure + Multiple issues with percona_innodb_kill_idle_trx test |
description: | updated |
Maybe this function can implement in Server-Level, I think InnoDB master thread kill connection thread maybe unsafe.
I think we can implement it like this:
Every query send to server will process in function do_command(), transaction( ) and thd->current_ utime() - thd->last_ stmt_end_ time(add to THD, means the last query end time) >= idle_transactio n_timeout , then kill the thread,
after call do_command, it will read a package from network and process it,
if no package can received, my_net_read() will block this thread until wait_timeout.
" if ((packet_length= my_net_read(net)) == packet_error) "
so can we add idle transaction judgement in it, if thd->active_
this is maybe safe.