1. 17 Oct, 2006 1 commit
    • gkodinov/kgeorge@macbook.gmz's avatar
      Bug#21798: memory leak during query execution with subquery in column · f7b89376
      gkodinov/kgeorge@macbook.gmz authored
                  list using a function
      When executing dependent subqueries they are re-inited and re-exec() for 
      each row of the outer context.
      The cause for the bug is that during subquery reinitialization/re-execution,
      the optimizer reallocates JOIN::join_tab, JOIN::table in make_simple_join()
      and the local variable in 'sortorder' in create_sort_index(), which is
      allocated by make_unireg_sortorder().
      Care must be taken not to allocate anything into the thread's memory pool
      while re-initializing query plan structures between subquery re-executions.
      All such items mush be cached and reused because the thread's memory pool
      is freed at the end of the whole query.
      Note that they must be cached and reused even for queries that are not 
      otherwise cacheable because otherwise it will grow the thread's memory 
      pool every time a cacheable query is re-executed. 
      We provide additional members to the JOIN structure to store references 
      to the items that need to be cached.
      f7b89376
  2. 07 Sep, 2006 2 commits
  3. 05 Sep, 2006 2 commits
  4. 04 Sep, 2006 5 commits
  5. 01 Sep, 2006 3 commits
  6. 31 Aug, 2006 3 commits
  7. 26 Aug, 2006 3 commits
  8. 25 Aug, 2006 3 commits
  9. 24 Aug, 2006 5 commits
  10. 23 Aug, 2006 1 commit
  11. 22 Aug, 2006 12 commits