[Mono-bugs] [Bug 672113] New: Severe bug adding multiple columns constraints to DataTables

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Feb 15 09:38:30 EST 2011



           Summary: Severe bug adding multiple columns constraints to
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Sys.Data
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: toni at reportman.es
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development
           Blocker: Yes

Description of Problem:
Defining a primary key constraint in a DataTable passing a reference to an
array is not implemented correctly. The DataSet stores the reference to the
passed array, instead of cloning the array (Microsot .net implementation)

Steps to reproduce the problem:
1. Create First DataTable
2. Declare array of two columns
3. Use array to create constraint
4. Reuse the array to create another constraint for other DataTable
5. The constraint of First DataTable is now broken

DataColumn[] primkeys = new DataColumn[2];
primkeys[0] = FirstTable.Columns[0];
primkeys[1] = FirstTable.Columns[0];

primkeys[0] = SecondTable.Columns[0];
primkeys[1] = SecondTable.Columns[0];

The first constraint is now broken, so when adding rows to the first table
results in unexpected error like: COLUMN xx does not belong to TABLE xx.

Actual Results:
The constraints have a reference to a single array, so the array of first table
is borkin.

Expected Results:
Two different and independent constraints inside the DataSet

How often does this happen? 

Additional Information:
This problem was discovered because side effects, problems adding rows. The
initial code was in Microsoft.Net so after compiling and executing in Mono
random problems with DataTables occured.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list