Commit 83dac311 authored by mkindahl@dl145h.mysql.com's avatar mkindahl@dl145h.mysql.com
Browse files

Merge dl145h.mysql.com:/data0/mkindahl/mysql-5.1

into  dl145h.mysql.com:/data0/mkindahl/mysql-5.1-rpl-merge
parents ccd09676 3afb341a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -32,7 +32,8 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc ../mysys/my_conio.c)
TARGET_LINK_LIBRARIES(mysql mysqlclient_notls wsock32)

ADD_EXECUTABLE(mysqltest mysqltest.c ../mysys/my_getsystime.c ../mysys/my_copy.c)
ADD_EXECUTABLE(mysqltest mysqltest.c ../mysys/my_getsystime.c
               ../mysys/my_copy.c ../mysys/my_mkdir.c)
TARGET_LINK_LIBRARIES(mysqltest mysqlclient_notls regex wsock32)

ADD_EXECUTABLE(mysqlcheck mysqlcheck.c)
+2 −1
Original line number Diff line number Diff line
@@ -88,7 +88,8 @@ mysqlslap_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \

mysqltest_SOURCES=		mysqltest.c \
				$(top_srcdir)/mysys/my_getsystime.c \
				$(top_srcdir)/mysys/my_copy.c
				$(top_srcdir)/mysys/my_copy.c \
                                $(top_srcdir)/mysys/my_mkdir.c
mysqltest_LDADD =		$(top_builddir)/regex/libregex.a $(LDADD)

mysql_upgrade_SOURCES=          mysql_upgrade.c \
+71 −1
Original line number Diff line number Diff line
@@ -45,6 +45,10 @@
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
#ifdef __WIN__
#include <direct.h>
#endif


/* Use cygwin for --exec and --system before 5.0 */
#if MYSQL_VERSION_ID < 50000
@@ -263,7 +267,7 @@ enum enum_commands {
  Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST,
  Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT, Q_SKIP,
  Q_CHMOD_FILE, Q_APPEND_FILE, Q_CAT_FILE, Q_DIFF_FILES,
  Q_SEND_QUIT, Q_CHANGE_USER,
  Q_SEND_QUIT, Q_CHANGE_USER, Q_MKDIR, Q_RMDIR,

  Q_UNKNOWN,			       /* Unknown command.   */
  Q_COMMENT,			       /* Comments, ignored. */
@@ -353,6 +357,9 @@ const char *command_names[]=
  "diff_files",
  "send_quit",
  "change_user",
  "mkdir",
  "rmdir",

  0
};

@@ -2736,6 +2743,67 @@ void do_file_exist(struct st_command *command)
}


/*
  SYNOPSIS
  do_mkdir
  command	called command

  DESCRIPTION
  mkdir <dir_name>
  Create the directory <dir_name>
*/

void do_mkdir(struct st_command *command)
{
  int error;
  static DYNAMIC_STRING ds_dirname;
  const struct command_arg mkdir_args[] = {
    "dirname", ARG_STRING, TRUE, &ds_dirname, "Directory to create"
  };
  DBUG_ENTER("do_mkdir");

  check_command_args(command, command->first_argument,
                     mkdir_args, sizeof(mkdir_args)/sizeof(struct command_arg),
                     ' ');

  DBUG_PRINT("info", ("creating directory: %s", ds_dirname.str));
  error= my_mkdir(ds_dirname.str, 0777, MYF(0)) != 0;
  handle_command_error(command, error);
  dynstr_free(&ds_dirname);
  DBUG_VOID_RETURN;
}

/*
  SYNOPSIS
  do_rmdir
  command	called command

  DESCRIPTION
  rmdir <dir_name>
  Remove the empty directory <dir_name>
*/

void do_rmdir(struct st_command *command)
{
  int error;
  static DYNAMIC_STRING ds_dirname;
  const struct command_arg rmdir_args[] = {
    "dirname", ARG_STRING, TRUE, &ds_dirname, "Directory to remove"
  };
  DBUG_ENTER("do_rmdir");

  check_command_args(command, command->first_argument,
                     rmdir_args, sizeof(rmdir_args)/sizeof(struct command_arg),
                     ' ');

  DBUG_PRINT("info", ("removing directory: %s", ds_dirname.str));
  error= rmdir(ds_dirname.str) != 0;
  handle_command_error(command, error);
  dynstr_free(&ds_dirname);
  DBUG_VOID_RETURN;
}


/*
  Read characters from line buffer or file. This is needed to allow
  my_ungetc() to buffer MAX_DELIMITER_LENGTH characters for a file
@@ -6913,6 +6981,8 @@ int main(int argc, char **argv)
      case Q_ECHO: do_echo(command); command_executed++; break;
      case Q_SYSTEM: do_system(command); break;
      case Q_REMOVE_FILE: do_remove_file(command); break;
      case Q_MKDIR: do_mkdir(command); break;
      case Q_RMDIR: do_rmdir(command); break;
      case Q_FILE_EXIST: do_file_exist(command); break;
      case Q_WRITE_FILE: do_write_file(command); break;
      case Q_APPEND_FILE: do_append_file(command); break;
+18 −3
Original line number Diff line number Diff line
@@ -813,8 +813,8 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
 sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
 unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
 sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \
 sys/prctl.h \
 sys/resource.h sys/param.h port.h ieeefp.h)
 sys/prctl.h sys/resource.h sys/param.h port.h ieeefp.h \
 execinfo.h)

AC_CHECK_HEADERS([xfs/xfs.h])

@@ -2041,7 +2041,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
  sighold sigset sigthreadmask port_create sleep \
  snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
  strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
  posix_fallocate)
  posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)

#
#
@@ -2331,6 +2331,21 @@ then
fi
AC_MSG_RESULT("$netinet_inc")

AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CHECK_HEADERS(cxxabi.h)
AC_CACHE_CHECK([checking for abi::__cxa_demangle], mysql_cv_cxa_demangle,
[AC_TRY_LINK([#include <cxxabi.h>], [
  char *foo= 0; int bar= 0;
  foo= abi::__cxa_demangle(foo, foo, 0, &bar);
], [mysql_cv_cxa_demangle=yes], [mysql_cv_cxa_demangle=no])])
AC_LANG_RESTORE

if test "x$mysql_cv_cxa_demangle" = xyes; then
  AC_DEFINE(HAVE_ABI_CXA_DEMANGLE, 1,
            [Define to 1 if you have the `abi::__cxa_demangle' function.])
fi

#--------------------------------------------------------------------
# Check for requested features
#--------------------------------------------------------------------
+17 −0
Original line number Diff line number Diff line
@@ -108,6 +108,23 @@ drop table t1;
set global binlog_cache_size=@bcs;
set session autocommit = @ac;

#
# Bug#33798: prepared statements improperly handle large unsigned ints
#
--disable_warnings
drop table if exists t1;
--enable_warnings
reset master;
create table t1 (a bigint unsigned, b bigint(20) unsigned);
prepare stmt from "insert into t1 values (?,?)";
set @a= 9999999999999999;
set @b= 14632475938453979136;
execute stmt using @a, @b;
deallocate prepare stmt;
drop table t1;
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show binlog events from 0;

--echo End of 5.0 tests

# Test of a too big SET INSERT_ID: see if the truncated value goes
Loading