Description:
The comment said:
* Correct output from this program is:
*
* ATTR1 ATTR2
* 0 10
* 1 1
* 2 12
* Detected that deleted tuple doesn't exist!
* 4 14
* 5 5
* 6 16
* 7 7
* 8 18
* 9 9
* ATTR1 ATTR2
* 0 10
* 1 1
* 2 12
* Detected that deleted tuple doesn't exist!
* 4 14
* 5 5
* 6 16
* 7 7
But the output is:
* ATTR1 ATTR2
* 0 10
* 1 1
* 2 12
* 4 14
* 5 5
* 6 16
* 7 7
* 8 18
* 9 9
* ATTR1 ATTR2
* 0 10
* 1 1
* 2 12
* 4 14
* 5 5
* 6 16
* 7 7
How to repeat:
Just run it.
Suggested fix:
/usr/local/src/mysql-5.1-ndb-bak/storage/ndb/ndbapi-examples/ndbapi_simple_dual/main.cpp 2007-05-30 05:36:06.000000000 +0800
+++ ./main.cpp 2007-08-01 21:59:38.000000000 +0800
@@ -333,6 +333,9 @@
if (myRecAttr == NULL) APIERROR(myTransaction->getNdbError());
if(myTransaction->execute( NdbTransaction::Commit ) == -1)
+ APIERROR(myTransaction->getNdbError());
+
+ if (myTransaction->getNdbError().classification == NdbError::NoDataFound)
if (i == 3) {
std::cout << "Detected that deleted tuple doesn't exist!" << std::endl;
} else {