Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setFetchSize Mariadb jdbcdriver version 3.0.4

Tags:

mariadb

jdbc

We encounter an error when we go from 2.7.2 to 3.0.4 MariaDB JDBC driver with setFetchSize(Integer.MIN_VALUE)

java.sql.SQLSyntaxErrorException: (conn=27489500) invalid fetch size

So we switch to setFetchSize(1)

https://mariadb.com/kb/en/about-mariadb-connector-j/

Before version 1.4.0, the only accepted value for fetch size was Statement.setFetchSize(Integer.MIN_VALUE) (equivalent to Statement.setFetchSize(1)). This value is still accepted for compatilibity reasons but rather use Statement.setFetchSize(1), since according to JDBC the value must be >= 0.

And I found nothing in the release notes.

like image 487
Mr_Thorynque Avatar asked Apr 20 '26 13:04

Mr_Thorynque


1 Answers

here is how I solved it:

you have to lower the version of MariaDB. you go to the driver list, select Maria DB, click on + and add something lower; 2.7.3 worked for me. What is very very important is that you click on "create data source" that will led you to create another connect. I did not work without creating a new data source with lower version for me.

enter image description here

like image 196
Areza Avatar answered Apr 24 '26 11:04

Areza