[Mono-bugs] [Bug 75788][Maj] New - Table index out of range in TDS protocol code.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 11 20:01:17 EDT 2005


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 bugzilla at patearl.net.

http://bugzilla.ximian.com/show_bug.cgi?id=75788

--- shadow/75788	2005-08-11 20:01:17.000000000 -0400
+++ shadow/75788.tmp.29435	2005-08-11 20:01:17.000000000 -0400
@@ -0,0 +1,51 @@
+Bug#: 75788
+Product: Mono: Class Libraries
+Version: 1.1
+OS: All
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.Data.SqlClient
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: bugzilla at patearl.net               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Table index out of range in TDS protocol code.
+
+Description of Problem:
+
+When doing an operation such as Fill() on an MS SQL connected DataSet, some
+code within Mono's TDS generates an index out of range exception.
+
+The following code is to blame for the out of range exception:
+
+File: Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs
+Line: Around 990
+
+    byte index = (byte) (values[0] - (byte) 1);
+    byte tableIndex = (byte) (values[1] - (byte) 1);
+    // Possible fix for table index of 255.
+    if (values[1] == 0) tableIndex = 0;
+
+Two possibilities were observed:
+    tableNames.Count == 1
+    values[1] == 0
+The other:
+    tableNames.Count == 1
+    tables[1] == 1
+
+I don't understand why this is, but the fix indicated above worked to
+eliminate all the index out of range exceptions for our limited test cases.
+ Perhaps somebody with more knowledge of the protocol or the TDS code can
+come up with a better explanation or fix.
+
+The discrepancy in indices may be due to stored procedures vs select
+statements, though we did not confirm this in our testing.
+
+How often does this happen?
+
+It seems to happen consistently.


More information about the mono-bugs mailing list