Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
12.3, 12.3.1
-
ubuntu22.04
Description
Summary
On MariaDB 12.3.1-MariaDB-asan-log (rev 21a0714a), SELECT COUNT
, ~0 on a DOUBLE column returns 18446744073709551615 on MyISAM (correct), but 9223372036854775807 on InnoDB (wrong). Integer columns behave correctly on both engines. This is a sibling of
MDEV-39131: MyISAM is fixed, but InnoDB DOUBLE still triggers the old bug.
Minimal Reproducer
CREATE TABLE t_myisam (c0 DOUBLE) ENGINE = MyISAM; |
INSERT INTO t_myisam VALUES (1); |
SELECT COUNT(*), ~0 FROM t_myisam; |
-- → 1, 18446744073709551615 (correct)
|
|
|
CREATE TABLE t_innodb (c0 DOUBLE) ENGINE = InnoDB; |
INSERT INTO t_innodb VALUES (1); |
SELECT COUNT(*), ~0 FROM t_innodb; |
-- → 1, 9223372036854775807 (wrong) |
Expected vs Actual
| Engine | Column | ~0 result | Correct? |
|---|---|---|---|
| MyISAM | DOUBLE | 18446744073709551615 | yes |
| InnoDB | DOUBLE | 9223372036854775807 | no |
| InnoDB | INT | 18446744073709551615 | yes |
Notes
- Official
MDEV-39131fixed MyISAM; this report documents the InnoDB DOUBLE path that remains broken. - Partial fix moved the bug to the former control engine.
- Issue is related to `Item_copy_string::val_int()` unsigned handling.
Environment
| Item | Value |
|---|---|
| Version | 12.3.1-MariaDB-asan-log |
| Revision | 21a0714a118614982d20bfa504763d7247800091 |
Suggested Fix
Apply
MDEV-39131unsigned handling for ~0 consistently for InnoDB DOUBLE result metadata paths, not only MyISAM.