Bug #30178 Patch: the ndbapi_simple_dual, the output is not correct
| Submitted: | 1 Aug 2007 14:28 | Modified: | 8 Aug 2007 8:20 |
|---|---|---|---|
| Reporter: | liang chen | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Cluster: NDB API | Severity: | S3 (Non-critical) |
| Version: | mysql-5.1 | OS: | Any (storage/ndb/ndbapi-examples/ndbapi_simple_dual/main.cpp) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | Contribution, mysql-5.1-ndb | ||
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
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 {