Commit fa5b6774 authored by unknown's avatar unknown

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.
parent 540a69c3
...@@ -980,6 +980,8 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op) ...@@ -980,6 +980,8 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op)
Uint64 tValue; Uint64 tValue;
NdbRecAttr* tRecAttrResult; NdbRecAttr* tRecAttrResult;
NdbError savedError;
CHECK_STATUS_MACRO_ZERO; CHECK_STATUS_MACRO_ZERO;
BaseString currentDb(getDatabaseName()); BaseString currentDb(getDatabaseName());
...@@ -1074,7 +1076,12 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op) ...@@ -1074,7 +1076,12 @@ Ndb::opTupleIdOnNdb(Ndb_local_table_info* info, Uint64 & opValue, Uint32 op)
error_handler: error_handler:
theError.code = tConnection->theError.code; theError.code = tConnection->theError.code;
savedError = theError;
this->closeTransaction(tConnection); this->closeTransaction(tConnection);
theError = savedError;
error_return: error_return:
// Restore current name space // Restore current name space
setDatabaseName(currentDb.c_str()); setDatabaseName(currentDb.c_str());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment