diff options
author | Reggie Burnett <reggie@mono-cvs.ximian.com> | 2003-12-02 06:10:33 +0300 |
---|---|---|
committer | Reggie Burnett <reggie@mono-cvs.ximian.com> | 2003-12-02 06:10:33 +0300 |
commit | 681d87fc108f0df5f9d6701e2a4421927f78d132 (patch) | |
tree | b9a500179d0ab29256a6af59f43420e57ce33845 /mcs/class | |
parent | 11d9ddc4124106a54c9e71e998514421e49ad6a3 (diff) |
Mysql -fixed pooling bug
svn path=/trunk/mcs/; revision=20673
Diffstat (limited to 'mcs/class')
-rw-r--r-- | mcs/class/ByteFX.Data/mysqlclient/ConnectionInternal.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mcs/class/ByteFX.Data/mysqlclient/ConnectionInternal.cs b/mcs/class/ByteFX.Data/mysqlclient/ConnectionInternal.cs index cb51b1f1ae8..268f9d094d0 100644 --- a/mcs/class/ByteFX.Data/mysqlclient/ConnectionInternal.cs +++ b/mcs/class/ByteFX.Data/mysqlclient/ConnectionInternal.cs @@ -40,7 +40,7 @@ namespace ByteFX.Data.MySqlClient Packet packet; try { - byte[] bytes = driver.Encoding.GetBytes("show status like 'uptime'"); + byte[] bytes = driver.Encoding.GetBytes("select @@version"); packet = driver.SendSql( bytes ); // we have to read for two last packets since MySql sends // us a last packet after schema and again after rows @@ -48,13 +48,17 @@ namespace ByteFX.Data.MySqlClient // return schema in one very large packet. while (! packet.IsLastPacket()) packet = driver.ReadPacket(); + + // now read off the resultset + packet = driver.ReadPacket(); + while (! packet.IsLastPacket()) + packet = driver.ReadPacket(); + return true; } catch { return false; } - - return true; } public bool IsTooOld() |