manual merge from mysql-trunk-bugfixing
Conflicts: Text conflict in mysql-test/r/archive.result Contents conflict in mysql-test/r/innodb_bug38231.result Text conflict in mysql-test/r/mdl_sync.result Text conflict in mysql-test/suite/binlog/t/disabled.def Text conflict in mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result Text conflict in mysql-test/t/archive.test Contents conflict in mysql-test/t/innodb_bug38231.test Text conflict in mysql-test/t/mdl_sync.test Text conflict in sql/sp_head.cc Text conflict in sql/sql_show.cc Text conflict in sql/table.cc Text conflict in sql/table.h
This commit is contained in:
commit
1af11051bf
10
.bzrignore
10
.bzrignore
@ -3091,3 +3091,13 @@ client/dtoa.c
|
||||
libmysqld/sql_audit.cc
|
||||
configure.am
|
||||
libmysqld/des_key_file.cc
|
||||
CPackConfig.cmake
|
||||
CPackSourceConfig.cmake
|
||||
make_dist.cmake
|
||||
client/echo
|
||||
libmysql/libmysql_exports_file.cc
|
||||
libmysql/merge_archives_mysqlclient.cmake
|
||||
libmysqld/merge_archives_mysqlserver.cmake
|
||||
libmysqld/mysqlserver_depends.c
|
||||
libmysqld/examples/mysql_embedded
|
||||
sql/.empty
|
||||
|
@ -25,8 +25,6 @@ EXTRA_DIST = FINISH.sh \
|
||||
check-cpu \
|
||||
cleanup \
|
||||
compile-alpha \
|
||||
compile-alpha-ccc \
|
||||
compile-alpha-cxx \
|
||||
compile-alpha-debug \
|
||||
compile-amd64-debug-max \
|
||||
compile-amd64-debug-max-no-ndb \
|
||||
@ -78,6 +76,3 @@ EXTRA_DIST = FINISH.sh \
|
||||
compile-solaris-sparc-debug \
|
||||
compile-solaris-sparc-forte \
|
||||
compile-solaris-sparc-purify
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -119,8 +119,12 @@ fi
|
||||
|
||||
# Set flags for various build configurations.
|
||||
# Used in -valgrind builds
|
||||
valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify "
|
||||
# Override -DFORCE_INIT_OF_VARS from debug_cflags. It enables the macro
|
||||
# LINT_INIT(), which is only useful for silencing spurious warnings
|
||||
# of static analysis tools. We want LINT_INIT() to be a no-op in Valgrind.
|
||||
valgrind_flags="-UFORCE_INIT_OF_VARS -DHAVE_purify "
|
||||
valgrind_flags="$valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
|
||||
valgrind_configs="--with-valgrind"
|
||||
#
|
||||
# Used in -debug builds
|
||||
debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS "
|
||||
|
@ -1010,9 +1010,10 @@ set_ccache_usage()
|
||||
set_valgrind_flags()
|
||||
{
|
||||
if test "x$valgrind_flag" = "xyes" ; then
|
||||
loc_valgrind_flags="-USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify "
|
||||
loc_valgrind_flags="-UFORCE_INIT_OF_VARS -DHAVE_purify "
|
||||
loc_valgrind_flags="$loc_valgrind_flags -DMYSQL_SERVER_SUFFIX=-valgrind-max"
|
||||
compiler_flags="$compiler_flags $loc_valgrind_flags"
|
||||
with_flags="$with_flags --with-valgrind"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -1,41 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
/bin/rm -f */.deps/*.P */*.o
|
||||
make -k maintainer-clean
|
||||
/bin/rm -f */.deps/*.P */*.o
|
||||
/bin/rm -f config.cache mysql-*.tar.gz
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/autorun.sh"
|
||||
|
||||
CC=ccc CFLAGS="-fast -O3 -fomit-frame-pointer" CXX=gcc CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti -mcpu=ev6 -Wa,-mev6" CXXLDFLAGS='/usr/lib/compaq/libots-2.2.7/libots.so /usr/lib/compaq/cpml-5.0.0/libcpml_ev6.a' ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-thread-safe-client
|
||||
make
|
||||
rm */.deps/*
|
||||
make
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
rm */.deps/*
|
||||
bin/mysqladmin shutdown
|
||||
sur make install
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
scripts/make_binary_distribution
|
||||
fi
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
# This should give better performance by compiling many files at once, but
|
||||
# according to our benchmarks there isn't any real difference.
|
||||
|
||||
pwd=`pwd`
|
||||
for i in */make-ccc
|
||||
do
|
||||
cd `dirname $i`
|
||||
make-ccc
|
||||
cd $pwd
|
||||
done
|
||||
cd sql
|
||||
rm mysqld .deps/*.P
|
||||
make mysqld
|
||||
cd $pwd
|
@ -1,43 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
/bin/rm -f */.deps/*.P */*.o
|
||||
make -k maintainer-clean
|
||||
/bin/rm -f */.deps/*.P */*.o
|
||||
/bin/rm -f */.deps/*.P config.cache storage/innobase/config.cache mysql-*.tar.gz
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/autorun.sh"
|
||||
|
||||
CC=ccc CFLAGS="-fast" CXX=cxx CXXFLAGS="-fast -noexceptions -nortti" ./configure --prefix=/usr/local/mysql --disable-shared --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-non_shared --with-client-ldflags=-non_shared --without-extra-tools --disable-dependency-tracking
|
||||
|
||||
make -j2
|
||||
find . -name ".deps" | xargs rm -r
|
||||
make
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
find . -name ".deps" | xargs rm -r
|
||||
bin/mysqladmin shutdown
|
||||
sur make install
|
||||
if [ $? = 0 ]
|
||||
then
|
||||
scripts/make_binary_distribution
|
||||
fi
|
||||
make test
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
# This should give better performance by compiling many files at once, but
|
||||
# according to our benchmarks there isn't any real difference.
|
||||
|
||||
pwd=`pwd`
|
||||
for i in */make-ccc
|
||||
do
|
||||
cd `dirname $i`
|
||||
make-ccc
|
||||
cd $pwd
|
||||
done
|
||||
cd sql
|
||||
rm mysqld .deps/*.P
|
||||
make mysqld
|
||||
cd $pwd
|
@ -4,7 +4,7 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$amd64_cflags $debug_cflags $valgrind_flags"
|
||||
extra_configs="$amd64_configs $debug_configs $max_configs"
|
||||
extra_configs="$amd64_configs $debug_configs $valgrind_configs $max_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
||||
|
@ -29,6 +29,6 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
||||
c_warnings="-Wall -Wcheck -wd161,444,279,810,981,1292,1469,1572"
|
||||
cxx_warnings="$c_warnings -wd869,874"
|
||||
base_cxxflags="-fno-exceptions -fno-rtti"
|
||||
extra_configs="$pentium_configs $debug_configs"
|
||||
extra_configs="$pentium_configs $debug_configs $valgrind_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -4,7 +4,7 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
||||
extra_configs="$pentium_configs $debug_configs $max_configs"
|
||||
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
||||
|
@ -4,7 +4,7 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags $valgrind_flags"
|
||||
extra_configs="$pentium_configs $debug_configs $max_no_ndb_configs"
|
||||
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_no_ndb_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
||||
|
@ -4,7 +4,7 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags"
|
||||
extra_configs="$pentium_configs $debug_configs $max_configs"
|
||||
extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
||||
|
@ -37,6 +37,3 @@ uninstall-local:
|
||||
@RM@ -f $(DESTDIR)$(infodir)/mysql.info ; \
|
||||
@RM@ -f $(DESTDIR)$(pkgdatadir)/ChangeLog ; \
|
||||
fi
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -154,8 +154,8 @@ test-bt:
|
||||
-if [ -e bin/ndbd -o -e storage/ndb/src/kernel/ndbd ] ; then \
|
||||
cd mysql-test ; \
|
||||
MTR_BUILD_THREAD=auto \
|
||||
@PERL@ ./mysql-test-run.pl --comment=ndb+rpl_ndb+ps --force --timer \
|
||||
--ps-protocol --mysqld=--binlog-format=row --suite=ndb,rpl_ndb $(EXP) ; \
|
||||
@PERL@ ./mysql-test-run.pl --comment=ndb+ps --force --timer \
|
||||
--ps-protocol --mysqld=--binlog-format=row --suite=ndb $(EXP) ; \
|
||||
MTR_BUILD_THREAD=auto \
|
||||
@PERL@ ./mysql-test-run.pl --comment=ndb --force --timer \
|
||||
--with-ndbcluster-only $(EXP) ; \
|
||||
@ -328,6 +328,3 @@ do_abi_check:
|
||||
@DIFF@ -w $$file.pp $(top_builddir)/abi_check.out; \
|
||||
@RM@ $(top_builddir)/abi_check.out; \
|
||||
done
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -124,6 +124,3 @@ link_sources:
|
||||
rm -f $(srcdir)/my_user.c; \
|
||||
@LN_CP_F@ $(top_srcdir)/sql-common/my_user.c my_user.c;
|
||||
echo timestamp > link_sources;
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -59,8 +59,6 @@ static char *server_version= NULL;
|
||||
/* Array of options to pass to libemysqld */
|
||||
#define MAX_SERVER_ARGS 64
|
||||
|
||||
void* sql_alloc(unsigned size); // Don't use mysqld alloc for these
|
||||
void sql_element_free(void *ptr);
|
||||
#include "sql_string.h"
|
||||
|
||||
extern "C" {
|
||||
@ -2318,8 +2316,10 @@ static bool add_line(String &buffer,char *line,char *in_string,
|
||||
|
||||
#ifdef HAVE_READLINE
|
||||
|
||||
C_MODE_START
|
||||
static char *new_command_generator(const char *text, int);
|
||||
extern "C" char **new_mysql_completion (const char *text, int start, int end);
|
||||
static char **new_mysql_completion(const char *text, int start, int end);
|
||||
C_MODE_END
|
||||
|
||||
/*
|
||||
Tell the GNU Readline library how to complete. We want to try to complete
|
||||
@ -2451,9 +2451,9 @@ static void initialize_readline (char *name)
|
||||
array of matches, or NULL if there aren't any.
|
||||
*/
|
||||
|
||||
char **new_mysql_completion (const char *text,
|
||||
int start __attribute__((unused)),
|
||||
int end __attribute__((unused)))
|
||||
static char **new_mysql_completion(const char *text,
|
||||
int start __attribute__((unused)),
|
||||
int end __attribute__((unused)))
|
||||
{
|
||||
if (!status.batch && !quick)
|
||||
#if defined(USE_NEW_READLINE_INTERFACE)
|
||||
@ -4963,17 +4963,3 @@ static int com_prompt(String *buffer, char *line)
|
||||
tee_fprintf(stdout, "PROMPT set to '%s'\n", current_prompt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
/* Keep sql_string library happy */
|
||||
|
||||
void *sql_alloc(size_t Size)
|
||||
{
|
||||
return my_malloc(Size,MYF(MY_WME));
|
||||
}
|
||||
|
||||
void sql_element_free(void *ptr)
|
||||
{
|
||||
my_free(ptr,MYF(0));
|
||||
}
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
|
@ -736,9 +736,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
|
||||
|
||||
switch (ev_type) {
|
||||
case QUERY_EVENT:
|
||||
if (strncmp(((Query_log_event*)ev)->query, "BEGIN", 5) &&
|
||||
strncmp(((Query_log_event*)ev)->query, "COMMIT", 6) &&
|
||||
strncmp(((Query_log_event*)ev)->query, "ROLLBACK", 8) &&
|
||||
if (!((Query_log_event*)ev)->is_trans_keyword() &&
|
||||
shall_skip_database(((Query_log_event*)ev)->db))
|
||||
goto end;
|
||||
if (opt_base64_output_mode == BASE64_OUTPUT_ALWAYS)
|
||||
|
@ -77,11 +77,17 @@
|
||||
static int setenv(const char *name, const char *value, int overwrite);
|
||||
#endif
|
||||
|
||||
C_MODE_START
|
||||
static sig_handler signal_handler(int sig);
|
||||
static my_bool get_one_option(int optid, const struct my_option *,
|
||||
char *argument);
|
||||
C_MODE_END
|
||||
|
||||
enum {
|
||||
OPT_SKIP_SAFEMALLOC=OPT_MAX_CLIENT_OPTION,
|
||||
OPT_PS_PROTOCOL, OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
|
||||
OPT_MAX_CONNECT_RETRIES, OPT_MAX_CONNECTIONS, OPT_MARK_PROGRESS,
|
||||
OPT_LOG_DIR, OPT_TAIL_LINES, OPT_RESULT_FORMAT_VERSION,
|
||||
OPT_LOG_DIR, OPT_TAIL_LINES, OPT_RESULT_FORMAT_VERSION
|
||||
};
|
||||
|
||||
static int record= 0, opt_sleep= -1;
|
||||
@ -462,7 +468,6 @@ void log_msg(const char *fmt, ...)
|
||||
VAR* var_from_env(const char *, const char *);
|
||||
VAR* var_init(VAR* v, const char *name, int name_len, const char *val,
|
||||
int val_len);
|
||||
void var_free(void* v);
|
||||
VAR* var_get(const char *var_name, const char** var_name_end,
|
||||
my_bool raw, my_bool ignore_not_existing);
|
||||
void eval_expr(VAR* v, const char *p, const char** p_end);
|
||||
@ -1914,6 +1919,8 @@ static void strip_parentheses(struct st_command *command)
|
||||
}
|
||||
|
||||
|
||||
C_MODE_START
|
||||
|
||||
static uchar *get_var_key(const uchar* var, size_t *len,
|
||||
my_bool __attribute__((unused)) t)
|
||||
{
|
||||
@ -1924,6 +1931,16 @@ static uchar *get_var_key(const uchar* var, size_t *len,
|
||||
}
|
||||
|
||||
|
||||
static void var_free(void *v)
|
||||
{
|
||||
my_free(((VAR*) v)->str_val, MYF(MY_WME));
|
||||
if (((VAR*)v)->alloced)
|
||||
my_free(v, MYF(MY_WME));
|
||||
}
|
||||
|
||||
C_MODE_END
|
||||
|
||||
|
||||
VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
|
||||
int val_len)
|
||||
{
|
||||
@ -1966,14 +1983,6 @@ VAR *var_init(VAR *v, const char *name, int name_len, const char *val,
|
||||
}
|
||||
|
||||
|
||||
void var_free(void *v)
|
||||
{
|
||||
my_free(((VAR*) v)->str_val, MYF(MY_WME));
|
||||
if (((VAR*)v)->alloced)
|
||||
my_free(v, MYF(MY_WME));
|
||||
}
|
||||
|
||||
|
||||
VAR* var_from_env(const char *name, const char *def_val)
|
||||
{
|
||||
const char *tmp;
|
||||
@ -6070,8 +6079,7 @@ void read_embedded_server_arguments(const char *name)
|
||||
|
||||
|
||||
static my_bool
|
||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
char *argument)
|
||||
get_one_option(int optid, const struct my_option *, char *argument)
|
||||
{
|
||||
switch(optid) {
|
||||
case '#':
|
||||
|
@ -24,13 +24,6 @@
|
||||
#include <m_string.h>
|
||||
#include <m_ctype.h>
|
||||
#include <mysql_com.h>
|
||||
/*
|
||||
The following extern declarations are ok as these are interface functions
|
||||
required by the string function
|
||||
*/
|
||||
|
||||
extern void sql_alloc(size_t size);
|
||||
extern void sql_element_free(void *ptr);
|
||||
|
||||
#include "sql_string.h"
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
# Copyright (C) 2010 Sun Microsystems, Inc
|
||||
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -15,6 +15,9 @@
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# This file includes FreeBSD specific options and quirks, related to system checks
|
||||
#Legacy option, maybe not needed anymore , taken as is from autotools build
|
||||
ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
|
||||
|
||||
# Should not be needed any more, but kept for easy resurrection if needed
|
||||
# #Legacy option, maybe not needed anymore , taken as is from autotools build
|
||||
# ADD_DEFINITIONS(-DNET_RETRY_COUNT=1000000)
|
||||
|
||||
ADD_DEFINITIONS(-DHAVE_BROKEN_REALPATH)
|
||||
|
@ -19,6 +19,3 @@
|
||||
|
||||
SUBDIRS= @readline_basedir@
|
||||
DIST_SUBDIRS= libedit readline
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -95,10 +95,9 @@ static char break_chars[] = { ' ', '\t', '\n', '"', '\\', '\'', '`', '@', '$',
|
||||
char *
|
||||
fn_tilde_expand(const char *txt)
|
||||
{
|
||||
struct passwd pwres, *pass;
|
||||
struct passwd *pass;
|
||||
char *temp;
|
||||
size_t len = 0;
|
||||
char pwbuf[1024];
|
||||
|
||||
if (txt[0] != '~')
|
||||
return (strdup(txt));
|
||||
|
@ -32,6 +32,3 @@ noinst_HEADERS = readline.h chardefs.h keymaps.h \
|
||||
EXTRA_DIST= emacs_keymap.c vi_keymap.c CMakeLists.txt
|
||||
|
||||
DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -318,7 +318,9 @@ _rl_input_available ()
|
||||
return (_kbhit ());
|
||||
#endif
|
||||
|
||||
#if !defined (HAVE_SELECT)
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -282,6 +282,8 @@
|
||||
#cmakedefine HAVE_NETINET_IN6_H 1
|
||||
#cmakedefine HAVE_IPV6 1
|
||||
#cmakedefine ss_family @ss_family@
|
||||
#cmakedefine HAVE_SOCKADDR_IN_SIN_LEN 1
|
||||
#cmakedefine HAVE_SOCKADDR_IN6_SIN6_LEN 1
|
||||
#cmakedefine HAVE_TIMESPEC_TS_SEC 1
|
||||
#cmakedefine STRUCT_DIRENT_HAS_D_INO 1
|
||||
#cmakedefine STRUCT_DIRENT_HAS_D_NAMLEN 1
|
||||
|
@ -54,6 +54,15 @@ IF(NOT SYSTEM_TYPE)
|
||||
ENDIF()
|
||||
|
||||
|
||||
# Always enable -Wall for gnu C/C++
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unused-parameter")
|
||||
ENDIF()
|
||||
IF(CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# MySQL "canonical" GCC flags. At least -fno-rtti flag affects
|
||||
# ABI and cannot be simply removed.
|
||||
@ -1000,6 +1009,21 @@ IF(NOT HAVE_SOCKADDR_STORAGE_SS_FAMILY)
|
||||
SET(ss_family __ss_family)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
#
|
||||
# Check if struct sockaddr_in::sin_len is available.
|
||||
#
|
||||
|
||||
CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in" sin_len
|
||||
"${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SOCKADDR_IN_SIN_LEN)
|
||||
|
||||
#
|
||||
# Check if struct sockaddr_in6::sin6_len is available.
|
||||
#
|
||||
|
||||
CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in6" sin6_len
|
||||
"${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_SOCKADDR_IN6_SIN6_LEN)
|
||||
|
||||
SET(CMAKE_EXTRA_INCLUDE_FILES)
|
||||
|
||||
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_INO)
|
||||
|
103
configure.in
103
configure.in
@ -1,7 +1,7 @@
|
||||
dnl -*- ksh -*-
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
# Copyright (C) 2008-2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -19,15 +19,16 @@ dnl Process this file with autoconf to produce a configure script.
|
||||
# Minimum Autoconf version required.
|
||||
AC_PREREQ(2.59)
|
||||
|
||||
# Various people throughout the community may parse configure.in to
|
||||
# get the MySQL version from the source branch. If the formatting
|
||||
# of this line is going to be changed, please announce the change to
|
||||
# internals@lists.mysql.com in advance of pushing the change.
|
||||
#
|
||||
# Remember to also update version.c in ndb.
|
||||
# When changing major version number please also check switch statement
|
||||
# in client/mysqlbinlog.cc:check_master_version().
|
||||
dnl Various people throughout the community may parse configure.in to
|
||||
dnl get the MySQL version from the source branch. If the formatting
|
||||
dnl of this line is going to be changed, please announce the change to
|
||||
dnl internals@lists.mysql.com in advance of pushing the change.
|
||||
dnl
|
||||
dnl When changing the major version number please also check the switch
|
||||
dnl statement in mysqlbinlog::check_master_version(). You may also need
|
||||
dnl to update version.c in ndb.
|
||||
AC_INIT([MySQL Server], [5.5.5-m3], [], [mysql])
|
||||
|
||||
AC_CONFIG_SRCDIR([sql/mysqld.cc])
|
||||
AC_CANONICAL_SYSTEM
|
||||
# USTAR format gives us the possibility to store longer path names in
|
||||
@ -1012,6 +1013,66 @@ else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Check if struct sockaddr_in::sin_len is available
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
AC_CACHE_CHECK(
|
||||
[if sockaddr_in::sin_len is available],
|
||||
mysql_cv_have_sockaddr_in_sin_len,
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
],
|
||||
[unsigned int i = sizeof(((struct sockaddr_in *) 0)->sin_len)],
|
||||
mysql_cv_have_sockaddr_in_sin_len=yes,
|
||||
mysql_cv_have_sockaddr_in_sin_len=no))
|
||||
|
||||
if test "$mysql_cv_have_sockaddr_in_sin_len" = "yes"; then
|
||||
AC_DEFINE(
|
||||
[HAVE_SOCKADDR_IN_SIN_LEN],
|
||||
[1],
|
||||
[If sockaddr_in::sin_len is available])
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------------
|
||||
# Check if struct sockaddr_in6::sin6_len is available
|
||||
#--------------------------------------------------------------------------
|
||||
|
||||
AC_CACHE_CHECK(
|
||||
[if sockaddr_in6::sin6_len is available],
|
||||
mysql_cv_have_sockaddr_in6_sin6_len,
|
||||
AC_TRY_COMPILE(
|
||||
[
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN6_H
|
||||
#include <netinet/in6.h>
|
||||
#endif
|
||||
],
|
||||
[unsigned int i = sizeof(((struct sockaddr_in6 *) 0)->sin6_len)],
|
||||
mysql_cv_have_sockaddr_in6_sin6_len=yes,
|
||||
mysql_cv_have_sockaddr_in6_sin6_len=no))
|
||||
|
||||
if test "$mysql_cv_have_sockaddr_in_sin6_len" = "yes"; then
|
||||
AC_DEFINE(
|
||||
[HAVE_SOCKADDR_IN6_SIN6_LEN],
|
||||
[1],
|
||||
[If sockaddr_in6::sin6_len is available])
|
||||
fi
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for TCP wrapper support
|
||||
#--------------------------------------------------------------------
|
||||
@ -1235,14 +1296,22 @@ case $SYSTEM_TYPE in
|
||||
fi
|
||||
;;
|
||||
*freebsd*|*dragonfly*)
|
||||
AC_MSG_WARN([Adding fix for interrupted reads])
|
||||
dnl These dependencies have not really been checked for some time
|
||||
OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'`
|
||||
if test "$OSVERSION" -gt "480100" && \
|
||||
if test "$OSVERSION" -gt "600000"
|
||||
then
|
||||
# Post user-level threads, MYSQLD_NET_RETRY_COUNT is not needed any more
|
||||
AC_MSG_WARN([Adding fix for broken realpath])
|
||||
CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
|
||||
CXXFLAGS="$CXXFLAGS -DHAVE_BROKEN_REALPATH"
|
||||
elif test "$OSVERSION" -gt "480100" && \
|
||||
test "$OSVERSION" -lt "500000" || \
|
||||
test "$OSVERSION" -gt "500109"
|
||||
then
|
||||
AC_MSG_WARN([Adding fix for interrupted reads])
|
||||
CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000"
|
||||
else
|
||||
AC_MSG_WARN([Adding fix for interrupted reads and broken realpath])
|
||||
CFLAGS="$CFLAGS -DHAVE_BROKEN_REALPATH"
|
||||
CXXFLAGS="$CXXFLAGS -DMYSQLD_NET_RETRY_COUNT=1000000 -DHAVE_BROKEN_REALPATH"
|
||||
fi
|
||||
@ -1844,6 +1913,17 @@ else
|
||||
CXXFLAGS="$OPTIMIZE_CXXFLAGS $CXXFLAGS"
|
||||
fi
|
||||
|
||||
AC_ARG_WITH([valgrind],
|
||||
[AS_HELP_STRING([--with-valgrind],
|
||||
[Valgrind instrumentation @<:@default=no@:>@])],
|
||||
[], [with_valgrind=no])
|
||||
|
||||
if test "$with_valgrind" != "no"
|
||||
then
|
||||
AC_CHECK_HEADERS([valgrind/valgrind.h valgrind/memcheck.h],
|
||||
[AC_DEFINE([HAVE_VALGRIND], [1], [Define for Valgrind support])])
|
||||
fi
|
||||
|
||||
# Debug Sync Facility. NOTE: depends on 'with_debug'. Must be behind it.
|
||||
AC_MSG_CHECKING(if Debug Sync Facility should be enabled.)
|
||||
AC_ARG_ENABLE(debug_sync,
|
||||
@ -3121,6 +3201,7 @@ esac
|
||||
|
||||
AC_SUBST([RDTSC_SPARC_ASSEMBLY])
|
||||
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Output results
|
||||
#--------------------------------------------------------------------
|
||||
|
@ -55,6 +55,3 @@ EXTRA_DIST = CMakeLists.txt
|
||||
|
||||
perror.o: perror.c
|
||||
$(COMPILE) @ndbcluster_includes@ $(LM_CFLAGS) -c $<
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -686,7 +686,7 @@ static ha_checksum checksum_format_specifier(const char* msg)
|
||||
case 'u':
|
||||
case 'x':
|
||||
case 's':
|
||||
chksum= my_checksum(chksum, start, (uint) (p + 1 - start));
|
||||
chksum= my_checksum(chksum, (uchar*) start, (uint) (p + 1 - start));
|
||||
start= 0; /* Not in format specifier anymore */
|
||||
break;
|
||||
|
||||
|
@ -269,7 +269,7 @@ int main(int argc,char *argv[])
|
||||
HA_ERRORS *ha_err_ptr;
|
||||
for (code=1 ; code < sys_nerr ; code++)
|
||||
{
|
||||
if (sys_errlist[code][0])
|
||||
if (sys_errlist[code] && sys_errlist[code][0])
|
||||
{ /* Skip if no error-text */
|
||||
printf("%3d = %s\n",code,sys_errlist[code]);
|
||||
}
|
||||
|
@ -1,5 +1,2 @@
|
||||
SUBDIRS = taocrypt src testsuite
|
||||
EXTRA_DIST = CMakeLists.txt
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -6,7 +6,3 @@ libyassl_la_SOURCES = buffer.cpp cert_wrapper.cpp crypto_wrapper.cpp \
|
||||
template_instnt.cpp timer.cpp yassl_imp.cpp yassl_error.cpp yassl_int.cpp
|
||||
EXTRA_DIST = $(wildcard ../include/*.hpp) $(wildcard ../include/openssl/*.h)
|
||||
AM_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
||||
|
@ -1,5 +1,2 @@
|
||||
SUBDIRS = src test benchmark
|
||||
EXTRA_DIST = CMakeLists.txt $(wildcard mySTL/*.hpp)
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -4,6 +4,3 @@ benchmark_SOURCES = benchmark.cpp
|
||||
benchmark_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
benchmark_CXXFLAGS = -DYASSL_PURE_C
|
||||
EXTRA_DIST = benchmark.dsp rsa1024.der dh1024.der dsa1024.der make.bat
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -60,7 +60,7 @@ static int __cxa_pure_virtual() __attribute__((noinline, used));
|
||||
static int __cxa_pure_virtual()
|
||||
{
|
||||
// oops, pure virtual called!
|
||||
assert("Pure virtual method called." == "Aborted");
|
||||
assert(!"Pure virtual method called. Aborted");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,3 @@ libtaocrypt_la_SOURCES = aes.cpp aestables.cpp algebra.cpp arc4.cpp \
|
||||
libtaocrypt_la_CXXFLAGS = @yassl_taocrypt_extra_cxxflags@ -DYASSL_PURE_C
|
||||
|
||||
EXTRA_DIST = $(wildcard ../include/*.hpp)
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
||||
|
@ -4,6 +4,3 @@ test_SOURCES = test.cpp
|
||||
test_LDADD = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
test_CXXFLAGS = -DYASSL_PURE_C
|
||||
EXTRA_DIST = make.bat
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -8,7 +8,3 @@ testsuite_CXXFLAGS = -DYASSL_PURE_C -DYASSL_PREFIX -DNO_MAIN_DRIVER
|
||||
testsuite_LDADD = $(top_builddir)/extra/yassl/src/libyassl.la \
|
||||
$(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
|
||||
EXTRA_DIST = testsuite.dsp test.hpp input quit make.bat
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
||||
|
@ -96,6 +96,3 @@ endif
|
||||
|
||||
probes_mysql_nodtrace.h: $(DTRACEPROVIDER)
|
||||
@PERL@ $(top_srcdir)/scripts/dheadgen.pl -f $(DTRACEPROVIDER) > $@
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -127,9 +127,6 @@ extern size_t bcmp(const uchar *s1,const uchar *s2,size_t len);
|
||||
extern size_t my_bcmp(const uchar *s1,const uchar *s2,size_t len);
|
||||
#undef bcmp
|
||||
#define bcmp(A,B,C) my_bcmp((A),(B),(C))
|
||||
#define bzero_if_purify(A,B) bzero(A,B)
|
||||
#else
|
||||
#define bzero_if_purify(A,B)
|
||||
#endif /* HAVE_purify */
|
||||
|
||||
#ifndef bmove512
|
||||
|
@ -23,6 +23,10 @@
|
||||
#define ALLOC_MAX_BLOCK_TO_DROP 4096
|
||||
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct st_used_mem
|
||||
{ /* struct for once_alloc (block) */
|
||||
struct st_used_mem *next; /* Next block in use */
|
||||
@ -48,4 +52,9 @@ typedef struct st_mem_root
|
||||
|
||||
void (*error_handler)(void);
|
||||
} MEM_ROOT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -562,6 +562,8 @@ typedef ulong ha_rows;
|
||||
#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2)
|
||||
|
||||
/* invalidator function reference for Query Cache */
|
||||
C_MODE_START
|
||||
typedef void (* invalidator_by_filename)(const char * filename);
|
||||
C_MODE_END
|
||||
|
||||
#endif /* _my_base_h */
|
||||
|
@ -73,6 +73,11 @@
|
||||
#define C_MODE_END
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define CPP_UNNAMED_NS_START namespace {
|
||||
#define CPP_UNNAMED_NS_END }
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <my_config.h>
|
||||
#elif defined(__NETWARE__)
|
||||
@ -863,7 +868,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
#endif
|
||||
|
||||
#ifndef OS_FILE_LIMIT
|
||||
#define OS_FILE_LIMIT 65535
|
||||
#define OS_FILE_LIMIT UINT_MAX
|
||||
#endif
|
||||
|
||||
/* #define EXT_IN_LIBNAME */
|
||||
@ -1070,6 +1075,17 @@ typedef long long my_ptrdiff_t;
|
||||
#define MY_DIV_UP(A, B) (((A) + (B) - 1) / (B))
|
||||
#define MY_ALIGNED_BYTE_ARRAY(N, S, T) T N[MY_DIV_UP(S, sizeof(T))]
|
||||
|
||||
#ifdef __cplusplus
|
||||
template <size_t sz> struct Aligned_char_array
|
||||
{
|
||||
union {
|
||||
void *v; // Ensures alignment.
|
||||
char arr[sz]; // The actual buffer.
|
||||
} u;
|
||||
void* arr() { return &u.arr[0]; }
|
||||
};
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*
|
||||
Custom version of standard offsetof() macro which can be used to get
|
||||
offsets of members in class for non-POD types (according to the current
|
||||
|
@ -712,7 +712,6 @@ extern my_bool my_thread_init(void);
|
||||
extern void my_thread_end(void);
|
||||
extern const char *my_thread_name(void);
|
||||
extern my_thread_id my_thread_dbug_id(void);
|
||||
extern int pthread_no_free(void *);
|
||||
extern int pthread_dummy(int);
|
||||
|
||||
/* All thread specific variables are in the following struct */
|
||||
|
@ -28,6 +28,19 @@ typedef struct my_aio_result {
|
||||
} my_aio_result;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VALGRIND
|
||||
# include <valgrind/memcheck.h>
|
||||
# define MEM_UNDEFINED(a,len) VALGRIND_MAKE_MEM_UNDEFINED(a,len)
|
||||
# define MEM_NOACCESS(a,len) VALGRIND_MAKE_MEM_NOACCESS(a,len)
|
||||
# define MEM_CHECK_ADDRESSABLE(a,len) VALGRIND_CHECK_MEM_IS_ADDRESSABLE(a,len)
|
||||
# define MEM_CHECK_DEFINED(a,len) VALGRIND_CHECK_MEM_IS_DEFINED(a,len)
|
||||
#else /* HAVE_VALGRIND */
|
||||
# define MEM_UNDEFINED(a,len) ((void) 0)
|
||||
# define MEM_NOACCESS(a,len) ((void) 0)
|
||||
# define MEM_CHECK_ADDRESSABLE(a,len) ((void) 0)
|
||||
# define MEM_CHECK_DEFINED(a,len) ((void) 0)
|
||||
#endif /* HAVE_VALGRIND */
|
||||
|
||||
#ifndef THREAD
|
||||
extern int NEAR my_errno; /* Last error in mysys */
|
||||
#else
|
||||
@ -41,8 +54,6 @@ extern int NEAR my_errno; /* Last error in mysys */
|
||||
#include <malloc.h> /*for alloca*/
|
||||
#endif
|
||||
|
||||
#define MYSYS_PROGRAM_USES_CURSES() { error_handler_hook = my_message_curses; mysys_uses_curses=1; }
|
||||
#define MYSYS_PROGRAM_DONT_USE_CURSES() { error_handler_hook = my_message_no_curses; mysys_uses_curses=0;}
|
||||
#define MY_INIT(name); { my_progname= name; my_init(); }
|
||||
|
||||
/**
|
||||
@ -156,7 +167,7 @@ extern int NEAR my_errno; /* Last error in mysys */
|
||||
#define my_memdup(A,B,C) _my_memdup((A),(B), __FILE__,__LINE__,C)
|
||||
#define my_strdup(A,C) _my_strdup((A), __FILE__,__LINE__,C)
|
||||
#define my_strndup(A,B,C) _my_strndup((A),(B),__FILE__,__LINE__,C)
|
||||
#define TRASH(A,B) bfill(A, B, 0x8F)
|
||||
#define TRASH(A,B) do { bfill(A, B, 0x8F); MEM_UNDEFINED(A, B); } while (0)
|
||||
#define QUICK_SAFEMALLOC sf_malloc_quick=1
|
||||
#define NORMAL_SAFEMALLOC sf_malloc_quick=0
|
||||
extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick;
|
||||
@ -184,7 +195,7 @@ extern char *my_strndup(const char *from, size_t length,
|
||||
#define CALLER_INFO_PROTO /* nothing */
|
||||
#define CALLER_INFO /* nothing */
|
||||
#define ORIG_CALLER_INFO /* nothing */
|
||||
#define TRASH(A,B) /* nothing */
|
||||
#define TRASH(A,B) do{MEM_CHECK_ADDRESSABLE(A,B);MEM_UNDEFINED(A,B);} while (0)
|
||||
#endif
|
||||
|
||||
#if defined(ENABLED_DEBUG_SYNC)
|
||||
@ -272,7 +283,7 @@ extern int NEAR my_umask_dir,
|
||||
NEAR my_recived_signals, /* Signals we have got */
|
||||
NEAR my_safe_to_handle_signal, /* Set when allowed to SIGTSTP */
|
||||
NEAR my_dont_interrupt; /* call remember_intr when set */
|
||||
extern my_bool NEAR mysys_uses_curses, my_use_symdir;
|
||||
extern my_bool NEAR my_use_symdir;
|
||||
extern size_t sf_malloc_cur_memory, sf_malloc_max_memory;
|
||||
|
||||
extern ulong my_default_record_cache_size;
|
||||
@ -669,7 +680,6 @@ extern int nt_share_delete(const char *name,myf MyFlags);
|
||||
|
||||
#ifdef _WIN32
|
||||
/* Windows-only functions (CRT equivalents)*/
|
||||
extern File my_sopen(const char *path, int oflag, int shflag, int pmode);
|
||||
extern HANDLE my_get_osfhandle(File fd);
|
||||
extern void my_osmaperr(unsigned long last_error);
|
||||
#endif
|
||||
@ -698,8 +708,7 @@ extern int my_error_register(const char** (*get_errmsgs) (),
|
||||
int first, int last);
|
||||
extern const char **my_error_unregister(int first, int last);
|
||||
extern void my_message(uint my_err, const char *str,myf MyFlags);
|
||||
extern void my_message_no_curses(uint my_err, const char *str,myf MyFlags);
|
||||
extern void my_message_curses(uint my_err, const char *str,myf MyFlags);
|
||||
extern void my_message_stderr(uint my_err, const char *str, myf MyFlags);
|
||||
extern my_bool my_basic_init(void);
|
||||
extern my_bool my_init(void);
|
||||
extern void my_end(int infoflag);
|
||||
|
@ -593,30 +593,37 @@ void mysql_query_cache_invalidate4(MYSQL_THD thd,
|
||||
const char *key, unsigned int key_length,
|
||||
int using_trx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
/**
|
||||
Provide a handler data getter to simplify coding
|
||||
*/
|
||||
inline
|
||||
void *
|
||||
thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton)
|
||||
{
|
||||
return *thd_ha_data(thd, hton);
|
||||
}
|
||||
void *thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton);
|
||||
|
||||
|
||||
/**
|
||||
Provide a handler data setter to simplify coding
|
||||
|
||||
@details
|
||||
Set ha_data pointer (storage engine per-connection information).
|
||||
|
||||
To avoid unclean deactivation (uninstall) of storage engine plugin
|
||||
in the middle of transaction, additional storage engine plugin
|
||||
lock is acquired.
|
||||
|
||||
If ha_data is not null and storage engine plugin was not locked
|
||||
by thd_set_ha_data() in this connection before, storage engine
|
||||
plugin gets locked.
|
||||
|
||||
If ha_data is null and storage engine plugin was locked by
|
||||
thd_set_ha_data() in this connection before, storage engine
|
||||
plugin lock gets released.
|
||||
|
||||
If handlerton::close_connection() didn't reset ha_data, server does
|
||||
it immediately after calling handlerton::close_connection().
|
||||
*/
|
||||
inline
|
||||
void
|
||||
thd_set_ha_data(const MYSQL_THD thd, const struct handlerton *hton,
|
||||
const void *ha_data)
|
||||
{
|
||||
*thd_ha_data(thd, hton)= (void*) ha_data;
|
||||
void thd_set_ha_data(MYSQL_THD thd, const struct handlerton *hton,
|
||||
const void *ha_data);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -165,3 +165,6 @@ void thd_get_xid(const void* thd, MYSQL_XID *xid);
|
||||
void mysql_query_cache_invalidate4(void* thd,
|
||||
const char *key, unsigned int key_length,
|
||||
int using_trx);
|
||||
void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
|
||||
void thd_set_ha_data(void* thd, const struct handlerton *hton,
|
||||
const void *ha_data);
|
||||
|
@ -307,6 +307,16 @@ typedef struct st_net {
|
||||
/** Client library sqlstate buffer. Set along with the error message. */
|
||||
char sqlstate[SQLSTATE_LENGTH+1];
|
||||
void *extension;
|
||||
#if defined(MYSQL_SERVER) && !defined(EMBEDDED_LIBRARY)
|
||||
/*
|
||||
Controls whether a big packet should be skipped.
|
||||
|
||||
Initially set to FALSE by default. Unauthenticated sessions must have
|
||||
this set to FALSE so that the server can't be tricked to read packets
|
||||
indefinitely.
|
||||
*/
|
||||
my_bool skip_big_packet;
|
||||
#endif
|
||||
} NET;
|
||||
|
||||
|
||||
|
@ -113,6 +113,3 @@ do-lib-dist:
|
||||
echo ' $$(AR) r $$@ $$?' >>$$dir/Makefile; \
|
||||
gtar cvzf $$dir.tar.gz $$dir; \
|
||||
cd $$dir; gmake
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -56,7 +56,7 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
|
||||
my_create.lo my_delete.lo mf_tempfile.lo my_open.lo \
|
||||
my_file.lo my_read.lo my_write.lo errors.lo \
|
||||
my_error.lo my_getwd.lo my_div.lo \
|
||||
mf_pack.lo my_messnc.lo mf_dirname.lo mf_fn_ext.lo\
|
||||
mf_pack.lo my_mess.lo mf_dirname.lo mf_fn_ext.lo\
|
||||
mf_wcomp.lo typelib.lo safemalloc.lo my_alloc.lo \
|
||||
mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \
|
||||
my_symlink.lo my_fstream.lo mf_arr_appstr.lo \
|
||||
@ -116,6 +116,3 @@ conf_to_src_LDADD=
|
||||
#force static linking of conf_to_src - essential when linking against
|
||||
#custom installation of libc
|
||||
conf_to_src_LDFLAGS=@NOINST_LDFLAGS@
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -44,6 +44,3 @@ link_sources:
|
||||
done; \
|
||||
done
|
||||
echo timestamp > link_sources
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -234,6 +234,3 @@ link_sources:
|
||||
clean-local:
|
||||
rm -f `echo $(sqlsources) $(libmysqlsources) $(sqlstoragesources) $(storagesources) | sed "s;\.lo;.c;g"`; \
|
||||
rm -f client_settings.h
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -50,6 +50,3 @@ mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD)
|
||||
|
||||
mysql_client_test_embedded_LINK = $(CXXLINK)
|
||||
nodist_mysql_client_test_embedded_SOURCES = mysql_client_test.c
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -953,7 +953,8 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
|
||||
server_field.type <= (int) MYSQL_TYPE_BLOB) ?
|
||||
server_field.length / item->collation.collation->mbminlen :
|
||||
server_field.length / item->collation.collation->mbmaxlen;
|
||||
client_field->length= max_char_len * thd_cs->mbmaxlen;
|
||||
client_field->length= char_to_byte_length_safe(max_char_len,
|
||||
thd_cs->mbmaxlen);
|
||||
}
|
||||
client_field->type= server_field.type;
|
||||
client_field->flags= server_field.flags;
|
||||
|
@ -24,6 +24,3 @@ EXTRA_DIST = $(man1_MANS) $(man8_MANS) CMakeLists.txt
|
||||
# "make_win_*" are not needed in Unix binary packages,
|
||||
install-data-hook:
|
||||
rm -f $(DESTDIR)$(mandir)/man1/make_win_*
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -148,6 +148,3 @@ mtr:
|
||||
mysql-test-run:
|
||||
$(RM) -f mysql-test-run
|
||||
$(LN_S) mysql-test-run.pl mysql-test-run
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -91,3 +91,5 @@ parts.partition_mgm_lc1_ndb # joro : NDB tests marked as experiment
|
||||
parts.partition_mgm_lc2_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_syntax_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
parts.partition_value_ndb # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
main.mysqlhotcopy_myisam # horst: due to bug#54129
|
||||
main.mysqlhotcopy_archive # horst: due to bug#54129
|
||||
|
@ -214,7 +214,7 @@ CREATE TABLE t5 (a int, PRIMARY KEY (a)) ENGINE=InnoDB;
|
||||
|
||||
# execute
|
||||
--error ER_DUP_ENTRY
|
||||
UPDATE t3,t4 SET t3.a=t4.a + bug27417(1);
|
||||
UPDATE t3,t4 SET t3.a = t4.a + bug27417(1) where t3.a = 1;
|
||||
|
||||
# check
|
||||
select count(*) from t1 /* must be 1 */;
|
||||
|
@ -149,7 +149,7 @@ SELECT * FROM t1 ORDER BY f3 LIMIT 20;
|
||||
--echo
|
||||
--echo * Show Slave Status *
|
||||
--echo
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical show slave status;
|
||||
--echo
|
||||
|
||||
@ -439,7 +439,7 @@ connection master;
|
||||
select * from t31;
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical show slave status;
|
||||
|
||||
#### Clean Up ####
|
||||
@ -499,7 +499,7 @@ INSERT INTO t10 () VALUES(1,@b1,DEFAULT,'Kyle',DEFAULT),
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -556,7 +556,7 @@ INSERT INTO t11 () VALUES(1,@b1,'Testing is fun','Kyle',DEFAULT),
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -699,7 +699,7 @@ SELECT c1,c3,hex(c4),c5,c6 FROM t14 ORDER BY c1;
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
#***************************
|
||||
|
||||
@ -765,7 +765,7 @@ SELECT c1,hex(c4),c5,c6,c7,c2 FROM t15 ORDER BY c1;
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
@ -842,7 +842,7 @@ SELECT c1,hex(c4),c5,c6,c7 FROM t16 ORDER BY c1;
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 # 41 #
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
68
mysql-test/extra/rpl_tests/rpl_record_compare.test
Normal file
68
mysql-test/extra/rpl_tests/rpl_record_compare.test
Normal file
@ -0,0 +1,68 @@
|
||||
|
||||
#
|
||||
# BUG#52868: Wrong handling of NULL value during update, replication out of sync
|
||||
#
|
||||
-- echo ## case #1 - last_null_bit_pos==0 in record_compare without X bit
|
||||
|
||||
-- source include/master-slave-reset.inc
|
||||
-- connection master
|
||||
|
||||
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1
|
||||
|
||||
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
|
||||
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
|
||||
-- disable_warnings
|
||||
UPDATE t1 SET c5 = 'a';
|
||||
-- enable_warnings
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- let $diff_table_1= master:test.t1
|
||||
-- let $diff_table_2= slave:test.t1
|
||||
-- source include/diff_tables.inc
|
||||
|
||||
--connection master
|
||||
DROP TABLE t1;
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- echo ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit
|
||||
-- echo ## (1 column less and no varchar)
|
||||
-- source include/master-slave-reset.inc
|
||||
-- connection master
|
||||
|
||||
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1
|
||||
|
||||
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
|
||||
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
|
||||
-- disable_warnings
|
||||
UPDATE t1 SET c5 = 'a';
|
||||
-- enable_warnings
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- let $diff_table_1= master:test.t1
|
||||
-- let $diff_table_2= slave:test.t1
|
||||
-- source include/diff_tables.inc
|
||||
|
||||
--connection master
|
||||
DROP TABLE t1;
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- echo ## case #2 - X bit is wrongly set.
|
||||
|
||||
-- source include/master-slave-reset.inc
|
||||
-- connection master
|
||||
|
||||
-- eval CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=$engine DEFAULT CHARSET= latin1
|
||||
INSERT INTO t1(c1) VALUES (10);
|
||||
INSERT INTO t1(c1) VALUES (NULL);
|
||||
UPDATE t1 SET c1= 0;
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- let $diff_table_1= master:test.t1
|
||||
-- let $diff_table_2= slave:test.t1
|
||||
-- source include/diff_tables.inc
|
||||
|
||||
-- connection master
|
||||
DROP TABLE t1;
|
||||
-- sync_slave_with_master
|
||||
|
||||
|
@ -139,7 +139,7 @@ sync_slave_with_master;
|
||||
--echo **** On Slave ****
|
||||
SELECT * FROM t2;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error> 41 <Master-Info-File>
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
|
||||
connection master;
|
||||
@ -151,7 +151,7 @@ INSERT INTO t4 VALUES (4);
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error> 41 <Master-Info-File>
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -165,7 +165,7 @@ INSERT INTO t5 VALUES (5,10,25);
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error> 41 <Master-Info-File>
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -179,7 +179,7 @@ INSERT INTO t6 VALUES (6,12,36);
|
||||
connection slave;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error> 41 <Master-Info-File>
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
@ -188,7 +188,7 @@ connection master;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
sync_slave_with_master;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error> 41 <Master-Info-File>
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 20 <Last_Error> 22 # 23 # 33 # 35 <Last_IO_Errno> 36 <Last_IO_Error> 38 <Last_SQL_Error>
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
|
||||
# Testing some tables extra field that can be null and cannot be null
|
||||
|
121
mysql-test/include/mysqlhotcopy.inc
Normal file
121
mysql-test/include/mysqlhotcopy.inc
Normal file
@ -0,0 +1,121 @@
|
||||
# Test of mysqlhotcopy (perl script)
|
||||
# Author: Horst Hunger
|
||||
# Created: 2010-05-10
|
||||
|
||||
--source include/not_windows.inc
|
||||
--source include/not_embedded.inc
|
||||
|
||||
if ($MYSQLHOTCOPY)
|
||||
{
|
||||
die due to missing mysqlhotcopy tool;
|
||||
}
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--disable_warnings
|
||||
DROP DATABASE IF EXISTS hotcopy_test;
|
||||
--enable_warnings
|
||||
CREATE DATABASE hotcopy_test;
|
||||
USE hotcopy_test;
|
||||
eval CREATE TABLE t1 (c1 int, c2 varchar(20)) ENGINE=$engine;
|
||||
eval CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=$engine;
|
||||
eval CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=$engine;
|
||||
|
||||
INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
|
||||
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_test
|
||||
|
||||
# backup into another database in the same directory
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
|
||||
USE hotcopy_save;
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
SELECT * FROM t3;
|
||||
|
||||
# restore data into the original database with mysqlhotcopy
|
||||
if(`SELECT engine= 'MyISAM' FROM information_schema.tables WHERE table_name='t1'`)
|
||||
{
|
||||
USE hotcopy_test;
|
||||
DELETE FROM t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --addtodest -S $MASTER_MYSOCK -u root hotcopy_save hotcopy_test
|
||||
|
||||
USE hotcopy_save;
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
SELECT * FROM t3;
|
||||
}
|
||||
|
||||
USE hotcopy_test;
|
||||
DROP TABLE t2;
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_test
|
||||
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --addtodest -S $MASTER_MYSOCK -u root hotcopy_save hotcopy_test
|
||||
|
||||
FLUSH TABLES;
|
||||
SELECT * FROM t1;
|
||||
SELECT * FROM t2;
|
||||
SELECT * FROM t3;
|
||||
|
||||
# backup of db into a directory
|
||||
USE hotcopy_test;
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test $MYSQLTEST_VARDIR/tmp
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--list_files $MYSQLTEST_VARDIR/tmp/hotcopy_test
|
||||
#--exec rm -rf $MYSQLTEST_VARDIR/tmp/hotcopy_test
|
||||
--remove_files_wildcard $MYSQLTEST_VARDIR/tmp/hotcopy_test *
|
||||
--rmdir $MYSQLTEST_VARDIR/tmp/hotcopy_test
|
||||
|
||||
# backup without full index files
|
||||
# reproduction of bug#53556, "--list_files" shows MYI files, which is wrong.
|
||||
DROP DATABASE hotcopy_save;
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --noindices -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
|
||||
# test of option "allowold"
|
||||
DROP DATABASE hotcopy_save;
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--error 9,2304
|
||||
--exec $MYSQLHOTCOPY --quiet -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --allowold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
|
||||
# test of option "keepold"
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --keepold -S $MASTER_MYSOCK -u root hotcopy_test hotcopy_save
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save_old
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_save
|
||||
|
||||
# test of option "suffix"
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQLHOTCOPY --quiet --suffix=_cpy -S $MASTER_MYSOCK -u root hotcopy_test
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
--list_files $MYSQLD_DATADIR/hotcopy_test_cpy
|
||||
DROP DATABASE hotcopy_test_cpy;
|
||||
|
||||
DROP DATABASE hotcopy_test;
|
||||
DROP DATABASE hotcopy_save;
|
||||
DROP DATABASE hotcopy_save_old;
|
||||
|
@ -1,6 +1,11 @@
|
||||
# Test if MYSQLTEST_VARDIR is a soft link
|
||||
# If we run in parallel, we have a suffix "/$child_num", so chop off that.
|
||||
|
||||
perl;
|
||||
my $path= $ENV{'MYSQLTEST_VARDIR'};
|
||||
$path=~ s|/\d+$||;
|
||||
open (ISLINK, ">" . $ENV{'MYSQL_TMP_DIR'} . "/mtr_var_link");
|
||||
my $mvr= -l $ENV{'MYSQLTEST_VARDIR'} ? 1 : 0;
|
||||
my $mvr= -l $path ? 1 : 0;
|
||||
print ISLINK "let \$mtr_var_link= $mvr;\n";
|
||||
close ISLINK;
|
||||
EOF
|
||||
|
@ -2,5 +2,5 @@
|
||||
# that varies depending on where the test is executed.
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 # 41 #
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
|
@ -4,5 +4,5 @@
|
||||
# masked out log positions
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT $DEFAULT_MASTER_PORT 3306
|
||||
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # 41 #
|
||||
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
|
@ -24,7 +24,7 @@ connection slave;
|
||||
START SLAVE;
|
||||
--source include/wait_for_slave_sql_to_stop.inc
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 # 41 #
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
|
||||
--query_vertical SHOW SLAVE STATUS
|
||||
|
||||
# The following should be 0
|
||||
|
@ -23,7 +23,3 @@ my_safe_process_SOURCES = safe_process.cc
|
||||
EXTRA_DIST = safe_kill_win.cc \
|
||||
safe_process_win.cc \
|
||||
CMakeLists.txt
|
||||
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
%::SCCS/s.%
|
||||
|
@ -147,6 +147,28 @@ sub mtr_exe_maybe_exists (@) {
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# NOTE! More specific paths should be given before less specific.
|
||||
#
|
||||
sub mtr_pl_maybe_exists (@) {
|
||||
my @path= @_;
|
||||
|
||||
map {$_.= ".pl"} @path if IS_WINDOWS;
|
||||
foreach my $path ( @path )
|
||||
{
|
||||
if(IS_WINDOWS)
|
||||
{
|
||||
return $path if -f $path;
|
||||
}
|
||||
else
|
||||
{
|
||||
return $path if -x $path;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# NOTE! More specific paths should be given before less specific.
|
||||
# For example /client/debug should be listed before /client
|
||||
|
@ -2110,6 +2110,15 @@ sub environment_setup {
|
||||
"$basedir/storage/myisam/myisampack",
|
||||
"$basedir/myisam/myisampack"));
|
||||
|
||||
# ----------------------------------------------------
|
||||
# mysqlhotcopy
|
||||
# ----------------------------------------------------
|
||||
my $mysqlhotcopy=
|
||||
mtr_pl_maybe_exists("$bindir/scripts/mysqlhotcopy");
|
||||
# Since mysqltest interprets the real path as "false" in an if,
|
||||
# use 1 ("true") to indicate "not exists" so it can be tested for
|
||||
$ENV{'MYSQLHOTCOPY'}= $mysqlhotcopy || 1;
|
||||
|
||||
# ----------------------------------------------------
|
||||
# perror
|
||||
# ----------------------------------------------------
|
||||
@ -3811,6 +3820,7 @@ sub extract_warning_lines ($$) {
|
||||
# Skip valgrind summary from tests where server has been restarted
|
||||
# Should this contain memory leaks, the final report will find it
|
||||
$skip_valgrind= 1 if $line =~ /^==\d+== ERROR SUMMARY:/;
|
||||
$skip_valgrind= 1 if $line =~ /^==\d+== HEAP SUMMARY:/;
|
||||
$skip_valgrind= 0 unless $line =~ /^==\d+==/;
|
||||
next if $skip_valgrind;
|
||||
}
|
||||
|
@ -1366,3 +1366,7 @@ ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used le
|
||||
CREATE INDEX i2 ON t1 (a(20));
|
||||
ERROR HY000: Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (id int);
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
ALTER TABLE t1 ADD COLUMN (f1 INT), ADD COLUMN (f2 INT), ADD KEY f2k(f2);
|
||||
DROP TABLE t1;
|
||||
|
@ -12756,3 +12756,22 @@ INSERT INTO t1 VALUES (1);
|
||||
TRUNCATE TABLE t1;
|
||||
ERROR HY000: Table storage engine for 't1' doesn't have this option
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#46565 - repair of partition fail for archive engine
|
||||
#
|
||||
# Installing corrupted table files for t1.
|
||||
SELECT * FROM t1;
|
||||
ERROR HY000: Table 't1' is marked as crashed and should be repaired
|
||||
REPAIR TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair error Corrupt
|
||||
SELECT * FROM t1;
|
||||
ERROR HY000: Table 't1' is marked as crashed and should be repaired
|
||||
REPAIR TABLE t1 EXTENDED;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
DROP TABLE t1;
|
||||
|
8
mysql-test/r/bug46261.result
Normal file
8
mysql-test/r/bug46261.result
Normal file
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Bug#46261 Plugins can be installed with --skip-grant-tables
|
||||
#
|
||||
INSTALL PLUGIN example SONAME 'ha_example.so';
|
||||
ERROR HY000: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
|
||||
UNINSTALL PLUGIN example;
|
||||
ERROR HY000: The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
|
||||
End of 5.1 tests
|
@ -1230,6 +1230,14 @@ SELECT HEX(DAYNAME(19700101));
|
||||
HEX(DAYNAME(19700101))
|
||||
0427043504420432043504400433
|
||||
SET character_set_connection=latin1;
|
||||
#
|
||||
# Bug#52120 create view cause Assertion failed: 0, file .\item_subselect.cc, line 817
|
||||
#
|
||||
CREATE TABLE t1 (a CHAR(1) CHARSET ascii, b CHAR(1) CHARSET latin1);
|
||||
CREATE VIEW v1 AS SELECT 1 from t1
|
||||
WHERE t1.b <=> (SELECT a FROM t1 WHERE a < SOME(SELECT '1'));
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Start of 5.5 tests
|
||||
|
@ -1034,5 +1034,48 @@ DROP TABLE t1;
|
||||
SET max_sort_length=DEFAULT;
|
||||
SET NAMES latin1;
|
||||
#
|
||||
# Bug#52520 Difference in tinytext utf column metadata
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
s1 TINYTEXT CHARACTER SET utf16,
|
||||
s2 TEXT CHARACTER SET utf16,
|
||||
s3 MEDIUMTEXT CHARACTER SET utf16,
|
||||
s4 LONGTEXT CHARACTER SET utf16
|
||||
);
|
||||
SET NAMES utf8, @@character_set_results=NULL;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 255 0 Y 16 0 54
|
||||
def test t1 t1 s2 s2 252 65535 0 Y 16 0 54
|
||||
def test t1 t1 s3 s3 252 16777215 0 Y 16 0 54
|
||||
def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 54
|
||||
def HEX(s1) 253 6120 0 Y 0 0 33
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
SET NAMES latin1;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 127 0 Y 16 0 8
|
||||
def test t1 t1 s2 s2 252 32767 0 Y 16 0 8
|
||||
def test t1 t1 s3 s3 252 8388607 0 Y 16 0 8
|
||||
def test t1 t1 s4 s4 252 2147483647 0 Y 16 0 8
|
||||
def HEX(s1) 253 2040 0 Y 0 0 8
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
SET NAMES utf8;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 381 0 Y 16 0 33
|
||||
def test t1 t1 s2 s2 252 98301 0 Y 16 0 33
|
||||
def test t1 t1 s3 s3 252 25165821 0 Y 16 0 33
|
||||
def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 33
|
||||
def HEX(s1) 253 6120 0 Y 0 0 33
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`CONCAT(s1)` varchar(255) CHARACTER SET utf16 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -1048,5 +1048,48 @@ DROP TABLE t1;
|
||||
SET max_sort_length=DEFAULT;
|
||||
SET NAMES latin1;
|
||||
#
|
||||
# Bug#52520 Difference in tinytext utf column metadata
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
s1 TINYTEXT CHARACTER SET utf32,
|
||||
s2 TEXT CHARACTER SET utf32,
|
||||
s3 MEDIUMTEXT CHARACTER SET utf32,
|
||||
s4 LONGTEXT CHARACTER SET utf32
|
||||
);
|
||||
SET NAMES utf8mb4, @@character_set_results=NULL;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 255 0 Y 16 0 60
|
||||
def test t1 t1 s2 s2 252 65535 0 Y 16 0 60
|
||||
def test t1 t1 s3 s3 252 16777215 0 Y 16 0 60
|
||||
def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 60
|
||||
def HEX(s1) 253 8160 0 Y 0 0 45
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
SET NAMES latin1;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 63 0 Y 16 0 8
|
||||
def test t1 t1 s2 s2 252 16383 0 Y 16 0 8
|
||||
def test t1 t1 s3 s3 252 4194303 0 Y 16 0 8
|
||||
def test t1 t1 s4 s4 252 1073741823 0 Y 16 0 8
|
||||
def HEX(s1) 253 2040 0 Y 0 0 8
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
SET NAMES utf8mb4;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 252 0 Y 16 0 45
|
||||
def test t1 t1 s2 s2 252 65532 0 Y 16 0 45
|
||||
def test t1 t1 s3 s3 252 16777212 0 Y 16 0 45
|
||||
def test t1 t1 s4 s4 252 4294967292 0 Y 16 0 45
|
||||
def HEX(s1) 253 8160 0 Y 0 0 45
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`CONCAT(s1)` varchar(255) CHARACTER SET utf32 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -2041,3 +2041,52 @@ predicted_order hex(utf8_encoding)
|
||||
101 E0B78AE2808DE0B6BB
|
||||
DROP TABLE t1;
|
||||
End of 5.4 tests
|
||||
#
|
||||
# Start of 5.5 tests
|
||||
#
|
||||
#
|
||||
# Bug#52520 Difference in tinytext utf column metadata
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
s1 TINYTEXT CHARACTER SET utf8,
|
||||
s2 TEXT CHARACTER SET utf8,
|
||||
s3 MEDIUMTEXT CHARACTER SET utf8,
|
||||
s4 LONGTEXT CHARACTER SET utf8
|
||||
);
|
||||
SET NAMES utf8, @@character_set_results=NULL;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 255 0 Y 16 0 33
|
||||
def test t1 t1 s2 s2 252 65535 0 Y 16 0 33
|
||||
def test t1 t1 s3 s3 252 16777215 0 Y 16 0 33
|
||||
def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 33
|
||||
def HEX(s1) 253 4590 0 Y 0 0 33
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
SET NAMES latin1;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 255 0 Y 16 0 8
|
||||
def test t1 t1 s2 s2 252 65535 0 Y 16 0 8
|
||||
def test t1 t1 s3 s3 252 16777215 0 Y 16 0 8
|
||||
def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 8
|
||||
def HEX(s1) 253 1530 0 Y 0 0 8
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
SET NAMES utf8;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 765 0 Y 16 0 33
|
||||
def test t1 t1 s2 s2 252 196605 0 Y 16 0 33
|
||||
def test t1 t1 s3 s3 252 50331645 0 Y 16 0 33
|
||||
def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 33
|
||||
def HEX(s1) 253 4590 0 Y 0 0 33
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`CONCAT(s1)` varchar(255) CHARACTER SET utf8 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -2471,6 +2471,49 @@ abc𐐀def
|
||||
𐐀
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#52520 Difference in tinytext utf column metadata
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
s1 TINYTEXT CHARACTER SET utf8mb4,
|
||||
s2 TEXT CHARACTER SET utf8mb4,
|
||||
s3 MEDIUMTEXT CHARACTER SET utf8mb4,
|
||||
s4 LONGTEXT CHARACTER SET utf8mb4
|
||||
);
|
||||
SET NAMES utf8mb4, @@character_set_results=NULL;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 255 0 Y 16 0 45
|
||||
def test t1 t1 s2 s2 252 65535 0 Y 16 0 45
|
||||
def test t1 t1 s3 s3 252 16777215 0 Y 16 0 45
|
||||
def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 45
|
||||
def HEX(s1) 253 8160 0 Y 0 0 45
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
SET NAMES latin1;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 255 0 Y 16 0 8
|
||||
def test t1 t1 s2 s2 252 65535 0 Y 16 0 8
|
||||
def test t1 t1 s3 s3 252 16777215 0 Y 16 0 8
|
||||
def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 8
|
||||
def HEX(s1) 253 2040 0 Y 0 0 8
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
SET NAMES utf8mb4;
|
||||
SELECT *, HEX(s1) FROM t1;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t1 t1 s1 s1 252 1020 0 Y 16 0 45
|
||||
def test t1 t1 s2 s2 252 262140 0 Y 16 0 45
|
||||
def test t1 t1 s3 s3 252 67108860 0 Y 16 0 45
|
||||
def test t1 t1 s4 s4 252 4294967295 0 Y 16 0 45
|
||||
def HEX(s1) 253 8160 0 Y 0 0 45
|
||||
s1 s2 s3 s4 HEX(s1)
|
||||
CREATE TABLE t2 AS SELECT CONCAT(s1) FROM t1;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`CONCAT(s1)` varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
#
|
||||
|
@ -490,4 +490,13 @@ END |
|
||||
DELETE IGNORE FROM t1;
|
||||
ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #53450: Crash/assertion
|
||||
# "virtual int ha_myisam::index_first(uchar*)") at assert.c:81
|
||||
#
|
||||
CREATE TABLE t1 (a INT, b INT, c INT,
|
||||
INDEX(a), INDEX(b), INDEX(c));
|
||||
INSERT INTO t1 VALUES (1,2,3), (4,5,6), (7,8,9);
|
||||
DELETE FROM t1 WHERE a = 10 OR b = 20 ORDER BY c LIMIT 1;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -18,3 +18,26 @@ SELECT MAX(a) FROM t1 GROUP BY a,b;
|
||||
ERROR 23000: Can't write; duplicate key in table 'tmp_table'
|
||||
set tmp_table_size=default;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #50946: fast index creation still seems to copy the table
|
||||
#
|
||||
CREATE TABLE t1 (a INT(100) NOT NULL);
|
||||
INSERT INTO t1 VALUES (1), (0), (2);
|
||||
SET SESSION debug='+d,alter_table_only_index_change';
|
||||
ALTER TABLE t1 ADD INDEX a(a);
|
||||
SET SESSION debug=DEFAULT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(100) NOT NULL,
|
||||
KEY `a` (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
0
|
||||
1
|
||||
2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -120,3 +120,17 @@ SET sql_quote_show_create= _utf8 x'5452C39C45';
|
||||
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
|
||||
SET sql_quote_show_create=_latin1 x'5452DC45';
|
||||
ERROR 42000: Variable 'sql_quote_show_create' can't be set to the value of 'TRÜE'
|
||||
#
|
||||
# Bug#52430 Incorrect key in the error message for duplicate key error involving BINARY type
|
||||
#
|
||||
CREATE TABLE t1(c1 BINARY(10), c2 BINARY(10), c3 BINARY(10),
|
||||
PRIMARY KEY(c1,c2,c3));
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES('abc','abc','abc');
|
||||
ERROR 23000: Duplicate entry 'abc-abc-abc' for key 'PRIMARY'
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 VARBINARY(19) PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES ('abc\0\0');
|
||||
INSERT INTO t1 VALUES ('abc\0\0');
|
||||
ERROR 23000: Duplicate entry 'abc\x00\x00' for key 'PRIMARY'
|
||||
DROP TABLE t1;
|
||||
|
@ -246,4 +246,16 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
Warnings:
|
||||
Note 1003 select '1' AS `f1`,`test`.`t2`.`f2` AS `f2` from `test`.`t2` where (`test`.`t2`.`f2` = 1)
|
||||
drop table t1,t2;
|
||||
#
|
||||
# Bug #48419: another explain crash..
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (b BLOB, KEY b(b(100)));
|
||||
INSERT INTO t2 VALUES ('1'), ('2'), ('3');
|
||||
FLUSH TABLES;
|
||||
EXPLAIN SELECT 1 FROM t1 WHERE a = (SELECT 1 FROM t1 t JOIN t2 WHERE b <= 1 AND t.a);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
DROP TABLE t1, t2;
|
||||
End of 5.1 tests.
|
||||
|
@ -639,4 +639,17 @@ CREATE TABLE t1(a CHAR(1),FULLTEXT(a));
|
||||
SELECT 1 FROM t1 WHERE MATCH(a) AGAINST ('') AND ROW(a,a) > ROW(1,1);
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#51866 - crash with repair by sort and fulltext keys
|
||||
#
|
||||
CREATE TABLE t1(a CHAR(4), FULLTEXT(a));
|
||||
INSERT INTO t1 VALUES('aaaa');
|
||||
SET myisam_sort_buffer_size=4;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect myisam_sort_buffer_size value: '4'
|
||||
REPAIR TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 repair status OK
|
||||
SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -130,4 +130,22 @@ SELECT @query;
|
||||
@query
|
||||
abcde,0,1234
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug #40625: Concat fails on DOUBLE values in a Stored Procedure,
|
||||
# while DECIMAL works
|
||||
#
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE v1 DOUBLE(10,3);
|
||||
SET v1= 100;
|
||||
SET @s = CONCAT('########################################', 40 , v1);
|
||||
SELECT @s;
|
||||
END;//
|
||||
CALL p1();
|
||||
@s
|
||||
########################################40100.000
|
||||
CALL p1();
|
||||
@s
|
||||
########################################40100.000
|
||||
DROP PROCEDURE p1;
|
||||
# End of 5.1 tests
|
||||
|
@ -1003,6 +1003,21 @@ SELECT 1 FROM
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #52397: another crash with explain extended and group_concat
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (0), (0);
|
||||
EXPLAIN EXTENDED SELECT 1 FROM
|
||||
(SELECT GROUP_CONCAT(t1.a ORDER BY t1.a ASC) FROM
|
||||
t1 t2, t1 GROUP BY t1.a) AS d;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00
|
||||
2 DERIVED t2 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00 Using join buffer
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from dual
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (a VARCHAR(6), b INT);
|
||||
|
@ -2590,6 +2590,20 @@ FROM t2 WHERE t2.b = 1 GROUP BY t2.b;
|
||||
DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b LIMIT 1), t2.a)
|
||||
secret
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#52164 Assertion failed: param.sort_length, file .\filesort.cc, line 149
|
||||
#
|
||||
CREATE TABLE t1 (a LONGBLOB NOT NULL);
|
||||
INSERT INTO t1 VALUES (''),('');
|
||||
SELECT 1 FROM t1, t1 t2
|
||||
ORDER BY QUOTE(t1.a);
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
Start of 5.4 tests
|
||||
SELECT format(12345678901234567890.123, 3);
|
||||
format(12345678901234567890.123, 3)
|
||||
|
@ -1540,5 +1540,12 @@ a
|
||||
HANDLER t1 READ a LAST;
|
||||
a
|
||||
HANDLER t1 CLOSE;
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ a FIRST;
|
||||
a
|
||||
INSERT INTO t1 VALUES (GeomFromText('Polygon((40 40,60 40,60 60,40 60,40 40))'));
|
||||
# should not crash
|
||||
HANDLER t1 READ a NEXT;
|
||||
HANDLER t1 CLOSE;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests.
|
||||
|
@ -1437,6 +1437,22 @@ SHOW GRANTS FOR mysqltest_1;
|
||||
Grants for mysqltest_1@%
|
||||
GRANT ALL PRIVILEGES ON *.* TO 'mysqltest_1'@'%'
|
||||
DROP USER mysqltest_1;
|
||||
CREATE DATABASE db1;
|
||||
CREATE DATABASE db2;
|
||||
GRANT SELECT ON db1.* to 'testbug'@localhost;
|
||||
USE db2;
|
||||
CREATE TABLE t1 (a INT);
|
||||
USE test;
|
||||
SELECT * FROM `../db2/tb2`;
|
||||
ERROR 42S02: Table 'db1.../db2/tb2' doesn't exist
|
||||
SELECT * FROM `../db2`.tb2;
|
||||
ERROR 42000: SELECT command denied to user 'testbug'@'localhost' for table 'tb2'
|
||||
SELECT * FROM `#mysql50#/../db2/tb2`;
|
||||
ERROR 42S02: Table 'db1.#mysql50#/../db2/tb2' doesn't exist
|
||||
DROP USER 'testbug'@localhost;
|
||||
DROP TABLE db2.t1;
|
||||
DROP DATABASE db1;
|
||||
DROP DATABASE db2;
|
||||
#########################################################################
|
||||
#
|
||||
# Bug#38347: ALTER ROUTINE privilege allows SHOW CREATE TABLE.
|
||||
|
@ -1791,4 +1791,24 @@ aa b COUNT( b)
|
||||
1 10 1
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#52051: Aggregate functions incorrectly returns NULL from outer
|
||||
# join query
|
||||
#
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY);
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY);
|
||||
INSERT INTO t2 VALUES (1), (2);
|
||||
EXPLAIN SELECT MIN(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
SELECT MIN(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
|
||||
MIN(t2.a)
|
||||
1
|
||||
EXPLAIN SELECT MAX(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Select tables optimized away
|
||||
SELECT MAX(t2.a) FROM t2 LEFT JOIN t1 ON t2.a = t1.a;
|
||||
MAX(t2.a)
|
||||
2
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
|
@ -1721,4 +1721,17 @@ TRUNCATE t1;
|
||||
HANDLER t1 READ FIRST;
|
||||
ERROR 42S02: Unknown table 't1' in HANDLER
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#51877 - HANDLER interface causes invalid memory read
|
||||
#
|
||||
CREATE TABLE t1(a INT, KEY(a));
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ a FIRST;
|
||||
a
|
||||
INSERT INTO t1 VALUES(1);
|
||||
HANDLER t1 READ a NEXT;
|
||||
a
|
||||
1
|
||||
HANDLER t1 CLOSE;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -472,7 +472,7 @@ HAVING (table2.f2 = 8 AND table1.f1 >= 6);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING noticed after reading const tables
|
||||
Warnings:
|
||||
Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having (('7' = 8) and (`test`.`table1`.`f1` >= 6))
|
||||
Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having 0
|
||||
EXPLAIN EXTENDED
|
||||
SELECT table1.f1, table2.f2
|
||||
FROM t1 AS table1
|
||||
@ -483,6 +483,52 @@ HAVING (table2.f2 = 8);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible HAVING noticed after reading const tables
|
||||
Warnings:
|
||||
Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having ('7' = 8)
|
||||
Note 1003 select `test`.`table1`.`f1` AS `f1`,'7' AS `f2` from `test`.`t1` `table1` join `test`.`t1` `table2` where ((`test`.`table1`.`f3` = '9')) group by `test`.`table1`.`f1`,'7' having 0
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#52336 Segfault / crash in 5.1 copy_fields (param=0x9872980) at sql_select.cc:15355
|
||||
#
|
||||
CREATE TABLE t1(f1 INT, f2 INT);
|
||||
INSERT INTO t1 VALUES (10,8);
|
||||
CREATE TABLE t2 (f1 INT);
|
||||
INSERT INTO t2 VALUES (5);
|
||||
SELECT COUNT(f1) FROM t2
|
||||
HAVING (7, 9) IN (SELECT f1, MIN(f2) FROM t1);
|
||||
COUNT(f1)
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 (f1 INT, f2 VARCHAR(1));
|
||||
INSERT INTO t1 VALUES (16,'f');
|
||||
INSERT INTO t1 VALUES (16,'f');
|
||||
CREATE TABLE t2 (f1 INT, f2 VARCHAR(1));
|
||||
INSERT INTO t2 VALUES (13,'f');
|
||||
INSERT INTO t2 VALUES (20,'f');
|
||||
CREATE TABLE t3 (f1 INT, f2 VARCHAR(1));
|
||||
INSERT INTO t3 VALUES (7,'f');
|
||||
SELECT t1.f2 FROM t1
|
||||
STRAIGHT_JOIN (t2 JOIN t3 ON t3.f2 = t2.f2 ) ON t3 .f2 = t2 .f2
|
||||
HAVING ('v', 'i') NOT IN (SELECT f2, MIN(f2) FROM t1)
|
||||
ORDER BY f2;
|
||||
f2
|
||||
f
|
||||
f
|
||||
f
|
||||
f
|
||||
DROP TABLES t1,t2,t3;
|
||||
#
|
||||
# Bug#52340 Segfault: read_cached_record (tab=0x94a2634) at sql_select.cc:14411
|
||||
#
|
||||
CREATE TABLE t1 (f1 INT, f2 VARCHAR(1));
|
||||
INSERT INTO t1 VALUES (16,'d');
|
||||
CREATE TABLE t2 (f1 INT, f2 VARCHAR(1));
|
||||
INSERT INTO t2 VALUES (13,'e');
|
||||
INSERT INTO t2 VALUES (20,'d');
|
||||
SELECT MAX(t2.f2) FROM t2 JOIN t1 ON t1.f2
|
||||
HAVING ('e' , 'd') IN
|
||||
(SELECT ts1.f2, ts2.f2 FROM t2 ts1 JOIN t2 ts2 ON ts1.f1)
|
||||
ORDER BY t1.f2;
|
||||
MAX(t2.f2)
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'd'
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.0 tests
|
||||
|
@ -37,9 +37,9 @@ partitions 3;
|
||||
select * from information_schema.partitions where table_schema="test"
|
||||
and table_name="t4";
|
||||
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME
|
||||
def test t4 p0 NULL 1 NULL KEY NULL f1,f2 NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
|
||||
def test t4 p1 NULL 2 NULL KEY NULL f1,f2 NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
|
||||
def test t4 p2 NULL 3 NULL KEY NULL f1,f2 NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
|
||||
def test t4 p0 NULL 1 NULL KEY NULL `f1`,`f2` NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
|
||||
def test t4 p1 NULL 2 NULL KEY NULL `f1`,`f2` NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
|
||||
def test t4 p2 NULL 3 NULL KEY NULL `f1`,`f2` NULL NULL 0 0 0 # 1024 0 # # NULL NULL default NULL
|
||||
drop table t1,t2,t3,t4;
|
||||
create table t1 (a int not null,b int not null,c int not null,primary key (a,b))
|
||||
partition by range (a)
|
||||
@ -67,10 +67,10 @@ def test t1 x1 x11 1 1 RANGE HASH a a+b 1 0 0 0 # 1024 0 # # NULL NULL default
|
||||
def test t1 x1 x12 1 2 RANGE HASH a a+b 1 0 0 0 # 1024 0 # # NULL NULL default t2
|
||||
def test t1 x2 x21 2 1 RANGE HASH a a+b 5 0 0 0 # 1024 0 # # NULL NULL default t1
|
||||
def test t1 x2 x22 2 2 RANGE HASH a a+b 5 0 0 0 # 1024 0 # # NULL NULL default t2
|
||||
def test t2 x1 x11 1 1 RANGE KEY a a 1 0 0 0 # 1024 0 # # NULL NULL default t1
|
||||
def test t2 x1 x12 1 2 RANGE KEY a a 1 0 0 0 # 1024 0 # # NULL NULL default t2
|
||||
def test t2 x2 x21 2 1 RANGE KEY a a 5 0 0 0 # 1024 0 # # NULL NULL default t1
|
||||
def test t2 x2 x22 2 2 RANGE KEY a a 5 0 0 0 # 1024 0 # # NULL NULL default t2
|
||||
def test t2 x1 x11 1 1 RANGE KEY a `a` 1 0 0 0 # 1024 0 # # NULL NULL default t1
|
||||
def test t2 x1 x12 1 2 RANGE KEY a `a` 1 0 0 0 # 1024 0 # # NULL NULL default t2
|
||||
def test t2 x2 x21 2 1 RANGE KEY a `a` 5 0 0 0 # 1024 0 # # NULL NULL default t1
|
||||
def test t2 x2 x22 2 2 RANGE KEY a `a` 5 0 0 0 # 1024 0 # # NULL NULL default t2
|
||||
drop table t1,t2;
|
||||
create table t1 (
|
||||
a int not null,
|
||||
|
@ -1,55 +0,0 @@
|
||||
#
|
||||
# Bug#21704: Renaming column does not update FK definition.
|
||||
#
|
||||
|
||||
# Test that it's not possible to rename columns participating in a
|
||||
# foreign key (either in the referencing or referenced table).
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP TABLE IF EXISTS t2;
|
||||
DROP TABLE IF EXISTS t3;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||
CREATE TABLE t2 (a INT PRIMARY KEY, b INT,
|
||||
CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(a))
|
||||
ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||
CREATE TABLE t3 (a INT PRIMARY KEY, b INT, KEY(b), C INT,
|
||||
CONSTRAINT fk2 FOREIGN KEY (b) REFERENCES t3 (a))
|
||||
ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
|
||||
INSERT INTO t2 VALUES (1,1),(2,2),(3,3);
|
||||
INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3);
|
||||
|
||||
# Test renaming the column in the referenced table.
|
||||
|
||||
ALTER TABLE t1 CHANGE a c INT;
|
||||
ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150)
|
||||
# Ensure that online column rename works.
|
||||
ALTER TABLE t1 CHANGE b c INT;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
|
||||
# Test renaming the column in the referencing table
|
||||
|
||||
ALTER TABLE t2 CHANGE a c INT;
|
||||
ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
|
||||
# Ensure that online column rename works.
|
||||
ALTER TABLE t2 CHANGE b c INT;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
|
||||
# Test with self-referential constraints
|
||||
|
||||
ALTER TABLE t3 CHANGE a d INT;
|
||||
ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
|
||||
ALTER TABLE t3 CHANGE b d INT;
|
||||
ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
|
||||
# Ensure that online column rename works.
|
||||
ALTER TABLE t3 CHANGE c d INT;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
|
||||
# Cleanup.
|
||||
|
||||
DROP TABLE t3;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t1;
|
@ -1,2 +0,0 @@
|
||||
SET storage_engine=InnoDB;
|
||||
DROP TABLE bug38231;
|
@ -1,9 +0,0 @@
|
||||
CREATE TABLE bug44571 (foo INT) ENGINE=InnoDB;
|
||||
ALTER TABLE bug44571 CHANGE foo bar INT;
|
||||
ALTER TABLE bug44571 ADD INDEX bug44571b (foo);
|
||||
ERROR 42000: Key column 'foo' doesn't exist in table
|
||||
ALTER TABLE bug44571 ADD INDEX bug44571b (bar);
|
||||
ERROR HY000: Incorrect key file for table 'bug44571'; try to repair it
|
||||
CREATE INDEX bug44571b ON bug44571 (bar);
|
||||
ERROR HY000: Incorrect key file for table 'bug44571'; try to repair it
|
||||
DROP TABLE bug44571;
|
@ -2389,6 +2389,64 @@ Index_type BTREE
|
||||
Comment
|
||||
Index_comment
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #47453: InnoDB incorrectly changes TIMESTAMP columns when
|
||||
# JOINed during an UPDATE
|
||||
#
|
||||
CREATE TABLE t1 (d INT) ENGINE=InnoDB;
|
||||
CREATE TABLE t2 (a INT, b INT,
|
||||
c TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
|
||||
ON UPDATE CURRENT_TIMESTAMP) ENGINE=InnoDB;
|
||||
set up our data elements
|
||||
INSERT INTO t1 (d) VALUES (1);
|
||||
INSERT INTO t2 (a,b) VALUES (1,1);
|
||||
SELECT SECOND(c) INTO @bug47453 FROM t2;
|
||||
SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
|
||||
SECOND(c)-@bug47453
|
||||
0
|
||||
UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1;
|
||||
SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
|
||||
SECOND(c)-@bug47453
|
||||
0
|
||||
SELECT SLEEP(1);
|
||||
SLEEP(1)
|
||||
0
|
||||
UPDATE t1 JOIN t2 ON d=a SET b=1 WHERE a=1;
|
||||
#should be 0
|
||||
SELECT SECOND(c)-@bug47453 FROM t1 JOIN t2 ON d=a;
|
||||
SECOND(c)-@bug47453
|
||||
0
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug #53334: wrong result for outer join with impossible ON condition
|
||||
# (see the same test case for MyISAM in join.test)
|
||||
#
|
||||
CREATE TABLE t1 (id INT PRIMARY KEY);
|
||||
CREATE TABLE t2 (id INT);
|
||||
INSERT INTO t1 VALUES (75);
|
||||
INSERT INTO t1 VALUES (79);
|
||||
INSERT INTO t1 VALUES (78);
|
||||
INSERT INTO t1 VALUES (77);
|
||||
REPLACE INTO t1 VALUES (76);
|
||||
REPLACE INTO t1 VALUES (76);
|
||||
INSERT INTO t1 VALUES (104);
|
||||
INSERT INTO t1 VALUES (103);
|
||||
INSERT INTO t1 VALUES (102);
|
||||
INSERT INTO t1 VALUES (101);
|
||||
INSERT INTO t1 VALUES (105);
|
||||
INSERT INTO t1 VALUES (106);
|
||||
INSERT INTO t1 VALUES (107);
|
||||
INSERT INTO t2 VALUES (107),(75),(1000);
|
||||
SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
|
||||
WHERE t2.id=75 AND t1.id IS NULL;
|
||||
id id
|
||||
NULL 75
|
||||
EXPLAIN SELECT t1.id,t2.id FROM t2 LEFT JOIN t1 ON t1.id>=74 AND t1.id<=0
|
||||
WHERE t2.id=75 AND t1.id IS NULL;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 const PRIMARY NULL NULL NULL 1 Impossible ON condition
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 3 Using where
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Test for bug #39932 "create table fails if column for FK is in different
|
||||
|
@ -1117,6 +1117,45 @@ ON t4.a = t5.a
|
||||
ON t1.a = t3.a;
|
||||
a a a a a a
|
||||
DROP TABLE t1,t2,t3,t4,t5,t6;
|
||||
#
|
||||
# Bug#48483: crash in get_best_combination()
|
||||
#
|
||||
CREATE TABLE t1(f1 INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE VIEW v1 AS SELECT 1 FROM t1 LEFT JOIN t1 AS t2 on 1=1;
|
||||
EXPLAIN EXTENDED
|
||||
SELECT 1 FROM v1 right join v1 AS v2 ON RAND();
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 2 100.00
|
||||
Warnings:
|
||||
Note 1003 select 1 AS `1` from `test`.`t1` left join `test`.`t1` `t2` on((1 = 1)) left join (`test`.`t1` left join `test`.`t1` `t2` on((1 = 1))) on(rand()) where 1
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#52177 crash with explain, row comparison, join, text field
|
||||
#
|
||||
CREATE TABLE t1 (a TINYINT, b TEXT, KEY (a));
|
||||
INSERT INTO t1 VALUES (0,''),(0,'');
|
||||
FLUSH TABLES;
|
||||
EXPLAIN SELECT 1 FROM t1 LEFT JOIN t1 a ON 1
|
||||
WHERE ROW(t1.a, 1111.11) = ROW(1111.11, 1111.11) AND
|
||||
ROW(t1.b, 1111.11) <=> ROW('','');
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #50335: Assertion `!(order->used & map)' in eq_ref_table
|
||||
#
|
||||
CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, PRIMARY KEY (a,b));
|
||||
INSERT INTO t1 VALUES (0,0), (1,1);
|
||||
SELECT * FROM t1 STRAIGHT_JOIN t1 t2 ON t1.a=t2.a AND t1.a=t2.b ORDER BY t2.a, t1.a;
|
||||
a b a b
|
||||
0 0 0 0
|
||||
1 1 1 1
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests.
|
||||
CREATE TABLE t1 (f1 int);
|
||||
CREATE TABLE t2 (f1 int);
|
||||
@ -1145,14 +1184,4 @@ NULL
|
||||
NULL
|
||||
1
|
||||
DROP TABLE t1, t2, mm1;
|
||||
#
|
||||
# Bug #50335: Assertion `!(order->used & map)' in eq_ref_table
|
||||
#
|
||||
CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL, PRIMARY KEY (a,b));
|
||||
INSERT INTO t1 VALUES (0,0), (1,1);
|
||||
SELECT * FROM t1 STRAIGHT_JOIN t1 t2 ON t1.a=t2.a AND t1.a=t2.b ORDER BY t2.a, t1.a;
|
||||
a b a b
|
||||
0 0 0 0
|
||||
1 1 1 1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1312,4 +1312,34 @@ WHERE (COALESCE(t1.f1, t2.f1), f3) IN ((1, 3), (2, 2));
|
||||
f1 f2 f3 f1 f2
|
||||
1 NULL 3 NULL NULL
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#52357: Assertion failed: join->best_read in greedy_search
|
||||
# optimizer_search_depth=0
|
||||
#
|
||||
CREATE TABLE t1( a INT );
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
SET optimizer_search_depth = 0;
|
||||
# Should not core dump on query preparation
|
||||
EXPLAIN
|
||||
SELECT 1
|
||||
FROM t1 tt3 LEFT OUTER JOIN t1 tt4 ON 1
|
||||
LEFT OUTER JOIN t1 tt5 ON 1
|
||||
LEFT OUTER JOIN t1 tt6 ON 1
|
||||
LEFT OUTER JOIN t1 tt7 ON 1
|
||||
LEFT OUTER JOIN t1 tt8 ON 1
|
||||
RIGHT OUTER JOIN t1 tt2 ON 1
|
||||
RIGHT OUTER JOIN t1 tt1 ON 1
|
||||
STRAIGHT_JOIN t1 tt9 ON 1;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE tt1 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE tt2 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE tt3 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE tt4 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE tt5 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE tt6 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE tt7 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE tt8 ALL NULL NULL NULL NULL 2
|
||||
1 SIMPLE tt9 ALL NULL NULL NULL NULL 2 Using join buffer
|
||||
SET optimizer_search_depth = DEFAULT;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -202,12 +202,6 @@ select * from t1;
|
||||
a b c
|
||||
10 NULL Ten
|
||||
15 NULL Fifteen
|
||||
show variables like "secure_file_pri%";
|
||||
Variable_name Value
|
||||
secure_file_priv MYSQLTEST_VARDIR/
|
||||
select @@secure_file_priv;
|
||||
@@secure_file_priv
|
||||
MYSQLTEST_VARDIR/
|
||||
set @@secure_file_priv= 0;
|
||||
ERROR HY000: Variable 'secure_file_priv' is a read only variable
|
||||
truncate table t1;
|
||||
@ -456,6 +450,13 @@ LOAD_FILE("MYSQLTEST_VARDIR/tmp/bug37114.txt")
|
||||
|
||||
set session sql_mode=@OLD_SQL_MODE;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug #51893: crash with certain characters given to load_file
|
||||
# function on windows
|
||||
#
|
||||
select load_file(0x0A9FB76C661B409C4BEC88098C5DD71B1072F9691F2E827D7EC8F092B299868A3CE196C04F0FB18CAB4E1557EB72331D812379DE7A75CA21C32E7C722C59E5CC33EF262EF04187B0F0EE756FA984DF2EAD37B1E4ADB064C3C5038F2E3B2D661B1C1150AAEB5425512E14D7506166D92D4533872E662F4B2D1428AAB5CCA72E75AA2EF325E196A5A02E2E8278873C64375845994B0F39BE2FF7B478332A7B0AA5E48877C47B6F513E997848AF8CCB8A899F3393AB35333CF0871E36698193862D486B4B9078B70C0A0A507B8A250F3F876F5A067632D5E65193E4445A1EC3A2C9B4C6F07AC334F0F62BC33357CB502E9B1C19D2398B6972AEC2EF21630F8C9134C4F7DD662D8AD7BDC9E19C46720F334B66C22D4BF32ED275144E20E7669FFCF6FC143667C9F02A577F32960FA9F2371BE1FA90E49CBC69C01531F140556854D588DD0E55E1307D78CA38E975CD999F9AEA604266329EE62BFB5ADDA67F549E211ECFBA906C60063696352ABB82AA782D25B17E872EA587871F450446DB1BAE0123D20404A8F2D2698B371002E986C8FCB969A99FF0E150A2709E2ED7633D02ADA87D5B3C9487D27B2BD9D21E2EC3215DCC3CDCD884371281B95A2E9987AAF82EB499C058D9C3E7DC1B66635F60DB121C72F929622DD47B6B2E69F59FF2AE6B63CC2EC60FFBA20EA50569DBAB5DAEFAEB4F03966C9637AB55662EDD28439155A82D053A5299448EDB2E7BEB0F62889E2F84E6C7F34B3212C9AAC32D521D5AB8480993F1906D5450FAB342A0FA6ED223E178BAC036B81E15783604C32A961EA1EF20BE2EBB93D34ED37BC03142B7583303E4557E48551E4BD7CBDDEA146D5485A5D212C35189F0BD6497E66912D2780A59A53B532E12C0A5ED1EC0445D96E8F2DD825221CFE4A65A87AA21DC8750481B9849DD81694C3357A0ED9B78D608D8EDDE28FAFBEC17844DE5709F41E121838DB55639D77E32A259A416D7013B2EB1259FDE1B498CBB9CAEE1D601DF3C915EA91C69B44E6B72062F5F4B3C73F06F2D5AD185E1692E2E0A01E7DD5133693681C52EE13B2BE42D03BDCF48E4E133CF06662339B778E1C3034F9939A433E157449172F7969ACCE1F5D2F65A4E09E4A5D5611EBEDDDBDB0C0C0A);
|
||||
load_file(0x0A9FB76C661B409C4BEC88098C5DD71B1072F9691F2E827D7EC8F092B299868A3CE196C04F0FB18CAB4E1557EB72331D812379DE7A75CA21C32E7C722C59E5CC33EF262EF04187B0F0EE756FA984DF2EAD37B1E4ADB064C3C5038F2E3B2D661B1C1150AAEB5425512E14D7506166D92D4533872E662F4B2D142
|
||||
NULL
|
||||
End of 5.0 tests
|
||||
CREATE TABLE t1 (a int);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
@ -484,4 +485,15 @@ SET character_set_filesystem=default;
|
||||
select @@character_set_filesystem;
|
||||
@@character_set_filesystem
|
||||
binary
|
||||
#
|
||||
# Bug #51850: crash/memory overlap when using load data infile and set
|
||||
# col equal to itself!
|
||||
#
|
||||
CREATE TABLE t1(col0 LONGBLOB);
|
||||
SELECT 'test' INTO OUTFILE 't1.txt';
|
||||
LOAD DATA INFILE 't1.txt' IGNORE INTO TABLE t1 SET col0=col0;
|
||||
SELECT * FROM t1;
|
||||
col0
|
||||
test
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -308,6 +308,37 @@ SET @@global.general_log = @old_general_log;
|
||||
SET @@global.general_log_file = @old_general_log_file;
|
||||
SET @@global.slow_query_log = @old_slow_query_log;
|
||||
SET @@global.slow_query_log_file = @old_slow_query_log_file;
|
||||
#
|
||||
# Bug #49756 Rows_examined is always 0 in the slow query log
|
||||
# for update statements
|
||||
#
|
||||
SET @old_log_output = @@global.log_output;
|
||||
SET GLOBAL log_output = "TABLE";
|
||||
SET GLOBAL slow_query_log = ON;
|
||||
SET GLOBAL long_query_time = 0.001;
|
||||
TRUNCATE TABLE mysql.slow_log;
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (b INT, PRIMARY KEY (b));
|
||||
INSERT INTO t2 VALUES (3),(4);
|
||||
INSERT INTO t1 VALUES (1+sleep(.01)),(2);
|
||||
INSERT INTO t1 SELECT b+sleep(.01) from t2;
|
||||
UPDATE t1 SET a=a+sleep(.01) WHERE a>2;
|
||||
UPDATE t1 SET a=a+sleep(.01) ORDER BY a DESC;
|
||||
UPDATE t2 set b=b+sleep(.01) limit 1;
|
||||
UPDATE t1 SET a=a+sleep(.01) WHERE a in (SELECT b from t2);
|
||||
DELETE FROM t1 WHERE a=a+sleep(.01) ORDER BY a LIMIT 2;
|
||||
SELECT rows_examined,sql_text FROM mysql.slow_log;
|
||||
rows_examined sql_text
|
||||
0 INSERT INTO t1 VALUES (1+sleep(.01)),(2)
|
||||
2 INSERT INTO t1 SELECT b+sleep(.01) from t2
|
||||
4 UPDATE t1 SET a=a+sleep(.01) WHERE a>2
|
||||
8 UPDATE t1 SET a=a+sleep(.01) ORDER BY a DESC
|
||||
2 UPDATE t2 set b=b+sleep(.01) limit 1
|
||||
4 UPDATE t1 SET a=a+sleep(.01) WHERE a in (SELECT b from t2)
|
||||
6 DELETE FROM t1 WHERE a=a+sleep(.01) ORDER BY a LIMIT 2
|
||||
DROP TABLE t1,t2;
|
||||
TRUNCATE TABLE mysql.slow_log;
|
||||
# end of bug#49756
|
||||
End of 5.1 tests
|
||||
|
||||
# --
|
||||
@ -334,6 +365,8 @@ SELECT @@general_log_file = @my_glf;
|
||||
1
|
||||
SET GLOBAL general_log_file = @old_general_log_file;
|
||||
# Close connection con1
|
||||
SET GLOBAL long_query_time = DEFAULT;
|
||||
SET GLOBAL log_output = @old_log_output;
|
||||
SET global general_log = @old_general_log;
|
||||
SET global general_log_file = @old_general_log_file;
|
||||
SET global slow_query_log = @old_slow_query_log;
|
||||
|
@ -2420,3 +2420,17 @@ SET debug_sync= 'now SIGNAL go_flush';
|
||||
# Connection: default
|
||||
SET debug_sync= 'RESET';
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#52856 concurrent show columns or show full columns causes a crash!!!
|
||||
#
|
||||
CREATE TABLE t1(a CHAR(255));
|
||||
SET DEBUG_SYNC= "get_schema_column SIGNAL waiting WAIT_FOR completed";
|
||||
SHOW FULL COLUMNS FROM t1;
|
||||
SET DEBUG_SYNC= "now WAIT_FOR waiting";
|
||||
SHOW FULL COLUMNS FROM t1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
a char(255) latin1_swedish_ci YES NULL #
|
||||
SET DEBUG_SYNC= "now SIGNAL completed";
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
a char(255) latin1_swedish_ci YES NULL #
|
||||
DROP TABLE t1;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user