1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-09 11:41:36 +03:00
Files
mariadb/mysql-test/suite/compat/oracle/r
Monty 5e5a8eda16 Derived tables and union can now create distinct keys
The idea is that instead of marking all select_lex's with DISTINCT, we
only mark those that really need distinct result.

Benefits of this change:
- Temporary tables used with derived tables, UNION, IN are now smaller
  as duplicates are removed already on the insert phase.
- The optimizer can now produce better plans with EQ_REF. This can be
  seen from the tests where several queries does not anymore materialize
  derived tables twice.
- Queries affected by 'in_predicate_conversion_threshold' where large IN
  lists are converted to sub query produces better plans.

Other things:
- Removed on duplicate call to sel->init_select() in
  LEX::add_primary_to_query_expression_body()
- I moved the testing of
  tab->table->pos_in_table_list->is_materialized_derived()
  in join_read_const_table() to the caller as it caused problems for
  derived tables that could be proven to be const tables.
  This also is likely to fix some bugs as if join_read_const_table()
  was aborted, the table was left marked as JT_CONST, which cannot
  be good.  I added an ASSERT there for now that can be removed when
  the code has been properly tested.
2023-02-02 22:32:57 +03:00
..
2022-04-21 17:46:40 +03:00
2022-09-20 16:53:20 +03:00
2022-05-18 01:22:29 +02:00
2020-05-25 19:41:58 +03:00
2022-09-20 16:53:20 +03:00
2020-04-15 09:56:03 +03:00
2022-11-17 08:37:35 +02:00
2022-09-21 09:33:07 +03:00
2022-09-21 09:33:07 +03:00
2022-09-21 10:59:56 +03:00