You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some unknown reason, Metabase fails to return a handshake when the server advertises CLIENT_CONNECT_ATTRS. Attempting to remove CLIENT_CONNECT_ATTRS from a mysql2 server led me to confirm the following:
When a mysql2 server doesn't set CLIENT_CONNECT_ATTRS, clients ( the mysql CLI and Metabase) still respond with CLIENT_CONNECT_ATTRS set.
Neither apparently include the client attributes section of the handshake packet, despite setting the flag.
mysql2 accepts whatever flags the client sends in the handshake response.
mysql2 reads off the end of the handshake buffer (Should not reach here: undefined) trying to read the client attributes.
The TL;DR is that if I patch mysql2 to OR the server capabilities and client flags (which I believe is what the protocol specifies), handshakes succeed in all cases.
For reference, here are the handshake packets returned:
# Metabase
8aa3be0000000040e00000000000000000000000000000000000000000000000616e79001435406cb703f65194d07ed3104a196e1a36a2396e72756e514c006d7973716c5f6e61746976655f70617373776f726400
# mysql CLI
8da6ff1900000001ff0000000000000000000000000000000000000000000000616e790014e37b647b58a150e2202cd63b3ce7050d2c68715372756e716c006d7973716c5f6e61746976655f70617373776f726400
The text was updated successfully, but these errors were encountered:
For some unknown reason, Metabase fails to return a handshake when the server advertises CLIENT_CONNECT_ATTRS. Attempting to remove CLIENT_CONNECT_ATTRS from a
mysql2
server led me to confirm the following:mysql2
server doesn't set CLIENT_CONNECT_ATTRS, clients ( themysql
CLI and Metabase) still respond with CLIENT_CONNECT_ATTRS set.mysql2
accepts whatever flags the client sends in the handshake response.mysql2
reads off the end of the handshake buffer (Should not reach here: undefined
) trying to read the client attributes.The TL;DR is that if I patch
mysql2
to OR the server capabilities and client flags (which I believe is what the protocol specifies), handshakes succeed in all cases.For reference, here are the handshake packets returned:
The text was updated successfully, but these errors were encountered: