From 72127b52b3ac293a9da15ed778131f39798d34f1 Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Fri, 25 Feb 2005 09:10:35 +0100 Subject: [PATCH 1/3] BUG#8786 - ndb_autodiscover, post review More explicit naming of variables --- ndb/include/kernel/signaldata/AlterIndx.hpp | 6 ++++-- ndb/include/kernel/signaldata/BuildIndx.hpp | 4 ++-- ndb/include/kernel/signaldata/CreateIndx.hpp | 6 ++++-- ndb/include/kernel/signaldata/CreateTrig.hpp | 6 ++++-- ndb/include/kernel/signaldata/DropIndx.hpp | 6 ++++-- ndb/src/kernel/blocks/dbdict/Dbdict.cpp | 1 + ndb/src/ndbapi/NdbDictionaryImpl.cpp | 4 ++-- 7 files changed, 21 insertions(+), 12 deletions(-) diff --git a/ndb/include/kernel/signaldata/AlterIndx.hpp b/ndb/include/kernel/signaldata/AlterIndx.hpp index 4c8bb465cf1..f5ad835b6f3 100644 --- a/ndb/include/kernel/signaldata/AlterIndx.hpp +++ b/ndb/include/kernel/signaldata/AlterIndx.hpp @@ -201,8 +201,10 @@ private: //Uint32 m_indexVersion; Uint32 m_errorCode; Uint32 m_errorLine; - Uint32 m_errorNode; - + union { + Uint32 m_errorNode; + Uint32 masterNodeId; // if NotMaster + }; public: AlterIndxConf* getConf() { return &m_conf; diff --git a/ndb/include/kernel/signaldata/BuildIndx.hpp b/ndb/include/kernel/signaldata/BuildIndx.hpp index e8eca03ea81..a6ea84c5ea0 100644 --- a/ndb/include/kernel/signaldata/BuildIndx.hpp +++ b/ndb/include/kernel/signaldata/BuildIndx.hpp @@ -242,9 +242,8 @@ public: AllocationFailure = 4252, InternalError = 4346 }; - STATIC_CONST( SignalLength = BuildIndxConf::SignalLength + 1 ); + STATIC_CONST( SignalLength = BuildIndxConf::SignalLength + 2 ); -private: //Uint32 m_userRef; //Uint32 m_connectionPtr; //Uint32 m_requestInfo; @@ -253,6 +252,7 @@ private: //Uint32 m_indexId; BuildIndxConf m_conf; Uint32 m_errorCode; + Uint32 masterNodeId; public: BuildIndxConf* getConf() { diff --git a/ndb/include/kernel/signaldata/CreateIndx.hpp b/ndb/include/kernel/signaldata/CreateIndx.hpp index 2751cfbbbfa..5563f80a555 100644 --- a/ndb/include/kernel/signaldata/CreateIndx.hpp +++ b/ndb/include/kernel/signaldata/CreateIndx.hpp @@ -220,8 +220,10 @@ public: //Uint32 m_indexVersion; Uint32 m_errorCode; Uint32 m_errorLine; - Uint32 m_errorNode; - + union { + Uint32 m_errorNode; + Uint32 masterNodeId; // If NotMaster + }; public: CreateIndxConf* getConf() { return &m_conf; diff --git a/ndb/include/kernel/signaldata/CreateTrig.hpp b/ndb/include/kernel/signaldata/CreateTrig.hpp index 4af9cb57f68..62627256dcf 100644 --- a/ndb/include/kernel/signaldata/CreateTrig.hpp +++ b/ndb/include/kernel/signaldata/CreateTrig.hpp @@ -311,8 +311,10 @@ private: //Uint32 m_triggerInfo; Uint32 m_errorCode; Uint32 m_errorLine; - Uint32 m_errorNode; - + union { + Uint32 m_errorNode; + Uint32 masterNodeId; // When NotMaster + }; public: CreateTrigConf* getConf() { return &m_conf; diff --git a/ndb/include/kernel/signaldata/DropIndx.hpp b/ndb/include/kernel/signaldata/DropIndx.hpp index 247fbdf914e..fd2ea7f0b7b 100644 --- a/ndb/include/kernel/signaldata/DropIndx.hpp +++ b/ndb/include/kernel/signaldata/DropIndx.hpp @@ -185,8 +185,10 @@ public: //Uint32 m_indexVersion; Uint32 m_errorCode; Uint32 m_errorLine; - Uint32 m_errorNode; - + union { + Uint32 m_errorNode; + Uint32 masterNodeId; + }; public: DropIndxConf* getConf() { return &m_conf; diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 2b2748eb165..b1e573e1cc8 100644 --- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -10237,6 +10237,7 @@ Dbdict::buildIndex_sendReply(Signal* signal, OpBuildIndexPtr opPtr, rep->setIndexId(opPtr.p->m_request.getIndexId()); if (sendRef) { rep->setErrorCode(opPtr.p->m_errorCode); + rep->masterNodeId = opPtr.p->m_errorNode; gsn = GSN_BUILDINDXREF; length = BuildIndxRef::SignalLength; } diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index 3d92f0e010f..222db6060c7 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -2123,7 +2123,7 @@ NdbDictInterface::execCREATE_INDX_REF(NdbApiSignal * signal, const CreateIndxRef* const ref = CAST_CONSTPTR(CreateIndxRef, signal->getDataPtr()); m_error.code = ref->getErrorCode(); if(m_error.code == ref->NotMaster) - m_masterNodeId= ref->m_errorNode; + m_masterNodeId= ref->masterNodeId; m_waiter.signal(NO_WAIT); } @@ -2249,7 +2249,7 @@ NdbDictInterface::execDROP_INDX_REF(NdbApiSignal * signal, const DropIndxRef* const ref = CAST_CONSTPTR(DropIndxRef, signal->getDataPtr()); m_error.code = ref->getErrorCode(); if(m_error.code == ref->NotMaster) - m_masterNodeId= ref->m_errorNode; + m_masterNodeId= ref->masterNodeId; m_waiter.signal(NO_WAIT); } From 65daa271c15f93a0cad690341f26271584313a26 Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Fri, 25 Feb 2005 09:35:09 +0100 Subject: [PATCH 2/3] Cset exclude: joreland@mysql.com|ChangeSet|20050224071025|18754 --- sql/sql_parse.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 8ba4e1e3a84..9a78daa1479 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1865,11 +1865,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, mysqld_list_fields(thd,&table_list,fields); thd->lex->unit.cleanup(); thd->cleanup_after_query(); -#ifdef HAVE_INNOBASE_DB release_local_lock(thd, locked_tables, old_innodb_table_locks); -#else - release_local_lock(thd, locked_tables, false); -#endif break; } #endif @@ -4605,11 +4601,8 @@ cleanup: if (thd->lock == thd->locked_tables) thd->lock= 0; } -#ifdef HAVE_INNOBASE_DB + release_local_lock(thd, locked_tables, old_innodb_table_locks); -#else - release_local_lock(thd, locked_tables, false); -#endif DBUG_RETURN(res || thd->net.report_error); } From 54af1b8fc889b9f461f693e2e5b152706aa4eb8f Mon Sep 17 00:00:00 2001 From: "joreland@mysql.com" <> Date: Fri, 25 Feb 2005 11:47:27 +0100 Subject: [PATCH 3/3] add auto generated ndb dsp-files (for msvc++ 6.0) to ignore file --- .bzrignore | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/.bzrignore b/.bzrignore index f43a67af883..faedfa2b48e 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1007,4 +1007,48 @@ tests/mysql_client_test libmysqld/examples/mysql_client_test.c libmysqld/examples/mysql_client_test_embedded libmysqld/examples/mysqltest_embedded -support-files/ndb-config-2-node.ini +ndb/src/common/debugger/signaldata/libsignaldataprint.dsp +ndb/src/common/debugger/libtrace.dsp +ndb/src/common/logger/liblogger.dsp +ndb/src/common/mgmcommon/libmgmsrvcommon.dsp +ndb/src/common/portlib/libportlib.dsp +ndb/src/common/transporter/libtransporter.dsp +ndb/src/common/util/libgeneral.dsp +ndb/src/kernel/blocks/backup/libbackup.dsp +ndb/src/kernel/blocks/cmvmi/libcmvmi.dsp +ndb/src/kernel/blocks/dbacc/libdbacc.dsp +ndb/src/kernel/blocks/dbdict/libdbdict.dsp +ndb/src/kernel/blocks/dbdih/libdbdih.dsp +ndb/src/kernel/blocks/dblqh/libdblqh.dsp +ndb/src/kernel/blocks/dbtc/libdbtc.dsp +ndb/src/kernel/blocks/dbtup/libdbtup.dsp +ndb/src/kernel/blocks/dbtux/libdbtux.dsp +ndb/src/kernel/blocks/dbutil/libdbutil.dsp +ndb/src/kernel/blocks/grep/libgrep.dsp +ndb/src/kernel/blocks/ndbcntr/libndbcntr.dsp +ndb/src/kernel/blocks/ndbfs/libndbfs.dsp +ndb/src/kernel/blocks/qmgr/libqmgr.dsp +ndb/src/kernel/blocks/suma/libsuma.dsp +ndb/src/kernel/blocks/trix/libtrix.dsp +ndb/src/kernel/error/liberror.dsp +ndb/src/kernel/vm/libkernel.dsp +ndb/src/kernel/ndbd.dsp +ndb/src/mgmapi/libmgmapi.dsp +ndb/src/mgmclient/ndb_mgm.dsp +ndb/src/mgmclient/libndbmgmclient.dsp +ndb/src/mgmsrv/ndb_mgmd.dsp +ndb/src/ndbapi/libndbapi.dsp +ndb/src/libndbclient.dsp +ndb/test/ndbapi/flexBench.dsp +ndb/test/ndbapi/testBasic.dsp +ndb/test/ndbapi/testBlobs.dsp +ndb/test/ndbapi/testScan.dsp +ndb/test/src/libNDBT.dsp +ndb/tools/ndb_waiter.dsp +ndb/tools/ndb_drop_table.dsp +ndb/tools/ndb_delete_all.dsp +ndb/tools/ndb_desc.dsp +ndb/tools/ndb_drop_index.dsp +ndb/tools/ndb_show_tables.dsp +ndb/tools/ndb_select_all.dsp +ndb/tools/ndb_select_count.dsp