Hi Antony,
I'm looking at your bug report http://bugs.mysql.com/bug.php?id=42946 .
In http://antbits.blogspot.com/2009/02/yet-more-on-stored-procedure.html
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
queries."
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?
Thank you!
--
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
Bordeaux, France
www.sun.com / www.mysql.com