- Whitespace Espressions:
-- if a column expression is a pure whitespace, use an empty string instead
-- if a column expression is surrounded by whitespace, preserve whitespace
-- if a column expression is null/empty, use an empty string
- Get a row's column value:
-- make sure we throw exceptions if the column we are looking at is null
-- make sure we throw exceptions if we can't find the column with the provided name
- bugzilla.xamarin.com issue 20925
- if an expression column was added ayer there were rows, and then IsNull is called, the result is incorrect (it will always be true)
* DataRow.cs: There is a total of issues been addressed here:
1) SetParentRow (null) would crash instead of setting all relation
columns to DBNull.
2)SetParentRow (parentRow, relation) did not check if both row and relation
belong to the same table.
3)SetParentRow(parentRow) when the child table has multiple relations to different
tables, we should only process those that belong to the table of parentRow.
Confirmed it fails without the bug fix, and passes with it.
Also confirmed again that no other System.Data tests failed that weren't
previously failing. With this test, there were 9 failures before the patch
is applied, and 8 failures after the patch is applied. Also tested before
I changed anything and previous to my changes 8 tests in System.Data were
already failing. This patch previosuly committed in other words does not
introduce any new bugs to the system.data tests.
When cloning a table we loop over all the columns and clone them, but if a column
contains an expression with a reference to a later column, we'll throw an exception
unless we delay the expression compilation until all the columns have been added
to the new table clone.
So I've split out the expression compilation logic from the Expression property setter,
and now the column Clone method only sets the field. The Clone caller is responsible
for calling CompileExpression on the cloned column after adding all the cloned columns to
the cloned table.
* Fixes to the SUBSTRING and TRIM function to allow
a wider range of functions to be passed as
parameters. This fixes xamarin #665
* Fix to the Parser.jay grammar to eliminate the
reduce/reduce conflicts.
* Dropping the string concatenation code and instead
use the existing arithmetic addition operator which
also fixes the concatenation operation in the presence
of null values
* Adds the null literal
With the associated test cases.
- It is recommended to set auto-increment fields to ReadOnly. When
calling Copy() the check for ReadOnly must be omitted, otherwise
you get an exception.
The RadOnly attribute is set for the parent "Id" field to test
proper handling of read-only fields.
- Source reindention and cleanups.
Signed-off-by: Carsten Schlote <[email protected]>
** Fixes#582732 - Patch by Jeffrey Alvarez <[email protected]>
* DataColumn.cs (Clone): Deep copy the ExtendedProperties
collection.
* XmlSchemaDataImporter.cs: Support import of extended
properties.
* XmlSchemaWriter.cs: Fix exception by writing the extended
properties before simpletype element.
** Fixes#561667
* SqlCommand.cs (Dispose): While Disposing, set connection's
datareader to null so the connection can be reused with another datareader.