dannote / mod-ndb

Automatically exported from code.google.com/p/mod-ndb
0 stars 0 forks source link

Handle 5.1.16 API change in execute() #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
          In MySQL 5.1.15 and earlier versions, this method returned
          <literal>-1</literal> for some errors even when the
          trasnsaction itself was not aborted; beginning with MySQL
          5.1.16, this method reports a failure if and only
          if the transaction was aborted. (This change was
          made due to the fact it had been possible to construct cases
          where there was no way to determine whether or not a
          transaction was actually aborted.) However, the transaction's
          error information is still set in such cases to reflect the
          actual error code and category.

          This means, in the case where a
          NoDataFound error is a possibility, you
          must now check for it explicitly, for example:

myTransaction = myNdb->startTransaction();

if(myTransaction->getNdbError().classification == NdbError:NoDataFound)
{
  cout &lt;&lt; "No records found." &lt;&lt; endl;
  //  ...
}

myNdb->closeTransaction(myTransaction);

Original issue reported on code.google.com by john.david.duncan on 18 Apr 2007 at 10:41

GoogleCodeExporter commented 9 years ago

Original comment by john.david.duncan on 19 Apr 2007 at 11:04

GoogleCodeExporter commented 9 years ago
Fixed in svn 342.

Original comment by john.david.duncan on 20 Aug 2007 at 5:59