1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-30486 Table is not eliminated in bb-11.0

Some tables where not eliminated when they could have been.
This was caused because HA_KEYREAD_ONLY is not set anymore for InnoDB
clustered index and the elimination code was depending on
field->part_of_key_not_clustered which was not set if HA_KEYREAD_ONLY
is not present.

Fixed by moving out field->part_of_key and
field->part_of_key_not_clustered from under HA_KEYREAD_ONLY (which
they should never have been part of).

Other things:
- Fixed a bug in make_join_select() that caused range to be used when
  there where elminiated or constant tables present (Caused wrong
  change of plans in join_outer_innodb.test). This also affected
  show_explain.test and subselct_sj_mat.test where wrong 'range's where
  replaced with index scans.

Reviewer: Sergei Petrunia <sergey@mariadb.com>
This commit is contained in:
Monty
2023-01-27 19:36:02 +02:00
parent 01c82173dd
commit fe1f4ca8ce
7 changed files with 31 additions and 10 deletions

View File

@ -442,7 +442,6 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.a2 1
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.d1 1 Using where
1 SIMPLE t6 eq_ref PRIMARY PRIMARY 4 test.t1.a3 1 Using where
1 SIMPLE e2 eq_ref PRIMARY PRIMARY 4 test.t6.f1 1 Using where
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 1 test.t1.a7 1
1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t1.a5 1
1 SIMPLE t12 eq_ref PRIMARY PRIMARY 4 test.t11.k3 1 Using where
@ -465,7 +464,6 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t4 eq_ref PRIMARY PRIMARY 4 test.t1.a2 1
1 SIMPLE t5 eq_ref PRIMARY PRIMARY 4 test.t4.d1 1 Using where
1 SIMPLE t6 eq_ref PRIMARY PRIMARY 4 test.t1.a3 1 Using where
1 SIMPLE e2 eq_ref PRIMARY PRIMARY 4 test.t6.f1 1 Using where
1 SIMPLE t7 eq_ref PRIMARY PRIMARY 1 test.t1.a7 1
1 SIMPLE t11 eq_ref PRIMARY PRIMARY 4 test.t1.a5 1
1 SIMPLE t12 eq_ref PRIMARY PRIMARY 4 test.t11.k3 1 Using where