← Back to team overview

maria-developers team mailing list archive

Re: init_one_table problem.

 

Hi, Kyungnam!

On Mar 25, Kyungnam wrote:
> Hi ~
> 
> I hava a problem below code in my plugin. 
> ----------------------------------
> TABLE_LIST tables;
> TABLE table;
> tables.init_one_table(C_STRING_WITH_LEN("performance_schema"),C_STRING_WITH_LEN("events_statements_current"),
>                             events_statements_current, TL_READ);
> if(table = tables.table) {...}
> -------------------------------------------------------
> 
> During debugging, I found that tables.table is null. 
> Is there a additional task before my code? 

Yes, you need to open the table. TABLE_LIST::init_one_table only sets
necessary fields in the TABLE_LIST object to prepare it for opening.

Regards,
Sergei


References