diff options
author | Monty <monty@mariadb.org> | 2022-12-28 16:42:27 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2023-02-10 12:58:50 +0200 |
commit | 4be0bfad98c41acb6a2a7d5722051081ab5d239a (patch) | |
tree | 748b69795be7dbcbbbd9794229b7fd4fab9272f0 /sql/sql_show.cc | |
parent | 9a4110aa5799d63faced5f986fab9035785a9310 (diff) | |
download | mariadb-git-4be0bfad98c41acb6a2a7d5722051081ab5d239a.tar.gz |
Simplified code in generate_derived_keys() and when using pos_in_tables
Added comments that not used keys of derivied tables will be deleted.
Added some comments about checking if pos_in_table_list is 0.
Other things:
- Added a marker (DBTYPE_IN_PREDICATE) in TABLE_LIST->derived_type
to indicate that the table was generated from IN (list). This is
useful for debugging and can later be used by explain if needed.
- Removed a not needed test of table->pos_in_table_list as it should
always be valid at this point in time.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index a716cae6955..05d0f601434 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -8899,6 +8899,10 @@ bool optimize_schema_tables_reads(JOIN *join) tab; tab= next_linear_tab(join, tab, WITH_BUSH_ROOTS)) { + /* + The following is true for the temporary table that will hold the + final result. + */ if (!tab->table || !tab->table->pos_in_table_list) continue; @@ -8970,6 +8974,10 @@ bool get_schema_tables_result(JOIN *join, tab; tab= next_linear_tab(join, tab, WITH_BUSH_ROOTS)) { + /* + The following is true for the temporary table that will hold the + final result. + */ if (!tab->table || !tab->table->pos_in_table_list) break; |