Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
5.5.32
-
None
-
None
-
libmysqld on Linux linux-yxkl.site 3.7.10-1.16-desktop #1 SMP PREEMPT Fri May 31 20:21:23 UTC 2013 (97c14ba) x86_64 x86_64 x86_64 GNU/Linux
Description
Reason is that static variable init_settings struct is not reset in mysql_library_end. More detailed description below.
Test to reproduce:
mysql_library_init(...)
mysql_library_end()
mysql_library_init(...)
–
In dbug.c there is a static varibale init_done. Once set to TRUE in code_state(), it remains TRUE. In code_state there is an important operations behind it, for example, setting the outfile for struct init_settings.
if init_settings.outfile is NULL server will end up SEGFAULT due to null-pointer reference in dbug.c:_db_flush. Problem is that outfile is set to NULL when mysql_library_end is called in DBUGCloseFile. Thus, once mysql_library_end is called embedded server can't be used anymore because init_settings struct won't be reinitialized.
The ability to use embedded server for several purposes is crucial for gateway, thus, I'd respect your insight on this.