Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MariaDB driver 3.x - Illegal fetch size, batched jdbc exception translation, SqlRow blob reading #2782

Closed
Wooza opened this issue Aug 10, 2022 · 1 comment · Fixed by #2783, #2792 or #2793
Assignees
Labels
Milestone

Comments

@Wooza
Copy link
Contributor

Wooza commented Aug 10, 2022

Using setFetchSize(Integer.MIN_VALUE) (introduced by #56) is not allowed according to the documentation of setFetchSize:

It seems that older MariaDB drivers (<3.x.x) accepted Integer.MIN_VALUE for compatibility reasons, however the new major driver version was apparently rewritten from scratch to closely follow the JDBC specs and thus raises an exception when called with Integer.MIN_VALUE.

According to the documentation the proper solution is to use setFetchSize(1).
My current workaround is to stick with the older driver but I would really like to update.

@rbygrave
Copy link
Member

Do you want to submit a PR that bumps the jdbc driver the tests are using for MariaDB ? (that will then reproduce the problem)

@rbygrave rbygrave linked a pull request Aug 17, 2022 that will close this issue
@rbygrave rbygrave added this to the 13.7.1 milestone Aug 17, 2022
@rbygrave rbygrave added the bug label Aug 17, 2022
@rbygrave rbygrave reopened this Aug 17, 2022
rbygrave added a commit that referenced this issue Aug 17, 2022
rbygrave added a commit that referenced this issue Aug 17, 2022
#2782 #2783 - Forward only fetchSize() for MySql and MariaDB is Integer.MIN_VALUE and 1 respectively
rbygrave added a commit that referenced this issue Aug 17, 2022
…n translation, SqlRow BLOB reading

- Batched JDBC SQLException translation - Need to dig into nested exception to get cause error state
- SqlRow BLOB reading - BLOB can come as LONGVARBINARY (TestRawSqlBuilder)
- Fix test for history using system time (TestHistoryInsert)
- Fix SqlQueryCancelTest
- Fix TestSqlUpdateExceptions
rbygrave added a commit that referenced this issue Aug 17, 2022
…pdate

#2782 - Support MariaDB jdbc driver update - Batched JDBC SQLException translation, SqlRow BLOB reading
@rbygrave rbygrave changed the title Illegal fetch size when using most recent MariaDB driver Support MariaDB driver 3.x - Illegal fetch size, batched jdbc exception translation, SqlRow blob reading Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment