1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-5106: Server crashes in Explain_union::print_explain on ER_TOO_BIG_SELECT

- Don't save UNION's EXPLAIN data if optimization failed with 
  an error. We could end up saving incomplete plan, which will 
  cause a crash when we attempt to print it.
This commit is contained in:
Sergey Petrunya
2013-10-10 20:30:32 +04:00
parent 582ecb2a25
commit 094f70fd19
5 changed files with 30 additions and 2 deletions

View File

@ -630,7 +630,7 @@ bool st_select_lex_unit::exec()
saved_error= optimize();
if (!was_executed && thd->lex->explain)
if (!saved_error && !was_executed && thd->lex->explain)
save_union_explain(thd->lex->explain);
if (uncacheable || !item || !item->assigned() || describe)