Assert on KILL'ing a stored routine invocation | Assertion `m_status == DA_ERROR' failed.
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Invalid
|
Undecided
|
Unassigned | |||
5.6 |
Fix Released
|
High
|
Laurynas Biveinis | |||
5.7 |
Fix Released
|
High
|
Laurynas Biveinis |
Bug Description
Source code patch for debug sync:
diff --git a/sql/sp_instr.cc b/sql/sp_instr.cc
index 2de6c99bc56.
--- a/sql/sp_instr.cc
+++ b/sql/sp_instr.cc
@@ -28,6 +28,7 @@
#include "sql_prepare.h" // reinit_
#include "transaction.h" // trans_commit_stmt
#include "sql_audit.h"
+#include "debug_sync.h" // DEBUG_SYNC
#include <algorithm>
@@ -397,6 +398,8 @@ bool sp_lex_
}
else
{
+ DEBUG_SYNC(thd, "sp_lex_
+
rc= exec_core(thd, nextp);
DBUG_
}
MTR testcase:
--source include/
--source include/
CREATE TABLE t1 (a INT);
DELIMITER |;
CREATE FUNCTION f1() RETURNS INT
BEGIN
INSERT INTO t1 VALUES (1);
RETURN 1;
END|
DELIMITER ;|
--connect(
--connection default
--let $sp_con_id= `SELECT CONNECTION_ID()`
SET DEBUG_SYNC= "sp_lex_
send SELECT f1();
--connection con1
SET DEBUG_SYNC="now WAIT_FOR sp_ready";
--replace_result $sp_con_id sp_con_id
--eval KILL $sp_con_id
SET DEBUG_SYNC="now SIGNAL sp_finish";
--connection default
reap;
disconnect con1;
--source include/
Results in:
Assertion failed: (m_status == DA_ERROR), function sql_errno, file /Users/
06:28:11 UTC - mysqld got signal 6 ;
...
thread #20, stop reason = signal SIGSTOP
frame #0: 0x00007fffcb217d42 libsystem_
frame #1: 0x00007fffcb3055bf libsystem_
frame #2: 0x0000000101811e9b mysqld-
frame #3: 0x0000000101450dd3 mysqld-
frame #4: 0x00007fffcb2f8b3a libsystem_
frame #5: 0x00007fffcb217d43 libsystem_
frame #6: 0x00007fffcb3055bf libsystem_
frame #7: 0x00007fffcb17d420 libsystem_
frame #8: 0x00007fffcb144893 libsystem_
frame #9: 0x00000001012c3500 mysqld-
frame #10: 0x0000000101462bac mysqld-
frame #11: 0x0000000101463631 mysqld-
frame #12: 0x0000000101463c1d mysqld-
frame #13: 0x000000010145be77 mysqld-
frame #14: 0x000000010145d7ac mysqld-
frame #15: 0x000000010136a5ab mysqld-
frame #16: 0x000000010136a2ea mysqld-
frame #17: 0x000000010136e899 mysqld-
frame #18: 0x00000001012f520a mysqld-
frame #19: 0x0000000101445b47 mysqld-
frame #20: 0x00000001014f112a mysqld-
frame #21: 0x00000001015157fa mysqld-
frame #22: 0x00000001015ea2d6 mysqld-
frame #23: 0x00000001015e88c5 mysqld-
frame #24: 0x00000001015e84d1 mysqld-
frame #25: 0x000000010158f7ed mysqld-
frame #26: 0x00000001015843f4 mysqld-
frame #27: 0x0000000101580e78 mysqld-
frame #28: 0x000000010157d72b mysqld-
frame #29: 0x000000010158029c mysqld-
frame #30: 0x0000000101503908 mysqld-
frame #31: 0x000000010150362d mysqld-
frame #32: 0x0000000101c151ad mysqld-
frame #33: 0x00007fffcb3029af libsystem_
frame #34: 0x00007fffcb3028fb libsystem_
frame #35: 0x00007fffcb302101 libsystem_
tags: | added: upstream |
tags: | added: regression |
summary: |
- Assert on KILL'ing a stored routine invocation + Assert on KILL'ing a stored routine invocation | Assertion `m_status == + DA_ERROR' failed. |
Seen as an intermittent main.max_ statement_ time_func failure:
main.max_ statement_ time_func w1 [ fail ]
Test ended at 2017-05-03 09:49:13
CURRENT_TEST: main.max_ statement_ time_func
mysqltest: At line 63: query 'SELECT f1()' failed with wrong errno 2013: 'Lost connection to MySQL server during query', instead of 1886...