From b57cf4b07b2c9529d4fd5ca677b4ea53fd32d58e Mon Sep 17 00:00:00 2001 From: "df@pippilotta.erinye.com" <> Date: Tue, 15 May 2007 11:32:33 +0200 Subject: [PATCH 01/19] BUG#28370 federated test cases fail with binlog disabled --- mysql-test/include/federated.inc | 1 + mysql-test/mysql-test-run.pl | 3 +-- mysql-test/r/have_log_bin.require | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/include/federated.inc b/mysql-test/include/federated.inc index c8e8ededa11..7bdb2efaa8b 100644 --- a/mysql-test/include/federated.inc +++ b/mysql-test/include/federated.inc @@ -1,3 +1,4 @@ +--source include/have_log_bin.inc --source include/not_embedded.inc --source ./include/have_federated_db.inc diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index c494626bbae..6bf35410783 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3740,8 +3740,7 @@ sub mysqld_arguments ($$$$) { "%s--log-slow-queries=%s-slow.log", $prefix, $log_base_path); # Check if "extra_opt" contains --skip-log-bin - my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt); - + my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt, @opt_extra_mysqld_opt); if ( $mysqld->{'type'} eq 'master' ) { if (! ($opt_skip_master_binlog || $skip_binlog) ) diff --git a/mysql-test/r/have_log_bin.require b/mysql-test/r/have_log_bin.require index cacdf8df0ce..d4fd77e4f8d 100644 --- a/mysql-test/r/have_log_bin.require +++ b/mysql-test/r/have_log_bin.require @@ -1,2 +1,2 @@ Variable_name Value -have_log_bin ON +log_bin ON From 3beef02bc6a74b19e72048c7e26d93c1db7500d4 Mon Sep 17 00:00:00 2001 From: "df@pippilotta.erinye.com" <> Date: Tue, 15 May 2007 12:22:53 +0200 Subject: [PATCH 02/19] BUG#28372 mysqldump test case fails with binlog disabled --- mysql-test/t/mysqldump.test | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 4c4690520c6..78718a9e6ec 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1,6 +1,9 @@ # Embedded server doesn't support external clients --source include/not_embedded.inc +# Binlog is required +--source include/have_log_bin.inc + --disable_warnings DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3; drop database if exists mysqldump_test_db; From 599d07713c8c887191c182fa478072493cc291cb Mon Sep 17 00:00:00 2001 From: "tomas@whalegate.ndb.mysql.com" <> Date: Wed, 23 May 2007 07:53:16 +0200 Subject: [PATCH 03/19] remove some not used code --- sql/ha_ndbcluster.cc | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 0f3a42bbce7..d7326375afb 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -234,11 +234,6 @@ inline int execute_no_commit(ha_ndbcluster *h, NdbTransaction *trans, bool force_release) { -#ifdef NOT_USED - int m_batch_execute= 0; - if (m_batch_execute) - return 0; -#endif h->release_completed_operations(trans, force_release); return trans->execute(NdbTransaction::NoCommit, NdbTransaction::AbortOnError, @@ -248,11 +243,6 @@ int execute_no_commit(ha_ndbcluster *h, NdbTransaction *trans, inline int execute_commit(ha_ndbcluster *h, NdbTransaction *trans) { -#ifdef NOT_USED - int m_batch_execute= 0; - if (m_batch_execute) - return 0; -#endif return trans->execute(NdbTransaction::Commit, NdbTransaction::AbortOnError, h->m_force_send); @@ -261,11 +251,6 @@ int execute_commit(ha_ndbcluster *h, NdbTransaction *trans) inline int execute_commit(THD *thd, NdbTransaction *trans) { -#ifdef NOT_USED - int m_batch_execute= 0; - if (m_batch_execute) - return 0; -#endif return trans->execute(NdbTransaction::Commit, NdbTransaction::AbortOnError, thd->variables.ndb_force_send); @@ -275,11 +260,6 @@ inline int execute_no_commit_ie(ha_ndbcluster *h, NdbTransaction *trans, bool force_release) { -#ifdef NOT_USED - int m_batch_execute= 0; - if (m_batch_execute) - return 0; -#endif h->release_completed_operations(trans, force_release); return trans->execute(NdbTransaction::NoCommit, NdbTransaction::AO_IgnoreError, From 259d7deb66f27b549a902fd5d753a54e0ec0db28 Mon Sep 17 00:00:00 2001 From: "tomas@whalegate.ndb.mysql.com" <> Date: Thu, 24 May 2007 21:02:01 +0200 Subject: [PATCH 04/19] Bug #28653 Fast GCP + high load + high RedoBuffer causes ndbrequire - correction, use recomputed _actual_ redobuffer --- ndb/src/kernel/blocks/dblqh/Dblqh.hpp | 5 +++-- ndb/src/kernel/blocks/dblqh/DblqhInit.cpp | 4 ++-- ndb/src/kernel/blocks/dblqh/DblqhMain.cpp | 5 +++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp index 4474d226a27..2ed08db527c 100644 --- a/ndb/src/kernel/blocks/dblqh/Dblqh.hpp +++ b/ndb/src/kernel/blocks/dblqh/Dblqh.hpp @@ -2668,7 +2668,8 @@ private: UintR cfirstfreeLogFile; UintR clogFileFileSize; -#define ZLFO_FILE_SIZE 256 /* MAX 256 OUTSTANDING FILE OPERATIONS */ +#define ZLFO_MIN_FILE_SIZE 256 +// RedoBuffer/32K minimum ZLFO_MIN_FILE_SIZE LogFileOperationRecord *logFileOperationRecord; LogFileOperationRecordPtr lfoPtr; UintR cfirstfreeLfo; @@ -2685,7 +2686,7 @@ private: UintR cfirstfreePageRef; UintR cpageRefFileSize; -#define ZSCANREC_FILE_SIZE 100 +// Configurable ArrayPool c_scanRecordPool; ScanRecordPtr scanptr; UintR cscanNoFreeRec; diff --git a/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp b/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp index 3452269be51..65f4b0f9b4b 100644 --- a/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp +++ b/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp @@ -32,11 +32,11 @@ void Dblqh::initData() chostFileSize = MAX_NDB_NODES; clcpFileSize = ZNO_CONCURRENT_LCP; clcpLocrecFileSize = ZLCP_LOCREC_FILE_SIZE; - clfoFileSize = ZLFO_FILE_SIZE; + clfoFileSize = 0; clogFileFileSize = 0; clogPartFileSize = ZLOG_PART_FILE_SIZE; cpageRefFileSize = ZPAGE_REF_FILE_SIZE; - cscanrecFileSize = ZSCANREC_FILE_SIZE; + cscanrecFileSize = 0; ctabrecFileSize = 0; ctcConnectrecFileSize = 0; ctcNodeFailrecFileSize = MAX_NDB_NODES; diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp index 684598364ab..88bc3f372a5 100644 --- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp @@ -7251,6 +7251,11 @@ void Dblqh::continueScanNextReqLab(Signal* signal) return; } + /* maximum number of log file operations */ + clfoFileSize = clogPageFileSize; + if (clfoFileSize < ZLFO_MIN_FILE_SIZE) + clfoFileSize = ZLFO_MIN_FILE_SIZE; + // Update timer on tcConnectRecord tcConnectptr.p->tcTimer = cLqhTimeOutCount; init_acc_ptr_list(scanptr.p); From b46465f3e707b0a3bdfa7c40413484b30002a2fa Mon Sep 17 00:00:00 2001 From: "tomas@whalegate.ndb.mysql.com" <> Date: Mon, 28 May 2007 12:56:48 +0200 Subject: [PATCH 05/19] Bug #28653 Fast GCP + high load + high RedoBuffer causes ndbrequire - correction, backport to 5.0 --- ndb/src/kernel/blocks/dblqh/DblqhInit.cpp | 5 +++++ ndb/src/kernel/blocks/dblqh/DblqhMain.cpp | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp b/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp index 65f4b0f9b4b..adeed3e1e8b 100644 --- a/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp +++ b/ndb/src/kernel/blocks/dblqh/DblqhInit.cpp @@ -338,6 +338,11 @@ Dblqh::Dblqh(const class Configuration & conf): initData(); + /* maximum number of log file operations */ + clfoFileSize = clogPageFileSize; + if (clfoFileSize < ZLFO_MIN_FILE_SIZE) + clfoFileSize = ZLFO_MIN_FILE_SIZE; + #ifdef VM_TRACE { void* tmp[] = { diff --git a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp index 88bc3f372a5..684598364ab 100644 --- a/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +++ b/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp @@ -7251,11 +7251,6 @@ void Dblqh::continueScanNextReqLab(Signal* signal) return; } - /* maximum number of log file operations */ - clfoFileSize = clogPageFileSize; - if (clfoFileSize < ZLFO_MIN_FILE_SIZE) - clfoFileSize = ZLFO_MIN_FILE_SIZE; - // Update timer on tcConnectRecord tcConnectptr.p->tcTimer = cLqhTimeOutCount; init_acc_ptr_list(scanptr.p); From 186d1534b8734a805e6d8b7a9103f077f8f0526d Mon Sep 17 00:00:00 2001 From: "tomas@whalegate.ndb.mysql.com" <> Date: Mon, 28 May 2007 13:23:11 +0200 Subject: [PATCH 06/19] Bug #28719: multi pk update ignore corrupts data - check multi update as well as update - this bug is not present in 5.0, but execution patch is wrong, so there are probably other bugs --- mysql-test/r/ndb_basic.result | 71 +++++++++++++++++++++++++++++++++++ mysql-test/t/ndb_basic.test | 40 ++++++++++++++++++++ sql/ha_ndbcluster.cc | 3 +- 3 files changed, 113 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/ndb_basic.result b/mysql-test/r/ndb_basic.result index 75ccc6cd39e..346b1d5741b 100644 --- a/mysql-test/r/ndb_basic.result +++ b/mysql-test/r/ndb_basic.result @@ -770,4 +770,75 @@ c abc ab d ab ab e abc abc DROP TABLE t1; +create table t1 (a int not null primary key, b int not null) engine=ndb; +create table t2 (a int not null primary key, b int not null) engine=ndb; +insert into t1 values (1,10), (2,20), (3,30); +insert into t2 values (1,10), (2,20), (3,30); +select * from t1 order by a; +a b +1 10 +2 20 +3 30 +delete from t1 where a > 0 order by a desc limit 1; +select * from t1 order by a; +a b +1 10 +2 20 +delete from t1,t2 using t1,t2 where t1.a = t2.a; +select * from t2 order by a; +a b +3 30 +drop table t1,t2; +create table t1 (a int not null primary key, b int not null) engine=ndb; +insert into t1 values (1,10), (2,20), (3,30); +insert into t1 set a=1, b=100; +ERROR 23000: Duplicate entry '1' for key 1 +insert ignore into t1 set a=1, b=100; +select * from t1 order by a; +a b +1 10 +2 20 +3 30 +insert into t1 set a=1, b=1000 on duplicate key update b=b+1; +select * from t1 order by a; +a b +1 11 +2 20 +3 30 +drop table t1; +create table t1 (a int not null primary key, b int not null) engine=ndb; +create table t2 (c int not null primary key, d int not null) engine=ndb; +insert into t1 values (1,10), (2,10), (3,30), (4, 30); +insert into t2 values (1,10), (2,10), (3,30), (4, 30); +update t1 set a = 1 where a = 3; +ERROR 23000: Duplicate entry '1' for key 1 +select * from t1 order by a; +a b +1 10 +2 10 +3 30 +4 30 +update t1 set b = 1 where a > 1 order by a desc limit 1; +select * from t1 order by a; +a b +1 10 +2 10 +3 30 +4 1 +update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; +ERROR 23000: Duplicate entry '1' for key 1 +select * from t1 order by a; +a b +1 10 +2 10 +3 30 +4 1 +update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; +select * from t1 order by a; +a b +1 10 +2 10 +3 30 +4 1 +drop table t1,t2; End of 5.0 tests diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test index 70fbfbfe733..80c8942348c 100644 --- a/mysql-test/t/ndb_basic.test +++ b/mysql-test/t/ndb_basic.test @@ -740,6 +740,46 @@ INSERT INTO t1 VALUES SELECT * FROM t1 ORDER BY a; DROP TABLE t1; +# delete +create table t1 (a int not null primary key, b int not null) engine=ndb; +create table t2 (a int not null primary key, b int not null) engine=ndb; +insert into t1 values (1,10), (2,20), (3,30); +insert into t2 values (1,10), (2,20), (3,30); +select * from t1 order by a; +delete from t1 where a > 0 order by a desc limit 1; +select * from t1 order by a; +delete from t1,t2 using t1,t2 where t1.a = t2.a; +select * from t2 order by a; +drop table t1,t2; + +# insert ignore +create table t1 (a int not null primary key, b int not null) engine=ndb; +insert into t1 values (1,10), (2,20), (3,30); +--error ER_DUP_ENTRY +insert into t1 set a=1, b=100; +insert ignore into t1 set a=1, b=100; +select * from t1 order by a; +insert into t1 set a=1, b=1000 on duplicate key update b=b+1; +select * from t1 order by a; +drop table t1; + +# update +create table t1 (a int not null primary key, b int not null) engine=ndb; +create table t2 (c int not null primary key, d int not null) engine=ndb; +insert into t1 values (1,10), (2,10), (3,30), (4, 30); +insert into t2 values (1,10), (2,10), (3,30), (4, 30); +--error ER_DUP_ENTRY +update t1 set a = 1 where a = 3; +select * from t1 order by a; +update t1 set b = 1 where a > 1 order by a desc limit 1; +select * from t1 order by a; +--error ER_DUP_ENTRY +update t1,t2 set a = 1, c = 1 where a = 3 and c = 3; +select * from t1 order by a; +update ignore t1,t2 set a = 1, c = 1 where a = 3 and c = 3; +select * from t1 order by a; +drop table t1,t2; + # End of 5.0 tests --echo End of 5.0 tests diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index d7326375afb..47815f0fbf1 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -2449,7 +2449,8 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data) * If IGNORE the ignore constraint violations on primary and unique keys, * but check that it is not part of INSERT ... ON DUPLICATE KEY UPDATE */ - if (m_ignore_dup_key && thd->lex->sql_command == SQLCOM_UPDATE) + if (m_ignore_dup_key && (thd->lex->sql_command == SQLCOM_UPDATE || + thd->lex->sql_command == SQLCOM_UPDATE_MULTI)) { int peek_res= peek_indexed_rows(new_data, pk_update); From 32c1b70e2bfe6b8454131ade3a1df745c570b03f Mon Sep 17 00:00:00 2001 From: "tomas@whalegate.ndb.mysql.com" <> Date: Mon, 28 May 2007 15:59:02 +0200 Subject: [PATCH 07/19] bug#28717, make sure only master updates activeStatus so that othernodes dont get confused after having recevied status from master and then tries to update it self --- ndb/src/kernel/blocks/ERROR_codes.txt | 7 +- ndb/src/kernel/blocks/dbdih/DbdihMain.cpp | 8 +- ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp | 7 ++ ndb/test/ndbapi/testNodeRestart.cpp | 81 +++++++++++++++++++ ndb/test/run-test/daily-basic-tests.txt | 4 + 5 files changed, 105 insertions(+), 2 deletions(-) diff --git a/ndb/src/kernel/blocks/ERROR_codes.txt b/ndb/src/kernel/blocks/ERROR_codes.txt index 0bcc99a6334..bf54d583299 100644 --- a/ndb/src/kernel/blocks/ERROR_codes.txt +++ b/ndb/src/kernel/blocks/ERROR_codes.txt @@ -1,5 +1,5 @@ Next QMGR 1 -Next NDBCNTR 1000 +Next NDBCNTR 1002 Next NDBFS 2000 Next DBACC 3002 Next DBTUP 4014 @@ -487,3 +487,8 @@ Dbdict: 6003 Crash in participant @ CreateTabReq::Prepare 6004 Crash in participant @ CreateTabReq::Commit 6005 Crash in participant @ CreateTabReq::CreateDrop + +Ndbcntr: +-------- + +1001: Delay sending NODE_FAILREP (to own node), until error is cleared diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp index f24a8e2c7d5..44e2293f318 100644 --- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp +++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp @@ -4448,12 +4448,18 @@ void Dbdih::failedNodeLcpHandling(Signal* signal, NodeRecordPtr failedNodePtr) jam(); const Uint32 nodeId = failedNodePtr.i; - if (c_lcpState.m_participatingLQH.get(failedNodePtr.i)){ + if (isMaster() && c_lcpState.m_participatingLQH.get(failedNodePtr.i)) + { /*----------------------------------------------------*/ /* THE NODE WAS INVOLVED IN A LOCAL CHECKPOINT. WE */ /* MUST UPDATE THE ACTIVE STATUS TO INDICATE THAT */ /* THE NODE HAVE MISSED A LOCAL CHECKPOINT. */ /*----------------------------------------------------*/ + + /** + * Bug#28717, Only master should do this, as this status is copied + * to other nodes + */ switch (failedNodePtr.p->activeStatus) { case Sysfile::NS_Active: jam(); diff --git a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp index 26e8f246293..65d80669316 100644 --- a/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp +++ b/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp @@ -1375,6 +1375,13 @@ void Ndbcntr::execNODE_FAILREP(Signal* signal) { jamEntry(); + if (ERROR_INSERTED(1001)) + { + sendSignalWithDelay(reference(), GSN_NODE_FAILREP, signal, 100, + signal->getLength()); + return; + } + const NodeFailRep * nodeFail = (NodeFailRep *)&signal->theData[0]; NdbNodeBitmask allFailed; allFailed.assign(NdbNodeBitmask::Size, nodeFail->theNodes); diff --git a/ndb/test/ndbapi/testNodeRestart.cpp b/ndb/test/ndbapi/testNodeRestart.cpp index 9adbfbd46a6..e5ced961b6f 100644 --- a/ndb/test/ndbapi/testNodeRestart.cpp +++ b/ndb/test/ndbapi/testNodeRestart.cpp @@ -1045,6 +1045,84 @@ int runBug25554(NDBT_Context* ctx, NDBT_Step* step){ } +int +runBug28717(NDBT_Context* ctx, NDBT_Step* step) +{ + int result = NDBT_OK; + int loops = ctx->getNumLoops(); + int records = ctx->getNumRecords(); + Ndb* pNdb = GETNDB(step); + NdbRestarter res; + + if (res.getNumDbNodes() < 4) + { + return NDBT_OK; + } + + int master = res.getMasterNodeId(); + int node0 = res.getRandomNodeOtherNodeGroup(master, rand()); + int node1 = res.getRandomNodeSameNodeGroup(node0, rand()); + + ndbout_c("master: %d node0: %d node1: %d", master, node0, node1); + + if (res.restartOneDbNode(node0, false, true, true)) + { + return NDBT_FAILED; + } + + { + int filter[] = { 15, NDB_MGM_EVENT_CATEGORY_CHECKPOINT, 0 }; + NdbLogEventHandle handle = + ndb_mgm_create_logevent_handle(res.handle, filter); + + + int dump[] = { DumpStateOrd::DihStartLcpImmediately }; + struct ndb_logevent event; + + for (Uint32 i = 0; i<3; i++) + { + res.dumpStateOneNode(master, dump, 1); + while(ndb_logevent_get_next(handle, &event, 0) >= 0 && + event.type != NDB_LE_LocalCheckpointStarted); + while(ndb_logevent_get_next(handle, &event, 0) >= 0 && + event.type != NDB_LE_LocalCheckpointCompleted); + } + } + + if (res.waitNodesNoStart(&node0, 1)) + return NDBT_FAILED; + + int val2[] = { DumpStateOrd::CmvmiSetRestartOnErrorInsert, 1 }; + + if (res.dumpStateOneNode(node0, val2, 2)) + return NDBT_FAILED; + + if (res.insertErrorInNode(node0, 5010)) + return NDBT_FAILED; + + if (res.insertErrorInNode(node1, 1001)) + return NDBT_FAILED; + + if (res.startNodes(&node0, 1)) + return NDBT_FAILED; + + NdbSleep_SecSleep(3); + + if (res.insertErrorInNode(node1, 0)) + return NDBT_FAILED; + + if (res.waitNodesNoStart(&node0, 1)) + return NDBT_FAILED; + + if (res.startNodes(&node0, 1)) + return NDBT_FAILED; + + if (res.waitClusterStarted()) + return NDBT_FAILED; + + return NDBT_OK; +} + NDBT_TESTSUITE(testNodeRestart); TESTCASE("NoLoad", "Test that one node at a time can be stopped and then restarted "\ @@ -1366,6 +1444,9 @@ TESTCASE("Bug25364", ""){ TESTCASE("Bug25554", ""){ INITIALIZER(runBug25554); } +TESTCASE("Bug28717", ""){ + INITIALIZER(runBug28717); +} NDBT_TESTSUITE_END(testNodeRestart); int main(int argc, const char** argv){ diff --git a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt index d2c91279d18..5a3947ec1e9 100644 --- a/ndb/test/run-test/daily-basic-tests.txt +++ b/ndb/test/run-test/daily-basic-tests.txt @@ -492,6 +492,10 @@ max-time: 1500 cmd: testDict args: -n CreateAndDrop +max-time: 1000 +cmd: testNodeRestart +args: -n Bug28717 T1 + max-time: 1500 cmd: testDict args: -n CreateAndDropAtRandom -l 200 T1 From bc7391299793e183b1d28bd9b1a3a66d6401f1d1 Mon Sep 17 00:00:00 2001 From: "tomas@whalegate.ndb.mysql.com" <> Date: Mon, 28 May 2007 16:18:04 +0200 Subject: [PATCH 08/19] make memeber public --- ndb/test/include/NdbRestarter.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ndb/test/include/NdbRestarter.hpp b/ndb/test/include/NdbRestarter.hpp index 2f21c41b9c4..63de32ac038 100644 --- a/ndb/test/include/NdbRestarter.hpp +++ b/ndb/test/include/NdbRestarter.hpp @@ -65,6 +65,8 @@ public: int getRandomNodeOtherNodeGroup(int nodeId, int randomNumber); int getRandomNotMasterNodeId(int randomNumber); + NdbMgmHandle handle; + protected: int waitClusterState(ndb_mgm_node_status _status, @@ -87,7 +89,6 @@ protected: bool connected; BaseString addr; - NdbMgmHandle handle; ndb_mgm_configuration * m_config; protected: ndb_mgm_configuration * getConfig(); From 643cc087b1856cdfc7dac5e44b75df6acc1606d4 Mon Sep 17 00:00:00 2001 From: "tomas@whalegate.ndb.mysql.com" <> Date: Mon, 28 May 2007 16:31:31 +0200 Subject: [PATCH 09/19] print user and system time at watchdog check --- ndb/src/kernel/vm/WatchDog.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ndb/src/kernel/vm/WatchDog.cpp b/ndb/src/kernel/vm/WatchDog.cpp index d1abb709b1e..2e24a5eaa6c 100644 --- a/ndb/src/kernel/vm/WatchDog.cpp +++ b/ndb/src/kernel/vm/WatchDog.cpp @@ -16,6 +16,7 @@ #include #include +#include #include "WatchDog.hpp" #include "GlobalData.hpp" @@ -129,6 +130,13 @@ WatchDog::run(){ break; }//switch g_eventLogger.warning("Ndb kernel is stuck in: %s", last_stuck_action); + { + struct tms my_tms; + times(&my_tms); + g_eventLogger.info("User time: %llu System time: %llu", + (Uint64)my_tms.tms_utime, + (Uint64)my_tms.tms_stime); + } if(alerts == 3){ shutdownSystem(last_stuck_action); } From 1db91f163b8f336f18fd6253fa5699ea6aaefefb Mon Sep 17 00:00:00 2001 From: "df@pippilotta.erinye.com" <> Date: Tue, 29 May 2007 12:23:49 +0200 Subject: [PATCH 10/19] BUG#17707 check-cpu script doesn't include Turion --- BUILD/check-cpu | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BUILD/check-cpu b/BUILD/check-cpu index 2854ec721c6..7429a955ac0 100755 --- a/BUILD/check-cpu +++ b/BUILD/check-cpu @@ -104,6 +104,12 @@ check_cpu () { *Athlon*64*) cpu_arg="athlon64"; ;; + *Turion*) + cpu_arg="athlon64"; + ;; + *Opteron*) + cpu_arg="athlon64"; + ;; *Athlon*) cpu_arg="athlon"; ;; From 5783f5ab928b8aae1941c0feb3c5bce604b5e518 Mon Sep 17 00:00:00 2001 From: "tomas@whalegate.ndb.mysql.com" <> Date: Wed, 30 May 2007 09:00:50 +0200 Subject: [PATCH 11/19] Bug #28749 MaxNoOfOpenFiles offset by 1 --- ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp index 353330929e5..55b0a8c4d39 100644 --- a/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp +++ b/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp @@ -569,7 +569,7 @@ AsyncFile* Ndbfs::createAsyncFile(){ // Check limit of open files - if (theFiles.size()+1 == m_maxFiles) { + if (theFiles.size() == m_maxFiles) { // Print info about all open files for (unsigned i = 0; i < theFiles.size(); i++){ AsyncFile* file = theFiles[i]; From 720f56fb0b471bf5fece5f313e67b670c8f428d9 Mon Sep 17 00:00:00 2001 From: "tomas@whalegate.ndb.mysql.com" <> Date: Wed, 30 May 2007 12:29:19 +0200 Subject: [PATCH 12/19] Bug #28770 file already opened error when corrupt schema file - make sure we close the first file, before opening the next --- ndb/src/kernel/blocks/dbdict/Dbdict.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index b125f8d988d..699b5cb735b 100644 --- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -401,6 +401,9 @@ void Dbdict::execFSCLOSECONF(Signal* signal) case FsConnectRecord::OPEN_READ_SCHEMA2: openSchemaFile(signal, 1, fsPtr.i, false, false); break; + case FsConnectRecord::OPEN_READ_TAB_FILE2: + openTableFile(signal, 1, fsPtr.i, c_readTableRecord.tableId, false); + break; default: jamLine((fsPtr.p->fsState & 0xFFF)); ndbrequire(false); @@ -780,8 +783,11 @@ void Dbdict::readTableConf(Signal* signal, void Dbdict::readTableRef(Signal* signal, FsConnectRecordPtr fsPtr) { + /** + * First close corrupt file + */ fsPtr.p->fsState = FsConnectRecord::OPEN_READ_TAB_FILE2; - openTableFile(signal, 1, fsPtr.i, c_readTableRecord.tableId, false); + closeFile(signal, fsPtr.p->filePtr, fsPtr.i); return; }//Dbdict::readTableRef() From 0d4bf93e241f920e2c876f7718e6bc5ad7f4dfaf Mon Sep 17 00:00:00 2001 From: "tomas@whalegate.ndb.mysql.com" <> Date: Wed, 30 May 2007 17:25:22 +0200 Subject: [PATCH 13/19] Bug #28443 - correction of merge error --- ndb/src/common/transporter/Packer.cpp | 5 +++ .../common/transporter/TCP_Transporter.hpp | 4 ++ .../transporter/TransporterRegistry.cpp | 41 ++++++++++--------- ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp | 17 ++++++++ ndb/test/ndbapi/testNdbApi.cpp | 34 +++++++++++++++ ndb/test/run-test/daily-basic-tests.txt | 4 ++ 6 files changed, 86 insertions(+), 19 deletions(-) diff --git a/ndb/src/common/transporter/Packer.cpp b/ndb/src/common/transporter/Packer.cpp index 66c00b0af89..d471167b0e7 100644 --- a/ndb/src/common/transporter/Packer.cpp +++ b/ndb/src/common/transporter/Packer.cpp @@ -20,7 +20,12 @@ #include #include +#ifdef ERROR_INSERT +Uint32 MAX_RECEIVED_SIGNALS = 1024; +#else #define MAX_RECEIVED_SIGNALS 1024 +#endif + Uint32 TransporterRegistry::unpack(Uint32 * readPtr, Uint32 sizeOfData, diff --git a/ndb/src/common/transporter/TCP_Transporter.hpp b/ndb/src/common/transporter/TCP_Transporter.hpp index 8cba7a01532..fdb64939d5a 100644 --- a/ndb/src/common/transporter/TCP_Transporter.hpp +++ b/ndb/src/common/transporter/TCP_Transporter.hpp @@ -101,6 +101,10 @@ private: virtual void updateReceiveDataPtr(Uint32 bytesRead); virtual Uint32 get_free_buffer() const; + + inline bool hasReceiveData () const { + return receiveBuffer.sizeOfData > 0; + } protected: /** * Setup client/server and perform connect/accept diff --git a/ndb/src/common/transporter/TransporterRegistry.cpp b/ndb/src/common/transporter/TransporterRegistry.cpp index bd3136f023c..7a05dcb30c2 100644 --- a/ndb/src/common/transporter/TransporterRegistry.cpp +++ b/ndb/src/common/transporter/TransporterRegistry.cpp @@ -841,6 +841,7 @@ TransporterRegistry::poll_OSE(Uint32 timeOutMillis) Uint32 TransporterRegistry::poll_TCP(Uint32 timeOutMillis) { + bool hasdata = false; if (false && nTCPTransporters == 0) { tcpReadSelectReply = 0; @@ -885,6 +886,7 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis) // Put the connected transporters in the socket read-set FD_SET(socket, &tcpReadset); } + hasdata |= t->hasReceiveData(); } // The highest socket value plus one @@ -901,7 +903,7 @@ TransporterRegistry::poll_TCP(Uint32 timeOutMillis) } #endif - return tcpReadSelectReply; + return tcpReadSelectReply || hasdata; } #endif @@ -937,26 +939,27 @@ TransporterRegistry::performReceive() #endif #ifdef NDB_TCP_TRANSPORTER - if(tcpReadSelectReply > 0) + for (int i=0; igetRemoteNodeId(); - const NDB_SOCKET_TYPE socket = t->getSocket(); - if(is_connected(nodeId)){ - if(t->isConnected() && FD_ISSET(socket, &tcpReadset)) + checkJobBuffer(); + TCP_Transporter *t = theTCPTransporters[i]; + const NodeId nodeId = t->getRemoteNodeId(); + const NDB_SOCKET_TYPE socket = t->getSocket(); + if(is_connected(nodeId)){ + if(t->isConnected()) + { + if (FD_ISSET(socket, &tcpReadset)) { - const int receiveSize = t->doReceive(); - if(receiveSize > 0) - { - Uint32 * ptr; - Uint32 sz = t->getReceiveData(&ptr); - transporter_recv_from(callbackObj, nodeId); - Uint32 szUsed = unpack(ptr, sz, nodeId, ioStates[nodeId]); - t->updateReceiveDataPtr(szUsed); - } + t->doReceive(); + } + + if (t->hasReceiveData()) + { + Uint32 * ptr; + Uint32 sz = t->getReceiveData(&ptr); + transporter_recv_from(callbackObj, nodeId); + Uint32 szUsed = unpack(ptr, sz, nodeId, ioStates[nodeId]); + t->updateReceiveDataPtr(szUsed); } } } diff --git a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp index a9d9c991ca3..8c3148862d4 100644 --- a/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp +++ b/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp @@ -136,6 +136,7 @@ Cmvmi::~Cmvmi() #ifdef ERROR_INSERT NodeBitmask c_error_9000_nodes_mask; +extern Uint32 MAX_RECEIVED_SIGNALS; #endif void Cmvmi::execNDB_TAMPER(Signal* signal) @@ -165,6 +166,22 @@ void Cmvmi::execNDB_TAMPER(Signal* signal) kill(getpid(), SIGABRT); } #endif + +#ifdef ERROR_INSERT + if (signal->theData[0] == 9003) + { + if (MAX_RECEIVED_SIGNALS < 1024) + { + MAX_RECEIVED_SIGNALS = 1024; + } + else + { + MAX_RECEIVED_SIGNALS = rand() % 128; + } + ndbout_c("MAX_RECEIVED_SIGNALS: %d", MAX_RECEIVED_SIGNALS); + CLEAR_ERROR_INSERT_VALUE; + } +#endif }//execNDB_TAMPER() void Cmvmi::execSET_LOGLEVELORD(Signal* signal) diff --git a/ndb/test/ndbapi/testNdbApi.cpp b/ndb/test/ndbapi/testNdbApi.cpp index aee668039fe..ad16c472229 100644 --- a/ndb/test/ndbapi/testNdbApi.cpp +++ b/ndb/test/ndbapi/testNdbApi.cpp @@ -1306,6 +1306,36 @@ int runTestExecuteAsynch(NDBT_Context* ctx, NDBT_Step* step){ template class Vector; +int +runBug28443(NDBT_Context* ctx, NDBT_Step* step) +{ + int result = NDBT_OK; + int records = ctx->getNumRecords(); + + NdbRestarter restarter; + + restarter.insertErrorInAllNodes(9003); + + for (Uint32 i = 0; igetNumLoops(); i++) + { + HugoTransactions hugoTrans(*ctx->getTab()); + if (hugoTrans.loadTable(GETNDB(step), records, 2048) != 0) + { + result = NDBT_FAILED; + goto done; + } + if (runClearTable(ctx, step) != 0) + { + result = NDBT_FAILED; + goto done; + } + } + +done: + restarter.insertErrorInAllNodes(9003); + + return result; +} NDBT_TESTSUITE(testNdbApi); TESTCASE("MaxNdb", @@ -1392,6 +1422,10 @@ TESTCASE("Scan_4006", INITIALIZER(runScan_4006); FINALIZER(runClearTable); } +TESTCASE("Bug28443", + ""){ + INITIALIZER(runBug28443); +} TESTCASE("ExecuteAsynch", "Check that executeAsync() works (BUG#27495)\n"){ INITIALIZER(runTestExecuteAsynch); diff --git a/ndb/test/run-test/daily-basic-tests.txt b/ndb/test/run-test/daily-basic-tests.txt index 5a3947ec1e9..f4a685299d6 100644 --- a/ndb/test/run-test/daily-basic-tests.txt +++ b/ndb/test/run-test/daily-basic-tests.txt @@ -617,6 +617,10 @@ max-time: 500 cmd: testNdbApi args: -n ExecuteAsynch T1 +max-time: 1000 +cmd: testNdbApi +args: -n BugBug28443 + #max-time: 500 #cmd: testInterpreter #args: T1 From b217a9e898582050ee50300fc8eacb8d5bca12e4 Mon Sep 17 00:00:00 2001 From: "kent@mysql.com/kent-amd64.(none)" <> Date: Wed, 30 May 2007 22:11:53 +0200 Subject: [PATCH 14/19] Makefile.am, configure.in: Added --with-mysqld-libs configure flag --- configure.in | 6 ++++++ sql/Makefile.am | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index b9f84086e28..1b3fb9f867d 100644 --- a/configure.in +++ b/configure.in @@ -1747,6 +1747,12 @@ AC_ARG_WITH(client-ldflags, [CLIENT_EXTRA_LDFLAGS=]) AC_SUBST(CLIENT_EXTRA_LDFLAGS) +AC_ARG_WITH(mysqld-libs, + [ --with-mysqld-libs Extra libraries to link with for mysqld], + [MYSQLD_EXTRA_LIBS=$withval], + [MYSQLD_EXTRA_LIBS=]) +AC_SUBST(MYSQLD_EXTRA_LIBS) + AC_ARG_WITH(lib-ccflags, [ --with-lib-ccflags Extra CC options for libraries], [LIB_EXTRA_CCFLAGS=$withval], diff --git a/sql/Makefile.am b/sql/Makefile.am index cf7bc0a1452..69dbef4364d 100644 --- a/sql/Makefile.am +++ b/sql/Makefile.am @@ -43,7 +43,8 @@ mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \ @bdb_libs@ @innodb_libs@ @pstack_libs@ \ @innodb_system_libs@ \ @ndbcluster_libs@ @ndbcluster_system_libs@ \ - $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ @openssl_libs@ + $(LDADD) $(CXXLDFLAGS) $(WRAPLIBS) @LIBDL@ @openssl_libs@ \ + @MYSQLD_EXTRA_LIBS@ noinst_HEADERS = item.h item_func.h item_sum.h item_cmpfunc.h \ item_strfunc.h item_timefunc.h item_uniq.h \ item_create.h item_subselect.h item_row.h \ From 779a055ed0f0907958ef232f6a0b78f5f29cc48a Mon Sep 17 00:00:00 2001 From: "df@pippilotta.erinye.com" <> Date: Thu, 31 May 2007 09:34:24 +0200 Subject: [PATCH 15/19] some test cases cannot run with --skip-log-bin --- mysql-test/r/mix_innodb_myisam_binlog.result | 30 +++++++++---------- mysql-test/t/binlog.test | 1 + mysql-test/t/blackhole.test | 1 + mysql-test/t/ctype_cp932_binlog.test | 1 + mysql-test/t/ctype_cp932_notembedded.test | 1 + mysql-test/t/ctype_ucs_binlog.test | 1 + mysql-test/t/drop_temp_table.test | 1 + .../t/flush_block_commit_notembedded.test | 2 ++ mysql-test/t/insert_select-binlog.test | 1 + mysql-test/t/mix_innodb_myisam_binlog.test | 2 +- mysql-test/t/mysqlbinlog-cp932.test | 3 +- mysql-test/t/mysqlbinlog.test | 2 ++ mysql-test/t/mysqlbinlog2.test | 2 ++ mysql-test/t/mysqltest.test | 2 ++ mysql-test/t/sp_trans.test | 1 + mysql-test/t/user_var-binlog.test | 1 + 16 files changed, 35 insertions(+), 17 deletions(-) diff --git a/mysql-test/r/mix_innodb_myisam_binlog.result b/mysql-test/r/mix_innodb_myisam_binlog.result index a8b132ae927..2c0712f80b1 100644 --- a/mysql-test/r/mix_innodb_myisam_binlog.result +++ b/mysql-test/r/mix_innodb_myisam_binlog.result @@ -11,7 +11,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 166 Query 1 # use `test`; insert into t1 values(1) master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 347 Xid 1 # COMMIT /* xid=8 */ +master-bin.000001 347 Xid 1 # COMMIT /* xid=9 */ delete from t1; delete from t2; reset master; @@ -47,7 +47,7 @@ master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4) master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint -master-bin.000001 616 Xid 1 # COMMIT /* xid=25 */ +master-bin.000001 616 Xid 1 # COMMIT /* xid=26 */ delete from t1; delete from t2; reset master; @@ -74,7 +74,7 @@ master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6) master-bin.000001 425 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 519 Query 1 # use `test`; rollback to savepoint my_savepoint master-bin.000001 616 Query 1 # use `test`; insert into t1 values(7) -master-bin.000001 703 Xid 1 # COMMIT /* xid=37 */ +master-bin.000001 703 Xid 1 # COMMIT /* xid=38 */ delete from t1; delete from t2; reset master; @@ -101,7 +101,7 @@ insert into t2 select * from t1; show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; insert into t1 values(9) -master-bin.000001 185 Xid 1 # COMMIT /* xid=60 */ +master-bin.000001 185 Xid 1 # COMMIT /* xid=61 */ master-bin.000001 212 Query 1 # use `test`; insert into t2 select * from t1 delete from t1; delete from t2; @@ -112,18 +112,18 @@ insert into t2 select * from t1; show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 186 Xid 1 # COMMIT /* xid=66 */ +master-bin.000001 186 Xid 1 # COMMIT /* xid=67 */ master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1 insert into t1 values(11); commit; show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; insert into t1 values(10) -master-bin.000001 186 Xid 1 # COMMIT /* xid=66 */ +master-bin.000001 186 Xid 1 # COMMIT /* xid=67 */ master-bin.000001 213 Query 1 # use `test`; insert into t2 select * from t1 master-bin.000001 307 Query 1 # use `test`; BEGIN master-bin.000001 375 Query 1 # use `test`; insert into t1 values(11) -master-bin.000001 463 Xid 1 # COMMIT /* xid=68 */ +master-bin.000001 463 Xid 1 # COMMIT /* xid=69 */ alter table t2 engine=INNODB; delete from t1; delete from t2; @@ -137,7 +137,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 166 Query 1 # use `test`; insert into t1 values(12) master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1 -master-bin.000001 348 Xid 1 # COMMIT /* xid=78 */ +master-bin.000001 348 Xid 1 # COMMIT /* xid=79 */ delete from t1; delete from t2; reset master; @@ -161,7 +161,7 @@ show binlog events from 98; Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 166 Query 1 # use `test`; insert into t1 values(14) -master-bin.000001 254 Xid 1 # COMMIT /* xid=94 */ +master-bin.000001 254 Xid 1 # COMMIT /* xid=95 */ delete from t1; delete from t2; reset master; @@ -182,7 +182,7 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16) master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18) -master-bin.000001 342 Xid 1 # COMMIT /* xid=105 */ +master-bin.000001 342 Xid 1 # COMMIT /* xid=106 */ delete from t1; delete from t2; alter table t2 type=MyISAM; @@ -234,19 +234,19 @@ Log_name Pos Event_type Server_id End_log_pos Info master-bin.000001 98 Query 1 # use `test`; BEGIN master-bin.000001 166 Query 1 # use `test`; insert into t1 values(16) master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18) -master-bin.000001 342 Xid 1 # COMMIT /* xid=105 */ +master-bin.000001 342 Xid 1 # COMMIT /* xid=106 */ master-bin.000001 369 Query 1 # use `test`; delete from t1 -master-bin.000001 446 Xid 1 # COMMIT /* xid=114 */ +master-bin.000001 446 Xid 1 # COMMIT /* xid=115 */ master-bin.000001 473 Query 1 # use `test`; delete from t2 -master-bin.000001 550 Xid 1 # COMMIT /* xid=115 */ +master-bin.000001 550 Xid 1 # COMMIT /* xid=116 */ master-bin.000001 577 Query 1 # use `test`; alter table t2 type=MyISAM master-bin.000001 666 Query 1 # use `test`; insert into t1 values (1) -master-bin.000001 754 Xid 1 # COMMIT /* xid=117 */ +master-bin.000001 754 Xid 1 # COMMIT /* xid=118 */ master-bin.000001 781 Query 1 # use `test`; insert into t2 values (20) master-bin.000001 870 Query 1 # use `test`; drop table t1,t2 master-bin.000001 949 Query 1 # use `test`; create temporary table ti (a int) engine=innodb master-bin.000001 1059 Query 1 # use `test`; insert into ti values(1) -master-bin.000001 1146 Xid 1 # COMMIT /* xid=132 */ +master-bin.000001 1146 Xid 1 # COMMIT /* xid=133 */ master-bin.000001 1173 Query 1 # use `test`; create temporary table t1 (a int) engine=myisam master-bin.000001 1283 Query 1 # use `test`; insert t1 values (1) master-bin.000001 1366 Query 1 # use `test`; create table t0 (n int) diff --git a/mysql-test/t/binlog.test b/mysql-test/t/binlog.test index 1063940d378..1b4d43d9727 100644 --- a/mysql-test/t/binlog.test +++ b/mysql-test/t/binlog.test @@ -1,6 +1,7 @@ # # misc binlogging tests that do not require a slave running # +-- source include/have_log_bin.inc -- source include/not_embedded.inc -- source include/have_bdb.inc -- source include/have_innodb.inc diff --git a/mysql-test/t/blackhole.test b/mysql-test/t/blackhole.test index 4bafad2d777..af319d37dd0 100644 --- a/mysql-test/t/blackhole.test +++ b/mysql-test/t/blackhole.test @@ -4,6 +4,7 @@ # -- source include/not_embedded.inc -- source include/have_blackhole.inc +-- source include/have_log_bin.inc --disable_warnings drop table if exists t1,t2; diff --git a/mysql-test/t/ctype_cp932_binlog.test b/mysql-test/t/ctype_cp932_binlog.test index ee0e588fdae..1690dd13b5c 100644 --- a/mysql-test/t/ctype_cp932_binlog.test +++ b/mysql-test/t/ctype_cp932_binlog.test @@ -1,5 +1,6 @@ -- source include/not_embedded.inc -- source include/have_cp932.inc +-- source include/have_log_bin.inc --character_set cp932 --disable_warnings diff --git a/mysql-test/t/ctype_cp932_notembedded.test b/mysql-test/t/ctype_cp932_notembedded.test index 52e7acc3f01..7ae6275816e 100644 --- a/mysql-test/t/ctype_cp932_notembedded.test +++ b/mysql-test/t/ctype_cp932_notembedded.test @@ -1,5 +1,6 @@ -- source include/not_embedded.inc -- source include/have_cp932.inc +-- source include/have_log_bin.inc --character_set cp932 --disable_warnings diff --git a/mysql-test/t/ctype_ucs_binlog.test b/mysql-test/t/ctype_ucs_binlog.test index 2467d34386c..92d4458a9c2 100644 --- a/mysql-test/t/ctype_ucs_binlog.test +++ b/mysql-test/t/ctype_ucs_binlog.test @@ -1,5 +1,6 @@ --source include/not_embedded.inc --source include/have_ucs2.inc +--source include/have_log_bin.inc # # Check correct binlogging of UCS2 user variables (BUG#3875) diff --git a/mysql-test/t/drop_temp_table.test b/mysql-test/t/drop_temp_table.test index bc06de4096c..7c83a2919b7 100644 --- a/mysql-test/t/drop_temp_table.test +++ b/mysql-test/t/drop_temp_table.test @@ -1,5 +1,6 @@ # Embedded server doesn't support binlog -- source include/not_embedded.inc +-- source include/have_log_bin.inc --disable_warnings drop database if exists `drop-temp+table-test`; diff --git a/mysql-test/t/flush_block_commit_notembedded.test b/mysql-test/t/flush_block_commit_notembedded.test index 4650a5a15a8..25eb093226e 100644 --- a/mysql-test/t/flush_block_commit_notembedded.test +++ b/mysql-test/t/flush_block_commit_notembedded.test @@ -3,6 +3,8 @@ # We verify that we did not introduce a deadlock. # This is intended to mimick how mysqldump and innobackup work. +-- source include/have_log_bin.inc + # And it requires InnoDB -- source include/not_embedded.inc -- source include/have_innodb.inc diff --git a/mysql-test/t/insert_select-binlog.test b/mysql-test/t/insert_select-binlog.test index d4041f86ab5..4bff09577a7 100644 --- a/mysql-test/t/insert_select-binlog.test +++ b/mysql-test/t/insert_select-binlog.test @@ -1,5 +1,6 @@ # Embedded server doesn't support binlog -- source include/not_embedded.inc +-- source include/have_log_bin.inc # Check if a partly-completed INSERT SELECT in a MyISAM table goes into the # binlog diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test index 8bced9f069c..bb7a2946592 100644 --- a/mysql-test/t/mix_innodb_myisam_binlog.test +++ b/mysql-test/t/mix_innodb_myisam_binlog.test @@ -4,7 +4,7 @@ # slave is always with --skip-innodb in the testsuite. I (Guilhem) however # did some tests manually on a slave; tables are replicated fine and # Exec_Master_Log_Pos advances as expected. - +-- source include/have_log_bin.inc # Embedded server doesn't support binlogging -- source include/not_embedded.inc diff --git a/mysql-test/t/mysqlbinlog-cp932.test b/mysql-test/t/mysqlbinlog-cp932.test index 1487606a6c2..1c9f91fd9a8 100644 --- a/mysql-test/t/mysqlbinlog-cp932.test +++ b/mysql-test/t/mysqlbinlog-cp932.test @@ -1,6 +1,7 @@ # disabled in embedded until tools running is fixed with embedded ---source include/not_embedded.inc +-- source include/not_embedded.inc -- source include/have_cp932.inc +-- source include/have_log_bin.inc # Bug#16217 (mysql client did not know how not switch its internal charset) flush logs; diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index a7b3f413f23..cb1dad2bc85 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -1,5 +1,7 @@ # We are using .opt file since we need small binlog size +-- source include/have_log_bin.inc + # Embedded server doesn't support binlogging -- source include/not_embedded.inc diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test index 14b213cd9cc..6f9045b429b 100644 --- a/mysql-test/t/mysqlbinlog2.test +++ b/mysql-test/t/mysqlbinlog2.test @@ -1,6 +1,8 @@ # Test for the new options --start-datetime, stop-datetime, # and a few others. +-- source include/have_log_bin.inc + # Embedded server doesn't support binlogging -- source include/not_embedded.inc diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 328206626df..ebbc80890ab 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1,3 +1,5 @@ +-- source include/have_log_bin.inc + # This test should work in embedded server after mysqltest is fixed -- source include/not_embedded.inc diff --git a/mysql-test/t/sp_trans.test b/mysql-test/t/sp_trans.test index d9b34c303ae..dc6adcaf6fd 100644 --- a/mysql-test/t/sp_trans.test +++ b/mysql-test/t/sp_trans.test @@ -2,6 +2,7 @@ # tests that require InnoDB... # +-- source include/have_log_bin.inc -- source include/have_innodb.inc --disable_warnings diff --git a/mysql-test/t/user_var-binlog.test b/mysql-test/t/user_var-binlog.test index 12a5e616fa2..2b7f880d7fa 100644 --- a/mysql-test/t/user_var-binlog.test +++ b/mysql-test/t/user_var-binlog.test @@ -1,5 +1,6 @@ # Embedded server does not support binlogging --source include/not_embedded.inc +--source include/have_log_bin.inc # Check that user variables are binlogged correctly (BUG#3875) create table t1 (a varchar(50)); From fc1e03883210d3b926d27e9d7e4de08f27337fac Mon Sep 17 00:00:00 2001 From: "df@pippilotta.erinye.com" <> Date: Thu, 31 May 2007 12:21:55 +0200 Subject: [PATCH 16/19] fix test case broken for ps-protocol by previous push --- mysql-test/t/mix_innodb_myisam_binlog.test | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mysql-test/t/mix_innodb_myisam_binlog.test b/mysql-test/t/mix_innodb_myisam_binlog.test index bb7a2946592..53de4d11b81 100644 --- a/mysql-test/t/mix_innodb_myisam_binlog.test +++ b/mysql-test/t/mix_innodb_myisam_binlog.test @@ -29,7 +29,7 @@ insert into t2 select * from t1; commit; --replace_column 5 # ---replace_result "xid=14" "xid=8" +--replace_result "xid=15" "xid=9" show binlog events from 98; delete from t1; @@ -58,7 +58,7 @@ rollback to savepoint my_savepoint; commit; --replace_column 5 # ---replace_result "xid=47" "xid=25" +--replace_result "xid=48" "xid=26" show binlog events from 98; delete from t1; @@ -76,7 +76,7 @@ commit; select a from t1 order by a; # check that savepoints work :) --replace_column 5 # ---replace_result "xid=69" "xid=37" +--replace_result "xid=70" "xid=38" show binlog events from 98; # and when ROLLBACK is not explicit? @@ -109,7 +109,7 @@ insert into t1 values(9); insert into t2 select * from t1; --replace_column 5 # ---replace_result "xid=117" "xid=60" +--replace_result "xid=118" "xid=61" show binlog events from 98; # Check that when the query updat1ng the MyISAM table is the first in the @@ -122,13 +122,13 @@ insert into t1 values(10); # first make t1 non-empty begin; insert into t2 select * from t1; --replace_column 5 # ---replace_result "xid=131" "xid=66" +--replace_result "xid=132" "xid=67" show binlog events from 98; insert into t1 values(11); commit; --replace_column 5 # ---replace_result "xid=131" "xid=66" "xid=134" "xid=68" +--replace_result "xid=132" "xid=67" "xid=135" "xid=69" show binlog events from 98; @@ -147,7 +147,7 @@ insert into t2 select * from t1; commit; --replace_column 5 # ---replace_result "xid=153" "xid=78" +--replace_result "xid=154" "xid=79" show binlog events from 98; delete from t1; @@ -175,7 +175,7 @@ rollback to savepoint my_savepoint; commit; --replace_column 5 # ---replace_result "xid=185" "xid=94" +--replace_result "xid=186" "xid=95" show binlog events from 98; delete from t1; @@ -193,7 +193,7 @@ commit; select a from t1 order by a; # check that savepoints work :) --replace_column 5 # ---replace_result "xid=206" "xid=105" +--replace_result "xid=207" "xid=106" show binlog events from 98; # Test for BUG#5714, where a MyISAM update in the transaction used to @@ -254,7 +254,7 @@ disconnect con2; connection con3; select get_lock("lock1",60); --replace_column 5 # ---replace_result "xid=206" "xid=105" "xid=224" "xid=114" "xid=227" "xid=115" "xid=231" "xid=117" "xid=258" "xid=132" +--replace_result "xid=207" "xid=106" "xid=225" "xid=115" "xid=228" "xid=116" "xid=232" "xid=118" "xid=259" "xid=133" show binlog events from 98; do release_lock("lock1"); drop table t0,t2; From 9a151eb3c573c19bc39fe2a73f18ec06f15a89bc Mon Sep 17 00:00:00 2001 From: "georg@bing.mysql.com" <> Date: Thu, 31 May 2007 13:53:44 +0200 Subject: [PATCH 17/19] fixed not matching if/endif (cmake) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 890ee2676e8..54df0befad9 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,7 +158,7 @@ IF(EMBED_MANIFESTS) STRING(REGEX MATCH "MANIFEST:NO" tmp_manifest ${CMAKE_EXE_LINKER_FLAGS}) IF(NOT tmp_manifest) SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO") - ENDIF(tmp_manifest) + ENDIF(NOT tmp_manifest) # Set the processor architecture. IF(CMAKE_GENERATOR MATCHES "Visual Studio 8 2005 Win64") SET(PROCESSOR_ARCH "X64") From 6e7585a01143379178dd2b5eb3f91241dcf4c3eb Mon Sep 17 00:00:00 2001 From: "df@pippilotta.erinye.com" <> Date: Thu, 31 May 2007 14:05:07 +0200 Subject: [PATCH 18/19] fix test case --- mysql-test/r/binlog.result | 4 ++-- mysql-test/t/binlog.test | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mysql-test/r/binlog.result b/mysql-test/r/binlog.result index 25930c31735..4ed6c50c7f6 100644 --- a/mysql-test/r/binlog.result +++ b/mysql-test/r/binlog.result @@ -17,7 +17,7 @@ master-bin.000001 # Query 1 # use `test`; insert t1 values (5) master-bin.000001 # Query 1 # use `test`; COMMIT master-bin.000001 # Query 1 # use `test`; BEGIN master-bin.000001 # Query 1 # use `test`; insert t2 values (5) -master-bin.000001 # Xid 1 # COMMIT /* xid=12 */ +master-bin.000001 # Xid 1 # COMMIT /* xid=13 */ drop table t1,t2; reset master; create table t1 (n int) engine=innodb; @@ -128,7 +128,7 @@ master-bin.000001 # Query 1 # use `test`; insert into t1 values(4 + 4) master-bin.000001 # Query 1 # use `test`; insert into t1 values(3 + 4) master-bin.000001 # Query 1 # use `test`; insert into t1 values(2 + 4) master-bin.000001 # Query 1 # use `test`; insert into t1 values(1 + 4) -master-bin.000001 # Xid 1 # COMMIT /* xid=19 */ +master-bin.000001 # Xid 1 # COMMIT /* xid=20 */ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4 show binlog events in 'master-bin.000002' from 98; Log_name Pos Event_type Server_id End_log_pos Info diff --git a/mysql-test/t/binlog.test b/mysql-test/t/binlog.test index 1b4d43d9727..3bc6c6953ed 100644 --- a/mysql-test/t/binlog.test +++ b/mysql-test/t/binlog.test @@ -20,7 +20,7 @@ begin; insert t2 values (5); commit; # first COMMIT must be Query_log_event, second - Xid_log_event ---replace_result "xid=21" "xid=12" +--replace_result "xid=22" "xid=13" --replace_column 2 # 5 # show binlog events from 98; drop table t1,t2; @@ -42,7 +42,7 @@ while ($1) --enable_query_log commit; drop table t1; ---replace_result "xid=32" "xid=19" +--replace_result "xid=33" "xid=20" --replace_column 2 # 5 # show binlog events in 'master-bin.000001' from 98; --replace_column 2 # 5 # From 0067a9cc027d49a69393fc1649e578c8330a2fd0 Mon Sep 17 00:00:00 2001 From: "joerg/mysqldev@mysql.com/production.mysql.com" <> Date: Wed, 6 Jun 2007 15:22:06 +0200 Subject: [PATCH 19/19] Raise version number after cloning 4.1.23 --- configure.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index b9f84086e28..5d60de7fe34 100644 --- a/configure.in +++ b/configure.in @@ -5,7 +5,7 @@ AC_INIT(sql/mysqld.cc) AC_CANONICAL_SYSTEM # The Docs Makefile.am parses this line! # remember to also change ndb version below and update version.c in ndb -AM_INIT_AUTOMAKE(mysql, 4.1.23) +AM_INIT_AUTOMAKE(mysql, 4.1.24) AM_CONFIG_HEADER(config.h) PROTOCOL_VERSION=10 @@ -21,7 +21,7 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0 # ndb version NDB_VERSION_MAJOR=4 NDB_VERSION_MINOR=1 -NDB_VERSION_BUILD=23 +NDB_VERSION_BUILD=24 NDB_VERSION_STATUS="" # Set all version vars based on $VERSION. How do we do this more elegant ?