1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Bug#37003 Tests sporadically crashes with embedded server

The problem was that when a embedded linked version of mysqltest
crashed there was no way to obtain a stack trace if no core file
is available. Another problem is that the embedded version of
libmysql was not behaving (crash) the same as the non-embedded with
respect to sending commands to a explicitly closed connection.

The solution is to generate a mysqltest's stack trace on crash
and to enable "reconnect" if the connection handle was explicitly
closed so the behavior matches the non-embedded one.
This commit is contained in:
Davi Arnaut
2008-06-18 13:17:15 -03:00
parent c20188e011
commit 30bd1d7cb3
17 changed files with 227 additions and 115 deletions

View File

@@ -79,6 +79,15 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
my_bool result= 1;
THD *thd=(THD *) mysql->thd;
NET *net= &mysql->net;
my_bool stmt_skip= stmt ? stmt->state != MYSQL_STMT_INIT_DONE : FALSE;
if (!thd)
{
/* Do "reconnect" if possible */
if (mysql_reconnect(mysql) || stmt_skip)
return 1;
thd= (THD *) mysql->thd;
}
#if defined(ENABLED_PROFILING) && defined(COMMUNITY_SERVER)
thd->profiling.start_new_query();