Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.4.5, 11.7.2, 11.8.1, 10.6, 10.11, 11.4, 11.8, 11.4.7
-
Both amd64 and aarch64 in docker are affected
Description
Under certain conditions, when setting `tmp_table_size` to very low value (tested with 1K, 2K, 4K, 8K (for 16K+ it works fine)), following query returns bad result:
SELECT COUNT(DISTINCT t1.id_b) FROM t1 JOIN t2 ON t2.id_c = t1.id_c WHERE t1.id_a = 1;
(returns 2 instead of 1)
for following test data:
CREATE TABLE t1 (id_a INT PRIMARY KEY, id_b INT, id_c INT);
CREATE TABLE t2 (id_d INT PRIMARY KEY, id_c INT);
INSERT INTO t1 VALUES (1, 1234, 1);
INSERT INTO t2 VALUES (1, 1), (2, 1);
Tried both InnoDB and MyISAM engines, the problem is not in the engine, as both fails the same way.
The bug was introduced somewhere in the 11.4.5 release, as 11.4.4 is fine and everything newer is affected.
Attaching shell script that can reproduce the error with provided minimal configuration file.
Attachments
Issue Links
- is caused by
-
MDEV-35469 Heap tables are calling mallocs to often
-
- Closed
-