[Mono-bugs] [Bug 381151] DataAdapter returns 0 rows after an SQL timeout occured

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jul 30 16:40:46 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=381151

User mark at dawebber.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=381151#c26


Mark Gimelfarb <mark at dawebber.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |ASSIGNED
      Info Provider|mark at dawebber.com           |




--- Comment #26 from Mark Gimelfarb <mark at dawebber.com>  2009-07-30 14:40:43 MDT ---
@Veerapuram:
Sorry for the long period of silence. I finally got a new set of machines,
running Debian Lenny with mono 2.4.2 packages (built myself) installed.

I am not seeing my original issue (no row in position 0), but I now have a
different manifestation of the same exact issue just with a different
exception. Using the same code I provided previously (bug-381151_DAFail.cs), I
modified it similar to Gert's case above the actual contents of the SQL
statement to read this:

(line 16 of the .cs file):

SqlCommand cmd = new SqlCommand("waitfor delay '00:00:10'",cnn1);

So, now we can test without having to obtain an explicit table lock. Here's a
behavior I get:

Test from linux
Open
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed
prior to completion of the operation or the server is not responding. --->
Mono.Data.Tds.Protocol.TdsTimeoutException: Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not responding.
  at Mono.Data.Tds.Protocol.Tds.CheckForData (Int32 timeout) [0x00030] in
/root/mono/mono-2.4+dfsg/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs:675
  at Mono.Data.Tds.Protocol.Tds.ExecuteQuery (System.String sql, Int32 timeout,
Boolean wantResults) [0x00029] in
/root/mono/mono-2.4+dfsg/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds.cs:525
  at Mono.Data.Tds.Protocol.Tds70.Execute (System.String commandText,
Mono.Data.Tds.TdsMetaParameterCollection parameters, Int32 timeout, Boolean
wantResults) [0x00034] in
/root/mono/mono-2.4+dfsg/mcs/class/Mono.Data.Tds/Mono.Data.Tds.Protocol/Tds70.cs:534
  at System.Data.SqlClient.SqlCommand.Execute (Boolean wantResults) [0x0020f]
in
/root/mono/mono-2.4+dfsg/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs:532
  --- End of inner exception stack trace ---
  at System.Data.SqlClient.SqlCommand.Execute (Boolean wantResults) [0x00241]
in
/root/mono/mono-2.4+dfsg/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs:535
  at System.Data.SqlClient.SqlCommand.ExecuteReader (CommandBehavior behavior)
[0x00035] in
/root/mono/mono-2.4+dfsg/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs:591
  at System.Data.SqlClient.SqlCommand.ExecuteReader () [0x00000] in
/root/mono/mono-2.4+dfsg/mcs/class/System.Data/System.Data.SqlClient/SqlCommand.cs:580
  at (wrapper remoting-invoke-with-check)
System.Data.SqlClient.SqlCommand:ExecuteReader ()
  at MainClass.Main (System.String[] args) [0x00044] in
/root/bug-381151_DAFail.cs:22

---------------------------------------------------
Hit Enter for me, will ya?

Performing DA test

Unhandled Exception: System.NullReferenceException: Object reference not set to
an instance of an object
  at System.Data.SqlClient.SqlDataReader.get_FieldCount () [0x00006] in
/root/mono/mono-2.4+dfsg/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs:127
  at System.Data.Common.DataAdapter.FillInternal (System.Data.DataSet dataSet,
System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32
maxRecords) [0x0003f] in
/root/mono/mono-2.4+dfsg/mcs/class/System.Data/System.Data.Common/DataAdapter.cs:518
  at System.Data.Common.DataAdapter.Fill (System.Data.DataSet dataSet,
System.String srcTable, IDataReader dataReader, Int32 startRecord, Int32
maxRecords) [0x00000] in
/root/mono/mono-2.4+dfsg/mcs/class/System.Data/System.Data.Common/DataAdapter.cs:589
  at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet, Int32
startRecord, Int32 maxRecords, System.String srcTable, IDbCommand command,
CommandBehavior behavior) [0x0004e] in
/root/mono/mono-2.4+dfsg/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs:308
  at System.Data.Common.DbDataAdapter.Fill (System.Data.DataSet dataSet)
[0x00000] in
/root/mono/mono-2.4+dfsg/mcs/class/System.Data/System.Data.Common/DbDataAdapter.cs:236
  at MainClass.Main (System.String[] args) [0x000e2] in
/root/bug-381151_DAFail.cs:45

Notice the NullReferenceException. That shouldn't be happening. The way I see
it, I should get my data back regardless, and if the connection is being
internally closed it should be reopen for the Fill() to do what it needs to do.

This time around I'm testing against MS SQL server 2008, but that shouldn't
make a difference.

MS.NET returns TimeoutException in both cases, as it's supposed to, IMO.

So, do we still have an issue somewhere?

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


More information about the mono-bugs mailing list