Rafal,
Right. I thought I'd fixed that...I was sure of it... Oh well, here's the
patch with the correct fix. ;)
http://lists.mysql.com/commits/45126
Chuck
> -----Original Message-----
> > + thd->make_lex_string(&lex_ts_name, ts_name->ptr(),
> > + ts_name->length(), FALSE);
> > + ts_list.push_back(&lex_ts_name);
>
> Using make_lex_string() here creates potential memory leak.
> The reason is that this function allocates memory for the
> string using thread's mem_root. This memory can't be reused -
> it will stay allocated until the end of thread's life.
> Thus, each time we call find_tablespace_schema_row() we
> decrease the amount of memory available to the thread.
>
> This is not acceptable, especially that there is no reason
> for using dynamic allocation and copying the name string to
> the heap. It would be sufficient to initialize lex_ts_name so
> that it points at the string stored in ts_name.
>
> > +
> > + if (InformationSchemaIterator::prepare_is_table(
> > + thd, &is_table, &ha, &orig_col, is_table_idx, ts_list))
> > + DBUG_RETURN(TRUE);