-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Can't disable prepared statements when connecting to a Starrock DB #3205
Comments
I meet the same issues, anyone could fix it? |
I gave it several tries but couldn't make it work... only way I've found to connect to StarrocksDB on Rust is using the |
This comment was marked as spam.
This comment was marked as spam.
@presedo93 I modified the source code to allow a simple query and solve the problem, but the code is ugly, It would be best if the official could support this switch feature. |
so cool!! I couldn't resist and give a try to your fork with my StarRocks instance... and I can connect! When running queries, I'm getting errors on the Protocol. It seems to be expecting 0xfe (EOF_Packet) but finds 0x3. But, at least, now I'm able to connect hehe. Do you think you could do a PR on the repo? I could help you to give it visibility and have that feature :) Thanks for the effort! |
I will try to optimize the code first and then submit a PR |
@presedo93 Hi prededo93, the error: 'Error: Database(MySqlDatabaseError { code: Some("HY000"), number: 1064, message: "Getting analyzing error. Detail message: Set statement only support constant expr.." })" is caused by StarRocks not supporting the following: "Set statement with Select statement". For example: "Set sql_mode=(SELECT CONCAT(@@sql_mode, ',PIPES_AS_CONCAT,NO_ENGINE_SUBSTITUTION'))" The problem code is as follows You can modify the code as follows: dive into two statements. |
Bug Description
I'm trying to use
sqlx
to connect to a StarrocksDB. Checking the docs/forums, it doesn't support prepared-cache but it mentions that most MySQL clients should be able to disable that feature. I setstatement_cache_capacity
to0
as the docs mention but I still get this error when trying to connect:Error: Database(MySqlDatabaseError { code: Some("HY000"), number: 1064, message: "Getting analyzing error. Detail message: Set statement only support constant expr.." })
Can it be that setting
statement_cache_capacity
to0
does not disable the prepared-cache?Thanks!
Minimal Reproduction
Info
0.7.4
["runtime-tokio", "mysql"]
StarrocksDB (MySQL)
rustc --version
:1.77.2
The text was updated successfully, but these errors were encountered: