Commit 1eda21be authored by Sergei Petrunia's avatar Sergei Petrunia Committed by Alexey Botchkov

Code cleanup: thd->lex->current_select->context == s_lex here, so use s_lex

parent a9640809
...@@ -1044,12 +1044,12 @@ int Table_function_json_table::setup(THD *thd, TABLE_LIST *sql_table, ...@@ -1044,12 +1044,12 @@ int Table_function_json_table::setup(THD *thd, TABLE_LIST *sql_table,
{ {
bool save_is_item_list_lookup; bool save_is_item_list_lookup;
bool res; bool res;
save_is_item_list_lookup= thd->lex->current_select->is_item_list_lookup; save_is_item_list_lookup= s_lex->is_item_list_lookup;
thd->lex->current_select->is_item_list_lookup= 0; s_lex->is_item_list_lookup= 0;
// Prepare the name resolution context. First, copy the context that is // Prepare the name resolution context. First, copy the context that is
// used for name resolution of the WHERE clause // used for name resolution of the WHERE clause
*m_context= thd->lex->current_select->context; *m_context= s_lex->context;
// Then, restrict it to only allow to refer to tables that come before the // Then, restrict it to only allow to refer to tables that come before the
// table function reference // table function reference
...@@ -1061,7 +1061,7 @@ int Table_function_json_table::setup(THD *thd, TABLE_LIST *sql_table, ...@@ -1061,7 +1061,7 @@ int Table_function_json_table::setup(THD *thd, TABLE_LIST *sql_table,
res= m_json->fix_fields_if_needed(thd, &m_json); res= m_json->fix_fields_if_needed(thd, &m_json);
thd->lex->current_select->is_item_list_lookup= save_is_item_list_lookup; s_lex->is_item_list_lookup= save_is_item_list_lookup;
s_lex->set_non_agg_field_used(saved_non_agg_field_used); s_lex->set_non_agg_field_used(saved_non_agg_field_used);
if (res) if (res)
......
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