Commit 36be492d authored by Sergey Petrunya's avatar Sergey Petrunya

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

parent 837c6722
...@@ -1227,7 +1227,7 @@ static bool convert_subq_to_sj(JOIN *parent_join, Item_in_subselect *subq_pred) ...@@ -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->tablenr= table_no;
tl->table->map= ((table_map)1) << table_no; tl->table->map= ((table_map)1) << table_no;
if (tl->is_jtbm()) 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; SELECT_LEX *old_sl= tl->select_lex;
tl->select_lex= parent_join->select_lex; tl->select_lex= parent_join->select_lex;
for (TABLE_LIST *emb= tl->embedding; for (TABLE_LIST *emb= tl->embedding;
......
...@@ -1320,6 +1320,7 @@ struct TABLE_LIST ...@@ -1320,6 +1320,7 @@ struct TABLE_LIST
/* If this is a jtbm semi-join object: corresponding subselect predicate */ /* If this is a jtbm semi-join object: corresponding subselect predicate */
Item_in_subselect *jtbm_subselect; Item_in_subselect *jtbm_subselect;
/* TODO: check if this can be joined with tablenr_exec */
uint jtbm_table_no; uint jtbm_table_no;
SJ_MATERIALIZATION_INFO *sj_mat_info; SJ_MATERIALIZATION_INFO *sj_mat_info;
...@@ -1445,6 +1446,7 @@ struct TABLE_LIST ...@@ -1445,6 +1446,7 @@ struct TABLE_LIST
table_map view_used_tables; table_map view_used_tables;
table_map map_exec; table_map map_exec;
/* TODO: check if this can be joined with jtbm_table_no */
uint tablenr_exec; uint tablenr_exec;
/* Ptr to parent MERGE table list item. See top comment in ha_myisammrg.cc */ /* Ptr to parent MERGE table list item. See top comment in ha_myisammrg.cc */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment