Commit feb425a9 authored by bell@sanja.is.com.ua's avatar bell@sanja.is.com.ua

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

parent 19bc3624
...@@ -50,7 +50,13 @@ Item::Item(): ...@@ -50,7 +50,13 @@ Item::Item():
next= thd->free_list; // Put in free list next= thd->free_list; // Put in free list
thd->free_list= this; thd->free_list= this;
loop_id= 0; 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++; 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