1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

Fixed bug mdev-3851.

Any ref access to a table by a key fully extended by the components
of the primary key should be actually an eq_ref access.
This commit is contained in:
Igor Babaev
2012-11-11 11:47:44 -08:00
parent 0380b0e280
commit e08f4f1630
5 changed files with 61 additions and 10 deletions

View File

@@ -287,6 +287,27 @@ select o_orderkey, p_partkey
and o_orderkey=l_orderkey and p_partkey=l_partkey;
show status like 'handler_read%';
--echo #
--echo # Bug mdev-3851: ref access used instead of expected eq_ref access
--echo # when extended_keys=on
--echo #
create table t0 (a int);
insert into t0 values (1), (2), (3), (4), (5);
create index i_p_size on part(p_size);
set optimizer_switch='extended_keys=on';
explain
select * from t0, part ignore index (primary)
where p_partkey=t0.a and p_size=1;
select * from t0, part ignore index (primary)
where p_partkey=t0.a and p_size=1;
drop table t0;
drop index i_p_size on part;
DROP DATABASE dbt3_s001;
use test;