[Commits] d3004d1b880: MDEV-25202: JSON_TABLE: Early table reference leads to unexpected result set
revision-id: d3004d1b88072c170a0764a329bfdcec5406328e (mariadb-10.5.2-591-gd3004d1b880) parent(s): 0aa8e0eabdf3e157159d9dd6e0338633e4b49baa author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2021-04-17 10:55:35 +0300 message: MDEV-25202: JSON_TABLE: Early table reference leads to unexpected result set Followup to review input address commit: pass the new parameter type to find_field_in_table_ref(). --- sql/sql_acl.cc | 5 +++-- sql/sql_help.cc | 2 +- sql/sql_select.cc | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 8f096f4074d..24e730dcb6b 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -6966,8 +6966,9 @@ int mysql_table_grant(THD *thd, TABLE_LIST *table_list, Field *f=find_field_in_table_ref(thd, table_list, column->column.ptr(), column->column.length(), column->column.ptr(), NULL, NULL, - table_map(0), NULL, TRUE, FALSE, - &unused_field_idx, FALSE, &dummy); + ignored_tables_list_t(NULL), NULL, + TRUE, FALSE, &unused_field_idx, FALSE, + &dummy); if (unlikely(f == (Field*)0)) { my_error(ER_BAD_FIELD_ERROR, MYF(0), diff --git a/sql/sql_help.cc b/sql/sql_help.cc index 916315cf67e..01c47bc2b21 100644 --- a/sql/sql_help.cc +++ b/sql/sql_help.cc @@ -99,7 +99,7 @@ static bool init_fields(THD *thd, TABLE_LIST *tables, Lex_cstring_strlen(find_fields->table_name), Lex_cstring_strlen(find_fields->field_name))); if (!(find_fields->field= find_field_in_tables(thd, field, tables, NULL, - table_map(0), + ignored_tables_list_t(NULL), 0, REPORT_ALL_ERRORS, 1, TRUE))) DBUG_RETURN(1); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 82af960078b..d96a6b10cae 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -24521,8 +24521,8 @@ find_order_in_list(THD *thd, Ref_ptr_array ref_pointer_array, order_item_type == Item::REF_ITEM) { from_field= find_field_in_tables(thd, (Item_ident*) order_item, tables, - NULL, table_map(0), &view_ref, - IGNORE_ERRORS, FALSE, FALSE); + NULL, ignored_tables_list_t(NULL), + &view_ref, IGNORE_ERRORS, FALSE, FALSE); if (!from_field) from_field= (Field*) not_found_field; }
participants (1)
-
psergey