mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
fixed bug, which lead to crash mysqld by running 'mysql some_db_with_tables'
This commit is contained in:
parent
f974646ab0
commit
a03cf34f7f
1 changed files with 7 additions and 1 deletions
|
@ -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++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue