[Mono-bugs] [Bug 77785][Nor] Changed - SQLServerSessionState cannot
update session when the connection is closed by the server
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Tue Mar 14 11:04:26 EST 2006
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by informatique.internet at fiducial.fr.
http://bugzilla.ximian.com/show_bug.cgi?id=77785
--- shadow/77785 2006-03-14 10:52:34.000000000 -0500
+++ shadow/77785.tmp.20477 2006-03-14 11:04:26.000000000 -0500
@@ -161,6 +161,54 @@
------- Additional Comments From informatique.internet at fiducial.fr 2006-03-14 06:06 -------
Actually we need to restart mod_mono when PostGreSQL is restarted...
It's not a very good behaviour! (I think)
------- Additional Comments From gonzalo at ximian.com 2006-03-14 10:52 -------
This is a System.Data bug, not System.Web
+
+------- Additional Comments From informatique.internet at fiducial.fr 2006-03-14 11:04 -------
+I don't think so...
+This behaviour is normal (System.data don't check if the connection is
+really open (on a tcp database view) before launching query)
+
+Example :
+using System.Data.SqlClient;
+using Npgsql;
+
+class MainClass
+{
+ static string cnxstring="Server=10.69.100.92;Port=5432;User
+Id=postgres;Password=postgres;Database=intranet;pooling=true;Encoding=UNICODE";
+ public static void Main(string[] args)
+ {
+select_test(cnxstring);
+ }
+
+ private static void select_test(string cnxString)
+ {
+
+ NpgsqlConnection pgcnx = new NpgsqlConnection(cnxString);
+ NpgsqlCommand pgcmd = new NpgsqlCommand();
+
+ pgcmd.Connection = pgcnx;
+
+ pgcmd.CommandText = @"SELECT * FROM intra_utilisateur";
+ NpgsqlDataAdapter dta=new NpgsqlDataAdapter(pgcmd);
+
+ DataSet ds=new DataSet();
+ pgcnx.Open();
+ dta.Fill(ds);
+ Console.WriteLine("1ere Query effectuée");
+ Console.ReadLine();
+
+/// Here, restart the database
+
+ Console.WriteLine(pgcnx.State);
+ dta.Fill(ds);
+ pgcnx.Close();
+ }
+
+ }
+
+This Fails, on MS.NET and on Mono...
+
+So, we MUST check in SQLSessionHandler the "real" connection state
More information about the mono-bugs
mailing list