← Back to team overview

maria-developers team mailing list archive

Re: [Org FW][RE]Re: init_one_table problem.

 

Hi, 김경남!

On Mar 25, 김경남 wrote:
> Hi, Sergei !
> 
> below contents is my previous question . 
> 
> After sending email , I see the debug message.like below.
> 
> "Assertion thd == current_thd() failed."
> 
> My code contains.
> 
> THD thd = new THD;
> 
> so I changed my code as  
> 
> THD thd = current_thd;
> 
> but thd is null. 
> 
> how to I fix it? 

Note that sql_acl.cc (for example) has

  THD *thd=new THD;
  thd->thread_stack= (char*) &thd;
  thd->store_globals();

All three lines are important.
In particular, THD::store_global sets current_thd.

Regards,
Sergei



References