[Mono-dev] patch for System.Data.SqlClient - SqlDataReader.GetValues() with SequentialAccess flag set

Raja R Harinath harinath at hurrynot.org
Wed Apr 14 05:09:03 EDT 2010


Hi,

wech <mono-devel-list at oopsi.de> writes:

> while porting a windows .Net application to mono on Linux I noticed a
> problem with the SqlDataReader implementation of GetValues() in
> combination with the CommandBehavior.SequentialAccess flag set.
>
> It does not return any values because the ColumnCollection is not
> filled with values in SequentialAccess-Mode.
>
> I've attached a proposed patch and a patch for the SqlDataReader unit test.
[snip]
> --- mono.head/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs	2010-04-09 14:53:12.000000000 +0200
> +++ mono/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs	2010-04-09 07:11:45.000000000 +0200
> @@ -1430,29 +1430,40 @@
>  #if NET_2_0
>  		override
>  #endif // NET_2_0
> -		int GetValues (object[] values)
> -		{
> -			ValidateState ();
> -			EnsureDataAvailable ();
> -
> -			if (values == null)
> -				throw new ArgumentNullException ("values");
[snip]
> +		int GetValues (object[] values)
> +		{
> +			ValidateState ();
> +			EnsureDataAvailable ();
> +
> +			if (values == null)
> +				throw new ArgumentNullException ("values");

Your patch appears to be broken due to whitespace damage in the file.
Can you ensure that you didn't change whitespace and line-endings in the
file?  Barring that, try using 'diff -ub' to see if it gives a more
useful patch.

- Hari



More information about the Mono-devel-list mailing list