Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.1

into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint
This commit is contained in:
msvensson@pilot.blaudden 2007-03-01 14:53:32 +01:00
commit 51a71fb667
368 changed files with 7057 additions and 701955 deletions

View file

@ -2666,6 +2666,7 @@ storage/ndb/src/mgmclient/test_cpcd/*.d
storage/ndb/src/mgmsrv/ndb_mgmd
storage/ndb/src/mgmsrv/ndb_mgmd.dsp
storage/ndb/src/ndbapi/libndbapi.dsp
storage/ndb/src/ndbapi/ndberror_check
storage/ndb/test/ndbapi/DbAsyncGenerator
storage/ndb/test/ndbapi/DbCreate
storage/ndb/test/ndbapi/bank/bankCreator

View file

@ -1,19 +0,0 @@
***************
*** 39,46 ****
c_warnings="$global_warnings -Wunused"
cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
! alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet
! pentium_cflags="-mcpu=pentiumpro"
sparc_cflags=""
# be as fast as we can be without losing our ability to backtrace
--- 39,46 ----
c_warnings="$global_warnings -Wunused"
cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
! #alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet
! #pentium_cflags="-mcpu=pentiumpro"
sparc_cflags=""
# be as fast as we can be without losing our ability to backtrace

View file

@ -1,7 +1,7 @@
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
. "$path/SETUP.sh" $@
extra_flags="$pentium_cflags $fast_cflags"
extra_configs="$pentium_configs $static_link"

View file

@ -1,13 +1,11 @@
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh" $@ --with-debug=full
. "$path/SETUP.sh" $@
extra_flags="$pentium64_cflags $fast_cflags"
c_warnings="$c_warnings"
cxx_warnings="$cxx_warnings"
extra_configs="$pentium_configs $static_link"
extra_configs="$extra_configs "
CC="$CC --pipe"
strip=yes
. "$path/FINISH.sh"

11
BUILD/compile-pentium64-max Executable file
View file

@ -0,0 +1,11 @@
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh" $@
extra_flags="$pentium64_cflags $fast_cflags"
extra_configs="$pentium_configs $max_configs $static_link"
CC="$CC --pipe"
strip=yes
. "$path/FINISH.sh"

View file

@ -1,7 +1,14 @@
#!/usr/bin/bash
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags=""
extra_configs="$max_configs"
#! /bin/sh
. "$path/FINISH.sh"
make -k clean || true
/bin/rm -f */.deps/*.P config.cache
# gcc is often in /usr/ccs/bin or /usr/local/bin
PATH=$PATH:/usr/ccs/bin:/usr/local/bin
path=`dirname $0`
. "$path/autorun.sh"
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
make -j 4

View file

@ -1,7 +1,11 @@
#!/usr/bin/bash
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$debug_cflags"
extra_configs="$debug_configs $max_configs"
#!/bin/sh
. "$path/FINISH.sh"
make -k clean || true
/bin/rm -f */.deps/*.P config.cache
path=`dirname $0`
. "$path/autorun.sh"
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa" CXX=gcc CXXFLAGS="-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -O3 -fno-omit-frame-pointer -mcpu=v8 -Wa,-xarch=v8plusa -g" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-debug
make -j 4

View file

@ -1,16 +1,16 @@
#! /bin/sh
gmake -k clean || true
# Assume Forte is installed in /opt/SUNWSpro and ld is installed in
# /usr/ccs/bin
PATH=/opt/SUNWspro/bin/:/usr/ccs/bin:$PATH
make -k clean || true
/bin/rm -f */.deps/*.P config.cache
path=`dirname $0`
. "$path/autorun.sh"
# Assume Forte is installed in /opt/SUNWSpro
PATH=/opt/SUNWspro/bin/:$PATH
# For "optimal" code for this computer add -fast to EXTRA
# To compile 64 bit, add -xarch=v9 to EXTRA_64_BIT
@ -27,7 +27,7 @@ CC=cc-5.0 CFLAGS="-Xa -xstrconst $STD" \
CXX=CC CXXFLAGS="-noex $STD" \
./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
gmake -j 4
make -j 4
if [ $? = 0 ]
then
make test

View file

@ -31,7 +31,7 @@ do
shift
done
gmake -k clean || true
make -k clean || true
/bin/rm -f */.deps/*.P config.cache
path=`dirname $0`
@ -39,7 +39,7 @@ path=`dirname $0`
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS
gmake -j 4
make -j 4
# ----------------------------------------------------------------------
@ -75,17 +75,17 @@ purifying_binaries ()
fi
if [ -n "$mode" -a $mode = purify ] ; then
gmake CCLD="purify $opts gcc" CXXLD="purify $opts g++" $target
make CCLD="purify $opts gcc" CXXLD="purify $opts g++" $target
mv $binary $binary-purify
fi
if [ -n "$mode" -a $mode = quantify ] ; then
gmake CCLD="quantify $opts gcc" CXXLD="quantify $opts g++" $target
make CCLD="quantify $opts gcc" CXXLD="quantify $opts g++" $target
mv $binary $binary-quantify
fi
if [ -n "$mode" -a $mode = purecov ] ; then
gmake CCLD="purecov $opts gcc" CXXLD="purecov $opts g++" $target
make CCLD="purecov $opts gcc" CXXLD="purecov $opts g++" $target
mv $binary $binary-purecov
fi

View file

@ -1481,7 +1481,7 @@ end:
int main(int argc, char** argv)
{
static char **defaults_argv;
char **defaults_argv;
int exit_value= 0;
ulonglong save_stop_position;
MY_INIT(argv[0]);

View file

@ -2172,7 +2172,8 @@ continue_xml:
*/
static void dump_triggers_for_table(char *table, char *db)
static void dump_triggers_for_table(char *table,
char *db __attribute__((unused)))
{
char *result_table;
char name_buff[NAME_LEN*4+3], table_buff[NAME_LEN*2+3];
@ -2181,7 +2182,6 @@ static void dump_triggers_for_table(char *table, char *db)
FILE *sql_file= md_result_file;
MYSQL_RES *result;
MYSQL_ROW row;
DBUG_ENTER("dump_triggers_for_table");
DBUG_PRINT("enter", ("db: %s, table: %s", db, table));

View file

@ -415,10 +415,12 @@ struct st_command
TYPELIB command_typelib= {array_elements(command_names),"",
command_names, 0};
DYNAMIC_STRING ds_res, ds_progress, ds_warning_messages;
static DYNAMIC_STRING ds_res, ds_progress, ds_warning_messages;
static DYNAMIC_STRING global_ds_warnings, global_eval_query;
char builtin_echo[FN_REFLEN];
void die(const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 1, 2);
void abort_not_supported_test(const char *fmt, ...)
@ -795,6 +797,9 @@ void free_used_memory()
dynstr_free(&ds_res);
dynstr_free(&ds_progress);
dynstr_free(&ds_warning_messages);
dynstr_free(&global_ds_warnings);
dynstr_free(&global_eval_query);
free_all_replace();
my_free(opt_pass,MYF(MY_ALLOW_ZERO_PTR));
free_defaults(default_argv);
@ -5509,8 +5514,6 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
MYSQL *mysql= &cn->mysql;
DYNAMIC_STRING *ds;
DYNAMIC_STRING ds_result;
DYNAMIC_STRING ds_warnings;
DYNAMIC_STRING eval_query;
char *query;
int query_len;
my_bool view_created= 0, sp_created= 0;
@ -5518,7 +5521,7 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
(flags & QUERY_REAP_FLAG));
DBUG_ENTER("run_query");
init_dynamic_string(&ds_warnings, NULL, 0, 256);
init_dynamic_string(&global_ds_warnings, NULL, 0, 256);
/* Scan for warning before sendign to server */
scan_command_for_warnings(command);
@ -5528,10 +5531,10 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
*/
if (command->type == Q_EVAL)
{
init_dynamic_string(&eval_query, "", command->query_len+256, 1024);
do_eval(&eval_query, command->query, command->end, FALSE);
query = eval_query.str;
query_len = eval_query.length;
init_dynamic_string(&global_eval_query, "", command->query_len+256, 1024);
do_eval(&global_eval_query, command->query, command->end, FALSE);
query = global_eval_query.str;
query_len = global_eval_query.length;
}
else
{
@ -5603,7 +5606,7 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
Collect warnings from create of the view that should otherwise
have been produced when the SELECT was executed
*/
append_warnings(&ds_warnings, cur_con->util_mysql);
append_warnings(&global_ds_warnings, cur_con->util_mysql);
}
dynstr_free(&query_str);
@ -5662,10 +5665,10 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
if (ps_protocol_enabled &&
complete_query &&
match_re(&ps_re, query))
run_query_stmt(mysql, command, query, query_len, ds, &ds_warnings);
run_query_stmt(mysql, command, query, query_len, ds, &global_ds_warnings);
else
run_query_normal(cn, command, flags, query, query_len,
ds, &ds_warnings);
ds, &global_ds_warnings);
if (sp_created)
{
@ -5689,11 +5692,11 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
check_require(ds, command->require_file);
}
dynstr_free(&ds_warnings);
dynstr_free(&global_ds_warnings);
if (ds == &ds_result)
dynstr_free(&ds_result);
if (command->type == Q_EVAL)
dynstr_free(&eval_query);
dynstr_free(&global_eval_query);
DBUG_VOID_RETURN;
}
@ -6605,7 +6608,8 @@ typedef struct st_replace_found {
void replace_strings_append(REPLACE *rep, DYNAMIC_STRING* ds,
const char *str, int len)
const char *str,
int len __attribute__((unused)))
{
reg1 REPLACE *rep_pos;
reg2 REPLACE_STRING *rep_str;
@ -6996,7 +7000,7 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
we need at least what we have so far in the buffer + the part
before this match
*/
need_buf_len= (res_p - buf) + subs[0].rm_so;
need_buf_len= (res_p - buf) + (int) subs[0].rm_so;
/* on this pass, calculate the memory for the result buffer */
while (expr_p < replace_end)
@ -7006,17 +7010,17 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
if (c == '\\' && expr_p + 1 < replace_end)
{
back_ref_num= expr_p[1] - '0';
back_ref_num= (int) (expr_p[1] - '0');
}
/* found a valid back_ref (eg. \1)*/
if (back_ref_num >= 0 && back_ref_num <= (int)r.re_nsub)
{
int start_off,end_off;
regoff_t start_off, end_off;
if ((start_off=subs[back_ref_num].rm_so) > -1 &&
(end_off=subs[back_ref_num].rm_eo) > -1)
{
need_buf_len += (end_off - start_off);
need_buf_len += (int) (end_off - start_off);
}
expr_p += 2;
}
@ -7036,7 +7040,7 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
/* copy the pre-match part */
if (subs[0].rm_so)
{
memcpy(res_p, str_p, subs[0].rm_so);
memcpy(res_p, str_p, (size_t) subs[0].rm_so);
res_p+= subs[0].rm_so;
}
@ -7055,11 +7059,11 @@ int reg_replace(char** buf_p, int* buf_len_p, char *pattern,
if (back_ref_num >= 0 && back_ref_num <= (int)r.re_nsub)
{
int start_off,end_off;
if ((start_off=subs[back_ref_num].rm_so) > -1 &&
regoff_t start_off, end_off;
if ((start_off= subs[back_ref_num].rm_so) > -1 &&
(end_off=subs[back_ref_num].rm_eo) > -1)
{
int block_len= end_off - start_off;
int block_len= (int) (end_off - start_off);
memcpy(res_p,str_p + start_off, block_len);
res_p += block_len;
}

View file

@ -23,8 +23,6 @@
#define NOT_FIXED_DEC 31
#endif
#define STRING_WITH_LEN(X) ((const char*) X), ((uint) (sizeof(X) - 1))
class String;
int sortcmp(const String *a,const String *b, CHARSET_INFO *cs);
String *copy_if_not_alloced(String *a,String *b,uint32 arg_length);

View file

@ -39,8 +39,7 @@
/* **************************************************************** */
static void
memory_error_and_abort (fname)
char *fname;
memory_error_and_abort(const char *fname)
{
fprintf (stderr, "%s: out of virtual memory\n", fname);
exit (2);
@ -57,7 +56,7 @@ xmalloc (bytes)
temp = malloc (bytes);
if (temp == 0)
memory_error_and_abort ("xmalloc");
memory_error_and_abort("xmalloc");
return (temp);
}
@ -71,7 +70,7 @@ xrealloc (pointer, bytes)
temp = pointer ? realloc (pointer, bytes) : malloc (bytes);
if (temp == 0)
memory_error_and_abort ("xrealloc");
memory_error_and_abort("xrealloc");
return (temp);
}

View file

@ -7,7 +7,7 @@ AC_INIT(sql/mysqld.cc)
AC_CANONICAL_SYSTEM
# The Docs Makefile.am parses this line!
# remember to also update version.c in ndb
AM_INIT_AUTOMAKE(mysql, 5.1.16-beta)
AM_INIT_AUTOMAKE(mysql, 5.1.17-beta)
AM_CONFIG_HEADER(config.h)
PROTOCOL_VERSION=10
@ -715,7 +715,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
sys/ioctl.h malloc.h sys/malloc.h sys/ipc.h sys/shm.h linux/config.h \
sys/resource.h sys/param.h)
sys/resource.h sys/param.h port.h)
AC_CHECK_HEADERS([xfs/xfs.h])
@ -983,7 +983,7 @@ case $SYSTEM_TYPE in
AC_DEFINE([DEFAULT_SKIP_THREAD_PRIORITY], [1], [default to skip thread priority])
if test "$ac_cv_prog_gcc" = "yes"
then
FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT"
FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -DDONT_DECLARE_CXA_PURE_VIRTUAL"
CFLAGS="$CFLAGS $FLAGS"
CXXFLAGS="$CXXFLAGS $FLAGS"
MAX_C_OPTIMIZE="-O"
@ -1883,9 +1883,9 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
realpath rename rint rwlock_init setupterm \
shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
sighold sigset sigthreadmask sleep \
snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr strtol \
strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
sighold sigset sigthreadmask port_create sleep \
snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
posix_fallocate)
#

View file

@ -1,299 +0,0 @@
***************
*** 388,402 ****
if expr "$target_os" : "[[Ll]]inux.*" > /dev/null
then
MYSQLD_DEFAULT_SWITCHES="--skip-locking"
! IS_LINUX="true"
AC_MSG_RESULT("yes");
else
MYSQLD_DEFAULT_SWITCHES=""
! IS_LINUX="false"
AC_MSG_RESULT("no");
fi
AC_SUBST(MYSQLD_DEFAULT_SWITCHES)
! AC_SUBST(IS_LINUX)
dnl Find paths to some shell programs
AC_PATH_PROG(LN, ln, ln)
--- 388,403 ----
if expr "$target_os" : "[[Ll]]inux.*" > /dev/null
then
MYSQLD_DEFAULT_SWITCHES="--skip-locking"
! TARGET_LINUX="true"
AC_MSG_RESULT("yes");
+ AC_DEFINE([TARGET_OS_LINUX], [1], [Whether we build for Linux])
else
MYSQLD_DEFAULT_SWITCHES=""
! TARGET_LINUX="false"
AC_MSG_RESULT("no");
fi
AC_SUBST(MYSQLD_DEFAULT_SWITCHES)
! AC_SUBST(TARGET_LINUX)
dnl Find paths to some shell programs
AC_PATH_PROG(LN, ln, ln)
***************
*** 576,582 ****
# (this is true on the MySQL build machines to avoid NSS problems)
#
! if test "$IS_LINUX" = "true" -a "$static_nss" = ""
then
tmp=`nm /usr/lib/libc.a | grep _nss_files_getaliasent_r`
if test -n "$tmp"
--- 577,583 ----
# (this is true on the MySQL build machines to avoid NSS problems)
#
! if test "$TARGET_LINUX" = "true" -a "$static_nss" = ""
then
tmp=`nm /usr/lib/libc.a | grep _nss_files_getaliasent_r`
if test -n "$tmp"
***************
*** 827,833 ****
])
AC_SUBST(WRAPLIBS)
! if test "$IS_LINUX" = "true"; then
AC_MSG_CHECKING([for atomic operations])
AC_LANG_SAVE
--- 828,834 ----
])
AC_SUBST(WRAPLIBS)
! if test "$TARGET_LINUX" = "true"; then
AC_MSG_CHECKING([for atomic operations])
AC_LANG_SAVE
***************
*** 870,876 ****
[ USE_PSTACK=no ])
pstack_libs=
pstack_dirs=
! if test "$USE_PSTACK" = yes -a "$IS_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -a "$with_mit_threads" = "no"
then
have_libiberty= have_libbfd=
my_save_LIBS="$LIBS"
--- 871,877 ----
[ USE_PSTACK=no ])
pstack_libs=
pstack_dirs=
! if test "$USE_PSTACK" = yes -a "$TARGET_LINUX" = "true" -a "$BASE_MACHINE_TYPE" = "i386" -a "$with_mit_threads" = "no"
then
have_libiberty= have_libbfd=
my_save_LIBS="$LIBS"
***************
*** 1239,1301 ****
# Hack for DEC-UNIX (OSF1)
if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
then
! # Look for LinuxThreads.
! AC_MSG_CHECKING("LinuxThreads")
! grepres=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
! getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep LINUXTHREADS | wc -l || echo 0`
! if test "$grepres" -gt 0 -o "$getconfres" -gt 0
then
! AC_MSG_RESULT("Found")
! AC_DEFINE(HAVE_LINUXTHREADS)
! # Linux 2.0 sanity check
! AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], ,
! AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual]))
! # RedHat 5.0 does not work with dynamic linking of this. -static also
! # gives a speed increase in linux so it does not hurt on other systems.
! with_named_thread="-lpthread"
! else
! AC_MSG_RESULT("Not found")
! # If this is a linux machine we should barf
! AC_MSG_CHECKING("NPTL")
! if test "$IS_LINUX" = "true"
! then
! getconfres=`which getconf >/dev/null && getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ |grep NPTL | wc -l || echo 0`
! if test "$getconfres" -gt 0
then
! AC_DEFINE(HAVE_LINUXTHREADS) dnl All this code predates NPTL, so "have linuxthreads" is a poor name.
! with_named_thread="-lpthread"
else
! AC_MSG_ERROR([This is a Linux system and neither Linuxthreads nor NPTL were
! found. Please install Linuxthreads or a new glibc and try
! again. See the Installation chapter in the Reference Manual for
! more information.])
fi
! else
! AC_MSG_CHECKING("DEC threads")
! if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a
! then
! with_named_thread="-lpthread -lmach -lexc"
! CFLAGS="$CFLAGS -D_REENTRANT"
! CXXFLAGS="$CXXFLAGS -D_REENTRANT"
! AC_DEFINE(HAVE_DEC_THREADS)
! AC_MSG_RESULT("yes")
! else
! AC_MSG_RESULT("no")
! AC_MSG_CHECKING("DEC 3.2 threads")
! if test -f /usr/shlib/libpthreads.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a
! then
! with_named_thread="-lpthreads -lmach -lc_r"
! AC_DEFINE(HAVE_DEC_THREADS)
! AC_DEFINE(HAVE_DEC_3_2_THREADS)
! with_osf32_threads="yes"
! MYSQLD_DEFAULT_SWITCHES="--skip-thread-priority"
! AC_MSG_RESULT("yes")
! else
! AC_MSG_RESULT("no")
! fi
! fi
! fi
! fi
fi
--- 1240,1337 ----
# Hack for DEC-UNIX (OSF1)
if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
then
! AC_MSG_CHECKING("Linux threads")
! if test "$TARGET_LINUX" = "true"
then
! AC_MSG_RESULT("starting")
! # use getconf to check glibc contents
! AC_MSG_CHECKING("getconf GNU_LIBPTHREAD_VERSION")
! case `getconf GNU_LIBPTHREAD_VERSION | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` in
! NPTL* )
! AC_MSG_RESULT("NPTL")
! AC_DEFINE([HAVE_NPTL], [1], [NPTL threads implementation])
! with_named_thread="-lpthread"
! ;;
! LINUXTHREADS* )
! AC_MSG_RESULT("Linuxthreads")
! AC_DEFINE([HAVE_LINUXTHREADS], [1],
! [Whether we are using Xavier Leroy's LinuxThreads])
! with_named_thread="-lpthread"
! ;;
! * )
! AC_MSG_RESULT("unknown")
! ;;
! esac
! if test "$with_named_thread" = "no"
then
! # old method, check headers
! # Look for LinuxThreads.
! AC_MSG_CHECKING("LinuxThreads in header file comment")
! res=`grep Linuxthreads /usr/include/pthread.h 2>/dev/null | wc -l`
! if test "$res" -gt 0
! then
! AC_MSG_RESULT("Found")
! AC_DEFINE([HAVE_LINUXTHREADS], [1],
! [Whether we are using Xavier Leroy's LinuxThreads])
! # Linux 2.0 sanity check
! AC_TRY_COMPILE([#include <sched.h>], [int a = sched_get_priority_min(1);], ,
! AC_MSG_ERROR([Syntax error in sched.h. Change _P to __P in the /usr/include/sched.h file. See the Installation chapter in the Reference Manual]))
! # RedHat 5.0 does not work with dynamic linking of this. -static also
! # gives a speed increase in linux so it does not hurt on other systems.
! with_named_thread="-lpthread"
! else
! AC_MSG_RESULT("Not found")
! # If this is a linux machine we should barf
! AC_MSG_ERROR([This is a Linux system without a working getconf,
! and Linuxthreads was not found. Please install it (or a new glibc) and try again.
! See the Installation chapter in the Reference Manual for more information.])
! fi
else
! AC_MSG_RESULT("no need to check headers")
fi
! AC_MSG_CHECKING("for pthread_create in -lpthread");
! ac_save_LIBS="$LIBS"
! LIBS="$LIBS -lpthread"
! AC_TRY_LINK( [#include <pthread.h>],
! [ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
! AC_MSG_RESULT("yes"),
! [ AC_MSG_RESULT("no")
! AC_MSG_ERROR([
! This is a Linux system claiming to support threads, either Linuxthreads or NPTL, but linking a test program failed.
! Please install one of these (or a new glibc) and try again.
! See the Installation chapter in the Reference Manual for more information.]) ]
! )
! LIBS="$ac_save_LIBS"
! else
! AC_MSG_RESULT("no")
! fi # "$TARGET_LINUX"
! fi # "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
!
! if test "$with_named_thread" = "no" -a "$with_mit_threads" = "no"
! then
! AC_MSG_CHECKING("DEC threads")
! if test -f /usr/shlib/libpthread.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a
! then
! with_named_thread="-lpthread -lmach -lexc"
! CFLAGS="$CFLAGS -D_REENTRANT"
! CXXFLAGS="$CXXFLAGS -D_REENTRANT"
! AC_DEFINE(HAVE_DEC_THREADS)
! AC_MSG_RESULT("yes")
! else
! AC_MSG_RESULT("no")
! AC_MSG_CHECKING("DEC 3.2 threads")
! if test -f /usr/shlib/libpthreads.so -a -f /usr/lib/libmach.a -a -f /usr/ccs/lib/cmplrs/cc/libexc.a
! then
! with_named_thread="-lpthreads -lmach -lc_r"
! AC_DEFINE(HAVE_DEC_THREADS)
! AC_DEFINE(HAVE_DEC_3_2_THREADS)
! with_osf32_threads="yes"
! MYSQLD_DEFAULT_SWITCHES="--skip-thread-priority"
! AC_MSG_RESULT("yes")
! else
! AC_MSG_RESULT("no")
! fi
! fi
fi
***************
*** 1720,1726 ****
AC_SUBST(COMPILATION_COMMENT)
AC_MSG_CHECKING("need of special linking flags")
! if test "$IS_LINUX" = "true" -a "$ac_cv_prog_gcc" = "yes" -a "$all_is_static" != "yes"
then
LDFLAGS="$LDFLAGS -rdynamic"
AC_MSG_RESULT("-rdynamic")
--- 1756,1762 ----
AC_SUBST(COMPILATION_COMMENT)
AC_MSG_CHECKING("need of special linking flags")
! if test "$TARGET_LINUX" = "true" -a "$ac_cv_prog_gcc" = "yes" -a "$all_is_static" != "yes"
then
LDFLAGS="$LDFLAGS -rdynamic"
AC_MSG_RESULT("-rdynamic")
***************
*** 1873,1878 ****
tell atod memcpy memmove \
setupterm strcasecmp sighold vidattr lrand48 localtime_r \
sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \
pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \
pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \
pthread_attr_getstacksize pthread_key_delete \
--- 1909,1915 ----
tell atod memcpy memmove \
setupterm strcasecmp sighold vidattr lrand48 localtime_r \
sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \
+ sigaction sigemptyset sigaddset \
pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \
pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \
pthread_attr_getstacksize pthread_key_delete \
***************
*** 1884,1890 ****
# Sanity check: We chould not have any fseeko symbol unless
# large_file_support=yes
AC_CHECK_FUNCS(fseeko,
! [if test "$large_file_support" = no -a "$IS_LINUX" = "true";
then
AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!");
fi]
--- 1921,1927 ----
# Sanity check: We chould not have any fseeko symbol unless
# large_file_support=yes
AC_CHECK_FUNCS(fseeko,
! [if test "$large_file_support" = no -a "$TARGET_LINUX" = "true";
then
AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!");
fi]

View file

@ -153,7 +153,9 @@ int main(int argc, char **argv) {
my_init();
if (argc > argcnt && argv[argcnt][0] == '-' && argv[argcnt][1] == '#')
{
DBUG_PUSH(argv[argcnt++]+2);
}
if (argc > argcnt)
the_set = argv[argcnt++];

View file

@ -41,7 +41,9 @@ static char *NAMEFILE= (char*) "mysqld_ername.h";
static char *STATEFILE= (char*) "sql_state.h";
static char *TXTFILE= (char*) "../sql/share/errmsg.txt";
static char *DATADIRECTORY= (char*) "../sql/share/";
#ifndef DBUG_OFF
static char *default_dbug_option= (char*) "d:t:O,/tmp/comp_err.trace";
#endif
/* Header for errmsg.sys files */
uchar file_head[]= { 254, 254, 2, 1 };
@ -404,6 +406,8 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
int rcount= 0;
DBUG_ENTER("parse_input_file");
*top_error= 0;
*top_lang= 0;
if (!(file= my_fopen(file_name, O_RDONLY | O_SHARE, MYF(MY_WME))))
DBUG_RETURN(0);

View file

@ -28,7 +28,7 @@ namespace yaSSL {
#ifdef MULTI_THREADED
#ifdef _WIN32
#if defined(_WIN32) || defined(_WIN64)
#include <windows.h>
class Mutex {

View file

@ -33,9 +33,14 @@
#include "opensslv.h" /* for version number */
#include "rsa.h"
#define YASSL_VERSION "1.5.8"
#if defined(_WIN32) || defined(_WIN64)
#include <winsock2.h>
typedef SOCKET socket_t;
#else
typedef int socket_t;
#endif
#if defined(__cplusplus)
extern "C" {
@ -191,10 +196,9 @@ enum { /* ERR Constants */
};
SSL_CTX* SSL_CTX_new(SSL_METHOD*);
SSL* SSL_new(SSL_CTX*);
int SSL_set_fd (SSL*, int);
int SSL_set_fd (SSL*, socket_t);
int SSL_connect(SSL*);
int SSL_write(SSL*, const void*, int);
int SSL_read(SSL*, void*, int);

View file

@ -28,9 +28,8 @@
#include <assert.h>
#ifdef _WIN32
#include <winsock2.h>
#else
#include "openssl/ssl.h" /* for socket_t */
#if !defined(_WIN32) && !defined(_WIN64)
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
@ -44,10 +43,7 @@ namespace yaSSL {
typedef unsigned int uint;
#ifdef _WIN32
typedef SOCKET socket_t;
#else
typedef int socket_t;
#if !defined( _WIN32) && !defined(_WIN64)
const socket_t INVALID_SOCKET = -1;
const int SD_RECEIVE = 0;
const int SD_SEND = 1;

View file

@ -28,7 +28,7 @@
namespace yaSSL {
#ifdef _WIN32
#if defined(_WIN32) || defined(_WIN64)
typedef unsigned int SOCKET_T;
#else
typedef int SOCKET_T;

View file

@ -39,6 +39,7 @@
#include "coding.hpp" // HexDecoder
#include "helpers.hpp" // for placement new hack
#include <stdio.h>
#include <assert.h>
#ifdef _WIN32
#include <windows.h> // FindFirstFile etc..
@ -58,6 +59,9 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM)
return SSL_BAD_FILETYPE;
if (file == NULL || !file[0])
return SSL_BAD_FILE;
FILE* input = fopen(file, "rb");
if (!input)
return SSL_BAD_FILE;
@ -229,7 +233,7 @@ void SSL_free(SSL* ssl)
}
int SSL_set_fd(SSL* ssl, int fd)
int SSL_set_fd(SSL* ssl, socket_t fd)
{
ssl->useSocket().set_fd(fd);
return SSL_SUCCESS;
@ -950,7 +954,7 @@ void ERR_print_errors_fp(FILE* /*fp*/)
char* ERR_error_string(unsigned long errNumber, char* buffer)
{
static char* msg = "Please supply a buffer for error string";
static char* msg = (char*) "Please supply a buffer for error string";
if (buffer) {
SetErrorString(YasslError(errNumber), buffer);

View file

@ -27,6 +27,8 @@
namespace mySTL {
#undef max
#undef min
template<typename T>
inline const T& max(const T& a, const T&b)

View file

@ -3390,7 +3390,7 @@ void Integer::DivideByPowerOf2(Integer &r, Integer &q, const Integer &a,
CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), wordCount);
SetWords(r.reg_+wordCount, 0, r.reg_.size()-wordCount);
if (n % WORD_BITS != 0)
r.reg_[wordCount-1] %= (1 << (n % WORD_BITS));
r.reg_[wordCount-1] %= ((word) 1 << (n % WORD_BITS));
}
else
{

View file

@ -86,8 +86,8 @@ int main(int argc, char** argv)
// input output compare
byte input[TaoCrypt::MD5::DIGEST_SIZE];
byte output[TaoCrypt::MD5::DIGEST_SIZE];
file_test("input", input);
file_test("output", output);
file_test((char*) "input", input);
file_test((char*) "output", output);
assert(memcmp(input, output, sizeof(input)) == 0);
printf("\nAll tests passed!\n");

View file

@ -27,7 +27,7 @@ functions */
#endif
#include <sys/locking.h>
#include <windows.h>
#include <winsock2.h>
#include <math.h> /* Because of rint() */
#include <fcntl.h>
#include <io.h>
@ -350,6 +350,7 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_SETFILEPOINTER
#define HAVE_VIO_READ_BUFF
#define HAVE_STRNLEN
#define HAVE_WINSOCK2
#define strcasecmp stricmp
#define strncasecmp strnicmp

View file

@ -47,6 +47,7 @@
#define HA_OPEN_ABORT_IF_CRASHED 16
#define HA_OPEN_FOR_REPAIR 32 /* open even if crashed */
#define HA_OPEN_FROM_SQL_LAYER 64
#define HA_OPEN_MMAP 128 /* open memory mapped */
/* The following is parameter to ha_rkey() how to use key */

View file

@ -80,6 +80,7 @@ extern FILE *_db_fp_(void);
#define DBUG_ASSERT(A) assert(A)
#define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len))
#define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len))
#define IF_DBUG(A) A
#else /* No debugger */
#define DBUG_ENTER(a1)
@ -95,7 +96,7 @@ extern FILE *_db_fp_(void);
#define DBUG_SET(a1)
#define DBUG_SET_INITIAL(a1)
#define DBUG_POP()
#define DBUG_PROCESS(a1) (a1)
#define DBUG_PROCESS(a1)
#define DBUG_SETJMP(a1) setjmp(a1)
#define DBUG_LONGJMP(a1) longjmp(a1)
#define DBUG_DUMP(keyword,a1,a2)
@ -106,6 +107,7 @@ extern FILE *_db_fp_(void);
#define DBUG_UNLOCK_FILE
#define DBUG_EXPLAIN(buf,len)
#define DBUG_EXPLAIN_INITIAL(buf,len)
#define IF_DBUG(A)
#endif
#ifdef __cplusplus
}

View file

@ -932,7 +932,6 @@ typedef unsigned long long my_size_t;
#define my_offsetof(TYPE, MEMBER) \
((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
#define NullS (char *) 0
/* Nowdays we do not support MessyDos */
#ifndef NEAR
@ -1171,7 +1170,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */
*/
#define uint3korr(A) (long) (*((unsigned int *) (A)) & 0xFFFFFF)
#endif
#define uint4korr(A) (*((unsigned long *) (A)))
#define uint4korr(A) (*((uint32 *) (A)))
#define uint5korr(A) ((ulonglong)(((uint32) ((uchar) (A)[0])) +\
(((uint32) ((uchar) (A)[1])) << 8) +\
(((uint32) ((uchar) (A)[2])) << 16) +\
@ -1285,17 +1284,19 @@ do { doubleget_union _tmp; \
*(((char *)(T))+1)=(char) (((A) >> 8));\
*(((char *)(T))+2)=(char) (((A) >> 16));\
*(((char *)(T))+3)=(char) (((A) >> 24)); } while(0)
#define int5store(T,A) do { *((char *)(T))=((A));\
*(((char *)(T))+1)=(((A) >> 8));\
*(((char *)(T))+2)=(((A) >> 16));\
*(((char *)(T))+3)=(((A) >> 24)); \
*(((char *)(T))+4)=(((A) >> 32)); } while(0)
#define int6store(T,A) do { *((char *)(T))=((A));\
*(((char *)(T))+1)=(((A) >> 8)); \
*(((char *)(T))+2)=(((A) >> 16)); \
*(((char *)(T))+3)=(((A) >> 24)); \
*(((char *)(T))+4)=(((A) >> 32)); \
*(((char *)(T))+5)=(((A) >> 40)); } while(0)
#define int5store(T,A) do { *((char *)(T))= (char)((A)); \
*(((char *)(T))+1)= (char)(((A) >> 8)); \
*(((char *)(T))+2)= (char)(((A) >> 16)); \
*(((char *)(T))+3)= (char)(((A) >> 24)); \
*(((char *)(T))+4)= (char)(((A) >> 32)); \
} while(0)
#define int6store(T,A) do { *((char *)(T))= (char)((A)); \
*(((char *)(T))+1)= (char)(((A) >> 8)); \
*(((char *)(T))+2)= (char)(((A) >> 16)); \
*(((char *)(T))+3)= (char)(((A) >> 24)); \
*(((char *)(T))+4)= (char)(((A) >> 32)); \
*(((char *)(T))+5)= (char)(((A) >> 40)); \
} while(0)
#define int8store(T,A) do { uint def_temp= (uint) (A), def_temp2= (uint) ((A) >> 32); \
int4store((T),def_temp); \
int4store((T+4),def_temp2); } while(0)

View file

@ -1,17 +0,0 @@
***************
*** 97,103 ****
/* Fix problem with S_ISLNK() on Linux */
! #if defined(HAVE_LINUXTHREADS)
#undef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
--- 97,103 ----
/* Fix problem with S_ISLNK() on Linux */
! #if defined(TARGET_OS_LINUX) || defined(__GLIBC__)
#undef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif

View file

@ -18,7 +18,6 @@
#ifndef _my_pthread_h
#define _my_pthread_h
#include <errno.h>
#ifndef ETIME
#define ETIME ETIMEDOUT /* For FreeBSD */
#endif
@ -85,6 +84,7 @@ typedef struct {
typedef int pthread_mutexattr_t;
#define win_pthread_self my_thread_var->pthread_self
#define pthread_self() win_pthread_self
#define pthread_handler_t EXTERNC void * __cdecl
typedef void * (__cdecl *pthread_handler)(void *);
@ -140,7 +140,6 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#define ETIMEDOUT 145 /* Win32 doesn't have this */
#define getpid() GetCurrentThreadId()
#define pthread_self() win_pthread_self
#define HAVE_LOCALTIME_R 1
#define _REENTRANT 1
#define HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
@ -648,12 +647,14 @@ extern pthread_mutexattr_t my_errorcheck_mutexattr;
#define MY_MUTEX_INIT_ERRCHK NULL
#endif
typedef ulong my_thread_id;
extern my_bool my_thread_global_init(void);
extern void my_thread_global_end(void);
extern my_bool my_thread_init(void);
extern void my_thread_end(void);
extern const char *my_thread_name(void);
extern long my_thread_id(void);
extern my_thread_id my_thread_dbug_id(void);
extern int pthread_no_free(void *);
extern int pthread_dummy(int);
@ -680,7 +681,7 @@ struct st_my_thread_var
pthread_mutex_t * volatile current_mutex;
pthread_cond_t * volatile current_cond;
pthread_t pthread_self;
long id;
my_thread_id id;
int cmp_length;
int volatile abort;
my_bool init;

View file

@ -1,80 +0,0 @@
***************
*** 286,293 ****
#undef HAVE_PTHREAD_RWLOCK_RDLOCK
#undef HAVE_SNPRINTF
! #define sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
! #define signal(A,B) pthread_signal((A),(void (*)(int)) (B))
#define my_pthread_attr_setprio(A,B)
#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
--- 294,301 ----
#undef HAVE_PTHREAD_RWLOCK_RDLOCK
#undef HAVE_SNPRINTF
! #define my_sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
! #define my_signal(A,B) pthread_signal((A),(void (*)(int)) (B))
#define my_pthread_attr_setprio(A,B)
#endif /* defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM) */
***************
*** 324,337 ****
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
#endif
! #if !defined(HAVE_SIGSET) && !defined(HAVE_mit_thread) && !defined(sigset)
! #define sigset(A,B) do { struct sigaction s; sigset_t set; \
! sigemptyset(&set); \
! s.sa_handler = (B); \
! s.sa_mask = set; \
! s.sa_flags = 0; \
! sigaction((A), &s, (struct sigaction *) NULL); \
} while (0)
#endif
#ifndef my_pthread_setprio
--- 332,358 ----
#if !defined(HAVE_SIGWAIT) && !defined(HAVE_mit_thread) && !defined(HAVE_rts_threads) && !defined(sigwait) && !defined(alpha_linux_port) && !defined(HAVE_NONPOSIX_SIGWAIT) && !defined(HAVE_DEC_3_2_THREADS) && !defined(_AIX)
int sigwait(sigset_t *setp, int *sigp); /* Use our implemention */
#endif
!
! /*
! We define my_sigset() and use that instead of the system sigset() so that
! we can favor an implementation based on sigaction(). On some systems, such
! as Mac OS X, sigset() results in flags such as SA_RESTART being set, and
! we want to make sure that no such flags are set.
! */
! #if defined(HAVE_SIGACTION) && !defined(my_sigset)
! #define my_sigset(A,B) do { struct sigaction s; sigset_t set; int rc; \
! DBUG_ASSERT((A) != 0); \
! sigemptyset(&set); \
! s.sa_handler = (B); \
! s.sa_mask = set; \
! s.sa_flags = 0; \
! rc= sigaction((A), &s, (struct sigaction *) NULL); \
! DBUG_ASSERT(rc == 0); \
} while (0)
+ #elif defined(HAVE_SIGSET) && !defined(my_sigset)
+ #define my_sigset(A,B) sigset((A),(B))
+ #elif !defined(my_sigset)
+ #define my_sigset(A,B) signal((A),(B))
#endif
#ifndef my_pthread_setprio
***************
*** 416,422 ****
#undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
#undef sigset
! #define sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
#endif
#if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER)
--- 437,443 ----
#undef pthread_detach_this_thread
#define pthread_detach_this_thread() { pthread_t tmp=pthread_self() ; pthread_detach(tmp); }
#undef sigset
! #define my_sigset(A,B) pthread_signal((A),(void (*)(int)) (B))
#endif
#if ((defined(HAVE_PTHREAD_ATTR_CREATE) && !defined(HAVE_SIGWAIT)) || defined(HAVE_DEC_3_2_THREADS)) && !defined(HAVE_CTHREADS_WRAPPER)

View file

@ -42,7 +42,7 @@ extern "C" {
#ifndef _global_h /* If not standard header */
#include <sys/types.h>
#ifdef __LCC__
#include <winsock.h> /* For windows */
#include <winsock2.h> /* For windows */
#endif
typedef char my_bool;
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)

View file

@ -86,6 +86,7 @@ typedef struct st_alarm {
ulong expire_time;
thr_alarm_entry alarmed; /* set when alarm is due */
pthread_t thread;
my_thread_id thread_id;
my_bool malloced;
} ALARM;
@ -94,7 +95,7 @@ typedef struct st_alarm {
void init_thr_alarm(uint max_alarm);
void resize_thr_alarm(uint max_alarms);
my_bool thr_alarm(thr_alarm_t *alarmed, uint sec, ALARM *buff);
void thr_alarm_kill(pthread_t thread_id);
void thr_alarm_kill(my_thread_id thread_id);
void thr_end_alarm(thr_alarm_t *alarmed);
void end_thr_alarm(my_bool free_structures);
sig_handler process_alarm(int);

View file

@ -78,7 +78,7 @@ extern enum thr_lock_type thr_upgraded_concurrent_insert_lock;
typedef struct st_thr_lock_info
{
pthread_t thread;
ulong thread_id;
my_thread_id thread_id;
ulong n_cursors;
} THR_LOCK_INFO;
@ -144,7 +144,7 @@ enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
uint count, THR_LOCK_OWNER *owner);
void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
void thr_abort_locks(THR_LOCK *lock, bool upgrade_lock);
my_bool thr_abort_locks_for_thread(THR_LOCK *lock, pthread_t thread);
my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread);
void thr_print_locks(void); /* For debugging */
my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data);
void thr_downgrade_write_lock(THR_LOCK_DATA *data,

View file

@ -1,5 +1,4 @@
LIBRARY LIBMYSQL
DESCRIPTION 'MySQL 5.0 Client Library'
VERSION 6.0
EXPORTS
_dig_vec_lower

View file

@ -74,6 +74,7 @@ ADD_LIBRARY(mysqldemb emb_qcache.cc libmysqld.c lib_sql.cc
../sql/strfunc.cc ../sql/table.cc ../sql/thr_malloc.cc
../sql/time.cc ../sql/tztime.cc ../sql/uniques.cc ../sql/unireg.cc
../sql/partition_info.cc ../sql/sql_locale.cc
../sql/sql_connect.cc ../sql/scheduler.cc
../vio/vio.c ../vio/viosocket.c ../vio/viossl.c
../vio/viosslfactories.c
${PROJECT_SOURCE_DIR}/sql/sql_yacc.cc

View file

@ -59,7 +59,8 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
sql_load.cc discover.cc sql_locale.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_parse.cc \
sql_lex.cc sql_list.cc sql_manager.cc sql_map.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 \
sql_string.cc sql_table.cc sql_test.cc sql_udf.cc \

View file

@ -3,7 +3,7 @@
#pragma hdrstop
#include "emb_samples.h"
#include <winsock.h>
#include <winsock2.h>
#include <mysql.h>
#include <stdarg.h>
#include <stdio.h>

View file

@ -34,11 +34,6 @@ extern "C"
#include "../sql/mysqld.cc"
#endif
int check_user(THD *thd, enum enum_server_command command,
const char *passwd, uint passwd_len, const char *db,
bool check_count);
void thd_init_client_charset(THD *thd, uint cs_number);
C_MODE_START
#include <mysql.h>
@ -585,10 +580,7 @@ void *create_embedded_thd(int client_flag)
goto err;
}
thd->mysys_var= my_thread_var;
thd->dbug_thread_id= my_thread_id();
/* TODO - add init_connect command execution */
/* TODO - add init_connect command execution */
if (thd->variables.max_join_size == HA_POS_ERROR)
thd->options |= OPTION_BIG_SELECTS;

View file

@ -128,6 +128,21 @@ show binlog events;
drop table t1,t2,t3;
#
#Bug#19717: DELETE Query Error on BLACKHOLE when using WHERE on column with UNIQUE INDEX
#
CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 ADD INDEX(a);
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 DROP INDEX a;
ALTER TABLE t1 ADD UNIQUE INDEX(a);
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 DROP INDEX a;
ALTER TABLE t1 ADD PRIMARY KEY(a);
DELETE FROM t1 WHERE a=10;
DROP TABLE t1;
# End of 4.1 tests
# Test that a transaction which is rolled back does not go into binlog
# and that a transaction which is committed does

View file

@ -0,0 +1,5 @@
-- require r/one_thread_per_connection.require
disable_query_log;
select @@thread_handling;
enable_query_log;

View file

@ -236,8 +236,10 @@ sub mtr_report_stats ($) {
"the documentation at\n",
"http://www.mysql.com/doc/en/MySQL_test_suite.html\n";
}
print
"The servers were restarted $tot_restarts times\n";
if (!$::opt_extern)
{
print "The servers where restarted $tot_restarts times\n";
}
if ( $::opt_timer )
{

View file

@ -412,24 +412,24 @@ sub main () {
{
next if $test->{skip};
$need_ndbcluster||= $test->{ndb_test};
$need_im||= $test->{component_id} eq 'im';
# Count max number of slaves used by a test case
if ( $test->{slave_num} > $max_slave_num)
if (!$opt_extern)
{
$max_slave_num= $test->{slave_num};
mtr_error("Too many slaves") if $max_slave_num > 3;
}
$need_ndbcluster||= $test->{ndb_test};
$need_im||= $test->{component_id} eq 'im';
# Count max number of masters used by a test case
if ( $test->{master_num} > $max_master_num)
{
$max_master_num= $test->{master_num};
mtr_error("Too many masters") if $max_master_num > 2;
mtr_error("Too few masters") if $max_master_num < 1;
}
# Count max number of slaves used by a test case
if ( $test->{slave_num} > $max_slave_num) {
$max_slave_num= $test->{slave_num};
mtr_error("Too many slaves") if $max_slave_num > 3;
}
# Count max number of masters used by a test case
if ( $test->{master_num} > $max_master_num) {
$max_master_num= $test->{master_num};
mtr_error("Too many masters") if $max_master_num > 2;
mtr_error("Too few masters") if $max_master_num < 1;
}
}
$use_innodb||= $test->{'innodb_test'};
}
@ -703,7 +703,9 @@ sub command_line_setup () {
"$glob_basedir/client",
"$glob_basedir/bin");
$exe_mysqld= mtr_exe_exists (vs_config_dirs('sql', 'mysqld'),
if (!$opt_extern)
{
$exe_mysqld= mtr_exe_exists (vs_config_dirs('sql', 'mysqld'),
"$glob_basedir/sql/mysqld",
"$path_client_bindir/mysqld-max-nt",
"$path_client_bindir/mysqld-max",
@ -715,8 +717,16 @@ sub command_line_setup () {
"$glob_basedir/bin/mysqld",
"$glob_basedir/sbin/mysqld");
# Use the mysqld found above to find out what features are available
collect_mysqld_features();
# Use the mysqld found above to find out what features are available
collect_mysqld_features();
}
else
{
$mysqld_variables{'port'}= 3306;
$mysqld_variables{'master-port'}= 3306;
$opt_skip_ndbcluster= 1;
$opt_skip_im= 1;
}
if ( $opt_comment )
{
@ -753,7 +763,7 @@ sub command_line_setup () {
# --------------------------------------------------------------------------
# NOTE if the default binlog format is changed, this has to be changed
$used_binlog_format= "stmt";
if ( $mysql_version_id >= 50100 )
if (!$opt_extern && $mysql_version_id >= 50100 )
{
$used_binlog_format= "mixed"; # Default value for binlog format
@ -839,19 +849,20 @@ sub command_line_setup () {
# --------------------------------------------------------------------------
# Check im suport
# --------------------------------------------------------------------------
if ( $mysql_version_id < 50000 )
if (!$opt_extern)
{
# Instance manager is not supported until 5.0
$opt_skip_im= 1;
if ( $mysql_version_id < 50000 ) {
# Instance manager is not supported until 5.0
$opt_skip_im= 1;
}
if ( $glob_win32 ) {
mtr_report("Disable Instance manager - not supported on Windows");
$opt_skip_im= 1;
}
}
if ( $glob_win32 )
{
mtr_report("Disable Instance manager - not supported on Windows");
$opt_skip_im= 1;
}
# --------------------------------------------------------------------------
# Record flag
# --------------------------------------------------------------------------
@ -1215,7 +1226,7 @@ sub command_line_setup () {
$opt_skip_rpl= 1;
# Setup master->[0] with the settings for the extern server
$master->[0]->{'path_sock'}= $opt_socket if $opt_socket;
$master->[0]->{'path_sock'}= $opt_socket ? $opt_socket : "/tmp/mysql.sock";
mtr_report("Using extern server at '$master->[0]->{path_sock}'");
}
else
@ -1481,66 +1492,71 @@ sub executable_setup () {
$exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
if ( $mysql_version_id >= 50100 )
{
$exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
}
if ( $mysql_version_id >= 50000 and !$glob_use_embedded_server )
{
$exe_mysql_upgrade= mtr_exe_exists("$path_client_bindir/mysql_upgrade")
}
else
{
$exe_mysql_upgrade= "";
}
if ( ! $glob_win32 )
if (!$opt_extern)
{
# Look for mysql_fix_system_table script
$exe_mysql_fix_system_tables=
mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables",
"$path_client_bindir/mysql_fix_privilege_tables");
}
# Look for SQL scripts directory
$path_sql_dir= mtr_path_exists("$glob_basedir/share",
"$glob_basedir/scripts");
# Look for mysql_fix_privilege_tables.sql script
$file_mysql_fix_privilege_tables=
mtr_file_exists("$path_sql_dir/mysql_fix_privilege_tables.sql");
if ( ! $opt_skip_ndbcluster and executable_setup_ndb())
{
mtr_warning("Could not find all required ndb binaries, " .
"all ndb tests will fail, use --skip-ndbcluster to " .
"skip testing it.");
foreach my $cluster (@{$clusters})
if ( $mysql_version_id >= 50100 )
{
$cluster->{"executable_setup_failed"}= 1;
$exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
}
if ( $mysql_version_id >= 50000 and !$glob_use_embedded_server )
{
$exe_mysql_upgrade= mtr_exe_exists("$path_client_bindir/mysql_upgrade")
}
else
{
$exe_mysql_upgrade= "";
}
if ( ! $glob_win32 )
{
# Look for mysql_fix_system_table script
$exe_mysql_fix_system_tables=
mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables",
"$path_client_bindir/mysql_fix_privilege_tables");
}
# Look for mysql_fix_privilege_tables.sql script
$file_mysql_fix_privilege_tables=
mtr_file_exists("$glob_basedir/scripts/mysql_fix_privilege_tables.sql",
"$glob_basedir/share/mysql_fix_privilege_tables.sql");
if ( ! $opt_skip_ndbcluster and executable_setup_ndb())
{
mtr_warning("Could not find all required ndb binaries, " .
"all ndb tests will fail, use --skip-ndbcluster to " .
"skip testing it.");
foreach my $cluster (@{$clusters})
{
$cluster->{"executable_setup_failed"}= 1;
}
}
if ( ! $opt_skip_im and executable_setup_im())
{
mtr_warning("Could not find all required instance manager binaries, " .
"all im tests will fail, use --skip-im to " .
"continue without instance manager");
$instance_manager->{"executable_setup_failed"}= 1;
}
# Look for the udf_example library
$lib_udf_example=
mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'),
"$glob_basedir/sql/.libs/udf_example.so",);
# Look for the ha_example library
$lib_example_plugin=
mtr_file_exists(vs_config_dirs('storage/example', 'ha_example.dll'),
"$glob_basedir/storage/example/.libs/ha_example.so",);
}
if ( ! $opt_skip_im and executable_setup_im())
{
mtr_warning("Could not find all required instance manager binaries, " .
"all im tests will fail, use --skip-im to " .
"continue without instance manager");
$instance_manager->{"executable_setup_failed"}= 1;
}
# Look for the udf_example library
$lib_udf_example=
mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'),
"$glob_basedir/sql/.libs/udf_example.so",);
# Look for the ha_example library
$lib_example_plugin=
mtr_file_exists(vs_config_dirs('storage/example', 'ha_example.dll'),
"$glob_basedir/storage/example/.libs/ha_example.so",);
# Look for mysqltest executable
if ( $glob_use_embedded_server )
{
@ -1607,7 +1623,7 @@ sub mysql_client_test_arguments()
mtr_add_arg($args, "--port=$master->[0]->{'port'}");
mtr_add_arg($args, "--socket=$master->[0]->{'path_sock'}");
if ( $mysql_version_id >= 50000 )
if ( $opt_extern || $mysql_version_id >= 50000 )
{
mtr_add_arg($args, "--vardir=$opt_vardir")
}
@ -1726,7 +1742,7 @@ sub environment_setup () {
}
$ENV{'LD_LIBRARY_PATH'}= join(":", @ld_library_paths,
$ENV{'LD_LIBRARY_PATHS'} ?
$ENV{'LD_LIBRARY_PATH'} ?
split(':', $ENV{'LD_LIBRARY_PATH'}) : ());
mtr_debug("LD_LIBRARY_PATH: $ENV{'LD_LIBRARY_PATH'}");
@ -1911,7 +1927,7 @@ sub environment_setup () {
my $cmdline_mysqlbinlog=
mtr_native_path($exe_mysqlbinlog) .
" --no-defaults --disable-force-if-open --debug-info --local-load=$opt_tmpdir";
if ( $mysql_version_id >= 50000 )
if ( !$opt_extern && $mysql_version_id >= 50000 )
{
$cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
}
@ -1943,7 +1959,7 @@ sub environment_setup () {
# ----------------------------------------------------
# Setup env so childs can execute mysql_upgrade
# ----------------------------------------------------
if ( $mysql_version_id >= 50000 )
if ( !$opt_extern && $mysql_version_id >= 50000 )
{
$ENV{'MYSQL_UPGRADE'}= mysql_upgrade_arguments();
}
@ -1951,7 +1967,7 @@ sub environment_setup () {
# ----------------------------------------------------
# Setup env so childs can execute mysql_fix_system_tables
# ----------------------------------------------------
if ( ! $glob_win32 )
if ( !$opt_extern && ! $glob_win32 )
{
my $cmdline_mysql_fix_system_tables=
"$exe_mysql_fix_system_tables --no-defaults --host=localhost " .
@ -1962,7 +1978,10 @@ sub environment_setup () {
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
}
$ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables;
if (!$opt_extern)
{
$ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables;
}
# ----------------------------------------------------
# Setup env so childs can execute my_print_defaults
@ -2277,7 +2296,10 @@ sub check_ssl_support ($) {
if ($opt_skip_ssl || $opt_extern)
{
mtr_report("Skipping SSL");
if (!$opt_extern)
{
mtr_report("Skipping SSL");
}
$opt_ssl_supported= 0;
$opt_ssl= 0;
return;
@ -2352,9 +2374,12 @@ sub vs_config_dirs ($$) {
sub check_ndbcluster_support ($) {
my $mysqld_variables= shift;
if ($opt_skip_ndbcluster)
if ($opt_skip_ndbcluster || $opt_extern)
{
mtr_report("Skipping ndbcluster");
if (!$opt_extern)
{
mtr_report("Skipping ndbcluster");
}
$opt_skip_ndbcluster_slave= 1;
return;
}
@ -2770,7 +2795,10 @@ sub initialize_servers () {
}
else
{
mtr_report("No need to create '$opt_vardir' it already exists");
if ($opt_verbose)
{
mtr_report("No need to create '$opt_vardir' it already exists");
}
}
}
else
@ -3172,17 +3200,17 @@ sub do_before_run_mysqltest($)
unlink("$result_dir/$tname.log");
unlink("$result_dir/$tname.warnings");
if ( $mysql_version_id < 50000 )
if (!$opt_extern)
{
# Set environment variable NDB_STATUS_OK to 1
# if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "1";
}
elsif ( $mysql_version_id < 50100 )
{
# Set environment variable NDB_STATUS_OK to YES
# if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "YES";
if ( $mysql_version_id < 50000 ) {
# Set environment variable NDB_STATUS_OK to 1
# if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "1";
} elsif ( $mysql_version_id < 50100 ) {
# Set environment variable NDB_STATUS_OK to YES
# if script decided to run mysqltest cluster _is_ installed ok
$ENV{'NDB_STATUS_OK'} = "YES";
}
}
}
@ -4968,10 +4996,10 @@ sub usage ($) {
if ( $message )
{
print STDERR "$message \n";
print STDERR "$message\n";
}
print STDERR <<HERE;
print <<HERE;
$0 [ OPTIONS ] [ TESTCASE ]

View file

@ -35,7 +35,8 @@ if [ -d ../sql ] ; then
exec_mgmtsrvr=$ndbtop/src/mgmsrv/ndb_mgmd
exec_waiter=$ndbtop/tools/ndb_waiter
exec_test=$ndbtop/tools/ndb_test_platform
exec_mgmtclient=$ndbtop/src/mgmclient/ndb_mgm
exec_test_ndberror=
exec_test_ndberror=$ndbtop/src/ndbapi/ndberror_check
else
BINARY_DIST=1
if test -x "$BASEDIR/libexec/ndbd"
@ -48,6 +49,7 @@ else
fi
exec_waiter=$BASEDIR/bin/ndb_waiter
exec_test=$BASEDIR/bin/ndb_test_platform
exec_test_ndberror=
exec_mgmtclient=$BASEDIR/bin/ndb_mgm
fi
@ -56,6 +58,13 @@ if $exec_test ; then :; else
exit 1
fi
if [ $exec_test_ndberror ] ; then
if $exec_test_ndberror ; then :; else
echo "please fix in ndberror.c"
exit 1
fi
fi
pidfile=ndbcluster.pid
cfgfile=Ndb.cfg
test_ndb=

View file

@ -122,6 +122,17 @@ master-bin.000001 # Query 1 # use `test`; alter table t1 add b int
master-bin.000001 # Query 1 # use `test`; alter table t1 drop b
master-bin.000001 # Query 1 # use `test`; create table t3 like t1
drop table t1,t2,t3;
CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 ADD INDEX(a);
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 DROP INDEX a;
ALTER TABLE t1 ADD UNIQUE INDEX(a);
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 DROP INDEX a;
ALTER TABLE t1 ADD PRIMARY KEY(a);
DELETE FROM t1 WHERE a=10;
DROP TABLE t1;
reset master;
create table t1 (a int) engine=blackhole;
set autocommit=0;

View file

@ -123,6 +123,17 @@ master-bin.000001 # Query 1 # use `test`; create table t3 like t1
master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t3
master-bin.000001 # Query 1 # use `test`; replace into t1 select * from t3
drop table t1,t2,t3;
CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE;
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 ADD INDEX(a);
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 DROP INDEX a;
ALTER TABLE t1 ADD UNIQUE INDEX(a);
DELETE FROM t1 WHERE a=10;
ALTER TABLE t1 DROP INDEX a;
ALTER TABLE t1 ADD PRIMARY KEY(a);
DELETE FROM t1 WHERE a=10;
DROP TABLE t1;
reset master;
create table t1 (a int) engine=blackhole;
set autocommit=0;

View file

@ -98,7 +98,7 @@ concat('|', text1, '|')
|teststring |
explain select concat('|', text1, '|') from t1 where text1='teststring ';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range key1 key1 22 NULL 2 Using where
1 SIMPLE t1 ref key1 key1 22 const 2 Using where
select concat('|', text1, '|') from t1 where text1 like 'teststring_%';
concat('|', text1, '|')
|teststring |

View file

@ -355,6 +355,50 @@ some_id
1
2
drop table t1;
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a));
INSERT INTO t1 VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1);
CREATE TABLE t2 (a int, b int, PRIMARY KEY (a));
INSERT INTO t2 VALUES (3,2),(4,2),(100,100),(101,201),(102,102);
CREATE TABLE t3 (a int PRIMARY KEY);
INSERT INTO t3 VALUES (1),(2),(3),(4);
CREATE TABLE t4 (a int PRIMARY KEY,b int);
INSERT INTO t4 VALUES (1,1),(2,2),(1000,1000),(1001,1001),(1002,1002),
(1003,1003),(1004,1004);
EXPLAIN SELECT STRAIGHT_JOIN * FROM t3
JOIN t1 ON t3.a=t1.a
JOIN t2 ON t3.a=t2.a
JOIN t4 WHERE t4.a IN (t1.b, t2.b);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t3 index PRIMARY PRIMARY 4 NULL 4 Using index
1 SIMPLE t1 eq_ref PRIMARY PRIMARY 4 test.t3.a 1
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t3.a 1
1 SIMPLE t4 ALL PRIMARY NULL NULL NULL 7 Range checked for each record (index map: 0x1)
SELECT STRAIGHT_JOIN * FROM t3
JOIN t1 ON t3.a=t1.a
JOIN t2 ON t3.a=t2.a
JOIN t4 WHERE t4.a IN (t1.b, t2.b);
a a b a b a b
3 3 1 3 2 1 1
3 3 1 3 2 2 2
4 4 1 4 2 1 1
4 4 1 4 2 2 2
EXPLAIN SELECT STRAIGHT_JOIN
(SELECT SUM(t4.a) FROM t4 WHERE t4.a IN (t1.b, t2.b))
FROM t3, t1, t2
WHERE t3.a=t1.a AND t3.a=t2.a;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t3 index PRIMARY PRIMARY 4 NULL 4 Using index
1 PRIMARY t1 eq_ref PRIMARY PRIMARY 4 test.t3.a 1
1 PRIMARY t2 eq_ref PRIMARY PRIMARY 4 test.t3.a 1
2 DEPENDENT SUBQUERY t4 index NULL PRIMARY 4 NULL 7 Using where; Using index
SELECT STRAIGHT_JOIN
(SELECT SUM(t4.a) FROM t4 WHERE t4.a IN (t1.b, t2.b))
FROM t3, t1, t2
WHERE t3.a=t1.a AND t3.a=t2.a;
(SELECT SUM(t4.a) FROM t4 WHERE t4.a IN (t1.b, t2.b))
3
3
DROP TABLE t1,t2,t3,t4;
End of 5.0 tests
create table t1(f1 char(1));
insert into t1 values ('a'),('b'),('1');

View file

@ -1984,7 +1984,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref c c 11 const # Using where; Using index
explain select count(*) from t1 where t='a ';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range t t 13 NULL # Using where
1 SIMPLE t1 ref t t 13 const # Using where
explain select count(*) from t1 where v like 'a%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range v v 13 NULL # Using where; Using index

View file

@ -717,3 +717,16 @@ select * from t1;
f1 f2
1 2
drop table t1;
CREATE TABLE t1 (f1 INT, f2 INT );
CREATE TABLE t2 (f1 INT PRIMARY KEY, f2 INT);
INSERT INTO t1 VALUES (1,1),(2,2),(10,10);
INSERT INTO t2 (f1, f2) SELECT f1, f2 FROM t1;
INSERT INTO t2 (f1, f2)
SELECT f1, f1 FROM t2 src WHERE f1 < 2
ON DUPLICATE KEY UPDATE f1 = 100 + src.f1;
SELECT * FROM t2;
f1 f2
101 1
2 2
10 10
DROP TABLE t1, t2;

View file

@ -219,3 +219,20 @@ SELECT * FROM t1;
a b
45 2
DROP TABLE t1;
CREATE TABLE t1 (i INT PRIMARY KEY, j INT);
INSERT INTO t1 SELECT 1, j;
ERROR 42S22: Unknown column 'j' in 'field list'
DROP TABLE t1;
CREATE TABLE t1 (i INT PRIMARY KEY, j INT);
CREATE TABLE t2 (a INT, b INT);
CREATE TABLE t3 (a INT, c INT);
INSERT INTO t1 SELECT 1, a FROM t2 NATURAL JOIN t3
ON DUPLICATE KEY UPDATE j= a;
DROP TABLE t1,t2,t3;
CREATE TABLE t1 (i INT PRIMARY KEY, j INT);
CREATE TABLE t2 (a INT);
INSERT INTO t1 VALUES (1, 1);
INSERT INTO t2 VALUES (1), (3);
INSERT INTO t1 SELECT 1, COUNT(*) FROM t2 ON DUPLICATE KEY UPDATE j= a;
ERROR 42S22: Unknown column 'a' in 'field list'
DROP TABLE t1,t2;

View file

@ -32,3 +32,16 @@ end while contributors;
end|
drop procedure p1;
drop procedure p2;
create table t1 (connection int, b int);
create procedure p1()
begin
declare connection int;
select max(t1.connection) into connection from t1;
select concat("max=",connection) 'p1';
end|
insert into t1 (connection) values (1);
call p1();
p1
max=1
drop procedure p1;
drop table t1;

View file

@ -1532,7 +1532,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref c c 11 const # Using where; Using index
explain select count(*) from t1 where t='a ';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range t t 13 NULL # Using where
1 SIMPLE t1 ref t t 13 const # Using where
explain select count(*) from t1 where v like 'a%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range v v 13 NULL # Using where; Using index

View file

@ -1071,7 +1071,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref c c 11 const # Using where; Using index
explain select count(*) from t1 where t='a ';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range t t 13 NULL # Using where
1 SIMPLE t1 ref t t 13 const # Using where
explain select count(*) from t1 where v like 'a%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range v v 13 NULL # Using where; Using index

View file

@ -568,7 +568,7 @@ t1
insert into t1 values (1,1),(2,1),(3,1),(4,1),(5,2),(6,1),(7,1);
explain select * from t1 where a12345678901234567890123456789a1234567890=2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref a12345678901234567890123456789a1234567890 a12345678901234567890123456789a1234567890 5 const # Using where
1 SIMPLE t1 ref a12345678901234567890123456789a1234567890 a12345678901234567890123456789a1234567890 5 const # Using where with pushed condition
select * from t1 where a12345678901234567890123456789a1234567890=2;
a1234567890123456789012345678901234567890 a12345678901234567890123456789a1234567890
5 2

View file

@ -242,7 +242,7 @@ insert into t1 values(9,'b9',999,'dd9');
commit;
explain select * from t1 where c >= 100 order by a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 4 NULL # Using where; Using filesort
1 SIMPLE t1 range c c 4 NULL # Using where with pushed condition; Using filesort
select * from t1 where c >= 100 order by a;
a b c d
1 b1 111 dd1
@ -278,7 +278,7 @@ insert into t1 values(2,@b2,222,@d2);
commit;
explain select * from t1 where c >= 100 order by a;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c c 4 NULL # Using where; Using filesort
1 SIMPLE t1 range c c 4 NULL # Using where with pushed condition; Using filesort
select a,length(b),substr(b,1+2*900,2),length(d),substr(d,1+3*900,3)
from t1 where c >= 100 order by a;
a length(b) substr(b,1+2*900,2) length(d) substr(d,1+3*900,3)

View file

@ -121,7 +121,7 @@ select * from t1 where x = 1 for update;
x y z
1 one 1
select * from t1 where x = 2 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
Got one of the listed errors
rollback;
commit;
begin;

View file

@ -0,0 +1,6 @@
select 1+1;
1+1
2
select 1+2;
1+2
3

View file

@ -0,0 +1,2 @@
@@thread_handling
one-thread-per-connection

View file

@ -74,3 +74,57 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 /*!50100 PARTITION BY LIST (a) (PARTITION p0 VALUES IN (0) ENGINE = InnoDB) */
drop table t1;
create table t1
(
id int unsigned auto_increment,
time datetime not null,
first_name varchar(40),
last_name varchar(50),
primary key (id, time),
index first_index (first_name),
index last_index (last_name)
) engine=Innodb partition by range (to_days(time)) (
partition p1 values less than (to_days('2007-02-07')),
partition p2 values less than (to_days('2007-02-08')),
partition p3 values less than MAXVALUE
);
insert into t1 (time, first_name, last_name) values ('2007-02-07', 'Q', 'Robert'),
('2007-02-07', 'Mark', 'Nate'), ('2007-02-07', 'Nate', 'Oscar'),
('2007-02-07', 'Zack', 'Alice'), ('2007-02-07', 'Jack', 'Kathy'),
('2007-02-06', 'Alice', 'Alice'), ('2007-02-06', 'Brian', 'Charles'),
('2007-02-06', 'Charles', 'David'), ('2007-02-06', 'David', 'Eric'),
('2007-02-07', 'Hector', 'Isaac'), ('2007-02-07', 'Oscar', 'Patricia'),
('2007-02-07', 'Patricia', 'Q'), ('2007-02-07', 'X', 'Yuri'),
('2007-02-07', 'Robert', 'Shawn'), ('2007-02-07', 'Kathy', 'Lois'),
('2007-02-07', 'Eric', 'Francis'), ('2007-02-06', 'Shawn', 'Theron'),
('2007-02-06', 'U', 'Vincent'), ('2007-02-06', 'Francis', 'George'),
('2007-02-06', 'George', 'Hector'), ('2007-02-06', 'Vincent', 'Walter'),
('2007-02-06', 'Walter', 'X'), ('2007-02-07', 'Lois', 'Mark'),
('2007-02-07', 'Yuri', 'Zack'), ('2007-02-07', 'Isaac', 'Jack'),
('2007-02-07', 'Sharon', 'Mark'), ('2007-02-07', 'Michael', 'Michelle'),
('2007-02-07', 'Derick', 'Nathan'), ('2007-02-07', 'Peter', 'Xavier'),
('2007-02-07', 'Fred', 'Harold'), ('2007-02-07', 'Katherine', 'Lisa'),
('2007-02-07', 'Tom', 'Rina'), ('2007-02-07', 'Jerry', 'Victor'),
('2007-02-07', 'Alexander', 'Terry'), ('2007-02-07', 'Justin', 'John'),
('2007-02-07', 'Greg', 'Ernest'), ('2007-02-07', 'Robert', 'Q'),
('2007-02-07', 'Nate', 'Mark'), ('2007-02-07', 'Oscar', 'Nate'),
('2007-02-07', 'Alice', 'Zack'), ('2007-02-07', 'Kathy', 'Jack'),
('2007-02-06', 'Alice', 'Alice'), ('2007-02-06', 'Charles', 'Brian'),
('2007-02-06', 'David', 'Charles'), ('2007-02-06', 'Eric', 'David'),
('2007-02-07', 'Isaac', 'Hector'), ('2007-02-07', 'Patricia', 'Oscar'),
('2007-02-07', 'Q', 'Patricia'), ('2007-02-07', 'Yuri', 'X'),
('2007-02-07', 'Shawn', 'Robert'), ('2007-02-07', 'Lois', 'Kathy'),
('2007-02-07', 'Francis', 'Eric'), ('2007-02-06', 'Theron', 'Shawn'),
('2007-02-06', 'Vincent', 'U'), ('2007-02-06', 'George', 'Francis'),
('2007-02-06', 'Hector', 'George'), ('2007-02-06', 'Walter', 'Vincent'),
('2007-02-06', 'X', 'Walter'), ('2007-02-07', 'Mark', 'Lois'),
('2007-02-07', 'Zack', 'Yuri'), ('2007-02-07', 'Jack', 'Isaac'),
('2007-02-07', 'Mark', 'Sharon'), ('2007-02-07', 'Michelle', 'Michael'),
('2007-02-07', 'Nathan', 'Derick'), ('2007-02-07', 'Xavier', 'Peter'),
('2007-02-07', 'Harold', 'Fred'), ('2007-02-07', 'Lisa', 'Katherine'),
('2007-02-07', 'Rina', 'Tom'), ('2007-02-07', 'Victor', 'Jerry'),
('2007-02-07', 'Terry', 'Alexander'), ('2007-02-07', 'John', 'Justin'),
('2007-02-07', 'Ernest', 'Greg');
SELECT * FROM t1 WHERE first_name='Andy' OR last_name='Jake';
id time first_name last_name
drop table t1;

View file

@ -2157,11 +2157,11 @@ drop view v1;
drop table t1;
create procedure proc_1() install plugin my_plug soname 'some_plugin.so';
call proc_1();
ERROR HY000: Can't open shared library
Got one of the listed errors
call proc_1();
ERROR HY000: Can't open shared library
Got one of the listed errors
call proc_1();
ERROR HY000: Can't open shared library
Got one of the listed errors
drop procedure proc_1;
create function func_1() returns int begin install plugin my_plug soname '/tmp/plugin'; return 1; end|
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.

View file

@ -3785,4 +3785,152 @@ case when 1 then cast(1111111111111111111 as unsigned) else 1 end c,
coalesce(cast(1111111111111111111 as unsigned), 1) co;
i c co
1111111111111111111 1111111111111111111 1111111111111111111
CREATE TABLE t1 (name varchar(255));
CREATE TABLE t2 (name varchar(255), n int, KEY (name(3)));
INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa '), ('aa');
INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc ',3);
INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
SELECT * FROM t2;
name n
bb 1
aa 2
cc 3
cc  4
cc 5
bb 6
cc 7
SELECT * FROM t2 ORDER BY name;
name n
aa 2
bb 1
bb 6
cc  4
cc 3
cc 5
cc 7
SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
name LENGTH(name) n
aa 2 2
bb 2 1
bb 3 6
cc  4 4
cc 5 3
cc 2 5
cc 3 7
EXPLAIN SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref name name 6 const 3 Using where
SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
name LENGTH(name) n
cc 5 3
cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range name name 6 NULL 3 Using where
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
name LENGTH(name) n
cc 5 3
cc  4 4
cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range name name 6 NULL 3 Using where; Using filesort
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
name LENGTH(name) n
cc  4 4
cc 5 3
cc 2 5
cc 3 7
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ref name name 6 test.t1.name 2
SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
name name n
ccc NULL NULL
bb bb 1
bb bb 6
cc cc 3
cc cc 5
cc cc 7
aa aa 2
aa aa 2
DROP TABLE t1,t2;
CREATE TABLE t1 (name text);
CREATE TABLE t2 (name text, n int, KEY (name(3)));
INSERT INTO t1 VALUES ('ccc'), ('bb'), ('cc '), ('aa '), ('aa');
INSERT INTO t2 VALUES ('bb',1), ('aa',2), ('cc ',3);
INSERT INTO t2 VALUES (concat('cc ', 0x06), 4);
INSERT INTO t2 VALUES ('cc',5), ('bb ',6), ('cc ',7);
SELECT * FROM t2;
name n
bb 1
aa 2
cc 3
cc  4
cc 5
bb 6
cc 7
SELECT * FROM t2 ORDER BY name;
name n
aa 2
bb 1
bb 6
cc  4
cc 3
cc 5
cc 7
SELECT name, LENGTH(name), n FROM t2 ORDER BY name;
name LENGTH(name) n
aa 2 2
bb 2 1
bb 3 6
cc  4 4
cc 5 3
cc 2 5
cc 3 7
EXPLAIN SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 ref name name 6 const 3 Using where
SELECT name, LENGTH(name), n FROM t2 WHERE name='cc ';
name LENGTH(name) n
cc 5 3
cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range name name 6 NULL 3 Using where
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%';
name LENGTH(name) n
cc 5 3
cc  4 4
cc 2 5
cc 3 7
EXPLAIN SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range name name 6 NULL 3 Using where; Using filesort
SELECT name , LENGTH(name), n FROM t2 WHERE name LIKE 'cc%' ORDER BY name;
name LENGTH(name) n
cc  4 4
cc 5 3
cc 2 5
cc 3 7
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ref name name 6 test.t1.name 2
SELECT * FROM t1 LEFT JOIN t2 ON t1.name=t2.name;
name name n
ccc NULL NULL
bb bb 1
bb bb 6
cc cc 3
cc cc 5
cc cc 7
aa aa 2
aa aa 2
DROP TABLE t1,t2;
End of 5.0 tests

View file

@ -224,7 +224,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00
3 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 3 100.00 Using where
Warnings:
Note 1276 Field or reference 't4.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t4.a' of SELECT #3 was resolved in SELECT #1
Note 1003 select `test`.`t4`.`b` AS `b`,(select avg((`test`.`t2`.`a` + (select min(`test`.`t3`.`a`) AS `min(t3.a)` from `test`.`t3` where (`test`.`t3`.`a` >= `test`.`t4`.`a`)))) AS `avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a))` from `test`.`t2`) AS `(select avg(t2.a+(select min(t3.a) from t3 where t3.a >= t4.a)) from t2)` from `test`.`t4`
select * from t3 where exists (select * from t2 where t2.b=t3.a);
a
@ -313,8 +313,8 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
3 DEPENDENT UNION t5 ALL NULL NULL NULL NULL 2 100.00 Using where
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL NULL
Warnings:
Note 1276 Field or reference 't2.a' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 't2.a' of SELECT #3 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.a' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.a' of SELECT #3 was resolved in SELECT #1
Note 1003 select (select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = `test`.`t2`.`a`) union select `test`.`t5`.`a` AS `a` from `test`.`t5` where (`test`.`t5`.`a` = `test`.`t2`.`a`)) AS `(select a from t1 where t1.a=t2.a union select a from t5 where t5.a=t2.a)`,`test`.`t2`.`a` AS `a` from `test`.`t2`
select (select a from t1 where t1.a=t2.a union all select a from t5 where t5.a=t2.a), a from t2;
ERROR 21000: Subquery returns more than 1 row
@ -330,9 +330,9 @@ patient_uq clinic_uq
explain extended select * from t6 where exists (select * from t7 where uq = clinic_uq);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t6 ALL NULL NULL NULL NULL 4 100.00 Using where
2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 test.t6.clinic_uq 1 100.00 Using index
2 DEPENDENT SUBQUERY t7 eq_ref PRIMARY PRIMARY 4 t6.clinic_uq 1 100.00 Using where; Using index
Warnings:
Note 1276 Field or reference 'clinic_uq' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t6.clinic_uq' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t6`.`patient_uq` AS `patient_uq`,`test`.`t6`.`clinic_uq` AS `clinic_uq` from `test`.`t6` where exists(select 1 AS `Not_used` from `test`.`t7` where (`test`.`t7`.`uq` = `test`.`t6`.`clinic_uq`))
select * from t1 where a= (select a from t2,t4 where t2.b=t4.b);
ERROR 23000: Column 'a' in field list is ambiguous
@ -868,7 +868,7 @@ explain extended select (select a+1) from t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
Warnings:
Note 1276 Field or reference 'a' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t1.a' of SELECT #2 was resolved in SELECT #1
Note 1249 Select 2 was reduced during optimization
Note 1003 select (`test`.`t1`.`a` + 1) AS `(select a+1)` from `test`.`t1`
select (select a+1) from t1;
@ -1741,9 +1741,9 @@ Note 1003 select `test`.`t1`.`id` AS `id`,`test`.`t1`.`text` AS `text` from `tes
explain extended select * from t1 as tt where not exists (select id from t1 where id < 8 and (id = tt.id or id is null) having id is not null);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY tt ALL NULL NULL NULL NULL 12 100.00 Using where
2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 test.tt.id 1 100.00 Using where; Using index
2 DEPENDENT SUBQUERY t1 eq_ref PRIMARY PRIMARY 4 tt.id 1 100.00 Using where; Using index
Warnings:
Note 1276 Field or reference 'tt.id' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.tt.id' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`tt`.`id` AS `id`,`test`.`tt`.`text` AS `text` from `test`.`t1` `tt` where (not(exists(select `test`.`t1`.`id` AS `id` from `test`.`t1` where ((`test`.`t1`.`id` < 8) and (`test`.`t1`.`id` = `test`.`tt`.`id`)) having (`test`.`t1`.`id` is not null))))
insert into t1 (id, text) values (1000, 'text1000'), (1001, 'text1001');
create table t2 (id int not null, text varchar(20) not null default '', primary key (id));
@ -2279,7 +2279,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY up ALL NULL NULL NULL NULL 2 100.00 Using where
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 2 100.00 Using where
Warnings:
Note 1276 Field or reference 'up.a' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.up.a' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`up`.`a` AS `a`,`test`.`up`.`b` AS `b` from `test`.`t1` `up` where exists(select 1 AS `Not_used` from `test`.`t1` where (`test`.`t1`.`a` = `test`.`up`.`a`))
drop table t1;
CREATE TABLE t1 (t1_a int);
@ -3718,3 +3718,45 @@ SELECT * FROM t1 WHERE _utf8'a' = ANY (SELECT s1 FROM t1);
s1
a
DROP TABLE t1;
CREATE TABLE t1(f1 int);
CREATE TABLE t2(f2 int, f21 int, f3 timestamp);
INSERT INTO t1 VALUES (1),(1),(2),(2);
INSERT INTO t2 VALUES (1,1,"2004-02-29 11:11:11"), (2,2,"2004-02-29 11:11:11");
SELECT ((SELECT f2 FROM t2 WHERE f21=f1 LIMIT 1) * COUNT(f1)) AS sq FROM t1 GROUP BY f1;
sq
2
4
SELECT (SELECT SUM(1) FROM t2 ttt GROUP BY t2.f3 LIMIT 1) AS tt FROM t2;
tt
2
2
PREPARE stmt1 FROM 'SELECT ((SELECT f2 FROM t2 WHERE f21=f1 LIMIT 1) * COUNT(f1)) AS sq FROM t1 GROUP BY f1';
EXECUTE stmt1;
sq
2
4
EXECUTE stmt1;
sq
2
4
DEALLOCATE PREPARE stmt1;
SELECT f2, AVG(f21),
(SELECT t.f3 FROM t2 AS t WHERE t2.f2=t.f2 AND t.f3=MAX(t2.f3)) AS test
FROM t2 GROUP BY f2;
f2 AVG(f21) test
1 1.0000 2004-02-29 11:11:11
2 2.0000 2004-02-29 11:11:11
DROP TABLE t1,t2;
CREATE TABLE t1 (a int, b INT, c CHAR(10) NOT NULL);
INSERT INTO t1 VALUES
(1,1,'a'), (1,2,'b'), (1,3,'c'), (1,4,'d'), (1,5,'e'),
(2,1,'f'), (2,2,'g'), (2,3,'h'), (3,4,'i'), (3,3,'j'),
(3,2,'k'), (3,1,'l'), (1,9,'m');
SELECT a, MAX(b),
(SELECT t.c FROM t1 AS t WHERE t1.a=t.a AND t.b=MAX(t1.b)) AS test
FROM t1 GROUP BY a;
a MAX(b) test
1 9 m
2 3 h
3 4 i
DROP TABLE t1;

View file

@ -29,7 +29,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1276 Field or reference 't2.oref' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`oref` AS `oref`,<in_optimizer>(`test`.`t2`.`a`,<exists>(select max(`test`.`t1`.`ie`) AS `max(ie)` from `test`.`t1` where (`test`.`t1`.`oref` = `test`.`t2`.`oref`) group by `test`.`t1`.`grp` having trigcond((<cache>(`test`.`t2`.`a`) = <ref_null_helper>(max(`test`.`t1`.`ie`)))))) AS `Z` from `test`.`t2`
explain extended
select a, oref from t2
@ -38,7 +38,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 5 100.00 Using where
2 DEPENDENT SUBQUERY t1 ALL NULL NULL NULL NULL 6 100.00 Using where; Using temporary; Using filesort
Warnings:
Note 1276 Field or reference 't2.oref' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`oref` AS `oref` from `test`.`t2` where <in_optimizer>(`test`.`t2`.`a`,<exists>(select max(`test`.`t1`.`ie`) AS `max(ie)` from `test`.`t1` where (`test`.`t1`.`oref` = `test`.`t2`.`oref`) group by `test`.`t1`.`grp` having (<cache>(`test`.`t2`.`a`) = <ref_null_helper>(max(`test`.`t1`.`ie`)))))
select a, oref, a in (
select max(ie) from t1 where oref=t2.oref group by grp union
@ -91,7 +91,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 4 100.00
2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 2 100.00 Using where; Full scan on NULL key
Warnings:
Note 1276 Field or reference 't2.oref' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,<in_optimizer>(`test`.`t2`.`a`,<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a checking NULL where (`test`.`t1`.`oref` = `test`.`t2`.`oref`) having trigcond(<is_not_null_test>(`test`.`t1`.`a`))))) AS `Z` from `test`.`t2`
flush status;
select oref, a from t2 where a in (select a from t1 where oref=t2.oref);
@ -156,7 +156,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 4 100.00 Using where; Full scan on NULL key
2 DEPENDENT SUBQUERY t2 ref a a 5 test.t1.b 1 100.00 Using where
Warnings:
Note 1276 Field or reference 't3.oref' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t3.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t3`.`a` AS `a`,`test`.`t3`.`oref` AS `oref`,<in_optimizer>(`test`.`t3`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`oref`) and trigcond(((<cache>(`test`.`t3`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`)))) having trigcond(<is_not_null_test>(`test`.`t1`.`a`)))) AS `Z` from `test`.`t3`
drop table t1, t2, t3;
create table t1 (a int NOT NULL, b int NOT NULL, key(a));
@ -184,7 +184,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t1 ref a a 4 func 2 100.00 Using where; Full scan on NULL key
2 DEPENDENT SUBQUERY t2 ref a a 4 test.t1.b 1 100.00 Using where
Warnings:
Note 1276 Field or reference 't3.oref' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t3.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t3`.`a` AS `a`,`test`.`t3`.`oref` AS `oref`,<in_optimizer>(`test`.`t3`.`a`,<exists>(select 1 AS `Not_used` from `test`.`t1` join `test`.`t2` where ((`test`.`t2`.`a` = `test`.`t1`.`b`) and (`test`.`t2`.`b` = `test`.`t3`.`oref`) and trigcond((<cache>(`test`.`t3`.`a`) = `test`.`t1`.`a`))))) AS `Z` from `test`.`t3`
drop table t1,t2,t3;
create table t1 (oref int, grp int);
@ -240,7 +240,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00
2 DEPENDENT SUBQUERY t1 index_subquery a a 5 func 2 100.00 Using where; Full scan on NULL key
Warnings:
Note 1276 Field or reference 't2.oref' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on a checking NULL where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`)))))) AS `Z` from `test`.`t2`
select a,b, oref, (a,b) in (select a,b from t1 where c=t2.oref) Z from t2;
a b oref Z
@ -257,7 +257,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
2 DEPENDENT SUBQUERY t1 ref_or_null a a 5 func 2 100.00 Using where; Full scan on NULL key
2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 100 100.00 Using where
Warnings:
Note 1276 Field or reference 't2.oref' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`oref` AS `oref`,<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(select `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1` join `test`.`t4` where ((`test`.`t1`.`c` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`a`) or isnull(`test`.`t1`.`a`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`b`) or isnull(`test`.`t1`.`b`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`a`)) and trigcond(<is_not_null_test>(`test`.`t1`.`b`))))) AS `Z` from `test`.`t2`
select a,b, oref,
(a,b) in (select a,b from t1,t4 where c=t2.oref) Z
@ -302,7 +302,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 8 100.00 Using where
2 DEPENDENT SUBQUERY t1 index_subquery idx idx 5 func 4 100.00 Using where; Full scan on NULL key
Warnings:
Note 1276 Field or reference 't2.oref' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on idx checking NULL where ((`test`.`t1`.`oref` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`ie1`) or isnull(`test`.`t1`.`ie1`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`ie2`) or isnull(`test`.`t1`.`ie2`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`ie1`)) and trigcond(<is_not_null_test>(`test`.`t1`.`ie2`)))))) AS `Z` from `test`.`t2` where ((`test`.`t2`.`b` = 10) and (`test`.`t2`.`a` = 10))
drop table t1, t2;
create table t1 (oref char(4), grp int, ie int);
@ -432,7 +432,7 @@ alter table t1 add index idx(oref,ie);
explain select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 7
2 DEPENDENT SUBQUERY t1 ref_or_null idx idx 10 test.t2.oref,func 4 Using where; Using index; Full scan on NULL key
2 DEPENDENT SUBQUERY t1 ref_or_null idx idx 10 t2.oref,func 4 Using where; Using index; Full scan on NULL key
select oref, a, a in (select ie from t1 where oref=t2.oref) Z from t2;
oref a Z
ee NULL NULL
@ -457,7 +457,7 @@ group by grp having min(ie) > 1) Z
from t2;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 7
2 DEPENDENT SUBQUERY t1 ref idx idx 5 test.t2.oref 2 Using where; Using temporary; Using filesort
2 DEPENDENT SUBQUERY t1 ref idx idx 5 t2.oref 2 Using where; Using temporary; Using filesort
select oref, a,
a in (select min(ie) from t1 where oref=t2.oref
group by grp having min(ie) > 1) Z
@ -572,7 +572,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t2 ALL NULL NULL NULL NULL 7 100.00
2 DEPENDENT SUBQUERY t1 index_subquery idx idx 5 func 4 100.00 Using where; Full scan on NULL key
Warnings:
Note 1276 Field or reference 't2.oref' of SELECT #2 was resolved in SELECT #1
Note 1276 Field or reference 'test.t2.oref' of SELECT #2 was resolved in SELECT #1
Note 1003 select `test`.`t2`.`oref` AS `oref`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,<in_optimizer>((`test`.`t2`.`a`,`test`.`t2`.`b`),<exists>(<index_lookup>(<cache>(`test`.`t2`.`a`) in t1 on idx checking NULL where ((`test`.`t1`.`oref` = `test`.`t2`.`oref`) and trigcond(((<cache>(`test`.`t2`.`a`) = `test`.`t1`.`ie1`) or isnull(`test`.`t1`.`ie1`))) and trigcond(((<cache>(`test`.`t2`.`b`) = `test`.`t1`.`ie2`) or isnull(`test`.`t1`.`ie2`)))) having (trigcond(<is_not_null_test>(`test`.`t1`.`ie1`)) and trigcond(<is_not_null_test>(`test`.`t1`.`ie2`)))))) AS `Z` from `test`.`t2`
drop table t1,t2;
create table t1 (oref char(4), grp int, ie int primary key);

View file

@ -610,12 +610,12 @@ create table t1 (id integer primary key auto_increment, txt text, index txt_inde
insert into t1 (txt) values ('Chevy'), ('Chevy '), (NULL);
select * from t1 where txt='Chevy' or txt is NULL;
id txt
3 NULL
1 Chevy
2 Chevy
3 NULL
explain select * from t1 where txt='Chevy' or txt is NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range txt_index txt_index 23 NULL 2 Using where
1 SIMPLE t1 ref_or_null txt_index txt_index 23 const 2 Using where
select * from t1 where txt='Chevy ';
id txt
1 Chevy

View file

@ -434,3 +434,22 @@ Handler_read_prev 0
Handler_read_rnd 0
Handler_read_rnd_next 0
DROP TABLE t1;
CREATE TABLE t1 (
a INT(11),
quux decimal( 31, 30 ),
UNIQUE KEY bar (a),
KEY quux (quux)
);
INSERT INTO
t1 ( a, quux )
VALUES
( 1, 1 ),
( 2, 0.1 );
INSERT INTO t1( a )
SELECT @newA := 1 + a FROM t1 WHERE quux <= 0.1;
SELECT * FROM t1;
a quux
1 1.000000000000000000000000000000
2 0.100000000000000000000000000000
3 NULL
DROP TABLE t1;

View file

@ -1,139 +0,0 @@
Objects test suite
~~~~~~~~~~~~~~~~~~
Create 49166 objects in a database and drop the database afterwards.
1 Quick overview
2 Detailed overview
3 Further testing scenarios
4 Detailed run times
1 Quick overview
~~~~~~~~~~~~~~~~
1.1 What is tested?
A database with 49166 objects (tables and views) is created. The
database is dropped afterwards. Only DDL statements are used. No
data is loaded at all.
1.2 Steps of the test
- CREATE SCHEMA.
- Populate 49166 objects.
- Check the objects with SHOW TABLES.
- Check the output of one SHOW CREATE TABLE.
- DROP SCHEMA.
1.3 How to run the test
Run objects test:
./mysql-test-run.pl --skip-ndb --suite=objects
If one experiences time out problems, please use
--testcase-timeout=3600 --suite-timeout=3600
Run objects test with Falcon storage engine only:
- Run time. No run time due to crash.
- Space requirements ~1.3 GB.
./mysql-test-run.pl --skip-ndb --suite=objects --do-test=objects_falcon
To avoid time out on Falcon storage engine use
./mysql-test-run.pl --skip-ndb --testcase-timeout=3600 --suite-timeout=3600 \
--suite=objects --do-test=objects_falcon
Run objects test with InnoDB storage engine only.
- Run time ~100 minutes.
- Space requirements ~1.5 GB.
./mysql-test-run.pl --skip-ndb --suite=objects --do-test=objects_innodb
2 Detailed overview
~~~~~~~~~~~~~~~~~~~
2.1 Background of this test
The motivation of this test is rooted in the SAP porting project. To
run SAP specific tests one has to create a small database (~17000 tables
and views) or depending on the tests to be run a big database (~50000
tables and views).
The SAP porting team tested various storage engines and found out
that prior to running the SAP tests the loading of the required data
often lead to problems and crashes in the database server.
As the initial data loading for a SAP test is around 5 GB the DDL
part of the data loading was stripped out.
A successful run of this test can be followed by a R3load test (data
loading with a SAP tool), to see whether the storage engine can handle
the rather huge amount of data and to measure the performance while
loading the data.
2.2 Usage in a given bk tree
If one wants to test in a give bk tree, lets say 5.1-falcon, one can
either copy or soft link this suite into the mysql-test/suite/
folder. We recommend a soft link:
ln -s <path_to>/mysql-test-extra-5.1/mysql-test/suite/objects \
<path_to>/mysql-5.1-falcon/mysql-test/suite
2.3 What kind of objects?
Although, the number of 49166 objects sounds huge only tables and
views are created. Please note, that this test does not create:
- Stored procedures.
- Foreign keys.
- Triggers.
- Events.
This means, that this test suite has a potential for improvement
by adding further objects like stored procedures, foreign keys,
triggers, or events.
3 Further testing scenarios
~~~~~~~~~~~~~~~~~~~~~~~~~~~
3.1 Testing the functionality and performance of our INFORMATION_SCHEMA
Tests on INFORMATION_SCHEMA can be done by disabling the DROP SCHEMA at
the end of the test by setting the variable $drop_database to 0 (zero):
let $drop_database= 0;
This can be done in the objects_<engine_type>.test file.
Performance tests with huge amount of tables and views can be done by
generating the objects several time in different databases.
3.2 DDL Performance
The run time of this test can be used as an indicator for DDL performance
of the engine.
3.3 ALTER TABLE performance
After object creation an ALTER TABLE <table_name> Engine <other_engine>
can be done.
4 Detailed run times
~~~~~~~~~~~~~~~~~~~~
Run times and storage requirements.
Without DROP SCHEMA: With DROP SCHEMA
- InnoDB on my laptop:
real 36m25.700s real 100m17.541s
531M OBJECTS_TEST
du -h ib*
891M ibdata1
5.1M ib_logfile0
5.1M ib_logfile1
- Falcon on my laptop:
real 106m22.480s real 374m49.860s
531M OBJECTS_TEST
du -h OBJECTS_TEST.n*
609M OBJECTS_TEST.ndb
42M OBJECTS_TEST.nl1
115M OBJECTS_TEST.nl2
- InnoDB on faster machine:
real 10m58.265s real 78m26.733s
531M OBJECTS_TEST/
du -h ib*
891M ibdata1
5.1M ib_logfile0
5.1M ib_logfile1
- Falcon on faster machine:
real 25m49.409s real 162m32.852s
531M OBJECTS_TEST
du -h OBJECTS_TEST.n*
609M OBJECTS_TEST.ndb
86M OBJECTS_TEST.nl1
72M OBJECTS_TEST.nl2
--
Hakan Kuecuekyilmaz <hakan at mysql dot com>, 2006-08-18.

View file

@ -1,2 +0,0 @@
DROP SCHEMA OBJECTS_TEST;

View file

@ -1,97 +0,0 @@
# +--------------------------------------------------------------------+
# | FOR INTERNAL USE ONLY! |
# +--------------------------------------------------------------------+
# | objects.inc |
# | Copyright 2006 by MySQL AB |
# +--------------------------------------------------------------------+
# | FOR INTERNAL USE ONLY! |
# +--------------------------------------------------------------------+
#
# Here we set the desired storage engine.
#
eval SET SESSION storage_engine = $engine_type;
# Verify that setting storage engine worked.
--disable_warnings
DROP TABLE IF EXISTS t1;
--enable_warnings
CREATE TABLE t1 (a int);
SHOW CREATE TABLE t1;
# Final cleanup.
DROP TABLE t1;
#
# Create the objects.
#
--disable_query_log
--disable_warnings
SET sql_mode = "ANSI_QUOTES,NO_BACKSLASH_ESCAPES,TRADITIONAL,IGNORE_SPACE";
DROP SCHEMA IF EXISTS OBJECTS_TEST;
--enable_warnings
CREATE SCHEMA OBJECTS_TEST;
USE OBJECTS_TEST;
--source suite/objects/include/tbl01.inc
--source suite/objects/include/tbl02.inc
--source suite/objects/include/tbl03.inc
--source suite/objects/include/tbl04.inc
--source suite/objects/include/tbl05.inc
--source suite/objects/include/tbl06.inc
--source suite/objects/include/tbl07.inc
--source suite/objects/include/tbl08.inc
--source suite/objects/include/tbl09.inc
--source suite/objects/include/tbl10.inc
--source suite/objects/include/tbl11.inc
--source suite/objects/include/tbl12.inc
--source suite/objects/include/tbl13.inc
--source suite/objects/include/tbl14.inc
--source suite/objects/include/tbl15.inc
--source suite/objects/include/tbl16.inc
--source suite/objects/include/tbl17.inc
--source suite/objects/include/tbl18.inc
--source suite/objects/include/tbl19.inc
--source suite/objects/include/tbl20.inc
--source suite/objects/include/tbl21.inc
--source suite/objects/include/tbl22.inc
--source suite/objects/include/tbl23.inc
--source suite/objects/include/tbl24.inc
--source suite/objects/include/tbl25.inc
--source suite/objects/include/tbl26.inc
--source suite/objects/include/tbl27.inc
--source suite/objects/include/tbl28.inc
--source suite/objects/include/tbl29.inc
--source suite/objects/include/tbl30.inc
--source suite/objects/include/tbl31.inc
--source suite/objects/include/tbl32.inc
--source suite/objects/include/tbl33.inc
--source suite/objects/include/tbl34.inc
--source suite/objects/include/tbl35.inc
--source suite/objects/include/tbl36.inc
--source suite/objects/include/tbl37.inc
--source suite/objects/include/tbl38.inc
--source suite/objects/include/tbl39.inc
--source suite/objects/include/tbl40.inc
--source suite/objects/include/tbl41.inc
--source suite/objects/include/tbl42.inc
--source suite/objects/include/tbl43.inc
--source suite/objects/include/tbl44.inc
--source suite/objects/include/tbl45.inc
--source suite/objects/include/tbl46.inc
--source suite/objects/include/tbl47.inc
--source suite/objects/include/tbl48.inc
--source suite/objects/include/view.inc
--enable_query_log
SHOW TABLES;
SHOW CREATE TABLE AAABLQUS;
--disable_query_log
if ($drop_database)
{
--source suite/objects/include/drop_all.inc
}
--enable_query_log

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more