Commit a03cf34f authored by unknown's avatar unknown

fixed bug, which lead to crash mysqld by running 'mysql some_db_with_tables'

parent f974646a
......@@ -50,7 +50,13 @@ Item::Item():
next= thd->free_list; // Put in free list
thd->free_list= this;
loop_id= 0;
if (thd->lex.current_select->parsing_place == SELECT_LEX_NODE::SELECT_LIST)
/*
Item constractor can be called during execution other tnec SQL_COM
command => we should check thd->lex.current_select on zero (thd->lex
can be uninitialized)
*/
if (thd->lex.current_select &&
thd->lex.current_select->parsing_place == SELECT_LEX_NODE::SELECT_LIST)
thd->lex.current_select->select_items++;
}
......
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