[CONJ-1004] `ANALYZE TABLE` query executed by spring-data stopped working in mariadb-java-client 3.0.x Created: 2022-09-01 Updated: 2022-09-02 Resolved: 2022-09-02 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | JDBC 4.2 compatibility |
| Affects Version/s: | 3.0.7 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | MikoĊaj Matejko | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
Hi, we used to have a scheduled job that were executing the ANALYZE TABLE & OPTIMIZE TABLE for several tables.
In maria-db-client 2.7.x it worked correctly, however after upgrading to 3.0.5 the query stopped working. Stacktrace pointed us to ServerPreparedStatement#executeLargeUpdate.
So the query itself is correct, however what does not look correct is handling of result in ServerPreparedStatement, because in case of ANALYZE TABLE/OPTIMIZE TABLE the result is CompleteResult type (query succeeded tho), so it goes to the if condition that throws an exception. |
| Comments |
| Comment by Diego Dupin [ 2022-09-02 ] | |
|
3.0 connector version correct wrong 2.x behavior about executeUpdate() :
removing
will probably solve the issue (changing returning 'void' type might have to be changed too) |