| Bug #117027 | Mysql connector use an uneffective way to match numericValue | ||
|---|---|---|---|
| Submitted: | 20 Dec 2024 2:45 | Modified: | 24 Feb 23:13 |
| Reporter: | yuan zhang | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | Connector / J | Severity: | S5 (Performance) |
| Version: | 9.X AND 8.X | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
[20 Dec 2024 6:58]
MySQL Verification Team
Hello yuan zhang, Thank you for the report and feedback. regards, Umesh
[24 Feb 23:13]
Daniel So
Posted by developer: Added the following entry to the Connector/J 9.3.0 changelog: "The matching of numeric values was inefficient in some of the value factories. The efficiency for matching has now been improved using precompiled patterns."

Description: In the source code, the connector use an uneffective way to mach numericValue. For example, s.matches("-?\\d*\\.\\d*"). we should define a static Patten variable, Is that ok? ps:the issue code link https://github.com/mysql/mysql-connector-j/blob/release/8.x/src/main/core-impl/java/com/my... https://github.com/mysql/mysql-connector-j/blob/release/9.x/src/main/core-impl/java/com/my... How to repeat: this issue repeat in 8.X and 9.X , will you guys fix this as soon as possible Suggested fix: replace with a static Patten variable