Fix a compile error, and most likely a bug: jtb_table_no holds table number, not table->map.

This commit is contained in:
Sergey Petrunya 2011-07-20 11:56:28 +04:00
parent 837c6722ed
commit 36be492dc0
2 changed files with 3 additions and 1 deletions

View file

@ -1227,7 +1227,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred)
tl->table->tablenr= table_no;
tl->table->map= ((table_map)1) << table_no;
if (tl->is_jtbm())
tl->jtbm_table_no= tl->table->map;
tl->jtbm_table_no= tl->table->tablenr;
SELECT_LEX *old_sl= tl->select_lex;
tl->select_lex= parent_join->select_lex;
for (TABLE_LIST *emb= tl->embedding;

View file

@ -1320,6 +1320,7 @@ struct TABLE_LIST
/* If this is a jtbm semi-join object: corresponding subselect predicate */
Item_in_subselect *jtbm_subselect;
/* TODO: check if this can be joined with tablenr_exec */
uint jtbm_table_no;
SJ_MATERIALIZATION_INFO *sj_mat_info;
@ -1445,6 +1446,7 @@ struct TABLE_LIST
table_map view_used_tables;
table_map map_exec;
/* TODO: check if this can be joined with jtbm_table_no */
uint tablenr_exec;
/* Ptr to parent MERGE table list item. See top comment in ha_myisammrg.cc */