Skip to content

Commit 1eda21b

Browse files
spetruniaAlexey Botchkov
authored andcommitted
Code cleanup: thd->lex->current_select->context == s_lex here, so use s_lex
1 parent a964080 commit 1eda21b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sql/json_table.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,12 +1044,12 @@ int Table_function_json_table::setup(THD *thd, TABLE_LIST *sql_table,
10441044
{
10451045
bool save_is_item_list_lookup;
10461046
bool res;
1047-
save_is_item_list_lookup= thd->lex->current_select->is_item_list_lookup;
1048-
thd->lex->current_select->is_item_list_lookup= 0;
1047+
save_is_item_list_lookup= s_lex->is_item_list_lookup;
1048+
s_lex->is_item_list_lookup= 0;
10491049

10501050
// Prepare the name resolution context. First, copy the context that is
10511051
// used for name resolution of the WHERE clause
1052-
*m_context= thd->lex->current_select->context;
1052+
*m_context= s_lex->context;
10531053

10541054
// Then, restrict it to only allow to refer to tables that come before the
10551055
// table function reference
@@ -1061,7 +1061,7 @@ int Table_function_json_table::setup(THD *thd, TABLE_LIST *sql_table,
10611061

10621062
res= m_json->fix_fields_if_needed(thd, &m_json);
10631063

1064-
thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup;
1064+
s_lex->is_item_list_lookup= save_is_item_list_lookup;
10651065
s_lex->set_non_agg_field_used(saved_non_agg_field_used);
10661066

10671067
if (res)

0 commit comments

Comments
 (0)