Quantcast
Channel: MySQL Forums - Connector/NET and C#, Mono, .Net
Viewing all articles
Browse latest Browse all 1451

Connection attributes lenths in HandshakeResponse packet are specified as num of characters, rather than as number of bytes (no replies)

$
0
0
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.

Viewing all articles
Browse latest Browse all 1451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>