-
Notifications
You must be signed in to change notification settings - Fork 33
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 not connect with JDBC driver #10
Comments
Could you tell me what error you get? And which of those |
Rust code throws this error.
Java client code with JDBC is
|
Rust error With
|
Huh, that is very strange indeed. Your first example fails at Line 256 in 9daaa16
Which means that the first packet it sends isn't parsed correctly, and the connection is eventually terminated here Line 126 in 9daaa16
This, in turn, implies that the Line 196 in 9daaa16
fails. It would be very helpful to have the sequence of bytes that fails to parse. Could you try printing out Line 97 in 9daaa16
To give some more insight into what exact packet it's choking on? As for the Line 12 in 9daaa16
Could you try printing |
I wrapped in For the first JDBC code,
For
|
Hmm... Very strange indeed. I pushed a new version (two, actually, one minor + one major
This is bizarre. The client is responding to the server handshake by disconnecting. This makes me think that it's actually JDBC that doesn't like the server handshake that we are sending, and that it's actually the JDBC side that's choking. Perhaps understandably, as it has probably only been tested against "real" MySQL servers. Could you try enabling error logging on the Java side and see if that says why it decides to drop the connection?
This too smells to me like the JDBC code doing something funky. From my read of the handshake packet spec, that particular sequence of bytes simply isn't valid for the client to send when it does. Or ever I don't think. Here too I think we need some insight from the Java side as to why JDBC decides to send that packet in seeming violation of the spec. I wonder if there's a way to ping a JDBC dev here — would be useful to have some eyes on this from someone with familiarity with how JDBC works internally. |
I wonder if this could also be related to the fact that |
I think I have found the culprit at least for the Line 13 in 9daaa16
Update: JDBC sets |
Ah, yes, |
Sure :) I will create a pull request later when it's ready. |
Refuse connection when client did not use CLIENT_PROTOCOL_41
I am trying to run oltpbench on a SQL server written with msql-srv. But it does not connect. It throws error at this code block
https://github.com/jonhoo/msql-srv/blob/master/src/lib.rs#L255-L259
oltpbench uses JDBC drivers. Do you know what is going on?
mysql
terminal session or rust crate works just fine.The text was updated successfully, but these errors were encountered: