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:
@ -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)
|
||||
|
Reference in New Issue
Block a user