-
Notifications
You must be signed in to change notification settings - Fork 149
Issue #401 Support of MariaDB prepared statement metadata caching. #406
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
Conversation
…ching. The fix sends metadata caching extended capability flag if server set it too. If this extended MariaDB capability flag is set, it expects that there can be no metadata in the Ok packet and uses for query result the metadata from prepare. The patch contains the test for metadata consistency. Since the fix relies on the fix in mysql_common that is not yet merged, the patch (temporily) changes Cargo.toml to use mysql_common from my fork.
MySQL returns MYSQL_TYPE_VAR_STRING for SELECT ? after prepare
|
Looks like I've overlooked and the patch in current form causes test failures ironically with MariaDB. I am looking into it. |
|
It is now fails on MySql and it seems that the server always sends the same metadata even though the parameter type was updated. Don't you know if there is a relevant bug report somewhere in the MySql bug tracker? |
For the metadata caching feature to work it is necessary to cache the last statement metadata received from the server. This commit updates the `test_metadata_caching` test.
|
This seems not to be a bug from the devs perspective, so I'll just ignore the test for non-mariadb server |
|
First of all - thank you for cooperation and for the prompt correcting of my PR's. Not much of my code left, but yours is definitely cleaner and more important - correct, while my was still buggy :) |
I'm not really sure about the reason of this error. I tried to reproduce it on an actual windows PC with the same mysql server version and couldn't. I'll ignore it for now. |
|
Thank you! |
This is the part of the implementation of the #401
The fix sends metadata caching extended capability flag if server set it too. If this extended MariaDB capability flag is set, it expects that there can be no metadata in the Ok packet and uses for query result the metadata from prepare.
The patch contains the test for metadata consistency and covers among others the case when metadata is different after prepare and after execute("SELECT ?").
Since the fix relies on the fix in mysql_common that is not yet merged, the patch currently changes Cargo.toml to use mysql_common from my fork.
The PR is submitted on behalf of my employer, MariaDB Corporation plc. We are planning further support and implement MariaDB specific features.