[Mono-bugs] [Bug 419224] New: Infinite 100% CPU when accessing MySQL tinyblob with a null value

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 21 10:48:45 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=419224


           Summary: Infinite 100% CPU when accessing MySQL tinyblob with a
                    null value
           Product: Mono: Class Libraries
           Version: 2.0
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Blocker
          Priority: P5 - None
         Component: Sys.Data
        AssignedTo: bnc-blr-team-mono at forge.provo.novell.com
        ReportedBy: awunwpa7 at yahoo.com.ph
         QAContact: mono-bugs at lists.ximian.com
          Found By: Beta-Customer


I've got a problem using MONO with a MySQL ODBC driver: When I'm working with a
OdbcDataReader instance, MONO goes to 100% CPU and never returns (I'm sure that
it's not my code hanging). This happens when I access a column of MySQL
datatype "tinyblob" AND when the value within the specific database cell is set
to NULL. It does not matter whether I use OdbcDataReader.GetValue(),
GetValues() or IsDBNull() - as soon as the null-"tinyblob" is affected, the
framework uses up all CPU and is lost. So there's no workaround possible from
outside the framework. Maybe this error also goes for other MySQL datatypes
(but I've not tried it).

It's not the same with the MS Runtime and Class Libraries (v2.0, same database
server and ODBC driver), that simply says it's a DBNull value and moves on.

Tested MySQL ODBC-Driver: v5.1
Tested MySQL Server: 5.0.51b-community-nt


C# test case (works errorfree with MS):


public void Foo(string MyValidConnectionString)
{
  OdbcConnection TestConn = new OdbcConnection(MyValidConnectionString);

  TestConn.Open();

  OdbcCommand NewCmd = new OdbcCommand("SELECT * FROM test_table", TestConn);

  OdbcDataReader NewRdr = NewCmd.ExecuteReader();

  // some tinyblob column index:
  int TinyblobIdx = 5;

  bool GotSomething = NewRdr.Read();

  if (GotSomething)
  {
    Console.WriteLine("Cover me! I'm going in...");

    // no matter what access method is used...
    NewRdr.IsDBNull(TinyblobIdx); // <- ...this let's MONO spin
  }

  Console.WriteLine("This never happens in MONO");
}


-- 
Configure bugmail: https://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