[Mono-bugs] [Bug 60118][Nor] Changed - XmlDataReader.Process() fails if DataTable name is the same as DataSet name

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 16 Jun 2004 05:31:04 -0400 (EDT)


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 atsushi@ximian.com.

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

--- shadow/60118	2004-06-13 06:22:48.000000000 -0400
+++ shadow/60118.tmp.23260	2004-06-16 05:31:04.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 60118
 Product: Mono: Class Libraries
 Version: unspecified
-OS: 
+OS: unknown
 OS Details: 
 Status: NEW   
 Resolution: 
-Severity: 
+Severity: Unknown
 Priority: Normal
 Component: Sys.Data
 AssignedTo: atsushi@ximian.com                            
 ReportedBy: borisk@mainsoft.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -63,6 +63,29 @@
 
 
 ------- Additional Comments From borisk@mainsoft.com  2004-06-13 06:22 -------
 Created an attachment (id=8153)
 Xml for test case
 
+
+------- Additional Comments From atsushi@ximian.com  2004-06-16 05:31 -------
+Below is a proposed fix from Boris (thanks!). However I didn't applied
+it since it results in some regressions. People in that trouble would
+try this fixage:
+
+--------
+The proposed solution is a bit straightforward and it is to check for
+the case :
+in XmlDataReader.Process() at line 101 instead of
+if (tab != null && tab.Namespace == reader.NamespaceURI)
+should be
+if (tab != null && tab.Namespace == reader.NamespaceURI &&
+dataset.DataSetName != XmlConvert.DecodeName (reader.LocalName)) 
+
+This solution is almost ok, but it will fail in one case : xml holding
+only one table with name equals to default dataset name, i.e. :
+<NewDataSet>
+   <Column1>1</Column1>
+   <Column2>2</Column2>
+</NewDataSet> 
+
+--------