My analysis shows that PBXT (myxt_create_thread() in storage/pbxt/src/myxt_xt.cc in particular) thinks that sizeof(THD) is 7092,
while the SQL layer (THD::store_globals() in particular) thinks that sizeof(THD) is 6880).
When myxt_create_thread() will make this assignment:
new_thd->thread_stack = (char *) &new_thd;
it will "miss" the thread_stack variable and set value of something else. THD::store_globals(), which is called immediately after, will still see thread_stack==0 and fail an assertion.
The reason for sizeof difference seems to be that THD has different sizes depending on whether it is an embedded server or not. PBXT has sizeof(THD) from non-embedded server and hence fails in embedded server.
My analysis shows that PBXT (myxt_create_ thread( ) in storage/ pbxt/src/ myxt_xt. cc in particular) thinks that sizeof(THD) is 7092, globals( ) in particular) thinks that sizeof(THD) is 6880).
while the SQL layer (THD::store_
When myxt_create_ thread( ) will make this assignment:
new_thd- >thread_ stack = (char *) &new_thd;
it will "miss" the thread_stack variable and set value of something else. THD::store_ globals( ), which is called immediately after, will still see thread_stack==0 and fail an assertion.
The reason for sizeof difference seems to be that THD has different sizes depending on whether it is an embedded server or not. PBXT has sizeof(THD) from non-embedded server and hence fails in embedded server.