Commit 7b33b9f2 authored by Michael Widenius's avatar Michael Widenius

Fixed race condition when innobase_shutdown_for_mysql() was called before...

Fixed race condition when innobase_shutdown_for_mysql() was called before parser was initialized (as it's initialized on first usage)
parent 9ca219ee
...@@ -2786,7 +2786,9 @@ void ...@@ -2786,7 +2786,9 @@ void
pars_lexer_close(void) pars_lexer_close(void)
/*==================*/ /*==================*/
{ {
if (yy_buffer_stack)
yylex_destroy(); yylex_destroy();
if (stringbuf)
free(stringbuf); free(stringbuf);
stringbuf = NULL; stringbuf = NULL;
stringbuf_len_alloc = stringbuf_len = 0; stringbuf_len_alloc = stringbuf_len = 0;
......
...@@ -669,7 +669,9 @@ void ...@@ -669,7 +669,9 @@ void
pars_lexer_close(void) pars_lexer_close(void)
/*==================*/ /*==================*/
{ {
if (yy_buffer_stack)
yylex_destroy(); yylex_destroy();
if (stringbuf)
free(stringbuf); free(stringbuf);
stringbuf = NULL; stringbuf = NULL;
stringbuf_len_alloc = stringbuf_len = 0; stringbuf_len_alloc = stringbuf_len = 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