Bug #77171 | On every connect getting sql_mode from server creates unnecessary exception | ||
---|---|---|---|
Submitted: | 27 May 2015 12:41 | Modified: | 21 Apr 2016 21:21 |
Reporter: | Alexei Shpikat | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S5 (Performance) |
Version: | 5.1.35 | OS: | Any |
Assigned to: | Filipe Silva | CPU Architecture: | Any |
[27 May 2015 12:41]
Alexei Shpikat
[1 Jun 2015 22:26]
Filipe Silva
Hi Alexei, Thank you for this bug report. Verified as described.
[21 Apr 2016 21:21]
Daniel So
Added the following entry to the MySQL Connector/J 5.1.39 changelog: "At every connection, Connector/J got the sql_mode variable from the server and tried to parse it as a number; because sql_mode is not a number (except for very old versions of MySQL), an NumberFormatException was always thrown and then caught by the code. This fix refactored the code to avoid the unnecessary throwing and catching of the error."
[14 Jun 2016 19:41]
Daniel So
Posted by developer: Added the above-mentioned changelog entry for Connector/J 6.0.3 as well, as the fix has been pushed into the 6.0 tree.