List:Internals« Previous MessageNext Message »
From:Guilhem Bichot Date:June 29 2009 2:45pm
Subject:About fixing
"memory exaustion when performing large multi-statement queries"
View as plain text  
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
Thread
About fixing"memory exaustion when performing large multi-statement queries"Guilhem Bichot29 Jun
  • Re: About fixing"memory exaustion when performing large multi-statement queries"Antony T Curtis29 Jun
    • Re: About fixing"memory exaustion when performing large multi-statement queries"Antony T Curtis29 Jun
      • Re: About fixing"memory exaustion when performing large multi-statement queries"Davi Arnaut29 Jun
        • Re: About fixing"memory exaustion when performing large multi-statement queries"Antony Curtis29 Jun