List:Commits« Previous MessageNext Message »
From:Vladislav Vaintroub Date:April 21 2010 3:17pm
Subject:bzr commit into connector-net-6.1 branch (vvaintroub:805) Bug#52175
View as plain text  
#At file:///H:/connector_net/6.1/ based on revid:vvaintroub@stripped

  805 Vladislav Vaintroub	2010-04-21
      SessionProvider : Avoid SQLNullValueException if lockId returned by select is 
       NULL (bug#52175)

    modified:
      MySql.Web/Providers/Source/SessionProvider.cs
=== modified file 'MySql.Web/Providers/Source/SessionProvider.cs'
--- a/MySql.Web/Providers/Source/SessionProvider.cs	2009-10-14 23:15:49 +0000
+++ b/MySql.Web/Providers/Source/SessionProvider.cs	2010-04-21 15:17:05 +0000
@@ -548,7 +548,12 @@ namespace MySql.Web.SessionState
 
                             object items = reader.GetValue(1);
                             serializedItems = (items is DBNull) ? null : (byte[])items;
-                            lockId = reader.GetInt32(2);
+                            lockId = reader.GetValue(2);
+                            if (lockId is DBNull)
+                            {
+                                lockId = (int)0;
+                            }
+
                             actionFlags = (SessionStateActions)(reader.GetInt32(3));
                             timeout = reader.GetInt32(4);
                             lockAge = new TimeSpan(0, 0, 0, reader.GetInt32(5));


Attachment: [text/bzr-bundle] bzr/vvaintroub@mysql.com-20100421151705-m3rzpf11cnvokava.bundle
Thread
bzr commit into connector-net-6.1 branch (vvaintroub:805) Bug#52175Vladislav Vaintroub21 Apr