2719 Tomas Ulin 2008-11-06
fix race in test
modified:
mysql-test/suite/ndb/t/ndb_dbug_lock.test
2718 Magnus Svensson 2008-11-06 [merge]
Merge
modified:
BUILD/SETUP.sh
storage/ndb/include/debugger/SignalLoggerManager.hpp
storage/ndb/include/logger/Logger.hpp
storage/ndb/include/ndbapi/Ndb.hpp
storage/ndb/include/util/BaseString.hpp
storage/ndb/include/util/NdbOut.hpp
storage/ndb/include/util/OutputStream.hpp
storage/ndb/include/util/basestring_vsnprintf.h
storage/ndb/include/util/socket_io.h
storage/ndb/src/common/debugger/EventLogger.cpp
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp
storage/ndb/src/kernel/blocks/suma/Suma.cpp
storage/ndb/src/kernel/blocks/suma/Suma.hpp
storage/ndb/src/kernel/vm/SimulatedBlock.hpp
storage/ndb/src/kernel/vm/WatchDog.cpp
storage/ndb/src/mgmapi/LocalConfig.cpp
storage/ndb/src/ndbapi/Ndb.cpp
storage/ndb/src/ndbapi/NdbInterpretedCode.cpp
storage/ndb/src/ndbapi/NdbScanOperation.cpp
storage/ndb/src/ndbapi/NdbTransaction.cpp
storage/ndb/src/ndbapi/Ndbif.cpp
storage/ndb/src/ndbapi/ObjectMap.hpp
2717 Jonas Oreland 2008-11-06
ndb - bug#40543 ReadCommitted might theoretically read stale data
modified:
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
2716 Jonas Oreland 2008-11-05
ndb - init fragptr.p->m_copy_started_state, could previously teoritically lead to node crash
modified:
storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
2715 Jonas Oreland 2008-11-05
ndb - add some initializations to prevent valgrind warnings
modified:
storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp
2714 Jonas Oreland 2008-11-03
ndb - kill a few windows warning
modified:
storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
storage/ndb/src/mgmsrv/ConfigInfo.cpp
2713 Jonas Oreland 2008-10-31 [merge]
merge with 62-main
modified:
sql/sql_table.cc
2712 Jonas Oreland 2008-10-31
ndb - bug#40455
modified:
storage/ndb/src/mgmapi/mgmapi.cpp
2711 Tomas Ulin 2008-10-29
Bug#40346 - correction for embedded
modified:
sql/ha_ndbcluster_binlog.h
2710 Tomas Ulin 2008-10-29
Bug#40246 - alter when table is locked does not work
added:
mysql-test/suite/ndb/r/ndb_dbug_lock.result
mysql-test/suite/ndb/t/ndb_dbug_lock.test
modified:
sql/ha_ndbcluster.cc
sql/ha_ndbcluster_binlog.cc
sql/ha_ndbcluster_binlog.h
sql/handler.cc
sql/handler.h
sql/sql_table.cc
=== modified file 'BUILD/SETUP.sh'
--- a/BUILD/SETUP.sh 2008-03-20 07:57:13 +0000
+++ b/BUILD/SETUP.sh 2008-11-06 16:34:02 +0000
@@ -61,7 +61,7 @@ prefix="/usr/local/mysql"
just_print=
just_configure=
full_debug=
-warning_mode=
+warning_mode="pedantic"
parse_options "$@"
@@ -93,6 +93,9 @@ if [ "x$warning_mode" != "xpedantic" ];
warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W"
warnings="$warnings -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare"
warnings="$warnings -Wwrite-strings -Wunused-function -Wunused-label -Wunused-value -Wunused-variable"
+
+ # Make "printf like format specifier warnings" into error
+ #warnings="$warnings -Werror=format"
# For more warnings, uncomment the following line
# warnings="$global_warnings -Wshadow"
=== modified file 'mysql-test/suite/ndb/t/ndb_dbug_lock.test'
--- a/mysql-test/suite/ndb/t/ndb_dbug_lock.test 2008-10-29 13:09:15 +0000
+++ b/mysql-test/suite/ndb/t/ndb_dbug_lock.test 2008-11-06 18:54:30 +0000
@@ -47,6 +47,7 @@ lock tables t1 write;
--echo # issue alter in parallell, which should be hanging waiting on
--connection another_con
--send alter table t1 add column (d int)
+--sleep 1
--echo # check thread state which should be:
--echo # "Waiting for allowed to take ndbcluster global schema lock"
=== modified file 'sql/ha_ndbcluster_binlog.h'
--- a/sql/ha_ndbcluster_binlog.h 2008-10-29 13:09:15 +0000
+++ b/sql/ha_ndbcluster_binlog.h 2008-10-29 14:07:35 +0000
@@ -147,8 +147,13 @@ private:
};
extern Ndb_cluster_connection* g_ndb_cluster_connection;
+#ifdef HAVE_NDB_BINLOG
void ndbcluster_global_schema_lock_init();
void ndbcluster_global_schema_lock_deinit();
+#else
+inline void ndbcluster_global_schema_lock_init() {}
+inline void ndbcluster_global_schema_lock_deinit() {}
+#endif
#ifdef HAVE_NDB_BINLOG
extern pthread_t ndb_binlog_thread;
=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc 2008-10-29 13:09:15 +0000
+++ b/sql/sql_table.cc 2008-10-30 07:25:25 +0000
@@ -3615,7 +3615,6 @@ bool mysql_create_table(THD *thd, const
bool internal_tmp_table,
uint select_field_count)
{
- char buf[256];
TABLE *name_lock= 0;
bool result;
Ha_global_schema_lock_guard global_schema_lock_guard(thd);
@@ -3645,11 +3644,6 @@ bool mysql_create_table(THD *thd, const
if (!(create_info->options & HA_LEX_CREATE_TMP_TABLE))
{
- sprintf(buf, "%u thd->open_tables: %p ->next: %p",
- __LINE__,
- thd->open_tables,
- thd->open_tables ? thd->open_tables->next : (void*)0);
- sql_print_information(buf);
if (lock_table_name_if_not_cached(thd, db, table_name, &name_lock))
{
result= TRUE;
@@ -3673,22 +3667,10 @@ bool mysql_create_table(THD *thd, const
goto unlock;
}
}
- //****
- sprintf(buf, "%u thd->open_tables: %p ->next: %p",
- __LINE__,
- thd->open_tables,
- thd->open_tables ? thd->open_tables->next : (void*)0);
- sql_print_information(buf);
result= mysql_create_table_no_lock(thd, db, table_name, create_info,
alter_info,
internal_tmp_table,
select_field_count);
- //****
- sprintf(buf, "%u thd->open_tables: %p ->next: %p",
- __LINE__,
- thd->open_tables,
- thd->open_tables ? thd->open_tables->next : (void*)0);
- sql_print_information(buf);
unlock:
if (name_lock)
=== modified file 'storage/ndb/include/debugger/SignalLoggerManager.hpp'
--- a/storage/ndb/include/debugger/SignalLoggerManager.hpp 2006-12-23 19:20:40 +0000
+++ b/storage/ndb/include/debugger/SignalLoggerManager.hpp 2008-10-24 11:00:37 +0000
@@ -86,7 +86,8 @@ public:
/**
* Generic messages in the signal log
*/
- void log(BlockNumber bno, const char * msg, ...);
+ void log(BlockNumber bno, const char * msg, ...)
+ ATTRIBUTE_FORMAT(printf, 3, 4);
/**
* LogModes
=== modified file 'storage/ndb/include/logger/Logger.hpp'
--- a/storage/ndb/include/logger/Logger.hpp 2008-09-05 09:46:56 +0000
+++ b/storage/ndb/include/logger/Logger.hpp 2008-11-06 16:35:05 +0000
@@ -228,7 +228,8 @@ public:
*
* @param pMsg the message.
*/
- virtual void alert(const char* pMsg, ...) const;
+ virtual void alert(const char* pMsg, ...) const
+ ATTRIBUTE_FORMAT(printf, 2, 3);
virtual void alert(BaseString &pMsg) const { alert(pMsg.c_str()); };
/**
@@ -236,7 +237,8 @@ public:
*
* @param pMsg the message.
*/
- virtual void critical(const char* pMsg, ...) const;
+ virtual void critical(const char* pMsg, ...) const
+ ATTRIBUTE_FORMAT(printf, 2, 3);
virtual void critical(BaseString &pMsg) const { critical(pMsg.c_str()); };
/**
@@ -244,7 +246,8 @@ public:
*
* @param pMsg the message.
*/
- virtual void error(const char* pMsg, ...) const;
+ virtual void error(const char* pMsg, ...) const
+ ATTRIBUTE_FORMAT(printf, 2, 3);
virtual void error(BaseString &pMsg) const { error(pMsg.c_str()); };
/**
@@ -252,7 +255,8 @@ public:
*
* @param pMsg the message.
*/
- virtual void warning(const char* pMsg, ...) const;
+ virtual void warning(const char* pMsg, ...) const
+ ATTRIBUTE_FORMAT(printf, 2, 3);
virtual void warning(BaseString &pMsg) const { warning(pMsg.c_str()); };
/**
@@ -260,7 +264,8 @@ public:
*
* @param pMsg the message.
*/
- virtual void info(const char* pMsg, ...) const;
+ virtual void info(const char* pMsg, ...) const
+ ATTRIBUTE_FORMAT(printf, 2, 3);
virtual void info(BaseString &pMsg) const { info(pMsg.c_str()); };
/**
@@ -268,7 +273,8 @@ public:
*
* @param pMsg the message.
*/
- virtual void debug(const char* pMsg, ...) const;
+ virtual void debug(const char* pMsg, ...) const
+ ATTRIBUTE_FORMAT(printf, 2, 3);
virtual void debug(BaseString &pMsg) const { debug(pMsg.c_str()); };
/*
=== modified file 'storage/ndb/include/ndbapi/Ndb.hpp'
--- a/storage/ndb/include/ndbapi/Ndb.hpp 2008-04-02 22:28:14 +0000
+++ b/storage/ndb/include/ndbapi/Ndb.hpp 2008-10-24 11:00:37 +0000
@@ -1881,7 +1881,9 @@ private:
struct LinearSectionPtr ptr[3]);
static void statusMessage(void*, Uint32, bool, bool);
#ifdef VM_TRACE
- void printState(const char* fmt, ...);
+#include <my_attribute.h>
+ void printState(const char* fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
#endif
};
=== modified file 'storage/ndb/include/util/BaseString.hpp'
--- a/storage/ndb/include/util/BaseString.hpp 2007-04-11 13:51:09 +0000
+++ b/storage/ndb/include/util/BaseString.hpp 2008-10-24 11:00:37 +0000
@@ -97,10 +97,12 @@ public:
const BaseString &separator = BaseString(" "));
/** @brief Assigns from a format string a la printf() */
- BaseString& assfmt(const char* ftm, ...);
+ BaseString& assfmt(const char* ftm, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
/** @brief Appends a format string a la printf() to the end */
- BaseString& appfmt(const char* ftm, ...);
+ BaseString& appfmt(const char* ftm, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
/**
* Split a string into a vector of strings. Separate the string where
@@ -183,7 +185,8 @@ public:
/**
* snprintf on some platforms need special treatment
*/
- static int snprintf(char *str, size_t size, const char *format, ...);
+ static int snprintf(char *str, size_t size, const char *format, ...)
+ ATTRIBUTE_FORMAT(printf, 3, 4);
static int vsnprintf(char *str, size_t size, const char *format, va_list ap);
private:
char* m_chr;
=== modified file 'storage/ndb/include/util/NdbOut.hpp'
--- a/storage/ndb/include/util/NdbOut.hpp 2006-12-23 19:20:40 +0000
+++ b/storage/ndb/include/util/NdbOut.hpp 2008-10-24 11:00:37 +0000
@@ -76,8 +76,10 @@ public:
NdbOut(OutputStream &);
virtual ~NdbOut();
- void print(const char * fmt, ...);
- void println(const char * fmt, ...);
+ void print(const char * fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
+ void println(const char * fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
OutputStream * m_out;
private:
@@ -125,7 +127,7 @@ private:
};
#else
-void ndbout_c(const char * fmt, ...);
+void ndbout_c(const char * fmt, ...) ATTRIBUTE_FORMAT(printf, 1, 2);
#endif
#endif
=== modified file 'storage/ndb/include/util/OutputStream.hpp'
--- a/storage/ndb/include/util/OutputStream.hpp 2008-09-07 22:48:48 +0000
+++ b/storage/ndb/include/util/OutputStream.hpp 2008-11-06 16:35:05 +0000
@@ -26,10 +26,12 @@ class OutputStream {
public:
OutputStream() {}
virtual ~OutputStream() {}
- virtual int print(const char * fmt, ...) = 0;
- virtual int println(const char * fmt, ...) = 0;
- virtual void flush() {}
- virtual void reset_timeout() {}
+ virtual int print(const char * fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3) = 0;
+ virtual int println(const char * fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3) = 0;
+ virtual void flush() {};
+ virtual void reset_timeout() {};
};
class FileOutputStream : public OutputStream {
@@ -39,8 +41,10 @@ public:
virtual ~FileOutputStream() {}
FILE *getFile() { return f; }
- int print(const char * fmt, ...);
- int println(const char * fmt, ...);
+ int print(const char * fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
+ int println(const char * fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
void flush() { fflush(f); }
};
@@ -56,8 +60,10 @@ public:
bool timedout() { return m_timedout; }
void reset_timeout() { m_timedout= false; m_timeout_remain= m_timeout_ms;}
- int print(const char * fmt, ...);
- int println(const char * fmt, ...);
+ int print(const char * fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
+ int println(const char * fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
};
@@ -68,8 +74,10 @@ public:
unsigned write_timeout_ms = 1000);
virtual ~BufferedSockOutputStream();
- int print(const char * fmt, ...);
- int println(const char * fmt, ...);
+ int print(const char * fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
+ int println(const char * fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 2, 3);
void flush();
};
=== modified file 'storage/ndb/include/util/basestring_vsnprintf.h'
--- a/storage/ndb/include/util/basestring_vsnprintf.h 2006-12-23 19:20:40 +0000
+++ b/storage/ndb/include/util/basestring_vsnprintf.h 2008-10-24 11:00:37 +0000
@@ -15,12 +15,14 @@
#ifndef BASESTRING_VSNPRINTF_H
#define BASESTRING_VSNPRINTF_H
+#include <ndb_global.h>
#include <stdarg.h>
#if defined(__cplusplus)
extern "C"
{
#endif
-int basestring_snprintf(char*, size_t, const char*, ...);
+int basestring_snprintf(char*, size_t, const char*, ...)
+ ATTRIBUTE_FORMAT(printf, 3, 4);
int basestring_vsnprintf(char*,size_t, const char*,va_list);
#if defined(__cplusplus)
}
=== modified file 'storage/ndb/include/util/socket_io.h'
--- a/storage/ndb/include/util/socket_io.h 2007-03-22 11:35:07 +0000
+++ b/storage/ndb/include/util/socket_io.h 2008-10-24 11:00:37 +0000
@@ -35,9 +35,9 @@ extern "C" {
const char[], int len);
int print_socket(NDB_SOCKET_TYPE, int timeout_ms, int *time,
- const char *, ...);
+ const char *, ...) ATTRIBUTE_FORMAT(printf, 4, 5);
int println_socket(NDB_SOCKET_TYPE, int timeout_ms, int *time,
- const char *, ...);
+ const char *, ...) ATTRIBUTE_FORMAT(printf, 4, 5);
int vprint_socket(NDB_SOCKET_TYPE, int timeout_ms, int *time,
const char *, va_list);
int vprintln_socket(NDB_SOCKET_TYPE, int timeout_ms, int *time,
=== modified file 'storage/ndb/src/common/debugger/EventLogger.cpp'
--- a/storage/ndb/src/common/debugger/EventLogger.cpp 2008-04-22 19:36:05 +0000
+++ b/storage/ndb/src/common/debugger/EventLogger.cpp 2008-10-24 11:00:37 +0000
@@ -758,7 +758,7 @@ void getTextEventBufferStatus(QQQQ) {
convert_unit(alloc, alloc_unit);
convert_unit(max_, max_unit);
BaseString::snprintf(m_text, m_text_len,
- "Event buffer status: used=%d%s(%d%) alloc=%d%s(%d%) "
+ "Event buffer status: used=%d%s(%d%%) alloc=%d%s(%d%%) "
"max=%d%s apply_epoch=%u/%u latest_epoch=%u/%u",
used, used_unit,
theData[2] ? (Uint32)((((Uint64)theData[1])*100)/theData[2]) : 0,
=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2008-05-30 08:03:55 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2008-10-24 11:00:37 +0000
@@ -12608,7 +12608,7 @@ Dbdict::buildIndex_recvReply(Signal* sig
if (ref == 0) {
infoEvent("DICT: index %u rebuild done", (unsigned)key);
} else {
- warningEvent("DICT: index %u rebuild failed: code=%d line=%d node=%d",
+ warningEvent("DICT: index %u rebuild failed: code=%d",
(unsigned)key, ref->getErrorCode());
}
rebuildIndexes(signal, key + 1);
=== modified file 'storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2008-08-21 06:47:02 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp 2008-11-06 16:35:05 +0000
@@ -17413,6 +17413,7 @@ void Dblqh::initFragrec(Signal* signal,
fragptr.p->fragDistributionKey = 0;
fragptr.p->activeTcCounter = 0;
fragptr.p->tableFragptr = RNIL;
+ fragptr.p->m_copy_started_state = 0;
}//Dblqh::initFragrec()
/* ==========================================================================
@@ -19269,7 +19270,7 @@ Dblqh::execDUMP_STATE_ORD(Signal* signal
TlcpPtr.p->lcpQueued,
TlcpPtr.p->reportEmpty);
char buf[8*_NDB_NODE_BITMASK_SIZE+1];
- infoEvent(" m_EMPTY_LCP_REQ=%d",
+ infoEvent(" m_EMPTY_LCP_REQ=%s",
TlcpPtr.p->m_EMPTY_LCP_REQ.getText(buf));
return;
=== modified file 'storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2008-09-19 21:49:00 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp 2008-11-06 10:08:40 +0000
@@ -3091,13 +3091,13 @@ void Dbtc::tckeyreq050Lab(Signal* signal
regTcPtr->tcNodedata[3] = Tdata6;
Uint8 Toperation = regTcPtr->operation;
- Uint8 Tdirty = regTcPtr->dirtyOp;
+ Uint8 TopSimple = regTcPtr->opSimple;
tnoOfBackup = tnodeinfo & 3;
tnoOfStandby = (tnodeinfo >> 8) & 3;
regCachePtr->fragmentDistributionKey = (tnodeinfo >> 16) & 255;
if (Toperation == ZREAD || Toperation == ZREAD_EX) {
- if (Tdirty == 1) {
+ if (TopSimple == 1){
jam();
/*-------------------------------------------------------------*/
/* A SIMPLE READ CAN SELECT ANY OF THE PRIMARY AND */
=== modified file 'storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2008-05-29 15:58:58 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp 2008-11-05 20:11:27 +0000
@@ -3061,6 +3061,9 @@ private:
Uint32 * dst = c_undo_buffer.alloc_copy_tuple(ptr, tabPtrP->total_rec_size);
if (unlikely(dst == 0))
return 0;
+#ifdef HAVE_purify
+ bzero(dst, tabPtrP->total_rec_size);
+#endif
dst += ((tabPtrP->m_no_of_attributes + 31) >> 5);
return (Tuple_header*)dst;
}
=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp 2008-03-19 12:57:01 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupIndex.cpp 2008-11-05 20:11:27 +0000
@@ -144,7 +144,7 @@ Dbtup::tuxReadAttrs(Uint32 fragPtrI,
KeyReqStruct req_struct;
tmpOp.m_tuple_location.m_page_no= pageId;
tmpOp.m_tuple_location.m_page_idx= pageIndex;
-
+ tmpOp.op_struct.op_type = ZREAD; // valgrind
setup_fixed_part(&req_struct, &tmpOp, tablePtr.p);
Tuple_header *tuple_ptr= req_struct.m_tuple_ptr;
if (tuple_ptr->get_tuple_version() != tupVersion)
@@ -357,6 +357,7 @@ Dbtup::tuxQueryTh(Uint32 fragPtrI,
Operationrec tmpOp;
tmpOp.m_tuple_location.m_page_no = pageId;
tmpOp.m_tuple_location.m_page_idx = pageIndex;
+ tmpOp.op_struct.op_type = ZREAD; // valgrind
setup_fixed_part(&req_struct, &tmpOp, tablePtr.p);
}
=== modified file 'storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2008-03-19 12:57:01 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp 2008-11-03 08:30:23 +0000
@@ -308,7 +308,7 @@ pad32(Uint32 bytepos, Uint32 bitsused)
{
assert((bytepos & 3) == 0);
}
- Uint32 ret = 4 * ((bitsused + 31 >> 5)) +
+ Uint32 ret = 4 * ((bitsused + 31) >> 5) +
((bytepos + 3) & ~(Uint32)3);
return ret;
}
=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp 2007-05-30 18:29:14 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp 2008-10-24 11:00:37 +0000
@@ -1040,7 +1040,7 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal
for (unsigned i = 0; i < theOpenFiles.size(); i++){
AsyncFile* file = theOpenFiles.getFile(i);
- infoEvent("%2d (0x%x): %s", i,file, file->theFileName.c_str());
+ infoEvent("%2d (0x%lx): %s", i, (long)file, file->theFileName.c_str());
}
return;
}
@@ -1049,7 +1049,7 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal
for (unsigned i = 0; i < theFiles.size(); i++){
AsyncFile* file = theFiles[i];
- infoEvent("%2d (0x%x): %s", i,file, file->isOpen()?"OPEN":"CLOSED");
+ infoEvent("%2d (0x%lx): %s", i, (long)file, file->isOpen()?"OPEN":"CLOSED");
}
return;
}
@@ -1058,7 +1058,7 @@ Ndbfs::execDUMP_STATE_ORD(Signal* signal
for (unsigned i = 0; i < theIdleFiles.size(); i++){
AsyncFile* file = theIdleFiles[i];
- infoEvent("%2d (0x%x): %s", i,file, file->isOpen()?"OPEN":"CLOSED");
+ infoEvent("%2d (0x%lx): %s", i, (long)file, file->isOpen()?"OPEN":"CLOSED");
}
return;
}
=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.cpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2008-08-13 12:30:19 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp 2008-10-24 11:00:37 +0000
@@ -1162,7 +1162,7 @@ Suma::execDUMP_STATE_ORD(Signal* signal)
for(Uint32 i = 0; i<c_no_of_buckets; i++)
{
Bucket* ptr= c_buckets + i;
- infoEvent("Bucket %d %d%d-%x switch gci: %d max_acked_gci: %d max_gci: %d tail: %d head: %d",
+ infoEvent("Bucket %d %d%d-%x switch gci: %llu max_acked_gci: %llu max_gci: %llu tail: %d head: %d",
i,
m_active_buckets.get(i),
m_switchover_buckets.get(i),
@@ -3803,7 +3803,7 @@ Suma::execSUB_GCP_COMPLETE_REP(Signal* s
rep->flags = flags;
rep->senderRef = reference();
rep->gcp_complete_rep_count = m_gcp_complete_rep_count;
-
+
if(m_gcp_complete_rep_count && !c_subscriber_nodes.isclear())
{
CRASH_INSERTION(13033);
=== modified file 'storage/ndb/src/kernel/blocks/suma/Suma.hpp'
--- a/storage/ndb/src/kernel/blocks/suma/Suma.hpp 2008-06-17 08:49:39 +0000
+++ b/storage/ndb/src/kernel/blocks/suma/Suma.hpp 2008-11-06 16:34:02 +0000
@@ -200,7 +200,7 @@ public:
R_SUB_STOP_REQ,
R_START_ME_REQ,
R_API_FAIL_REQ,
- R_SUB_ABORT_START_REQ,
+ R_SUB_ABORT_START_REQ
};
Uint32 m_opType;
=== modified file 'storage/ndb/src/kernel/vm/SimulatedBlock.hpp'
--- a/storage/ndb/src/kernel/vm/SimulatedBlock.hpp 2008-05-29 15:58:58 +0000
+++ b/storage/ndb/src/kernel/vm/SimulatedBlock.hpp 2008-10-24 11:00:37 +0000
@@ -393,8 +393,10 @@ protected:
/**
* General info event (sent to cluster log)
*/
- void infoEvent(const char * msg, ...) const ;
- void warningEvent(const char * msg, ...) const ;
+ void infoEvent(const char * msg, ...) const
+ ATTRIBUTE_FORMAT(printf, 2, 3);
+ void warningEvent(const char * msg, ...) const
+ ATTRIBUTE_FORMAT(printf, 2, 3);
/**
* Get node state
=== modified file 'storage/ndb/src/kernel/vm/WatchDog.cpp'
--- a/storage/ndb/src/kernel/vm/WatchDog.cpp 2008-04-22 19:36:05 +0000
+++ b/storage/ndb/src/kernel/vm/WatchDog.cpp 2008-10-24 11:00:37 +0000
@@ -139,7 +139,7 @@ WatchDog::run()
g_eventLogger->info("Watchdog: User time: %llu System time: %llu",
(Uint64)my_tms.tms_utime,
(Uint64)my_tms.tms_stime);
- g_eventLogger->warning("Watchdog: Warning overslept %u ms, expected %u ms.",
+ g_eventLogger->warning("Watchdog: Warning overslept %llu ms, expected %u ms.",
NdbTick_getMicrosPassed(last_time, now)/1000,
sleep_time);
}
=== modified file 'storage/ndb/src/mgmapi/LocalConfig.cpp'
--- a/storage/ndb/src/mgmapi/LocalConfig.cpp 2007-01-27 01:46:45 +0000
+++ b/storage/ndb/src/mgmapi/LocalConfig.cpp 2008-10-24 11:00:37 +0000
@@ -286,7 +286,7 @@ LocalConfig::readConnectString(const cha
bool return_value = parseString(connectString, err);
if (!return_value) {
BaseString err2;
- err2.assfmt("Reading %d \"%s\": %s", info, connectString, err.c_str());
+ err2.assfmt("Reading %s \"%s\": %s", info, connectString, err.c_str());
setError(0,err2.c_str());
}
return return_value;
=== modified file 'storage/ndb/src/mgmapi/mgmapi.cpp'
--- a/storage/ndb/src/mgmapi/mgmapi.cpp 2008-08-21 21:11:47 +0000
+++ b/storage/ndb/src/mgmapi/mgmapi.cpp 2008-10-31 13:55:33 +0000
@@ -502,8 +502,8 @@ int
ndb_mgm_connect(NdbMgmHandle handle, int no_retries,
int retry_delay_in_seconds, int verbose)
{
- SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_connect");
CHECK_HANDLE(handle, -1);
+ SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_connect");
DBUG_ENTER("ndb_mgm_connect");
#ifdef MGMAPI_LOG
@@ -666,8 +666,8 @@ extern "C"
int
ndb_mgm_disconnect(NdbMgmHandle handle)
{
- SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_disconnect");
CHECK_HANDLE(handle, -1);
+ SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_disconnect");
CHECK_CONNECTED(handle, -1);
return ndb_mgm_disconnect_quiet(handle);
@@ -838,8 +838,8 @@ extern "C"
struct ndb_mgm_cluster_state *
ndb_mgm_get_status2(NdbMgmHandle handle, const enum ndb_mgm_node_type types[])
{
- SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_status");
CHECK_HANDLE(handle, NULL);
+ SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_status");
CHECK_CONNECTED(handle, NULL);
char typestring[1024];
@@ -1006,13 +1006,13 @@ ndb_mgm_enter_single_user(NdbMgmHandle h
unsigned int nodeId,
struct ndb_mgm_reply* /*reply*/)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_enter_single_user");
const ParserRow<ParserDummy> enter_single_reply[] = {
MGM_CMD("enter single user reply", NULL, ""),
MGM_ARG("result", String, Mandatory, "Error message"),
MGM_END()
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -1039,13 +1039,13 @@ extern "C"
int
ndb_mgm_exit_single_user(NdbMgmHandle handle, struct ndb_mgm_reply* /*reply*/)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_exit_single_user");
const ParserRow<ParserDummy> exit_single_reply[] = {
MGM_CMD("exit single user reply", NULL, ""),
MGM_ARG("result", String, Mandatory, "Error message"),
MGM_END()
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
const Properties *reply;
@@ -1087,6 +1087,7 @@ int
ndb_mgm_stop3(NdbMgmHandle handle, int no_of_nodes, const int * node_list,
int abort, int *disconnect)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_stop3");
const ParserRow<ParserDummy> stop_reply_v1[] = {
MGM_CMD("stop reply", NULL, ""),
@@ -1102,7 +1103,6 @@ ndb_mgm_stop3(NdbMgmHandle handle, int n
MGM_END()
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
if(handle->mgmd_version_build==-1)
@@ -1235,6 +1235,7 @@ int
ndb_mgm_restart3(NdbMgmHandle handle, int no_of_nodes, const int * node_list,
int initial, int nostart, int abort, int *disconnect)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_restart3");
Uint32 restarted = 0;
const ParserRow<ParserDummy> restart_reply_v1[] = {
@@ -1251,7 +1252,6 @@ ndb_mgm_restart3(NdbMgmHandle handle, in
MGM_END()
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
if(handle->mgmd_version_build==-1)
@@ -1402,6 +1402,7 @@ ndb_mgm_get_clusterlog_severity_filter(N
struct ndb_mgm_severity* severity,
unsigned int severity_size)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_clusterlog_severity_filter");
const ParserRow<ParserDummy> getinfo_reply[] = {
MGM_CMD("clusterlog", NULL, ""),
@@ -1413,7 +1414,6 @@ ndb_mgm_get_clusterlog_severity_filter(N
MGM_ARG(clusterlog_severity_names[5], Int, Mandatory, ""),
MGM_ARG(clusterlog_severity_names[6], Int, Mandatory, ""),
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -1431,6 +1431,7 @@ extern "C"
const unsigned int *
ndb_mgm_get_clusterlog_severity_filter_old(NdbMgmHandle handle)
{
+ CHECK_HANDLE(handle, NULL);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_clusterlog_severity_filter");
static unsigned int enabled[(int)NDB_MGM_EVENT_SEVERITY_ALL]=
{0,0,0,0,0,0,0};
@@ -1444,7 +1445,6 @@ ndb_mgm_get_clusterlog_severity_filter_o
MGM_ARG(clusterlog_severity_names[5], Int, Mandatory, ""),
MGM_ARG(clusterlog_severity_names[6], Int, Mandatory, ""),
};
- CHECK_HANDLE(handle, NULL);
CHECK_CONNECTED(handle, NULL);
Properties args;
@@ -1465,6 +1465,7 @@ ndb_mgm_set_clusterlog_severity_filter(N
int enable,
struct ndb_mgm_reply* /*reply*/)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR,
"Executing: ndb_mgm_set_clusterlog_severity_filter");
const ParserRow<ParserDummy> filter_reply[] = {
@@ -1473,7 +1474,6 @@ ndb_mgm_set_clusterlog_severity_filter(N
MGM_END()
};
int retval = -1;
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -1553,6 +1553,7 @@ ndb_mgm_get_clusterlog_loglevel(NdbMgmHa
struct ndb_mgm_loglevel* loglevel,
unsigned int loglevel_size)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_clusterlog_loglevel");
int loglevel_count = loglevel_size;
const ParserRow<ParserDummy> getloglevel_reply[] = {
@@ -1570,7 +1571,6 @@ ndb_mgm_get_clusterlog_loglevel(NdbMgmHa
MGM_ARG(clusterlog_names[10], Int, Mandatory, ""),
MGM_ARG(clusterlog_names[11], Int, Mandatory, ""),
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -1588,6 +1588,7 @@ extern "C"
const unsigned int *
ndb_mgm_get_clusterlog_loglevel_old(NdbMgmHandle handle)
{
+ CHECK_HANDLE(handle, NULL);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_clusterlog_loglevel");
int loglevel_count = CFG_MAX_LOGLEVEL - CFG_MIN_LOGLEVEL + 1 ;
static unsigned int loglevel[CFG_MAX_LOGLEVEL - CFG_MIN_LOGLEVEL + 1] = {0,0,0,0,0,0,0,0,0,0,0,0};
@@ -1606,7 +1607,6 @@ ndb_mgm_get_clusterlog_loglevel_old(NdbM
MGM_ARG(clusterlog_names[10], Int, Mandatory, ""),
MGM_ARG(clusterlog_names[11], Int, Mandatory, ""),
};
- CHECK_HANDLE(handle, NULL);
CHECK_CONNECTED(handle, NULL);
Properties args;
@@ -1627,6 +1627,7 @@ ndb_mgm_set_clusterlog_loglevel(NdbMgmHa
int level,
struct ndb_mgm_reply* /*reply*/)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR,
"Executing: ndb_mgm_set_clusterlog_loglevel");
const ParserRow<ParserDummy> clusterlog_reply[] = {
@@ -1634,7 +1635,6 @@ ndb_mgm_set_clusterlog_loglevel(NdbMgmHa
MGM_ARG("result", String, Mandatory, "Error message"),
MGM_END()
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -1668,13 +1668,13 @@ ndb_mgm_set_loglevel_node(NdbMgmHandle h
int level,
struct ndb_mgm_reply* /*reply*/)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_set_loglevel_node");
const ParserRow<ParserDummy> loglevel_reply[] = {
MGM_CMD("set loglevel reply", NULL, ""),
MGM_ARG("result", String, Mandatory, "Error message"),
MGM_END()
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -1701,6 +1701,7 @@ int
ndb_mgm_listen_event_internal(NdbMgmHandle handle, const int filter[],
int parsable)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_listen_event");
const ParserRow<ParserDummy> stat_reply[] = {
MGM_CMD("listen event", NULL, ""),
@@ -1708,7 +1709,6 @@ ndb_mgm_listen_event_internal(NdbMgmHand
MGM_ARG("msg", String, Optional, "Error message"),
MGM_END()
};
- CHECK_HANDLE(handle, -1);
const char *hostname= ndb_mgm_get_connected_host(handle);
int port= ndb_mgm_get_connected_port(handle);
@@ -1760,13 +1760,13 @@ int
ndb_mgm_dump_state(NdbMgmHandle handle, int nodeId, const int * _args,
int _num_args, struct ndb_mgm_reply* /* reply */)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_dump_state");
const ParserRow<ParserDummy> dump_state_reply[] = {
MGM_CMD("dump state reply", NULL, ""),
MGM_ARG("result", String, Mandatory, "Error message"),
MGM_END()
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
char buf[256];
@@ -1805,6 +1805,7 @@ int
ndb_mgm_start_signallog(NdbMgmHandle handle, int nodeId,
struct ndb_mgm_reply* reply)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_start_signallog");
const ParserRow<ParserDummy> start_signallog_reply[] = {
MGM_CMD("start signallog reply", NULL, ""),
@@ -1812,7 +1813,6 @@ ndb_mgm_start_signallog(NdbMgmHandle han
MGM_END()
};
int retval = -1;
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -1845,6 +1845,7 @@ int
ndb_mgm_stop_signallog(NdbMgmHandle handle, int nodeId,
struct ndb_mgm_reply* reply)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_stop_signallog");
const ParserRow<ParserDummy> stop_signallog_reply[] = {
MGM_CMD("stop signallog reply", NULL, ""),
@@ -1852,7 +1853,6 @@ ndb_mgm_stop_signallog(NdbMgmHandle hand
MGM_END()
};
int retval = -1;
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -1890,6 +1890,7 @@ ndb_mgm_log_signals(NdbMgmHandle handle,
const char* blockNames,
struct ndb_mgm_reply* reply)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_log_signals");
const ParserRow<ParserDummy> stop_signallog_reply[] = {
MGM_CMD("log signals reply", NULL, ""),
@@ -1897,7 +1898,6 @@ ndb_mgm_log_signals(NdbMgmHandle handle,
MGM_END()
};
int retval = -1;
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -1947,6 +1947,7 @@ int
ndb_mgm_set_trace(NdbMgmHandle handle, int nodeId, int traceNumber,
struct ndb_mgm_reply* reply)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_set_trace");
const ParserRow<ParserDummy> set_trace_reply[] = {
MGM_CMD("set trace reply", NULL, ""),
@@ -1954,7 +1955,6 @@ ndb_mgm_set_trace(NdbMgmHandle handle, i
MGM_END()
};
int retval = -1;
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -1985,6 +1985,7 @@ int
ndb_mgm_insert_error(NdbMgmHandle handle, int nodeId, int errorCode,
struct ndb_mgm_reply* reply)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_insert_error");
const ParserRow<ParserDummy> insert_error_reply[] = {
MGM_CMD("insert error reply", NULL, ""),
@@ -1992,7 +1993,6 @@ ndb_mgm_insert_error(NdbMgmHandle handle
MGM_END()
};
int retval = -1;
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -2022,6 +2022,7 @@ extern "C"
int
ndb_mgm_start(NdbMgmHandle handle, int no_of_nodes, const int * node_list)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_start");
const ParserRow<ParserDummy> start_reply[] = {
MGM_CMD("start reply", NULL, ""),
@@ -2030,7 +2031,6 @@ ndb_mgm_start(NdbMgmHandle handle, int n
MGM_END()
};
int started = 0;
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
if(no_of_nodes < 0){
@@ -2086,6 +2086,7 @@ ndb_mgm_start_backup(NdbMgmHandle handle
unsigned int* _backup_id,
struct ndb_mgm_reply* /*reply*/)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_start_backup");
const ParserRow<ParserDummy> start_backup_reply[] = {
MGM_CMD("start backup reply", NULL, ""),
@@ -2093,7 +2094,6 @@ ndb_mgm_start_backup(NdbMgmHandle handle
MGM_ARG("id", Int, Optional, "Id of the started backup"),
MGM_END()
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -2128,13 +2128,13 @@ int
ndb_mgm_abort_backup(NdbMgmHandle handle, unsigned int backupId,
struct ndb_mgm_reply* /*reply*/)
{
+ CHECK_HANDLE(handle, -1);
SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_abort_backup");
const ParserRow<ParserDummy> stop_backup_reply[] = {
MGM_CMD("abort backup reply", NULL, ""),
MGM_ARG("result", String, Mandatory, "Error message"),
MGM_END()
};
- CHECK_HANDLE(handle, -1);
CHECK_CONNECTED(handle, -1);
Properties args;
@@ -2159,8 +2159,8 @@ ndb_mgm_abort_backup(NdbMgmHandle handle
extern "C"
struct ndb_mgm_configuration *
ndb_mgm_get_configuration(NdbMgmHandle handle, unsigned int version) {
- SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_configuration");
CHECK_HANDLE(handle, 0);
+ SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_get_configuration");
CHECK_CONNECTED(handle, 0);
Properties args;
=== modified file 'storage/ndb/src/mgmsrv/ConfigInfo.cpp'
--- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2008-02-20 15:15:31 +0000
+++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp 2008-11-03 08:30:23 +0000
@@ -3882,8 +3882,8 @@ add_node_connections(Vector<ConfigInfo::
if(!tmp->get("NodeId2", &nodeId2)) continue;
p_connections.put("", nodeId2, nodeId2);
- p_connections2.put("", nodeId1 + nodeId2<<16, nodeId1);
- p_connections2.put("", nodeId2 + nodeId1<<16, nodeId2);
+ p_connections2.put("", nodeId1 + (nodeId2<<16), nodeId1);
+ p_connections2.put("", nodeId2 + (nodeId1<<16), nodeId2);
}
Uint32 nNodes;
@@ -3915,7 +3915,7 @@ add_node_connections(Vector<ConfigInfo::
for (i= 0; p_db_nodes.get("", i, &nodeId1); i++){
for (Uint32 j= i+1;; j++){
if(!p_db_nodes.get("", j, &nodeId2)) break;
- if(!p_connections2.get("", nodeId1+nodeId2<<16, &dummy))
+ if(!p_connections2.get("", nodeId1+(nodeId2<<16), &dummy))
{
if (!add_a_connection(sections,ctx,nodeId1,nodeId2,opt_ndb_shm))
goto err;
=== modified file 'storage/ndb/src/ndbapi/Ndb.cpp'
--- a/storage/ndb/src/ndbapi/Ndb.cpp 2008-06-16 12:34:47 +0000
+++ b/storage/ndb/src/ndbapi/Ndb.cpp 2008-10-24 11:00:37 +0000
@@ -687,7 +687,7 @@ Ndb::startTransactionLocal(Uint32 aPrior
}//if
#ifdef VM_TRACE
if (tConnection->theListState != NdbTransaction::NotInList) {
- printState("startTransactionLocal %x", tConnection);
+ printState("startTransactionLocal %lx", (long)tConnection);
abort();
}
#endif
=== modified file 'storage/ndb/src/ndbapi/NdbInterpretedCode.cpp'
--- a/storage/ndb/src/ndbapi/NdbInterpretedCode.cpp 2008-09-29 18:26:36 +0000
+++ b/storage/ndb/src/ndbapi/NdbInterpretedCode.cpp 2008-11-06 16:35:05 +0000
@@ -850,7 +850,7 @@ NdbInterpretedCode::ret_sub()
m_flags&= ~(InSubroutineDef);
return add1(Interpreter::RETURN);
-};
+}
/* Get a CodeMetaInfo object given a number
* Label numbers start from 0. Subroutine numbers start from
=== modified file 'storage/ndb/src/ndbapi/NdbScanOperation.cpp'
--- a/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2008-08-13 20:04:01 +0000
+++ b/storage/ndb/src/ndbapi/NdbScanOperation.cpp 2008-11-06 16:34:02 +0000
@@ -227,7 +227,7 @@ NdbScanOperation::addInterpretedCode(Uin
theAI_LenInCurrAI= theCurrentATTRINFO->getLength();
return res;
-};
+}
/* Method for handling scanoptions passed into
* NdbTransaction::scanTable or scanIndex
@@ -969,7 +969,7 @@ NdbScanOperation::readTuples(NdbScanOper
m_savedBatchOldApi= batch;
return 0;
-};
+}
/* Most of the scan definition work for old + NdbRecord API scans is done here */
int
@@ -1350,7 +1350,7 @@ NdbScanOperation::nextResult(bool fetchA
return nextResult(&dummyOutRowPtr,
fetchAllowed,
forceSend);
-};
+}
/* nextResult() for NdbRecord operation. */
int
=== modified file 'storage/ndb/src/ndbapi/NdbTransaction.cpp'
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp 2008-08-06 15:33:19 +0000
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp 2008-10-24 11:00:37 +0000
@@ -578,7 +578,7 @@ NdbTransaction::executeNoBlobs(NdbTransa
for (unsigned i = 0; i < theNdb->theNoOfCompletedTransactions; i++)
anyway += theNdb->theCompletedTransactionsArray[i] == this;
if (anyway) {
- theNdb->printState("execute %x", this);
+ theNdb->printState("execute %lx", (long)this);
abort();
}
#endif
@@ -1043,7 +1043,7 @@ NdbTransaction::release(){
theInUseState = false;
#ifdef VM_TRACE
if (theListState != NotInList) {
- theNdb->printState("release %x", this);
+ theNdb->printState("release %lx", (long)this);
abort();
}
#endif
=== modified file 'storage/ndb/src/ndbapi/Ndbif.cpp'
--- a/storage/ndb/src/ndbapi/Ndbif.cpp 2008-04-22 19:36:05 +0000
+++ b/storage/ndb/src/ndbapi/Ndbif.cpp 2008-10-24 11:00:37 +0000
@@ -44,7 +44,6 @@
#include <NdbTick.h>
#include <EventLogger.hpp>
-extern EventLogger * g_eventLogger;
/******************************************************************************
* int init( int aNrOfCon, int aNrOfOp );
@@ -315,7 +314,7 @@ Ndb::abortTransactionsAfterNodeFailure(U
localCon->theCompletionStatus = NdbTransaction::CompletedSuccess;
} else {
#ifdef VM_TRACE
- printState("abortTransactionsAfterNodeFailure %x", this);
+ printState("abortTransactionsAfterNodeFailure %lx", (long)this);
abort();
#endif
}
=== modified file 'storage/ndb/src/ndbapi/ObjectMap.hpp'
--- a/storage/ndb/src/ndbapi/ObjectMap.hpp 2008-04-22 19:36:05 +0000
+++ b/storage/ndb/src/ndbapi/ObjectMap.hpp 2008-10-24 11:00:37 +0000
@@ -85,7 +85,7 @@ NdbObjectIdMap::unmap(Uint32 id, void *o
m_map[i].m_next = m_firstFree;
m_firstFree = i;
} else {
- g_eventLogger->error("NdbObjectIdMap::unmap(%u, 0x%x) obj=0x%x",
+ g_eventLogger->error("NdbObjectIdMap::unmap(%u, 0x%lx) obj=0x%lx",
id, (long) object, (long) obj);
DBUG_PRINT("error",("NdbObjectIdMap::unmap(%u, 0x%lx) obj=0x%lx",
id, (long) object, (long) obj));
| Thread |
|---|
| • bzr push into mysql-5.1 branch (tomas.ulin:2710 to 2719) | Tomas Ulin | 7 Nov |