diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-10-16 12:13:51 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-10-16 12:13:51 +0400 |
commit | 4bed7aa858e7946471fb37ce30f3273ec28867ce (patch) | |
tree | 88ed0acf75fcb99839ea364e418d2bc19c0705b8 /sql/log_event_old.cc | |
parent | 207f0082202fd822fe1d0d3083c7fff5de6d8847 (diff) | |
download | mariadb-git-4bed7aa858e7946471fb37ce30f3273ec28867ce.tar.gz |
MDEV-3798: [SHOW] EXPLAIN UPDATE/DELETE, Memory leak in binlog.binlog_base64_flag:
- It turns out, there are statements that will call lex_start(thd->lex)
after parsing has been finished. lex_start() will set lex->explain=NULL,
which will lose the pointer to already allocated Explain_plan object.
- To get rid of this, switch to lazy creation of lex->explain. Now, it is
created only when we get a part ot query plan.
Diffstat (limited to 'sql/log_event_old.cc')
-rw-r--r-- | sql/log_event_old.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc index 698118e3bda..1aa7dfba635 100644 --- a/sql/log_event_old.cc +++ b/sql/log_event_old.cc @@ -86,6 +86,7 @@ Old_rows_log_event::do_apply_event(Old_rows_log_event *ev, const Relay_log_info call might reset the value of current_stmt_binlog_format, so we need to do any changes to that value after this function. */ + delete_explain_query(thd->lex); lex_start(ev_thd); mysql_reset_thd_for_next_command(ev_thd, 0); |