1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

MDEV-26247 Clean up spider_fields

Spider gbh query rewrite should get table for fields in a simple way.
Add a method spider_fields::find_table that searches its table holders
to find table for a given field. This way we will be able to get rid
of the first pass during the gbh creation where field_chains and
field_holders are created.

We also check that the field belongs to a spider table while walking
through the query, so we could remove
all_query_fields_are_query_table_members(). However, this requires an
earlier creation of the table_holder so that tables are added before
checking. We do that, and in doing so, also decouple table_holder and
spider_fields

Remove unused methods and fields. Add comments.
This commit is contained in:
Yuchen Pei
2023-10-13 14:54:45 +11:00
parent 8c1dcb2579
commit 2d1e09a77f
5 changed files with 115 additions and 339 deletions

View File

@@ -676,8 +676,11 @@ public:
spider_string *show_table_status;
spider_string *show_records;
spider_string *show_index;
/* The remote table names */
spider_string *table_names_str;
/* The remote db names */
spider_string *db_names_str;
/* fixme: this field looks useless */
spider_string *db_table_str;
#ifdef SPIDER_HAS_HASH_VALUE_TYPE
my_hash_value_type *db_table_str_hash_value;