Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 5.5.20
-
Component/s: None
-
Labels:None
Description
Failing test(s): rpl.rpl_checksum_cache rpl.rpl_heartbeat_basic main.ps_3innodb main.ps main.subselect_mat_cost main.select_pkeycache main.multi_update main.union
Gliffy Diagrams
Attachments
Issue Links
- blocks
-
MDEV-31
make buildbot green for 5.5
-
- Closed
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Simple test case:
CREATE TABLE t1 (i INT, INDEX
);
FROM t1;
INSERT INTO t1 VALUES (1);
SELECT AVG
DROP TABLE t1;
The problem seems to be in my_decimal_div(). This dump is from
Item_sum_avg::val_decimal():
XXX3: SQLCOM_SELECT: SELECT AVG
FROM t1
XXX12: Item_sum_avg::val_str()
XXX11: Item_sum_avg::val_decimal()
XXX11: using decimal ...
XXX11: values: 1 / 1
XXX11: sum_dec=9.0: 1 0 0 0 0 0 0 0 0
XXX11: count=9.0: 1 0 54436864 0 1609087657 32688 0 0 31
XXX11: sum/count=9.9: 1 999999999 1 0 11794296 0 6144224 0 1608708904
XXX12: decimal -> 2.0000
XXX13 Item::send(Protocol *, ...) buffer=2.0000
This means that Item_sum_avg::val_decimal() is computing 1/1 with
my_decimal_div(). The result becomes 1.999999999.
Unfortunately, the bug occurence is extremely fragile.
I can repeat on VM vm-debian5-amd64-build by copying in source tarball and
running debian/autobake-deb.sh. If I then add a single line fprintf() in
do_div_mod() and `make -j2`, the problem disappears. If I remove the single
line again and `make -j2`, the problem is still gone ...
wierd ...