I'm looking at your bug report http://bugs.mysql.com/bug.php?id=42946 .
you wrote "Looks like the free_root() memory reclamation which occurs at
the end of the dispatch_command() function in sql_parse.cc probably
needs to be called more often when working with large multi-statement
And in the bug report itself "I would estimate that bug fix is less than
5 LOC to fix.".
I have looked at adding a free_root() in each iteration of the loop of
"case COM_QUERY" in dispatch_command(), but on the second iteration
(second query of the big multi-query statement) it would have the
side-effect of freeing thd->query (which is allocated by alloc_query()
before the loop starts), so would cause problems, I guess.
Did I interpret your suggestion wrongly?
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
www.sun.com / www.mysql.com