diff options
author | unknown <gni/root@dev3-127.(none)> | 2006-11-29 16:45:18 +0800 |
---|---|---|
committer | unknown <gni/root@dev3-127.(none)> | 2006-11-29 16:45:18 +0800 |
commit | fa5b6774d04b6faae1801ef4634e58d71ae57e2e (patch) | |
tree | 9894059acd17fd2baefd0d6033d96423848366ac /ndb | |
parent | 540a69c34593ba8681b36ea51264eeedf762dfb1 (diff) | |
download | mariadb-git-fa5b6774d04b6faae1801ef4634e58d71ae57e2e.tar.gz |
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.
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/ndbapi/Ndb.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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()); |