mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Auto-merge from mysql-5.5.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
[MYSQL]
|
||||
post_commit_to = "commits@lists.mysql.com"
|
||||
post_push_to = "commits@lists.mysql.com"
|
||||
tree_name = "mysql-trunk-merge"
|
||||
tree_name = "mysql-5.5-merge"
|
||||
|
@ -3101,3 +3101,4 @@ libmysqld/merge_archives_mysqlserver.cmake
|
||||
libmysqld/mysqlserver_depends.c
|
||||
libmysqld/examples/mysql_embedded
|
||||
sql/.empty
|
||||
mysys/thr_lock
|
||||
|
@ -6,6 +6,7 @@ configure="./configure $base_configs $extra_configs"
|
||||
commands="\
|
||||
$make -k maintainer-clean || true
|
||||
/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache;
|
||||
/bin/rm -rf CMakeCache.txt CMakeFiles/
|
||||
|
||||
path=`dirname $0`
|
||||
. \"$path/autorun.sh\""
|
||||
|
@ -20,7 +20,7 @@
|
||||
EXTRA_DIST = FINISH.sh \
|
||||
SETUP.sh \
|
||||
autorun.sh \
|
||||
choose_configure.sh \
|
||||
cmake_configure.sh \
|
||||
build_mccge.sh \
|
||||
check-cpu \
|
||||
cleanup \
|
||||
|
@ -15,7 +15,7 @@ Usage: $0 [-h|-n] [configure-options]
|
||||
-n, --just-print Don't actually run any commands; just print them.
|
||||
-c, --just-configure Stop after running configure.
|
||||
--with-debug=full Build with full debug.
|
||||
--warning-mode=[old|pedantic]
|
||||
--warning-mode=[old|pedantic|maintainer]
|
||||
Influences the debug flags. Old is default.
|
||||
--prefix=path Build with prefix 'path'.
|
||||
|
||||
@ -62,6 +62,7 @@ just_print=
|
||||
just_configure=
|
||||
full_debug=
|
||||
warning_mode=
|
||||
maintainer_mode=
|
||||
|
||||
parse_options "$@"
|
||||
|
||||
@ -88,7 +89,21 @@ AM_MAKEFLAGS="-j 6"
|
||||
# Ex --with-ssl=/usr
|
||||
SSL_LIBRARY=--with-ssl
|
||||
|
||||
if [ "x$warning_mode" != "xpedantic" ]; then
|
||||
if [ "x$warning_mode" = "xpedantic" ]; then
|
||||
warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
|
||||
c_warnings="$warnings"
|
||||
cxx_warnings="$warnings -std=c++98"
|
||||
# NOTE: warning mode should not influence optimize/debug mode.
|
||||
# Please feel free to add a separate option if you don't feel it's an overkill.
|
||||
debug_extra_cflags="-O0"
|
||||
# Reset CPU flags (-mtune), they don't work in -pedantic mode
|
||||
check_cpu_cflags=""
|
||||
elif [ "x$warning_mode" = "xmaintainer" ]; then
|
||||
c_warnings="-Wall -Wextra"
|
||||
cxx_warnings="$c_warnings -Wno-unused-parameter"
|
||||
maintainer_mode="--enable-mysql-maintainer-mode"
|
||||
debug_extra_cflags="-g3"
|
||||
else
|
||||
# Both C and C++ warnings
|
||||
warnings="-Wall -Wextra -Wunused -Wwrite-strings"
|
||||
|
||||
@ -103,15 +118,6 @@ if [ "x$warning_mode" != "xpedantic" ]; then
|
||||
cxx_warnings="$cxx_warnings -Wctor-dtor-privacy -Wnon-virtual-dtor"
|
||||
# Added unless --with-debug=full
|
||||
debug_extra_cflags="-O0 -g3 -gdwarf-2"
|
||||
else
|
||||
warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
|
||||
c_warnings="$warnings"
|
||||
cxx_warnings="$warnings -std=c++98"
|
||||
# NOTE: warning mode should not influence optimize/debug mode.
|
||||
# Please feel free to add a separate option if you don't feel it's an overkill.
|
||||
debug_extra_cflags="-O0"
|
||||
# Reset CPU flags (-mtune), they don't work in -pedantic mode
|
||||
check_cpu_cflags=""
|
||||
fi
|
||||
|
||||
# Set flags for various build configurations.
|
||||
@ -147,7 +153,7 @@ fi
|
||||
base_configs="--prefix=$prefix --enable-assembler "
|
||||
base_configs="$base_configs --with-extra-charsets=complex "
|
||||
base_configs="$base_configs --enable-thread-safe-client "
|
||||
base_configs="$base_configs --with-big-tables"
|
||||
base_configs="$base_configs --with-big-tables $maintainer_mode"
|
||||
|
||||
if test -d "$path/../cmd-line-utils/readline"
|
||||
then
|
||||
|
@ -34,5 +34,5 @@ autoconf || die "Can't execute autoconf"
|
||||
# that will either call CMake or original configure shell script at build
|
||||
# time (CMake is preferred if installed).
|
||||
mv configure configure.am
|
||||
cp BUILD/choose_configure.sh configure
|
||||
cp BUILD/cmake_configure.sh configure
|
||||
chmod a+x configure
|
||||
|
@ -148,6 +148,9 @@ OPTION(ENABLED_PROFILING "Enable profiling" ON)
|
||||
OPTION(CYBOZU "" OFF)
|
||||
OPTION(BACKUP_TEST "" OFF)
|
||||
OPTION(WITHOUT_SERVER OFF)
|
||||
IF(UNIX)
|
||||
OPTION(WITH_VALGRIND "Valgrind instrumentation" OFF)
|
||||
ENDIF()
|
||||
OPTION (WITH_UNIT_TESTS "Compile MySQL with unit tests" ON)
|
||||
MARK_AS_ADVANCED(CYBOZU BACKUP_TEST WITHOUT_SERVER DISABLE_SHARED)
|
||||
|
||||
|
@ -30,6 +30,7 @@ SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
|
||||
@libmysqld_dirs@ \
|
||||
mysql-test support-files sql-bench \
|
||||
win \
|
||||
packaging \
|
||||
cmake
|
||||
DIST_SUBDIRS = . include Docs zlib \
|
||||
cmd-line-utils sql-common scripts \
|
||||
@ -40,6 +41,7 @@ DIST_SUBDIRS = . include Docs zlib \
|
||||
mysql-test support-files sql-bench \
|
||||
win \
|
||||
cmake \
|
||||
packaging \
|
||||
BUILD
|
||||
DISTCLEANFILES = ac_available_languages_fragment
|
||||
|
||||
|
@ -62,7 +62,6 @@ mysqlbinlog_SOURCES = mysqlbinlog.cc \
|
||||
$(top_srcdir)/mysys/my_new.cc \
|
||||
$(top_srcdir)/mysys/my_bit.c \
|
||||
$(top_srcdir)/mysys/my_bitmap.c \
|
||||
$(top_srcdir)/mysys/my_vle.c \
|
||||
$(top_srcdir)/mysys/base64.c
|
||||
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
|
||||
|
||||
|
@ -627,10 +627,6 @@ static COMMANDS commands[] = {
|
||||
{ "QUARTER", 0, 0, 0, ""},
|
||||
{ "QUERY", 0, 0, 0, ""},
|
||||
{ "QUICK", 0, 0, 0, ""},
|
||||
{ "RAID0", 0, 0, 0, ""},
|
||||
{ "RAID_CHUNKS", 0, 0, 0, ""},
|
||||
{ "RAID_CHUNKSIZE", 0, 0, 0, ""},
|
||||
{ "RAID_TYPE", 0, 0, 0, ""},
|
||||
{ "READ", 0, 0, 0, ""},
|
||||
{ "READS", 0, 0, 0, ""},
|
||||
{ "REAL", 0, 0, 0, ""},
|
||||
|
@ -5954,8 +5954,8 @@ static struct my_option my_long_options[] =
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"result-format-version", OPT_RESULT_FORMAT_VERSION,
|
||||
"Version of the result file format to use",
|
||||
(uchar**) &opt_result_format_version,
|
||||
(uchar**) &opt_result_format_version, 0,
|
||||
&opt_result_format_version,
|
||||
&opt_result_format_version, 0,
|
||||
GET_INT, REQUIRED_ARG, 1, 1, 2, 0, 0, 0},
|
||||
{"server-arg", 'A', "Send option value to embedded server as a parameter.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -5998,8 +5998,7 @@ static struct my_option my_long_options[] =
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"connect_timeout", OPT_CONNECT_TIMEOUT,
|
||||
"Number of seconds before connection timeout.",
|
||||
(uchar**) &opt_connect_timeout,
|
||||
(uchar**) &opt_connect_timeout, 0, GET_UINT, REQUIRED_ARG,
|
||||
&opt_connect_timeout, &opt_connect_timeout, 0, GET_UINT, REQUIRED_ARG,
|
||||
120, 0, 3600 * 12, 0, 0, 0},
|
||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||
};
|
||||
@ -8513,7 +8512,7 @@ void free_replace_column()
|
||||
typedef struct st_pointer_array { /* when using array-strings */
|
||||
TYPELIB typelib; /* Pointer to strings */
|
||||
uchar *str; /* Strings is here */
|
||||
int7 *flag; /* Flag about each var. */
|
||||
uint8 *flag; /* Flag about each var. */
|
||||
uint array_allocs,max_count,length,max_length;
|
||||
} POINTER_ARRAY;
|
||||
|
||||
@ -9644,7 +9643,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
|
||||
}
|
||||
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
|
||||
sizeof(*pa->flag));
|
||||
pa->flag= (int7*) (pa->typelib.type_names+pa->max_count);
|
||||
pa->flag= (uint8*) (pa->typelib.type_names+pa->max_count);
|
||||
pa->length=0;
|
||||
pa->max_length=PS_MALLOC-MALLOC_OVERHEAD;
|
||||
pa->array_allocs=1;
|
||||
@ -9680,7 +9679,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
|
||||
pa->typelib.type_names=new_array;
|
||||
old_count=pa->max_count;
|
||||
pa->max_count=len/(sizeof(uchar*) + sizeof(*pa->flag));
|
||||
pa->flag= (int7*) (pa->typelib.type_names+pa->max_count);
|
||||
pa->flag= (uint8*) (pa->typelib.type_names+pa->max_count);
|
||||
memcpy((uchar*) pa->flag,(char *) (pa->typelib.type_names+old_count),
|
||||
old_count*sizeof(*pa->flag));
|
||||
}
|
||||
|
@ -339,4 +339,16 @@ SET(C_HAS_inline CACHE INTERNAL "")
|
||||
SET(C_HAS___inline 1 CACHE INTERNAL "")
|
||||
SET(FIONREAD_IN_SYS_IOCTL CACHE INTERNAL "")
|
||||
SET(GWINSZ_IN_SYS_IOCTL CACHE INTERNAL "")
|
||||
SET(HAVE_CXXABI_H CACHE INTERNAL "")
|
||||
SET(HAVE_NDIR_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_NDIR_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_NDIR_H CACHE INTERNAL "")
|
||||
SET(HAVE_ASM_TERMBITS_H CACHE INTERNAL "")
|
||||
SET(HAVE_TERMBITS_H CACHE INTERNAL "")
|
||||
SET(HAVE_VIS_H CACHE INTERNAL "")
|
||||
SET(HAVE_WCHAR_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_WCTYPE_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP CACHE INTERNAL "")
|
||||
SET(HAVE_SOCKADDR_IN_SIN_LEN CACHE INTERNAL "")
|
||||
SET(HAVE_SOCKADDR_IN6_SIN6_LEN CACHE INTERNAL "")
|
||||
ENDIF()
|
||||
|
@ -103,7 +103,6 @@
|
||||
#cmakedefine HAVE_SYS_UTIME_H 1
|
||||
#cmakedefine HAVE_SYS_WAIT_H 1
|
||||
#cmakedefine HAVE_SYS_PARAM_H 1
|
||||
#cmakedefine HAVE_XFS_XFS_H 1
|
||||
|
||||
/* Libraries */
|
||||
#cmakedefine HAVE_LIBPTHREAD 1
|
||||
@ -252,15 +251,6 @@
|
||||
#cmakedefine HAVE_SIGWAIT 1
|
||||
#cmakedefine HAVE_SLEEP 1
|
||||
#cmakedefine HAVE_SNPRINTF 1
|
||||
/* Some that currently are not real defines, internal to CMake setup */
|
||||
/* #cmakedefine HAVE_FCNTL_NONBLOCK 1 */
|
||||
/* #cmakedefine HAVE_FINITE_IN_MATH_H 1 */
|
||||
/* #cmakedefine HAVE_SOCKADDR_STORAGE_SS_FAMILY 1 */
|
||||
/* #cmakedefine HAVE_SOCKADDR_STORAGE___SS_FAMILY 1 */
|
||||
/* #cmakedefine HAVE_SOCKET_SIZE_T_AS_int 1 */
|
||||
/* #cmakedefine HAVE_SOCKET_SIZE_T_AS_size_t 1 */
|
||||
/* #cmakedefine HAVE_SOCKET_SIZE_T_AS_socklen_t */
|
||||
/* #cmakedefine HAVE_SOCKET_TIMEOUT */
|
||||
#cmakedefine HAVE_STPCPY 1
|
||||
#cmakedefine HAVE_STRERROR 1
|
||||
#cmakedefine HAVE_STRCOLL 1
|
||||
@ -318,7 +308,7 @@
|
||||
#define USE_MB 1
|
||||
#define USE_MB_IDENT 1
|
||||
|
||||
|
||||
#cmakedefine HAVE_VALGRIND
|
||||
|
||||
/* Types we may use */
|
||||
#ifdef __APPLE__
|
||||
@ -343,13 +333,13 @@
|
||||
#endif
|
||||
|
||||
#cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@
|
||||
#cmakedefine HAVE_CHAR 1
|
||||
#cmakedefine HAVE_LONG 1
|
||||
#cmakedefine HAVE_CHARP 1
|
||||
#define HAVE_CHAR 1
|
||||
#define HAVE_LONG 1
|
||||
#define HAVE_CHARP 1
|
||||
#cmakedefine SIZEOF_SHORT @SIZEOF_SHORT@
|
||||
#cmakedefine HAVE_SHORT 1
|
||||
#define HAVE_SHORT 1
|
||||
#cmakedefine SIZEOF_INT @SIZEOF_INT@
|
||||
#cmakedefine HAVE_INT 1
|
||||
#define HAVE_INT 1
|
||||
#cmakedefine SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@
|
||||
#cmakedefine HAVE_LONG_LONG 1
|
||||
#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
|
||||
@ -581,23 +571,6 @@
|
||||
#cmakedefine HAVE_UCA_COLLATIONS 1
|
||||
#cmakedefine HAVE_COMPRESS 1
|
||||
|
||||
/*
|
||||
Hard coded platform settings
|
||||
*/
|
||||
|
||||
/* This is ugly, but we need lots of tweaks for HP-UX */
|
||||
#cmakedefine HPUX11 1
|
||||
#cmakedefine DO_NOT_REMOVE_THREAD_WRAPPERS 1
|
||||
#cmakedefine HAVE_BROKEN_PREAD 1
|
||||
#cmakedefine HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT 1
|
||||
#cmakedefine SNPRINTF_RETURN_TRUNC 1
|
||||
#cmakedefine _INCLUDE_LONGLONG 1
|
||||
|
||||
/* Mac OS X */
|
||||
#cmakedefine SIGNALS_DONT_BREAK_READ 1
|
||||
#cmakedefine IGNORE_SIGHUP_SIGQUIT 1
|
||||
#cmakedefine _P1003_1B_VISIBLE 1
|
||||
#cmakedefine DONT_DECLARE_CXA_PURE_VIRTUAL 1
|
||||
|
||||
/*
|
||||
Stuff that always need to be defined (compile breaks without it)
|
||||
|
@ -5,9 +5,6 @@ dnl you must also create strings/ctype-$charset_name.c
|
||||
|
||||
AC_DIVERT_PUSH(0)
|
||||
|
||||
# Any changes to the available character sets must also go into
|
||||
# include/config-win.h
|
||||
|
||||
define(CHARSETS_AVAILABLE0,binary)
|
||||
define(CHARSETS_AVAILABLE1,armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257)
|
||||
define(CHARSETS_AVAILABLE2,cp850 cp852 cp866 cp932 dec8 eucjpms euckr gb2312 gbk geostd8)
|
||||
|
@ -257,7 +257,6 @@ CHECK_INCLUDE_FILES ("stdlib.h;sys/un.h" HAVE_SYS_UN_H)
|
||||
CHECK_INCLUDE_FILES (vis.h HAVE_VIS_H)
|
||||
CHECK_INCLUDE_FILES (wchar.h HAVE_WCHAR_H)
|
||||
CHECK_INCLUDE_FILES (wctype.h HAVE_WCTYPE_H)
|
||||
CHECK_INCLUDE_FILES (xfs/xfs.h HAVE_XFS_XFS_H)
|
||||
|
||||
IF(HAVE_SYS_STREAM_H)
|
||||
# Needs sys/stream.h on Solaris
|
||||
@ -502,14 +501,17 @@ IF(HAVE_STDINT_H)
|
||||
SET(CMAKE_EXTRA_INCLUDE_FILES stdint.h)
|
||||
ENDIF(HAVE_STDINT_H)
|
||||
|
||||
# These first four SIZE_* values are not really used on Mac OS X,
|
||||
# as we only know at comile time what architecture to build for,
|
||||
# see "config.h.cmake". But as same macro MY_CHECK_TYPE_SIZE also
|
||||
# sets HAVE_* macros, we run the check here, doesn't hurt.
|
||||
SET(HAVE_VOIDP 1)
|
||||
SET(HAVE_CHARP 1)
|
||||
SET(HAVE_LONG 1)
|
||||
SET(HAVE_SIZE_T 1)
|
||||
|
||||
IF(NOT APPLE)
|
||||
MY_CHECK_TYPE_SIZE("void *" VOIDP)
|
||||
MY_CHECK_TYPE_SIZE("char *" CHARP)
|
||||
MY_CHECK_TYPE_SIZE(long LONG)
|
||||
MY_CHECK_TYPE_SIZE(size_t SIZE_T)
|
||||
ENDIF()
|
||||
|
||||
MY_CHECK_TYPE_SIZE(char CHAR)
|
||||
MY_CHECK_TYPE_SIZE(short SHORT)
|
||||
@ -803,7 +805,7 @@ ENDIF(NOT HAVE_POSIX_SIGNALS)
|
||||
# Assume regular sprintf
|
||||
SET(SPRINTFS_RETURNS_INT 1)
|
||||
|
||||
IF(CMAKE_COMPILER_IS_GNUXX AND HAVE_CXXABI_H)
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX AND HAVE_CXXABI_H)
|
||||
CHECK_CXX_SOURCE_COMPILES("
|
||||
#include <cxxabi.h>
|
||||
int main(int argc, char **argv)
|
||||
@ -992,6 +994,14 @@ configuration. By default gcc built-in sync functions are used,
|
||||
if available and 'smp' configuration otherwise.")
|
||||
MARK_AS_ADVANCED(WITH_ATOMIC_LOCKS MY_ATOMIC_MODE_RWLOCK MY_ATOMIC_MODE_DUMMY)
|
||||
|
||||
IF(WITH_VALGRIND)
|
||||
CHECK_INCLUDE_FILES("valgrind/memcheck.h;valgrind/valgrind.h"
|
||||
HAVE_VALGRIND_HEADERS)
|
||||
IF(HAVE_VALGRIND_HEADERS)
|
||||
SET(HAVE_VALGRIND 1)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Check for IPv6 support
|
||||
#--------------------------------------------------------------------
|
||||
@ -1046,26 +1056,3 @@ SET(CMAKE_EXTRA_INCLUDE_FILES)
|
||||
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_ino "dirent.h" STRUCT_DIRENT_HAS_D_INO)
|
||||
CHECK_STRUCT_HAS_MEMBER("struct dirent" d_namlen "dirent.h" STRUCT_DIRENT_HAS_D_NAMLEN)
|
||||
SET(SPRINTF_RETURNS_INT 1)
|
||||
|
||||
#--------------------------------------------------------------------
|
||||
# Hard coded platform settings
|
||||
#--------------------------------------------------------------------
|
||||
|
||||
# This is ugly, but we need lots of tweaks for HP-UX
|
||||
IF(CMAKE_SYSTEM_NAME MATCHES "HP-UX")
|
||||
SET(HPUX11 1)
|
||||
SET(DO_NOT_REMOVE_THREAD_WRAPPERS 1)
|
||||
SET(HAVE_BROKEN_PREAD 1)
|
||||
SET(HAVE_BROKEN_PTHREAD_COND_TIMEDWAIT 1)
|
||||
SET(NO_FCNTL_NONBLOCK 1) # Set conditionally in code above
|
||||
SET(SNPRINTF_RETURN_TRUNC 1)
|
||||
SET(_INCLUDE_LONGLONG 1)
|
||||
ENDIF()
|
||||
|
||||
IF(APPLE)
|
||||
SET(DONT_DECLARE_CXA_PURE_VIRTUAL 1)
|
||||
SET(IGNORE_SIGHUP_SIGQUIT 1)
|
||||
SET(SIGNALS_DONT_BREAK_READ 1)
|
||||
SET(SIGNAL_WITH_VIO_CLOSE 1) # FIXME better handled in mysql-trunk
|
||||
SET(_P1003_1B_VISIBLE 1)
|
||||
ENDIF()
|
||||
|
@ -672,9 +672,8 @@ AC_ARG_ENABLE(assembler,
|
||||
AC_MSG_CHECKING(if we should use assembler functions)
|
||||
# For now we only support assembler on i386 and sparc systems
|
||||
AM_CONDITIONAL(ASSEMBLER_x86, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "i386" && $AS strings/strings-x86.s -o checkassembler >/dev/null 2>&1 && test -f checkassembler && (rm -f checkassembler; exit 0;))
|
||||
AM_CONDITIONAL(ASSEMBLER_sparc32, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparc")
|
||||
AM_CONDITIONAL(ASSEMBLER_sparc64, test "$ENABLE_ASSEMBLER" = "yes" -a "$BASE_MACHINE_TYPE" = "sparcv9")
|
||||
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "" -o "$ASSEMBLER_sparc32_TRUE" = "")
|
||||
AM_CONDITIONAL(ASSEMBLER, test "$ASSEMBLER_x86_TRUE" = "")
|
||||
|
||||
if test "$ASSEMBLER_TRUE" = ""
|
||||
then
|
||||
@ -1201,7 +1200,6 @@ case $SYSTEM_TYPE in
|
||||
# Fixes for HPUX 11.0 compiler
|
||||
if test "$ac_cv_prog_gcc" = "no"
|
||||
then
|
||||
CFLAGS="$CFLAGS -DHAVE_BROKEN_INLINE"
|
||||
# set working flags first in line, letting override it (i. e. for debug):
|
||||
CXXFLAGS="+O2 $CXXFLAGS"
|
||||
MAX_C_OPTIMIZE=""
|
||||
@ -1988,6 +1986,9 @@ fi
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_INLINE
|
||||
AS_IF([test "x$ac_cv_c_inline" = "xno"],
|
||||
[AC_MSG_WARN([The C compiler does not support inline. Beware that unused
|
||||
functions might not be eliminated the object files.])])
|
||||
AC_TYPE_OFF_T
|
||||
AC_STRUCT_ST_RDEV
|
||||
AC_HEADER_TIME
|
||||
@ -3049,7 +3050,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
|
||||
libmysqld/Makefile libmysqld/examples/Makefile dnl
|
||||
mysql-test/Makefile mysql-test/lib/My/SafeProcess/Makefile dnl
|
||||
sql-bench/Makefile include/mysql_version.h plugin/Makefile win/Makefile dnl
|
||||
cmake/Makefile
|
||||
cmake/Makefile packaging/Makefile
|
||||
)
|
||||
|
||||
AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
|
||||
|
@ -39,7 +39,6 @@
|
||||
fill_buffer_retaining() is taken from gnu-grep and modified.
|
||||
*/
|
||||
|
||||
#define DONT_USE_RAID
|
||||
#include <my_global.h>
|
||||
#include <m_ctype.h>
|
||||
#include <my_sys.h>
|
||||
@ -52,7 +51,7 @@
|
||||
typedef struct st_pointer_array { /* when using array-strings */
|
||||
TYPELIB typelib; /* Pointer to strings */
|
||||
uchar *str; /* Strings is here */
|
||||
int7 *flag; /* Flag about each var. */
|
||||
uint8 *flag; /* Flag about each var. */
|
||||
uint array_allocs,max_count,length,max_length;
|
||||
} POINTER_ARRAY;
|
||||
|
||||
@ -267,7 +266,7 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
|
||||
}
|
||||
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
|
||||
sizeof(*pa->flag));
|
||||
pa->flag= (int7*) (pa->typelib.type_names+pa->max_count);
|
||||
pa->flag= (uint8*) (pa->typelib.type_names+pa->max_count);
|
||||
pa->length=0;
|
||||
pa->max_length=PS_MALLOC-MALLOC_OVERHEAD;
|
||||
pa->array_allocs=1;
|
||||
@ -304,7 +303,7 @@ static int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
|
||||
pa->typelib.type_names=new_array;
|
||||
old_count=pa->max_count;
|
||||
pa->max_count=len/(sizeof(uchar*) + sizeof(*pa->flag));
|
||||
pa->flag= (int7*) (pa->typelib.type_names+pa->max_count);
|
||||
pa->flag= (uint8*) (pa->typelib.type_names+pa->max_count);
|
||||
memcpy((uchar*) pa->flag,(char *) (pa->typelib.type_names+old_count),
|
||||
old_count*sizeof(*pa->flag));
|
||||
}
|
||||
|
@ -17,7 +17,6 @@
|
||||
versions into symbolic names. By Sasha Pachev <sasha@mysql.com>
|
||||
*/
|
||||
|
||||
#define DONT_USE_RAID
|
||||
#include <my_global.h>
|
||||
#include <m_ctype.h>
|
||||
#include <my_sys.h>
|
||||
|
@ -28,7 +28,12 @@ ${CMAKE_CXX_FLAGS})
|
||||
ENDIF()
|
||||
SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
|
||||
src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
|
||||
src/yassl_imp.cpp src/yassl_int.cpp src/template_instnt.cpp)
|
||||
src/yassl_imp.cpp src/yassl_int.cpp)
|
||||
|
||||
IF(HAVE_EXPLICIT_TEMPLATE_INSTANTIATION)
|
||||
SET(YASSL_SOURCES ${YASSL_SOURCES} src/template_instnt.cpp)
|
||||
ENDIF()
|
||||
|
||||
ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES})
|
||||
RESTRICT_SYMBOL_EXPORTS(yassl)
|
||||
|
||||
|
@ -21,12 +21,16 @@ ADD_DEFINITIONS(${SSL_DEFINES})
|
||||
SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp src/asn.cpp src/coding.cpp
|
||||
src/des.cpp src/dh.cpp src/dsa.cpp src/file.cpp src/hash.cpp src/integer.cpp src/md2.cpp
|
||||
src/md4.cpp src/md5.cpp src/misc.cpp src/random.cpp src/ripemd.cpp src/rsa.cpp src/sha.cpp
|
||||
src/template_instnt.cpp
|
||||
include/aes.hpp include/algebra.hpp include/arc4.hpp include/asn.hpp include/block.hpp
|
||||
include/coding.hpp include/des.hpp include/dh.hpp include/dsa.hpp include/dsa.hpp
|
||||
include/error.hpp include/file.hpp include/hash.hpp include/hmac.hpp include/integer.hpp
|
||||
include/md2.hpp include/md5.hpp include/misc.hpp include/modarith.hpp include/modes.hpp
|
||||
include/random.hpp include/ripemd.hpp include/rsa.hpp include/sha.hpp)
|
||||
|
||||
IF(HAVE_EXPLICIT_TEMPLATE_INSTANTIATION)
|
||||
SET(TAOCRYPT_SOURCES ${TAOCRYPT_SOURCES} src/template_instnt.cpp)
|
||||
ENDIF()
|
||||
|
||||
ADD_CONVENIENCE_LIBRARY(taocrypt ${TAOCRYPT_SOURCES})
|
||||
RESTRICT_SYMBOL_EXPORTS(taocrypt)
|
||||
|
||||
|
@ -33,16 +33,16 @@ pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
|
||||
m_ctype.h my_attribute.h $(HEADERS_GEN_CONFIGURE) \
|
||||
$(HEADERS_GEN_MAKE) probes_mysql.h probes_mysql_nodtrace.h
|
||||
|
||||
noinst_HEADERS = config-win.h lf.h my_bit.h \
|
||||
noinst_HEADERS = lf.h my_bit.h \
|
||||
heap.h my_bitmap.h my_uctype.h password.h \
|
||||
myisam.h myisampack.h myisammrg.h ft_global.h\
|
||||
mysys_err.h my_base.h \
|
||||
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h sha2.h \
|
||||
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
|
||||
my_aes.h my_tree.h hash.h thr_alarm.h \
|
||||
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
|
||||
my_handler.h my_time.h service_versions.h \
|
||||
my_rdtsc.h mysql/psi/psi_abi_v1.h mysql/psi/psi_abi_v2.h \
|
||||
my_vle.h my_user.h my_atomic.h atomic/nolock.h \
|
||||
my_user.h my_atomic.h atomic/nolock.h \
|
||||
atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \
|
||||
atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \
|
||||
atomic/solaris.h mysql/innodb_priv.h my_compiler.h
|
||||
|
@ -22,8 +22,9 @@
|
||||
v= __sync_lock_test_and_set(a, v);
|
||||
#define make_atomic_cas_body(S) \
|
||||
int ## S sav; \
|
||||
sav= __sync_val_compare_and_swap(a, *cmp, set); \
|
||||
if (!(ret= (sav == *cmp))) *cmp= sav;
|
||||
int ## S cmp_val= *cmp; \
|
||||
sav= __sync_val_compare_and_swap(a, cmp_val, set);\
|
||||
if (!(ret= (sav == cmp_val))) *cmp= sav
|
||||
|
||||
#ifdef MY_ATOMIC_MODE_DUMMY
|
||||
#define make_atomic_load_body(S) ret= *a
|
||||
|
@ -29,21 +29,22 @@
|
||||
We choose implementation as follows:
|
||||
------------------------------------
|
||||
On Windows using Visual C++ the native implementation should be
|
||||
preferrable. When using gcc we prefer the native x86 implementation,
|
||||
we prefer the Solaris implementation before the gcc because of
|
||||
stability preference, we choose gcc implementation if nothing else
|
||||
works on gcc. If neither Visual C++ or gcc we still choose the
|
||||
Solaris implementation on Solaris (mainly for SunStudio compiles.
|
||||
preferrable. When using gcc we prefer the Solaris implementation
|
||||
before the gcc because of stability preference, we choose gcc
|
||||
builtins if available, otherwise we choose the somewhat broken
|
||||
native x86 implementation. If neither Visual C++ or gcc we still
|
||||
choose the Solaris implementation on Solaris (mainly for SunStudio
|
||||
compilers).
|
||||
*/
|
||||
# if defined(_MSV_VER)
|
||||
# include "generic-msvc.h"
|
||||
# elif __GNUC__
|
||||
# if defined(__i386__) || defined(__x86_64__)
|
||||
# include "x86-gcc.h"
|
||||
# elif defined(HAVE_SOLARIS_ATOMIC)
|
||||
# if defined(HAVE_SOLARIS_ATOMIC)
|
||||
# include "solaris.h"
|
||||
# elif defined(HAVE_GCC_ATOMIC_BUILTINS)
|
||||
# include "gcc_builtins.h"
|
||||
# elif defined(__i386__) || defined(__x86_64__)
|
||||
# include "x86-gcc.h"
|
||||
# endif
|
||||
# elif defined(HAVE_SOLARIS_ATOMIC)
|
||||
# include "solaris.h"
|
||||
|
@ -20,11 +20,17 @@
|
||||
|
||||
#define MY_ATOMIC_MODE "solaris-atomic"
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define atomic_typeof(T,V) __typeof__(V)
|
||||
#else
|
||||
#define atomic_typeof(T,V) T
|
||||
#endif
|
||||
|
||||
#define uintptr_t void *
|
||||
#define atomic_or_ptr_nv(X,Y) (void *)atomic_or_ulong_nv((volatile ulong_t *)X, Y)
|
||||
|
||||
#define make_atomic_cas_body(S) \
|
||||
uint ## S ## _t sav; \
|
||||
atomic_typeof(uint ## S ## _t, *cmp) sav; \
|
||||
sav = atomic_cas_ ## S( \
|
||||
(volatile uint ## S ## _t *)a, \
|
||||
(uint ## S ## _t)*cmp, \
|
||||
|
@ -53,18 +53,29 @@
|
||||
#endif
|
||||
|
||||
#define make_atomic_add_body32 \
|
||||
asm volatile (LOCK_prefix "; xadd %0, %1;" : "+r" (v) , "+m" (*a))
|
||||
asm volatile (LOCK_prefix "; xadd %0, %1;" \
|
||||
: "+r" (v), "=m" (*a) \
|
||||
: "m" (*a) \
|
||||
: "memory")
|
||||
|
||||
#define make_atomic_cas_body32 \
|
||||
__typeof__(*cmp) sav; \
|
||||
asm volatile (LOCK_prefix "; cmpxchg %3, %0; setz %2;" \
|
||||
: "+m" (*a), "+a" (*cmp), "=q" (ret): "r" (set))
|
||||
: "=m" (*a), "=a" (sav), "=q" (ret) \
|
||||
: "r" (set), "m" (*a), "a" (*cmp) \
|
||||
: "memory"); \
|
||||
if (!ret) \
|
||||
*cmp= sav
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define make_atomic_add_body64 make_atomic_add_body32
|
||||
#define make_atomic_cas_body64 make_atomic_cas_body32
|
||||
|
||||
#define make_atomic_fas_body(S) \
|
||||
asm volatile ("xchg %0, %1;" : "+r" (v) , "+m" (*a))
|
||||
asm volatile ("xchg %0, %1;" \
|
||||
: "+r" (v), "=m" (*a) \
|
||||
: "m" (*a) \
|
||||
: "memory")
|
||||
|
||||
/*
|
||||
Actually 32-bit reads/writes are always atomic on x86
|
||||
@ -73,9 +84,14 @@
|
||||
#define make_atomic_load_body(S) \
|
||||
ret=0; \
|
||||
asm volatile (LOCK_prefix "; cmpxchg %2, %0" \
|
||||
: "+m" (*a), "+a" (ret): "r" (ret))
|
||||
: "=m" (*a), "=a" (ret) \
|
||||
: "r" (ret), "m" (*a) \
|
||||
: "memory")
|
||||
#define make_atomic_store_body(S) \
|
||||
asm volatile ("; xchg %0, %1;" : "+m" (*a), "+r" (v))
|
||||
asm volatile ("; xchg %0, %1;" \
|
||||
: "=m" (*a), "+r" (v) \
|
||||
: "m" (*a) \
|
||||
: "memory")
|
||||
|
||||
#else
|
||||
/*
|
||||
@ -107,9 +123,10 @@
|
||||
#define make_atomic_cas_body64 \
|
||||
int32 ebx=(set & 0xFFFFFFFF), ecx=(set >> 32); \
|
||||
asm volatile ("push %%ebx; movl %3, %%ebx;" \
|
||||
LOCK_prefix "; cmpxchg8b %0; setz %2; pop %%ebx"\
|
||||
: "+m" (*a), "+A" (*cmp), "=c" (ret) \
|
||||
:"m" (ebx), "c" (ecx))
|
||||
LOCK_prefix "; cmpxchg8b %0; setz %2; pop %%ebx" \
|
||||
: "=m" (*a), "+A" (*cmp), "=c" (ret) \
|
||||
: "m" (ebx), "c" (ecx), "m" (*a) \
|
||||
: "memory", "esp")
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -1,441 +0,0 @@
|
||||
#ifndef CONFIG_WIN_INCLUDED
|
||||
#define CONFIG_WIN_INCLUDED
|
||||
|
||||
/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
|
||||
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
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* Defines for Win32 to make it compatible for MySQL */
|
||||
|
||||
#define BIG_TABLES
|
||||
|
||||
/*
|
||||
Minimal version of Windows we should be able to run on.
|
||||
Currently Windows XP.
|
||||
*/
|
||||
#define _WIN32_WINNT 0x0501
|
||||
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
/* Avoid endless warnings about sprintf() etc. being unsafe. */
|
||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||
#endif
|
||||
|
||||
#include <sys/locking.h>
|
||||
#include <winsock2.h>
|
||||
#include <Ws2tcpip.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include <malloc.h>
|
||||
#include <sys/stat.h>
|
||||
#include <process.h> /* getpid()*/
|
||||
|
||||
|
||||
#define HAVE_SMEM 1
|
||||
|
||||
#if defined(_WIN64) || defined(WIN64)
|
||||
#define SYSTEM_TYPE "Win64"
|
||||
#elif defined(_WIN32) || defined(WIN32)
|
||||
#define SYSTEM_TYPE "Win32"
|
||||
#else
|
||||
#define SYSTEM_TYPE "Windows"
|
||||
#endif
|
||||
|
||||
#if defined(_M_IA64)
|
||||
#define MACHINE_TYPE "ia64"
|
||||
#elif defined(_M_IX86)
|
||||
#define MACHINE_TYPE "ia32"
|
||||
#elif defined(_M_ALPHA)
|
||||
#define MACHINE_TYPE "axp"
|
||||
#else
|
||||
#define MACHINE_TYPE "unknown" /* Define to machine type name */
|
||||
#endif
|
||||
|
||||
#if !(defined(_WIN64) || defined(WIN64))
|
||||
#ifndef _WIN32
|
||||
#define _WIN32 /* Compatible with old source */
|
||||
#endif
|
||||
#ifndef __WIN32__
|
||||
#define __WIN32__
|
||||
#endif
|
||||
#endif /* _WIN64 */
|
||||
#ifndef __WIN__
|
||||
#define __WIN__ /* To make it easier in VC++ */
|
||||
#endif
|
||||
|
||||
#ifndef MAX_INDEXES
|
||||
#define MAX_INDEXES 64
|
||||
#endif
|
||||
|
||||
/* File and lock constants */
|
||||
#ifdef __BORLANDC__
|
||||
#define F_RDLCK LK_NBLCK /* read lock */
|
||||
#define F_WRLCK LK_NBRLCK /* write lock */
|
||||
#define F_UNLCK LK_UNLCK /* remove lock(s) */
|
||||
#else
|
||||
#define F_RDLCK _LK_NBLCK /* read lock */
|
||||
#define F_WRLCK _LK_NBRLCK /* write lock */
|
||||
#define F_UNLCK _LK_UNLCK /* remove lock(s) */
|
||||
#endif
|
||||
|
||||
#define F_EXCLUSIVE 1 /* We have only exclusive locking */
|
||||
#define F_TO_EOF (INT_MAX32/2) /* size for lock of all file */
|
||||
#define F_OK 0 /* parameter to access() */
|
||||
#define W_OK 2
|
||||
|
||||
#define S_IROTH S_IREAD /* for my_lib */
|
||||
|
||||
/* Winsock2 constant (Vista SDK and later)*/
|
||||
#define IPPROTO_IPV6 41
|
||||
#ifndef IPV6_V6ONLY
|
||||
#define IPV6_V6ONLY 27
|
||||
#endif
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#define FILE_BINARY O_BINARY /* my_fopen in binary mode */
|
||||
#define O_TEMPORARY 0
|
||||
#define O_SHORT_LIVED 0
|
||||
#define SH_DENYNO _SH_DENYNO
|
||||
#else
|
||||
#define O_BINARY _O_BINARY /* compability with older style names */
|
||||
#define FILE_BINARY _O_BINARY /* my_fopen in binary mode */
|
||||
#define O_TEMPORARY _O_TEMPORARY
|
||||
#define O_SHORT_LIVED _O_SHORT_LIVED
|
||||
#define SH_DENYNO _SH_DENYNO
|
||||
#endif
|
||||
#define NO_OPEN_3 /* For my_create() */
|
||||
|
||||
#define SIGQUIT SIGTERM /* No SIGQUIT */
|
||||
|
||||
#undef _REENTRANT /* Crashes something for win32 */
|
||||
#undef SAFE_MUTEX /* Can't be used on windows */
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1310
|
||||
#define LL(A) A##ll
|
||||
#define ULL(A) A##ull
|
||||
#else
|
||||
#define LL(A) ((__int64) A)
|
||||
#define ULL(A) ((unsigned __int64) A)
|
||||
#endif
|
||||
|
||||
#define LONGLONG_MIN LL(0x8000000000000000)
|
||||
#define LONGLONG_MAX LL(0x7FFFFFFFFFFFFFFF)
|
||||
#define ULONGLONG_MAX ULL(0xFFFFFFFFFFFFFFFF)
|
||||
|
||||
/* Type information */
|
||||
|
||||
#if !defined(HAVE_UINT)
|
||||
#undef HAVE_UINT
|
||||
#define HAVE_UINT
|
||||
typedef unsigned short ushort;
|
||||
typedef unsigned int uint;
|
||||
#endif /* !defined(HAVE_UINT) */
|
||||
|
||||
typedef unsigned __int64 ulonglong; /* Microsofts 64 bit types */
|
||||
typedef __int64 longlong;
|
||||
#ifndef HAVE_SIGSET_T
|
||||
typedef int sigset_t;
|
||||
#endif
|
||||
#define longlong_defined
|
||||
/*
|
||||
off_t should not be __int64 because of conflicts in header files;
|
||||
Use my_off_t or os_off_t instead
|
||||
*/
|
||||
#ifndef HAVE_OFF_T
|
||||
typedef long off_t;
|
||||
#endif
|
||||
typedef __int64 os_off_t;
|
||||
#ifdef _WIN64
|
||||
typedef UINT_PTR rf_SetTimer;
|
||||
#else
|
||||
typedef uint rf_SetTimer;
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SIZE_T
|
||||
#ifndef _SIZE_T_DEFINED
|
||||
typedef SIZE_T size_t;
|
||||
#define _SIZE_T_DEFINED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SSIZE_T
|
||||
#ifndef _SSIZE_T_DEFINED
|
||||
typedef SSIZE_T ssize_t;
|
||||
#define _SSIZE_T_DEFINED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define Socket_defined
|
||||
#define my_socket SOCKET
|
||||
#define SIGPIPE SIGINT
|
||||
#define RETQSORTTYPE void
|
||||
#define QSORT_TYPE_IS_VOID
|
||||
#define RETSIGTYPE void
|
||||
#define SOCKET_SIZE_TYPE int
|
||||
#define my_socket_defined
|
||||
#define byte_defined
|
||||
#define STDCALL __stdcall /* Used by libmysql.dll */
|
||||
#define isnan(X) _isnan(X)
|
||||
#define finite(X) _finite(X)
|
||||
|
||||
#ifndef MYSQL_CLIENT_NO_THREADS
|
||||
#define THREAD
|
||||
#endif
|
||||
#define VOID_SIGHANDLER
|
||||
#define SIZEOF_CHAR 1
|
||||
#define SIZEOF_INT 4
|
||||
#define SIZEOF_LONG 4
|
||||
#define SIZEOF_LONG_LONG 8
|
||||
#define SIZEOF_OFF_T 8
|
||||
#ifdef _WIN64
|
||||
#define SIZEOF_CHARP 8
|
||||
#else
|
||||
#define SIZEOF_CHARP 4
|
||||
#endif
|
||||
#define HAVE_BROKEN_NETINET_INCLUDES
|
||||
#ifdef _WIN32
|
||||
#define HAVE_NAMED_PIPE /* We can only create pipes on NT */
|
||||
#endif
|
||||
|
||||
/* ERROR is defined in wingdi.h */
|
||||
#undef ERROR
|
||||
|
||||
/* We need to close files to break connections on shutdown */
|
||||
#ifndef SIGNAL_WITH_VIO_CLOSE
|
||||
#define SIGNAL_WITH_VIO_CLOSE
|
||||
#endif
|
||||
|
||||
/* All windows servers should support .sym files */
|
||||
#undef USE_SYMDIR
|
||||
#define USE_SYMDIR
|
||||
|
||||
/* If LOAD DATA LOCAL INFILE should be enabled by default */
|
||||
#define ENABLED_LOCAL_INFILE 1
|
||||
|
||||
/* If query profiling should be enabled by default */
|
||||
#define ENABLED_PROFILING 1
|
||||
|
||||
/* Convert some simple functions to Posix */
|
||||
|
||||
#define my_sigset(A,B) signal((A),(B))
|
||||
#define finite(A) _finite(A)
|
||||
#define sleep(A) Sleep((A)*1000)
|
||||
#define popen(A,B) _popen((A),(B))
|
||||
#define pclose(A) _pclose(A)
|
||||
|
||||
#ifndef __BORLANDC__
|
||||
#define access(A,B) _access(A,B)
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus)
|
||||
#define inline __inline
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef _WIN64
|
||||
#define ulonglong2double(A) ((double) (ulonglong) (A))
|
||||
#define my_off_t2double(A) ((double) (my_off_t) (A))
|
||||
|
||||
#else
|
||||
inline double ulonglong2double(ulonglong value)
|
||||
{
|
||||
longlong nr=(longlong) value;
|
||||
if (nr >= 0)
|
||||
return (double) nr;
|
||||
return (18446744073709551616.0 + (double) nr);
|
||||
}
|
||||
#define my_off_t2double(A) ulonglong2double(A)
|
||||
#endif /* _WIN64 */
|
||||
|
||||
inline ulonglong double2ulonglong(double d)
|
||||
{
|
||||
double t= d - (double) 0x8000000000000000ULL;
|
||||
|
||||
if (t >= 0)
|
||||
return ((ulonglong) t) + 0x8000000000000000ULL;
|
||||
return (ulonglong) d;
|
||||
}
|
||||
|
||||
#if SIZEOF_OFF_T > 4
|
||||
#define lseek(A,B,C) _lseeki64((A),(longlong) (B),(C))
|
||||
#define tell(A) _telli64(A)
|
||||
#endif
|
||||
|
||||
#define STACK_DIRECTION -1
|
||||
|
||||
/* Difference between GetSystemTimeAsFileTime() and now() */
|
||||
#define OFFSET_TO_EPOCH ULL(116444736000000000)
|
||||
|
||||
#define HAVE_PERROR
|
||||
#define HAVE_VFPRINT
|
||||
#define HAVE_RENAME /* Have rename() as function */
|
||||
#define HAVE_BINARY_STREAMS /* Have "b" flag in streams */
|
||||
#define HAVE_LONG_JMP /* Have long jump function */
|
||||
#define HAVE_LOCKING /* have locking() call */
|
||||
#define HAVE_ERRNO_AS_DEFINE /* errno is a define */
|
||||
#define HAVE_STDLIB /* everything is include in this file */
|
||||
#define HAVE_MEMCPY
|
||||
#define HAVE_MEMMOVE
|
||||
#define HAVE_GETCWD
|
||||
#define HAVE_TELL
|
||||
#define HAVE_TZNAME
|
||||
#define HAVE_PUTENV
|
||||
#define HAVE_SELECT
|
||||
#define HAVE_SETLOCALE
|
||||
#define HAVE_SOCKET /* Giangi */
|
||||
#define HAVE_FLOAT_H
|
||||
#define HAVE_LIMITS_H
|
||||
#define HAVE_STDDEF_H
|
||||
#define NO_FCNTL_NONBLOCK /* No FCNTL */
|
||||
#define HAVE_ALLOCA
|
||||
#define HAVE_STRPBRK
|
||||
#define HAVE_STRSTR
|
||||
#define HAVE_COMPRESS
|
||||
#define HAVE_CREATESEMAPHORE
|
||||
#define HAVE_ISNAN
|
||||
#define HAVE_FINITE
|
||||
#define HAVE_QUERY_CACHE
|
||||
#define SPRINTF_RETURNS_INT
|
||||
#define HAVE_SETFILEPOINTER
|
||||
#define HAVE_VIO_READ_BUFF
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||
/* strnlen() appeared in Studio 2005 */
|
||||
#define HAVE_STRNLEN
|
||||
#endif
|
||||
#define HAVE_WINSOCK2
|
||||
|
||||
#define strcasecmp stricmp
|
||||
#define strncasecmp strnicmp
|
||||
|
||||
#define HAVE_SNPRINTF 1
|
||||
#define snprintf _snprintf
|
||||
|
||||
#define HAVE_SETENV 1
|
||||
#define setenv(VAR,VAL,X) _putenv_s(VAR,VAL)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define HAVE_LDIV /* The optimizer breaks in zortech for ldiv */
|
||||
#define HAVE_ANSI_INCLUDE
|
||||
#define HAVE_SYS_UTIME_H
|
||||
#define HAVE_STRTOUL
|
||||
#endif
|
||||
#define my_reinterpret_cast(A) reinterpret_cast <A>
|
||||
#define my_const_cast(A) const_cast<A>
|
||||
|
||||
|
||||
/* MYSQL OPTIONS */
|
||||
|
||||
#ifdef _CUSTOMCONFIG_
|
||||
#include <custom_conf.h>
|
||||
#else
|
||||
#ifndef CMAKE_CONFIGD
|
||||
#define DEFAULT_MYSQL_HOME "c:\\mysql"
|
||||
#define MYSQL_DATADIR "c:\\mysql\\data"
|
||||
#define PACKAGE "mysql"
|
||||
#define DEFAULT_BASEDIR "C:\\"
|
||||
#define SHAREDIR "share"
|
||||
#define DEFAULT_CHARSET_HOME "C:/mysql/"
|
||||
#endif
|
||||
#endif
|
||||
#ifndef DEFAULT_HOME_ENV
|
||||
#define DEFAULT_HOME_ENV MYSQL_HOME
|
||||
#endif
|
||||
#ifndef DEFAULT_GROUP_SUFFIX_ENV
|
||||
#define DEFAULT_GROUP_SUFFIX_ENV MYSQL_GROUP_SUFFIX
|
||||
#endif
|
||||
|
||||
/* File name handling */
|
||||
|
||||
#define FN_LIBCHAR '\\'
|
||||
#define FN_ROOTDIR "\\"
|
||||
#define FN_DEVCHAR ':'
|
||||
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
|
||||
#define FN_NO_CASE_SENSE /* Files are not case-sensitive */
|
||||
#define OS_FILE_LIMIT UINT_MAX /* No limit*/
|
||||
|
||||
#define DO_NOT_REMOVE_THREAD_WRAPPERS
|
||||
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
|
||||
#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
|
||||
/* The following is only used for statistics, so it should be good enough */
|
||||
#ifdef _WIN32
|
||||
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
|
||||
#define thread_safe_sub(V,C,L) InterlockedExchangeAdd((long*) &(V),-(long) (C))
|
||||
#endif
|
||||
|
||||
#define shared_memory_buffer_length 16000
|
||||
#define default_shared_memory_base_name "MYSQL"
|
||||
|
||||
#define HAVE_SPATIAL 1
|
||||
#define HAVE_RTREE_KEYS 1
|
||||
|
||||
#define HAVE_OPENSSL 1
|
||||
#define HAVE_YASSL 1
|
||||
|
||||
#define ENABLED_PROFILING 1
|
||||
|
||||
/*
|
||||
Our Windows binaries include all character sets which MySQL supports.
|
||||
Any changes to the available character sets must also go into
|
||||
config/ac-macros/character_sets.m4
|
||||
*/
|
||||
|
||||
#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
|
||||
#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
|
||||
|
||||
#define USE_MB 1
|
||||
#define USE_MB_IDENT 1
|
||||
#define USE_STRCOLL 1
|
||||
|
||||
#define HAVE_CHARSET_armscii8
|
||||
#define HAVE_CHARSET_ascii
|
||||
#define HAVE_CHARSET_big5 1
|
||||
#define HAVE_CHARSET_cp1250 1
|
||||
#define HAVE_CHARSET_cp1251
|
||||
#define HAVE_CHARSET_cp1256
|
||||
#define HAVE_CHARSET_cp1257
|
||||
#define HAVE_CHARSET_cp850
|
||||
#define HAVE_CHARSET_cp852
|
||||
#define HAVE_CHARSET_cp866
|
||||
#define HAVE_CHARSET_cp932 1
|
||||
#define HAVE_CHARSET_dec8
|
||||
#define HAVE_CHARSET_eucjpms 1
|
||||
#define HAVE_CHARSET_euckr 1
|
||||
#define HAVE_CHARSET_gb2312 1
|
||||
#define HAVE_CHARSET_gbk 1
|
||||
#define HAVE_CHARSET_geostd8
|
||||
#define HAVE_CHARSET_greek
|
||||
#define HAVE_CHARSET_hebrew
|
||||
#define HAVE_CHARSET_hp8
|
||||
#define HAVE_CHARSET_keybcs2
|
||||
#define HAVE_CHARSET_koi8r
|
||||
#define HAVE_CHARSET_koi8u
|
||||
#define HAVE_CHARSET_latin1 1
|
||||
#define HAVE_CHARSET_latin2 1
|
||||
#define HAVE_CHARSET_latin5
|
||||
#define HAVE_CHARSET_latin7
|
||||
#define HAVE_CHARSET_macce
|
||||
#define HAVE_CHARSET_macroman
|
||||
#define HAVE_CHARSET_sjis 1
|
||||
#define HAVE_CHARSET_swe7
|
||||
#define HAVE_CHARSET_tis620 1
|
||||
#define HAVE_CHARSET_ucs2 1
|
||||
#define HAVE_CHARSET_ujis 1
|
||||
#define HAVE_CHARSET_utf8 1
|
||||
#define HAVE_CHARSET_utf8mb4 1
|
||||
#define HAVE_CHARSET_utf16 1
|
||||
#define HAVE_CHARSET_utf32 1
|
||||
|
||||
#define HAVE_UCA_COLLATIONS 1
|
||||
#define HAVE_BOOL 1
|
||||
|
||||
#endif /* CONFIG_WIN_INCLUDED */
|
@ -187,8 +187,6 @@ typedef struct st_lf_allocator {
|
||||
uchar * volatile top;
|
||||
uint element_size;
|
||||
uint32 volatile mallocs;
|
||||
void (*constructor)(uchar *); /* called, when an object is malloc()'ed */
|
||||
void (*destructor)(uchar *); /* called, when an object is free()'d */
|
||||
} LF_ALLOCATOR;
|
||||
|
||||
void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset);
|
||||
@ -222,8 +220,7 @@ C_MODE_START
|
||||
|
||||
#define LF_HASH_UNIQUE 1
|
||||
|
||||
/* lf_hash overhead per element (that is, sizeof(LF_SLIST) */
|
||||
extern const int LF_HASH_OVERHEAD;
|
||||
/* lf_hash overhead per element is sizeof(LF_SLIST). */
|
||||
|
||||
typedef struct {
|
||||
LF_DYNARRAY array; /* hash itself */
|
||||
|
@ -90,16 +90,6 @@ extern char _dig_vec_lower[];
|
||||
#ifndef strmov
|
||||
#define strmov_overlapp(A,B) strmov(A,B)
|
||||
#define strmake_overlapp(A,B,C) strmake(A,B,C)
|
||||
#endif
|
||||
|
||||
#ifdef BAD_MEMCPY /* Problem with gcc on Alpha */
|
||||
#define memcpy_fixed(A,B,C) bmove((A),(B),(C))
|
||||
#else
|
||||
#define memcpy_fixed(A,B,C) memcpy((A),(B),(C))
|
||||
#endif
|
||||
|
||||
#if (!defined(USE_BMOVE512) || defined(HAVE_purify)) && !defined(bmove512)
|
||||
#define bmove512(A,B,C) memcpy(A,B,C)
|
||||
#endif
|
||||
|
||||
/* Prototypes for string functions */
|
||||
@ -108,10 +98,6 @@ extern char _dig_vec_lower[];
|
||||
extern void bfill(uchar *dst,size_t len,pchar fill);
|
||||
#endif
|
||||
|
||||
#ifndef bmove512
|
||||
extern void bmove512(uchar *dst,const uchar *src,size_t len);
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_BMOVE) && !defined(bmove)
|
||||
extern void bmove(uuchar *dst, const uchar *src,size_t len);
|
||||
#endif
|
||||
@ -122,12 +108,7 @@ extern void bchange(uchar *dst,size_t old_len,const uchar *src,
|
||||
extern void strappend(char *s,size_t len,pchar fill);
|
||||
extern char *strend(const char *s);
|
||||
extern char *strcend(const char *, pchar);
|
||||
extern char *strfield(char *src,int fields,int chars,int blanks,
|
||||
int tabch);
|
||||
extern char *strfill(char * s,size_t len,pchar fill);
|
||||
extern size_t strinstr(const char *str,const char *search);
|
||||
extern size_t r_strinstr(const char *str, size_t from, const char *search);
|
||||
extern char *strkey(char *dst,char *head,char *tail,char *flags);
|
||||
extern char *strmake(char *dst,const char *src,size_t length);
|
||||
|
||||
#ifndef strmov
|
||||
@ -136,35 +117,16 @@ extern char *strmov(char *dst,const char *src);
|
||||
extern char *strmov_overlapp(char *dst,const char *src);
|
||||
#endif
|
||||
extern char *strnmov(char *dst, const char *src, size_t n);
|
||||
extern char *strsuff(const char *src, const char *suffix);
|
||||
extern char *strcont(const char *src, const char *set);
|
||||
extern char *strxcat(char *dst, const char *src, ...);
|
||||
extern char *strxmov(char *dst, const char *src, ...);
|
||||
extern char *strxcpy(char *dst, const char *src, ...);
|
||||
extern char *strxncat(char *dst, size_t len, const char *src, ...);
|
||||
extern char *strxnmov(char *dst, size_t len, const char *src, ...);
|
||||
extern char *strxncpy(char *dst, size_t len, const char *src, ...);
|
||||
|
||||
/* Prototypes of normal stringfunctions (with may ours) */
|
||||
|
||||
#ifdef WANT_STRING_PROTOTYPES
|
||||
extern char *strcat(char *, const char *);
|
||||
extern char *strchr(const char *, pchar);
|
||||
extern char *strrchr(const char *, pchar);
|
||||
extern char *strcpy(char *, const char *);
|
||||
extern int strcmp(const char *, const char *);
|
||||
#ifndef __GNUC__
|
||||
extern size_t strlen(const char *);
|
||||
#endif
|
||||
#endif
|
||||
#ifndef HAVE_STRNLEN
|
||||
extern size_t strnlen(const char *s, size_t n);
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus)
|
||||
#ifndef HAVE_STRPBRK
|
||||
extern char *strpbrk(const char *, const char *);
|
||||
#endif
|
||||
#ifndef HAVE_STRSTR
|
||||
extern char *strstr(const char *, const char *);
|
||||
#endif
|
||||
|
@ -20,6 +20,7 @@
|
||||
This header defines five atomic operations:
|
||||
|
||||
my_atomic_add#(&var, what)
|
||||
'Fetch and Add'
|
||||
add 'what' to *var, and return the old value of *var
|
||||
|
||||
my_atomic_fas#(&var, what)
|
||||
@ -27,9 +28,10 @@
|
||||
store 'what' in *var, and return the old value of *var
|
||||
|
||||
my_atomic_cas#(&var, &old, new)
|
||||
'Compare And Swap'
|
||||
An odd variation of 'Compare And Set/Swap'
|
||||
if *var is equal to *old, then store 'new' in *var, and return TRUE
|
||||
otherwise store *var in *old, and return FALSE
|
||||
Usually, &old should not be accessed if the operation is successful.
|
||||
|
||||
my_atomic_load#(&var)
|
||||
return *var
|
||||
@ -153,10 +155,8 @@ make_transparent_unions(ptr)
|
||||
#define U_set set
|
||||
#endif /* __GCC__ transparent_union magic */
|
||||
|
||||
#ifdef HAVE_INLINE
|
||||
|
||||
#define make_atomic_cas(S) \
|
||||
STATIC_INLINE int my_atomic_cas ## S(Uv_ ## S U_a, \
|
||||
static inline int my_atomic_cas ## S(Uv_ ## S U_a, \
|
||||
Uv_ ## S U_cmp, U_ ## S U_set) \
|
||||
{ \
|
||||
int8 ret; \
|
||||
@ -165,7 +165,7 @@ STATIC_INLINE int my_atomic_cas ## S(Uv_ ## S U_a, \
|
||||
}
|
||||
|
||||
#define make_atomic_add(S) \
|
||||
STATIC_INLINE int ## S my_atomic_add ## S( \
|
||||
static inline int ## S my_atomic_add ## S( \
|
||||
Uv_ ## S U_a, U_ ## S U_v) \
|
||||
{ \
|
||||
make_atomic_add_body(S); \
|
||||
@ -173,7 +173,7 @@ STATIC_INLINE int ## S my_atomic_add ## S( \
|
||||
}
|
||||
|
||||
#define make_atomic_fas(S) \
|
||||
STATIC_INLINE int ## S my_atomic_fas ## S( \
|
||||
static inline int ## S my_atomic_fas ## S( \
|
||||
Uv_ ## S U_a, U_ ## S U_v) \
|
||||
{ \
|
||||
make_atomic_fas_body(S); \
|
||||
@ -181,7 +181,7 @@ STATIC_INLINE int ## S my_atomic_fas ## S( \
|
||||
}
|
||||
|
||||
#define make_atomic_load(S) \
|
||||
STATIC_INLINE int ## S my_atomic_load ## S(Uv_ ## S U_a) \
|
||||
static inline int ## S my_atomic_load ## S(Uv_ ## S U_a) \
|
||||
{ \
|
||||
int ## S ret; \
|
||||
make_atomic_load_body(S); \
|
||||
@ -189,31 +189,12 @@ STATIC_INLINE int ## S my_atomic_load ## S(Uv_ ## S U_a) \
|
||||
}
|
||||
|
||||
#define make_atomic_store(S) \
|
||||
STATIC_INLINE void my_atomic_store ## S( \
|
||||
static inline void my_atomic_store ## S( \
|
||||
Uv_ ## S U_a, U_ ## S U_v) \
|
||||
{ \
|
||||
make_atomic_store_body(S); \
|
||||
}
|
||||
|
||||
#else /* no inline functions */
|
||||
|
||||
#define make_atomic_add(S) \
|
||||
extern int ## S my_atomic_add ## S(Uv_ ## S U_a, U_ ## S U_v);
|
||||
|
||||
#define make_atomic_fas(S) \
|
||||
extern int ## S my_atomic_fas ## S(Uv_ ## S U_a, U_ ## S U_v);
|
||||
|
||||
#define make_atomic_cas(S) \
|
||||
extern int my_atomic_cas ## S(Uv_ ## S U_a, Uv_ ## S U_cmp, U_ ## S U_set);
|
||||
|
||||
#define make_atomic_load(S) \
|
||||
extern int ## S my_atomic_load ## S(Uv_ ## S U_a);
|
||||
|
||||
#define make_atomic_store(S) \
|
||||
extern void my_atomic_store ## S(Uv_ ## S U_a, U_ ## S U_v);
|
||||
|
||||
#endif /* HAVE_INLINE */
|
||||
|
||||
#ifdef MY_ATOMIC_HAS_8_16
|
||||
make_atomic_cas(8)
|
||||
make_atomic_cas(16)
|
||||
|
@ -21,6 +21,12 @@
|
||||
#ifndef _my_attribute_h
|
||||
#define _my_attribute_h
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# ifndef GCC_VERSION
|
||||
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers.
|
||||
Some forms of __attribute__ are actually supported in earlier versions of
|
||||
|
@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
C_MODE_START
|
||||
#ifdef HAVE_INLINE
|
||||
|
||||
extern const char _my_bits_nbits[256];
|
||||
extern const uchar _my_bits_reverse_table[256];
|
||||
@ -16,14 +15,14 @@ extern const uchar _my_bits_reverse_table[256];
|
||||
This can be used to divide a number with value by doing a shift instead
|
||||
*/
|
||||
|
||||
STATIC_INLINE uint my_bit_log2(ulong value)
|
||||
static inline uint my_bit_log2(ulong value)
|
||||
{
|
||||
uint bit;
|
||||
for (bit=0 ; value > 1 ; value>>=1, bit++) ;
|
||||
return bit;
|
||||
}
|
||||
|
||||
STATIC_INLINE uint my_count_bits(ulonglong v)
|
||||
static inline uint my_count_bits(ulonglong v)
|
||||
{
|
||||
#if SIZEOF_LONG_LONG > 4
|
||||
/* The following code is a bit faster on 16 bit machines than if we would
|
||||
@ -45,7 +44,7 @@ STATIC_INLINE uint my_count_bits(ulonglong v)
|
||||
#endif
|
||||
}
|
||||
|
||||
STATIC_INLINE uint my_count_bits_ushort(ushort v)
|
||||
static inline uint my_count_bits_ushort(ushort v)
|
||||
{
|
||||
return _my_bits_nbits[v];
|
||||
}
|
||||
@ -70,7 +69,7 @@ STATIC_INLINE uint my_count_bits_ushort(ushort v)
|
||||
Comments shows how this works with 01100000000000000000000000001011
|
||||
*/
|
||||
|
||||
STATIC_INLINE uint32 my_round_up_to_next_power(uint32 v)
|
||||
static inline uint32 my_round_up_to_next_power(uint32 v)
|
||||
{
|
||||
v--; /* 01100000000000000000000000001010 */
|
||||
v|= v >> 1; /* 01110000000000000000000000001111 */
|
||||
@ -81,7 +80,7 @@ STATIC_INLINE uint32 my_round_up_to_next_power(uint32 v)
|
||||
return v+1; /* 10000000000000000000000000000000 */
|
||||
}
|
||||
|
||||
STATIC_INLINE uint32 my_clear_highest_bit(uint32 v)
|
||||
static inline uint32 my_clear_highest_bit(uint32 v)
|
||||
{
|
||||
uint32 w=v >> 1;
|
||||
w|= w >> 1;
|
||||
@ -92,7 +91,7 @@ STATIC_INLINE uint32 my_clear_highest_bit(uint32 v)
|
||||
return v & w;
|
||||
}
|
||||
|
||||
STATIC_INLINE uint32 my_reverse_bits(uint32 key)
|
||||
static inline uint32 my_reverse_bits(uint32 key)
|
||||
{
|
||||
return
|
||||
(_my_bits_reverse_table[ key & 255] << 24) |
|
||||
@ -101,14 +100,6 @@ STATIC_INLINE uint32 my_reverse_bits(uint32 key)
|
||||
_my_bits_reverse_table[(key>>24) ];
|
||||
}
|
||||
|
||||
#else /* HAVE_INLINE */
|
||||
extern uint my_bit_log2(ulong value);
|
||||
extern uint32 my_round_up_to_next_power(uint32 v);
|
||||
uint32 my_clear_highest_bit(uint32 v);
|
||||
uint32 my_reverse_bits(uint32 key);
|
||||
extern uint my_count_bits(ulonglong v);
|
||||
extern uint my_count_bits_ushort(ushort v);
|
||||
#endif /* HAVE_INLINE */
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MY_BIT_INCLUDED */
|
||||
|
@ -69,28 +69,6 @@ extern void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||
|
||||
extern uint bitmap_lock_set_next(MY_BITMAP *map);
|
||||
extern void bitmap_lock_clear_bit(MY_BITMAP *map, uint bitmap_bit);
|
||||
#ifdef NOT_USED
|
||||
extern uint bitmap_lock_bits_set(const MY_BITMAP *map);
|
||||
extern my_bool bitmap_lock_is_set_all(const MY_BITMAP *map);
|
||||
extern uint bitmap_lock_get_first(const MY_BITMAP *map);
|
||||
extern uint bitmap_lock_get_first_set(const MY_BITMAP *map);
|
||||
extern my_bool bitmap_lock_is_subset(const MY_BITMAP *map1,
|
||||
const MY_BITMAP *map2);
|
||||
extern my_bool bitmap_lock_is_prefix(const MY_BITMAP *map, uint prefix_size);
|
||||
extern my_bool bitmap_lock_is_set(const MY_BITMAP *map, uint bitmap_bit);
|
||||
extern my_bool bitmap_lock_is_clear_all(const MY_BITMAP *map);
|
||||
extern my_bool bitmap_lock_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2);
|
||||
extern void bitmap_lock_set_all(MY_BITMAP *map);
|
||||
extern void bitmap_lock_clear_all(MY_BITMAP *map);
|
||||
extern void bitmap_lock_set_bit(MY_BITMAP *map, uint bitmap_bit);
|
||||
extern void bitmap_lock_flip_bit(MY_BITMAP *map, uint bitmap_bit);
|
||||
extern void bitmap_lock_set_prefix(MY_BITMAP *map, uint prefix_size);
|
||||
extern void bitmap_lock_intersect(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||
extern void bitmap_lock_subtract(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||
extern void bitmap_lock_union(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||
extern void bitmap_lock_xor(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||
extern void bitmap_lock_invert(MY_BITMAP *map);
|
||||
#endif
|
||||
/* Fast, not thread safe, bitmap functions */
|
||||
#define bitmap_buffer_size(bits) (((bits)+31)/32)*4
|
||||
#define no_bytes_in_map(map) (((map)->n_bits + 7)/8)
|
||||
|
@ -86,24 +86,12 @@
|
||||
#define IF_WIN(A,B) B
|
||||
#endif
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
#define IF_DBUG(A,B) A
|
||||
#else
|
||||
#define IF_DBUG(A,B) B
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_purify
|
||||
#define IF_PURIFY(A,B) A
|
||||
#else
|
||||
#define IF_PURIFY(A,B) B
|
||||
#endif
|
||||
|
||||
#ifdef DISABLE_GRANT_OPTIONS
|
||||
#define IF_DISABLE_GRANT_OPTIONS(A,B) A
|
||||
#else
|
||||
#define IF_DISABLE_GRANT_OPTIONS(A,B) B
|
||||
#endif
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
#ifdef WITH_NDB_BINLOG
|
||||
#define HAVE_NDB_BINLOG 1
|
||||
@ -210,110 +198,6 @@
|
||||
#define likely(x) __builtin_expect((x),1)
|
||||
#define unlikely(x) __builtin_expect((x),0)
|
||||
|
||||
|
||||
/*
|
||||
The macros below are useful in optimising places where it has been
|
||||
discovered that cache misses stall the process and where a prefetch
|
||||
of the cache line can improve matters. This is available in GCC 3.1.1
|
||||
and later versions.
|
||||
PREFETCH_READ says that addr is going to be used for reading and that
|
||||
it is to be kept in caches if possible for a while
|
||||
PREFETCH_WRITE also says that the item to be cached is likely to be
|
||||
updated.
|
||||
The *LOCALITY scripts are also available for experimentation purposes
|
||||
mostly and should only be used if they are verified to improve matters.
|
||||
For more input see GCC manual (available in GCC 3.1.1 and later)
|
||||
*/
|
||||
|
||||
#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR > 10)
|
||||
#define PREFETCH_READ(addr) __builtin_prefetch(addr, 0, 3)
|
||||
#define PREFETCH_WRITE(addr) \
|
||||
__builtin_prefetch(addr, 1, 3)
|
||||
#define PREFETCH_READ_LOCALITY(addr, locality) \
|
||||
__builtin_prefetch(addr, 0, locality)
|
||||
#define PREFETCH_WRITE_LOCALITY(addr, locality) \
|
||||
__builtin_prefetch(addr, 1, locality)
|
||||
#else
|
||||
#define PREFETCH_READ(addr)
|
||||
#define PREFETCH_READ_LOCALITY(addr, locality)
|
||||
#define PREFETCH_WRITE(addr)
|
||||
#define PREFETCH_WRITE_LOCALITY(addr, locality)
|
||||
#endif
|
||||
|
||||
/*
|
||||
The following macro is used to ensure that code often used in most
|
||||
SQL statements and definitely for parts of the SQL processing are
|
||||
kept in a code segment by itself. This has the advantage that the
|
||||
risk of common code being overlapping in caches of the CPU is less.
|
||||
This can be a cause of big performance problems.
|
||||
Routines should be put in this category with care and when they are
|
||||
put there one should also strive to make as much of the error handling
|
||||
as possible (or uncommon code of the routine) to execute in a
|
||||
separate method to avoid moving to much code to this code segment.
|
||||
|
||||
It is very easy to use, simply add HOT_METHOD at the end of the
|
||||
function declaration.
|
||||
For more input see GCC manual (available in GCC 2.95 and later)
|
||||
*/
|
||||
|
||||
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94)
|
||||
#define HOT_METHOD \
|
||||
__attribute__ ((section ("hot_code_section")))
|
||||
#else
|
||||
#define HOT_METHOD
|
||||
#endif
|
||||
|
||||
/*
|
||||
The following macro is used to ensure that popular global variables
|
||||
are located next to each other to avoid that they contend for the
|
||||
same cache lines.
|
||||
|
||||
It is very easy to use, simply add HOT_DATA at the end of the declaration
|
||||
of the variable, the variable must be initialised because of the way
|
||||
that linker works so a declaration using HOT_DATA should look like:
|
||||
uint global_hot_data HOT_DATA = 0;
|
||||
For more input see GCC manual (available in GCC 2.95 and later)
|
||||
*/
|
||||
|
||||
#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR > 94)
|
||||
#define HOT_DATA \
|
||||
__attribute__ ((section ("hot_data_section")))
|
||||
#else
|
||||
#define HOT_DATA
|
||||
#endif
|
||||
|
||||
/*
|
||||
now let's figure out if inline functions are supported
|
||||
autoconf defines 'inline' to be empty, if not
|
||||
*/
|
||||
#define inline_test_1(X) X ## 1
|
||||
#define inline_test_2(X) inline_test_1(X)
|
||||
#if inline_test_2(inline) != 1
|
||||
#define HAVE_INLINE
|
||||
#else
|
||||
#warning No "inline" support in C, all "static inline" functions will be instantiated in every .o file!!!
|
||||
#endif
|
||||
#undef inline_test_2
|
||||
#undef inline_test_1
|
||||
/* helper macro for "instantiating" inline functions */
|
||||
#define STATIC_INLINE static inline
|
||||
|
||||
/*
|
||||
The following macros are used to control inlining a bit more than
|
||||
usual. These macros are used to ensure that inlining always or
|
||||
never occurs (independent of compilation mode).
|
||||
For more input see GCC manual (available in GCC 3.1.1 and later)
|
||||
*/
|
||||
|
||||
#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR > 10)
|
||||
#define ALWAYS_INLINE __attribute__ ((always_inline))
|
||||
#define NEVER_INLINE __attribute__ ((noinline))
|
||||
#else
|
||||
#define ALWAYS_INLINE
|
||||
#define NEVER_INLINE
|
||||
#endif
|
||||
|
||||
|
||||
/* Fix problem with S_ISLNK() on Linux */
|
||||
#if defined(TARGET_OS_LINUX) || defined(__GLIBC__)
|
||||
#undef _GNU_SOURCE
|
||||
@ -423,10 +307,6 @@ C_MODE_END
|
||||
#undef HAVE_PREAD
|
||||
#undef HAVE_PWRITE
|
||||
#endif
|
||||
#if defined(HAVE_BROKEN_INLINE) && !defined(__cplusplus)
|
||||
#undef inline
|
||||
#define inline
|
||||
#endif
|
||||
|
||||
#ifdef UNDEF_HAVE_GETHOSTBYNAME_R /* For OSF4.x */
|
||||
#undef HAVE_GETHOSTBYNAME_R
|
||||
@ -441,18 +321,6 @@ C_MODE_END
|
||||
#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
|
||||
#endif
|
||||
|
||||
|
||||
/* Fix a bug in gcc 2.8.0 on IRIX 6.2 */
|
||||
#if SIZEOF_LONG == 4 && defined(__LONG_MAX__) && (__GNUC__ == 2 && __GNUC_MINOR__ == 8)
|
||||
#undef __LONG_MAX__ /* Is a longlong value in gcc 2.8.0 ??? */
|
||||
#define __LONG_MAX__ 2147483647
|
||||
#endif
|
||||
|
||||
/* egcs 1.1.2 has a problem with memcpy on Alpha */
|
||||
#if defined(__GNUC__) && defined(__alpha__) && ! (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95))
|
||||
#define BAD_MEMCPY
|
||||
#endif
|
||||
|
||||
#if defined(_lint) && !defined(lint)
|
||||
#define lint
|
||||
#endif
|
||||
@ -557,16 +425,6 @@ C_MODE_END
|
||||
extern "C" int madvise(void *addr, size_t len, int behav);
|
||||
#endif
|
||||
|
||||
/* We can not live without the following defines */
|
||||
|
||||
#define USE_MYFUNC 1 /* Must use syscall indirection */
|
||||
#define MASTER 1 /* Compile without unireg */
|
||||
#define ENGLISH 1 /* Messages in English */
|
||||
#define POSIX_MISTAKE 1 /* regexp: Fix stupid spec error */
|
||||
#define USE_REGEX 1 /* We want the use the regex library */
|
||||
/* Do not define for ultra sparcs */
|
||||
#define USE_BMOVE512 1 /* Use this unless system bmove is faster */
|
||||
|
||||
#define QUOTE_ARG(x) #x /* Quote argument (before cpp) */
|
||||
#define STRINGIFY_ARG(x) QUOTE_ARG(x) /* Quote argument, after cpp */
|
||||
|
||||
@ -608,12 +466,6 @@ extern "C" int madvise(void *addr, size_t len, int behav);
|
||||
#define UNINIT_VAR(x) x= x
|
||||
#endif
|
||||
|
||||
/* Define some useful general macros */
|
||||
#if !defined(max)
|
||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_UINT)
|
||||
#undef HAVE_UINT
|
||||
#define HAVE_UINT
|
||||
@ -621,8 +473,6 @@ typedef unsigned int uint;
|
||||
typedef unsigned short ushort;
|
||||
#endif
|
||||
|
||||
#define CMP_NUM(a,b) (((a) < (b)) ? -1 : ((a) == (b)) ? 0 : 1)
|
||||
#define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
|
||||
#define swap_variables(t, a, b) { t dummy; dummy= a; a= b; b= dummy; }
|
||||
#define test(a) ((a) ? 1 : 0)
|
||||
#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
|
||||
@ -636,18 +486,6 @@ typedef unsigned short ushort;
|
||||
#define FALSE (0) /* Logical false */
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define function_volatile volatile
|
||||
#define my_reinterpret_cast(A) reinterpret_cast<A>
|
||||
#define my_const_cast(A) const_cast<A>
|
||||
# ifndef GCC_VERSION
|
||||
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
# endif
|
||||
#elif !defined(my_reinterpret_cast)
|
||||
#define my_reinterpret_cast(A) (A)
|
||||
#define my_const_cast(A) (A)
|
||||
#endif
|
||||
|
||||
#include <my_compiler.h>
|
||||
|
||||
/*
|
||||
@ -674,9 +512,6 @@ C_MODE_END
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define MIN_ARRAY_SIZE 0 /* Zero or One. Gcc allows zero*/
|
||||
#define ASCII_BITS_USED 8 /* Bit char used */
|
||||
|
||||
/* Some types that is different between systems */
|
||||
|
||||
typedef int File; /* File descriptor */
|
||||
@ -753,14 +588,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
#endif /* __WIN__ */
|
||||
|
||||
|
||||
/* #define USE_RECORD_LOCK */
|
||||
|
||||
/* Unsigned types supported by the compiler */
|
||||
#define UNSINT8 /* unsigned int8 (char) */
|
||||
#define UNSINT16 /* unsigned int16 */
|
||||
#define UNSINT32 /* unsigned int32 */
|
||||
|
||||
/* General constants */
|
||||
/* General constants */
|
||||
#define FN_LEN 256 /* Max file name len */
|
||||
#define FN_HEADLEN 253 /* Max length of filepart of file name */
|
||||
#define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN) */
|
||||
@ -821,10 +649,6 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
#define OS_FILE_LIMIT UINT_MAX
|
||||
#endif
|
||||
|
||||
/* #define EXT_IN_LIBNAME */
|
||||
/* #define FN_NO_CASE_SENSE */
|
||||
/* #define FN_UPPER_CASE TRUE */
|
||||
|
||||
/*
|
||||
Io buffer size; Must be a power of 2 and a multiple of 512. May be
|
||||
smaller what the disk page size. This influences the speed of the
|
||||
@ -849,7 +673,6 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
|
||||
/* Some things that this system doesn't have */
|
||||
|
||||
#define NO_HASH /* Not needed anymore */
|
||||
#ifdef _WIN32
|
||||
#define NO_DIR_LIBRARY /* Not standard dir-library */
|
||||
#endif
|
||||
@ -896,7 +719,6 @@ inline unsigned long long my_double2ulonglong(double d)
|
||||
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
|
||||
#endif
|
||||
#define ulong_to_double(X) ((double) (ulong) (X))
|
||||
#define SET_STACK_SIZE(X) /* Not needed on real machines */
|
||||
|
||||
#ifndef STACK_DIRECTION
|
||||
#error "please add -DSTACK_DIRECTION=1 or -1 to your CPPFLAGS"
|
||||
@ -915,7 +737,6 @@ inline unsigned long long my_double2ulonglong(double d)
|
||||
/*
|
||||
Some pre-ANSI-C99 systems like AIX 5.1 and Linux/GCC 2.95 define
|
||||
ULONGLONG_MAX, LONGLONG_MIN, LONGLONG_MAX; we use them if they're defined.
|
||||
Also on Windows we define these constants by hand in config-win.h.
|
||||
*/
|
||||
|
||||
#if defined(HAVE_LONG_LONG) && !defined(LONGLONG_MIN)
|
||||
@ -1013,9 +834,6 @@ typedef long long my_ptrdiff_t;
|
||||
#define MY_ALIGN(A,L) (((A) + (L) - 1) & ~((L) - 1))
|
||||
#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
|
||||
/* Size to make adressable obj. */
|
||||
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t)))
|
||||
/* Offset of field f in structure t */
|
||||
#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
|
||||
#define ADD_TO_PTR(ptr,size,type) (type) ((uchar*) (ptr)+size)
|
||||
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((uchar*) (A) - (uchar*) (B))
|
||||
|
||||
@ -1126,22 +944,6 @@ typedef long long intptr;
|
||||
|
||||
#define MY_ERRPTR ((void*)(intptr)1)
|
||||
|
||||
#ifdef USE_RAID
|
||||
/*
|
||||
The following is done with a if to not get problems with pre-processors
|
||||
with late define evaluation
|
||||
*/
|
||||
#if SIZEOF_OFF_T == 4
|
||||
#define SYSTEM_SIZEOF_OFF_T 4
|
||||
#else
|
||||
#define SYSTEM_SIZEOF_OFF_T 8
|
||||
#endif
|
||||
#undef SIZEOF_OFF_T
|
||||
#define SIZEOF_OFF_T 8
|
||||
#else
|
||||
#define SYSTEM_SIZEOF_OFF_T SIZEOF_OFF_T
|
||||
#endif /* USE_RAID */
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef unsigned long long my_off_t;
|
||||
typedef unsigned long long os_off_t;
|
||||
@ -1182,14 +984,10 @@ typedef ulong nesting_map; /* Used for flags of nesting constructs */
|
||||
#define SOCKET_EMFILE EMFILE
|
||||
#endif
|
||||
|
||||
typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */
|
||||
typedef short int15; /* Most effective integer 0 <= x <= 32767 */
|
||||
typedef int myf; /* Type of MyFlags in my_funcs */
|
||||
typedef char my_bool; /* Small bool */
|
||||
/* Macros for converting *constants* to the right type */
|
||||
#define INT8(v) (int8) (v)
|
||||
#define INT16(v) (int16) (v)
|
||||
#define INT32(v) (int32) (v)
|
||||
|
||||
/* Macros for converting *constants* to the right type */
|
||||
#define MYF(v) (myf) (v)
|
||||
|
||||
#ifndef LL
|
||||
@ -1233,23 +1031,9 @@ typedef char my_bool; /* Small bool */
|
||||
|
||||
#include <my_dbug.h>
|
||||
|
||||
/*
|
||||
Sometimes we want to make sure that the variable is not put into
|
||||
a register in debugging mode so we can see its value in the core
|
||||
*/
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
#define dbug_volatile volatile
|
||||
#else
|
||||
#define dbug_volatile
|
||||
#endif
|
||||
|
||||
/* Some helper macros */
|
||||
#define YESNO(X) ((X) ? "yes" : "no")
|
||||
|
||||
/* Defines for time function */
|
||||
#define SCALE_SEC 100
|
||||
#define SCALE_USEC 10000
|
||||
#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
|
||||
#define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */
|
||||
|
||||
@ -1447,8 +1231,8 @@ do { doubleget_union _tmp; \
|
||||
((uchar*) &def_temp)[7]=(M)[0];\
|
||||
(V) = def_temp; } while(0)
|
||||
#else
|
||||
#define float4get(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float))
|
||||
#define float4store(V,M) memcpy_fixed((uchar*) V,(uchar*) (&M),sizeof(float))
|
||||
#define float4get(V,M) memcpy(&V, (M), sizeof(float))
|
||||
#define float4store(V,M) memcpy(V, (&M), sizeof(float))
|
||||
|
||||
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
|
||||
#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((uchar *) &V)[4];\
|
||||
@ -1518,12 +1302,12 @@ do { doubleget_union _tmp; \
|
||||
*(((char*)T)+1)=(((A) >> 16));\
|
||||
*(((char*)T)+0)=(((A) >> 24)); } while(0)
|
||||
|
||||
#define floatget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(float))
|
||||
#define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*)(&V),sizeof(float))
|
||||
#define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double))
|
||||
#define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(double))
|
||||
#define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulonglong))
|
||||
#define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulonglong))
|
||||
#define floatget(V,M) memcpy(&V, (M), sizeof(float))
|
||||
#define floatstore(T,V) memcpy((T), (void*) (&V), sizeof(float))
|
||||
#define doubleget(V,M) memcpy(&V, (M), sizeof(double))
|
||||
#define doublestore(T,V) memcpy((T), (void *) &V, sizeof(double))
|
||||
#define longlongget(V,M) memcpy(&V, (M), sizeof(ulonglong))
|
||||
#define longlongstore(T,V) memcpy((T), &V, sizeof(ulonglong))
|
||||
|
||||
#else
|
||||
|
||||
@ -1534,15 +1318,15 @@ do { doubleget_union _tmp; \
|
||||
#define shortstore(T,V) int2store(T,V)
|
||||
#define longstore(T,V) int4store(T,V)
|
||||
#ifndef floatstore
|
||||
#define floatstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) (&V),sizeof(float))
|
||||
#define floatget(V,M) memcpy_fixed((uchar*) &V, (uchar*) (M), sizeof(float))
|
||||
#define floatstore(T,V) memcpy((T), (void *) (&V), sizeof(float))
|
||||
#define floatget(V,M) memcpy(&V, (M), sizeof(float))
|
||||
#endif
|
||||
#ifndef doubleget
|
||||
#define doubleget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(double))
|
||||
#define doublestore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(double))
|
||||
#define doubleget(V,M) memcpy(&V, (M), sizeof(double))
|
||||
#define doublestore(T,V) memcpy((T), (void *) &V, sizeof(double))
|
||||
#endif /* doubleget */
|
||||
#define longlongget(V,M) memcpy_fixed((uchar*) &V,(uchar*) (M),sizeof(ulonglong))
|
||||
#define longlongstore(T,V) memcpy_fixed((uchar*) (T),(uchar*) &V,sizeof(ulonglong))
|
||||
#define longlongget(V,M) memcpy(&V, (M), sizeof(ulonglong))
|
||||
#define longlongstore(T,V) memcpy((T), &V, sizeof(ulonglong))
|
||||
|
||||
#endif /* WORDS_BIGENDIAN */
|
||||
|
||||
@ -1580,11 +1364,6 @@ do { doubleget_union _tmp; \
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* FreeBSD 2.2.2 does not define RTLD_NOW) */
|
||||
#ifndef RTLD_NOW
|
||||
#define RTLD_NOW 1
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_DLERROR
|
||||
#define dlerror() ""
|
||||
#endif
|
||||
@ -1700,8 +1479,6 @@ static inline double rint(double x)
|
||||
#undef HAVE_SMEM /* No shared memory */
|
||||
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
|
||||
|
||||
#define DONT_USE_RAID
|
||||
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
|
||||
#endif /* my_global_h */
|
||||
|
@ -14,9 +14,6 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
thread safe version of some common functions:
|
||||
my_inet_ntoa
|
||||
|
||||
This file is also used to make handling of sockets and ioctl()
|
||||
portable accross systems.
|
||||
|
||||
@ -76,10 +73,6 @@ C_MODE_START
|
||||
#define in_addr_t uint32
|
||||
#endif
|
||||
|
||||
/* Thread safe or portable version of some functions */
|
||||
|
||||
void my_inet_ntoa(struct in_addr in, char *buf);
|
||||
|
||||
/*
|
||||
Handling of gethostbyname_r()
|
||||
*/
|
||||
|
@ -30,7 +30,7 @@ extern "C" {
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#undef my_read /* Can be predefined in raid.h */
|
||||
#undef my_read
|
||||
#undef my_write
|
||||
#undef my_seek
|
||||
#define my_read(a,b,c,d) my_quick_read(a,b,c,d)
|
||||
|
@ -78,7 +78,7 @@ extern int my_errno; /* Last error in mysys */
|
||||
#define MY_WAIT_IF_FULL 32 /* Wait and try again if disk full error */
|
||||
#define MY_IGNORE_BADFD 32 /* my_sync: ignore 'bad descriptor' errors */
|
||||
#define MY_SYNC_DIR 8192 /* my_create/delete/rename: sync directory */
|
||||
#define MY_RAID 64 /* Support for RAID */
|
||||
#define MY_UNUSED 64 /* Unused (was support for RAID) */
|
||||
#define MY_FULL_IO 512 /* For my_read - loop intil I/O is complete */
|
||||
#define MY_DONT_CHECK_FILESIZE 128 /* Option to init_io_cache() */
|
||||
#define MY_LINK_WARNING 32 /* my_redel() gives warning if links */
|
||||
@ -101,10 +101,6 @@ extern int my_errno; /* Last error in mysys */
|
||||
#define MY_GIVE_INFO 2 /* Give time info about process*/
|
||||
#define MY_DONT_FREE_DBUG 4 /* Do not call DBUG_END() in my_end() */
|
||||
|
||||
#define MY_REMOVE_NONE 0 /* Params for modify_defaults_file */
|
||||
#define MY_REMOVE_OPTION 1
|
||||
#define MY_REMOVE_SECTION 2
|
||||
|
||||
#define ME_HIGHBYTE 8 /* Shift for colours */
|
||||
#define ME_NOCUR 1 /* Don't use curses message */
|
||||
#define ME_OLDWIN 2 /* Use old window */
|
||||
@ -266,13 +262,6 @@ extern const char *my_defaults_file;
|
||||
|
||||
extern my_bool timed_mutexes;
|
||||
|
||||
typedef struct wild_file_pack /* Struct to hold info when selecting files */
|
||||
{
|
||||
uint wilds; /* How many wildcards */
|
||||
uint not_pos; /* Start of not-theese-files */
|
||||
char * *wild; /* Pointer to wildcards */
|
||||
} WF_PACK;
|
||||
|
||||
enum loglevel {
|
||||
ERROR_LEVEL,
|
||||
WARNING_LEVEL,
|
||||
@ -568,7 +557,6 @@ typedef int (*Process_option_func)(void *ctx, const char *group_name,
|
||||
/* Prototypes for mysys and my_func functions */
|
||||
|
||||
extern int my_copy(const char *from,const char *to,myf MyFlags);
|
||||
extern int my_append(const char *from,const char *to,myf MyFlags);
|
||||
extern int my_delete(const char *name,myf MyFlags);
|
||||
extern int my_getwd(char * buf,size_t size,myf MyFlags);
|
||||
extern int my_setwd(const char *dir,myf MyFlags);
|
||||
@ -584,7 +572,6 @@ extern File my_register_filename(File fd, const char *FileName,
|
||||
extern File my_create(const char *FileName,int CreateFlags,
|
||||
int AccessFlags, myf MyFlags);
|
||||
extern int my_close(File Filedes,myf MyFlags);
|
||||
extern File my_dup(File file, myf MyFlags);
|
||||
extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
|
||||
extern int my_readlink(char *to, const char *filename, myf MyFlags);
|
||||
extern int my_is_symlink(const char *filename);
|
||||
@ -713,9 +700,6 @@ extern char * my_load_path(char * to, const char *path,
|
||||
const char *own_path_prefix);
|
||||
extern int wild_compare(const char *str,const char *wildstr,
|
||||
pbool str_is_pattern);
|
||||
extern WF_PACK *wf_comp(char * str);
|
||||
extern int wf_test(struct wild_file_pack *wf_pack,const char *name);
|
||||
extern void wf_end(struct wild_file_pack *buffer);
|
||||
extern my_bool array_append_string_unique(const char *str,
|
||||
const char **array, size_t size);
|
||||
extern void get_date(char * to,int timeflag,time_t use_time);
|
||||
@ -729,8 +713,6 @@ extern int end_record_cache(RECORD_CACHE *info);
|
||||
extern int write_cache_record(RECORD_CACHE *info,my_off_t filepos,
|
||||
const uchar *record,size_t length);
|
||||
extern int flush_write_cache(RECORD_CACHE *info);
|
||||
extern long my_clock(void);
|
||||
extern sig_handler sigtstp_handler(int signal_number);
|
||||
extern void handle_recived_signals(void);
|
||||
|
||||
extern sig_handler my_set_alarm_variable(int signo);
|
||||
@ -852,9 +834,6 @@ extern int my_load_defaults(const char *conf_file, const char **groups,
|
||||
int *argc, char ***argv, const char ***);
|
||||
extern int load_defaults(const char *conf_file, const char **groups,
|
||||
int *argc, char ***argv);
|
||||
extern int modify_defaults_file(const char *file_location, const char *option,
|
||||
const char *option_value,
|
||||
const char *section_name, int remove_option);
|
||||
extern int my_search_option_files(const char *conf_file, int *argc,
|
||||
char ***argv, uint *args_used,
|
||||
Process_option_func func, void *func_ctx,
|
||||
|
@ -1,141 +0,0 @@
|
||||
/* Copyright (C) 2005 MySQL AB
|
||||
|
||||
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
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _trie_h
|
||||
#define _trie_h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct st_trie_node
|
||||
{
|
||||
uint16 leaf; /* Depth from root node if match, 0 else */
|
||||
uchar c; /* Label on this edge */
|
||||
struct st_trie_node *next; /* Next label */
|
||||
struct st_trie_node *links; /* Array of edges leaving this node */
|
||||
struct st_trie_node *fail; /* AC failure function */
|
||||
} TRIE_NODE;
|
||||
|
||||
typedef struct st_trie
|
||||
{
|
||||
TRIE_NODE root;
|
||||
MEM_ROOT mem_root;
|
||||
CHARSET_INFO *charset;
|
||||
uint32 nnodes;
|
||||
uint32 nwords;
|
||||
} TRIE;
|
||||
|
||||
typedef struct st_ac_trie_state
|
||||
{
|
||||
TRIE *trie;
|
||||
TRIE_NODE *node;
|
||||
} AC_TRIE_STATE;
|
||||
|
||||
extern TRIE *trie_init (TRIE *trie, CHARSET_INFO *charset);
|
||||
extern void trie_free (TRIE *trie);
|
||||
extern my_bool trie_insert (TRIE *trie, const uchar *key, uint keylen);
|
||||
extern my_bool ac_trie_prepare (TRIE *trie);
|
||||
extern void ac_trie_init (TRIE *trie, AC_TRIE_STATE *state);
|
||||
|
||||
|
||||
/* `trie_goto' is internal function and shouldn't be used. */
|
||||
|
||||
static inline TRIE_NODE *trie_goto (TRIE_NODE *root, TRIE_NODE *node, uchar c)
|
||||
{
|
||||
TRIE_NODE *next;
|
||||
DBUG_ENTER("trie_goto");
|
||||
for (next= node->links; next; next= next->next)
|
||||
if (next->c == c)
|
||||
DBUG_RETURN(next);
|
||||
if (root == node)
|
||||
DBUG_RETURN(root);
|
||||
DBUG_RETURN(NULL);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
SYNOPSIS
|
||||
int ac_trie_next (AC_TRIE_STATE *state, uchar *c);
|
||||
state - valid pointer to `AC_TRIE_STATE'
|
||||
c - character to lookup
|
||||
|
||||
DESCRIPTION
|
||||
Implementation of search using Aho-Corasick automaton.
|
||||
Performs char-by-char search.
|
||||
|
||||
RETURN VALUE
|
||||
`ac_trie_next' returns length of matched word or 0.
|
||||
*/
|
||||
|
||||
static inline int ac_trie_next (AC_TRIE_STATE *state, uchar *c)
|
||||
{
|
||||
TRIE_NODE *root, *node;
|
||||
DBUG_ENTER("ac_trie_next");
|
||||
DBUG_ASSERT(state && c);
|
||||
root= &state->trie->root;
|
||||
node= state->node;
|
||||
while (! (state->node= trie_goto(root, node, *c)))
|
||||
node= node->fail;
|
||||
DBUG_RETURN(state->node->leaf);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
SYNOPSIS
|
||||
my_bool trie_search (TRIE *trie, const uchar *key, uint keylen);
|
||||
trie - valid pointer to `TRIE'
|
||||
key - valid pointer to key to insert
|
||||
keylen - non-0 key length
|
||||
|
||||
DESCRIPTION
|
||||
Performs key lookup in trie.
|
||||
|
||||
RETURN VALUE
|
||||
`trie_search' returns `true' if key is in `trie'. Otherwise,
|
||||
`false' is returned.
|
||||
|
||||
NOTES
|
||||
Consecutive search here is "best by test". arrays are very short, so
|
||||
binary search or hashing would add too much complexity that would
|
||||
overweight speed gain. Especially because compiler can optimize simple
|
||||
consecutive loop better (tested)
|
||||
*/
|
||||
|
||||
static inline my_bool trie_search (TRIE *trie, const uchar *key, uint keylen)
|
||||
{
|
||||
TRIE_NODE *node;
|
||||
uint k;
|
||||
DBUG_ENTER("trie_search");
|
||||
DBUG_ASSERT(trie && key && keylen);
|
||||
node= &trie->root;
|
||||
|
||||
for (k= 0; k < keylen; k++)
|
||||
{
|
||||
uchar p;
|
||||
if (! (node= node->links))
|
||||
DBUG_RETURN(FALSE);
|
||||
p= key[k];
|
||||
while (p != node->c)
|
||||
if (! (node= node->next))
|
||||
DBUG_RETURN(FALSE);
|
||||
}
|
||||
|
||||
DBUG_RETURN(node->leaf > 0);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
@ -1,38 +0,0 @@
|
||||
/* Copyright (C) 2005 MySQL AB
|
||||
|
||||
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 the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef VLE_H
|
||||
#define VLE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "my_global.h"
|
||||
|
||||
/*
|
||||
The size (in bytes) required to store the object ITEM, which can be
|
||||
either an expression or a type (since sizeof() is used on the item).
|
||||
*/
|
||||
#define my_vle_sizeof(ITEM) (((sizeof(ITEM) * CHAR_BIT) + 6) / 7)
|
||||
|
||||
uchar *my_vle_encode(uchar *vle, size_t max, ulong value);
|
||||
uchar const *my_vle_decode(ulong *value_ptr, uchar const *vle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
@ -252,7 +252,7 @@ extern ulong myisam_block_size;
|
||||
extern uint myisam_concurrent_insert;
|
||||
extern my_bool myisam_flush,myisam_delay_key_write,myisam_single_user;
|
||||
extern my_off_t myisam_max_temp_length;
|
||||
extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;
|
||||
extern ulong myisam_data_pointer_size;
|
||||
|
||||
/* usually used to check if a symlink points into the mysql data home */
|
||||
/* which is normally forbidden */
|
||||
@ -481,8 +481,7 @@ int mi_repair_by_sort(MI_CHECK *param, register MI_INFO *info,
|
||||
int mi_repair_parallel(MI_CHECK *param, register MI_INFO *info,
|
||||
const char * name, int rep_quick);
|
||||
int change_to_newfile(const char * filename, const char * old_ext,
|
||||
const char * new_ext, uint raid_chunks,
|
||||
myf myflags);
|
||||
const char * new_ext, myf myflags);
|
||||
int lock_file(MI_CHECK *param, File file, my_off_t start, int lock_type,
|
||||
const char *filetype, const char *filename);
|
||||
void lock_memory(MI_CHECK *param);
|
||||
|
@ -28,7 +28,5 @@
|
||||
#undef HAVE_SMEM /* No shared memory */
|
||||
#undef HAVE_NDBCLUSTER_DB /* No NDB cluster */
|
||||
|
||||
#define DONT_USE_RAID
|
||||
|
||||
#endif /* EMBEDDED_LIBRARY */
|
||||
#endif /* MYSQL_EMBED_INCLUDED */
|
||||
|
@ -89,23 +89,11 @@ typedef struct st_thr_lock_info
|
||||
{
|
||||
pthread_t thread;
|
||||
my_thread_id thread_id;
|
||||
ulong n_cursors;
|
||||
} THR_LOCK_INFO;
|
||||
|
||||
/*
|
||||
Lock owner identifier. Globally identifies the lock owner within the
|
||||
thread and among all the threads. The address of an instance of this
|
||||
structure is used as id.
|
||||
*/
|
||||
|
||||
typedef struct st_thr_lock_owner
|
||||
{
|
||||
THR_LOCK_INFO *info;
|
||||
} THR_LOCK_OWNER;
|
||||
|
||||
|
||||
typedef struct st_thr_lock_data {
|
||||
THR_LOCK_OWNER *owner;
|
||||
THR_LOCK_INFO *owner;
|
||||
struct st_thr_lock_data *next,**prev;
|
||||
struct st_thr_lock *lock;
|
||||
mysql_cond_t *cond;
|
||||
@ -141,19 +129,18 @@ extern LIST *thr_lock_thread_list;
|
||||
extern mysql_mutex_t THR_LOCK_lock;
|
||||
|
||||
my_bool init_thr_lock(void); /* Must be called once/thread */
|
||||
#define thr_lock_owner_init(owner, info_arg) (owner)->info= (info_arg)
|
||||
void thr_lock_info_init(THR_LOCK_INFO *info);
|
||||
void thr_lock_init(THR_LOCK *lock);
|
||||
void thr_lock_delete(THR_LOCK *lock);
|
||||
void thr_lock_data_init(THR_LOCK *lock,THR_LOCK_DATA *data,
|
||||
void *status_param);
|
||||
enum enum_thr_lock_result thr_lock(THR_LOCK_DATA *data,
|
||||
THR_LOCK_OWNER *owner,
|
||||
THR_LOCK_INFO *owner,
|
||||
enum thr_lock_type lock_type,
|
||||
ulong lock_wait_timeout);
|
||||
void thr_unlock(THR_LOCK_DATA *data);
|
||||
enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
|
||||
uint count, THR_LOCK_OWNER *owner,
|
||||
uint count, THR_LOCK_INFO *owner,
|
||||
ulong lock_wait_timeout);
|
||||
void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
|
||||
void
|
||||
|
@ -21,8 +21,8 @@
|
||||
# This file is public domain and comes with NO WARRANTY of any kind
|
||||
|
||||
target = libmysqlclient.la
|
||||
target_defs = -DMYSQL_CLIENT_NO_THREADS -DDONT_USE_RAID \
|
||||
-DDISABLE_MYSQL_THREAD_H @LIB_EXTRA_CCFLAGS@
|
||||
target_defs = -DMYSQL_CLIENT_NO_THREADS -DDISABLE_MYSQL_THREAD_H \
|
||||
@LIB_EXTRA_CCFLAGS@
|
||||
|
||||
LIBS = @CLIENT_LIBS@
|
||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||
@ -33,7 +33,7 @@ include $(srcdir)/Makefile.shared
|
||||
libmysqlclient_la_SOURCES = $(target_sources)
|
||||
libmysqlclient_la_LIBADD = $(target_libadd) $(yassl_las)
|
||||
libmysqlclient_la_LDFLAGS = $(target_ldflags)
|
||||
EXTRA_DIST = Makefile.shared libmysql.def dll.c CMakeLists.txt
|
||||
EXTRA_DIST = Makefile.shared libmysql.def CMakeLists.txt
|
||||
noinst_HEADERS = client_settings.h
|
||||
|
||||
link_sources:
|
||||
@ -82,7 +82,7 @@ link_sources:
|
||||
# keep only the stubs for debug.c
|
||||
#
|
||||
# A list of needed headers collected from the deps information 000213
|
||||
nh = my_global.h config-win32.h dbug.h errmsg.h \
|
||||
nh = my_global.h dbug.h errmsg.h \
|
||||
m_ctype.h m_string.h password.h \
|
||||
my_alarm.h my_config.h my_dir.h my_list.h my_net.h my_sys.h \
|
||||
mysql.h mysql_com.h mysql_version.h mysqld_error.h \
|
||||
|
@ -37,7 +37,7 @@ target_sources = libmysql.c password.c \
|
||||
mystringsobjects = strmov.lo strxmov.lo strxnmov.lo strnmov.lo \
|
||||
strmake.lo strend.lo \
|
||||
strnlen.lo strfill.lo is_prefix.lo \
|
||||
int2str.lo str2int.lo strinstr.lo strcont.lo \
|
||||
int2str.lo str2int.lo strcont.lo \
|
||||
strcend.lo ctype-latin1.lo \
|
||||
bchange.lo bmove.lo bmove_upp.lo longlong2str.lo \
|
||||
strtoull.lo strtoll.lo llstr.lo my_vsnprintf.lo \
|
||||
@ -61,9 +61,8 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo \
|
||||
mf_format.lo mf_path.lo mf_unixpath.lo my_fopen.lo \
|
||||
my_symlink.lo my_fstream.lo mf_arr_appstr.lo \
|
||||
mf_loadpath.lo my_pthread.lo my_thr_init.lo \
|
||||
thr_mutex.lo mulalloc.lo string.lo \
|
||||
default.lo default_modify.lo \
|
||||
my_compress.lo array.lo my_once.lo list.lo my_net.lo \
|
||||
thr_mutex.lo mulalloc.lo string.lo default.lo \
|
||||
my_compress.lo array.lo my_once.lo list.lo \
|
||||
charset.lo charset-def.lo hash.lo mf_iocache.lo \
|
||||
mf_iocache2.lo my_seek.lo my_sleep.lo \
|
||||
my_pread.lo mf_cache.lo md5.lo sha1.lo \
|
||||
|
107
libmysql/dll.c
107
libmysql/dll.c
@ -1,107 +0,0 @@
|
||||
/* Copyright (C) 2000-2004 MySQL AB
|
||||
|
||||
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
|
||||
the Free Software Foundation.
|
||||
|
||||
There are special exceptions to the terms and conditions of the GPL as it
|
||||
is applied to this software. View the full text of the exception in file
|
||||
EXCEPTIONS-CLIENT in the directory of this software distribution.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
** Handling initialization of the dll library
|
||||
*/
|
||||
|
||||
#include <my_global.h>
|
||||
#include <my_sys.h>
|
||||
#include <my_pthread.h>
|
||||
|
||||
static my_bool libmysql_inited=0;
|
||||
|
||||
void libmysql_init(void)
|
||||
{
|
||||
if (libmysql_inited)
|
||||
return;
|
||||
libmysql_inited=1;
|
||||
my_init();
|
||||
{
|
||||
DBUG_ENTER("libmysql_init");
|
||||
#ifdef LOG_ALL
|
||||
DBUG_PUSH("d:t:S:O,c::\\tmp\\libmysql.log");
|
||||
#else
|
||||
if (getenv("LIBMYSQL_LOG") != NULL)
|
||||
DBUG_PUSH(getenv("LIBMYSQL_LOG"));
|
||||
#endif
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __WIN__
|
||||
|
||||
static int inited=0,threads=0;
|
||||
HINSTANCE s_hModule; /* Saved module handle */
|
||||
DWORD main_thread;
|
||||
|
||||
BOOL APIENTRY LibMain(HANDLE hInst,DWORD ul_reason_being_called,
|
||||
LPVOID lpReserved)
|
||||
{
|
||||
switch (ul_reason_being_called) {
|
||||
case DLL_PROCESS_ATTACH: /* case of libentry call in win 3.x */
|
||||
if (!inited++)
|
||||
{
|
||||
s_hModule=hInst;
|
||||
libmysql_init();
|
||||
main_thread=GetCurrentThreadId();
|
||||
}
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
threads++;
|
||||
my_thread_init();
|
||||
break;
|
||||
case DLL_PROCESS_DETACH: /* case of wep call in win 3.x */
|
||||
if (!--inited) /* Safety */
|
||||
{
|
||||
/* my_thread_init() */ /* This may give extra safety */
|
||||
my_end(0);
|
||||
}
|
||||
break;
|
||||
case DLL_THREAD_DETACH:
|
||||
/* Main thread will free by my_end() */
|
||||
threads--;
|
||||
if (main_thread != GetCurrentThreadId())
|
||||
my_thread_end();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} /* switch */
|
||||
|
||||
return TRUE;
|
||||
|
||||
UNREFERENCED_PARAMETER(lpReserved);
|
||||
} /* LibMain */
|
||||
|
||||
|
||||
static BOOL do_libmain;
|
||||
int __stdcall DllMain(HANDLE hInst,DWORD ul_reason_being_called,LPVOID lpReserved)
|
||||
{
|
||||
/*
|
||||
Unless environment variable LIBMYSQL_DLLINIT is set, do nothing.
|
||||
The environment variable is checked once, during the first call to DllMain()
|
||||
(in DLL_PROCESS_ATTACH hook).
|
||||
*/
|
||||
if (ul_reason_being_called == DLL_PROCESS_ATTACH)
|
||||
do_libmain = (getenv("LIBMYSQL_DLLINIT") != NULL);
|
||||
if (do_libmain)
|
||||
return LibMain(hInst,ul_reason_being_called,lpReserved);
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -24,139 +24,6 @@
|
||||
#include <my_sys.h>
|
||||
#include "errmsg.h"
|
||||
|
||||
#ifdef GERMAN
|
||||
const char *client_errors[]=
|
||||
{
|
||||
"Unbekannter MySQL Fehler",
|
||||
"Kann UNIX-Socket nicht anlegen (%d)",
|
||||
"Keine Verbindung zu lokalem MySQL Server, socket: '%-.100s' (%d)",
|
||||
"Keine Verbindung zu MySQL Server auf %-.100s (%d)",
|
||||
"Kann TCP/IP-Socket nicht anlegen (%d)",
|
||||
"Unbekannter MySQL Server Host (%-.100s) (%d)",
|
||||
"MySQL Server nicht vorhanden",
|
||||
"Protokolle ungleich; Server Version = %d, Client Version = %d",
|
||||
"MySQL client ran out of memory",
|
||||
"Wrong host info",
|
||||
"Localhost via UNIX socket",
|
||||
"%-.100s via TCP/IP",
|
||||
"Error in server handshake",
|
||||
"Lost connection to MySQL server during query",
|
||||
"Commands out of sync; you can't run this command now",
|
||||
"Verbindung ueber Named Pipe: %-.32s",
|
||||
"Kann nicht auf Named Pipe warten. Host: %-.64s pipe: %-.32s (%lu)",
|
||||
"Kann Named Pipe nicht oeffnen. Host: %-.64s pipe: %-.32s (%lu)",
|
||||
"Kann den Status der Named Pipe nicht setzen. Host: %-.64s pipe: %-.32s (%lu)",
|
||||
"Can't initialize character set %-.32s (path: %-.100s)",
|
||||
"Got packet bigger than 'max_allowed_packet' bytes",
|
||||
"Embedded server",
|
||||
"Error on SHOW SLAVE STATUS:",
|
||||
"Error on SHOW SLAVE HOSTS:",
|
||||
"Error connecting to slave:",
|
||||
"Error connecting to master:",
|
||||
"SSL connection error",
|
||||
"Malformed packet",
|
||||
"This client library is licensed only for use with MySQL servers having '%s' license",
|
||||
"Invalid use of null pointer",
|
||||
"Statement not prepared",
|
||||
"No data supplied for parameters in prepared statement",
|
||||
"Data truncated",
|
||||
"No parameters exist in the statement",
|
||||
"Invalid parameter number",
|
||||
"Can't send long data for non-string/non-binary data types (parameter: %d)",
|
||||
"Using unsupported buffer type: %d (parameter: %d)",
|
||||
"Shared memory: %-.100s",
|
||||
"Can't open shared memory; client could not create request event (%lu)",
|
||||
"Can't open shared memory; no answer event received from server (%lu)",
|
||||
"Can't open shared memory; server could not allocate file mapping (%lu)",
|
||||
"Can't open shared memory; server could not get pointer to file mapping (%lu)",
|
||||
"Can't open shared memory; client could not allocate file mapping (%lu)",
|
||||
"Can't open shared memory; client could not get pointer to file mapping (%lu)",
|
||||
"Can't open shared memory; client could not create %s event (%lu)",
|
||||
"Can't open shared memory; no answer from server (%lu)",
|
||||
"Can't open shared memory; cannot send request event to server (%lu)",
|
||||
"Wrong or unknown protocol",
|
||||
"Invalid connection handle",
|
||||
"Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
|
||||
"Row retrieval was canceled by mysql_stmt_close() call",
|
||||
"Attempt to read column without prior row fetch",
|
||||
"Prepared statement contains no metadata",
|
||||
"Attempt to read a row while there is no result set associated with the statement",
|
||||
"This feature is not implemented yet",
|
||||
"Lost connection to MySQL server at '%s', system error: %d",
|
||||
"Statement closed indirectly because of a preceeding %s() call",
|
||||
"The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again",
|
||||
"This handle is already connected. Use a separate handle for each connection."
|
||||
""
|
||||
};
|
||||
|
||||
/* Start of code added by Roberto M. Serqueira - martinsc@uol.com.br - 05.24.2001 */
|
||||
|
||||
#elif defined PORTUGUESE
|
||||
const char *client_errors[]=
|
||||
{
|
||||
"Erro desconhecido do MySQL",
|
||||
"N<EFBFBD>o pode criar 'UNIX socket' (%d)",
|
||||
"N<EFBFBD>o pode se conectar ao servidor MySQL local atrav<61>s do 'socket' '%-.100s' (%d)",
|
||||
"N<EFBFBD>o pode se conectar ao servidor MySQL em '%-.100s' (%d)",
|
||||
"N<EFBFBD>o pode criar 'socket TCP/IP' (%d)",
|
||||
"'Host' servidor MySQL '%-.100s' (%d) desconhecido",
|
||||
"Servidor MySQL desapareceu",
|
||||
"Incompatibilidade de protocolos; vers<72>o do servidor = %d, vers<72>o do cliente = %d",
|
||||
"Cliente do MySQL com falta de mem<65>ria",
|
||||
"Informa<EFBFBD><EFBFBD>o inv<6E>lida de 'host'",
|
||||
"Localhost via 'UNIX socket'",
|
||||
"%-.100s via 'TCP/IP'",
|
||||
"Erro na negocia<69><61>o de acesso ao servidor",
|
||||
"Conex<EFBFBD>o perdida com servidor MySQL durante 'query'",
|
||||
"Comandos fora de sincronismo; voc<6F> n<>o pode executar este comando agora",
|
||||
"Named pipe: %-.32s",
|
||||
"N<EFBFBD>o pode esperar pelo 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
|
||||
"N<EFBFBD>o pode abrir 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
|
||||
"N<EFBFBD>o pode estabelecer o estado do 'named pipe' para o 'host' %-.64s - 'pipe' %-.32s (%lu)",
|
||||
"N<EFBFBD>o pode inicializar conjunto de caracteres %-.32s (caminho %-.100s)",
|
||||
"Obteve pacote maior do que 'max_allowed_packet' bytes",
|
||||
"Embedded server"
|
||||
"Error on SHOW SLAVE STATUS:",
|
||||
"Error on SHOW SLAVE HOSTS:",
|
||||
"Error connecting to slave:",
|
||||
"Error connecting to master:",
|
||||
"SSL connection error",
|
||||
"Malformed packet",
|
||||
"This client library is licensed only for use with MySQL servers having '%s' license",
|
||||
"Invalid use of null pointer",
|
||||
"Statement not prepared",
|
||||
"No data supplied for parameters in prepared statement",
|
||||
"Data truncated",
|
||||
"No parameters exist in the statement",
|
||||
"Invalid parameter number",
|
||||
"Can't send long data for non-string/non-binary data types (parameter: %d)",
|
||||
"Using unsupported buffer type: %d (parameter: %d)",
|
||||
"Shared memory: %-.100s",
|
||||
"Can't open shared memory; client could not create request event (%lu)",
|
||||
"Can't open shared memory; no answer event received from server (%lu)",
|
||||
"Can't open shared memory; server could not allocate file mapping (%lu)",
|
||||
"Can't open shared memory; server could not get pointer to file mapping (%lu)",
|
||||
"Can't open shared memory; client could not allocate file mapping (%lu)",
|
||||
"Can't open shared memory; client could not get pointer to file mapping (%lu)",
|
||||
"Can't open shared memory; client could not create %s event (%lu)",
|
||||
"Can't open shared memory; no answer from server (%lu)",
|
||||
"Can't open shared memory; cannot send request event to server (%lu)",
|
||||
"Wrong or unknown protocol",
|
||||
"Invalid connection handle",
|
||||
"Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)",
|
||||
"Row retrieval was canceled by mysql_stmt_close() call",
|
||||
"Attempt to read column without prior row fetch",
|
||||
"Prepared statement contains no metadata",
|
||||
"Attempt to read a row while there is no result set associated with the statement",
|
||||
"This feature is not implemented yet",
|
||||
"Lost connection to MySQL server at '%s', system error: %d",
|
||||
"Statement closed indirectly because of a preceeding %s() call",
|
||||
"The number of columns in the result set differs from the number of bound buffers. You must reset the statement, rebind the result set columns, and execute the statement again",
|
||||
"This handle is already connected. Use a separate handle for each connection."
|
||||
""
|
||||
};
|
||||
|
||||
#else /* ENGLISH */
|
||||
const char *client_errors[]=
|
||||
{
|
||||
"Unknown MySQL error",
|
||||
@ -220,7 +87,6 @@ const char *client_errors[]=
|
||||
"This handle is already connected. Use a separate handle for each connection."
|
||||
""
|
||||
};
|
||||
#endif
|
||||
|
||||
const char** get_client_errmsgs()
|
||||
{
|
||||
|
@ -214,13 +214,6 @@ void STDCALL mysql_server_end()
|
||||
}
|
||||
|
||||
mysql_client_init= org_my_init_done= 0;
|
||||
#ifdef EMBEDDED_SERVER
|
||||
if (stderror_file)
|
||||
{
|
||||
fclose(stderror_file);
|
||||
stderror_file= 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static MYSQL_PARAMETERS mysql_internal_parameters=
|
||||
|
@ -21,8 +21,7 @@
|
||||
# This file is public domain and comes with NO WARRANTY of any kind
|
||||
|
||||
target = libmysqlclient_r.la
|
||||
target_defs = -DDISABLE_MYSQL_PRLOCK_H -DDONT_USE_RAID \
|
||||
-DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@
|
||||
target_defs = -DDISABLE_MYSQL_PRLOCK_H -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@
|
||||
|
||||
LIBS = @LIBS@ @ZLIB_LIBS@ @openssl_libs@
|
||||
|
||||
|
@ -67,7 +67,7 @@ SET(SQL_EMBEDDED_SOURCES emb_qcache.cc libmysqld.c lib_sql.cc
|
||||
../sql/sql_truncate.cc
|
||||
../sql/sql_lex.cc ../sql/keycaches.cc
|
||||
../sql/sql_list.cc ../sql/sql_load.cc ../sql/sql_locale.cc
|
||||
../sql/sql_binlog.cc ../sql/sql_manager.cc ../sql/sql_map.cc
|
||||
../sql/sql_binlog.cc ../sql/sql_manager.cc
|
||||
../sql/sql_parse.cc ../sql/sql_partition.cc ../sql/sql_plugin.cc
|
||||
../sql/debug_sync.cc
|
||||
../sql/sql_prepare.cc ../sql/sql_rename.cc ../sql/sql_repl.cc
|
||||
|
@ -66,7 +66,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
|
||||
sql_profile.cc sql_truncate.cc datadict.cc \
|
||||
sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc \
|
||||
sql_crypt.cc sql_db.cc sql_delete.cc sql_error.cc sql_insert.cc \
|
||||
sql_lex.cc sql_list.cc sql_manager.cc sql_map.cc \
|
||||
sql_lex.cc sql_list.cc sql_manager.cc \
|
||||
scheduler.cc sql_connect.cc sql_parse.cc \
|
||||
sql_prepare.cc sql_derived.cc sql_rename.cc \
|
||||
sql_select.cc sql_do.cc sql_show.cc set_var.cc sys_vars.cc \
|
||||
|
@ -14,6 +14,7 @@ main.information_schema # Bug#47449 2009-09-19 alik main.inform
|
||||
main.lock_multi_bug38499 # Bug#47448 2009-09-19 alik main.lock_multi_bug38499 times out sporadically
|
||||
main.lock_multi_bug38691 @solaris # Bug#47792 2009-10-02 alik main.lock_multi_bug38691 times out sporadically on Solaris 10
|
||||
main.log_tables # Bug#47924 2009-10-08 alik main.log_tables times out sporadically
|
||||
main.lowercase_table2 @darwin # Bug#55509 2010-07-26 alik main.lowercase_table2 fails on Mac OSX (again)
|
||||
main.mysqlbinlog_row @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
|
||||
main.mysqlbinlog_row_innodb @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
|
||||
main.mysqlbinlog_row_myisam @solaris # Bug#52202 2010-03-22 alik mysqlbinlog_row* fail in daily-trunk on Sol10 x86_64 debug_max
|
||||
@ -25,7 +26,6 @@ main.type_float @freebsd # Bug#38965 2010-05-04 alik test cases
|
||||
main.wait_timeout @solaris # Bug#51244 2010-04-26 alik wait_timeout fails on OpenSolaris
|
||||
|
||||
parts.partition_alter4_innodb # Bug#45299 2010-06-28 alik Test "partition_alter4_innodb" is taking too long, timeout
|
||||
perfschema.pfs_upgrade # Bug#53102 2010-06-15 alik perfschema.pfs_upgrade fails on sol10 sparc64 max in parallel mode
|
||||
|
||||
rpl.rpl_heartbeat_basic # BUG#54820 2010-06-26 alik rpl.rpl_heartbeat_basic fails sporadically again
|
||||
rpl.rpl_heartbeat_2slaves # BUG#43828 2009-10-22 luis fails sporadically
|
||||
|
@ -1757,3 +1757,35 @@ disconnect con51355;
|
||||
--echo # Connection default
|
||||
connection default;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug#54401 assert in Diagnostics_area::set_eof_status , HANDLER
|
||||
--echo #
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
--enable_warnings
|
||||
|
||||
delimiter |;
|
||||
CREATE FUNCTION f1() RETURNS INTEGER
|
||||
BEGIN
|
||||
SELECT 1 FROM t2 INTO @a;
|
||||
RETURN 1;
|
||||
END|
|
||||
delimiter ;|
|
||||
|
||||
# Get f1() parsed and cached
|
||||
--error ER_NO_SUCH_TABLE
|
||||
SELECT f1();
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
HANDLER t1 OPEN;
|
||||
# This used to cause the assert
|
||||
--error ER_NO_SUCH_TABLE
|
||||
HANDLER t1 READ FIRST WHERE f1() = 1;
|
||||
HANDLER t1 CLOSE;
|
||||
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
|
@ -3113,7 +3113,6 @@ sub install_db ($$) {
|
||||
mtr_add_arg($args, "--bootstrap");
|
||||
mtr_add_arg($args, "--basedir=%s", $path_my_basedir);
|
||||
mtr_add_arg($args, "--datadir=%s", $data_dir);
|
||||
mtr_add_arg($args, "--loose-skip-innodb");
|
||||
mtr_add_arg($args, "--loose-skip-ndbcluster");
|
||||
mtr_add_arg($args, "--tmpdir=.");
|
||||
mtr_add_arg($args, "--core-file");
|
||||
|
@ -1370,3 +1370,16 @@ 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;
|
||||
#
|
||||
# Test for bug #53820 "ALTER a MEDIUMINT column table causes full
|
||||
# table copy".
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a INT, b MEDIUMINT);
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2);
|
||||
# The below ALTER should not copy table and so no rows should
|
||||
# be shown as affected.
|
||||
ALTER TABLE t1 CHANGE a id INT;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
DROP TABLE t1;
|
||||
|
@ -12775,3 +12775,29 @@ a
|
||||
1
|
||||
2
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#45377: ARCHIVE tables aren't discoverable after OPTIMIZE
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a int) ENGINE=ARCHIVE;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES (1);
|
||||
OPTIMIZE TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 optimize status OK
|
||||
FLUSH TABLES;
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
2
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=ARCHIVE DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
|
@ -1710,3 +1710,23 @@ ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
HANDLER t1 CLOSE;
|
||||
# Connection con51355
|
||||
# Connection default
|
||||
#
|
||||
# Bug#54401 assert in Diagnostics_area::set_eof_status , HANDLER
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
CREATE FUNCTION f1() RETURNS INTEGER
|
||||
BEGIN
|
||||
SELECT 1 FROM t2 INTO @a;
|
||||
RETURN 1;
|
||||
END|
|
||||
SELECT f1();
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ FIRST WHERE f1() = 1;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||
HANDLER t1 CLOSE;
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
|
@ -1707,6 +1707,26 @@ HANDLER t1 CLOSE;
|
||||
# Connection con51355
|
||||
# Connection default
|
||||
#
|
||||
# Bug#54401 assert in Diagnostics_area::set_eof_status , HANDLER
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
DROP FUNCTION IF EXISTS f1;
|
||||
CREATE FUNCTION f1() RETURNS INTEGER
|
||||
BEGIN
|
||||
SELECT 1 FROM t2 INTO @a;
|
||||
RETURN 1;
|
||||
END|
|
||||
SELECT f1();
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
HANDLER t1 OPEN;
|
||||
HANDLER t1 READ FIRST WHERE f1() = 1;
|
||||
ERROR 42S02: Table 'test.t2' doesn't exist
|
||||
HANDLER t1 CLOSE;
|
||||
DROP FUNCTION f1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG #46456: HANDLER OPEN + TRUNCATE + DROP (temporary) TABLE, crash
|
||||
#
|
||||
CREATE TABLE t1 AS SELECT 1 AS f1;
|
||||
|
@ -382,3 +382,14 @@ INSERT INTO t1 VALUES('A ', 'A ');
|
||||
ERROR 23000: Duplicate entry 'A -A ' for key 'key1'
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug #55472: Assertion failed in heap_rfirst function of hp_rfirst.c
|
||||
# on DELETE statement
|
||||
#
|
||||
CREATE TABLE t1 (col_int_nokey INT,
|
||||
col_int_key INT,
|
||||
INDEX(col_int_key) USING HASH) ENGINE = HEAP;
|
||||
INSERT INTO t1 (col_int_nokey, col_int_key) VALUES (3, 0), (4, 0), (3, 1);
|
||||
DELETE FROM t1 WHERE col_int_nokey = 5 ORDER BY col_int_key LIMIT 2;
|
||||
DROP TABLE t1;
|
||||
End of 5.5 tests
|
||||
|
@ -116,3 +116,35 @@ Table Op Msg_type Msg_text
|
||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||
test.t1 optimize status OK
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#49891 View DDL breaks REPEATABLE READ
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
DROP VIEW IF EXISTS v2;
|
||||
CREATE TABLE t1 ( f1 INTEGER ) ENGINE = innodb;
|
||||
CREATE TABLE t2 ( f1 INTEGER );
|
||||
CREATE VIEW v1 AS SELECT 1 FROM t1;
|
||||
# Connection con3
|
||||
LOCK TABLE t1 WRITE;
|
||||
# Connection default
|
||||
START TRANSACTION;
|
||||
# Sending:
|
||||
SELECT * FROM v1;
|
||||
# Connection con2
|
||||
# Waiting for 'SELECT * FROM v1' to sync in.
|
||||
# Sending:
|
||||
ALTER VIEW v1 AS SELECT 2 FROM t2;
|
||||
# Connection con3
|
||||
# Waiting for 'ALTER VIEW v1 AS SELECT 2 FROM t2' to sync in.
|
||||
UNLOCK TABLES;
|
||||
# Connection default;
|
||||
# Reaping: SELECT * FROM v1
|
||||
1
|
||||
SELECT * FROM v1;
|
||||
1
|
||||
COMMIT;
|
||||
# Connection con2
|
||||
# Reaping: ALTER VIEW v1 AS SELECT 2 FROM t2
|
||||
# Connection default
|
||||
DROP TABLE t1, t2;
|
||||
DROP VIEW v1;
|
||||
|
@ -48,3 +48,21 @@ Warnings:
|
||||
Error 1146 Table 'test.t1' doesn't exist
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= "RESET";
|
||||
#
|
||||
# Bug#53757 assert in mysql_truncate_by_delete
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1(a INT) Engine=InnoDB;
|
||||
CREATE TABLE t2(id INT);
|
||||
INSERT INTO t1 VALUES (1), (2);
|
||||
INSERT INTO t2 VALUES(connection_id());
|
||||
SET DEBUG_SYNC= "open_and_process_table SIGNAL opening WAIT_FOR killed";
|
||||
# Sending: (not reaped since connection is killed later)
|
||||
TRUNCATE t1;
|
||||
SET DEBUG_SYNC= "now WAIT_FOR opening";
|
||||
SELECT ((@id := id) - id) FROM t2;
|
||||
((@id := id) - id)
|
||||
0
|
||||
KILL @id;
|
||||
SET DEBUG_SYNC= "now SIGNAL killed";
|
||||
DROP TABLE t1, t2;
|
||||
|
@ -2527,3 +2527,240 @@ 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;
|
||||
#
|
||||
# Tests for schema-scope locks
|
||||
#
|
||||
DROP DATABASE IF EXISTS db1;
|
||||
DROP DATABASE IF EXISTS db2;
|
||||
# Test 1:
|
||||
# CREATE DATABASE blocks database DDL on the same database, but
|
||||
# not database DDL on different databases. Tests X vs X lock.
|
||||
#
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked';
|
||||
# Sending:
|
||||
CREATE DATABASE db1;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR locked';
|
||||
# Sending:
|
||||
CREATE DATABASE db1;
|
||||
# Connection con3
|
||||
CREATE DATABASE db2;
|
||||
ALTER DATABASE db2 DEFAULT CHARACTER SET utf8;
|
||||
DROP DATABASE db2;
|
||||
SET DEBUG_SYNC= 'now SIGNAL blocked';
|
||||
# Connection default
|
||||
# Reaping: CREATE DATABASE db1
|
||||
# Connection con2
|
||||
# Reaping: CREATE DATABASE db1
|
||||
ERROR HY000: Can't create database 'db1'; database exists
|
||||
# Test 2:
|
||||
# ALTER DATABASE blocks database DDL on the same database, but
|
||||
# not database DDL on different databases. Tests X vs X lock.
|
||||
#
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked';
|
||||
# Sending:
|
||||
ALTER DATABASE db1 DEFAULT CHARACTER SET utf8;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR locked';
|
||||
# Sending:
|
||||
ALTER DATABASE db1 DEFAULT CHARACTER SET utf8;
|
||||
# Connection con3
|
||||
CREATE DATABASE db2;
|
||||
ALTER DATABASE db2 DEFAULT CHARACTER SET utf8;
|
||||
DROP DATABASE db2;
|
||||
SET DEBUG_SYNC= 'now SIGNAL blocked';
|
||||
# Connection default
|
||||
# Reaping: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8
|
||||
# Connection con2
|
||||
# Reaping: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked';
|
||||
# Sending:
|
||||
ALTER DATABASE db1 DEFAULT CHARACTER SET utf8;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR locked';
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection con3
|
||||
SET DEBUG_SYNC= 'now SIGNAL blocked';
|
||||
# Connection default
|
||||
# Reaping: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8
|
||||
# Connection con2
|
||||
# Reaping: DROP DATABASE db1
|
||||
CREATE DATABASE db1;
|
||||
# Test 3:
|
||||
# Two ALTER..UPGRADE of the same database are mutually exclusive, but
|
||||
# two ALTER..UPGRADE of different databases are not. Tests X vs X lock.
|
||||
#
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked';
|
||||
# Sending:
|
||||
ALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR locked';
|
||||
# Sending:
|
||||
ALTER DATABASE `#mysql50#a-b-c` UPGRADE DATA DIRECTORY NAME;
|
||||
# Connection con3
|
||||
ALTER DATABASE `#mysql50#a-b-c-d` UPGRADE DATA DIRECTORY NAME;
|
||||
SET DEBUG_SYNC= 'now SIGNAL blocked';
|
||||
# Connection default
|
||||
# Reaping: ALTER DATABASE '#mysql50#a-b-c' UPGRADE DATA DIRECTORY NAME
|
||||
# Connection con2
|
||||
# Reaping: ALTER DATABASE '#mysql50#a-b-c' UPGRADE DATA DIRECTORY NAME
|
||||
ERROR 42000: Unknown database '#mysql50#a-b-c'
|
||||
DROP DATABASE `a-b-c`;
|
||||
DROP DATABASE `a-b-c-d`;
|
||||
# Test 4:
|
||||
# DROP DATABASE blocks database DDL on the same database, but
|
||||
# not database DDL on different databases. Tests X vs X lock.
|
||||
#
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked';
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR locked';
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection con3
|
||||
CREATE DATABASE db2;
|
||||
ALTER DATABASE db2 DEFAULT CHARACTER SET utf8;
|
||||
DROP DATABASE db2;
|
||||
SET DEBUG_SYNC= 'now SIGNAL blocked';
|
||||
# Connection default
|
||||
# Reaping: DROP DATABASE db1
|
||||
# Connection con2
|
||||
# Reaping: DROP DATABASE db1
|
||||
ERROR HY000: Can't drop database 'db1'; database doesn't exist
|
||||
# Connection default
|
||||
CREATE DATABASE db1;
|
||||
SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked';
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR locked';
|
||||
# Sending:
|
||||
ALTER DATABASE db1 DEFAULT CHARACTER SET utf8;
|
||||
# Connection con3
|
||||
SET DEBUG_SYNC= 'now SIGNAL blocked';
|
||||
# Connection default
|
||||
# Reaping: DROP DATABASE db1
|
||||
# Connection con2
|
||||
# Reaping: ALTER DATABASE db1 DEFAULT CHARACTER SET utf8
|
||||
Got one of the listed errors
|
||||
# Test 5:
|
||||
# Locked database name prevents CREATE of tables in that database.
|
||||
# Tests X vs IX lock.
|
||||
#
|
||||
# Connection default
|
||||
CREATE DATABASE db1;
|
||||
SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked';
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR locked';
|
||||
# Sending:
|
||||
CREATE TABLE db1.t1 (a INT);
|
||||
# Connection con3
|
||||
SET DEBUG_SYNC= 'now SIGNAL blocked';
|
||||
# Connection default
|
||||
# Reaping: DROP DATABASE db1
|
||||
# Connection con2
|
||||
# Reaping: CREATE TABLE db1.t1 (a INT)
|
||||
ERROR 42000: Unknown database 'db1'
|
||||
# Test 6:
|
||||
# Locked database name prevents RENAME of tables to/from that database.
|
||||
# Tests X vs IX lock.
|
||||
#
|
||||
# Connection default
|
||||
CREATE DATABASE db1;
|
||||
CREATE TABLE db1.t1 (a INT);
|
||||
SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked';
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR locked';
|
||||
# Sending:
|
||||
RENAME TABLE db1.t1 TO test.t1;
|
||||
# Connection con3
|
||||
SET DEBUG_SYNC= 'now SIGNAL blocked';
|
||||
# Connection default
|
||||
# Reaping: DROP DATABASE db1
|
||||
# Connection con2
|
||||
# Reaping: RENAME TABLE db1.t1 TO test.t1
|
||||
Got one of the listed errors
|
||||
# Connection default
|
||||
CREATE DATABASE db1;
|
||||
CREATE TABLE test.t2 (a INT);
|
||||
SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked';
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR locked';
|
||||
# Sending:
|
||||
RENAME TABLE test.t2 TO db1.t2;
|
||||
# Connection con3
|
||||
SET DEBUG_SYNC= 'now SIGNAL blocked';
|
||||
# Connection default
|
||||
# Reaping: DROP DATABASE db1
|
||||
# Connection con2
|
||||
# Reaping: RENAME TABLE test.t2 TO db1.t2
|
||||
Got one of the listed errors
|
||||
DROP TABLE test.t2;
|
||||
# Test 7:
|
||||
# Locked database name prevents DROP of tables in that database.
|
||||
# Tests X vs IX lock.
|
||||
#
|
||||
# Connection default
|
||||
CREATE DATABASE db1;
|
||||
CREATE TABLE db1.t1 (a INT);
|
||||
SET DEBUG_SYNC= 'after_wait_locked_schema_name SIGNAL locked WAIT_FOR blocked';
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection con2
|
||||
SET DEBUG_SYNC= 'now WAIT_FOR locked';
|
||||
# Sending:
|
||||
DROP TABLE db1.t1;
|
||||
# Connection con3
|
||||
SET DEBUG_SYNC= 'now SIGNAL blocked';
|
||||
# Connection default
|
||||
# Reaping: DROP DATABASE db1
|
||||
# Connection con2
|
||||
# Reaping: DROP TABLE db1.t1
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
# Connection default
|
||||
SET DEBUG_SYNC= 'RESET';
|
||||
#
|
||||
# End of tests for schema-scope locks
|
||||
#
|
||||
#
|
||||
# Tests of granted global S lock (FLUSH TABLE WITH READ LOCK)
|
||||
#
|
||||
CREATE DATABASE db1;
|
||||
CREATE TABLE db1.t1(a INT);
|
||||
# Connection default
|
||||
FLUSH TABLE WITH READ LOCK;
|
||||
# Connection con2
|
||||
CREATE TABLE db1.t2(a INT);
|
||||
# Connection default
|
||||
UNLOCK TABLES;
|
||||
# Connection con2
|
||||
# Reaping CREATE TABLE db1.t2(a INT)
|
||||
# Connection default
|
||||
FLUSH TABLE WITH READ LOCK;
|
||||
# Connection con2
|
||||
ALTER DATABASE db1 DEFAULT CHARACTER SET utf8;
|
||||
# Connection default
|
||||
UNLOCK TABLES;
|
||||
# Connection con2
|
||||
# Reaping ALTER DATABASE db1 DEFAULT CHARACTER SET utf8
|
||||
# Connection default
|
||||
FLUSH TABLE WITH READ LOCK;
|
||||
# Connection con2
|
||||
FLUSH TABLE WITH READ LOCK;
|
||||
UNLOCK TABLES;
|
||||
# Connection default
|
||||
UNLOCK TABLES;
|
||||
DROP DATABASE db1;
|
||||
|
@ -1,3 +1,5 @@
|
||||
set global storage_engine=myisam;
|
||||
set session storage_engine=myisam;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6;
|
||||
drop database if exists mysqltest;
|
||||
create table t1 (a int not null primary key auto_increment, message char(20));
|
||||
@ -584,7 +586,9 @@ INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2);
|
||||
CREATE TEMPORARY TABLE t3 (c1 INT NOT NULL) ENGINE=MRG_MYISAM UNION=(t1,t2);
|
||||
SELECT * FROM t3;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
c1
|
||||
1
|
||||
2
|
||||
CREATE TEMPORARY TABLE t4 (c1 INT NOT NULL);
|
||||
CREATE TEMPORARY TABLE t5 (c1 INT NOT NULL);
|
||||
INSERT INTO t4 VALUES (4);
|
||||
@ -613,7 +617,9 @@ ERROR HY000: Unable to open underlying table which is differently defined or of
|
||||
drop table t3;
|
||||
create temporary table t3 (a int not null) ENGINE=MERGE UNION=(t1,t2);
|
||||
select * from t3;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
a
|
||||
1
|
||||
2
|
||||
drop table t3, t2, t1;
|
||||
# CREATE...SELECT is not implemented for MERGE tables.
|
||||
CREATE TEMPORARY TABLE t1 (c1 INT NOT NULL);
|
||||
@ -1196,12 +1202,13 @@ ERROR HY000: Table 't4' was not locked with LOCK TABLES
|
||||
# it can even be used.
|
||||
CREATE TEMPORARY TABLE t4 LIKE t3;
|
||||
SHOW CREATE TABLE t4;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
Table Create Table
|
||||
t4 CREATE TEMPORARY TABLE `t4` (
|
||||
`c1` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
INSERT INTO t4 VALUES (4);
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
UNLOCK TABLES;
|
||||
INSERT INTO t4 VALUES (4);
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
DROP TABLE t4;
|
||||
#
|
||||
# Rename child.
|
||||
@ -1229,6 +1236,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
RENAME TABLE t2 TO t5;
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
@ -1239,6 +1248,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
#
|
||||
# 3. Normal rename with locked tables.
|
||||
LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE;
|
||||
@ -1248,6 +1259,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
RENAME TABLE t2 TO t5;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
@ -1256,6 +1269,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
RENAME TABLE t5 TO t2;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
@ -1264,6 +1279,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
UNLOCK TABLES;
|
||||
#
|
||||
# 4. Alter table rename.
|
||||
@ -1277,6 +1294,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
#
|
||||
# 5. Alter table rename with locked tables.
|
||||
LOCK TABLES t1 WRITE, t2 WRITE, t3 WRITE;
|
||||
@ -1293,6 +1312,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
#
|
||||
# Rename parent.
|
||||
#
|
||||
@ -1304,6 +1325,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
RENAME TABLE t3 TO t5;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
@ -1312,6 +1335,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
RENAME TABLE t5 TO t3;
|
||||
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
|
||||
SELECT * FROM t3 ORDER BY c1;
|
||||
@ -1320,6 +1345,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
#
|
||||
# 5. Alter table rename with locked tables.
|
||||
ALTER TABLE t3 RENAME TO t5;
|
||||
@ -1335,6 +1362,8 @@ c1
|
||||
2
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
DROP TABLE t1, t2, t3;
|
||||
#
|
||||
# Drop locked tables.
|
||||
@ -2650,6 +2679,705 @@ test.t1 optimize Error Unable to open underlying table which is differently defi
|
||||
test.t1 optimize note The storage engine for the table doesn't support optimize
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#36171 - CREATE TEMPORARY TABLE and MERGE engine
|
||||
# More tests with TEMPORARY MERGE table and permanent children.
|
||||
# First without locked tables.
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2, t3, t4, m1, m2;
|
||||
#
|
||||
CREATE TABLE t1 (c1 INT, c2 INT) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (c1 INT, c2 INT) ENGINE=MyISAM;
|
||||
CREATE TEMPORARY TABLE m1 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SHOW CREATE TABLE m1;
|
||||
Table Create Table
|
||||
m1 CREATE TEMPORARY TABLE `m1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
INSERT INTO t1 VALUES (111, 121);
|
||||
INSERT INTO m1 VALUES (211, 221);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
111 121
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
211 221
|
||||
#
|
||||
ALTER TABLE m1 RENAME m2;
|
||||
SHOW CREATE TABLE m2;
|
||||
Table Create Table
|
||||
m2 CREATE TEMPORARY TABLE `m2` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
#
|
||||
CREATE TEMPORARY TABLE m1 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
ALTER TABLE m2 RENAME m1;
|
||||
ERROR 42S01: Table 'm1' already exists
|
||||
DROP TABLE m1;
|
||||
ALTER TABLE m2 RENAME m1;
|
||||
SHOW CREATE TABLE m1;
|
||||
Table Create Table
|
||||
m1 CREATE TEMPORARY TABLE `m1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
#
|
||||
ALTER TABLE m1 ADD COLUMN c3 INT;
|
||||
INSERT INTO m1 VALUES (212, 222, 232);
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
SELECT * FROM m1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
ALTER TABLE t1 ADD COLUMN c3 INT;
|
||||
ALTER TABLE t2 ADD COLUMN c3 INT;
|
||||
INSERT INTO m1 VALUES (212, 222, 232);
|
||||
SELECT * FROM m1;
|
||||
c1 c2 c3
|
||||
111 121 NULL
|
||||
211 221 NULL
|
||||
212 222 232
|
||||
#
|
||||
ALTER TABLE m1 DROP COLUMN c3;
|
||||
INSERT INTO m1 VALUES (213, 223);
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
SELECT * FROM m1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
ALTER TABLE t1 DROP COLUMN c3;
|
||||
ALTER TABLE t2 DROP COLUMN c3;
|
||||
INSERT INTO m1 VALUES (213, 223);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
#
|
||||
CREATE TABLE t3 (c1 INT, c2 INT) ENGINE=MyISAM;
|
||||
ALTER TABLE m1 UNION=(t1,t2,t3);
|
||||
INSERT INTO m1 VALUES (311, 321);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
311 321
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
111 121
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
SELECT * FROM t3;
|
||||
c1 c2
|
||||
311 321
|
||||
#
|
||||
CREATE TEMPORARY TABLE t4 (c1 INT, c2 INT) ENGINE=MyISAM;
|
||||
ALTER TABLE m1 UNION=(t1,t2,t3,t4);
|
||||
INSERT INTO m1 VALUES (411, 421);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
311 321
|
||||
411 421
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
111 121
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
SELECT * FROM t3;
|
||||
c1 c2
|
||||
311 321
|
||||
SELECT * FROM t4;
|
||||
c1 c2
|
||||
411 421
|
||||
#
|
||||
ALTER TABLE m1 ENGINE=MyISAM;
|
||||
SHOW CREATE TABLE m1;
|
||||
Table Create Table
|
||||
m1 CREATE TEMPORARY TABLE `m1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
INSERT INTO m1 VALUES (511, 521);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
311 321
|
||||
411 421
|
||||
511 521
|
||||
#
|
||||
ALTER TABLE m1 ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
111 121
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
#
|
||||
CREATE TEMPORARY TABLE t1 (c1 INT, c2 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (611, 621);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
611 621
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
DROP TABLE t1;
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
#
|
||||
#
|
||||
SHOW CREATE TABLE m1;
|
||||
Table Create Table
|
||||
m1 CREATE TEMPORARY TABLE `m1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
#
|
||||
CREATE TABLE m2 SELECT * FROM m1;
|
||||
SHOW CREATE TABLE m2;
|
||||
Table Create Table
|
||||
m2 CREATE TABLE `m2` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
DROP TABLE m2;
|
||||
#
|
||||
CREATE TEMPORARY TABLE m2 SELECT * FROM m1;
|
||||
SHOW CREATE TABLE m2;
|
||||
Table Create Table
|
||||
m2 CREATE TEMPORARY TABLE `m2` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
DROP TABLE m2;
|
||||
#
|
||||
CREATE TABLE m2 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t3,t4)
|
||||
INSERT_METHOD=LAST;
|
||||
SELECT * FROM m2;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
DROP TABLE m2;
|
||||
#
|
||||
CREATE TABLE m2 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t3,t4)
|
||||
INSERT_METHOD=LAST SELECT * FROM m1;
|
||||
ERROR HY000: 'test.m2' is not BASE TABLE
|
||||
#
|
||||
CREATE TEMPORARY TABLE m2 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t3,t4)
|
||||
INSERT_METHOD=LAST SELECT * FROM m1;
|
||||
ERROR HY000: 'test.m2' is not BASE TABLE
|
||||
#
|
||||
CREATE TABLE m2 LIKE m1;
|
||||
SHOW CREATE TABLE m2;
|
||||
Table Create Table
|
||||
m2 CREATE TABLE `m2` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
DROP TABLE m2;
|
||||
#
|
||||
CREATE TEMPORARY TABLE m2 LIKE m1;
|
||||
SHOW CREATE TABLE m2;
|
||||
Table Create Table
|
||||
m2 CREATE TEMPORARY TABLE `m2` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
DROP TABLE m2;
|
||||
#
|
||||
CREATE TEMPORARY TABLE m2 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t3,t4)
|
||||
INSERT_METHOD=LAST;
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
311 321
|
||||
411 421
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
#
|
||||
#
|
||||
LOCK TABLE m1 WRITE, m2 WRITE;
|
||||
SELECT * FROM m1,m2 WHERE m1.c1=m2.c1;
|
||||
c1 c2 c1 c2
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
111 121 111 121
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
211 221 211 221
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
212 222 212 222
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
213 223 213 223
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1, t2, t3, t4, m1, m2;
|
||||
#
|
||||
# Bug#36171 - CREATE TEMPORARY TABLE and MERGE engine
|
||||
# More tests with TEMPORARY MERGE table and permanent children.
|
||||
# (continued) Now the same with locked table.
|
||||
#
|
||||
CREATE TABLE t1 (c1 INT, c2 INT) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (c1 INT, c2 INT) ENGINE=MyISAM;
|
||||
CREATE TEMPORARY TABLE m1 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SHOW CREATE TABLE m1;
|
||||
Table Create Table
|
||||
m1 CREATE TEMPORARY TABLE `m1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
INSERT INTO t1 VALUES (111, 121);
|
||||
INSERT INTO m1 VALUES (211, 221);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
111 121
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
211 221
|
||||
#
|
||||
LOCK TABLE m1 WRITE, t1 WRITE, t2 WRITE;
|
||||
#
|
||||
ALTER TABLE m1 RENAME m2;
|
||||
SHOW CREATE TABLE m2;
|
||||
Table Create Table
|
||||
m2 CREATE TEMPORARY TABLE `m2` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
#
|
||||
CREATE TEMPORARY TABLE m1 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
ALTER TABLE m2 RENAME m1;
|
||||
ERROR 42S01: Table 'm1' already exists
|
||||
DROP TABLE m1;
|
||||
ALTER TABLE m2 RENAME m1;
|
||||
SHOW CREATE TABLE m1;
|
||||
Table Create Table
|
||||
m1 CREATE TEMPORARY TABLE `m1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
#
|
||||
ALTER TABLE m1 ADD COLUMN c3 INT;
|
||||
INSERT INTO m1 VALUES (212, 222, 232);
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
SELECT * FROM m1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
ALTER TABLE t1 ADD COLUMN c3 INT;
|
||||
ALTER TABLE t2 ADD COLUMN c3 INT;
|
||||
INSERT INTO m1 VALUES (212, 222, 232);
|
||||
SELECT * FROM m1;
|
||||
c1 c2 c3
|
||||
111 121 NULL
|
||||
211 221 NULL
|
||||
212 222 232
|
||||
#
|
||||
ALTER TABLE m1 DROP COLUMN c3;
|
||||
INSERT INTO m1 VALUES (213, 223);
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
SELECT * FROM m1;
|
||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||
ALTER TABLE t1 DROP COLUMN c3;
|
||||
ALTER TABLE t2 DROP COLUMN c3;
|
||||
INSERT INTO m1 VALUES (213, 223);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
#
|
||||
UNLOCK TABLES;
|
||||
CREATE TABLE t3 (c1 INT, c2 INT) ENGINE=MyISAM;
|
||||
ALTER TABLE m1 UNION=(t1,t2,t3);
|
||||
LOCK TABLE m1 WRITE;
|
||||
INSERT INTO m1 VALUES (311, 321);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
311 321
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
111 121
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
SELECT * FROM t3;
|
||||
c1 c2
|
||||
311 321
|
||||
#
|
||||
CREATE TEMPORARY TABLE t4 (c1 INT, c2 INT) ENGINE=MyISAM;
|
||||
ALTER TABLE m1 UNION=(t1,t2,t3,t4);
|
||||
INSERT INTO m1 VALUES (411, 421);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
311 321
|
||||
411 421
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
111 121
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
SELECT * FROM t3;
|
||||
c1 c2
|
||||
311 321
|
||||
SELECT * FROM t4;
|
||||
c1 c2
|
||||
411 421
|
||||
#
|
||||
ALTER TABLE m1 ENGINE=MyISAM;
|
||||
SHOW CREATE TABLE m1;
|
||||
Table Create Table
|
||||
m1 CREATE TEMPORARY TABLE `m1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
INSERT INTO m1 VALUES (511, 521);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
311 321
|
||||
411 421
|
||||
511 521
|
||||
#
|
||||
ALTER TABLE m1 ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
111 121
|
||||
SELECT * FROM t2;
|
||||
c1 c2
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
#
|
||||
CREATE TEMPORARY TABLE t1 (c1 INT, c2 INT) ENGINE=MyISAM;
|
||||
INSERT INTO t1 VALUES (611, 621);
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
611 621
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
DROP TABLE t1;
|
||||
SELECT * FROM m1;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
#
|
||||
#
|
||||
SHOW CREATE TABLE m1;
|
||||
Table Create Table
|
||||
m1 CREATE TEMPORARY TABLE `m1` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
CREATE TABLE m2 SELECT * FROM m1;
|
||||
ERROR HY000: Table 'm2' was not locked with LOCK TABLES
|
||||
#
|
||||
CREATE TEMPORARY TABLE m2 SELECT * FROM m1;
|
||||
SHOW CREATE TABLE m2;
|
||||
Table Create Table
|
||||
m2 CREATE TEMPORARY TABLE `m2` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
DROP TABLE m2;
|
||||
#
|
||||
CREATE TEMPORARY TABLE m2 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t3,t4)
|
||||
INSERT_METHOD=LAST;
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
311 321
|
||||
411 421
|
||||
LOCK TABLE m1 WRITE, m2 WRITE;
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE m2;
|
||||
LOCK TABLE m1 WRITE;
|
||||
#
|
||||
# ER_TABLE_NOT_LOCKED is returned in ps-protocol
|
||||
CREATE TABLE m2 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t3,t4)
|
||||
INSERT_METHOD=LAST SELECT * FROM m1;
|
||||
Got one of the listed errors
|
||||
#
|
||||
CREATE TEMPORARY TABLE m2 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t3,t4)
|
||||
INSERT_METHOD=LAST SELECT * FROM m1;
|
||||
ERROR HY000: 'test.m2' is not BASE TABLE
|
||||
#
|
||||
CREATE TEMPORARY TABLE m2 LIKE m1;
|
||||
SHOW CREATE TABLE m2;
|
||||
Table Create Table
|
||||
m2 CREATE TEMPORARY TABLE `m2` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
LOCK TABLE m1 WRITE, m2 WRITE;
|
||||
SHOW CREATE TABLE m2;
|
||||
Table Create Table
|
||||
m2 CREATE TEMPORARY TABLE `m2` (
|
||||
`c1` int(11) DEFAULT NULL,
|
||||
`c2` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=LAST UNION=(`t1`,`t2`)
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
DROP TABLE m2;
|
||||
#
|
||||
CREATE TEMPORARY TABLE m2 (c1 INT, c2 INT) ENGINE=MRG_MyISAM UNION=(t3,t4)
|
||||
INSERT_METHOD=LAST;
|
||||
LOCK TABLE m1 WRITE, m2 WRITE;
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1 c2
|
||||
311 321
|
||||
411 421
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
111 121
|
||||
211 221
|
||||
212 222
|
||||
213 223
|
||||
#
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1, t2, t3, t4, m1, m2;
|
||||
#
|
||||
# Bug47098 assert in MDL_context::destroy on HANDLER
|
||||
# <damaged merge table> OPEN
|
||||
#
|
||||
@ -2745,4 +3473,106 @@ m2 CREATE TABLE `m2` (
|
||||
`i` int(11) DEFAULT NULL
|
||||
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 INSERT_METHOD=FIRST UNION=(`t1`)
|
||||
drop tables m1, m2, t1;
|
||||
#
|
||||
# Test case for Bug#54811 "Assert in mysql_lock_have_duplicate()"
|
||||
# Check that unique_table() works correctly for merge tables.
|
||||
#
|
||||
drop table if exists t1, t2, t3, m1, m2;
|
||||
create table t1 (a int);
|
||||
create table t2 (a int);
|
||||
create table t3 (b int);
|
||||
create view v1 as select * from t3,t1;
|
||||
create table m1 (a int) engine=merge union (t1, t2) insert_method=last;
|
||||
create table m2 (a int) engine=merge union (t1, t2) insert_method=first;
|
||||
create temporary table tmp (b int);
|
||||
insert into tmp (b) values (1);
|
||||
insert into t1 (a) values (1);
|
||||
insert into t3 (b) values (1);
|
||||
insert into m1 (a) values ((select max(a) from m1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from m2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from t1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from t2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from t3, m1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from t3, m2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from t3, t1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from t3, t2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from tmp, m1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from tmp, m2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from tmp, t1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from tmp, t2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
insert into m1 (a) values ((select max(a) from v1));
|
||||
ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'm1'.
|
||||
insert into m1 (a) values ((select max(a) from tmp, v1));
|
||||
ERROR HY000: The definition of table 'v1' prevents operation INSERT on table 'm1'.
|
||||
update m1 set a = ((select max(a) from m1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from m2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from t1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from t2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from t3, m1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from t3, m2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from t3, t1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from t3, t2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from tmp, m1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from tmp, m2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from tmp, t1));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from tmp, t2));
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
update m1 set a = ((select max(a) from v1));
|
||||
ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'm1'.
|
||||
update m1 set a = ((select max(a) from tmp, v1));
|
||||
ERROR HY000: The definition of table 'v1' prevents operation UPDATE on table 'm1'.
|
||||
delete from m1 where a = (select max(a) from m1);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from m2);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from t1);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from t2);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from t3, m1);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from t3, m2);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from t3, t1);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from t3, t2);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from tmp, m1);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from tmp, m2);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from tmp, t1);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from tmp, t2);
|
||||
ERROR HY000: You can't specify target table 'm1' for update in FROM clause
|
||||
delete from m1 where a = (select max(a) from v1);
|
||||
ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 'm1'.
|
||||
delete from m1 where a = (select max(a) from tmp, v1);
|
||||
ERROR HY000: The definition of table 'v1' prevents operation DELETE on table 'm1'.
|
||||
drop view v1;
|
||||
drop temporary table tmp;
|
||||
drop table t1, t2, t3, m1, m2;
|
||||
End of 6.0 tests
|
||||
|
190
mysql-test/r/merge_mmap.result
Normal file
190
mysql-test/r/merge_mmap.result
Normal file
@ -0,0 +1,190 @@
|
||||
SET GLOBAL storage_engine = MyISAM;
|
||||
SET SESSION storage_engine = MyISAM;
|
||||
DROP TABLE IF EXISTS t1, t2, m1, m2;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
CREATE TABLE t2 (c1 INT);
|
||||
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
CREATE TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2), (3), (4);
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
SELECT * FROM t2;
|
||||
c1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
DROP TABLE m2, m1, t2, t1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
CREATE TABLE t2 (c1 INT);
|
||||
CREATE TEMPORARY TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
CREATE TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2), (3), (4);
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
DROP TABLE m2, m1, t2, t1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
CREATE TABLE t2 (c1 INT);
|
||||
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
CREATE TEMPORARY TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2), (3), (4);
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
DROP TABLE m2, m1, t2, t1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
CREATE TABLE t2 (c1 INT);
|
||||
CREATE TEMPORARY TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
CREATE TEMPORARY TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2), (3), (4);
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
DROP TABLE m2, m1, t2, t1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
CREATE TABLE t2 (c1 INT);
|
||||
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
CREATE TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
LOCK TABLE m1 WRITE, m2 WRITE;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2), (3), (4);
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
SELECT * FROM t2;
|
||||
c1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE m2, m1, t2, t1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
CREATE TABLE t2 (c1 INT);
|
||||
CREATE TEMPORARY TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
CREATE TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
LOCK TABLE m1 WRITE, m2 WRITE;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2), (3), (4);
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE m2, m1, t2, t1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
CREATE TABLE t2 (c1 INT);
|
||||
CREATE TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
CREATE TEMPORARY TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
LOCK TABLE m1 WRITE, m2 WRITE;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2), (3), (4);
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE m2, m1, t2, t1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
CREATE TABLE t2 (c1 INT);
|
||||
CREATE TEMPORARY TABLE m1 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
CREATE TEMPORARY TABLE m2 (c1 INT) ENGINE=MRG_MyISAM UNION=(t1,t2)
|
||||
INSERT_METHOD=LAST;
|
||||
LOCK TABLE m1 WRITE, m2 WRITE;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (2), (3), (4);
|
||||
INSERT INTO m2 SELECT * FROM m1;
|
||||
SELECT * FROM m2;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE m2, m1, t2, t1;
|
||||
End of 6.0 tests
|
@ -47,7 +47,7 @@ ENGINE = MYISAM
|
||||
PARTITION p1 VALUES LESS THAN (20),
|
||||
PARTITION p2 VALUES LESS THAN (100),
|
||||
PARTITION p3 VALUES LESS THAN MAXVALUE ) */;
|
||||
SET DEBUG_SYNC= 'open_tables_acquire_upgradable_mdl SIGNAL removing_partitions WAIT_FOR waiting_for_alter';
|
||||
SET DEBUG_SYNC= 'alter_table_before_open_tables SIGNAL removing_partitions WAIT_FOR waiting_for_alter';
|
||||
SET DEBUG_SYNC= 'alter_table_before_rename_result_table WAIT_FOR delete_done';
|
||||
ALTER TABLE t2 REMOVE PARTITIONING;
|
||||
# Con default
|
||||
|
@ -1,208 +0,0 @@
|
||||
DROP TABLE IF EXISTS t1,t2;
|
||||
DROP DATABASE IF EXISTS test_$1;
|
||||
create database test_$1;
|
||||
create table test_$1.r1 (i int) raid_type=1;
|
||||
create table test_$1.r2 (i int) raid_type=1 raid_chunks=32;
|
||||
drop database test_$1;
|
||||
create database test_$1;
|
||||
create table test_$1.r2 (i int) raid_type=1 raid_chunks=257;
|
||||
show create table test_$1.r2;
|
||||
Table Create Table
|
||||
r2 CREATE TABLE `r2` (
|
||||
`i` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 RAID_TYPE=striped RAID_CHUNKS=255 RAID_CHUNKSIZE=256
|
||||
drop database test_$1;
|
||||
CREATE TABLE t1 (
|
||||
id int unsigned not null auto_increment primary key,
|
||||
c char(255) not null
|
||||
) RAID_TYPE=STRIPED RAID_CHUNKS=2 RAID_CHUNKSIZE=123;
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
450
|
||||
ALTER TABLE t1 ADD COLUMN x INT UNSIGNED NOT NULL;
|
||||
ALTER TABLE t1 ADD KEY c (c);
|
||||
ALTER TABLE t1 DROP KEY c;
|
||||
ALTER TABLE t1 DROP COLUMN x;
|
||||
ALTER TABLE t1 RENAME t2;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
450
|
||||
DROP TABLE t2;
|
||||
/* variable rows */
|
||||
CREATE TABLE t1 (
|
||||
id int unsigned not null auto_increment primary key,
|
||||
c varchar(255) not null
|
||||
) RAID_TYPE=STRIPED RAID_CHUNKS=5 RAID_CHUNKSIZE=121;
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
INSERT INTO t1 VALUES
|
||||
(NULL,'1'),(NULL,'a'),(NULL,'a'),(NULL,'a'),(NULL,'p'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'b'),(NULL,'a'),(NULL,'a'),(NULL,'q'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'c'),(NULL,'a'),(NULL,'a'),(NULL,'r'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'d'),(NULL,'a'),(NULL,'a'),(NULL,'s'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'e'),(NULL,'a'),(NULL,'a'),(NULL,'t'),(NULL,'a'),
|
||||
(NULL,'6'),(NULL,'f'),(NULL,'a'),(NULL,'a'),(NULL,'u'),(NULL,'a'),
|
||||
(NULL,'7'),(NULL,'g'),(NULL,'a'),(NULL,'a'),(NULL,'v'),(NULL,'a'),
|
||||
(NULL,'8'),(NULL,'h'),(NULL,'a'),(NULL,'a'),(NULL,'w'),(NULL,'a'),
|
||||
(NULL,'9'),(NULL,'i'),(NULL,'a'),(NULL,'a'),(NULL,'x'),(NULL,'a'),
|
||||
(NULL,'0'),(NULL,'j'),(NULL,'a'),(NULL,'a'),(NULL,'y'),(NULL,'a'),
|
||||
(NULL,'1'),(NULL,'k'),(NULL,'a'),(NULL,'a'),(NULL,'z'),(NULL,'a'),
|
||||
(NULL,'2'),(NULL,'l'),(NULL,'a'),(NULL,'a'),(NULL,'/'),(NULL,'a'),
|
||||
(NULL,'3'),(NULL,'m'),(NULL,'a'),(NULL,'a'),(NULL,'*'),(NULL,'a'),
|
||||
(NULL,'4'),(NULL,'n'),(NULL,'a'),(NULL,'a'),(NULL,'+'),(NULL,'a'),
|
||||
(NULL,'5'),(NULL,'o'),(NULL,'a'),(NULL,'a'),(NULL,'?'),(NULL,'a');
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
450
|
||||
ALTER TABLE t1 ADD COLUMN x INT UNSIGNED NOT NULL;
|
||||
ALTER TABLE t1 ADD KEY c (c);
|
||||
ALTER TABLE t1 DROP KEY c;
|
||||
ALTER TABLE t1 DROP COLUMN x;
|
||||
ALTER TABLE t1 RENAME t2;
|
||||
ALTER TABLE t2 CHANGE COLUMN c c VARCHAR(251) NOT NULL;
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
450
|
||||
DROP TABLE t2;
|
@ -16,19 +16,21 @@ drop schema foo;
|
||||
# Bug #48940 MDL deadlocks against mysql_rm_db
|
||||
#
|
||||
DROP SCHEMA IF EXISTS schema1;
|
||||
DROP SCHEMA IF EXISTS schema2;
|
||||
# Connection default
|
||||
CREATE SCHEMA schema1;
|
||||
CREATE SCHEMA schema2;
|
||||
CREATE TABLE schema1.t1 (a INT);
|
||||
SET autocommit= FALSE;
|
||||
INSERT INTO schema1.t1 VALUES (1);
|
||||
# Connection 2
|
||||
DROP SCHEMA schema1;
|
||||
# Connection default
|
||||
ALTER SCHEMA schema1 DEFAULT CHARACTER SET utf8;
|
||||
Got one of the listed errors
|
||||
ALTER SCHEMA schema2 DEFAULT CHARACTER SET utf8;
|
||||
SET autocommit= TRUE;
|
||||
# Connection 2
|
||||
# Connection default
|
||||
DROP SCHEMA schema2;
|
||||
#
|
||||
# Bug #49988 MDL deadlocks with mysql_create_db, reload_acl_and_cache
|
||||
#
|
||||
@ -48,3 +50,48 @@ ERROR HY000: Can't execute the given command because you have active locked tabl
|
||||
UNLOCK TABLES;
|
||||
# Connection con2
|
||||
# Connection default
|
||||
#
|
||||
# Bug#54360 Deadlock DROP/ALTER/CREATE DATABASE with open HANDLER
|
||||
#
|
||||
CREATE DATABASE db1;
|
||||
CREATE TABLE db1.t1 (a INT);
|
||||
INSERT INTO db1.t1 VALUES (1), (2);
|
||||
# Connection con1
|
||||
HANDLER db1.t1 OPEN;
|
||||
# Connection default
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection con2
|
||||
# Connection con1
|
||||
CREATE DATABASE db2;
|
||||
ALTER DATABASE db2 DEFAULT CHARACTER SET utf8;
|
||||
DROP DATABASE db2;
|
||||
HANDLER t1 CLOSE;
|
||||
# Connection default
|
||||
# Reaping: DROP DATABASE db1
|
||||
#
|
||||
# Tests for increased CREATE/ALTER/DROP DATABASE concurrency with
|
||||
# database name locks.
|
||||
#
|
||||
DROP DATABASE IF EXISTS db1;
|
||||
DROP DATABASE IF EXISTS db2;
|
||||
# Connection default
|
||||
CREATE DATABASE db1;
|
||||
CREATE TABLE db1.t1 (id INT);
|
||||
START TRANSACTION;
|
||||
INSERT INTO db1.t1 VALUES (1);
|
||||
# Connection 2
|
||||
# DROP DATABASE should block due to the active transaction
|
||||
# Sending:
|
||||
DROP DATABASE db1;
|
||||
# Connection 3
|
||||
# But it should still be possible to CREATE/ALTER/DROP other databases.
|
||||
CREATE DATABASE db2;
|
||||
ALTER DATABASE db2 DEFAULT CHARACTER SET utf8;
|
||||
DROP DATABASE db2;
|
||||
# Connection default
|
||||
# End the transaction so DROP DATABASE db1 can continue
|
||||
COMMIT;
|
||||
# Connection 2
|
||||
# Reaping: DROP DATABASE db1
|
||||
# Connection default;
|
||||
|
@ -1466,3 +1466,51 @@ t1 CREATE TABLE `t1` (
|
||||
# Switching to connection 'default'.
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#54905 Connection with WRITE lock cannot ALTER table due to
|
||||
# concurrent SHOW CREATE
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(a INT);
|
||||
# Connection con1
|
||||
LOCK TABLE t1 WRITE;
|
||||
# Connection default
|
||||
START TRANSACTION;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
# Connection con1
|
||||
ALTER TABLE t1 CHARACTER SET = utf8;
|
||||
UNLOCK TABLES;
|
||||
# Connection default
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#55498 SHOW CREATE TRIGGER takes wrong type of metadata lock.
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1;
|
||||
# Test 1: SHOW CREATE TRIGGER with WRITE locked table.
|
||||
# Connection con1
|
||||
LOCK TABLE t1 WRITE;
|
||||
# Connection default
|
||||
SHOW CREATE TRIGGER t1_bi;
|
||||
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
|
||||
t1_bi CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1 utf8 utf8_general_ci latin1_swedish_ci
|
||||
# Connection con1
|
||||
UNLOCK TABLES;
|
||||
# Test 2: ALTER TABLE with SHOW CREATE TRIGGER in transaction
|
||||
# Connection default
|
||||
START TRANSACTION;
|
||||
SHOW CREATE TRIGGER t1_bi;
|
||||
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
|
||||
t1_bi CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1 utf8 utf8_general_ci latin1_swedish_ci
|
||||
# Connection con1
|
||||
ALTER TABLE t1 CHARACTER SET = utf8;
|
||||
# Connection default
|
||||
COMMIT;
|
||||
DROP TRIGGER t1_bi;
|
||||
DROP TABLE t1;
|
||||
|
@ -1189,6 +1189,8 @@ end $$
|
||||
call test_signal() $$
|
||||
Caught by SQLSTATE
|
||||
Caught by SQLSTATE
|
||||
Warnings:
|
||||
Warning 1012 Raising a warning
|
||||
drop procedure test_signal $$
|
||||
create procedure test_signal()
|
||||
begin
|
||||
@ -1204,6 +1206,8 @@ end $$
|
||||
call test_signal() $$
|
||||
Caught by number
|
||||
Caught by number
|
||||
Warnings:
|
||||
Warning 1012 Raising a warning
|
||||
drop procedure test_signal $$
|
||||
create procedure test_signal()
|
||||
begin
|
||||
@ -1219,6 +1223,8 @@ end $$
|
||||
call test_signal() $$
|
||||
Caught by SQLWARNING
|
||||
Caught by SQLWARNING
|
||||
Warnings:
|
||||
Warning 1012 Raising a warning
|
||||
drop procedure test_signal $$
|
||||
create procedure test_signal()
|
||||
begin
|
||||
@ -1234,6 +1240,8 @@ end $$
|
||||
call test_signal() $$
|
||||
Caught by SQLSTATE
|
||||
Caught by SQLSTATE
|
||||
Warnings:
|
||||
Error 1012 Raising a not found
|
||||
drop procedure test_signal $$
|
||||
create procedure test_signal()
|
||||
begin
|
||||
@ -1249,6 +1257,8 @@ end $$
|
||||
call test_signal() $$
|
||||
Caught by number
|
||||
Caught by number
|
||||
Warnings:
|
||||
Error 1012 Raising a not found
|
||||
drop procedure test_signal $$
|
||||
create procedure test_signal()
|
||||
begin
|
||||
@ -1264,6 +1274,8 @@ end $$
|
||||
call test_signal() $$
|
||||
Caught by NOT FOUND
|
||||
Caught by NOT FOUND
|
||||
Warnings:
|
||||
Error 1012 Raising a not found
|
||||
drop procedure test_signal $$
|
||||
create procedure test_signal()
|
||||
begin
|
||||
@ -1279,6 +1291,8 @@ end $$
|
||||
call test_signal() $$
|
||||
Caught by SQLSTATE
|
||||
Caught by SQLSTATE
|
||||
Warnings:
|
||||
Error 1012 Raising an error
|
||||
drop procedure test_signal $$
|
||||
create procedure test_signal()
|
||||
begin
|
||||
@ -1294,6 +1308,8 @@ end $$
|
||||
call test_signal() $$
|
||||
Caught by number
|
||||
Caught by number
|
||||
Warnings:
|
||||
Error 1012 Raising an error
|
||||
drop procedure test_signal $$
|
||||
create procedure test_signal()
|
||||
begin
|
||||
@ -1309,6 +1325,8 @@ end $$
|
||||
call test_signal() $$
|
||||
Caught by SQLEXCEPTION
|
||||
Caught by SQLEXCEPTION
|
||||
Warnings:
|
||||
Error 1012 Raising an error
|
||||
drop procedure test_signal $$
|
||||
#
|
||||
# Test where SIGNAL can be used
|
||||
@ -1455,6 +1473,7 @@ after RESIGNAL
|
||||
after RESIGNAL
|
||||
Warnings:
|
||||
Warning 1012 Raising a warning
|
||||
Warning 1012 Raising a warning
|
||||
drop procedure test_resignal $$
|
||||
create procedure test_resignal()
|
||||
begin
|
||||
@ -1509,6 +1528,7 @@ after RESIGNAL
|
||||
after RESIGNAL
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
drop procedure test_resignal $$
|
||||
create procedure test_resignal()
|
||||
begin
|
||||
@ -1565,6 +1585,7 @@ before RESIGNAL
|
||||
after RESIGNAL
|
||||
after RESIGNAL
|
||||
Warnings:
|
||||
Warning 1012 Raising a warning
|
||||
Warning 5555 RESIGNAL of a warning
|
||||
drop procedure test_resignal $$
|
||||
create procedure test_resignal()
|
||||
@ -1625,6 +1646,7 @@ before RESIGNAL
|
||||
after RESIGNAL
|
||||
after RESIGNAL
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
Warning 5555 RESIGNAL of a warning
|
||||
drop procedure test_resignal $$
|
||||
create procedure test_resignal()
|
||||
@ -2126,6 +2148,9 @@ CALL peter_p2() $$
|
||||
ERROR 42000: Hi, I am a useless error message
|
||||
show warnings $$
|
||||
Level Code Message
|
||||
Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
Error 9999 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
Error 9999 Hi, I am a useless error message
|
||||
drop procedure peter_p1 $$
|
||||
drop procedure peter_p2 $$
|
||||
@ -2135,15 +2160,17 @@ DECLARE x CONDITION FOR SQLSTATE '42000';
|
||||
DECLARE EXIT HANDLER FOR x
|
||||
BEGIN
|
||||
SELECT '2';
|
||||
SHOW WARNINGS;
|
||||
RESIGNAL x SET MYSQL_ERRNO = 9999;
|
||||
END;
|
||||
BEGIN
|
||||
DECLARE EXIT HANDLER FOR x
|
||||
BEGIN
|
||||
SELECT '1';
|
||||
SHOW WARNINGS;
|
||||
RESIGNAL x SET
|
||||
SCHEMA_NAME = 'test',
|
||||
MYSQL_ERRNO= 1231;
|
||||
MYSQL_ERRNO= 1232;
|
||||
END;
|
||||
/* Raises ER_WRONG_VALUE_FOR_VAR : 1231, SQLSTATE 42000 */
|
||||
SET @@sql_mode=NULL;
|
||||
@ -2156,6 +2183,7 @@ DECLARE x CONDITION for SQLSTATE '42000';
|
||||
DECLARE EXIT HANDLER FOR x
|
||||
BEGIN
|
||||
SELECT '3';
|
||||
SHOW WARNINGS;
|
||||
RESIGNAL x SET
|
||||
MESSAGE_TEXT = 'Hi, I am a useless error message',
|
||||
MYSQL_ERRNO = 9999;
|
||||
@ -2166,15 +2194,24 @@ $$
|
||||
CALL peter_p2() $$
|
||||
1
|
||||
1
|
||||
Level Code Message
|
||||
Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
2
|
||||
2
|
||||
Level Code Message
|
||||
Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
Error 1232 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
3
|
||||
3
|
||||
Level Code Message
|
||||
Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
Error 1232 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
Error 9999 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
ERROR 42000: Hi, I am a useless error message
|
||||
show warnings $$
|
||||
Level Code Message
|
||||
Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
Error 1231 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
Error 1232 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
Error 9999 Variable 'sql_mode' can't be set to the value of 'NULL'
|
||||
Error 9999 Hi, I am a useless error message
|
||||
drop procedure peter_p1 $$
|
||||
|
@ -95,11 +95,11 @@ call proc_1();
|
||||
ERROR 45000: Oops in proc_1
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1644 Oops in proc_5
|
||||
Error 1644 Oops in proc_4
|
||||
Error 1644 Oops in proc_3
|
||||
Error 1644 Oops in proc_2
|
||||
Error 1644 Oops in proc_1
|
||||
Error 1051 Unknown table 'oops_it_is_not_here'
|
||||
Error 1644 Oops in proc_9
|
||||
Error 1644 Oops in proc_8
|
||||
Error 1644 Oops in proc_7
|
||||
Error 1644 Oops in proc_6
|
||||
SET @@session.max_error_count = 7;
|
||||
SELECT @@session.max_error_count;
|
||||
@@session.max_error_count
|
||||
@ -108,13 +108,13 @@ call proc_1();
|
||||
ERROR 45000: Oops in proc_1
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1051 Unknown table 'oops_it_is_not_here'
|
||||
Error 1644 Oops in proc_9
|
||||
Error 1644 Oops in proc_8
|
||||
Error 1644 Oops in proc_7
|
||||
Error 1644 Oops in proc_6
|
||||
Error 1644 Oops in proc_5
|
||||
Error 1644 Oops in proc_4
|
||||
Error 1644 Oops in proc_3
|
||||
Error 1644 Oops in proc_2
|
||||
Error 1644 Oops in proc_1
|
||||
SET @@session.max_error_count = 9;
|
||||
SELECT @@session.max_error_count;
|
||||
@@session.max_error_count
|
||||
@ -123,6 +123,7 @@ call proc_1();
|
||||
ERROR 45000: Oops in proc_1
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Error 1051 Unknown table 'oops_it_is_not_here'
|
||||
Error 1644 Oops in proc_9
|
||||
Error 1644 Oops in proc_8
|
||||
Error 1644 Oops in proc_7
|
||||
@ -131,7 +132,6 @@ Error 1644 Oops in proc_5
|
||||
Error 1644 Oops in proc_4
|
||||
Error 1644 Oops in proc_3
|
||||
Error 1644 Oops in proc_2
|
||||
Error 1644 Oops in proc_1
|
||||
drop database demo;
|
||||
SET @@global.max_error_count = @start_global_value;
|
||||
SELECT @@global.max_error_count;
|
||||
|
@ -46,6 +46,8 @@ end while;
|
||||
close cur1;
|
||||
end|
|
||||
call p1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
256
|
||||
|
@ -43,6 +43,8 @@ END|
|
||||
SELECT f2 ();
|
||||
f2 ()
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1305 FUNCTION testdb.f_not_exists does not exist
|
||||
DROP SCHEMA testdb;
|
||||
USE test;
|
||||
#
|
||||
|
@ -711,6 +711,8 @@ looping i
|
||||
looping 1
|
||||
looping i
|
||||
looping 0
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'a'
|
||||
call proc_26977_works(2);
|
||||
do something
|
||||
do something
|
||||
@ -730,6 +732,8 @@ looping i
|
||||
looping 0
|
||||
optimizer: keep hreturn
|
||||
optimizer: keep hreturn
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '2' for key 'a'
|
||||
drop table t1;
|
||||
drop procedure proc_26977_broken;
|
||||
drop procedure proc_26977_works;
|
||||
@ -888,3 +892,56 @@ Pos Instruction
|
||||
4 jump 6
|
||||
5 error 1339
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#23032: Handlers declared in a SP do not handle warnings generated in sub-SP
|
||||
#
|
||||
|
||||
# - Case 4: check that "No Data trumps Warning".
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE c CURSOR FOR SELECT a FROM t1;
|
||||
OPEN c;
|
||||
BEGIN
|
||||
DECLARE v INT;
|
||||
DECLARE CONTINUE HANDLER FOR SQLWARNING
|
||||
BEGIN
|
||||
SELECT "Warning found!";
|
||||
SHOW WARNINGS;
|
||||
END;
|
||||
DECLARE EXIT HANDLER FOR NOT FOUND
|
||||
BEGIN
|
||||
SELECT "End of Result Set found!";
|
||||
SHOW WARNINGS;
|
||||
END;
|
||||
WHILE TRUE DO
|
||||
FETCH c INTO v;
|
||||
END WHILE;
|
||||
END;
|
||||
CLOSE c;
|
||||
SELECT a INTO @foo FROM t1 LIMIT 1; # Clear warning stack
|
||||
END|
|
||||
SET SESSION debug="+d,bug23032_emit_warning";
|
||||
CALL p1();
|
||||
Warning found!
|
||||
Warning found!
|
||||
Level Code Message
|
||||
Warning 1105 Unknown error
|
||||
Warning found!
|
||||
Warning found!
|
||||
Level Code Message
|
||||
Warning 1105 Unknown error
|
||||
Warning found!
|
||||
Warning found!
|
||||
Level Code Message
|
||||
Warning 1105 Unknown error
|
||||
End of Result Set found!
|
||||
End of Result Set found!
|
||||
Level Code Message
|
||||
Warning 1105 Unknown error
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SET SESSION debug="-d,bug23032_emit_warning";
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
|
@ -1344,6 +1344,8 @@ set @in_func := 0;
|
||||
select func_20713_a();
|
||||
func_20713_a()
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1146 Table 'test.bogus_table_20713' doesn't exist
|
||||
select @in_func;
|
||||
@in_func
|
||||
2
|
||||
@ -1351,6 +1353,8 @@ set @in_func := 0;
|
||||
select func_20713_b();
|
||||
func_20713_b()
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1146 Table 'test.bogus_table_20713' doesn't exist
|
||||
select @in_func;
|
||||
@in_func
|
||||
2
|
||||
@ -1714,3 +1718,246 @@ DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# Bug#23032: Handlers declared in a SP do not handle warnings generated in sub-SP
|
||||
#
|
||||
|
||||
# - Case 1
|
||||
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
DROP PROCEDURE IF EXISTS p2;
|
||||
DROP PROCEDURE IF EXISTS p3;
|
||||
DROP PROCEDURE IF EXISTS p4;
|
||||
DROP PROCEDURE IF EXISTS p5;
|
||||
DROP PROCEDURE IF EXISTS p6;
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
SELECT CAST('10 ' as unsigned integer);
|
||||
SELECT 1;
|
||||
CALL p2();
|
||||
END|
|
||||
CREATE PROCEDURE p2()
|
||||
BEGIN
|
||||
SELECT CAST('10 ' as unsigned integer);
|
||||
END|
|
||||
CALL p1();
|
||||
CAST('10 ' as unsigned integer)
|
||||
10
|
||||
1
|
||||
1
|
||||
CAST('10 ' as unsigned integer)
|
||||
10
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '10 '
|
||||
DROP PROCEDURE p1;
|
||||
DROP PROCEDURE p2;
|
||||
|
||||
# - Case 2
|
||||
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE c INT DEFAULT 0;
|
||||
DECLARE CONTINUE HANDLER FOR SQLWARNING SET c = c + 1;
|
||||
CALL p2();
|
||||
CALL p3();
|
||||
CALL p4();
|
||||
SELECT c;
|
||||
SELECT @@warning_count;
|
||||
SHOW WARNINGS;
|
||||
END|
|
||||
CREATE PROCEDURE p2()
|
||||
BEGIN
|
||||
SELECT CAST('10 ' as unsigned integer);
|
||||
END|
|
||||
CREATE PROCEDURE p3()
|
||||
BEGIN
|
||||
SELECT CAST('10 ' as unsigned integer);
|
||||
SELECT 1;
|
||||
END|
|
||||
CREATE PROCEDURE p4()
|
||||
BEGIN
|
||||
SELECT CAST('10 ' as unsigned integer);
|
||||
CALL p2();
|
||||
END|
|
||||
CREATE PROCEDURE p5()
|
||||
BEGIN
|
||||
SELECT CAST('10 ' as unsigned integer);
|
||||
SHOW WARNINGS;
|
||||
END|
|
||||
CREATE PROCEDURE P6()
|
||||
BEGIN
|
||||
DECLARE c INT DEFAULT 0;
|
||||
DECLARE CONTINUE HANDLER FOR SQLWARNING SET c = c + 1;
|
||||
CALL p5();
|
||||
SELECT c;
|
||||
END|
|
||||
CALL p1();
|
||||
CAST('10 ' as unsigned integer)
|
||||
10
|
||||
CAST('10 ' as unsigned integer)
|
||||
10
|
||||
1
|
||||
1
|
||||
CAST('10 ' as unsigned integer)
|
||||
10
|
||||
CAST('10 ' as unsigned integer)
|
||||
10
|
||||
c
|
||||
3
|
||||
@@warning_count
|
||||
1
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect INTEGER value: '10 '
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '10 '
|
||||
CALL p6();
|
||||
CAST('10 ' as unsigned integer)
|
||||
10
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect INTEGER value: '10 '
|
||||
c
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '10 '
|
||||
DROP PROCEDURE p1;
|
||||
DROP PROCEDURE p2;
|
||||
DROP PROCEDURE p3;
|
||||
DROP PROCEDURE p4;
|
||||
DROP PROCEDURE p5;
|
||||
DROP PROCEDURE p6;
|
||||
|
||||
# - Case 3: check that "Exception trumps No Data".
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (1), (2), (3);
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE c CURSOR FOR SELECT a FROM t1;
|
||||
OPEN c;
|
||||
BEGIN
|
||||
DECLARE v1 INT;
|
||||
DECLARE v2 INT;
|
||||
DECLARE EXIT HANDLER FOR SQLEXCEPTION
|
||||
SELECT "Error caught (expected)";
|
||||
DECLARE EXIT HANDLER FOR NOT FOUND
|
||||
SELECT "End of Result Set found!";
|
||||
WHILE TRUE DO
|
||||
FETCH c INTO v1, v2;
|
||||
END WHILE;
|
||||
END;
|
||||
CLOSE c;
|
||||
SELECT a INTO @foo FROM t1 LIMIT 1; # Clear warning stack
|
||||
END|
|
||||
CALL p1();
|
||||
Error caught (expected)
|
||||
Error caught (expected)
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#36185: Incorrect precedence for warning and exception handlers
|
||||
#
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE TABLE t1 (a INT, b INT NOT NULL);
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE CONTINUE HANDLER FOR SQLWARNING SELECT 'warning';
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SELECT 'exception';
|
||||
INSERT INTO t1 VALUES (CAST('10 ' AS SIGNED), NULL);
|
||||
END|
|
||||
CALL p1();
|
||||
exception
|
||||
exception
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '10 '
|
||||
Error 1048 Column 'b' cannot be null
|
||||
DROP TABLE t1;
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug#5889: Exit handler for a warning doesn't hide the warning in trigger
|
||||
#
|
||||
|
||||
# - Case 1
|
||||
|
||||
CREATE TABLE t1(a INT, b INT);
|
||||
INSERT INTO t1 VALUES (1, 2);
|
||||
CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE EXIT HANDLER FOR SQLWARNING
|
||||
SET NEW.a = 10;
|
||||
SET NEW.a = 99999999999;
|
||||
END|
|
||||
UPDATE t1 SET b = 20;
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
10 20
|
||||
DROP TRIGGER t1_bu;
|
||||
DROP TABLE t1;
|
||||
|
||||
# - Case 2
|
||||
|
||||
CREATE TABLE t1(a INT);
|
||||
CREATE TABLE t2(b CHAR(1));
|
||||
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
|
||||
BEGIN
|
||||
INSERT INTO t2 VALUES('ab'); # Produces a warning.
|
||||
INSERT INTO t2 VALUES('b'); # Does not produce a warning,
|
||||
# previous warning should be cleared.
|
||||
END|
|
||||
INSERT INTO t1 VALUES(0);
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
0
|
||||
SELECT * FROM t2;
|
||||
b
|
||||
a
|
||||
b
|
||||
DROP TRIGGER t1_bi;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
#
|
||||
# Bug#9857: Stored procedures: handler for sqlwarning ignored
|
||||
#
|
||||
SET @sql_mode_saved = @@sql_mode;
|
||||
SET sql_mode = traditional;
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
DECLARE CONTINUE HANDLER FOR SQLWARNING
|
||||
SELECT 'warning caught (expected)';
|
||||
SELECT 5 / 0;
|
||||
END|
|
||||
CREATE PROCEDURE p2()
|
||||
BEGIN
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION
|
||||
SELECT 'error caught (unexpected)';
|
||||
SELECT 5 / 0;
|
||||
END|
|
||||
CALL p1();
|
||||
5 / 0
|
||||
NULL
|
||||
warning caught (expected)
|
||||
warning caught (expected)
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1365 Division by 0
|
||||
CALL p2();
|
||||
5 / 0
|
||||
NULL
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1365 Division by 0
|
||||
DROP PROCEDURE p1;
|
||||
DROP PROCEDURE p2;
|
||||
SET sql_mode = @sql_mode_saved;
|
||||
|
@ -737,6 +737,8 @@ close c;
|
||||
end|
|
||||
insert into t2 values ("foo", 42, -1.9), ("bar", 3, 12.1), ("zap", 666, -3.14)|
|
||||
call cur1()|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
select * from t1|
|
||||
id data
|
||||
foo 40
|
||||
@ -772,6 +774,8 @@ close c1;
|
||||
close c2;
|
||||
end|
|
||||
call cur2()|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
select * from t3 order by i,s|
|
||||
s i
|
||||
bar 3
|
||||
@ -861,6 +865,8 @@ end$
|
||||
set @@sql_mode = ''|
|
||||
set sql_select_limit = 1|
|
||||
call modes(@c1, @c2)|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
set sql_select_limit = default|
|
||||
select @c1, @c2|
|
||||
@c1 @c2
|
||||
@ -1682,42 +1688,64 @@ end|
|
||||
call h_ee()|
|
||||
h_ee
|
||||
Inner (good)
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
call h_es()|
|
||||
h_es
|
||||
Outer (good)
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
call h_en()|
|
||||
h_en
|
||||
Outer (good)
|
||||
Warnings:
|
||||
Warning 1329 No data - zero rows fetched, selected, or processed
|
||||
call h_ew()|
|
||||
h_ew
|
||||
Outer (good)
|
||||
call h_ex()|
|
||||
h_ex
|
||||
Outer (good)
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
call h_se()|
|
||||
h_se
|
||||
Inner (good)
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
call h_ss()|
|
||||
h_ss
|
||||
Inner (good)
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
call h_sn()|
|
||||
h_sn
|
||||
Outer (good)
|
||||
Warnings:
|
||||
Warning 1329 No data - zero rows fetched, selected, or processed
|
||||
call h_sw()|
|
||||
h_sw
|
||||
Outer (good)
|
||||
call h_sx()|
|
||||
h_sx
|
||||
Outer (good)
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
call h_ne()|
|
||||
h_ne
|
||||
Inner (good)
|
||||
Warnings:
|
||||
Warning 1329 No data - zero rows fetched, selected, or processed
|
||||
call h_ns()|
|
||||
h_ns
|
||||
Inner (good)
|
||||
Warnings:
|
||||
Warning 1329 No data - zero rows fetched, selected, or processed
|
||||
call h_nn()|
|
||||
h_nn
|
||||
Inner (good)
|
||||
Warnings:
|
||||
Warning 1329 No data - zero rows fetched, selected, or processed
|
||||
call h_we()|
|
||||
h_we
|
||||
Inner (good)
|
||||
@ -1730,12 +1758,18 @@ Inner (good)
|
||||
call h_xe()|
|
||||
h_xe
|
||||
Inner (good)
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
call h_xs()|
|
||||
h_xs
|
||||
Inner (good)
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
call h_xx()|
|
||||
h_xx
|
||||
Inner (good)
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
drop table t3|
|
||||
drop procedure h_ee|
|
||||
drop procedure h_es|
|
||||
@ -1884,6 +1918,8 @@ set @x2 = 2;
|
||||
close c1;
|
||||
end|
|
||||
call bug2260()|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
select @x2|
|
||||
@x2
|
||||
2
|
||||
@ -2027,6 +2063,8 @@ insert into t3 values (123456789012);
|
||||
insert into t3 values (0);
|
||||
end|
|
||||
call bug2780()|
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 's1' at row 1
|
||||
select @x|
|
||||
@x
|
||||
1
|
||||
@ -2449,6 +2487,8 @@ declare continue handler for sqlstate 'HY000' begin end;
|
||||
select s1 from t3 union select s2 from t3;
|
||||
end|
|
||||
call bug4904()|
|
||||
Warnings:
|
||||
Error 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (latin2_general_ci,IMPLICIT) for operation 'UNION'
|
||||
drop procedure bug4904|
|
||||
drop table t3|
|
||||
drop procedure if exists bug336|
|
||||
@ -2588,13 +2628,17 @@ select row_count()|
|
||||
row_count()
|
||||
1
|
||||
call bug4905()|
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
select row_count()|
|
||||
row_count()
|
||||
0
|
||||
-1
|
||||
call bug4905()|
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
select row_count()|
|
||||
row_count()
|
||||
0
|
||||
-1
|
||||
select * from t3|
|
||||
s1
|
||||
1
|
||||
@ -2615,10 +2659,14 @@ insert into t3 values (1)|
|
||||
call bug6029()|
|
||||
sqlstate 23000
|
||||
sqlstate 23000
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
delete from t3|
|
||||
call bug6029()|
|
||||
1136
|
||||
1136
|
||||
Warnings:
|
||||
Error 1136 Column count doesn't match value count at row 1
|
||||
drop procedure bug6029|
|
||||
drop table t3|
|
||||
drop procedure if exists bug8540|
|
||||
@ -2910,15 +2958,23 @@ end|
|
||||
call bug6900()|
|
||||
2
|
||||
2
|
||||
Warnings:
|
||||
Error 1136 Column count doesn't match value count at row 1
|
||||
call bug9074()|
|
||||
x1 x2 x3 x4 x5 x6
|
||||
1 1 1 1 1 1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
call bug6900_9074(0)|
|
||||
sqlexception
|
||||
sqlexception
|
||||
Warnings:
|
||||
Error 1136 Column count doesn't match value count at row 1
|
||||
call bug6900_9074(1)|
|
||||
23000
|
||||
23000
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
drop procedure bug6900|
|
||||
drop procedure bug9074|
|
||||
drop procedure bug6900_9074|
|
||||
@ -2961,9 +3017,13 @@ delete from t1|
|
||||
call bug9856()|
|
||||
16
|
||||
16
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
call bug9856()|
|
||||
16
|
||||
16
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
drop procedure bug9856|
|
||||
drop procedure if exists bug9674_1|
|
||||
drop procedure if exists bug9674_2|
|
||||
@ -3194,6 +3254,8 @@ x
|
||||
2
|
||||
x
|
||||
3
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
call bug10961()|
|
||||
x
|
||||
1
|
||||
@ -3201,6 +3263,8 @@ x
|
||||
2
|
||||
x
|
||||
3
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
drop procedure bug10961|
|
||||
DROP PROCEDURE IF EXISTS bug6866|
|
||||
DROP VIEW IF EXISTS tv|
|
||||
@ -3316,7 +3380,11 @@ insert into t1 values
|
||||
('Name4', 13),
|
||||
('Name5', 14)|
|
||||
call bug11529()|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
call bug11529()|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
delete from t1|
|
||||
drop procedure bug11529|
|
||||
set character set utf8|
|
||||
@ -3490,24 +3558,32 @@ end;
|
||||
end if;
|
||||
end|
|
||||
call bug12168('a')|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
select * from t4|
|
||||
a
|
||||
1
|
||||
3
|
||||
truncate t4|
|
||||
call bug12168('b')|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
select * from t4|
|
||||
a
|
||||
2
|
||||
4
|
||||
truncate t4|
|
||||
call bug12168('a')|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
select * from t4|
|
||||
a
|
||||
1
|
||||
3
|
||||
truncate t4|
|
||||
call bug12168('b')|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
select * from t4|
|
||||
a
|
||||
2
|
||||
@ -3807,6 +3883,8 @@ end|
|
||||
call bug7049_2()|
|
||||
Result
|
||||
Caught it
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '42' for key 'x'
|
||||
select * from t3|
|
||||
x
|
||||
42
|
||||
@ -3814,12 +3892,16 @@ delete from t3|
|
||||
call bug7049_4()|
|
||||
Result
|
||||
Caught it
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '42' for key 'x'
|
||||
select * from t3|
|
||||
x
|
||||
42
|
||||
select bug7049_2()|
|
||||
bug7049_2()
|
||||
1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '42' for key 'x'
|
||||
drop table t3|
|
||||
drop procedure bug7049_1|
|
||||
drop procedure bug7049_2|
|
||||
@ -3947,6 +4029,8 @@ end|
|
||||
call bug14845()|
|
||||
a
|
||||
0
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
drop procedure bug14845|
|
||||
drop procedure if exists bug13549_1|
|
||||
drop procedure if exists bug13549_2|
|
||||
@ -4150,6 +4234,8 @@ end|
|
||||
call bug13729()|
|
||||
55
|
||||
55
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
select * from t3|
|
||||
s1
|
||||
1
|
||||
@ -4186,11 +4272,15 @@ Handler
|
||||
boo
|
||||
v isnull(v)
|
||||
NULL 1
|
||||
Warnings:
|
||||
Error 1054 Unknown column 'undefined_var' in 'field list'
|
||||
call bug14643_2()|
|
||||
Handler
|
||||
boo
|
||||
Handler
|
||||
boo
|
||||
Warnings:
|
||||
Error 1054 Unknown column 'undefined_var' in 'field list'
|
||||
drop procedure bug14643_1|
|
||||
drop procedure bug14643_2|
|
||||
drop procedure if exists bug14304|
|
||||
@ -4514,11 +4604,15 @@ Handler
|
||||
error
|
||||
End
|
||||
done
|
||||
Warnings:
|
||||
Error 1054 Unknown column 'v' in 'field list'
|
||||
call bug14498_2()|
|
||||
Handler
|
||||
error
|
||||
End
|
||||
done
|
||||
Warnings:
|
||||
Error 1054 Unknown column 'v' in 'field list'
|
||||
call bug14498_3()|
|
||||
v
|
||||
maybe
|
||||
@ -4526,16 +4620,22 @@ Handler
|
||||
error
|
||||
End
|
||||
done
|
||||
Warnings:
|
||||
Error 1054 Unknown column 'v' in 'field list'
|
||||
call bug14498_4()|
|
||||
Handler
|
||||
error
|
||||
End
|
||||
done
|
||||
Warnings:
|
||||
Error 1054 Unknown column 'v' in 'field list'
|
||||
call bug14498_5()|
|
||||
Handler
|
||||
error
|
||||
End
|
||||
done
|
||||
Warnings:
|
||||
Error 1054 Unknown column 'v' in 'field list'
|
||||
drop procedure bug14498_1|
|
||||
drop procedure bug14498_2|
|
||||
drop procedure bug14498_3|
|
||||
@ -4546,6 +4646,8 @@ drop procedure if exists bug15231_1|
|
||||
drop procedure if exists bug15231_2|
|
||||
drop procedure if exists bug15231_3|
|
||||
drop procedure if exists bug15231_4|
|
||||
drop procedure if exists bug15231_5|
|
||||
drop procedure if exists bug15231_6|
|
||||
create table t3 (id int not null)|
|
||||
create procedure bug15231_1()
|
||||
begin
|
||||
@ -4568,7 +4670,7 @@ end|
|
||||
create procedure bug15231_3()
|
||||
begin
|
||||
declare exit handler for sqlwarning
|
||||
select 'Caught it (wrong)' as 'Result';
|
||||
select 'Caught it (correct)' as 'Result';
|
||||
call bug15231_4();
|
||||
end|
|
||||
create procedure bug15231_4()
|
||||
@ -4576,6 +4678,20 @@ begin
|
||||
declare x decimal(2,1);
|
||||
set x = 'zap';
|
||||
select 'Missed it (correct)' as 'Result';
|
||||
show warnings;
|
||||
end|
|
||||
create procedure bug15231_5()
|
||||
begin
|
||||
declare exit handler for sqlwarning
|
||||
select 'Caught it (wrong)' as 'Result';
|
||||
call bug15231_6();
|
||||
end|
|
||||
create procedure bug15231_6()
|
||||
begin
|
||||
declare x decimal(2,1);
|
||||
set x = 'zap';
|
||||
select 'Missed it (correct)' as 'Result';
|
||||
select id from t3;
|
||||
end|
|
||||
call bug15231_1()|
|
||||
1
|
||||
@ -4583,19 +4699,29 @@ Before NOT FOUND condition is triggered
|
||||
2
|
||||
After NOT FOUND condtition is triggered
|
||||
xid xdone
|
||||
1 0
|
||||
1 1
|
||||
Warnings:
|
||||
Warning 1329 No data - zero rows fetched, selected, or processed
|
||||
call bug15231_3()|
|
||||
Result
|
||||
Missed it (correct)
|
||||
Level Code Message
|
||||
Warning 1366 Incorrect decimal value: 'zap' for column 'x' at row 1
|
||||
Result
|
||||
Caught it (correct)
|
||||
Warnings:
|
||||
Warning 1366 Incorrect decimal value: 'zap' for column 'x' at row 1
|
||||
drop table if exists t3|
|
||||
drop procedure if exists bug15231_1|
|
||||
drop procedure if exists bug15231_2|
|
||||
drop procedure if exists bug15231_3|
|
||||
drop procedure if exists bug15231_4|
|
||||
call bug15231_5()|
|
||||
Result
|
||||
Missed it (correct)
|
||||
id
|
||||
drop table t3|
|
||||
drop procedure bug15231_1|
|
||||
drop procedure bug15231_2|
|
||||
drop procedure bug15231_3|
|
||||
drop procedure bug15231_4|
|
||||
drop procedure bug15231_5|
|
||||
drop procedure bug15231_6|
|
||||
drop procedure if exists bug15011|
|
||||
create table t3 (c1 int primary key)|
|
||||
insert into t3 values (1)|
|
||||
@ -4613,6 +4739,8 @@ end|
|
||||
call bug15011()|
|
||||
Handler
|
||||
Inner
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
drop procedure bug15011|
|
||||
drop table t3|
|
||||
drop procedure if exists bug17476|
|
||||
@ -4688,6 +4816,8 @@ i
|
||||
1
|
||||
i
|
||||
0
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
drop table t3|
|
||||
drop procedure bug16887|
|
||||
drop procedure if exists bug16474_1|
|
||||
@ -4760,6 +4890,8 @@ declare continue handler for sqlexception begin end;
|
||||
select no_such_function();
|
||||
end|
|
||||
call bug18787()|
|
||||
Warnings:
|
||||
Error 1305 FUNCTION test.no_such_function does not exist
|
||||
drop procedure bug18787|
|
||||
create database bug18344_012345678901|
|
||||
use bug18344_012345678901|
|
||||
@ -5133,6 +5265,8 @@ statement failed
|
||||
statement failed
|
||||
statement after update
|
||||
statement after update
|
||||
Warnings:
|
||||
Error 1242 Subquery returns more than 1 row
|
||||
select * from t3|
|
||||
a
|
||||
1
|
||||
@ -5144,6 +5278,8 @@ statement failed
|
||||
statement failed
|
||||
statement after update
|
||||
statement after update
|
||||
Warnings:
|
||||
Error 1242 Subquery returns more than 1 row
|
||||
select * from t3|
|
||||
a
|
||||
1
|
||||
@ -5176,6 +5312,8 @@ in continue handler
|
||||
in continue handler
|
||||
reachable code a2
|
||||
reachable code a2
|
||||
Warnings:
|
||||
Error 1242 Subquery returns more than 1 row
|
||||
select * from t3|
|
||||
a
|
||||
1
|
||||
@ -5191,6 +5329,8 @@ in continue handler
|
||||
in continue handler
|
||||
reachable code a2
|
||||
reachable code a2
|
||||
Warnings:
|
||||
Error 1242 Subquery returns more than 1 row
|
||||
select * from t3|
|
||||
a
|
||||
1
|
||||
@ -5224,6 +5364,8 @@ in continue handler
|
||||
in continue handler
|
||||
reachable code a2
|
||||
reachable code a2
|
||||
Warnings:
|
||||
Error 1305 FUNCTION test.no_such_function does not exist
|
||||
drop procedure bug8153_proc_a|
|
||||
drop procedure bug8153_proc_b|
|
||||
drop table t3|
|
||||
@ -5792,9 +5934,13 @@ end|
|
||||
select func_8407_a()|
|
||||
func_8407_a()
|
||||
NULL
|
||||
Warnings:
|
||||
Error 1146 Table 'test.no_such_view' doesn't exist
|
||||
select func_8407_b()|
|
||||
func_8407_b()
|
||||
1500
|
||||
Warnings:
|
||||
Error 1146 Table 'test.no_such_view' doesn't exist
|
||||
drop function func_8407_a|
|
||||
drop function func_8407_b|
|
||||
drop table if exists table_26503|
|
||||
@ -5916,6 +6062,8 @@ looping i
|
||||
looping 0
|
||||
leaving handler
|
||||
leaving handler
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'a'
|
||||
call proc_26503_ok_2(2)|
|
||||
do something
|
||||
do something
|
||||
@ -5927,6 +6075,8 @@ looping i
|
||||
looping 4
|
||||
leaving handler
|
||||
leaving handler
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '2' for key 'a'
|
||||
call proc_26503_ok_3(3)|
|
||||
do something
|
||||
do something
|
||||
@ -5946,6 +6096,8 @@ looping i
|
||||
looping 0
|
||||
leaving handler
|
||||
leaving handler
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '3' for key 'a'
|
||||
call proc_26503_ok_4(4)|
|
||||
do something
|
||||
do something
|
||||
@ -5957,6 +6109,8 @@ looping i
|
||||
looping 4
|
||||
leaving handler
|
||||
leaving handler
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '4' for key 'a'
|
||||
drop table table_26503|
|
||||
drop procedure proc_26503_ok_1|
|
||||
drop procedure proc_26503_ok_2|
|
||||
@ -6670,6 +6824,8 @@ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET @exception:= 'run';
|
||||
SELECT x FROM t1;
|
||||
END|
|
||||
CALL bug29770();
|
||||
Warnings:
|
||||
Error 1054 Unknown column 'x' in 'field list'
|
||||
SELECT @state, @exception;
|
||||
@state @exception
|
||||
run NULL
|
||||
@ -6708,6 +6864,8 @@ end;
|
||||
end while;
|
||||
end//
|
||||
call proc_33618(20);
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
drop table t_33618;
|
||||
drop procedure proc_33618;
|
||||
#
|
||||
|
@ -99,6 +99,8 @@ return i;
|
||||
end|
|
||||
set @error_in_func:= 0|
|
||||
insert into t1 values (bug10015_6(5)), (bug10015_6(6))|
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry '1' for key 'PRIMARY'
|
||||
select @error_in_func|
|
||||
@error_in_func
|
||||
1
|
||||
@ -524,6 +526,8 @@ until done end repeat;
|
||||
close c;
|
||||
end|
|
||||
call bug14210()|
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
select count(*) from t4|
|
||||
count(*)
|
||||
256
|
||||
|
@ -1190,6 +1190,8 @@ select'a'; insert into t1 values (200); end;|
|
||||
call t1();
|
||||
a
|
||||
a
|
||||
Warnings:
|
||||
Error 1264 Out of range value for column 'col1' at row 1
|
||||
select * from t1;
|
||||
col1
|
||||
drop procedure t1;
|
||||
|
@ -210,4 +210,16 @@ UPDATE t1,t2 SET t1.a = t2.a;
|
||||
INSERT INTO t2 SELECT f1();
|
||||
DROP TABLE t1,t2,t3;
|
||||
DROP FUNCTION f1;
|
||||
#
|
||||
# Bug #48067: A temp table with the same name as an existing table,
|
||||
# makes drop database fail.
|
||||
#
|
||||
DROP TEMPORARY TABLE IF EXISTS bug48067.t1;
|
||||
DROP DATABASE IF EXISTS bug48067;
|
||||
CREATE DATABASE bug48067;
|
||||
CREATE TABLE bug48067.t1 (c1 int);
|
||||
INSERT INTO bug48067.t1 values (1);
|
||||
CREATE TEMPORARY TABLE bug48067.t1 (c1 int);
|
||||
DROP DATABASE bug48067;
|
||||
DROP TEMPORARY table bug48067.t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1677,3 +1677,25 @@ SET @@sql_quote_show_create = @sql_quote_show_create_saved;
|
||||
|
||||
# End of Bug#34828.
|
||||
|
||||
# Make sure we can manipulate with autocommit in the
|
||||
# along with other variables.
|
||||
drop table if exists t1;
|
||||
drop function if exists t1_max;
|
||||
drop function if exists t1_min;
|
||||
create table t1 (a int) engine=innodb;
|
||||
insert into t1(a) values (0), (1);
|
||||
create function t1_max() returns int return (select max(a) from t1);
|
||||
create function t1_min() returns int return (select min(a) from t1);
|
||||
select t1_min();
|
||||
t1_min()
|
||||
0
|
||||
select t1_max();
|
||||
t1_max()
|
||||
1
|
||||
set @@session.autocommit=t1_min(), @@session.autocommit=t1_max(),
|
||||
@@session.autocommit=t1_min(), @@session.autocommit=t1_max(),
|
||||
@@session.autocommit=t1_min(), @@session.autocommit=t1_max();
|
||||
# Cleanup.
|
||||
drop table t1;
|
||||
drop function t1_min;
|
||||
drop function t1_max;
|
||||
|
@ -1955,15 +1955,15 @@ CHECK TABLE v1, v2, v3, v4, v5, v6;
|
||||
Table Op Msg_type Msg_text
|
||||
test.v1 check Error FUNCTION test.f1 does not exist
|
||||
test.v1 check Error View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
test.v1 check status Operation failed
|
||||
test.v1 check error Corrupt
|
||||
test.v2 check status OK
|
||||
test.v3 check Error FUNCTION test.f1 does not exist
|
||||
test.v3 check Error View 'test.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
test.v3 check status Operation failed
|
||||
test.v3 check error Corrupt
|
||||
test.v4 check status OK
|
||||
test.v5 check Error FUNCTION test.f1 does not exist
|
||||
test.v5 check Error View 'test.v5' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
test.v5 check status Operation failed
|
||||
test.v5 check error Corrupt
|
||||
test.v6 check status OK
|
||||
create function f1 () returns int return (select max(col1) from t1);
|
||||
DROP TABLE t1;
|
||||
@ -3946,6 +3946,8 @@ create view a as select 1;
|
||||
end|
|
||||
call p();
|
||||
call p();
|
||||
Warnings:
|
||||
Error 1050 Table 'a' already exists
|
||||
drop view a;
|
||||
drop procedure p;
|
||||
#
|
||||
|
@ -54,7 +54,7 @@ PASSWORD '',
|
||||
PORT SLAVE_PORT,
|
||||
SOCKET '',
|
||||
OWNER 'root');
|
||||
select * from mysql.servers;
|
||||
select * from mysql.servers order by Server_name;
|
||||
Server_name Host Db Username Password Port Socket Wrapper Owner
|
||||
server_one 127.0.0.1 first_db root SLAVE_PORT mysql root
|
||||
server_two 127.0.0.1 second_db root SLAVE_PORT mysql root
|
||||
@ -154,7 +154,7 @@ id name
|
||||
drop table federated.t1;
|
||||
drop server 'server_one';
|
||||
drop server 'server_two';
|
||||
select * from mysql.servers;
|
||||
select * from mysql.servers order by Server_name;
|
||||
Server_name Host Db Username Password Port Socket Wrapper Owner
|
||||
drop table first_db.t1;
|
||||
drop table second_db.t1;
|
||||
@ -254,6 +254,8 @@ password '', socket '', owner '', port 3306);
|
||||
drop server 's1';
|
||||
# End of 5.1 tests
|
||||
use test;
|
||||
create table t1(a int);
|
||||
insert into t1 values (1);
|
||||
create procedure p1 ()
|
||||
begin
|
||||
DECLARE v INT DEFAULT 0;
|
||||
@ -268,11 +270,13 @@ ALTER SERVER s OPTIONS (USER 'Remote');
|
||||
DROP SERVER s;
|
||||
SET v = v + 1;
|
||||
END WHILE;
|
||||
select a into @a from t1; # Just reset warnings
|
||||
END//
|
||||
use test;
|
||||
call p1();
|
||||
call p1();
|
||||
drop procedure p1;
|
||||
drop table t1;
|
||||
drop server if exists s;
|
||||
DROP TABLE IF EXISTS federated.t1;
|
||||
DROP DATABASE federated;
|
||||
|
@ -62,7 +62,7 @@ eval create server 'server_two' foreign data wrapper 'mysql' options
|
||||
OWNER 'root');
|
||||
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
eval select * from mysql.servers;
|
||||
eval select * from mysql.servers order by Server_name;
|
||||
|
||||
DROP TABLE IF EXISTS federated.old;
|
||||
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||
@ -147,7 +147,7 @@ drop table federated.t1;
|
||||
|
||||
drop server 'server_one';
|
||||
drop server 'server_two';
|
||||
select * from mysql.servers;
|
||||
select * from mysql.servers order by Server_name;
|
||||
|
||||
connection slave;
|
||||
drop table first_db.t1;
|
||||
@ -301,6 +301,8 @@ drop server 's1';
|
||||
connect (other,localhost,root,,);
|
||||
connection master;
|
||||
use test;
|
||||
create table t1(a int);
|
||||
insert into t1 values (1);
|
||||
delimiter //;
|
||||
create procedure p1 ()
|
||||
begin
|
||||
@ -316,6 +318,7 @@ begin
|
||||
DROP SERVER s;
|
||||
SET v = v + 1;
|
||||
END WHILE;
|
||||
select a into @a from t1; # Just reset warnings
|
||||
END//
|
||||
delimiter ;//
|
||||
connection other;
|
||||
@ -326,6 +329,7 @@ call p1();
|
||||
connection other;
|
||||
reap;
|
||||
drop procedure p1;
|
||||
drop table t1;
|
||||
drop server if exists s;
|
||||
|
||||
|
||||
|
@ -347,6 +347,8 @@ CALL h1();
|
||||
-7- 1 1 1 1 1 1
|
||||
END x1 x2 x3 x4 x5 x6
|
||||
END 1 1 1 1 1 1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
DROP TABLE IF EXISTS tnull;
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE TABLE tnull(f1 int);
|
||||
@ -445,6 +447,8 @@ END//
|
||||
CALL h2();
|
||||
x1 x2 x3 x4 x5 x6
|
||||
1 1 1 1 1 1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
SELECT * FROM res_t1;
|
||||
w x
|
||||
a b
|
||||
@ -550,6 +554,8 @@ exit handler 2
|
||||
exit handler 2
|
||||
exit handler 1
|
||||
exit handler 1
|
||||
Warnings:
|
||||
Error 1146 Table 'db_storedproc.tqq' doesn't exist
|
||||
create table res_t1(w char unique, x char);
|
||||
insert into res_t1 values ('a', 'b');
|
||||
CREATE PROCEDURE h1 ()
|
||||
@ -580,6 +586,8 @@ END//
|
||||
CALL h1();
|
||||
x1 x2 x3 x4 x5 x6
|
||||
1 1 1 1 1 1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
This will fail, SQLSTATE 00000 is not allowed
|
||||
CREATE PROCEDURE sp1()
|
||||
begin1_label:BEGIN
|
||||
@ -623,6 +631,8 @@ CALL sp2();
|
||||
NULL
|
||||
@x2 @x
|
||||
1 2
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE sp1;
|
||||
DROP PROCEDURE sp2;
|
||||
|
||||
@ -654,6 +664,8 @@ ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expe
|
||||
CALL sp2();
|
||||
-1- @x2 @x
|
||||
-1- 0 1
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
SELECT '-3-', @x2, @x;
|
||||
-3- @x2 @x
|
||||
-3- 1 1
|
||||
@ -696,6 +708,8 @@ CALL sp2();
|
||||
-2- 1 20
|
||||
-4- @x2 @x
|
||||
-4- 11 22
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE sp1;
|
||||
DROP PROCEDURE sp2;
|
||||
|
||||
@ -762,21 +776,33 @@ SELECT @done, @x;
|
||||
0 1
|
||||
INSERT INTO temp VALUES('1', NULL);
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
INSERT INTO temp VALUES('2', NULL);
|
||||
CALL sp2();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
INSERT INTO temp VALUES('3', NULL);
|
||||
CALL sp3();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 0
|
||||
INSERT INTO temp VALUES('4', NULL);
|
||||
CALL sp4();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 0
|
||||
@ -885,18 +911,26 @@ SELECT @done, @x;
|
||||
@done @x
|
||||
0 1
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 2
|
||||
CALL sp2();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 2
|
||||
CALL sp3();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
CALL sp4();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
@ -1031,6 +1065,8 @@ SQLSTATE
|
||||
21000
|
||||
SQLSTATE
|
||||
24000
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
SELECT '-1-', @x;
|
||||
-1- @x
|
||||
-1- 6
|
||||
@ -1041,18 +1077,24 @@ SQLSTATE
|
||||
SQLEXCEPTION
|
||||
SQLSTATE
|
||||
24000
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
SELECT '-2-', @x;
|
||||
-2- @x
|
||||
-2- 6
|
||||
CALL sp3();
|
||||
SQLSTATE
|
||||
20000
|
||||
Warnings:
|
||||
Error 1339 Case not found for CASE statement
|
||||
SELECT '-3-', @x;
|
||||
-3- @x
|
||||
-3- 1
|
||||
CALL sp4();
|
||||
SQLSTATE
|
||||
SQLEXCEPTION
|
||||
Warnings:
|
||||
Error 1339 Case not found for CASE statement
|
||||
SELECT '-4-', @x;
|
||||
-4- @x
|
||||
-4- 1
|
||||
@ -1335,6 +1377,8 @@ CLOSE cur1;
|
||||
CLOSE cur2;
|
||||
END//
|
||||
CALL sp_outer();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM temp1;
|
||||
f0 cnt f1 f2 f3 f4
|
||||
_sp_out_ 1 a` a` 1000-01-01 -5000
|
||||
|
@ -348,6 +348,8 @@ CALL h1();
|
||||
-7- 1 1 1 1 1 1
|
||||
END x1 x2 x3 x4 x5 x6
|
||||
END 1 1 1 1 1 1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
DROP TABLE IF EXISTS tnull;
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE TABLE tnull(f1 int);
|
||||
@ -446,6 +448,8 @@ END//
|
||||
CALL h2();
|
||||
x1 x2 x3 x4 x5 x6
|
||||
1 1 1 1 1 1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
SELECT * FROM res_t1;
|
||||
w x
|
||||
a b
|
||||
@ -551,6 +555,8 @@ exit handler 2
|
||||
exit handler 2
|
||||
exit handler 1
|
||||
exit handler 1
|
||||
Warnings:
|
||||
Error 1146 Table 'db_storedproc.tqq' doesn't exist
|
||||
create table res_t1(w char unique, x char);
|
||||
insert into res_t1 values ('a', 'b');
|
||||
CREATE PROCEDURE h1 ()
|
||||
@ -581,6 +587,8 @@ END//
|
||||
CALL h1();
|
||||
x1 x2 x3 x4 x5 x6
|
||||
1 1 1 1 1 1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
This will fail, SQLSTATE 00000 is not allowed
|
||||
CREATE PROCEDURE sp1()
|
||||
begin1_label:BEGIN
|
||||
@ -624,6 +632,8 @@ CALL sp2();
|
||||
NULL
|
||||
@x2 @x
|
||||
1 2
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE sp1;
|
||||
DROP PROCEDURE sp2;
|
||||
|
||||
@ -655,6 +665,8 @@ ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expe
|
||||
CALL sp2();
|
||||
-1- @x2 @x
|
||||
-1- 0 1
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
SELECT '-3-', @x2, @x;
|
||||
-3- @x2 @x
|
||||
-3- 1 1
|
||||
@ -697,6 +709,8 @@ CALL sp2();
|
||||
-2- 1 20
|
||||
-4- @x2 @x
|
||||
-4- 11 22
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE sp1;
|
||||
DROP PROCEDURE sp2;
|
||||
|
||||
@ -763,21 +777,33 @@ SELECT @done, @x;
|
||||
0 1
|
||||
INSERT INTO temp VALUES('1', NULL);
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
INSERT INTO temp VALUES('2', NULL);
|
||||
CALL sp2();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
INSERT INTO temp VALUES('3', NULL);
|
||||
CALL sp3();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 0
|
||||
INSERT INTO temp VALUES('4', NULL);
|
||||
CALL sp4();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 0
|
||||
@ -886,18 +912,26 @@ SELECT @done, @x;
|
||||
@done @x
|
||||
0 1
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 2
|
||||
CALL sp2();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 2
|
||||
CALL sp3();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
CALL sp4();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
@ -1032,6 +1066,8 @@ SQLSTATE
|
||||
21000
|
||||
SQLSTATE
|
||||
24000
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
SELECT '-1-', @x;
|
||||
-1- @x
|
||||
-1- 6
|
||||
@ -1042,18 +1078,24 @@ SQLSTATE
|
||||
SQLEXCEPTION
|
||||
SQLSTATE
|
||||
24000
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
SELECT '-2-', @x;
|
||||
-2- @x
|
||||
-2- 6
|
||||
CALL sp3();
|
||||
SQLSTATE
|
||||
20000
|
||||
Warnings:
|
||||
Error 1339 Case not found for CASE statement
|
||||
SELECT '-3-', @x;
|
||||
-3- @x
|
||||
-3- 1
|
||||
CALL sp4();
|
||||
SQLSTATE
|
||||
SQLEXCEPTION
|
||||
Warnings:
|
||||
Error 1339 Case not found for CASE statement
|
||||
SELECT '-4-', @x;
|
||||
-4- @x
|
||||
-4- 1
|
||||
@ -1336,6 +1378,8 @@ CLOSE cur1;
|
||||
CLOSE cur2;
|
||||
END//
|
||||
CALL sp_outer();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM temp1;
|
||||
f0 cnt f1 f2 f3 f4
|
||||
_sp_out_ 1 a` a` 1000-01-01 -5000
|
||||
|
@ -348,6 +348,8 @@ CALL h1();
|
||||
-7- 1 1 1 1 1 1
|
||||
END x1 x2 x3 x4 x5 x6
|
||||
END 1 1 1 1 1 1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
DROP TABLE IF EXISTS tnull;
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
CREATE TABLE tnull(f1 int);
|
||||
@ -446,6 +448,8 @@ END//
|
||||
CALL h2();
|
||||
x1 x2 x3 x4 x5 x6
|
||||
1 1 1 1 1 1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
SELECT * FROM res_t1;
|
||||
w x
|
||||
a b
|
||||
@ -551,6 +555,8 @@ exit handler 2
|
||||
exit handler 2
|
||||
exit handler 1
|
||||
exit handler 1
|
||||
Warnings:
|
||||
Error 1146 Table 'db_storedproc.tqq' doesn't exist
|
||||
create table res_t1(w char unique, x char);
|
||||
insert into res_t1 values ('a', 'b');
|
||||
CREATE PROCEDURE h1 ()
|
||||
@ -581,6 +587,8 @@ END//
|
||||
CALL h1();
|
||||
x1 x2 x3 x4 x5 x6
|
||||
1 1 1 1 1 1
|
||||
Warnings:
|
||||
Error 1062 Duplicate entry 'a' for key 'w'
|
||||
This will fail, SQLSTATE 00000 is not allowed
|
||||
CREATE PROCEDURE sp1()
|
||||
begin1_label:BEGIN
|
||||
@ -624,6 +632,8 @@ CALL sp2();
|
||||
NULL
|
||||
@x2 @x
|
||||
1 2
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE sp1;
|
||||
DROP PROCEDURE sp2;
|
||||
|
||||
@ -655,6 +665,8 @@ ERROR 42000: Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expe
|
||||
CALL sp2();
|
||||
-1- @x2 @x
|
||||
-1- 0 1
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
SELECT '-3-', @x2, @x;
|
||||
-3- @x2 @x
|
||||
-3- 1 1
|
||||
@ -697,6 +709,8 @@ CALL sp2();
|
||||
-2- 1 20
|
||||
-4- @x2 @x
|
||||
-4- 11 22
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE sp1;
|
||||
DROP PROCEDURE sp2;
|
||||
|
||||
@ -763,21 +777,33 @@ SELECT @done, @x;
|
||||
0 1
|
||||
INSERT INTO temp VALUES('1', NULL);
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
INSERT INTO temp VALUES('2', NULL);
|
||||
CALL sp2();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
INSERT INTO temp VALUES('3', NULL);
|
||||
CALL sp3();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 0
|
||||
INSERT INTO temp VALUES('4', NULL);
|
||||
CALL sp4();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'f1' at row 1
|
||||
Warning 1265 Data truncated for column 'f2' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 0
|
||||
@ -886,18 +912,26 @@ SELECT @done, @x;
|
||||
@done @x
|
||||
0 1
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 2
|
||||
CALL sp2();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 2
|
||||
CALL sp3();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
CALL sp4();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
@ -1032,6 +1066,8 @@ SQLSTATE
|
||||
21000
|
||||
SQLSTATE
|
||||
24000
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
SELECT '-1-', @x;
|
||||
-1- @x
|
||||
-1- 6
|
||||
@ -1042,18 +1078,24 @@ SQLSTATE
|
||||
SQLEXCEPTION
|
||||
SQLSTATE
|
||||
24000
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
SELECT '-2-', @x;
|
||||
-2- @x
|
||||
-2- 6
|
||||
CALL sp3();
|
||||
SQLSTATE
|
||||
20000
|
||||
Warnings:
|
||||
Error 1339 Case not found for CASE statement
|
||||
SELECT '-3-', @x;
|
||||
-3- @x
|
||||
-3- 1
|
||||
CALL sp4();
|
||||
SQLSTATE
|
||||
SQLEXCEPTION
|
||||
Warnings:
|
||||
Error 1339 Case not found for CASE statement
|
||||
SELECT '-4-', @x;
|
||||
-4- @x
|
||||
-4- 1
|
||||
@ -1336,6 +1378,8 @@ CLOSE cur1;
|
||||
CLOSE cur2;
|
||||
END//
|
||||
CALL sp_outer();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
SELECT * FROM temp1;
|
||||
f0 cnt f1 f2 f3 f4
|
||||
_sp_out_ 1 a` a` 1000-01-01 -5000
|
||||
|
@ -9325,6 +9325,8 @@ insert into t2 values (1);
|
||||
set @x = 3;
|
||||
END//
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1136 Column count doesn't match value count at row 1
|
||||
DROP PROCEDURE sp1;
|
||||
DROP PROCEDURE IF EXISTS sp1;
|
||||
Warnings:
|
||||
@ -13754,6 +13756,8 @@ END//
|
||||
CALL sp1();
|
||||
x y @x
|
||||
NULL a 3
|
||||
Warnings:
|
||||
Error 1305 PROCEDURE db_storedproc.nonsexist does not exist
|
||||
SELECT @v1, @v2;
|
||||
@v1 @v2
|
||||
4 a
|
||||
@ -14938,6 +14942,8 @@ NULL NULL
|
||||
NULL NULL
|
||||
@x @y
|
||||
NULL NULL
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
Testcase 4.2.63:
|
||||
@ -15097,6 +15103,8 @@ END;
|
||||
fetch cur1 into newf1, newf2, newf4, newf3;
|
||||
END//
|
||||
CALL sp1();
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
Testcase 4.2.70:
|
||||
@ -22447,6 +22455,8 @@ END//
|
||||
CALL h1 ();
|
||||
@x @x2
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE h1;
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
@ -22464,6 +22474,8 @@ END//
|
||||
CALL h1 ();
|
||||
@x @x2
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1305 PROCEDURE db_storedproc.sp1 does not exist
|
||||
DROP PROCEDURE h1;
|
||||
|
||||
Testcase 4.11.3:
|
||||
@ -22483,6 +22495,8 @@ CALL sp1 (1);
|
||||
set @x=0;
|
||||
END//
|
||||
CALL h1();
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
SELECT @x, @x2;
|
||||
@x @x2
|
||||
1 1
|
||||
@ -22501,6 +22515,8 @@ CALL sp1 (1);
|
||||
set @x=0;
|
||||
END//
|
||||
CALL h1 ();
|
||||
Warnings:
|
||||
Error 1305 PROCEDURE db_storedproc.sp1 does not exist
|
||||
SELECT @x, @x2;
|
||||
@x @x2
|
||||
1 1
|
||||
@ -22525,6 +22541,8 @@ END//
|
||||
CALL h1 ();
|
||||
@x @x2
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE h1;
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
@ -22547,6 +22565,8 @@ END//
|
||||
CALL h1 ();
|
||||
@x @x2
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE h1;
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
@ -22569,6 +22589,8 @@ END//
|
||||
CALL h1 ();
|
||||
@x @x2
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE h1;
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
@ -22586,6 +22608,8 @@ END//
|
||||
CALL h1 ();
|
||||
@x @x2
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1305 PROCEDURE db_storedproc.sp1 does not exist
|
||||
DROP PROCEDURE h1;
|
||||
|
||||
Testcase 4.11.9:
|
||||
@ -22605,6 +22629,8 @@ CALL sp1 (1);
|
||||
set @x=0;
|
||||
END//
|
||||
CALL h1();
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
SELECT @x, @x2;
|
||||
@x @x2
|
||||
1 1
|
||||
@ -22623,6 +22649,8 @@ CALL sp1 (1);
|
||||
set @x=0;
|
||||
END//
|
||||
CALL h1 ();
|
||||
Warnings:
|
||||
Error 1305 PROCEDURE db_storedproc.sp1 does not exist
|
||||
SELECT @x, @x2;
|
||||
@x @x2
|
||||
1 1
|
||||
@ -22647,6 +22675,8 @@ END//
|
||||
CALL h1 ();
|
||||
@x @x2
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE h1;
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
@ -22669,6 +22699,8 @@ END//
|
||||
CALL h1 ();
|
||||
@x @x2
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1318 Incorrect number of arguments for PROCEDURE db_storedproc.sp1; expected 2, got 1
|
||||
DROP PROCEDURE h1;
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
@ -22704,6 +22736,8 @@ done
|
||||
1
|
||||
done
|
||||
1
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -22777,6 +22811,8 @@ done
|
||||
0
|
||||
done
|
||||
1
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -22814,6 +22850,8 @@ done
|
||||
0
|
||||
done
|
||||
1
|
||||
Warnings:
|
||||
Error 1329 No data - zero rows fetched, selected, or processed
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -22844,6 +22882,8 @@ done
|
||||
0
|
||||
done
|
||||
1
|
||||
Warnings:
|
||||
Error 1328 Incorrect number of FETCH variables
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -22874,6 +22914,8 @@ done
|
||||
0
|
||||
done
|
||||
1
|
||||
Warnings:
|
||||
Error 1328 Incorrect number of FETCH variables
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -22904,6 +22946,8 @@ END//
|
||||
CALL h1();
|
||||
done
|
||||
0
|
||||
Warnings:
|
||||
Error 1328 Incorrect number of FETCH variables
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -22934,6 +22978,8 @@ END//
|
||||
CALL h1();
|
||||
done
|
||||
0
|
||||
Warnings:
|
||||
Error 1328 Incorrect number of FETCH variables
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -22964,6 +23010,8 @@ done
|
||||
0
|
||||
done
|
||||
1
|
||||
Warnings:
|
||||
Error 1325 Cursor is already open
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -22995,6 +23043,8 @@ done
|
||||
0
|
||||
done @x
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1325 Cursor is already open
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -23025,6 +23075,8 @@ END//
|
||||
CALL h1();
|
||||
done
|
||||
0
|
||||
Warnings:
|
||||
Error 1325 Cursor is already open
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -23055,6 +23107,8 @@ END//
|
||||
CALL h1();
|
||||
done
|
||||
0
|
||||
Warnings:
|
||||
Error 1325 Cursor is already open
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -23082,6 +23136,8 @@ END//
|
||||
CALL h1();
|
||||
done @x
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -23109,6 +23165,8 @@ END//
|
||||
CALL h1();
|
||||
done @x
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -23134,6 +23192,8 @@ set @x=1;
|
||||
SELECT done, @x;
|
||||
END//
|
||||
CALL h1();
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -23159,6 +23219,8 @@ set @x=1;
|
||||
SELECT done, @x;
|
||||
END//
|
||||
CALL h1();
|
||||
Warnings:
|
||||
Error 1326 Cursor is not open
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
drop table IF EXISTS res_t1;
|
||||
drop table IF EXISTS res_t2;
|
||||
@ -23189,6 +23251,8 @@ END//
|
||||
CALL h1();
|
||||
done @x
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1339 Case not found for CASE statement
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
drop table IF EXISTS res_t1;
|
||||
drop table IF EXISTS res_t2;
|
||||
@ -23219,6 +23283,8 @@ END//
|
||||
CALL h1();
|
||||
done @x
|
||||
1 1
|
||||
Warnings:
|
||||
Error 1339 Case not found for CASE statement
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
drop table IF EXISTS res_t1;
|
||||
drop table IF EXISTS res_t2;
|
||||
@ -23247,6 +23313,8 @@ set @x=1;
|
||||
SELECT done, @x;
|
||||
END//
|
||||
CALL h1();
|
||||
Warnings:
|
||||
Error 1339 Case not found for CASE statement
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
drop table IF EXISTS res_t1;
|
||||
drop table IF EXISTS res_t2;
|
||||
@ -23275,6 +23343,8 @@ set @x=1;
|
||||
SELECT done, @x;
|
||||
END//
|
||||
CALL h1();
|
||||
Warnings:
|
||||
Error 1339 Case not found for CASE statement
|
||||
DROP PROCEDURE IF EXISTS h1;
|
||||
DROP TABLE IF EXISTS res_t1;
|
||||
DROP TABLE IF EXISTS res_t2;
|
||||
@ -23423,6 +23493,9 @@ CREATE TABLE res_t1(w CHAR, x CHAR);
|
||||
INSERT INTO res_t1 VALUES('a', 'b');
|
||||
INSERT INTO res_t1 VALUES('c', 'd');
|
||||
CALL h1();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'w' at row 1
|
||||
Warning 1265 Data truncated for column 'x' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
@ -23445,6 +23518,9 @@ CREATE TABLE res_t1(w CHAR, x CHAR);
|
||||
INSERT INTO res_t1 VALUES('a', 'b');
|
||||
INSERT INTO res_t1 VALUES('c', 'd');
|
||||
CALL h1();
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'w' at row 1
|
||||
Warning 1265 Data truncated for column 'x' at row 1
|
||||
SELECT @done, @x;
|
||||
@done @x
|
||||
1 1
|
||||
|
5
mysql-test/suite/innodb/r/innodb_bug52199.result
Normal file
5
mysql-test/suite/innodb/r/innodb_bug52199.result
Normal file
@ -0,0 +1,5 @@
|
||||
CREATE TABLE bug52199 (a INT NOT NULL,
|
||||
b CHAR(125) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL
|
||||
)ENGINE=InnoDB;
|
||||
CREATE UNIQUE INDEX idx ON bug52199(a);
|
||||
DROP TABLE bug52199;
|
88
mysql-test/suite/innodb/r/innodb_bug54679.result
Normal file
88
mysql-test/suite/innodb/r/innodb_bug54679.result
Normal file
@ -0,0 +1,88 @@
|
||||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET innodb_strict_mode=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed row_format=COMPRESSED
|
||||
ALTER TABLE bug54679 ADD COLUMN b INT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed row_format=COMPRESSED
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compact
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=1;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed KEY_BLOCK_SIZE=1
|
||||
ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = REDUNDANT with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Redundant row_format=REDUNDANT
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=2;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
TABLE_NAME ROW_FORMAT CREATE_OPTIONS
|
||||
bug54679 Compressed row_format=REDUNDANT KEY_BLOCK_SIZE=2
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Warning 1478 InnoDB: cannot specify ROW_FORMAT = DYNAMIC with KEY_BLOCK_SIZE.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table 'test.bug54679' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_format > Antelope.
|
||||
Error 1005 Can't create table 'test.bug54679' (errno: 1478)
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: KEY_BLOCK_SIZE requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table '#sql-temporary' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table '#sql-temporary' (errno: 1478)
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
ERROR HY000: Can't create table 'test.bug54679' (errno: 1478)
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Warning 1478 InnoDB: ROW_FORMAT=DYNAMIC requires innodb_file_per_table.
|
||||
Error 1005 Can't create table 'test.bug54679' (errno: 1478)
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
DROP TABLE bug54679;
|
@ -42,21 +42,7 @@ trx_isolation_level varchar(16) NO
|
||||
trx_unique_checks int(1) NO 0
|
||||
trx_foreign_key_checks int(1) NO 0
|
||||
trx_last_foreign_key_error varchar(256) YES NULL
|
||||
trx_apative_hash_latched int(1) NO 0
|
||||
trx_adaptive_hash_timeout bigint(21) unsigned NO 0
|
||||
trx_operation_state varchar(64) YES NULL
|
||||
trx_tables_in_use bigint(21) unsigned NO 0
|
||||
trx_tables_locked bigint(21) unsigned NO 0
|
||||
trx_lock_structs bigint(21) unsigned NO 0
|
||||
trx_lock_memory_bytes bigint(21) unsigned NO 0
|
||||
trx_rows_locked bigint(21) unsigned NO 0
|
||||
trx_rows_modified bigint(21) unsigned NO 0
|
||||
trx_concurrency_tickets bigint(21) unsigned NO 0
|
||||
trx_isolation_level varchar(16) NO
|
||||
trx_unique_checks int(1) NO 0
|
||||
trx_foreign_key_checks int(1) NO 0
|
||||
trx_last_foreign_key_error varchar(256) YES NULL
|
||||
trx_apative_hash_latched int(1) NO 0
|
||||
trx_adaptive_hash_latched int(1) NO 0
|
||||
trx_adaptive_hash_timeout bigint(21) unsigned NO 0
|
||||
trx_state trx_weight trx_tables_in_use trx_tables_locked trx_rows_locked trx_rows_modified trx_concurrency_tickets trx_isolation_level trx_unique_checks trx_foreign_key_checks
|
||||
RUNNING 4 0 0 7 1 0 REPEATABLE READ 1 1
|
||||
|
7
mysql-test/suite/innodb/t/innodb_bug52199.test
Normal file
7
mysql-test/suite/innodb/t/innodb_bug52199.test
Normal file
@ -0,0 +1,7 @@
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
CREATE TABLE bug52199 (a INT NOT NULL,
|
||||
b CHAR(125) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL
|
||||
)ENGINE=InnoDB;
|
||||
CREATE UNIQUE INDEX idx ON bug52199(a);
|
||||
DROP TABLE bug52199;
|
101
mysql-test/suite/innodb/t/innodb_bug54679.test
Normal file
101
mysql-test/suite/innodb/t/innodb_bug54679.test
Normal file
@ -0,0 +1,101 @@
|
||||
# Test Bug #54679 alter table causes compressed row_format to revert to compact
|
||||
|
||||
--source include/have_innodb.inc
|
||||
|
||||
let $file_format=`select @@innodb_file_format`;
|
||||
let $file_format_max=`select @@innodb_file_format_max`;
|
||||
let $file_per_table=`select @@innodb_file_per_table`;
|
||||
SET GLOBAL innodb_file_format='Barracuda';
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
SET innodb_strict_mode=ON;
|
||||
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=COMPRESSED;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# The ROW_FORMAT of the table should be preserved when it is not specified
|
||||
# in ALTER TABLE.
|
||||
ALTER TABLE bug54679 ADD COLUMN b INT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
DROP TABLE bug54679;
|
||||
|
||||
# Check that the ROW_FORMAT conversion to/from COMPRESSED works.
|
||||
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# KEY_BLOCK_SIZE implies COMPRESSED.
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=1;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=REDUNDANT;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=REDUNDANT;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=2;
|
||||
SELECT TABLE_NAME,ROW_FORMAT,CREATE_OPTIONS FROM information_schema.tables
|
||||
WHERE TABLE_NAME='bug54679';
|
||||
|
||||
# This prevents other than REDUNDANT or COMPACT ROW_FORMAT for new tables.
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB;
|
||||
|
||||
SET GLOBAL innodb_file_format=Barracuda;
|
||||
# This will prevent ROW_FORMAT=COMPRESSED, because the system tablespace
|
||||
# cannot be compressed.
|
||||
SET GLOBAL innodb_file_per_table=OFF;
|
||||
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 KEY_BLOCK_SIZE=4;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
ALTER TABLE bug54679 ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
DROP TABLE bug54679;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
--error ER_CANT_CREATE_TABLE
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
--replace_regex /'[^']*test\.#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||
SHOW WARNINGS;
|
||||
SET GLOBAL innodb_file_per_table=ON;
|
||||
CREATE TABLE bug54679 (a INT) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
DROP TABLE bug54679;
|
||||
|
||||
# restore original values, quietly so the test does not fail if those
|
||||
# defaults are changed
|
||||
-- disable_query_log
|
||||
EVAL SET GLOBAL innodb_file_format=$file_format;
|
||||
EVAL SET GLOBAL innodb_file_format_max=$file_format_max;
|
||||
EVAL SET GLOBAL innodb_file_per_table=$file_per_table;
|
||||
-- enable_query_log
|
29
mysql-test/suite/perfschema/include/upgrade_check.inc
Normal file
29
mysql-test/suite/perfschema/include/upgrade_check.inc
Normal file
@ -0,0 +1,29 @@
|
||||
# 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
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
# Routine to be called by pfs_upgrade.test
|
||||
# $out_file and $err_file must be set within pfs_upgrade.test.
|
||||
#
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $out_file 2> $err_file
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $err_file
|
||||
--error 0,1
|
||||
--remove_file $out_file
|
||||
--error 0,1
|
||||
--remove_file $err_file
|
||||
|
@ -65,3 +65,4 @@ Variable_name Value
|
||||
Qcache_hits 1
|
||||
SET GLOBAL query_cache_size= default;
|
||||
drop table t1;
|
||||
flush status;
|
||||
|
@ -55,14 +55,21 @@ THREAD_ID EVENT_ID
|
||||
[THREAD_ID] [EVENT_ID]
|
||||
[THREAD_ID] [EVENT_ID]
|
||||
[THREAD_ID] [EVENT_ID]
|
||||
DROP TABLE IF EXISTS t_event;
|
||||
DROP EVENT IF EXISTS t_ps_event;
|
||||
CREATE TABLE t_event AS
|
||||
SELECT EVENT_ID FROM performance_schema.EVENTS_WAITS_CURRENT
|
||||
WHERE 1 = 2;
|
||||
CREATE EVENT t_ps_event
|
||||
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 SECOND
|
||||
DO SELECT DISTINCT EVENT_ID
|
||||
DO INSERT INTO t_event
|
||||
SELECT DISTINCT EVENT_ID
|
||||
FROM performance_schema.EVENTS_WAITS_CURRENT
|
||||
JOIN performance_schema.EVENTS_WAITS_HISTORY USING (EVENT_ID)
|
||||
ORDER BY EVENT_ID
|
||||
LIMIT 1;
|
||||
ALTER TABLE t1 ADD COLUMN c INT;
|
||||
DROP TRIGGER IF EXISTS t_ps_trigger;
|
||||
CREATE TRIGGER t_ps_trigger BEFORE INSERT ON t1
|
||||
FOR EACH ROW BEGIN
|
||||
SET NEW.c = (SELECT MAX(EVENT_ID)
|
||||
@ -76,6 +83,7 @@ id c
|
||||
12 [EVENT_ID]
|
||||
13 [EVENT_ID]
|
||||
DROP TRIGGER t_ps_trigger;
|
||||
DROP PROCEDURE IF EXISTS t_ps_proc;
|
||||
CREATE PROCEDURE t_ps_proc(IN tid INT, OUT pid INT)
|
||||
BEGIN
|
||||
SELECT id FROM performance_schema.PROCESSLIST
|
||||
@ -83,6 +91,7 @@ WHERE THREAD_ID = tid INTO pid;
|
||||
END;
|
||||
|
|
||||
CALL t_ps_proc(0, @p_id);
|
||||
DROP FUNCTION IF EXISTS t_ps_proc;
|
||||
CREATE FUNCTION t_ps_func(tid INT) RETURNS int
|
||||
BEGIN
|
||||
return (SELECT id FROM performance_schema.PROCESSLIST
|
||||
@ -92,6 +101,10 @@ END;
|
||||
SELECT t_ps_func(0) = @p_id;
|
||||
t_ps_func(0) = @p_id
|
||||
1
|
||||
SELECT * FROM t_event;
|
||||
EVENT_ID
|
||||
[EVENT_ID]
|
||||
DROP PROCEDURE t_ps_proc;
|
||||
DROP FUNCTION t_ps_func;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t_event;
|
||||
|
@ -40,26 +40,14 @@ where name like "wait/synch/cond/mysys/THR_COND_threads";
|
||||
count(name)
|
||||
1
|
||||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_mysql_create_db";
|
||||
count(name)
|
||||
1
|
||||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_open";
|
||||
count(name)
|
||||
1
|
||||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_lock_db";
|
||||
count(name)
|
||||
1
|
||||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_thread_count";
|
||||
count(name)
|
||||
1
|
||||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_mapped_file";
|
||||
count(name)
|
||||
1
|
||||
select count(name) from MUTEX_INSTANCES
|
||||
where name like "wait/synch/mutex/sql/LOCK_status";
|
||||
count(name)
|
||||
1
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 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
|
||||
@ -10,8 +10,8 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check error handling for invalid server start options
|
||||
@ -19,8 +19,11 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_1.txt;
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
--error 7
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-enabled=maybe > $MYSQLTEST_VARDIR/tmp/bad_option_1.txt 2>&1
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-enabled=maybe > $outfile 2>&1
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
@ -42,4 +45,5 @@ perl;
|
||||
}
|
||||
close FILE;
|
||||
EOF
|
||||
--remove_file $outfile
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
# Copyright (c) 2009, 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
|
||||
@ -10,8 +10,8 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
# Check error handling for ambiguous server start options
|
||||
@ -19,8 +19,11 @@
|
||||
--source include/not_embedded.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
let $outfile= $MYSQLTEST_VARDIR/tmp/bad_option_2.txt;
|
||||
--error 0,1
|
||||
--remove_file $outfile
|
||||
--error 3
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-max_=12 > $MYSQLTEST_VARDIR/tmp/bad_option_2.txt 2>&1
|
||||
--exec $MYSQLD_BOOTSTRAP_CMD --loose-console --performance-schema-max_=12 > $outfile 2>&1
|
||||
|
||||
perl;
|
||||
use strict;
|
||||
@ -41,4 +44,5 @@ perl;
|
||||
}
|
||||
close FILE;
|
||||
EOF
|
||||
--remove_file $outfile
|
||||
|
||||
|
@ -81,6 +81,7 @@ update performance_schema.SETUP_INSTRUMENTS set enabled='YES';
|
||||
unlock tables;
|
||||
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
|
||||
--echo connection default;
|
||||
connection default;
|
||||
|
@ -22,6 +22,15 @@
|
||||
--source include/have_perfschema.inc
|
||||
--source include/have_lowercase0.inc
|
||||
|
||||
# Some initial settings + Preemptive cleanup
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
let $err_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err;
|
||||
let $out_file= $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out;
|
||||
--error 0,1
|
||||
--remove_file $out_file
|
||||
--error 0,1
|
||||
--remove_file $err_file
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists test.user_table;
|
||||
drop procedure if exists test.user_proc;
|
||||
@ -29,22 +38,20 @@ drop function if exists test.user_func;
|
||||
drop event if exists test.user_event;
|
||||
--enable_warnings
|
||||
|
||||
|
||||
--echo "Testing mysql_upgrade with TABLE performance_schema.user_table"
|
||||
|
||||
create table test.user_table(a int);
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--error 0,1
|
||||
--remove_file $MYSQLD_DATADIR/performance_schema/user_table.frm
|
||||
--copy_file $MYSQLD_DATADIR/test/user_table.frm $MYSQLD_DATADIR/performance_schema/user_table.frm
|
||||
|
||||
# Make sure the table is visible
|
||||
use performance_schema;
|
||||
show tables like "user_table";
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
--source suite/perfschema/include/upgrade_check.inc
|
||||
|
||||
# Make sure the table is still visible
|
||||
show tables like "user_table";
|
||||
@ -54,22 +61,20 @@ use test;
|
||||
--remove_file $MYSQLD_DATADIR/performance_schema/user_table.frm
|
||||
drop table test.user_table;
|
||||
|
||||
|
||||
--echo "Testing mysql_upgrade with VIEW performance_schema.user_view"
|
||||
|
||||
create view test.user_view as select "Not supposed to be here";
|
||||
|
||||
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--error 0,1
|
||||
--remove_file $MYSQLD_DATADIR/performance_schema/user_view.frm
|
||||
--copy_file $MYSQLD_DATADIR/test/user_view.frm $MYSQLD_DATADIR/performance_schema/user_view.frm
|
||||
|
||||
# Make sure the view is visible
|
||||
use performance_schema;
|
||||
show tables like "user_view";
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
--source suite/perfschema/include/upgrade_check.inc
|
||||
|
||||
# Make sure the view is still visible
|
||||
show tables like "user_view";
|
||||
@ -79,6 +84,7 @@ use test;
|
||||
--remove_file $MYSQLD_DATADIR/performance_schema/user_view.frm
|
||||
drop view test.user_view;
|
||||
|
||||
|
||||
--echo "Testing mysql_upgrade with PROCEDURE performance_schema.user_proc"
|
||||
|
||||
create procedure test.user_proc()
|
||||
@ -86,17 +92,14 @@ create procedure test.user_proc()
|
||||
|
||||
update mysql.proc set db='performance_schema' where name='user_proc';
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
--source suite/perfschema/include/upgrade_check.inc
|
||||
|
||||
select name from mysql.proc where db='performance_schema';
|
||||
|
||||
update mysql.proc set db='test' where name='user_proc';
|
||||
drop procedure test.user_proc;
|
||||
|
||||
|
||||
--echo "Testing mysql_upgrade with FUNCTION performance_schema.user_func"
|
||||
|
||||
create function test.user_func() returns integer
|
||||
@ -104,17 +107,14 @@ create function test.user_func() returns integer
|
||||
|
||||
update mysql.proc set db='performance_schema' where name='user_func';
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
--source suite/perfschema/include/upgrade_check.inc
|
||||
|
||||
select name from mysql.proc where db='performance_schema';
|
||||
|
||||
update mysql.proc set db='test' where name='user_func';
|
||||
drop function test.user_func;
|
||||
|
||||
|
||||
--echo "Testing mysql_upgrade with EVENT performance_schema.user_event"
|
||||
|
||||
create event test.user_event on schedule every 1 day do
|
||||
@ -122,17 +122,10 @@ create event test.user_event on schedule every 1 day do
|
||||
|
||||
update mysql.event set db='performance_schema' where name='user_event';
|
||||
|
||||
--error 1
|
||||
--exec $MYSQL_UPGRADE --skip-verbose > $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out 2> $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
# Verify that mysql_upgrade complained about the performance_schema
|
||||
--cat_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
--source suite/perfschema/include/upgrade_check.inc
|
||||
|
||||
select name from mysql.event where db='performance_schema';
|
||||
|
||||
update mysql.event set db='test' where name='user_event';
|
||||
drop event test.user_event;
|
||||
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.out
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/pfs_upgrade.err
|
||||
|
||||
|
@ -350,9 +350,9 @@ TRUNCATE TABLE performance_schema.EVENTS_WAITS_HISTORY;
|
||||
TRUNCATE TABLE performance_schema.EVENTS_WAITS_CURRENT;
|
||||
|
||||
--echo # Clean up
|
||||
|
||||
--connection default
|
||||
--disconnect pfs_user_4
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection default
|
||||
REVOKE ALL PRIVILEGES, GRANT OPTION FROM pfs_user_4;
|
||||
DROP USER pfs_user_4;
|
||||
flush privileges;
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
#
|
||||
# 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
|
||||
@ -10,8 +10,8 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
# Tests for PERFORMANCE_SCHEMA
|
||||
|
||||
@ -33,7 +33,6 @@ SET GLOBAL query_cache_size=1355776;
|
||||
|
||||
flush query cache;
|
||||
reset query cache;
|
||||
# Reset Qcache_* to a known state
|
||||
flush status;
|
||||
|
||||
select * from t1;
|
||||
@ -67,4 +66,5 @@ show status like "Qcache_hits";
|
||||
SET GLOBAL query_cache_size= default;
|
||||
|
||||
drop table t1;
|
||||
flush status;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user