List:Internals« Previous MessageNext Message »
From:Vasil Dimov Date:July 16 2007 10:37am
Subject:Re: Best way to determine table name in INFORMATION_SCHEMA's
fill_table()?
View as plain text  
On Mon, Jul 16, 2007 at 11:38:14 +0200, Sergei Golubchik wrote:
> On Jul 13, Vasil Dimov wrote:
[...]
> > I can see that (assuming the TABLE_LIST* argument name "table") the
> > name of the table being filled is set in these fields:
> > table->alias
> > table->schema_table_name
> > table->schema_table->table_name
> > 
> > Does it matter which one am I going to use? Is it possible that in
> > some circumstances some of these is not set or is set to something
> > else than the plain table name?
> 
> <disclaimer>I didn't look in the debugger, below is an educated
> guess</disclaimer>
> 
> I'd use table->schema_table_name. table->schema_table->table_name seems
> to be the same though. table->alias looks problematic, try for example
> 
>   SELECT * FROM INFORMATION_SCHEMA.ENGINES as t1;

Thanks! I'm currently using table->schema_table_name so I will leave it
that way. Less dereferencing looks safer :-)

-- 
Vasil Dimov
moc.elcaro@stripped        Software Developer @ Oracle/Innobase Oy
gro.DSBeerF@dv                Committer @ FreeBSD.org
gro.d5v@dv                    Home @ Sofia, Bulgaria

Attachment: [application/pgp-signature]
Thread
Best way to determine table name in INFORMATION_SCHEMA'sfill_table()?Vasil Dimov13 Jul
  • Re: Best way to determine table name in INFORMATION_SCHEMA's fill_table()?Sergei Golubchik16 Jul
    • Re: Best way to determine table name in INFORMATION_SCHEMA'sfill_table()?Vasil Dimov16 Jul