Bug 256 - Missing data rows
Summary: Missing data rows
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Data ()
Version: 2.10.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-08-10 11:22 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2011-08-31 04:54 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Test case (2.64 KB, application/zip)
2011-08-10 11:22 UTC, Rolf Bjarne Kvinge [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Rolf Bjarne Kvinge [MSFT] 2011-08-10 11:22:44 UTC
Created attachment 106 [details]
Test case

Download and unzip attached sample.
Run xsp2 in the directory, then make.

This is written to the terminal:

TableName: abc RowCount: 1 
TableName: 123 RowCount: 0 FAILED

When a DataTable with a numeric table name is serialized, it loses rows somehow.

This is https://bugzilla.novell.com/show_bug.cgi?id=651317 with a standalone test case.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2011-08-10 11:24:10 UTC
Atsushi, I think this is your area.
Comment 2 Atsushi Eno 2011-08-15 23:44:35 UTC
It's not really my area, but I can give some help.
Looks like The server serializes the "123" table as <_x0031_23>...</_x0031_23> which means, the TableName is applied XmlConvert.EncodeLocalName() inside DataSet implementation.
I'll dig more in depth.
Comment 3 Atsushi Eno 2011-08-31 04:25:31 UTC
No one else seems to have dove into this bug. I have created isolated test case that does not involve System.Web.Services:

using System;
using System.Data;
using System.IO;

class C
	static void Main ()
		DataSet dsTest = new DataSet ();
		dsTest.ReadXml (new StringReader (@"
  <xs:schema id='MonoTouchTest' xmlns='' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:msdata='urn:schemas-microsoft-com:xml-msdata'>
    <xs:element name='MonoTouchTest' msdata:IsDataSet='true' msdata:UseCurrentLocale='true'>
        <xs:choice minOccurs='0' maxOccurs='unbounded'>
          <xs:element name='_x0031_23'>
                <xs:element name='Value1' type='xs:string' minOccurs='0' />
                <xs:element name='Value2' type='xs:string' minOccurs='0' />
    <_x0031_23 diffgr:id='1231' msdata:rowOrder='0'>
		Console.WriteLine ("TableName: " + dsTest.Tables[0].TableName + " RowCount: " + dsTest.Tables[0].Rows.Count.ToString() + " " + (dsTest.Tables[0].Rows.Count == 0 ? "FAILED" : ""));
Comment 4 Atsushi Eno 2011-08-31 04:54:18 UTC
This issue is fixed in git master (1d5a375) and mono-2-10 (ae7d005) branches.