Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
2.3.1
-
None
-
None
-
None
-
windows x64
Description
below code from libmariadb.c, 2095 line, mthd_my_real_connect
error:
|
reset_sigpipe(mysql);
|
DBUG_PRINT("error",("message: %u (%s)",net->last_errno,net->last_error)); |
{
|
/* Free alloced memory */ |
end_server(mysql);
|
/* only free the allocated memory, user needs to call mysql_close */ |
mysql_close_memory(mysql);
|
if (!(((ulong) client_flag) & CLIENT_REMEMBER_OPTIONS)) |
mysql_close_options(mysql);
|
}
|
DBUG_RETURN(0);
|
if this function fails, if you don't set CLIENT_REMEMBER_OPTIONS,
mysql_close_options called.
in mysql_close_options, my_context_destroy called, and DestroyFiber called on windows.
if fails occured on mysql_real_connect_cont (on coroutine) ... current thread will be gone.
resolve:
1. use CLIENT_REMEMBER_OPTIONS flag.
2. do not call mysql_close_options on mthd_my_real_connect. cleanup should be outside of coroutine.