You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#32855925: SELECT #2 WILL BE DISPLAYED TWICE WHEN WE EXPLAIN THE SQL
Post-push fix.
ASan reported memory leaks from some EXPLAIN tests, such as
main.explain_tree.
The reason was that the Json_dom objects that were discarded to avoid
describing a subquery twice, were not properly destroyed.
The EXPLAIN code uses unique_ptr to make sure the Json_dom objects are
destroyed, but there are windows in which the objects only exist as
unmanaged raw pointers. This patch closes the window which caused this
memory leak by changing ExplainChild::obj from a raw pointer to a
unique_ptr, so that it gets destroyed even if it doesn't make it into
the final tree that describes the full plan.
Change-Id: I0f0885da867e8a34335ff11f3ae9da883a878ba4
0 commit comments