#At lp:maria based on revid:knielsen@knielsen-hq.org-20100117084143-u10fexdnq5m0wga8 2807 Michael Widenius 2010-01-17 Fixed race condition when innobase_shutdown_for_mysql() was called before parser was initialized (as it's initialized on first usage) modified: storage/xtradb/pars/lexyy.c storage/xtradb/pars/pars0lex.l === modified file 'storage/xtradb/pars/lexyy.c' --- a/storage/xtradb/pars/lexyy.c 2010-01-06 12:00:14 +0000 +++ b/storage/xtradb/pars/lexyy.c 2010-01-17 11:41:32 +0000 @@ -2786,8 +2786,10 @@ void pars_lexer_close(void) /*==================*/ { - yylex_destroy(); - free(stringbuf); + if (yy_buffer_stack) + yylex_destroy(); + if (stringbuf) + free(stringbuf); stringbuf = NULL; stringbuf_len_alloc = stringbuf_len = 0; } === modified file 'storage/xtradb/pars/pars0lex.l' --- a/storage/xtradb/pars/pars0lex.l 2010-01-06 12:00:14 +0000 +++ b/storage/xtradb/pars/pars0lex.l 2010-01-17 11:41:32 +0000 @@ -669,8 +669,10 @@ void pars_lexer_close(void) /*==================*/ { - yylex_destroy(); - free(stringbuf); + if (yy_buffer_stack) + yylex_destroy(); + if (stringbuf) + free(stringbuf); stringbuf = NULL; stringbuf_len_alloc = stringbuf_len = 0; }