Bug #11589 | prepared statements - strange output, float/double/real with zerofill | ||
---|---|---|---|
Submitted: | 27 Jun 2005 12:29 | Modified: | 25 Oct 2007 0:02 |
Reporter: | Matthias Leich | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Prepared statements | Severity: | S3 (Non-critical) |
Version: | 4.1 | OS: | Any |
Assigned to: | Magnus Blåudd | CPU Architecture: | Any |
[27 Jun 2005 12:29]
Matthias Leich
[27 Jun 2005 12:30]
Matthias Leich
Testcase
Attachment: ml021.test (application/test, text), 364 bytes.
[8 Jul 2005 8:36]
Matthias Leich
The problem with the differing output does also appear with non zerofill float/double/real values. Without --ps-protocol : CREATE TABLE t1 (f1 DOUBLE); INSERT INTO t1 SET f1 = -1.79769313486231e+308;; SELECT f1 AS f1_direct FROM t1; f1_direct -1.79769313486231e+308 SELECT f1 AS f1_eval FROM t1; f1_eval (Executed via eval) -1.79769313486231e+308 PREPARE my_sel FROM 'SELECT f1 AS f1_prepared FROM t1'; EXECUTE my_sel; f1_prepared -1.79769313486231e+308 All SELECT variants give the same result -1.79769313486231e+308 (= mantissa 15 digits). With --ps-protocol : ... SELECT f1 AS f1_direct FROM t1; f1_direct -1.7976931348623e+308 ( = mantissa 14 digits) ### All other SELECT variants give the same result -1.79769313486231e+308. When I shorten the mantissa to 14 digits (INSERT of -1.7976931348623e+308) the problem disappears. The file ml033.test contains this testcase.
[8 Jul 2005 8:39]
Matthias Leich
testcase
Attachment: ml033.test (application/test, text), 486 bytes.
[21 Feb 2006 13:56]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/2972
[21 Feb 2006 17:51]
Magnus Blåudd
The patch will correct "zerofill" problem. I.e first part of this bug report.
[21 Jul 2006 10:05]
Magnus Blåudd
Splitting this bug in two, new bug#21205 created for the second problem. The patch already provided is ready to go into 5.0 when approved.
[18 Oct 2007 21:36]
Bugs System
Pushed into 5.1.23-beta
[18 Oct 2007 21:37]
Bugs System
Pushed into 5.0.52
[25 Oct 2007 0:02]
Paul DuBois
Noted in 5.0.52, 5.1.23 changelogs. Values of types REAL ZEROFILL, DOUBLE ZEROFILL, FLOAT ZEROFILL, were not zero-filled when converted to a character representation in the C prepared statement API.