Commit 9e22cae1 authored by Sergei Golubchik's avatar Sergei Golubchik

embedded use-after-free ASAN error

Close MYSQL (and destroy THD) in the same thread where it was used,
because THD embeds MDL_context, that owns some LF_PINS, that remember
a pointer to my_thread_var->stack_ends_here.
parent bfed1bfe
......@@ -903,6 +903,8 @@ pthread_handler_t connection_thread(void *arg)
end_thread:
cn->query_done= 1;
mysql_close(cn->mysql);
cn->mysql= 0;
mysql_thread_end();
pthread_exit(0);
return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment