Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2006-10-12 Hubert FONGARNAND <informatique.internet@fiducial.fr>

        Patch from Hubert FONGARNAND
        
        * SessionSQLServerHandler.cs (selectCommand): Instead of using
        SELECT * for pulling the data out of the ASPStateTempSessions,
use
        the explicit column names.  This allows users to change the
table
        and not have any undesired side effects for our code.

        (ReadBytes): This patch corrects a bug too in ReadBytes. The
index parameter
        was not properly used when calculating the size of the data.


svn path=/trunk/mcs/; revision=66601
  • Loading branch information...
commit 90a3832a6931a12aa53b8a7afe43acbccdf228e3 1 parent cb81f25
Miguel de Icaza migueldeicaza authored
12 mcs/class/System.Web/System.Web.SessionState/ChangeLog
View
@@ -1,3 +1,15 @@
+2006-10-12 Hubert FONGARNAND <informatique.internet@fiducial.fr>
+
+ Patch from Hubert FONGARNAND
+
+ * SessionSQLServerHandler.cs (selectCommand): Instead of using
+ SELECT * for pulling the data out of the ASPStateTempSessions, use
+ the explicit column names. This allows users to change the table
+ and not have any undesired side effects for our code.
+
+ (ReadBytes): This patch corrects a bug too in ReadBytes. The index parameter
+ was not properly used when calculating the size of the data.
+
2006-09-03 Robert Jordan <robertj@gmx.net>
* SessionSQLServerHandler.cs: persist and handle the "timeout" and
4 mcs/class/System.Web/System.Web.SessionState/SessionSQLServerHandler.cs
View
@@ -50,7 +50,7 @@ internal class SessionSQLServerHandler : ISessionHandler
const string defaultParamPrefix = ":";
string paramPrefix;
- string selectCommand = "SELECT * FROM ASPStateTempSessions WHERE SessionID = :SessionID AND Expires > :Expires";
+ string selectCommand = "SELECT timeout,staticobjectsdata,sessiondata FROM ASPStateTempSessions WHERE SessionID = :SessionID AND Expires > :Expires";
string insertCommand = "INSERT INTO ASPStateTempSessions VALUES (:SessionID, :Created, :Expires, :Timeout, :StaticObjectsData, :SessionData)";
string updateCommand = "UPDATE ASPStateTempSessions SET expires = :Expires, timeout = :Timeout, SessionData = :SessionData WHERE SessionId = :SessionID";
string deleteCommand = "DELETE FROM ASPStateTempSessions WHERE SessionId = :SessionID";
@@ -348,7 +348,7 @@ void DeleteSessionWithRetry (string id)
private byte [] ReadBytes (IDataReader reader, int index)
{
- int len = (int) reader.GetBytes (reader.FieldCount-1, 0, null, 0, 0);
+ int len = (int) reader.GetBytes (index, 0, null, 0, 0);
byte [] data = new byte [len];
reader.GetBytes (index, 0, data, 0, len);
return data;
Please sign in to comment.
Something went wrong with that request. Please try again.