Connection attributes lenths in HandshakeResponse packet are specified as num of characters, rather than as number of bytes
Posted by: Dinar Dinar
Date: June 27, 2016 08:08AM

Connection attribute key and value lenths in HandshakeResponse packet are specified as num of characters, rather than as number of bytes:

see:

MySql.Data.MySqlClient.NativeDriver.SetConnectAttrs()

lines:

string value = (string)property.GetValue(attrs, null);
connectAttrs += string.Format("{0}{1}", (char)name.Length, name);
connectAttrs += string.Format("{0}{1}", (char)value.Length, value);

.NET string.Length property returns number of characters, but here it is necessary to specify the lengths in bytes.

Options: ReplyQuote


Subject
Written By
Posted
Connection attributes lenths in HandshakeResponse packet are specified as num of characters, rather than as number of bytes
June 27, 2016 08:08AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.