Bug #107758 Force Index success (expect fail) after drop index
Submitted: 5 Jul 2022 13:06 Modified: 5 Jul 2022 13:35
Reporter: ggwdwsbs W Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[5 Jul 2022 13:06] ggwdwsbs W
Description:
A select statement with Force Index success (expect fail), after drop this index.

How to repeat:
CREATE TABLE test_table (aaaaa int, bbbbb int, ccccc int,  ddddd int);

insert into test_table values(1, 1, 1, 1);

alter table test_table add index idx_1(bbbbb, ccccc);

alter table test_table add index idx_1_1(bbbbb, ccccc, ddddd);

alter table test_table drop index idx_1;

select * from test_table force index(idx_1);

Statement Return:
aaaaa	bbbbb	ccccc	ddddd
    1	1	1	1

Expect:
Key 'idx_1' doesn't exist in table 'test_table'

Test on 5.7.38
[5 Jul 2022 13:35] MySQL Verification Team
Hi Mr. W,

Thank you for your bug report.

However, please do not report the same bug more then once.

Duplicate.