Commit 5ff32da2 authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-4.1

into mysql.com:/home/my/mysql-4.1


sql/mysqld.cc:
  Auto merged
configure.in:
  Auto merged
parents 505caa28 bc0988c2
......@@ -1039,8 +1039,8 @@ case $SYSTEM_TYPE in
;;
*hpux11.*)
echo "Enabling workarounds for hpux 11"
CFLAGS="$CFLAGS -DHPUX11 -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
CXXFLAGS="$CXXFLAGS -DHPUX11 -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
CFLAGS="$CFLAGS -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
CXXFLAGS="$CXXFLAGS -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
if test "$with_named_thread" = "no"
then
echo "Using --with-named-thread=-lpthread"
......
......@@ -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;
......
......@@ -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);
......
......@@ -25,6 +25,7 @@
//
//===========================================================================
#include <kernel_types.h>
#include <TransporterRegistry.hpp>
extern class JobTable globalJobTable;
extern class TimeQueue globalTimeQueue;
......
......@@ -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
......
......@@ -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();
}
......
......@@ -2918,11 +2918,10 @@ we force server id to 2, but this MySQL server will not act as a slave.");
exit(1);
#ifdef __WIN__
#define MYSQL_ERR_FILE "mysql.err"
if (!opt_console)
{
freopen(MYSQL_ERR_FILE,"a+",stdout);
freopen(MYSQL_ERR_FILE,"a+",stderr);
freopen(log_error_file,"a+",stdout);
freopen(log_error_file,"a+",stderr);
FreeConsole(); // Remove window
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment