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 << "No records found." << endl;
// ...
}
myNdb->closeTransaction(myTransaction);
Original issue reported on code.google.com by john.david.duncan on 18 Apr 2007 at 10:41
Original issue reported on code.google.com by
john.david.duncan
on 18 Apr 2007 at 10:41