fixed uninitialized pointer
This commit is contained in:
parent
088cd27e74
commit
2a33b0514e
@ -1821,7 +1821,12 @@ extern "C" int my_message_sql(uint error, const char *str,
|
||||
DBUG_PRINT("error", ("Message: '%s'", str));
|
||||
if ((thd= current_thd))
|
||||
{
|
||||
if (thd->lex.current_select->no_error && !thd->is_fatal_error)
|
||||
/*
|
||||
thd->lex.current_select equel to zero if lex structure is not inited
|
||||
(not query command (COM_QUERY))
|
||||
*/
|
||||
if (thd->lex.current_select &&
|
||||
thd->lex.current_select->no_error && !thd->is_fatal_error)
|
||||
{
|
||||
DBUG_PRINT("error", ("above error converted to warning"));
|
||||
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, error, str);
|
||||
|
@ -1057,6 +1057,11 @@ bool do_command(THD *thd)
|
||||
|
||||
net= &thd->net;
|
||||
thd->current_tablenr=0;
|
||||
/*
|
||||
indicator of uninitialized lex => normal flow of errors handling
|
||||
(see my_message_sql)
|
||||
*/
|
||||
thd->lex.current_select= 0;
|
||||
|
||||
packet=0;
|
||||
old_timeout=net->read_timeout;
|
||||
|
Loading…
x
Reference in New Issue
Block a user