Details
-
Bug
-
Status: Open (View Workflow)
-
Critical
-
Resolution: Unresolved
-
10.11.14, 12.0.2
-
None
Description
Major regression introduced with index_merge optimization causes SELECT to lose data when used more than 100 OR conditions. See complete SQL in attachment.
CREATE TABLE `index_merge_test` ( |
`id` int(11) NOT NULL AUTO_INCREMENT, |
`uniq2` smallint(6) NOT NULL DEFAULT 0, |
PRIMARY KEY (`id`), |
KEY `uniq2` (`uniq2`) |
) ENGINE=MyISAM;
|
|
INSERT INTO `index_merge_test` (`id`, `uniq2`) VALUES |
(1, 1),
|
(2, 1),
|
(3, 2);
|
SELECT id FROM index_merge_test WHERE |
-- (uniq2 = 2 AND id = 3) OR /* Try to uncomment this line. Expected number of results: 3. Returned number results: 1. */ |
(uniq2 = 1)
|
OR (uniq2 = 1) |
OR (uniq2 = 1) |
OR (uniq2 = 1) |
-- (repeat 100x) |
Attachments
Issue Links
- is caused by
-
MDEV-34620 Large N-way OR causes a lot of index_merge variants to be created and discarded
-
- Closed
-