setFetchSize Mariadb jdbcdriver version 3.0.4
Asked Answered
D

4

9

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.

Delgadillo answered 16/6, 2022 at 16:5 Comment(0)
M
8

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

Motivity answered 30/3, 2023 at 11:52 Comment(1)
This led me the solution for my case. I noticed MySQL version wasn't upgraded. It started working after upgrading to the stable version.Savour
F
6

This is a connector or idea bug, you need to downgrade.

I have the same problem, on the datagrid, searching the forums, the recommended solution is to reduce the version until the fix is released.

Ref: https://youtrack.jetbrains.com/issue/DBE-16376

Forecourse answered 22/9, 2022 at 21:31 Comment(0)
B
0

DB:mariadb 10.4, IDE phpstorm 2021.1.1

My error is: (conn=9) invalid fetch size. and 11 duplicate reports (1 sec, 723 ms)

My decision is: create data source not mariadb but mysql(will tell you that need select mariadb, don't worry, connect), and all work

Birkett answered 11/5, 2023 at 10:47 Comment(0)
D
0

My problem was: [42000][-1] (conn=38) invalid fetch size.

This problem is solved when I install and use MYSQL Driver instead of MariaDB.

Dorthadorthea answered 30/7, 2024 at 16:9 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.