Bug #109339 | Failed to insert bignums due to overflow | ||
---|---|---|---|
Submitted: | 12 Dec 2022 12:44 | Modified: | 15 Dec 2022 10:16 |
Reporter: | Yohei Ueki | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | Connector / J | Severity: | S3 (Non-critical) |
Version: | 8.0.22, 8.0.31 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | regression |
[12 Dec 2022 12:44]
Yohei Ueki
[12 Dec 2022 13:04]
MySQL Verification Team
Hi Mr. Ueki, Have you tried repeating this behaviour with our C/J release 8.0.31 ???? Next, would you please, post in this report the entire part of the relevant Java code that produces the error. If it is too big, you can upload it with our "Files" tab. We are waiting on your full feedback.
[12 Dec 2022 14:00]
Yohei Ueki
https://github.com/yueki1993/mysql-connector-java-issue-overflow-bigint-unsigned/commit/86...
Attachment: mysql-connector-java-issue-overflow-bigint-unsigned-main.zip (application/zip, text), 5.71 KiB.
[12 Dec 2022 14:01]
Yohei Ueki
Hello, This issue occurs with version==8.0.31. I attached source codes (please see InsertBigIntegerTest.) Thanks, Yohei Ueki
[15 Dec 2022 6:30]
MySQL Verification Team
Hello Yohei Ueki, Thank you for the report and feedback. regards, Umesh
[15 Dec 2022 6:34]
MySQL Verification Team
This doesn't look like intended behavior but a regression as 8.0.21 has no issues but C/J 8.0.22+. Per data type mapping of MySQL and Java Data Types: BIGINT[(M)] UNSIGNED mapped with java.math.BigInteger.
[15 Dec 2022 10:16]
Yohei Ueki
Hello Umesh, Thanks for taking a look this report. Yohei Ueki
[10 Apr 2023 22:02]
Manuel McLure
I tracked this down to https://github.com/mysql/mysql-connector-j/commit/6f8287b2a393ef9b67889d2bb2385ef863a7e8df Before this change, a BigInteger would be converted to String before inserting, after it will be converted to long since it falls into the Number code.