[CONJ-606] invalid or undocumented error code and state returned when MariaDB server is down Created: 2018-05-16 Updated: 2023-12-15 Resolved: 2023-12-15 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | JDBC 4.2 compatibility |
| Affects Version/s: | 2.2.1 |
| Fix Version/s: | 3.0.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Vidyasagar Mundroy | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
JDBC driver 2.2.1, MariaDB 10.1.30, Ubuntu 16.04 LTS |
||
| Attachments: |
|
| Description |
|
If a database connection is tried when MariaDB server is down, the JDBC driver returns following error information: Error code:-1 I believe error code -1 is not a valid error code and not documented at https://mariadb.com/kb/en/library/mariadb-error-codes/. Further, SQL State is expected to be 5 characters but not sure if it is right to return 2 character major class of errors. Above mentioned error information can be reproduced by running attached program as following: java MariaDbInvErrorCodeBug org.mariadb.jdbc.Driver jdbc:mariadb://localhost:3306/bladb blauser blapasswd Output displayed by the program is as following: |
| Comments |
| Comment by Diego Dupin [ 2023-12-15 ] |
|
late answer, but SQLState now returns "08000" since 3.0 |