From fa5b6774d04b6faae1801ef4634e58d71ae57e2e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 29 Nov 2006 16:45:18 +0800 Subject: BUG#21033 The error log of mysqld shows useless information, and hides the real error. ndb/src/ndbapi/Ndb.cpp: Ndb.closeTransaction() modifies the value of Ndb.theError.code, but the error code shouldn't be changed here. Mysqld will use the returning error code to log the correct error information. --- ndb/src/ndbapi/Ndb.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ndb') diff --git a/ndb/src/ndbapi/Ndb.cpp b/ndb/src/ndbapi/Ndb.cpp index 9d1c78a5972..26e8b7168ce 100644 --- a/ndb/src/ndbapi/Ndb.cpp +++ b/ndb/src/ndbapi/Ndb.cpp @@ -980,6 +980,8 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op) Uint64 tValue; NdbRecAttr* tRecAttrResult; + NdbError savedError; + CHECK_STATUS_MACRO_ZERO; BaseString currentDb(getDatabaseName()); @@ -1074,7 +1076,12 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op) error_handler: theError.code = tConnection->theError.code; + + savedError = theError; + this->closeTransaction(tConnection); + theError = savedError; + error_return: // Restore current name space setDatabaseName(currentDb.c_str()); -- cgit v1.2.1