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

Update MySQL JDBC driver to 8.0.29 #15345

Merged
merged 3 commits into from
Dec 16, 2022
Merged

Conversation

hashhar
Copy link
Member

@hashhar hashhar commented Dec 8, 2022

Description

Update MySQL JDBC driver to 8.0.29

Fixes #15332 Closes #12692

Additional context and related issues

Update MySQL JDBC driver to 8.0.29

Release notes

(x) Release notes are required, with the following suggested text:

# MySQL
* Update MySQL JDBC driver to 8.0.29. This fixes failure when `query` table function contains `WITH` clause. ({issue}`15332`)

@cla-bot cla-bot bot added the cla-signed label Dec 8, 2022
@hashhar
Copy link
Member Author

hashhar commented Dec 8, 2022

Alternative to #12692, let's see what tests fail.

@hashhar
Copy link
Member Author

hashhar commented Dec 8, 2022

Same failures as in #14917, negative date related tests.

I guess we'll need to add validation on Trino side to disallow negative values until the driver is fixed. I'll see how we can report a bug to the driver - I just left a comment at mysql/mysql-connector-j@60553fd#r88985720 in past.

@hashhar
Copy link
Member Author

hashhar commented Dec 8, 2022

Got it working, added a test to verify driver bug too so that once we update to working driver we can get notified.

I've started the process to file the bug to MySQL - waiting to hear back.

@hashhar
Copy link
Member Author

hashhar commented Dec 9, 2022

@ebyhr Addressed comments as fixups.

It's using bindExpression now - much cleaner - thanks for the suggestion. The error message changed slightly since now the server sees failure in CAST instead of inserting to column.

This fixes an issue where system.query function failed if the query
contained a WITH clause because the older MySQL JDBC drivers did not
return metadata for queries containing WITH clause.
This test will start failing once a MySQL driver with the bug resolved
is being used and can then be removed as well as the code changes from
the previous commit partially reverted.
@hashhar hashhar force-pushed the hashhar/mysql-8.0.29 branch from 9c00cef to af15cfc Compare December 9, 2022 10:10
@hashhar
Copy link
Member Author

hashhar commented Dec 14, 2022

This is ready to review. PTAL @ebyhr @electrum

@hashhar hashhar requested review from electrum and ebyhr December 14, 2022 10:52
@hashhar hashhar merged commit 00efff1 into trinodb:master Dec 16, 2022
@hashhar hashhar deleted the hashhar/mysql-8.0.29 branch December 16, 2022 22:02
@github-actions github-actions bot added this to the 404 milestone Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

The mysql system.query table function cannot obtain ResultSetMetadata for queries having WITH statements
2 participants