Re: [Mono-dev] Patch to System.Web.SessionState.SessionSQLServerHandler

2006-10-13 Thread Hubert FONGARNAND




Hello,

 Thanks for commiting my previous patch, but it's not complete because the INSERT query is column index dependent too. Here's the small patch which correct this.
Thanks to commit!

Hubert FONGARNAND

Le jeudi 12 octobre 2006  12:04 +0200, Hubert FONGARNAND a crit :

Hello,

This small patch permits that the user add some custom column in the aspsessionstate table when using sqlserver mode for storing session in ASP.NET. (This is useful for us because we want to add tracability to the session in the database). Therefore i think it's better to do a SELECT timeout,staticobjectsdata,sessiondata than SELECT * (with select * the order of the column, you've specified when you create the table is important...).
This patch corrects a bug too in ReadBytes. The index parameter was not properly used when calculating the size of the data...

Could someone commit?

Thanks!





-- 
Hubert FONGARNAND [EMAIL PROTECTED]
Fiducial



___
Ce message et les ventuels documents joints peuvent contenir des informations confidentielles.
Au cas o il ne vous serait pas destin, nous vous remercions de bien vouloir le supprimer et en aviser immdiatement l'expditeur. Toute utilisation de ce message non conforme sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.
Les communications sur internet n'tant pas scurises, l'intgrit de ce message n'est pas assure et la socit mettrice ne peut tre tenue pour responsable de son contenu. 

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


___Ce message et les éventuels documents joints peuvent contenir des informations confidentielles.Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu.

Index: System.Web.SessionState/SessionSQLServerHandler.cs
===
--- System.Web.SessionState/SessionSQLServerHandler.cs	(révision 66641)
+++ System.Web.SessionState/SessionSQLServerHandler.cs	(copie de travail)
@@ -51,7 +51,7 @@
 		const string defaultParamPrefix = :;
 		string paramPrefix;
 		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 insertCommand = INSERT INTO ASPStateTempSessions (SessionId, Created, expires, timeout, StaticObjectsData, SessionData)  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;
 
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Patch to System.Web.SessionState.SessionSQLServerHandler

2006-10-13 Thread Miguel de Icaza
Hello,

 Thanks for commiting my previous patch, but it's not complete
 because the INSERT query is column index dependent too. Here's the
 small patch which correct this.
 Thanks to commit!

Does that mean that it is currently broken?  Because we have already
done the packaging for 1.1.18 with this patch.

Or does it mean that it is just suboptimal?

Miguel.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Patch to System.Web.SessionState.SessionSQLServerHandler

2006-10-13 Thread Robert Jordan
Miguel de Icaza wrote:
 Hello,
 
 Thanks for commiting my previous patch, but it's not complete
 because the INSERT query is column index dependent too. Here's the
 small patch which correct this.
 Thanks to commit!
 
 Does that mean that it is currently broken?  Because we have already
 done the packaging for 1.1.18 with this patch.
 
 Or does it mean that it is just suboptimal?

It's suboptimal for the intended functionality, but it doesn't
break anything.

Robert

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Patch to System.Web.SessionState.SessionSQLServerHandler

2006-10-12 Thread Hubert FONGARNAND




Hello,

This small patch permits that the user add some custom column in the aspsessionstate table when using sqlserver mode for storing session in ASP.NET. (This is useful for us because we want to add tracability to the session in the database). Therefore i think it's better to do a SELECT timeout,staticobjectsdata,sessiondata than SELECT * (with select * the order of the column, you've specified when you create the table is important...).
This patch corrects a bug too in ReadBytes. The index parameter was not properly used when calculating the size of the data...

Could someone commit?

Thanks!





-- 
Hubert FONGARNAND [EMAIL PROTECTED]
Fiducial



___Ce message et les éventuels documents joints peuvent contenir des informations confidentielles.Au cas où il ne vous serait pas destiné, nous vous remercions de bien vouloir le supprimer et en aviser immédiatement l'expéditeur. Toute utilisation de ce message non conforme à sa destination, toute diffusion ou publication, totale ou partielle et quel qu'en soit le moyen est formellement interdite.Les communications sur internet n'étant pas sécurisées, l'intégrité de ce message n'est pas assurée et la société émettrice ne peut être tenue pour responsable de son contenu.

Index: System.Web.SessionState/SessionSQLServerHandler.cs
===
--- System.Web.SessionState/SessionSQLServerHandler.cs	(révision 66591)
+++ System.Web.SessionState/SessionSQLServerHandler.cs	(copie de travail)
@@ -50,7 +50,7 @@
 
 		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 @@
 
 		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;
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Patch to System.Web.SessionState.SessionSQLServerHandler

2006-10-12 Thread Miguel de Icaza
Hello,

 This small patch permits that the user add some custom column in the
 aspsessionstate table when using sqlserver mode for storing session in
 ASP.NET. (This is useful for us because we want to add tracability to
 the session in the database). Therefore i think it's better to do a
 SELECT timeout,staticobjectsdata,sessiondata than SELECT * (with
 select * the order of the column, you've specified when you create the
 table is important...).
 This patch corrects a bug too in ReadBytes. The index parameter was
 not properly used when calculating the size of the data...
 
 Could someone commit?

I got it;  It did not make it into 1.1.18 sadly.
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list