Bug #45589 | Exception when I want to connect to my database | ||
---|---|---|---|
Submitted: | 18 Jun 2009 14:17 | Modified: | 30 Jun 2009 22:24 |
Reporter: | jerome coutant | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | Connector / NET | Severity: | S2 (Serious) |
Version: | 6.0.4 | OS: | Windows |
Assigned to: | CPU Architecture: | Any | |
Tags: | connection open |
[18 Jun 2009 14:17]
jerome coutant
[20 Jun 2009 9:12]
Tonci Grgin
Hi Jerome and thanks for your report. I can not repeat it using c/NET 6.0.4 and remote MySQL server 5.1.31 on OpenSolaris box... Can you provide any more info on this?
[22 Jun 2009 9:53]
jerome coutant
Hi Tonci, I rebuild MySqlData with the old code before my change to give you more information and this morning the connection is Ok. I think I had a problem in my connection string or another thing and in this case, the problem occurs because of reading the error from database server, we need to use the encoding objet into packet.ReadString() call from ReadPacket() method. Here is the code sample from ReadPacket() method into MySqlPacket.cs file : ... string s = encoding.GetString(bits, (int)buffer.Position, end - (int)buffer.Position); ... Regards, Jerome
[30 Jun 2009 22:23]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/77592
[30 Jun 2009 22:24]
Reggie Burnett
I am marking this as cant' repeat but I added an exception if the default encoding can't be created. This way if this happens again then the user will be directed to report it as a bug along with the connection string and system details.