Bug #111006 | DOUBLE type in database has 6 digit precision despite double type capable of 15, | ||
---|---|---|---|
Submitted: | 11 May 2023 20:22 | Modified: | 30 Jun 2024 12:52 |
Reporter: | Rich Lowe | Email Updates: | |
Status: | No Feedback | Impact on me: | |
Category: | Connector / C++ | Severity: | S1 (Critical) |
Version: | 8.0 latest build as of 5/11/23 | OS: | Windows |
Assigned to: | MySQL Verification Team | CPU Architecture: | x86 |
[11 May 2023 20:22]
Rich Lowe
[11 May 2023 20:26]
Rich Lowe
Correction, I believe it is the insert side where the mistake is occurring. It should insert full double value instead of just 6 significant digits.
[11 May 2023 20:27]
Rich Lowe
Node.js example code using MySQL npm library by way of mysql-await library
Attachment: Node.js code.png (image/png, text), 72.72 KiB.
[11 May 2023 20:27]
Rich Lowe
Node.js output showing full double value returned
Attachment: Node.js output.png (image/png, text), 17.57 KiB.
[11 May 2023 20:36]
Rich Lowe
C++ example code
Attachment: cpp-code.png (image/png, text), 209.31 KiB.
[11 May 2023 20:36]
Rich Lowe
C++ example output
Attachment: cpp-output.png (image/png, text), 4.03 KiB.
[11 May 2023 20:40]
Rich Lowe
C++ test output with no insert, just select of Node.js inserted double
Attachment: test output only selecting node.js inserted double.png (image/png, text), 7.73 KiB.
[11 May 2023 20:41]
Rich Lowe
Select from MySQL workbench of C++ inserted double
Attachment: select of C++ inserted double.png (image/png, text), 88.84 KiB.
[11 May 2023 20:41]
Rich Lowe
Select from MySQL workbench of Node.js inserted double
Attachment: select of node.js inserted double.png (image/png, text), 109.99 KiB.
[11 May 2023 20:43]
Rich Lowe
Ok, I have confirmed. Who Inserts | Who Reads | They Get C++ | C++ | truncated C++ | Node.js or MySQL Workbench | truncated Node.js | Node.js | full 15 decimals Node.js | C++ | truncated Node.js | MySQL Workbench | full 15 decimals I would expect no truncation in any instances for DOUBLE values.
[11 May 2023 20:49]
Rich Lowe
No, sorry, I made a mistake. I did not have setprecision in my C++ read examples except on the DIFF version. The problem is only on the insert side. I have re-confirmed. Who Inserts | Who Reads | They Get C++ | C++ | truncated C++ | Node.js or MySQL Workbench | truncated Node.js | Node.js | full 15 decimals Node.js | C++ | full 15 decimals Node.js | MySQL Workbench | full 15 decimals I would expect no truncation in any instances for DOUBLE values. Apologies for all of my corrections.
[11 May 2023 20:54]
Rich Lowe
Double selected by C++ from (top) Node.js inserted double (bottom) C++ inserted double
Attachment: final example where double selected in C++ inserted from a. node.js and b. c++.png (image/png, text), 32.08 KiB.
[31 May 2024 12:52]
MySQL Verification Team
Hello! Thank you for the bug report. Please upgrade to latest version and report us back if issue persist even in latest version along with test case. Thank you. Regards, Ashwini Patil
[1 Jul 2024 1:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".