diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-02 19:40:54 +0000 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2004-11-02 19:40:54 +0000 |
commit | bc0988c2d3effbd59ffd60fd97ad05c39b302163 (patch) | |
tree | 5ce56160a8bafe121662257fec32720cf9a0b96e /ndb | |
parent | 0920d479a1a1885f6488c02411a6c38a70694202 (diff) | |
parent | 5c6cd1f79687c1ef738a3da6ff45166fc90c8f43 (diff) | |
download | mariadb-git-bc0988c2d3effbd59ffd60fd97ad05c39b302163.tar.gz |
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
Diffstat (limited to 'ndb')
-rw-r--r-- | ndb/src/common/editline/sysunix.c | 2 | ||||
-rw-r--r-- | ndb/src/common/util/basestring_vsnprintf.c | 8 | ||||
-rw-r--r-- | ndb/src/kernel/vm/Emulator.hpp | 1 | ||||
-rw-r--r-- | ndb/src/mgmsrv/Services.cpp | 22 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbDictionaryImpl.cpp | 6 |
5 files changed, 18 insertions, 21 deletions
diff --git a/ndb/src/common/editline/sysunix.c b/ndb/src/common/editline/sysunix.c index 1339e5769e2..d7437f6a9c7 100644 --- a/ndb/src/common/editline/sysunix.c +++ b/ndb/src/common/editline/sysunix.c @@ -139,7 +139,7 @@ rl_add_slash(char *path, char *p, size_t p_len) struct stat Sb; if (stat(path, &Sb) >= 0) { - int len= strlen(p); + size_t len= strlen(p); if (len+1 < p_len) { p[len]= S_ISDIR(Sb.st_mode) ? '/' : ' '; p[len+1]= 0; diff --git a/ndb/src/common/util/basestring_vsnprintf.c b/ndb/src/common/util/basestring_vsnprintf.c index c96d1a300e1..7307279f345 100644 --- a/ndb/src/common/util/basestring_vsnprintf.c +++ b/ndb/src/common/util/basestring_vsnprintf.c @@ -35,7 +35,11 @@ basestring_snprintf(char *str, size_t size, const char *format, ...) #define BASESTRING_VSNPRINTF_FUNC(a,b,c,d) vsnprintf(a,b,c,d) #else #define SNPRINTF_RETURN_TRUNC - #define BASESTRING_VSNPRINTF_FUNC(a,b,c,d) my_vsnprintf(a,b,c,d) + /* #define BASESTRING_VSNPRINTF_FUNC(a,b,c,d) my_vsnprintf(a,b,c,d) + * we would like to use my_vsnprintf but it does not have enough features + * Let's hope vsnprintf works anyways + */ + #define BASESTRING_VSNPRINTF_FUNC(a,b,c,d) vsnprintf(a,b,c,d) extern int my_vsnprintf(char *str, size_t size, const char *format, va_list ap); #endif #ifdef SNPRINTF_RETURN_TRUNC @@ -46,7 +50,7 @@ basestring_vsnprintf(char *str, size_t size, const char *format, va_list ap) { int ret= BASESTRING_VSNPRINTF_FUNC(str, size, format, ap); #ifdef SNPRINTF_RETURN_TRUNC - if (ret == size-1) { + if (ret == size-1 || ret == -1) { ret= BASESTRING_VSNPRINTF_FUNC(basestring_vsnprintf_buf, sizeof(basestring_vsnprintf_buf), format, ap); diff --git a/ndb/src/kernel/vm/Emulator.hpp b/ndb/src/kernel/vm/Emulator.hpp index bd240f8679b..b3c64830802 100644 --- a/ndb/src/kernel/vm/Emulator.hpp +++ b/ndb/src/kernel/vm/Emulator.hpp @@ -25,6 +25,7 @@ // //=========================================================================== #include <kernel_types.h> +#include <TransporterRegistry.hpp> extern class JobTable globalJobTable; extern class TimeQueue globalTimeQueue; diff --git a/ndb/src/mgmsrv/Services.cpp b/ndb/src/mgmsrv/Services.cpp index 5b552836955..2672d8c9d4b 100644 --- a/ndb/src/mgmsrv/Services.cpp +++ b/ndb/src/mgmsrv/Services.cpp @@ -773,8 +773,10 @@ MgmApiSession::setClusterLogLevel(Parser<MgmApiSession>::Context &, /* XXX should use constants for this value */ if(level > 15) { - errorString.assign("Invalied loglevel"); - goto error; + m_output->println("set cluster loglevel reply"); + m_output->println("result: Invalid loglevel"); + m_output->println(""); + return; } EventSubscribeReq req; @@ -786,11 +788,6 @@ MgmApiSession::setClusterLogLevel(Parser<MgmApiSession>::Context &, m_output->println("set cluster loglevel reply"); m_output->println("result: Ok"); m_output->println(""); - return; -error: - m_output->println("set cluster loglevel reply"); - m_output->println("result: %s", errorString.c_str()); - m_output->println(""); } void @@ -807,8 +804,10 @@ MgmApiSession::setLogLevel(Parser<MgmApiSession>::Context &, /* XXX should use constants for this value */ if(level > 15) { - errorString.assign("Invalied loglevel"); - goto error; + m_output->println("set loglevel reply"); + m_output->println("result: Invalid loglevel", errorString.c_str()); + m_output->println(""); + return; } EventSubscribeReq req; @@ -820,11 +819,6 @@ MgmApiSession::setLogLevel(Parser<MgmApiSession>::Context &, m_output->println("set loglevel reply"); m_output->println("result: Ok"); m_output->println(""); - return; - error: - m_output->println("set loglevel reply"); - m_output->println("result: %s", errorString.c_str()); - m_output->println(""); } void diff --git a/ndb/src/ndbapi/NdbDictionaryImpl.cpp b/ndb/src/ndbapi/NdbDictionaryImpl.cpp index 76854cabcd7..304d1b904d4 100644 --- a/ndb/src/ndbapi/NdbDictionaryImpl.cpp +++ b/ndb/src/ndbapi/NdbDictionaryImpl.cpp @@ -47,15 +47,13 @@ * Column */ NdbColumnImpl::NdbColumnImpl() - : NdbDictionary::Column(* this), m_facade(this), - m_attrId(-1) + : NdbDictionary::Column(* this), m_attrId(-1), m_facade(this) { init(); } NdbColumnImpl::NdbColumnImpl(NdbDictionary::Column & f) - : NdbDictionary::Column(* this), m_facade(&f), - m_attrId(-1) + : NdbDictionary::Column(* this), m_attrId(-1), m_facade(&f) { init(); } |