summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2004-10-22 18:21:52 +0200
committerunknown <kent@mysql.com>2004-10-22 18:21:52 +0200
commit50d7d96283e70c3453a210ab7a90becdda695381 (patch)
tree1270f03e58231c79ab2ed06069493a9a99b2f5c1
parent573bb22b8bedf80544a711567e1afb8ad17a9b0d (diff)
parentce0b8577bf2fbdf2294b0d92363b7e8b49755736 (diff)
downloadmariadb-git-50d7d96283e70c3453a210ab7a90becdda695381.tar.gz
Merge mysql.com:/home/bk/mysql-4.1
into mysql.com:/users/kboortz/daily/work/mysql-4.1-sjis
-rw-r--r--configure.in1
-rw-r--r--ndb/include/kernel/LogLevel.hpp1
-rw-r--r--ndb/include/kernel/signaldata/UpgradeStartup.hpp2
-rw-r--r--ndb/include/mgmapi/mgmapi.h5
-rw-r--r--ndb/include/ndb_global.h3
-rw-r--r--ndb/include/ndb_types.h2
-rw-r--r--ndb/include/ndbapi/Ndb.hpp1
-rw-r--r--ndb/include/ndbapi/NdbReceiver.hpp2
-rw-r--r--ndb/include/ndbapi/NdbScanOperation.hpp1
-rw-r--r--ndb/src/common/debugger/EventLogger.cpp5
-rw-r--r--ndb/src/common/util/ConfigValues.cpp7
-rw-r--r--ndb/src/kernel/blocks/backup/restore/Restore.hpp2
-rw-r--r--ndb/src/kernel/blocks/dbacc/DbaccMain.cpp10
-rw-r--r--ndb/src/kernel/blocks/dbdih/DbdihMain.cpp5
-rw-r--r--ndb/src/kernel/blocks/dbtup/Dbtup.hpp16
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp2
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp5
-rw-r--r--ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp3
-rw-r--r--ndb/src/mgmsrv/SignalQueue.cpp3
-rw-r--r--ndb/src/ndbapi/NdbConnection.cpp4
-rw-r--r--ndb/src/ndbapi/NdbScanOperation.cpp2
-rw-r--r--ndb/tools/waiter.cpp2
22 files changed, 53 insertions, 31 deletions
diff --git a/configure.in b/configure.in
index 09999285275..810f6c31c49 100644
--- a/configure.in
+++ b/configure.in
@@ -1144,6 +1144,7 @@ dnl Is this the right match for DEC OSF on alpha?
# gethostbyname_r is deprecated and doesn't work ok on OSF1
CFLAGS="$CFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R"
CXXFLAGS="$CXXFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R"
+ ndb_cxxflags_fix="$ndb_cxxflags_fix -I/usr/include.dtk"
;;
*netware*)
# No need for curses library so set it to null
diff --git a/ndb/include/kernel/LogLevel.hpp b/ndb/include/kernel/LogLevel.hpp
index be0627c98a8..6cfbe44af86 100644
--- a/ndb/include/kernel/LogLevel.hpp
+++ b/ndb/include/kernel/LogLevel.hpp
@@ -47,6 +47,7 @@ public:
LogLevel & operator= (const LogLevel &);
enum EventCategory {
+ llInvalid = -1,
llStartUp = CFG_LOGLEVEL_STARTUP - CFG_MIN_LOGLEVEL,
llShutdown = CFG_LOGLEVEL_SHUTDOWN - CFG_MIN_LOGLEVEL,
llStatistic = CFG_LOGLEVEL_STATISTICS - CFG_MIN_LOGLEVEL,
diff --git a/ndb/include/kernel/signaldata/UpgradeStartup.hpp b/ndb/include/kernel/signaldata/UpgradeStartup.hpp
index badc7ca0e4d..a4450221c59 100644
--- a/ndb/include/kernel/signaldata/UpgradeStartup.hpp
+++ b/ndb/include/kernel/signaldata/UpgradeStartup.hpp
@@ -1,6 +1,8 @@
#ifndef NDB_UPGRADE_STARTUP
#define NDB_UPGRADE_STARTUP
+class Ndbcntr;
+
struct UpgradeStartup {
static void installEXEC(SimulatedBlock*);
diff --git a/ndb/include/mgmapi/mgmapi.h b/ndb/include/mgmapi/mgmapi.h
index 41fd211063e..6dcf58b44e2 100644
--- a/ndb/include/mgmapi/mgmapi.h
+++ b/ndb/include/mgmapi/mgmapi.h
@@ -271,7 +271,10 @@ extern "C" {
* Log categories
*/
enum ndb_mgm_event_category {
- NDB_MGM_ILLEGAL_EVENT_CATEGORY = -1, /*< Invalid
+ /**
+ * Invalid
+ */
+ NDB_MGM_ILLEGAL_EVENT_CATEGORY = -1,
/**
* Events during all kinds of startups
*/
diff --git a/ndb/include/ndb_global.h b/ndb/include/ndb_global.h
index 3ce37a2edee..c128323241a 100644
--- a/ndb/include/ndb_global.h
+++ b/ndb/include/ndb_global.h
@@ -13,6 +13,9 @@
#undef NDB_WIN32
#endif
+#ifdef _AIX
+#undef _H_STRINGS
+#endif
#include <m_string.h>
#include <m_ctype.h>
#include <ndb_types.h>
diff --git a/ndb/include/ndb_types.h b/ndb/include/ndb_types.h
index 87ebd3d6c6b..a2988dbae78 100644
--- a/ndb/include/ndb_types.h
+++ b/ndb/include/ndb_types.h
@@ -33,7 +33,7 @@ typedef unsigned int UintR;
#ifdef __SIZE_TYPE__
typedef __SIZE_TYPE__ UintPtr;
#else
-#include <my_global.h>
+#include <ndb_global.h>
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
diff --git a/ndb/include/ndbapi/Ndb.hpp b/ndb/include/ndbapi/Ndb.hpp
index 134a48e1d6d..5ec09269695 100644
--- a/ndb/include/ndbapi/Ndb.hpp
+++ b/ndb/include/ndbapi/Ndb.hpp
@@ -881,6 +881,7 @@ class Table;
class BaseString;
class NdbEventOperation;
class NdbBlob;
+class NdbReceiver;
typedef void (* NdbEventCallback)(NdbEventOperation*, Ndb*, void*);
diff --git a/ndb/include/ndbapi/NdbReceiver.hpp b/ndb/include/ndbapi/NdbReceiver.hpp
index 6f577380728..b95313db274 100644
--- a/ndb/include/ndbapi/NdbReceiver.hpp
+++ b/ndb/include/ndbapi/NdbReceiver.hpp
@@ -22,6 +22,8 @@
#include <ndb_global.h>
class Ndb;
+class NdbConnection;
+
class NdbReceiver
{
friend class Ndb;
diff --git a/ndb/include/ndbapi/NdbScanOperation.hpp b/ndb/include/ndbapi/NdbScanOperation.hpp
index a1c66b380a7..2e4d173ac75 100644
--- a/ndb/include/ndbapi/NdbScanOperation.hpp
+++ b/ndb/include/ndbapi/NdbScanOperation.hpp
@@ -32,6 +32,7 @@
#include <NdbOperation.hpp>
class NdbBlob;
+class NdbResultSet;
/**
* @class NdbScanOperation
diff --git a/ndb/src/common/debugger/EventLogger.cpp b/ndb/src/common/debugger/EventLogger.cpp
index cd995631a04..8a09be9a0a7 100644
--- a/ndb/src/common/debugger/EventLogger.cpp
+++ b/ndb/src/common/debugger/EventLogger.cpp
@@ -1343,7 +1343,7 @@ EventLogger::log(int eventType, const Uint32* theData, NodeId nodeId,
{
Uint32 threshold = 0;
Logger::LoggerLevel severity = Logger::LL_WARNING;
- LogLevel::EventCategory cat;
+ LogLevel::EventCategory cat= LogLevel::llInvalid;
for(unsigned i = 0; i<EventLoggerBase::matrixSize; i++){
if(EventLoggerBase::matrix[i].eventType == eventType){
@@ -1353,6 +1353,9 @@ EventLogger::log(int eventType, const Uint32* theData, NodeId nodeId,
break;
}
}
+
+ if (cat == LogLevel::llInvalid)
+ return;
Uint32 set = ll?ll->getLogLevel(cat) : m_logLevel.getLogLevel(cat);
if (threshold <= set){
diff --git a/ndb/src/common/util/ConfigValues.cpp b/ndb/src/common/util/ConfigValues.cpp
index 8a14882550c..5c4b17c73ca 100644
--- a/ndb/src/common/util/ConfigValues.cpp
+++ b/ndb/src/common/util/ConfigValues.cpp
@@ -1,9 +1,6 @@
+
+#include <ndb_global.h>
#include <ConfigValues.hpp>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <new>
#include <NdbOut.hpp>
#include <NdbTCP.h>
diff --git a/ndb/src/kernel/blocks/backup/restore/Restore.hpp b/ndb/src/kernel/blocks/backup/restore/Restore.hpp
index 8ca68fd9b23..0ec1ab852e9 100644
--- a/ndb/src/kernel/blocks/backup/restore/Restore.hpp
+++ b/ndb/src/kernel/blocks/backup/restore/Restore.hpp
@@ -91,7 +91,7 @@ class TupleS {
private:
friend class RestoreDataIterator;
- TableS *m_currentTable;
+ class TableS *m_currentTable;
AttributeData *allAttrData;
bool prepareRecord(TableS &);
diff --git a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
index 0150ef2fc2f..9a1bbd86562 100644
--- a/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+++ b/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
@@ -2369,7 +2369,7 @@ void Dbacc::execACC_COMMITREQ(Signal* signal)
ptrCheckGuard(rootfragrecptr, crootfragmentsize, rootfragmentrec);
rootfragrecptr.p->noOfElements++;
fragrecptr.p->slack -= operationRecPtr.p->insertDeleteLen;
- if (fragrecptr.p->slack >= (Uint32)(1 << 31)) {
+ if (fragrecptr.p->slack >= (1u << 31)) {
/* IT MEANS THAT IF SLACK < ZERO */
if (fragrecptr.p->expandFlag == 0) {
jam();
@@ -2479,7 +2479,7 @@ void Dbacc::execACC_LOCKREQ(Signal* signal)
Uint32 opCode = ZSCAN_OP;
signal->theData[0] = operationRecPtr.i;
signal->theData[1] = fragrecptr.i;
- signal->theData[2] = opCode | (lockMode << 4) | (1 << 31);
+ signal->theData[2] = opCode | (lockMode << 4) | (1u << 31);
signal->theData[3] = req->hashValue;
signal->theData[4] = 1; // fake primKeyLen
signal->theData[5] = req->transId1;
@@ -6510,7 +6510,7 @@ void Dbacc::endofexpLab(Signal* signal)
Uint32 noOfBuckets = (fragrecptr.p->maxp + 1) + fragrecptr.p->p;
Uint32 Thysteres = fragrecptr.p->maxloadfactor - fragrecptr.p->minloadfactor;
fragrecptr.p->slackCheck = noOfBuckets * Thysteres;
- if (fragrecptr.p->slack > (Uint32)(1 << 31)) {
+ if (fragrecptr.p->slack > (1u << 31)) {
jam();
/* IT MEANS THAT IF SLACK < ZERO */
/* --------------------------------------------------------------------------------- */
@@ -6974,7 +6974,7 @@ void Dbacc::execSHRINKCHECK2(Signal* signal)
/*--------------------------------------------------------------*/
return;
}//if
- if (fragrecptr.p->slack > (Uint32)(1 << 31)) {
+ if (fragrecptr.p->slack > (1u << 31)) {
jam();
/*--------------------------------------------------------------*/
/* THE SLACK IS NEGATIVE, IN THIS CASE WE WILL NOT NEED ANY */
@@ -7213,7 +7213,7 @@ void Dbacc::endofshrinkbucketLab(Signal* signal)
expDirRangePtr.p->dirArray[fragrecptr.p->expSenderDirIndex >> 8] = RNIL;
}//if
}//if
- if (fragrecptr.p->slack < (Uint32)(1 << 31)) {
+ if (fragrecptr.p->slack < (1u << 31)) {
jam();
/*--------------------------------------------------------------*/
/* THE SLACK IS POSITIVE, IN THIS CASE WE WILL CHECK WHETHER */
diff --git a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index 6784724c086..76aa745c3e0 100644
--- a/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -4618,6 +4618,7 @@ void Dbdih::execMASTER_GCPREQ(Signal* signal)
/* BUT NOT YET COMPLETED. */
/*--------------------------------------------------*/
ndbrequire(false);
+ gcpState= MasterGCPConf::GCP_READY; // remove warning
break;
default:
/*------------------------------------------------*/
@@ -4627,6 +4628,7 @@ void Dbdih::execMASTER_GCPREQ(Signal* signal)
/* NODE WHICH WAS NOT A MASTER NODE. */
/*------------------------------------------------*/
ndbrequire(false);
+ gcpState= MasterGCPConf::GCP_READY; // remove warning
break;
}//switch
MasterGCPConf * const masterGCPConf = (MasterGCPConf *)&signal->theData[0];
@@ -5535,6 +5537,7 @@ Dbdih::sendMASTER_LCPCONF(Signal * signal){
* it not allowed
*/
ndbrequire(false);
+ lcpState= MasterLCPConf::LCP_STATUS_IDLE; // remove warning
break;
case LCP_COPY_GCI:
case LCP_INIT_TABLES:
@@ -5543,6 +5546,7 @@ Dbdih::sendMASTER_LCPCONF(Signal * signal){
* These two states are handled by if statements above
*/
ndbrequire(false);
+ lcpState= MasterLCPConf::LCP_STATUS_IDLE; // remove warning
break;
}//switch
ndbrequire(ok);
@@ -12738,6 +12742,7 @@ void Dbdih::setNodeRestartInfoBits()
break;
default:
ndbrequire(false);
+ tsnrNodeActiveStatus = Sysfile::NS_NotDefined; // remove warning
break;
}//switch
Sysfile::setNodeStatus(nodePtr.i, SYSFILE->nodeStatus,
diff --git a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
index 0e8dd5fbbe8..55ad1d0910a 100644
--- a/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
+++ b/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
@@ -35,14 +35,6 @@
#define ZMIN_PAGE_LIMIT_TUPKEYREQ 5
#define ZTUP_VERSION_BITS 15
-typedef bool (Dbtup::* ReadFunction)(Uint32*,
- AttributeHeader*,
- Uint32,
- Uint32);
-typedef bool (Dbtup::* UpdateFunction)(Uint32*,
- Uint32,
- Uint32);
-
#ifdef DBTUP_C
//------------------------------------------------------------------
// Jam Handling:
@@ -351,6 +343,14 @@ typedef bool (Dbtup::* UpdateFunction)(Uint32*,
class Dbtup: public SimulatedBlock {
public:
+
+ typedef bool (Dbtup::* ReadFunction)(Uint32*,
+ AttributeHeader*,
+ Uint32,
+ Uint32);
+ typedef bool (Dbtup::* UpdateFunction)(Uint32*,
+ Uint32,
+ Uint32);
// State values
enum State {
NOT_INITIALIZED = 0,
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
index d880d3510c8..49de0d80bcd 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
@@ -1100,7 +1100,7 @@ Dbtup::updateStartLab(Signal* signal,
Tablerec* const regTabPtr,
Page* const pagePtr)
{
- Uint32 retValue;
+ int retValue;
if (regOperPtr->optype == ZINSERT) {
jam();
setNullBits(pagePtr, regTabPtr, regOperPtr->pageOffset);
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp b/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
index be0d86b3f3d..5a8642c4d2e 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
@@ -200,7 +200,8 @@ Dbtup::tuxReadPk(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* data
operPtr.i = RNIL;
operPtr.p = NULL;
// do it
- int ret = readAttributes(pagePtr.p, pageOffset, attrIds, numAttrs, dataOut, ZNIL, true);
+ int ret = readAttributes(pagePtr.p, pageOffset, attrIds,
+ numAttrs, dataOut, ZNIL, true);
// restore globals
tabptr = tabptr_old;
fragptr = fragptr_old;
@@ -220,7 +221,7 @@ Dbtup::tuxReadPk(Uint32 fragPtrI, Uint32 pageId, Uint32 pageOffset, Uint32* data
n += 1;
i += 1 + size;
}
- ndbrequire(i == ret);
+ ndbrequire((int)i == ret);
ret -= numAttrs;
} else {
ret = terrorCode ? (-(int)terrorCode) : -1;
diff --git a/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp b/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
index 0a961903340..aac5c326cad 100644
--- a/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
+++ b/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
@@ -652,6 +652,7 @@ void Dbtup::executeTrigger(Signal* signal,
return;
default:
ndbrequire(false);
+ executeDirect= false; // remove warning
}//switch
regOperPtr->noFiredTriggers++;
@@ -1077,6 +1078,7 @@ Dbtup::executeTuxCommitTriggers(Signal* signal,
ndbrequire(tupVersion == regOperPtr->tupVersion);
} else {
ndbrequire(false);
+ tupVersion= 0; // remove warning
}
// fill in constant part
req->tableId = regOperPtr->tableRef;
@@ -1121,6 +1123,7 @@ Dbtup::executeTuxAbortTriggers(Signal* signal,
return;
} else {
ndbrequire(false);
+ tupVersion= 0; // remove warning
}
// fill in constant part
req->tableId = regOperPtr->tableRef;
diff --git a/ndb/src/mgmsrv/SignalQueue.cpp b/ndb/src/mgmsrv/SignalQueue.cpp
index 7003f5c0a89..08ad5f363a6 100644
--- a/ndb/src/mgmsrv/SignalQueue.cpp
+++ b/ndb/src/mgmsrv/SignalQueue.cpp
@@ -14,8 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-#include <string.h>
-
+#include <ndb_global.h>
#include "SignalQueue.hpp"
SignalQueue::SignalQueue() {
diff --git a/ndb/src/ndbapi/NdbConnection.cpp b/ndb/src/ndbapi/NdbConnection.cpp
index c142efb1596..1457792cf28 100644
--- a/ndb/src/ndbapi/NdbConnection.cpp
+++ b/ndb/src/ndbapi/NdbConnection.cpp
@@ -313,8 +313,8 @@ NdbConnection::execute(ExecType aTypeOfExec,
tPrepOp = tPrepOp->next();
}
// save rest of prepared ops if batch
- NdbOperation* tRestOp;
- NdbOperation* tLastOp;
+ NdbOperation* tRestOp= 0;
+ NdbOperation* tLastOp= 0;
if (tPrepOp != NULL) {
tRestOp = tPrepOp->next();
tPrepOp->next(NULL);
diff --git a/ndb/src/ndbapi/NdbScanOperation.cpp b/ndb/src/ndbapi/NdbScanOperation.cpp
index b23bc8cfe4d..fd63ce96f25 100644
--- a/ndb/src/ndbapi/NdbScanOperation.cpp
+++ b/ndb/src/ndbapi/NdbScanOperation.cpp
@@ -1182,7 +1182,7 @@ NdbIndexScanOperation::insertBOUNDS(Uint32 * data, Uint32 sz){
len = (KeyInfo::DataLength - remaining) + len;
break;
}
- } while(sz >= 0);
+ } while(true);
theTotalNrOfKeyWordInSignal = len;
return 0;
diff --git a/ndb/tools/waiter.cpp b/ndb/tools/waiter.cpp
index c27b46c9356..6dcea6ccc48 100644
--- a/ndb/tools/waiter.cpp
+++ b/ndb/tools/waiter.cpp
@@ -15,8 +15,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <ndb_global.h>
#include <mgmapi.h>
-#include <string.h>
#include <NdbMain.h>
#include <NdbOut.hpp>
#include <NdbSleep.h>