[CONJ-977] java.sql.SQLSyntaxErrorException: (conn=65) invalid fetch size Created: 2022-05-29 Updated: 2022-12-23 Resolved: 2022-12-23 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | MySQL compatibility |
| Affects Version/s: | 3.0.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Rahul | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | Compatibility | ||
| Description |
|
Getting Invalid fetch size issue, when trying to setup an java application that uses infinisapn 9.4.4-Final to take care of cache related table with below JDBC URL using mariadb driver 3.0.4 jdbc:mysql://localhost:3307/demo_test_01?permitMysqlScheme but when i try to install same application with below jdbc URL, it start successfully using mariadb driver 3.0.4 jdbc:mariadb://localhost:3307/demo_test_02?useMysqlMetadata MariaDB server version: 10.7.3-MariaDB-1:10.7.3+maria~focal Observation:
|
| Comments |
| Comment by Diego Dupin [ 2022-05-30 ] |
|
This is probably because tools have taken in account a MySQL bug : MySQL connector doesn't follow JDBC spec for fetching size. MySQL only permit value of Integer.MIN_VALUE that is normally wrong, and when enable, fetch size of 1. MariaDB 2.7 and 3.0 connectors fetch size correctly (a fetch size of 1000 means that connectors will really fetch 1000 rows of data). Some tools might consider "jdbc:mysql" as a mysql connectors having this bug. About intellij, i've submit an issue : https://youtrack.jetbrains.com/issue/DBE-15654/wrong-use-of-setFetchSize-when-using-mariadb-driver for this problem. |
| Comment by Diego Dupin [ 2022-06-27 ] |
|
IntelliJ IDEA has correct implementation in recent version |
| Comment by Diego Dupin [ 2022-12-23 ] |
|
closing since not a connector bug, and tools are correcting behavior |