From 17589989eec9cf4e9f7084505710a42929efe115 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Tue, 17 Jan 2017 13:09:04 +0100 Subject: MDEV-10972: Insert from select / view / union -- repeatable crash in 10.1, 10.2 Linux/Mac/Windows save thd->select_number between parsing and executions (in case it was not complete executed due to errors (for example epsent table)) --- sql/sp.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/sp.cc') diff --git a/sql/sp.cc b/sql/sp.cc index 2e268e483e7..5a64c28865e 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -760,6 +760,7 @@ static sp_head *sp_compile(THD *thd, String *defstr, ulonglong sql_mode, else { sp= thd->lex->sphead; + sp->set_select_number(thd->select_number); } thd->pop_internal_handler(); -- cgit v1.2.1