Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not report "Impossible WHERE" queries as ones not using an index #156

Open
macbre opened this issue Oct 1, 2018 · 0 comments
Open

Do not report "Impossible WHERE" queries as ones not using an index #156

macbre opened this issue Oct 1, 2018 · 0 comments
Labels
Milestone

Comments

@macbre
Copy link
Owner

macbre commented Oct 1, 2018

SELECT foo FROM 0019_queries_not_using_indices WHERE 1 = 0;

--

mysql@localhost[index_digest]>explain SELECT foo FROM 0019_queries_not_using_indices WHERE 1 = 0;
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+------------------+
| id | select_type | table | partitions | type | possible_keys | key  | key_len | ref  | rows | filtered | Extra            |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+------------------+
|  1 | SIMPLE      | NULL  | NULL       | NULL | NULL          | NULL | NULL    | NULL | NULL |     NULL | Impossible WHERE |
+----+-------------+-------+------------+------+---------------+------+---------+------+------+----------+------------------+
1 row in set, 1 warning (0,00 sec)
{
 "explain_filtered": null, 
 "explain_rows": null, 
 "explain_possible_keys": null, 
 "explain_extra": "Impossible WHERE", 
 "query": "/* 70211dca */ select curation_cms.topics.id from curation_cms.topics where 1 = 0"
}

See #44 for a similar issue, but with a value that is not present in the table.

File Impossible WHERE as a new report type.

@macbre macbre added this to the v1.3 milestone Oct 1, 2018
@macbre macbre modified the milestones: v1.3, v1.4.0 Aug 22, 2020
@macbre macbre removed the linters label Aug 22, 2020
@macbre macbre modified the milestones: v1.4.0, v1.5.0 Dec 24, 2020
@macbre macbre modified the milestones: v1.5.0, v1.6.0 Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant