mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-25202: JSON_TABLE: Early table reference leads to unexpected result set
Address review input: switch Name_resolution_context::ignored_tables from table_map to a list of TABLE_LIST objects. The rationale is that table bits may be changed due to query rewrites, etc, which may potentially require updating ignored_tables.
This commit is contained in:
committed by
Alexey Botchkov
parent
0984b8ed08
commit
b0817ff8de
@ -198,7 +198,7 @@ public:
|
||||
List<Json_table_column> m_columns;
|
||||
|
||||
/*** Name resolution functions ***/
|
||||
int setup(THD *thd, TABLE_LIST *sql_table, SELECT_LEX *s_lex);
|
||||
bool setup(THD *thd, TABLE_LIST *sql_table, SELECT_LEX *s_lex);
|
||||
|
||||
int walk_items(Item_processor processor, bool walk_subquery,
|
||||
void *argument);
|
||||
@ -226,7 +226,8 @@ public:
|
||||
|
||||
/*** Construction interface to be used from the parser ***/
|
||||
Table_function_json_table(Item *json):
|
||||
m_json(json)
|
||||
m_json(json),
|
||||
m_context_setup_done(false)
|
||||
{
|
||||
cur_parent= &m_nested_path;
|
||||
last_sibling_hook= &m_nested_path.m_nested;
|
||||
@ -250,6 +251,8 @@ private:
|
||||
/* Context to be used for resolving the first argument. */
|
||||
Name_resolution_context *m_context;
|
||||
|
||||
bool m_context_setup_done;
|
||||
|
||||
/* Current NESTED PATH level being parsed */
|
||||
Json_table_nested_path *cur_parent;
|
||||
|
||||
|
Reference in New Issue
Block a user