Commit 59f45651 authored by joreland@mysql.com's avatar joreland@mysql.com

merge blob code

parents fcc8d934 cbc550e5
...@@ -14,6 +14,6 @@ extra_configs="$pentium_configs" ...@@ -14,6 +14,6 @@ extra_configs="$pentium_configs"
# fail # fail
extra_configs="$extra_configs --with-innodb --with-berkeley-db \ extra_configs="$extra_configs --with-innodb --with-berkeley-db \
--with-embedded-server --enable-thread-safe-client \ --with-embedded-server --enable-thread-safe-client \
--with-openssl --with-vio --with-raid --without-ndbcluster" --with-openssl --with-vio --with-raid --with-ndbcluster"
. "$path/FINISH.sh" . "$path/FINISH.sh"
...@@ -93,6 +93,7 @@ miguel@hegel.local ...@@ -93,6 +93,7 @@ miguel@hegel.local
miguel@light. miguel@light.
miguel@light.local miguel@light.local
miguel@sartre.local miguel@sartre.local
mikron@mikael-ronstr-ms-dator.local
mmatthew@markslaptop. mmatthew@markslaptop.
monty@bitch.mysql.fi monty@bitch.mysql.fi
monty@butch. monty@butch.
......
...@@ -11,7 +11,7 @@ $opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env=""; ...@@ -11,7 +11,7 @@ $opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix=""; $opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix=""; $opt_tmp=$opt_version_suffix="";
$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_cluster=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0; $opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_cluster=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0;
$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=$opt_without_ndbcluster=0; $opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=0;
GetOptions( GetOptions(
"bdb", "bdb",
...@@ -57,8 +57,7 @@ GetOptions( ...@@ -57,8 +57,7 @@ GetOptions(
"with-other-libc=s", "with-other-libc=s",
"with-small-disk", "with-small-disk",
"without-embedded", "without-embedded",
"clearlogs", "clearlogs",
"without-ndbcluster",
) || usage(); ) || usage();
usage() if ($opt_help); usage() if ($opt_help);
...@@ -252,7 +251,6 @@ if ($opt_stage <= 1) ...@@ -252,7 +251,6 @@ if ($opt_stage <= 1)
$opt_config_options.= " --with-raid" if ($opt_raid); $opt_config_options.= " --with-raid" if ($opt_raid);
$opt_config_options.= " --with-readline" if ($opt_readline); $opt_config_options.= " --with-readline" if ($opt_readline);
$opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded); $opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded);
$opt_config_options.= " --without-ndbcluster" if ($opt_without_ndbcluster);
$opt_config_options.= " --with-ndbcluster" if ($opt_with_cluster); $opt_config_options.= " --with-ndbcluster" if ($opt_with_cluster);
# Only enable InnoDB when requested (required to be able to # Only enable InnoDB when requested (required to be able to
...@@ -308,7 +306,7 @@ if ($opt_stage <= 3) ...@@ -308,7 +306,7 @@ if ($opt_stage <= 3)
} }
$flags.= " --no-strip" if ($opt_no_strip || $opt_with_debug); $flags.= " --no-strip" if ($opt_no_strip || $opt_with_debug);
$flags.= " --with-ndbcluster" if ($opt__with_ndbcluster); $flags.= " --with-ndbcluster" if ($opt_with_cluster);
check_system("scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags",".tar.gz created"); check_system("scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags",".tar.gz created");
safe_system("mv mysql*.t*gz $pwd/$host"); safe_system("mv mysql*.t*gz $pwd/$host");
if (-f "client/.libs/mysqladmin") if (-f "client/.libs/mysqladmin")
...@@ -347,10 +345,12 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" . ...@@ -347,10 +345,12 @@ $ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" .
# #
if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
{ {
my $flags= "";
$flags.= " --with-ndbcluster" if ($opt_with_cluster);
log_timestamp(); log_timestamp();
system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir); system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir);
safe_cd("${test_dir}/mysql-test"); safe_cd("${test_dir}/mysql-test");
check_system("./mysql-test-run --warnings --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful"); check_system("./mysql-test-run $flags --warnings --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
} }
# #
...@@ -571,7 +571,7 @@ If user is empty then no mail is sent. ...@@ -571,7 +571,7 @@ If user is empty then no mail is sent.
Set name suffix (e.g. 'com' or '-max') for a distribution Set name suffix (e.g. 'com' or '-max') for a distribution
--with cluster --with cluster
Compile with NDB Cluster Compile and test with NDB Cluster enabled
--with-debug --with-debug
Build binaries with debug information (implies "--no-strip") Build binaries with debug information (implies "--no-strip")
......
...@@ -12,15 +12,17 @@ use Getopt::Long; ...@@ -12,15 +12,17 @@ use Getopt::Long;
$opt_help = 0; $opt_help = 0;
$opt_version = 0; $opt_version = 0;
$opt_verbose = 0;
$opt_target = "mysql-copyright-target-"; $opt_target = "mysql-copyright-target-";
$opt_target .= `date +%d%m%y-%H%M%S`; $opt_target .= `date +%d%m%y-%H%M%S`;
chop $opt_target; chop $opt_target;
GetOptions("help","version","target=s") || error(); GetOptions("help","version","target=s", "verbose") || error();
# fix the directory prefix for target dir # fix the directory prefix for target dir
$WD= cwd(); $WD= cwd();
my $win_flag = 0;
$opt_target= $WD . '/' . $opt_target; $opt_target= $WD . '/' . $opt_target;
&main(); &main();
...@@ -50,6 +52,7 @@ sub main ...@@ -50,6 +52,7 @@ sub main
for ($i=0; $ARGV[$i]; $i++) for ($i=0; $ARGV[$i]; $i++)
{ {
my $distfile= $ARGV[$i]; my $distfile= $ARGV[$i];
$win_flag = ($distfile =~ /win-src/) ? 1 : 0;
my $dir; my $dir;
$dir= "mysql-copyright-"; $dir= "mysql-copyright-";
...@@ -66,20 +69,19 @@ sub main ...@@ -66,20 +69,19 @@ sub main
} }
# if the distfile is mysql-3.22.22-alpha.tar.gz, then # if the distfile is mysql-3.22.22-alpha.tar.gz, then
# distname is 'mysql-3.22.22-alpha' and suffix '.tar.gz' # distname is 'mysql-3.22.22-alpha' and suffix '.tar.gz'
if ($distfile =~ m/^($REG_BASENAME)([\-\_]) if ($distfile =~
($REG_VERSION){1}([\.\-\+]) m/^($REG_BASENAME)([\-\_])($REG_VERSION){1}([\.\-\+]\w+\-\w+)?[\.\-\+](.*)?$/xo)
(.*)?$/xo)
{ {
$distname= $1.$2.$3; $distname= $1.$2.$3;
$suffix= $5.$6; $suffix= $5;
$fileext = $6;
$newdistname= $1."com".$2.$3; $newdistname= $1."com".$2.$3;
$newdistname .= $suffix if $win_flag;
} }
# find out the extract path (should be same as distname!) # find out the extract path (should be same as distname!)
chomp($destdir= `tar ztf ../$distfile | head -1`); chomp($destdir= `tar ztf ../$distfile | head -1`);
# remove slash from the end # remove slash from the end
$destdir= substr($destdir, 0, -1); $destdir= substr($destdir, 0, -1);
print "destdir: $destdir\n";
print "distname: $distname\n";
if ("$destdir" ne "$distname") if ("$destdir" ne "$distname")
{ {
...@@ -103,26 +105,49 @@ sub main ...@@ -103,26 +105,49 @@ sub main
# remove readline subdir and update configure accordingly # remove readline subdir and update configure accordingly
system("rm -rf $destdir/cmd-line-utils/readline"); system("rm -rf $destdir/cmd-line-utils/readline");
unlink ("$destdir/configure") or die "Can't delete $destdir/configure: $!\n"; if ($win_flag) {
`(cd $destdir ; sed -e 's!\ cmd-line-utils\/readline\/Makefile\ dnl!!g' < configure.in > configure.in.new)`; chdir("$destdir") or (print "$! Unable to change directory to $desdir!\n" && exit(0));
rename ("$destdir/configure.in.new","$destdir/configure.in") or die "Can't rename $destdir/configure.in.new: $!\n";; } else {
`(cd $destdir ; autoconf)`; chdir("$destdir");
unlink ("configure") or die "Can't delete $destdir/configure: $!\n";
open(CONFIGURE,"<configure.in") or die "$! Unable to open configure.in to read from!\n";
undef $/;
my $configure = <CONFIGURE>;
close(CONFIGURE);
$configure =~ s|cmd\-line\-utils/readline/Makefile dnl\n?||g;
open(CONFIGURE,">configure.in") or die "$! Unable to open configure.in to write to!\n";
print CONFIGURE $configure;
close(CONFIGURE);
`autoconf`;
if (! -f "configure") {
print "\"./configure\" was not produced, exiting!\n";
exit(0);
}
}
# fix file copyrights # fix file copyrights
&fix_usage_copyright(); &fix_usage_copyright();
&add_copyright(); &add_copyright();
# rename the directory with new distribution name # rename the directory with new distribution name
chdir("$WD/$dir");
print "renaming $destdir $newdistname\n" if $opt_verbose;
rename($destdir, $newdistname); rename($destdir, $newdistname);
# tar the new distribution # tar the new distribution
`tar cz -f $opt_target/$newdistname.tar.gz *`; `tar cz -f $WD/$newdistname.tar.gz $newdistname`;
$pec= $? >> 8; $pec= $? >> 8;
abort($dir, "Making new tar archive failed!\n") if ($pec); abort($dir, "Making new tar archive failed!\n") if ($pec);
# remove temporary directory # remove temporary directory
chdir ".."; chdir($WD) or print "$! Unable to move up one dir\n";
`rm -rf $dir/`; my $cwd = getcwd();
print "current dir is $cwd\n" if $opt_verbose ;
print "deleting temp dir $dir\n" if $opt_verbose;
if (-d $dir) {
system("rm -rf $dir") or print "$! Unable to delete $dir!\n";
}
} }
exit(0); exit(0);
} }
...@@ -138,7 +163,7 @@ sub fix_usage_copyright ...@@ -138,7 +163,7 @@ sub fix_usage_copyright
foreach my $Cfile (@Cfiles) foreach my $Cfile (@Cfiles)
{ {
chop $Cfile; chop $Cfile;
`replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file MySQLEULA.txt for details" -- $Cfile`; `replace "This is free software," "This is commercial software," "and you are welcome to modify and redistribute it under the GPL license" "please see the file MySQLEULA.txt for details" -- "$Cfile"` if -f $Cfile;
} }
} }
...@@ -152,7 +177,9 @@ sub add_copyright ...@@ -152,7 +177,9 @@ sub add_copyright
foreach my $file (@files) foreach my $file (@files)
{ {
chop $file; chop $file;
`$WD/Build-tools/mysql-copyright-2 $file`; next if ! -f $file;
next if -B $file;
`$WD/Build-tools/mysql-copyright-2 "$file"`;
} }
} }
......
...@@ -1383,6 +1383,11 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ ...@@ -1383,6 +1383,11 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
--with-ndb-test Include the NDB Cluster ndbapi test programs], --with-ndb-test Include the NDB Cluster ndbapi test programs],
[ndb_test="$withval"], [ndb_test="$withval"],
[ndb_test=no]) [ndb_test=no])
AC_ARG_WITH([ndb-docs],
[
--with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation],
[ndb_docs="$withval"],
[ndb_docs=no])
AC_MSG_CHECKING([for NDB Cluster options]) AC_MSG_CHECKING([for NDB Cluster options])
AC_MSG_RESULT([]) AC_MSG_RESULT([])
...@@ -1422,6 +1427,17 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [ ...@@ -1422,6 +1427,17 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
;; ;;
esac esac
have_ndb_docs=no
case "$ndb_docs" in
yes )
AC_MSG_RESULT([-- including ndbapi and mgmapi documentation])
have_ndb_docs="yes"
;;
* )
AC_MSG_RESULT([-- not including ndbapi and mgmapi documentation])
;;
esac
AC_MSG_RESULT([done.]) AC_MSG_RESULT([done.])
]) ])
...@@ -1452,6 +1468,7 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [ ...@@ -1452,6 +1468,7 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [
;; ;;
esac esac
AM_CONDITIONAL([HAVE_NDBCLUSTER_DB], [ test "$have_ndbcluster" = "yes" ])
AC_SUBST(ndbcluster_includes) AC_SUBST(ndbcluster_includes)
AC_SUBST(ndbcluster_libs) AC_SUBST(ndbcluster_libs)
AC_SUBST(ndbcluster_system_libs) AC_SUBST(ndbcluster_system_libs)
......
...@@ -318,6 +318,7 @@ TYPELIB command_typelib= {array_elements(command_names),"", ...@@ -318,6 +318,7 @@ TYPELIB command_typelib= {array_elements(command_names),"",
DYNAMIC_STRING ds_res; DYNAMIC_STRING ds_res;
static void die(const char *fmt, ...); static void die(const char *fmt, ...);
static void init_var_hash(); static void init_var_hash();
static VAR* var_from_env(const char *, const char *);
static byte* get_var_key(const byte* rec, uint* len, static byte* get_var_key(const byte* rec, uint* len,
my_bool __attribute__((unused)) t); my_bool __attribute__((unused)) t);
static VAR* var_init(VAR* v, const char *name, int name_len, const char *val, static VAR* var_init(VAR* v, const char *name, int name_len, const char *val,
...@@ -654,11 +655,10 @@ VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw, ...@@ -654,11 +655,10 @@ VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw,
if (!(v = (VAR*) hash_search(&var_hash, save_var_name, if (!(v = (VAR*) hash_search(&var_hash, save_var_name,
var_name - save_var_name))) var_name - save_var_name)))
{ {
if (ignore_not_existing) char c=*var_name, *s=(char*)var_name;;
DBUG_RETURN(0); *s=0;
if (end) v=var_from_env(save_var_name, "");
*(char*) end = 0; *s=c;
die("Variable '%s' used uninitialized", save_var_name);
} }
--var_name; /* Point at last character */ --var_name; /* Point at last character */
} }
...@@ -2580,7 +2580,7 @@ static void var_free(void *v) ...@@ -2580,7 +2580,7 @@ static void var_free(void *v)
} }
static void var_from_env(const char *name, const char *def_val) static VAR* var_from_env(const char *name, const char *def_val)
{ {
const char *tmp; const char *tmp;
VAR *v; VAR *v;
...@@ -2589,6 +2589,7 @@ static void var_from_env(const char *name, const char *def_val) ...@@ -2589,6 +2589,7 @@ static void var_from_env(const char *name, const char *def_val)
v = var_init(0, name, 0, tmp, 0); v = var_init(0, name, 0, tmp, 0);
my_hash_insert(&var_hash, (byte*)v); my_hash_insert(&var_hash, (byte*)v);
return v;
} }
...@@ -2599,10 +2600,8 @@ static void init_var_hash(MYSQL *mysql) ...@@ -2599,10 +2600,8 @@ static void init_var_hash(MYSQL *mysql)
if (hash_init(&var_hash, charset_info, if (hash_init(&var_hash, charset_info,
1024, 0, 0, get_var_key, var_free, MYF(0))) 1024, 0, 0, get_var_key, var_free, MYF(0)))
die("Variable hash initialization failed"); die("Variable hash initialization failed");
var_from_env("MASTER_MYPORT", "9306"); if (opt_big_test)
var_from_env("SLAVE_MYPORT", "9307"); my_hash_insert(&var_hash, (byte*) var_init(0,"BIG_TEST", 0, "1",0));
var_from_env("MYSQL_TEST_DIR", "/tmp");
var_from_env("BIG_TEST", opt_big_test ? "1" : "0");
v= var_init(0,"MAX_TABLES", 0, (sizeof(ulong) == 4) ? "31" : "62",0); v= var_init(0,"MAX_TABLES", 0, (sizeof(ulong) == 4) ? "31" : "62",0);
my_hash_insert(&var_hash, (byte*) v); my_hash_insert(&var_hash, (byte*) v);
v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0); v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0);
......
...@@ -370,12 +370,15 @@ AC_SUBST(INSTALL_SCRIPT) ...@@ -370,12 +370,15 @@ AC_SUBST(INSTALL_SCRIPT)
export CC CXX CFLAGS LD LDFLAGS AR export CC CXX CFLAGS LD LDFLAGS AR
ndb_cxxflags_fix=
if test "$GXX" = "yes" if test "$GXX" = "yes"
then then
# mysqld requires -fno-implicit-templates. # mysqld requires -fno-implicit-templates.
# Disable exceptions as they seams to create problems with gcc and threads. # Disable exceptions as they seams to create problems with gcc and threads.
# mysqld doesn't use run-time-type-checking, so we disable it. # mysqld doesn't use run-time-type-checking, so we disable it.
CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti" CXXFLAGS="$CXXFLAGS -fno-implicit-templates -fno-exceptions -fno-rtti"
# ndb cannot be compiled with -fno-implicit-templaces
ndb_cxxflags_fix=-fimplicit-templates
# If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux, # If you are using 'gcc' 3.0 (not g++) to compile C++ programs on Linux,
# we will gets some problems when linking static programs. # we will gets some problems when linking static programs.
...@@ -2892,22 +2895,20 @@ if test X"$have_ndbcluster" = Xyes ...@@ -2892,22 +2895,20 @@ if test X"$have_ndbcluster" = Xyes
then then
MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster" MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster"
CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS)"
if test "$with_debug" = "yes" if test "$with_debug" = "yes"
then then
# Medium debug. # Medium debug.
NDB_DEFS="-DVM_TRACE -DERROR_INSERT -DARRAY_GUARD" NDB_DEFS="-DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS) \$(NDB_CXXFLAGS_LOC) \$(NDB_CXXFLAGS_DEBUG_LOC)"
elif test "$with_debug" = "full" elif test "$with_debug" = "full"
then then
NDB_DEFS="-DVM_TRACE -DERROR_INSERT -DARRAY_GUARD" NDB_DEFS="-DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS) \$(NDB_CXXFLAGS_LOC) \$(NDB_CXXFLAGS_DEBUG_LOC)"
else else
NDB_DEFS="-DNDEBUG" NDB_DEFS="-DNDEBUG"
CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS) \$(NDB_CXXFLAGS_LOC) \$(NDB_CXXFLAGS_RELEASE_LOC)"
fi fi
fi
AC_SUBST([NDB_DEFS]) AC_SUBST([NDB_DEFS])
AC_SUBST([ndb_cxxflags_fix])
ndb_transporter_opt_objs="" ndb_transporter_opt_objs=""
if test X"$have_ndb_shm" = Xyes if test X"$have_ndb_shm" = Xyes
...@@ -2920,22 +2921,23 @@ then ...@@ -2920,22 +2921,23 @@ then
fi fi
AC_SUBST([ndb_transporter_opt_objs]) AC_SUBST([ndb_transporter_opt_objs])
ndb_opt_subdirs=
ndb_bin_am_ldflags="-static" ndb_bin_am_ldflags="-static"
if test X"$have_ndb_test" = Xyes if test X"$have_ndb_test" = Xyes
then then
ndb_opt_test_subdirs="test" ndb_opt_subdirs="test"
ndb_bin_am_ldflags=""
fi
if test X"$have_ndb_docs" = Xyes
then
ndb_opt_subdirs="$ndb_opt_subdirs docs"
ndb_bin_am_ldflags="" ndb_bin_am_ldflags=""
fi fi
AC_SUBST([ndb_bin_am_ldflags]) AC_SUBST([ndb_bin_am_ldflags])
AC_SUBST([ndb_opt_test_subdirs]) AC_SUBST([ndb_opt_subdirs])
AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
# Output results
AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
ndb/docs/Makefile dnl
ndb/Makefile ndb/include/Makefile dnl
ndb/src/Makefile ndb/src/common/Makefile dnl ndb/src/Makefile ndb/src/common/Makefile dnl
ndb/docs/Makefile dnl
ndb/tools/Makefile dnl ndb/tools/Makefile dnl
ndb/src/common/debugger/Makefile ndb/src/common/debugger/signaldata/Makefile dnl ndb/src/common/debugger/Makefile ndb/src/common/debugger/signaldata/Makefile dnl
ndb/src/common/portlib/Makefile dnl ndb/src/common/portlib/Makefile dnl
...@@ -2976,7 +2978,14 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl ...@@ -2976,7 +2978,14 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
ndb/test/ndbapi/Makefile dnl ndb/test/ndbapi/Makefile dnl
ndb/test/ndbapi/bank/Makefile dnl ndb/test/ndbapi/bank/Makefile dnl
ndb/test/tools/Makefile dnl ndb/test/tools/Makefile dnl
ndb/test/run-test/Makefile dnl ndb/test/run-test/Makefile mysql-test/ndb/Makefile dnl
)
fi
AC_SUBST(MAKE_BINARY_DISTRIBUTION_OPTIONS)
# Output results
AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
strings/Makefile regex/Makefile heap/Makefile dnl strings/Makefile regex/Makefile heap/Makefile dnl
bdb/Makefile dnl bdb/Makefile dnl
myisam/Makefile myisammrg/Makefile dnl myisam/Makefile myisammrg/Makefile dnl
...@@ -2989,15 +2998,14 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl ...@@ -2989,15 +2998,14 @@ AC_OUTPUT(Makefile extra/Makefile mysys/Makefile isam/Makefile dnl
merge/Makefile dbug/Makefile scripts/Makefile dnl merge/Makefile dbug/Makefile scripts/Makefile dnl
include/Makefile sql-bench/Makefile tools/Makefile dnl include/Makefile sql-bench/Makefile tools/Makefile dnl
tests/Makefile Docs/Makefile support-files/Makefile dnl tests/Makefile Docs/Makefile support-files/Makefile dnl
support-files/MacOSX/Makefile mysql-test/Makefile mysql-test/ndb/Makefile dnl support-files/MacOSX/Makefile mysql-test/Makefile dnl
netware/Makefile dnl netware/Makefile dnl
include/mysql_version.h dnl include/mysql_version.h dnl
cmd-line-utils/Makefile dnl cmd-line-utils/Makefile dnl
cmd-line-utils/libedit/Makefile dnl cmd-line-utils/libedit/Makefile dnl
cmd-line-utils/readline/Makefile dnl cmd-line-utils/readline/Makefile)
, , [ AC_CONFIG_COMMANDS([default], , test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h)
test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h AC_OUTPUT
])
rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES
echo echo
......
...@@ -104,7 +104,7 @@ typedef struct my_collation_handler_st ...@@ -104,7 +104,7 @@ typedef struct my_collation_handler_st
my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint)); my_bool (*init)(struct charset_info_st *, void *(*alloc)(uint));
/* Collation routines */ /* Collation routines */
int (*strnncoll)(struct charset_info_st *, int (*strnncoll)(struct charset_info_st *,
const uchar *, uint, const uchar *, uint); const uchar *, uint, const uchar *, uint, my_bool);
int (*strnncollsp)(struct charset_info_st *, int (*strnncollsp)(struct charset_info_st *,
const uchar *, uint, const uchar *, uint); const uchar *, uint, const uchar *, uint);
int (*strnxfrm)(struct charset_info_st *, int (*strnxfrm)(struct charset_info_st *,
...@@ -206,6 +206,7 @@ typedef struct charset_info_st ...@@ -206,6 +206,7 @@ typedef struct charset_info_st
uchar *to_lower; uchar *to_lower;
uchar *to_upper; uchar *to_upper;
uchar *sort_order; uchar *sort_order;
uint16 *contractions;
uint16 **sort_order_big; uint16 **sort_order_big;
uint16 *tab_to_uni; uint16 *tab_to_uni;
MY_UNI_IDX *tab_from_uni; MY_UNI_IDX *tab_from_uni;
...@@ -253,7 +254,7 @@ extern CHARSET_INFO my_charset_cp1250_czech_ci; ...@@ -253,7 +254,7 @@ extern CHARSET_INFO my_charset_cp1250_czech_ci;
extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *, extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *,
uint); uint);
extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint, extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, uint,
const uchar *, uint); const uchar *, uint, my_bool);
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint, extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, uint,
const uchar *, uint); const uchar *, uint);
...@@ -387,7 +388,7 @@ extern my_bool my_parse_charset_xml(const char *bug, uint len, ...@@ -387,7 +388,7 @@ extern my_bool my_parse_charset_xml(const char *bug, uint len,
#define my_binary_compare(s) ((s)->state & MY_CS_BINSORT) #define my_binary_compare(s) ((s)->state & MY_CS_BINSORT)
#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM) #define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM)
#define my_strnxfrm(s, a, b, c, d) ((s)->coll->strnxfrm((s), (a), (b), (c), (d))) #define my_strnxfrm(s, a, b, c, d) ((s)->coll->strnxfrm((s), (a), (b), (c), (d)))
#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d))) #define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))
#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \ #define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \
((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j))) ((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))
#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m))) #define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m)))
......
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
#ifndef _dbug_h #ifndef _dbug_h
#define _dbug_h #define _dbug_h
#ifdef DBUG_OFF
#define NDEBUG /* for assert.h */
#endif
#include <assert.h> #include <assert.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
......
...@@ -558,7 +558,7 @@ typedef struct st_mysql_bind ...@@ -558,7 +558,7 @@ typedef struct st_mysql_bind
enum enum_field_types buffer_type; /* buffer type */ enum enum_field_types buffer_type; /* buffer type */
unsigned long buffer_length; /* buffer length, must be set for str/binary */ unsigned long buffer_length; /* buffer length, must be set for str/binary */
/* Following are for internal use. Set by mysql_bind_param */ /* Following are for internal use. Set by mysql_stmt_bind_param */
unsigned char *inter_buffer; /* for the current data position */ unsigned char *inter_buffer; /* for the current data position */
unsigned long offset; /* offset position for char/binary fetch */ unsigned long offset; /* offset position for char/binary fetch */
unsigned long internal_length; /* Used if length is 0 */ unsigned long internal_length; /* Used if length is 0 */
......
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
the second column is the ODBC state (which the 4.1 server sends out by the second column is the ODBC state (which the 4.1 server sends out by
default) and the last is the state used by the JDBC driver. default) and the last is the state used by the JDBC driver.
If the last column is "" then it means that the JDBC driver is using the If the last column is "" then it means that the JDBC driver is using the
ODBC state ODBC state.
The errors in this file is sorted in the same order as in mysqld_error.h The errors in this file are sorted in the same order as in mysqld_error.h
to allow on to do binary searches for the sqlstate. to allow one to do binary searches for the sqlstate.
*/ */
ER_DUP_KEY, "23000", "", ER_DUP_KEY, "23000", "",
......
...@@ -2220,6 +2220,7 @@ fil_create_new_single_table_tablespace( ...@@ -2220,6 +2220,7 @@ fil_create_new_single_table_tablespace(
ut_free(buf2); ut_free(buf2);
error_exit: error_exit:
os_file_close(file); os_file_close(file);
error_exit2:
os_file_delete(path); os_file_delete(path);
mem_free(path); mem_free(path);
...@@ -2262,10 +2263,7 @@ fil_create_new_single_table_tablespace( ...@@ -2262,10 +2263,7 @@ fil_create_new_single_table_tablespace(
os_file_close(file); os_file_close(file);
if (*space_id == ULINT_UNDEFINED) { if (*space_id == ULINT_UNDEFINED) {
os_file_delete(path); goto error_exit2;
error_exit2:
mem_free(path);
return(DB_ERROR);
} }
success = fil_space_create(path, *space_id, FIL_TABLESPACE); success = fil_space_create(path, *space_id, FIL_TABLESPACE);
...@@ -2822,12 +2820,11 @@ fil_load_single_table_tablespaces(void) ...@@ -2822,12 +2820,11 @@ fil_load_single_table_tablespaces(void)
if (len > dbpath_len) { if (len > dbpath_len) {
dbpath_len = len; dbpath_len = len;
if (!dbpath) { if (dbpath) {
dbpath = mem_alloc(dbpath_len); mem_free(dbpath);
} else {
dbpath = mem_realloc(dbpath, dbpath_len,
__FILE__, __LINE__);
} }
dbpath = mem_alloc(dbpath_len);
} }
sprintf(dbpath, "%s/%s", fil_path_to_mysql_datadir, sprintf(dbpath, "%s/%s", fil_path_to_mysql_datadir,
dbinfo.name); dbinfo.name);
......
...@@ -42,14 +42,13 @@ extern ...@@ -42,14 +42,13 @@ extern
void void
innobase_invalidate_query_cache( innobase_invalidate_query_cache(
/*============================*/ /*============================*/
trx_t* trx, /* in: transaction which modifies trx_t* trx, /* in: transaction which modifies the table */
the table */ char* full_name, /* in: concatenation of database name, null
const char* full_name, /* in: concatenation of database name, char '\0', table name, null char'\0';
null char '\0', table name, null char NOTE that in Windows this is always
'\0'; NOTE that in Windows this is in LOWER CASE! */
always in LOWER CASE! */ ulint full_name_len); /* in: full name length where also the null
ulint full_name_len); /* in: full name length where also the chars count */
null chars count */
/************************************************************************* /*************************************************************************
...@@ -652,24 +651,27 @@ row_ins_foreign_check_on_constraint( ...@@ -652,24 +651,27 @@ row_ins_foreign_check_on_constraint(
ulint n_to_update; ulint n_to_update;
ulint err; ulint err;
ulint i; ulint i;
const char* ptr; char* ptr;
char* table_name; char* table_name_buf;
ut_a(thr && foreign && pcur && mtr); ut_a(thr && foreign && pcur && mtr);
#ifndef UNIV_HOTBACKUP
/* Since we are going to delete or update a row, we have to invalidate /* Since we are going to delete or update a row, we have to invalidate
the MySQL query cache for table */ the MySQL query cache for table */
ptr = strchr(table->name, '/'); table_name_buf = mem_strdup(table->name);
ptr = strchr(table_name_buf, '/');
ut_a(ptr); ut_a(ptr);
table_name = mem_strdupl(table->name, ptr - table->name); *ptr = '\0';
#ifndef UNIV_HOTBACKUP
/* We call a function in ha_innodb.cc */ /* We call a function in ha_innodb.cc */
innobase_invalidate_query_cache(thr_get_trx(thr), table_name, innobase_invalidate_query_cache(thr_get_trx(thr), table_name_buf,
ptr - table->name + 1); strlen(table->name) + 1);
mem_free(table_name);
#endif #endif
mem_free(table_name_buf);
node = thr->run_node; node = thr->run_node;
if (node->is_delete && 0 == (foreign->type & if (node->is_delete && 0 == (foreign->type &
......
This diff is collapsed.
...@@ -511,6 +511,7 @@ int check_embedded_connection(MYSQL *mysql) ...@@ -511,6 +511,7 @@ int check_embedded_connection(MYSQL *mysql)
thd->host= (char*)my_localhost; thd->host= (char*)my_localhost;
thd->host_or_ip= thd->host; thd->host_or_ip= thd->host;
thd->user= my_strdup(mysql->user, MYF(0)); thd->user= my_strdup(mysql->user, MYF(0));
thd->priv_user= thd->user;
return check_user(thd, COM_CONNECT, NULL, 0, thd->db, true); return check_user(thd, COM_CONNECT, NULL, 0, thd->db, true);
} }
......
...@@ -53,10 +53,10 @@ static double _nwghts[11]= ...@@ -53,10 +53,10 @@ static double _nwghts[11]=
-3.796875000000000}; -3.796875000000000};
static double *nwghts=_nwghts+5; /* nwghts[i] = -0.5*1.5**i */ static double *nwghts=_nwghts+5; /* nwghts[i] = -0.5*1.5**i */
#define FTB_FLAG_TRUNC 1 /* MUST be 1 */ #define FTB_FLAG_TRUNC 1 /* */
#define FTB_FLAG_YES 2 /* no two from these three */ #define FTB_FLAG_YES 2 /* no two from these three */
#define FTB_FLAG_NO 4 /* YES, NO, WONLY */ #define FTB_FLAG_NO 4 /* YES, NO, WONLY */
#define FTB_FLAG_WONLY 8 /* should be ever set both */ #define FTB_FLAG_WONLY 8 /* should be _ever_ set both */
typedef struct st_ftb_expr FTB_EXPR; typedef struct st_ftb_expr FTB_EXPR;
struct st_ftb_expr struct st_ftb_expr
...@@ -157,6 +157,7 @@ static void _ftb_parse_query(FTB *ftb, byte **start, byte *end, ...@@ -157,6 +157,7 @@ static void _ftb_parse_query(FTB *ftb, byte **start, byte *end,
w.len+extra)); w.len+extra));
ftbw->len=w.len+1; ftbw->len=w.len+1;
ftbw->flags=0; ftbw->flags=0;
ftbw->off=0;
if (param.yesno>0) ftbw->flags|=FTB_FLAG_YES; if (param.yesno>0) ftbw->flags|=FTB_FLAG_YES;
if (param.yesno<0) ftbw->flags|=FTB_FLAG_NO; if (param.yesno<0) ftbw->flags|=FTB_FLAG_NO;
if (param.trunc) ftbw->flags|=FTB_FLAG_TRUNC; if (param.trunc) ftbw->flags|=FTB_FLAG_TRUNC;
...@@ -203,23 +204,26 @@ static int _ftb_no_dupes_cmp(void* not_used __attribute__((unused)), ...@@ -203,23 +204,26 @@ static int _ftb_no_dupes_cmp(void* not_used __attribute__((unused)),
static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
{ {
int r; int r;
uint off;
int subkeys=1; int subkeys=1;
my_bool can_go_down; my_bool can_go_down;
MI_INFO *info=ftb->info; MI_INFO *info=ftb->info;
uint off, extra=HA_FT_WLEN+info->s->base.rec_reflength;
byte *lastkey_buf=ftbw->word+ftbw->off;
if (ftbw->flags & FTB_FLAG_TRUNC)
lastkey_buf+=ftbw->len;
if (init_search) if (init_search)
{ {
ftbw->key_root=info->s->state.key_root[ftb->keynr]; ftbw->key_root=info->s->state.key_root[ftb->keynr];
ftbw->keyinfo=info->s->keyinfo+ftb->keynr; ftbw->keyinfo=info->s->keyinfo+ftb->keynr;
ftbw->off=0;
r=_mi_search(info, ftbw->keyinfo, (uchar*) ftbw->word, ftbw->len, r=_mi_search(info, ftbw->keyinfo, (uchar*) ftbw->word, ftbw->len,
SEARCH_FIND | SEARCH_BIGGER, ftbw->key_root); SEARCH_FIND | SEARCH_BIGGER, ftbw->key_root);
} }
else else
{ {
r=_mi_search(info, ftbw->keyinfo, (uchar*) ftbw->word+ftbw->off, r=_mi_search(info, ftbw->keyinfo, (uchar*) lastkey_buf,
USE_WHOLE_KEY, SEARCH_BIGGER, ftbw->key_root); USE_WHOLE_KEY, SEARCH_BIGGER, ftbw->key_root);
} }
...@@ -230,7 +234,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) ...@@ -230,7 +234,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
if (can_go_down) if (can_go_down)
{ {
/* going down ? */ /* going down ? */
off=info->lastkey_length-HA_FT_WLEN-info->s->base.rec_reflength; off=info->lastkey_length-extra;
subkeys=ft_sintXkorr(info->lastkey+off); subkeys=ft_sintXkorr(info->lastkey+off);
} }
if (subkeys<0 || info->lastpos < info->state->data_file_length) if (subkeys<0 || info->lastpos < info->state->data_file_length)
...@@ -243,11 +247,11 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) ...@@ -243,11 +247,11 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
if (!r && !ftbw->off) if (!r && !ftbw->off)
{ {
r= mi_compare_text(ftb->charset, r= mi_compare_text(ftb->charset,
info->lastkey + (ftbw->flags & FTB_FLAG_TRUNC), info->lastkey+1,
ftbw->len - (ftbw->flags & FTB_FLAG_TRUNC), info->lastkey_length-extra-1,
(uchar*) ftbw->word + (ftbw->flags & FTB_FLAG_TRUNC), (uchar*) ftbw->word+1,
ftbw->len - (ftbw->flags & FTB_FLAG_TRUNC), ftbw->len-1,
0,0); (my_bool) (ftbw->flags & FTB_FLAG_TRUNC),0);
} }
if (r) /* not found */ if (r) /* not found */
...@@ -269,8 +273,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) ...@@ -269,8 +273,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
} }
/* going up to the first-level tree to continue search there */ /* going up to the first-level tree to continue search there */
_mi_dpointer(info, (uchar*) (ftbw->word+ftbw->off+HA_FT_WLEN), _mi_dpointer(info, (uchar*) (lastkey_buf+HA_FT_WLEN), ftbw->key_root);
ftbw->key_root);
ftbw->key_root=info->s->state.key_root[ftb->keynr]; ftbw->key_root=info->s->state.key_root[ftb->keynr];
ftbw->keyinfo=info->s->keyinfo+ftb->keynr; ftbw->keyinfo=info->s->keyinfo+ftb->keynr;
ftbw->off=0; ftbw->off=0;
...@@ -278,7 +281,10 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) ...@@ -278,7 +281,10 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
} }
/* matching key found */ /* matching key found */
memcpy(ftbw->word+ftbw->off, info->lastkey, info->lastkey_length); memcpy(lastkey_buf, info->lastkey, info->lastkey_length);
if (lastkey_buf == ftbw->word)
ftbw->len=info->lastkey_length-extra;
/* going down ? */ /* going down ? */
if (subkeys<0) if (subkeys<0)
{ {
...@@ -291,7 +297,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search) ...@@ -291,7 +297,7 @@ static int _ft2_search(FTB *ftb, FTB_WORD *ftbw, my_bool init_search)
ftbw->keyinfo=& info->s->ft2_keyinfo; ftbw->keyinfo=& info->s->ft2_keyinfo;
r=_mi_search_first(info, ftbw->keyinfo, ftbw->key_root); r=_mi_search_first(info, ftbw->keyinfo, ftbw->key_root);
DBUG_ASSERT(r==0); /* found something */ DBUG_ASSERT(r==0); /* found something */
memcpy(ftbw->word+off, info->lastkey, info->lastkey_length); memcpy(lastkey_buf+off, info->lastkey, info->lastkey_length);
} }
ftbw->docid[0]=info->lastpos; ftbw->docid[0]=info->lastpos;
return 0; return 0;
...@@ -356,7 +362,7 @@ static void _ftb_init_index_search(FT_INFO *ftb) ...@@ -356,7 +362,7 @@ static void _ftb_init_index_search(FT_INFO *ftb)
else else
reset_tree(& ftb->no_dupes); reset_tree(& ftb->no_dupes);
} }
if (_ft2_search(ftb, ftbw, 1)) if (_ft2_search(ftb, ftbw, 1))
return; return;
} }
......
...@@ -142,6 +142,8 @@ int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag) ...@@ -142,6 +142,8 @@ int chk_del(MI_CHECK *param, register MI_INFO *info, uint test_flag)
empty=0; empty=0;
for (i= info->state->del ; i > 0L && next_link != HA_OFFSET_ERROR ; i--) for (i= info->state->del ; i > 0L && next_link != HA_OFFSET_ERROR ; i--)
{ {
if (*killed_ptr(param))
DBUG_RETURN(1);
if (test_flag & T_VERBOSE) if (test_flag & T_VERBOSE)
printf(" %9s",llstr(next_link,buff)); printf(" %9s",llstr(next_link,buff));
if (next_link >= info->state->data_file_length) if (next_link >= info->state->data_file_length)
...@@ -233,6 +235,8 @@ static int check_k_link(MI_CHECK *param, register MI_INFO *info, uint nr) ...@@ -233,6 +235,8 @@ static int check_k_link(MI_CHECK *param, register MI_INFO *info, uint nr)
records= (ha_rows) (info->state->key_file_length / block_size); records= (ha_rows) (info->state->key_file_length / block_size);
while (next_link != HA_OFFSET_ERROR && records > 0) while (next_link != HA_OFFSET_ERROR && records > 0)
{ {
if (*killed_ptr(param))
DBUG_RETURN(1);
if (param->testflag & T_VERBOSE) if (param->testflag & T_VERBOSE)
printf("%16s",llstr(next_link,llbuff)); printf("%16s",llstr(next_link,llbuff));
if (next_link > info->state->key_file_length || if (next_link > info->state->key_file_length ||
...@@ -372,6 +376,8 @@ int chk_key(MI_CHECK *param, register MI_INFO *info) ...@@ -372,6 +376,8 @@ int chk_key(MI_CHECK *param, register MI_INFO *info)
for (key= 0,keyinfo= &share->keyinfo[0]; key < share->base.keys ; for (key= 0,keyinfo= &share->keyinfo[0]; key < share->base.keys ;
rec_per_key_part+=keyinfo->keysegs, key++, keyinfo++) rec_per_key_part+=keyinfo->keysegs, key++, keyinfo++)
{ {
if (*killed_ptr(param))
DBUG_RETURN(-1);
param->key_crc[key]=0; param->key_crc[key]=0;
if (!(((ulonglong) 1 << key) & share->state.key_map)) if (!(((ulonglong) 1 << key) & share->state.key_map))
{ {
...@@ -592,6 +598,8 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, ...@@ -592,6 +598,8 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo,
} }
for ( ;; ) for ( ;; )
{ {
if (*killed_ptr(param))
goto err;
memcpy((char*) info->lastkey,(char*) key,key_length); memcpy((char*) info->lastkey,(char*) key,key_length);
info->lastkey_length=key_length; info->lastkey_length=key_length;
if (nod_flag) if (nod_flag)
...@@ -782,6 +790,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend) ...@@ -782,6 +790,8 @@ int chk_data_link(MI_CHECK *param, MI_INFO *info,int extend)
bzero((char*) key_checksum, info->s->base.keys * sizeof(key_checksum[0])); bzero((char*) key_checksum, info->s->base.keys * sizeof(key_checksum[0]));
while (pos < info->state->data_file_length) while (pos < info->state->data_file_length)
{ {
if (*killed_ptr(param))
goto err2;
switch (info->s->data_file_type) { switch (info->s->data_file_type) {
case STATIC_RECORD: case STATIC_RECORD:
if (my_b_read(&param->read_cache,(byte*) record, if (my_b_read(&param->read_cache,(byte*) record,
......
...@@ -69,9 +69,9 @@ my_bool mi_check_unique(MI_INFO *info, MI_UNIQUEDEF *def, byte *record, ...@@ -69,9 +69,9 @@ my_bool mi_check_unique(MI_INFO *info, MI_UNIQUEDEF *def, byte *record,
ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record) ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
{ {
const byte *pos, *end; const byte *pos, *end;
ha_checksum crc=0; ulong crc= 0;
HA_KEYSEG *keyseg;
ulong seed= 4; ulong seed= 4;
HA_KEYSEG *keyseg;
for (keyseg=def->seg ; keyseg < def->end ; keyseg++) for (keyseg=def->seg ; keyseg < def->end ; keyseg++)
{ {
...@@ -118,7 +118,7 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record) ...@@ -118,7 +118,7 @@ ha_checksum mi_unique_hash(MI_UNIQUEDEF *def, const byte *record)
(((uchar) *(uchar*) pos++))) + (((uchar) *(uchar*) pos++))) +
(crc >> (8*sizeof(ha_checksum)-8)); (crc >> (8*sizeof(ha_checksum)-8));
} }
return crc; return (ha_checksum)crc;
} }
/* /*
......
...@@ -17,7 +17,9 @@ ...@@ -17,7 +17,9 @@
## Process this file with automake to create Makefile.in ## Process this file with automake to create Makefile.in
if HAVE_NDBCLUSTER_DB
SUBDIRS = ndb SUBDIRS = ndb
endif
benchdir_root= $(prefix) benchdir_root= $(prefix)
testdir = $(benchdir_root)/mysql-test testdir = $(benchdir_root)/mysql-test
...@@ -74,6 +76,7 @@ SUFFIXES = .sh ...@@ -74,6 +76,7 @@ SUFFIXES = .sh
-e 's!@''libexecdir''@!$(libexecdir)!g' \ -e 's!@''libexecdir''@!$(libexecdir)!g' \
-e 's!@''PERL''@!@PERL@!' \ -e 's!@''PERL''@!@PERL@!' \
-e 's!@''VERSION''@!@VERSION@!' \ -e 's!@''VERSION''@!@VERSION@!' \
-e 's!@''MYSQL_TCP_PORT''@!@MYSQL_TCP_PORT@!' \
-e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \ -e 's!@''MYSQL_BASE_VERSION''@!@MYSQL_BASE_VERSION@!' \
-e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \ -e 's!@''MYSQL_UNIX_ADDR''@!@MYSQL_UNIX_ADDR@!' \
-e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \ -e 's!@''MYSQL_NO_DASH_VERSION''@!@MYSQL_NO_DASH_VERSION@!' \
......
...@@ -16,6 +16,7 @@ USE_MANAGER=0 ...@@ -16,6 +16,7 @@ USE_MANAGER=0
MY_TZ=GMT-3 MY_TZ=GMT-3
TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work TZ=$MY_TZ; export TZ # for UNIX_TIMESTAMP tests to work
LOCAL_SOCKET=@MYSQL_UNIX_ADDR@ LOCAL_SOCKET=@MYSQL_UNIX_ADDR@
MYSQL_TCP_PORT=@MYSQL_TCP_PORT@; export MYSQL_TCP_PORT
# For query_cache test # For query_cache test
case `uname` in case `uname` in
...@@ -1438,7 +1439,7 @@ then ...@@ -1438,7 +1439,7 @@ then
if [ -z "$USE_RUNNING_NDBCLUSTER" ] if [ -z "$USE_RUNNING_NDBCLUSTER" ]
then then
echo "Starting ndbcluster" echo "Starting ndbcluster"
./ndb/ndbcluster --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1 ./ndb/ndbcluster --small --discless --initial --data-dir=$MYSQL_TEST_DIR/var || exit 1
export NDB_CONNECTSTRING=`cat Ndb.cfg` export NDB_CONNECTSTRING=`cat Ndb.cfg`
else else
export NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER" export NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER"
......
...@@ -4,9 +4,9 @@ testdir = $(benchdir_root)/mysql-test/ndb ...@@ -4,9 +4,9 @@ testdir = $(benchdir_root)/mysql-test/ndb
test_SCRIPTS = ndbcluster test_SCRIPTS = ndbcluster
EXTRA_SCRIPTS = ndbcluster.sh noinst_HEADERS = ndbcluster.sh
test_DATA = ndb_config_2_node.ini dist_test_DATA = ndb_config_2_node.ini
SUFFIXES = .sh SUFFIXES = .sh
......
[DB DEFAULT] [DB DEFAULT]
#NoOfFragmentLogfiles: 1
#TimeBetweenLocalCheckpoints: 31
NoOfReplicas: 2 NoOfReplicas: 2
MaxNoOfConcurrentOperations: 100000 MaxNoOfConcurrentOperations: CHOOSE_MaxNoOfConcurrentOperations
DataMemory: CHOOSE_DataMemory
IndexMemory: CHOOSE_IndexMemory
Discless: CHOOSE_Discless
[COMPUTER] [COMPUTER]
Id: 1 Id: 1
......
...@@ -41,6 +41,12 @@ pidfile=ndbcluster.pid ...@@ -41,6 +41,12 @@ pidfile=ndbcluster.pid
cfgfile=Ndb.cfg cfgfile=Ndb.cfg
stop_ndb= stop_ndb=
initial_ndb= initial_ndb=
status_ndb=
ndb_discless=0
ndb_con_op=100000
ndb_dmem=80M
ndb_imem=24M
while test $# -gt 0; do while test $# -gt 0; do
case "$1" in case "$1" in
...@@ -51,6 +57,17 @@ while test $# -gt 0; do ...@@ -51,6 +57,17 @@ while test $# -gt 0; do
flags_ndb=$flags_ndb" -i" flags_ndb=$flags_ndb" -i"
initial_ndb=1 initial_ndb=1
;; ;;
--status)
status_ndb=1
;;
--small)
ndb_con_op=10000
ndb_dmem=40M
ndb_imem=12M
;;
--discless)
ndb_discless=1
;;
--data-dir=*) --data-dir=*)
fsdir=`echo "$1" | sed -e "s;--data-dir=;;"` fsdir=`echo "$1" | sed -e "s;--data-dir=;;"`
;; ;;
...@@ -121,6 +138,10 @@ NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID ...@@ -121,6 +138,10 @@ NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID
if [ $initial_ndb ] ; then if [ $initial_ndb ] ; then
sed \ sed \
-e s,"CHOOSE_MaxNoOfConcurrentOperations",$ndb_con_op,g \
-e s,"CHOOSE_DataMemory",$ndb_dmem,g \
-e s,"CHOOSE_IndexMemory",$ndb_imem,g \
-e s,"CHOOSE_Discless",$ndb_discless,g \
-e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \ -e s,"CHOOSE_HOSTNAME_".*,"$ndb_host",g \
-e s,"CHOOSE_FILESYSTEM_NODE_2","$fs_name_2",g \ -e s,"CHOOSE_FILESYSTEM_NODE_2","$fs_name_2",g \
-e s,"CHOOSE_FILESYSTEM_NODE_3","$fs_name_3",g \ -e s,"CHOOSE_FILESYSTEM_NODE_3","$fs_name_3",g \
...@@ -140,6 +161,7 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile ...@@ -140,6 +161,7 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile
NDB_ID="2" NDB_ID="2"
NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID
echo "Starting ndbd connectstring=\""$NDB_CONNECTSTRING\"
( cd $fs_ndb_2 ; echo $NDB_CONNECTSTRING > $cfgfile ; $exec_ndb -d $flags_ndb & ) ( cd $fs_ndb_2 ; echo $NDB_CONNECTSTRING > $cfgfile ; $exec_ndb -d $flags_ndb & )
cat `find $fs_ndb -name 'node*.pid'` > $pidfile cat `find $fs_ndb -name 'node*.pid'` > $pidfile
...@@ -148,17 +170,14 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile ...@@ -148,17 +170,14 @@ cat `find $fs_ndb -name 'node*.pid'` > $pidfile
NDB_ID="3" NDB_ID="3"
NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID
echo "Starting ndbd connectstring=\""$NDB_CONNECTSTRING\"
( cd $fs_ndb_3 ; echo $NDB_CONNECTSTRING > $cfgfile ; $exec_ndb -d $flags_ndb & ) ( cd $fs_ndb_3 ; echo $NDB_CONNECTSTRING > $cfgfile ; $exec_ndb -d $flags_ndb & )
cat `find $fs_ndb -name 'node*.pid'` > $pidfile cat `find $fs_ndb -name 'node*.pid'` > $pidfile
# Start management client
sleep 10
echo "show" | $exec_mgmtclient $ndb_host $ndb_port
# test if Ndb Cluster starts properly # test if Ndb Cluster starts properly
echo "Waiting for started..."
NDB_ID="11" NDB_ID="11"
NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID NDB_CONNECTSTRING=$NDB_CONNECTSTRING_BASE$NDB_ID
if ( $exec_waiter ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else if ( $exec_waiter ) | grep "NDBT_ProgramExit: 0 - OK"; then :; else
...@@ -169,6 +188,14 @@ fi ...@@ -169,6 +188,14 @@ fi
echo $NDB_CONNECTSTRING > $cfgfile echo $NDB_CONNECTSTRING > $cfgfile
cat `find $fs_ndb -name 'node*.pid'` > $pidfile cat `find $fs_ndb -name 'node*.pid'` > $pidfile
status_ndbcluster
}
status_ndbcluster() {
# Start management client
echo "show" | $exec_mgmtclient $ndb_host $ndb_port
} }
stop_default_ndbcluster() { stop_default_ndbcluster() {
...@@ -195,12 +222,17 @@ echo "all stop" | $exec_mgmtclient ...@@ -195,12 +222,17 @@ echo "all stop" | $exec_mgmtclient
sleep 5 sleep 5
if [ -f $pidfile ] ; then if [ -f $pidfile ] ; then
kill `cat $pidfile` kill `cat $pidfile` 2> /dev/null
rm $pidfile rm $pidfile
fi fi
} }
if [ $status_ndb ] ; then
status_ndbcluster
exit 0
fi
if [ $stop_ndb ] ; then if [ $stop_ndb ] ; then
stop_default_ndbcluster stop_default_ndbcluster
else else
......
...@@ -121,7 +121,7 @@ create database mysqltest; ...@@ -121,7 +121,7 @@ create database mysqltest;
create table mysqltest.t1 (a int,b int,c int); create table mysqltest.t1 (a int,b int,c int);
grant all on mysqltest.t1 to mysqltest_1@localhost; grant all on mysqltest.t1 to mysqltest_1@localhost;
alter table t1 rename t2; alter table t1 rename t2;
ERROR 42000: insert command denied to user: 'mysqltest_1'@'localhost' for table 't2' ERROR 42000: insert command denied to user 'mysqltest_1'@'localhost' for table 't2'
revoke all privileges on mysqltest.t1 from mysqltest_1@localhost; revoke all privileges on mysqltest.t1 from mysqltest_1@localhost;
delete from mysql.user where user='mysqltest_1'; delete from mysql.user where user='mysqltest_1';
drop database mysqltest; drop database mysqltest;
...@@ -468,5 +468,5 @@ t1 CREATE TABLE `t1` ( ...@@ -468,5 +468,5 @@ t1 CREATE TABLE `t1` (
UNIQUE KEY `b` (`b`) UNIQUE KEY `b` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
ALTER TABLE t1 DROP PRIMARY KEY; ALTER TABLE t1 DROP PRIMARY KEY;
ERROR 42000: Can't DROP 'PRIMARY'. Check that column/key exists ERROR 42000: Can't DROP 'PRIMARY'; check that column/key exists
DROP TABLE t1; DROP TABLE t1;
...@@ -162,7 +162,7 @@ last_insert_id() ...@@ -162,7 +162,7 @@ last_insert_id()
255 255
insert into t1 set i = null; insert into t1 set i = null;
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 'i' at row 1 Warning 1264 Data truncated; out of range for column 'i' at row 1
select last_insert_id(); select last_insert_id();
last_insert_id() last_insert_id()
255 255
...@@ -213,7 +213,7 @@ a b ...@@ -213,7 +213,7 @@ a b
delete from t1 where a=0; delete from t1 where a=0;
update t1 set a=NULL where b=6; update t1 set a=NULL where b=6;
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 4
update t1 set a=300 where b=7; update t1 set a=300 where b=7;
SET SQL_MODE=''; SET SQL_MODE='';
insert into t1(a,b)values(NULL,8); insert into t1(a,b)values(NULL,8);
...@@ -255,7 +255,7 @@ a b ...@@ -255,7 +255,7 @@ a b
delete from t1 where a=0; delete from t1 where a=0;
update t1 set a=NULL where b=13; update t1 set a=NULL where b=13;
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 9 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 9
update t1 set a=500 where b=14; update t1 set a=500 where b=14;
select * from t1 order by b; select * from t1 order by b;
a b a b
......
...@@ -9,7 +9,7 @@ set autocommit=0; ...@@ -9,7 +9,7 @@ set autocommit=0;
update t2 set x = 1 where id = 0; update t2 set x = 1 where id = 0;
select x from t1 where id = 0; select x from t1 where id = 0;
select x from t2 where id = 0; select x from t2 where id = 0;
ERROR 40001: Deadlock found when trying to get lock; Try restarting transaction ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
commit; commit;
x x
1 1
......
...@@ -11,7 +11,7 @@ create table t1 (b char(0) not null); ...@@ -11,7 +11,7 @@ create table t1 (b char(0) not null);
create table if not exists t1 (b char(0) not null); create table if not exists t1 (b char(0) not null);
insert into t1 values (""),(null); insert into t1 values (""),(null);
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2
select * from t1; select * from t1;
b b
...@@ -35,7 +35,7 @@ drop table if exists t1; ...@@ -35,7 +35,7 @@ drop table if exists t1;
Warnings: Warnings:
Note 1051 Unknown table 't1' Note 1051 Unknown table 't1'
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap; create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap;
ERROR 42000: Incorrect table definition; There can only be one auto column and it must be defined as a key ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
create table not_existing_database.test (a int); create table not_existing_database.test (a int);
Got one of the listed errors Got one of the listed errors
create table `a/a` (a int); create table `a/a` (a int);
...@@ -47,7 +47,7 @@ ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ...@@ -47,7 +47,7 @@ ERROR 42000: Identifier name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
create table test (a datetime default now()); create table test (a datetime default now());
ERROR 42000: Invalid default value for 'a' ERROR 42000: Invalid default value for 'a'
create table test (a datetime on update now()); create table test (a datetime on update now());
ERROR HY000: Invalid ON UPDATE clause for 'a' field ERROR HY000: Invalid ON UPDATE clause for 'a' column
create table test (a int default 100 auto_increment); create table test (a int default 100 auto_increment);
ERROR 42000: Invalid default value for 'a' ERROR 42000: Invalid default value for 'a'
create table 1ea10 (1a20 int,1e int); create table 1ea10 (1a20 int,1e int);
...@@ -275,11 +275,11 @@ ERROR 42000: Incorrect database name 'db1 ' ...@@ -275,11 +275,11 @@ ERROR 42000: Incorrect database name 'db1 '
create table t1(`a ` int); create table t1(`a ` int);
ERROR 42000: Incorrect column name 'a ' ERROR 42000: Incorrect column name 'a '
create table t1 (a int,); create table t1 (a int,);
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1
create table t1 (a int,,b int); create table t1 (a int,,b int);
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1
create table t1 (,b int); create table t1 (,b int);
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'b int)' at line 1
create table t1 (a int, key(a)); create table t1 (a int, key(a));
create table t2 (b int, foreign key(b) references t1(a), key(b)); create table t2 (b int, foreign key(b) references t1(a), key(b));
drop table if exists t1,t2; drop table if exists t1,t2;
......
This diff is collapsed.
...@@ -303,14 +303,14 @@ date format str_to_date ...@@ -303,14 +303,14 @@ date format str_to_date
2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12 2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12
03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 0003-01-02 22:11:12 03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 0003-01-02 22:11:12
Warnings: Warnings:
Note 1292 Truncated wrong string value: '10:20:10AM' Note 1292 Truncated incorrect string value: '10:20:10AM'
select date,format,concat(str_to_date(date, format),'') as con from t1; select date,format,concat(str_to_date(date, format),'') as con from t1;
date format con date format con
10:20:10AM %h:%i:%s 0000-00-00 10:20:10 10:20:10AM %h:%i:%s 0000-00-00 10:20:10
2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12 2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12
03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 0003-01-02 22:11:12 03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 0003-01-02 22:11:12
Warnings: Warnings:
Note 1292 Truncated wrong string value: '10:20:10AM' Note 1292 Truncated incorrect string value: '10:20:10AM'
drop table t1; drop table t1;
select get_format(DATE, 'USA') as a; select get_format(DATE, 'USA') as a;
a a
...@@ -374,7 +374,7 @@ str_to_date("02 10", "%d %f") as f6; ...@@ -374,7 +374,7 @@ str_to_date("02 10", "%d %f") as f6;
f1 f2 f3 f4 f5 f6 f1 f2 f3 f4 f5 f6
2003-01-02 10:11:12.001200 2003-01-02 10:11:12 2003-01-02 58:11:12 58:11:12 48:00:00.100000 2003-01-02 10:11:12.001200 2003-01-02 10:11:12 2003-01-02 58:11:12 58:11:12 48:00:00.100000
Warnings: Warnings:
Note 1292 Truncated wrong datetime value: '2003-01-02 10:11:12.0012' Note 1292 Truncated incorrect datetime value: '2003-01-02 10:11:12.0012'
drop table t1, t2; drop table t1, t2;
select str_to_date("2003-01-02 10:11:12.0012ABCD", "%Y-%m-%d %H:%i:%S.%f") as f1, select str_to_date("2003-01-02 10:11:12.0012ABCD", "%Y-%m-%d %H:%i:%S.%f") as f1,
addtime("-01:01:01.01 GGG", "-23:59:59.1") as f2, addtime("-01:01:01.01 GGG", "-23:59:59.1") as f2,
...@@ -382,13 +382,13 @@ microsecond("1997-12-31 23:59:59.01XXXX") as f3; ...@@ -382,13 +382,13 @@ microsecond("1997-12-31 23:59:59.01XXXX") as f3;
f1 f2 f3 f1 f2 f3
2003-01-02 10:11:12.001200 -25:01:00.110000 10000 2003-01-02 10:11:12.001200 -25:01:00.110000 10000
Warnings: Warnings:
Note 1292 Truncated wrong datetime value: '2003-01-02 10:11:12.0012ABCD' Note 1292 Truncated incorrect datetime value: '2003-01-02 10:11:12.0012ABCD'
Note 1292 Truncated wrong time value: '-01:01:01.01 GG' Note 1292 Truncated incorrect time value: '-01:01:01.01 GG'
Note 1292 Truncated wrong datetime value: '1997-12-31 23:59:59.01XXXX' Note 1292 Truncated incorrect datetime value: '1997-12-31 23:59:59.01XXXX'
select str_to_date("2003-04-05 g", "%Y-%m-%d") as f1, select str_to_date("2003-04-05 g", "%Y-%m-%d") as f1,
str_to_date("2003-04-05 10:11:12.101010234567", "%Y-%m-%d %H:%i:%S.%f") as f2; str_to_date("2003-04-05 10:11:12.101010234567", "%Y-%m-%d %H:%i:%S.%f") as f2;
f1 f2 f1 f2
2003-04-05 2003-04-05 10:11:12.101010 2003-04-05 2003-04-05 10:11:12.101010
Warnings: Warnings:
Note 1292 Truncated wrong date value: '2003-04-05 g' Note 1292 Truncated incorrect date value: '2003-04-05 g'
Note 1292 Truncated wrong datetime value: '2003-04-05 10:11:12.101010234567' Note 1292 Truncated incorrect datetime value: '2003-04-05 10:11:12.101010234567'
...@@ -27,7 +27,7 @@ a y ...@@ -27,7 +27,7 @@ a y
SELECT a FROM (SELECT 1 FROM (SELECT 1) a HAVING a=1) b; SELECT a FROM (SELECT 1 FROM (SELECT 1) a HAVING a=1) b;
ERROR 42S22: Unknown column 'a' in 'having clause' ERROR 42S22: Unknown column 'a' in 'having clause'
SELECT a,b as a FROM (SELECT '1' as a,'2' as b) b HAVING a=1; SELECT a,b as a FROM (SELECT '1' as a,'2' as b) b HAVING a=1;
ERROR 23000: Column: 'a' in having clause is ambiguous ERROR 23000: Column 'a' in having clause is ambiguous
SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=2; SELECT a,2 as a FROM (SELECT '1' as a) b HAVING a=2;
a a a a
1 2 1 2
...@@ -204,22 +204,22 @@ x ...@@ -204,22 +204,22 @@ x
1 1
create table t1 select 1 as a; create table t1 select 1 as a;
select 2 as a from (select * from t1) b; select 2 as a from (select * from t1) b;
ERROR 3D000: No Database Selected ERROR 3D000: No database selected
use test; use test;
select 2 as a from (select * from t1) b; select 2 as a from (select * from t1) b;
a a
2 2
drop table t1; drop table t1;
select mail_id, if(folder.f_description!='', folder.f_description, folder.f_name) as folder_name, date, address_id, phrase, address, subject from folder, (select mail.mail_id as mail_id, date_format(mail.h_date, '%b %e, %Y %h:%i') as date, mail.folder_id, sender.address_id as address_id, sender.phrase as phrase, sender.address as address, mail.h_subject as subject from mail left join mxa as mxa_sender on mail.mail_id=mxa_sender.mail_id and mxa_sender.type='from' left join address as sender on mxa_sender.address_id=sender.address_id mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_recipient.mail_id and mxa_recipient.address_id=recipient.address_id and mxa_recipient.type='to' and match(sender.phrase, sender.address, sender.comment) against ('jeremy' in boolean mode) and match(recipient.phrase, recipient.address, recipient.comment) against ('monty' in boolean mode) order by mail.h_date desc limit 0, 25 ) as query where query.folder_id=folder.folder_id; select mail_id, if(folder.f_description!='', folder.f_description, folder.f_name) as folder_name, date, address_id, phrase, address, subject from folder, (select mail.mail_id as mail_id, date_format(mail.h_date, '%b %e, %Y %h:%i') as date, mail.folder_id, sender.address_id as address_id, sender.phrase as phrase, sender.address as address, mail.h_subject as subject from mail left join mxa as mxa_sender on mail.mail_id=mxa_sender.mail_id and mxa_sender.type='from' left join address as sender on mxa_sender.address_id=sender.address_id mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_recipient.mail_id and mxa_recipient.address_id=recipient.address_id and mxa_recipient.type='to' and match(sender.phrase, sender.address, sender.comment) against ('jeremy' in boolean mode) and match(recipient.phrase, recipient.address, recipient.comment) against ('monty' in boolean mode) order by mail.h_date desc limit 0, 25 ) as query where query.folder_id=folder.folder_id;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_r' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mxa as mxa_recipient, address as recipient, where 1 and mail.mail_id=mxa_r' at line 1
create table t1 (a int); create table t1 (a int);
insert into t1 values (1),(2),(3); insert into t1 values (1),(2),(3);
update (select * from t1) as t1 set a = 5; update (select * from t1) as t1 set a = 5;
ERROR HY000: The target table t1 of the UPDATE is not updatable ERROR HY000: The target table t1 of the UPDATE is not updatable
delete from (select * from t1); delete from (select * from t1);
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1)' at line 1
insert into (select * from t1) values (5); insert into (select * from t1) values (5);
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1) values (5)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(select * from t1) values (5)' at line 1
drop table t1; drop table t1;
create table t1 (E1 INTEGER UNSIGNED NOT NULL, E2 INTEGER UNSIGNED NOT NULL, E3 INTEGER UNSIGNED NOT NULL, PRIMARY KEY(E1) create table t1 (E1 INTEGER UNSIGNED NOT NULL, E2 INTEGER UNSIGNED NOT NULL, E3 INTEGER UNSIGNED NOT NULL, PRIMARY KEY(E1)
); );
......
...@@ -253,11 +253,11 @@ KEY tig (ticket), ...@@ -253,11 +253,11 @@ KEY tig (ticket),
fulltext index tix (inhalt) fulltext index tix (inhalt)
); );
select * from t2 where MATCH inhalt AGAINST (t2.inhalt); select * from t2 where MATCH inhalt AGAINST (t2.inhalt);
ERROR HY000: Wrong arguments to AGAINST ERROR HY000: Incorrect arguments to AGAINST
select * from t2 where MATCH ticket AGAINST ('foobar'); select * from t2 where MATCH ticket AGAINST ('foobar');
ERROR HY000: Can't find FULLTEXT index matching the column list ERROR HY000: Can't find FULLTEXT index matching the column list
select * from t2,t3 where MATCH (t2.inhalt,t3.inhalt) AGAINST ('foobar'); select * from t2,t3 where MATCH (t2.inhalt,t3.inhalt) AGAINST ('foobar');
ERROR HY000: Wrong arguments to MATCH ERROR HY000: Incorrect arguments to MATCH
drop table t1,t2,t3; drop table t1,t2,t3;
CREATE TABLE t1 ( CREATE TABLE t1 (
id int(11) auto_increment, id int(11) auto_increment,
...@@ -363,3 +363,14 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck'); ...@@ -363,3 +363,14 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
t collation(t) t collation(t)
aus Osnabrck latin1_german2_ci aus Osnabrck latin1_german2_ci
DROP TABLE t1; DROP TABLE t1;
CREATE TABLE t1 (s varchar(255), FULLTEXT (s)) DEFAULT CHARSET=utf8;
insert into t1 (s) values ('pra para para'),('para para para');
select * from t1 where match(s) against('para' in boolean mode);
s
pra para para
para para para
select * from t1 where match(s) against('par*' in boolean mode);
s
pra para para
para para para
DROP TABLE t1;
...@@ -66,5 +66,5 @@ NULL ...@@ -66,5 +66,5 @@ NULL
NULL NULL
Warnings: Warnings:
Error 1259 ZLIB: Input data corrupted Error 1259 ZLIB: Input data corrupted
Error 1256 Too big size of uncompressed data. The maximum size is 1048576. (probably, length of uncompressed data was corrupted) Error 1256 Uncompressed data size too large; the maximum size is 1048576 (probably, length of uncompressed data was corrupted)
drop table t1; drop table t1;
...@@ -157,11 +157,8 @@ grp group_concat(c) ...@@ -157,11 +157,8 @@ grp group_concat(c)
3 D,D,E 3 D,D,E
4 4
5 NULL 5 NULL
Warnings:
Warning 1260 1 line(s) was(were) cut by group_concat()
show warnings; show warnings;
Level Code Message Level Code Message
Warning 1260 1 line(s) was(were) cut by group_concat()
set group_concat_max_len = 1024; set group_concat_max_len = 1024;
select group_concat(sum(a)) from t1 group by grp; select group_concat(sum(a)) from t1 group by grp;
ERROR HY000: Invalid use of group function ERROR HY000: Invalid use of group function
...@@ -310,3 +307,14 @@ GROUP_CONCAT(t1.a*t2.a ORDER BY t2.a) ...@@ -310,3 +307,14 @@ GROUP_CONCAT(t1.a*t2.a ORDER BY t2.a)
1,2 1,2
2,4 2,4
DROP TABLE t1, t2; DROP TABLE t1, t2;
CREATE TABLE t1 (a char(4));
INSERT INTO t1 VALUES ('John'), ('Anna'), ('Bill');
SELECT GROUP_CONCAT(a SEPARATOR '||') AS names FROM t1
HAVING names LIKE '%An%';
names
John||Anna||Bill
SELECT GROUP_CONCAT(a SEPARATOR '###') AS names FROM t1
HAVING LEFT(names, 1) ='J';
names
John###Anna###Bill
DROP TABLE t1;
...@@ -129,7 +129,7 @@ delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or ...@@ -129,7 +129,7 @@ delete from mysql.columns_priv where user='mysqltest_1' or user="mysqltest_2" or
flush privileges; flush privileges;
drop table t1; drop table t1;
GRANT FILE on mysqltest.* to mysqltest_1@localhost; GRANT FILE on mysqltest.* to mysqltest_1@localhost;
ERROR HY000: Wrong usage of DB GRANT and GLOBAL PRIVILEGES ERROR HY000: Incorrect usage of DB GRANT and GLOBAL PRIVILEGES
select 1; select 1;
1 1
1 1
......
...@@ -10,7 +10,7 @@ current_user ...@@ -10,7 +10,7 @@ current_user
mysqltest_1@localhost mysqltest_1@localhost
grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option; grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option;
grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option; grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option;
ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'my_%' ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'my_%'
show grants for mysqltest_1@localhost; show grants for mysqltest_1@localhost;
Grants for mysqltest_1@localhost Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
......
...@@ -134,7 +134,7 @@ a b c a ...@@ -134,7 +134,7 @@ a b c a
1 1 1 test.t1 1 1 1 test.t1
2 2 2 test.t1 2 2 2 test.t1
select * from t2; select * from t2;
ERROR 42000: select command denied to user: 'mysqltest_2'@'localhost' for table 't2' ERROR 42000: select command denied to user 'mysqltest_2'@'localhost' for table 't2'
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 6 Qcache_queries_in_cache 6
...@@ -148,17 +148,17 @@ select "user3"; ...@@ -148,17 +148,17 @@ select "user3";
user3 user3
user3 user3
select * from t1; select * from t1;
ERROR 42000: select command denied to user: 'mysqltest_3'@'localhost' for column 'b' in table 't1' ERROR 42000: select command denied to user 'mysqltest_3'@'localhost' for column 'b' in table 't1'
select a from t1; select a from t1;
a a
1 1
2 2
select c from t1; select c from t1;
ERROR 42000: SELECT command denied to user: 'mysqltest_3'@'localhost' for column 'c' in table 't1' ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1'
select * from t2; select * from t2;
ERROR 42000: select command denied to user: 'mysqltest_3'@'localhost' for table 't2' ERROR 42000: select command denied to user 'mysqltest_3'@'localhost' for table 't2'
select mysqltest.t1.c from test.t1,mysqltest.t1; select mysqltest.t1.c from test.t1,mysqltest.t1;
ERROR 42000: SELECT command denied to user: 'mysqltest_3'@'localhost' for column 'c' in table 't1' ERROR 42000: SELECT command denied to user 'mysqltest_3'@'localhost' for column 'c' in table 't1'
show status like "Qcache_queries_in_cache"; show status like "Qcache_queries_in_cache";
Variable_name Value Variable_name Value
Qcache_queries_in_cache 6 Qcache_queries_in_cache 6
...@@ -176,7 +176,7 @@ Grants for mysqltest_1@localhost ...@@ -176,7 +176,7 @@ Grants for mysqltest_1@localhost
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost' GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost' GRANT SELECT ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
select a from t1; select a from t1;
ERROR 3D000: No Database Selected ERROR 3D000: No database selected
select * from mysqltest.t1,test.t1; select * from mysqltest.t1,test.t1;
a b c a a b c a
1 1 1 test.t1 1 1 1 test.t1
......
...@@ -6,7 +6,7 @@ insert into t1 values ...@@ -6,7 +6,7 @@ insert into t1 values
(20,"ggg"),(21,"hhh"),(22,"iii"); (20,"ggg"),(21,"hhh"),(22,"iii");
handler t1 open as t2; handler t1 open as t2;
handler t2 read a=(SELECT 1); handler t2 read a=(SELECT 1);
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1)' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1)' at line 1
handler t2 read a first; handler t2 read a first;
a b a b
14 aaa 14 aaa
...@@ -51,7 +51,7 @@ handler t2 read a=(16); ...@@ -51,7 +51,7 @@ handler t2 read a=(16);
a b a b
16 ccc 16 ccc
handler t2 read a=(19,"fff"); handler t2 read a=(19,"fff");
ERROR 42000: Too many key parts specified. Max 1 parts allowed ERROR 42000: Too many key parts specified; max 1 parts allowed
handler t2 read b=(19,"fff"); handler t2 read b=(19,"fff");
a b a b
19 fff 19 fff
...@@ -135,7 +135,7 @@ handler t2 read next; ...@@ -135,7 +135,7 @@ handler t2 read next;
a b a b
19 fff 19 fff
handler t2 read last; handler t2 read last;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
handler t2 close; handler t2 close;
handler t1 open as t2; handler t1 open as t2;
drop table t1; drop table t1;
...@@ -173,7 +173,7 @@ handler t1 open; ...@@ -173,7 +173,7 @@ handler t1 open;
handler t1 read a=(W); handler t1 read a=(W);
ERROR 42S22: Unknown column 'W' in 'field list' ERROR 42S22: Unknown column 'W' in 'field list'
handler t1 read a=(a); handler t1 read a=(a);
ERROR HY000: Wrong arguments to HANDLER ... READ ERROR HY000: Incorrect arguments to HANDLER ... READ
drop table t1; drop table t1;
create table t1 (a char(5)); create table t1 (a char(5));
insert into t1 values ("Ok"); insert into t1 values ("Ok");
......
...@@ -49,7 +49,7 @@ handler t2 read a=(16); ...@@ -49,7 +49,7 @@ handler t2 read a=(16);
a b a b
16 ccc 16 ccc
handler t2 read a=(19,"fff"); handler t2 read a=(19,"fff");
ERROR 42000: Too many key parts specified. Max 1 parts allowed ERROR 42000: Too many key parts specified; max 1 parts allowed
handler t2 read b=(19,"fff"); handler t2 read b=(19,"fff");
a b a b
19 fff 19 fff
...@@ -130,7 +130,7 @@ handler t2 read next; ...@@ -130,7 +130,7 @@ handler t2 read next;
a b a b
18 eee 18 eee
handler t2 read last; handler t2 read last;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
handler t2 close; handler t2 close;
handler t1 open as t2; handler t1 open as t2;
handler t2 read first; handler t2 read first;
......
...@@ -63,7 +63,7 @@ insert into t1 values(NULL); ...@@ -63,7 +63,7 @@ insert into t1 values(NULL);
ERROR 23000: Column 'id' cannot be null ERROR 23000: Column 'id' cannot be null
insert into t1 values (1), (NULL), (2); insert into t1 values (1), (NULL), (2);
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'id' at row 2 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'id' at row 2
select * from t1; select * from t1;
id id
1 1
...@@ -159,18 +159,18 @@ insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@val ...@@ -159,18 +159,18 @@ insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@val
Warnings: Warnings:
Warning 1265 Data truncated for column 'f_double' at row 1 Warning 1265 Data truncated for column 'f_double' at row 1
Warning 1265 Data truncated for column 'f_float' at row 1 Warning 1265 Data truncated for column 'f_float' at row 1
Warning 1264 Data truncated, out of range for column 'f_float' at row 1 Warning 1264 Data truncated; out of range for column 'f_float' at row 1
Warning 1265 Data truncated for column 'f_double_7_2' at row 1 Warning 1265 Data truncated for column 'f_double_7_2' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1
Warning 1265 Data truncated for column 'f_float_4_3' at row 1 Warning 1265 Data truncated for column 'f_float_4_3' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1
Warning 1265 Data truncated for column 'f_double_u' at row 1 Warning 1265 Data truncated for column 'f_double_u' at row 1
Warning 1265 Data truncated for column 'f_float_u' at row 1 Warning 1265 Data truncated for column 'f_float_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1
Warning 1265 Data truncated for column 'f_double_15_1_u' at row 1 Warning 1265 Data truncated for column 'f_double_15_1_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1
Warning 1265 Data truncated for column 'f_float_3_1_u' at row 1 Warning 1265 Data truncated for column 'f_float_3_1_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id(); select * from t1 where number =last_insert_id();
number 4 number 4
original_value 1e+1111111111a original_value 1e+1111111111a
...@@ -187,19 +187,19 @@ insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@val ...@@ -187,19 +187,19 @@ insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@val
Warnings: Warnings:
Warning 1265 Data truncated for column 'f_double' at row 1 Warning 1265 Data truncated for column 'f_double' at row 1
Warning 1265 Data truncated for column 'f_float' at row 1 Warning 1265 Data truncated for column 'f_float' at row 1
Warning 1264 Data truncated, out of range for column 'f_float' at row 1 Warning 1264 Data truncated; out of range for column 'f_float' at row 1
Warning 1265 Data truncated for column 'f_double_7_2' at row 1 Warning 1265 Data truncated for column 'f_double_7_2' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1
Warning 1265 Data truncated for column 'f_float_4_3' at row 1 Warning 1265 Data truncated for column 'f_float_4_3' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1
Warning 1265 Data truncated for column 'f_double_u' at row 1 Warning 1265 Data truncated for column 'f_double_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1
Warning 1265 Data truncated for column 'f_float_u' at row 1 Warning 1265 Data truncated for column 'f_float_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1
Warning 1265 Data truncated for column 'f_double_15_1_u' at row 1 Warning 1265 Data truncated for column 'f_double_15_1_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1
Warning 1265 Data truncated for column 'f_float_3_1_u' at row 1 Warning 1265 Data truncated for column 'f_float_3_1_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id(); select * from t1 where number =last_insert_id();
number 5 number 5
original_value -1e+1111111111a original_value -1e+1111111111a
...@@ -214,12 +214,12 @@ f_float_3_1_u 0.0 ...@@ -214,12 +214,12 @@ f_float_3_1_u 0.0
set @value= 1e+1111111111; set @value= 1e+1111111111;
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 'f_float' at row 1 Warning 1264 Data truncated; out of range for column 'f_float' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id(); select * from t1 where number =last_insert_id();
number 6 number 6
original_value 1.7976931348623e+308 original_value 1.7976931348623e+308
...@@ -234,13 +234,13 @@ f_float_3_1_u 99.9 ...@@ -234,13 +234,13 @@ f_float_3_1_u 99.9
set @value= -1e+1111111111; set @value= -1e+1111111111;
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 'f_float' at row 1 Warning 1264 Data truncated; out of range for column 'f_float' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id(); select * from t1 where number =last_insert_id();
number 7 number 7
original_value -1.7976931348623e+308 original_value -1.7976931348623e+308
...@@ -255,12 +255,12 @@ f_float_3_1_u 0.0 ...@@ -255,12 +255,12 @@ f_float_3_1_u 0.0
set @value= 1e+111; set @value= 1e+111;
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 'f_float' at row 1 Warning 1264 Data truncated; out of range for column 'f_float' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id(); select * from t1 where number =last_insert_id();
number 8 number 8
original_value 1e+111 original_value 1e+111
...@@ -275,13 +275,13 @@ f_float_3_1_u 99.9 ...@@ -275,13 +275,13 @@ f_float_3_1_u 99.9
set @value= -1e+111; set @value= -1e+111;
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 'f_float' at row 1 Warning 1264 Data truncated; out of range for column 'f_float' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_7_2' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_7_2' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_4_3' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_4_3' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id(); select * from t1 where number =last_insert_id();
number 9 number 9
original_value -1e+111 original_value -1e+111
...@@ -309,10 +309,10 @@ f_float_3_1_u 1.0 ...@@ -309,10 +309,10 @@ f_float_3_1_u 1.0
set @value= -1; set @value= -1;
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value); insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 'f_double_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_double_15_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_double_15_1_u' at row 1
Warning 1264 Data truncated, out of range for column 'f_float_3_1_u' at row 1 Warning 1264 Data truncated; out of range for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id(); select * from t1 where number =last_insert_id();
number 11 number 11
original_value -1 original_value -1
......
...@@ -622,8 +622,8 @@ NULL 2 100 ...@@ -622,8 +622,8 @@ NULL 2 100
create table t2(No int not null, Field int not null, Count int not null); create table t2(No int not null, Field int not null, Count int not null);
insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2;
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'No' at row 1 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'No' at row 1
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'No' at row 2 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'No' at row 2
select * from t2; select * from t2;
No Field Count No Field Count
0 1 100 0 1 100
......
...@@ -34,7 +34,7 @@ ERROR 42000: Column 'a' is used with UNIQUE or INDEX but is not defined as NOT N ...@@ -34,7 +34,7 @@ ERROR 42000: Column 'a' is used with UNIQUE or INDEX but is not defined as NOT N
create table t1 (a int,b text, index(b)) engine=isam; create table t1 (a int,b text, index(b)) engine=isam;
ERROR 42000: BLOB column 'b' can't be used in key specification with the used table type ERROR 42000: BLOB column 'b' can't be used in key specification with the used table type
create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=isam; create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=isam;
ERROR 42000: Incorrect table definition; There can only be one auto column and it must be defined as a key ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key
create table t1 (ordid int(8), unique (ordid)) engine=isam; create table t1 (ordid int(8), unique (ordid)) engine=isam;
ERROR 42000: Column 'ordid' is used with UNIQUE or INDEX but is not defined as NOT NULL ERROR 42000: Column 'ordid' is used with UNIQUE or INDEX but is not defined as NOT NULL
drop table if exists t1; drop table if exists t1;
......
...@@ -126,7 +126,7 @@ a ...@@ -126,7 +126,7 @@ a
1 1
2 2
select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a); select t1.a from t1 as t1 left join t1 as t2 using (a) left join t1 as t3 using (a) left join t1 as t4 using (a) left join t1 as t5 using (a) left join t1 as t6 using (a) left join t1 as t7 using (a) left join t1 as t8 using (a) left join t1 as t9 using (a) left join t1 as t10 using (a) left join t1 as t11 using (a) left join t1 as t12 using (a) left join t1 as t13 using (a) left join t1 as t14 using (a) left join t1 as t15 using (a) left join t1 as t16 using (a) left join t1 as t17 using (a) left join t1 as t18 using (a) left join t1 as t19 using (a) left join t1 as t20 using (a) left join t1 as t21 using (a) left join t1 as t22 using (a) left join t1 as t23 using (a) left join t1 as t24 using (a) left join t1 as t25 using (a) left join t1 as t26 using (a) left join t1 as t27 using (a) left join t1 as t28 using (a) left join t1 as t29 using (a) left join t1 as t30 using (a) left join t1 as t31 using (a) left join t1 as t32 using (a) left join t1 as t33 using (a) left join t1 as t34 using (a) left join t1 as t35 using (a) left join t1 as t36 using (a) left join t1 as t37 using (a) left join t1 as t38 using (a) left join t1 as t39 using (a) left join t1 as t40 using (a) left join t1 as t41 using (a) left join t1 as t42 using (a) left join t1 as t43 using (a) left join t1 as t44 using (a) left join t1 as t45 using (a) left join t1 as t46 using (a) left join t1 as t47 using (a) left join t1 as t48 using (a) left join t1 as t49 using (a) left join t1 as t50 using (a) left join t1 as t51 using (a) left join t1 as t52 using (a) left join t1 as t53 using (a) left join t1 as t54 using (a) left join t1 as t55 using (a) left join t1 as t56 using (a) left join t1 as t57 using (a) left join t1 as t58 using (a) left join t1 as t59 using (a) left join t1 as t60 using (a) left join t1 as t61 using (a) left join t1 as t62 using (a) left join t1 as t63 using (a) left join t1 as t64 using (a) left join t1 as t65 using (a);
ERROR HY000: Too many tables. MySQL can only use XX tables in a join ERROR HY000: Too many tables; MySQL can only use XX tables in a join
drop table t1; drop table t1;
CREATE TABLE t1 ( CREATE TABLE t1 (
a int(11) NOT NULL, a int(11) NOT NULL,
......
...@@ -106,11 +106,11 @@ grp a c id a c d a ...@@ -106,11 +106,11 @@ grp a c id a c d a
3 6 D 3 6 C 6 6 3 6 D 3 6 C 6 6
NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); explain select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
ERROR 42000: Cross dependency found in OUTER JOIN. Examine your ON conditions ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions
select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a); select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t1.a=t3.a);
ERROR 42000: Cross dependency found in OUTER JOIN. Examine your ON conditions ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions
select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a); select t1.*,t2.*,t3.a from t1 left join t2 on (t3.a=t2.a) left join t1 as t3 on (t2.a=t3.a);
ERROR 42000: Cross dependency found in OUTER JOIN. Examine your ON conditions ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions
select t1.*,t2.* from t1 inner join t2 using (a); select t1.*,t2.* from t1 inner join t2 using (a);
grp a c id a c d grp a c id a c d
1 1 a 1 1 a 1 1 1 a 1 1 a 1
...@@ -406,7 +406,7 @@ insert into t3 values (1); ...@@ -406,7 +406,7 @@ insert into t3 values (1);
insert into t4 values (1,1); insert into t4 values (1,1);
insert into t5 values (1,1); insert into t5 values (1,1);
explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23; explain select * from t3 left join t4 on t4.seq_1_id = t2.t2_id left join t1 on t1.t1_id = t4.seq_0_id left join t5 on t5.seq_0_id = t1.t1_id left join t2 on t2.t2_id = t5.seq_1_id where t3.t3_id = 23;
ERROR 42000: Cross dependency found in OUTER JOIN. Examine your ON conditions ERROR 42000: Cross dependency found in OUTER JOIN; examine your ON conditions
drop table t1,t2,t3,t4,t5; drop table t1,t2,t3,t4,t5;
create table t1 (n int, m int, o int, key(n)); create table t1 (n int, m int, o int, key(n));
create table t2 (n int not null, m int, o int, primary key(n)); create table t2 (n int not null, m int, o int, primary key(n));
......
...@@ -156,8 +156,8 @@ CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT, ...@@ -156,8 +156,8 @@ CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT,
UNIQUE (c,i)); UNIQUE (c,i));
INSERT INTO t1 (c) VALUES (NULL),(NULL); INSERT INTO t1 (c) VALUES (NULL),(NULL);
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 1 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 1
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 2 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 2
SELECT * FROM t1; SELECT * FROM t1;
c i c i
1 1
......
...@@ -39,9 +39,9 @@ SELECT @@medium.key_buffer_size; ...@@ -39,9 +39,9 @@ SELECT @@medium.key_buffer_size;
0 0
SET @@global.key_buffer_size=@save_key_buffer; SET @@global.key_buffer_size=@save_key_buffer;
SELECT @@default.key_buffer_size; SELECT @@default.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'default.key_buffer_size' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'default.key_buffer_size' at line 1
SELECT @@skr.storage_engine="test"; SELECT @@skr.storage_engine="test";
ERROR HY000: Variable 'storage_engine' is not a variable component (Can't be used as XXXX.variable_name) ERROR HY000: Variable 'storage_engine' is not a variable component (can't be used as XXXX.variable_name)
select @@keycache1.key_cache_block_size; select @@keycache1.key_cache_block_size;
@@keycache1.key_cache_block_size @@keycache1.key_cache_block_size
0 0
......
...@@ -44,9 +44,9 @@ create table t1 (a int, b char(10)); ...@@ -44,9 +44,9 @@ create table t1 (a int, b char(10));
load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines; load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
Warnings: Warnings:
Warning 1265 Data truncated for column 'a' at row 3 Warning 1265 Data truncated for column 'a' at row 3
Warning 1262 Row 3 was truncated; It contained more data than there were input columns Warning 1262 Row 3 was truncated; it contained more data than there were input columns
Warning 1265 Data truncated for column 'a' at row 5 Warning 1265 Data truncated for column 'a' at row 5
Warning 1262 Row 5 was truncated; It contained more data than there were input columns Warning 1262 Row 5 was truncated; it contained more data than there were input columns
select * from t1; select * from t1;
a b a b
1 row 1 1 row 1
......
...@@ -191,7 +191,7 @@ n d unix_timestamp(t) ...@@ -191,7 +191,7 @@ n d unix_timestamp(t)
1 10 1038401397 1 10 1038401397
2 20 1038401397 2 20 1038401397
UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n; UPDATE t1,t2 SET 1=2 WHERE t1.n=t2.n;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1=2 WHERE t1.n=t2.n' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1=2 WHERE t1.n=t2.n' at line 1
drop table t1,t2; drop table t1,t2;
set timestamp=0; set timestamp=0;
set sql_safe_updates=0; set sql_safe_updates=0;
......
...@@ -11,7 +11,7 @@ insert into t1 (gesuchnr, benutzer_id) value (3,2); ...@@ -11,7 +11,7 @@ insert into t1 (gesuchnr, benutzer_id) value (3,2);
replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1);
replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1);
insert into t1 (gesuchnr,benutzer_id) values (1,1); insert into t1 (gesuchnr,benutzer_id) values (1,1);
ERROR 23000: Can't write, duplicate key in table 't1' ERROR 23000: Can't write; duplicate key in table 't1'
replace into t1 (gesuchnr,benutzer_id) values (1,1); replace into t1 (gesuchnr,benutzer_id) values (1,1);
select * from t1 order by gesuchnr; select * from t1 order by gesuchnr;
gesuchnr benutzer_id gesuchnr benutzer_id
......
...@@ -97,39 +97,39 @@ Warnings: ...@@ -97,39 +97,39 @@ Warnings:
Warning 1265 Data truncated for column 'd' at row 1 Warning 1265 Data truncated for column 'd' at row 1
UPDATE t1 SET d=NULL; UPDATE t1 SET d=NULL;
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'd' at row 1 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 1
INSERT INTO t1 (a) values (null); INSERT INTO t1 (a) values (null);
ERROR 23000: Column 'a' cannot be null ERROR 23000: Column 'a' cannot be null
INSERT INTO t1 (a) values (1/null); INSERT INTO t1 (a) values (1/null);
ERROR 23000: Column 'a' cannot be null ERROR 23000: Column 'a' cannot be null
INSERT INTO t1 (a) values (null),(null); INSERT INTO t1 (a) values (null),(null);
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 1 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 2 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 2
INSERT INTO t1 (b) values (null); INSERT INTO t1 (b) values (null);
ERROR 23000: Column 'b' cannot be null ERROR 23000: Column 'b' cannot be null
INSERT INTO t1 (b) values (1/null); INSERT INTO t1 (b) values (1/null);
ERROR 23000: Column 'b' cannot be null ERROR 23000: Column 'b' cannot be null
INSERT INTO t1 (b) values (null),(null); INSERT INTO t1 (b) values (null),(null);
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 1 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 1
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2
INSERT INTO t1 (c) values (null); INSERT INTO t1 (c) values (null);
ERROR 23000: Column 'c' cannot be null ERROR 23000: Column 'c' cannot be null
INSERT INTO t1 (c) values (1/null); INSERT INTO t1 (c) values (1/null);
ERROR 23000: Column 'c' cannot be null ERROR 23000: Column 'c' cannot be null
INSERT INTO t1 (c) values (null),(null); INSERT INTO t1 (c) values (null),(null);
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 1 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 1
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'c' at row 2 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'c' at row 2
INSERT INTO t1 (d) values (null); INSERT INTO t1 (d) values (null);
ERROR 23000: Column 'd' cannot be null ERROR 23000: Column 'd' cannot be null
INSERT INTO t1 (d) values (1/null); INSERT INTO t1 (d) values (1/null);
ERROR 23000: Column 'd' cannot be null ERROR 23000: Column 'd' cannot be null
INSERT INTO t1 (d) values (null),(null); INSERT INTO t1 (d) values (null),(null);
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'd' at row 1 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 1
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'd' at row 2 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'd' at row 2
select * from t1; select * from t1;
a b c d a b c d
0 0000-00-00 00:00:00 0 0 0000-00-00 00:00:00 0
......
...@@ -337,7 +337,7 @@ index (id2) ...@@ -337,7 +337,7 @@ index (id2)
); );
insert into t1 values(null,null),(1,1); insert into t1 values(null,null),(1,1);
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'id2' at row 1 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'id2' at row 1
select * from t1; select * from t1;
id id2 id id2
NULL 0 NULL 0
......
...@@ -10,22 +10,22 @@ select * from t1; ...@@ -10,22 +10,22 @@ select * from t1;
f1 f1
5 5
delete from t1; delete from t1;
ERROR 42000: Access denied for user: 'ssl_user1'@'localhost' to database 'test' ERROR 42000: Access denied for user 'ssl_user1'@'localhost' to database 'test'
select * from t1; select * from t1;
f1 f1
5 5
delete from t1; delete from t1;
ERROR 42000: Access denied for user: 'ssl_user2'@'localhost' to database 'test' ERROR 42000: Access denied for user 'ssl_user2'@'localhost' to database 'test'
select * from t1; select * from t1;
f1 f1
5 5
delete from t1; delete from t1;
ERROR 42000: Access denied for user: 'ssl_user3'@'localhost' to database 'test' ERROR 42000: Access denied for user 'ssl_user3'@'localhost' to database 'test'
select * from t1; select * from t1;
f1 f1
5 5
delete from t1; delete from t1;
ERROR 42000: Access denied for user: 'ssl_user4'@'localhost' to database 'test' ERROR 42000: Access denied for user 'ssl_user4'@'localhost' to database 'test'
delete from mysql.user where user='ssl_user%'; delete from mysql.user where user='ssl_user%';
delete from mysql.db where user='ssl_user%'; delete from mysql.db where user='ssl_user%';
flush privileges; flush privileges;
......
...@@ -12,7 +12,7 @@ select @@net_buffer_length, @@max_allowed_packet; ...@@ -12,7 +12,7 @@ select @@net_buffer_length, @@max_allowed_packet;
@@net_buffer_length @@max_allowed_packet @@net_buffer_length @@max_allowed_packet
1024 1024 1024 1024
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len; SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
ERROR 08S01: Got a packet bigger than 'max_allowed_packet' ERROR 08S01: Got a packet bigger than 'max_allowed_packet' bytes
set global max_allowed_packet=default; set global max_allowed_packet=default;
set max_allowed_packet=default; set max_allowed_packet=default;
set global net_buffer_length=default; set global net_buffer_length=default;
......
...@@ -23,13 +23,13 @@ a b ...@@ -23,13 +23,13 @@ a b
deallocate prepare no_such_statement; deallocate prepare no_such_statement;
ERROR HY000: Unknown prepared statement handler (no_such_statement) given to DEALLOCATE PREPARE ERROR HY000: Unknown prepared statement handler (no_such_statement) given to DEALLOCATE PREPARE
execute stmt1; execute stmt1;
ERROR HY000: Wrong arguments to EXECUTE ERROR HY000: Incorrect arguments to EXECUTE
prepare stmt2 from 'prepare nested_stmt from "select 1"'; prepare stmt2 from 'prepare nested_stmt from "select 1"';
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '"select 1"' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"select 1"' at line 1
prepare stmt2 from 'execute stmt1'; prepare stmt2 from 'execute stmt1';
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'stmt1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'stmt1' at line 1
prepare stmt2 from 'deallocate prepare z'; prepare stmt2 from 'deallocate prepare z';
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'z' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'z' at line 1
prepare stmt3 from 'insert into t1 values (?,?)'; prepare stmt3 from 'insert into t1 values (?,?)';
set @arg1=5, @arg2='five'; set @arg1=5, @arg2='five';
execute stmt3 using @arg1, @arg2; execute stmt3 using @arg1, @arg2;
...@@ -84,11 +84,11 @@ NULL ...@@ -84,11 +84,11 @@ NULL
NULL NULL
NULL NULL
prepare stmt6 from 'select 1; select2'; prepare stmt6 from 'select 1; select2';
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '; select2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; select2' at line 1
prepare stmt6 from 'insert into t1 values (5,"five"); select2'; prepare stmt6 from 'insert into t1 values (5,"five"); select2';
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '; select2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; select2' at line 1
explain prepare stmt6 from 'insert into t1 values (5,"five"); select2'; explain prepare stmt6 from 'insert into t1 values (5,"five"); select2';
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'from 'insert into t1 values (5,"five"); select2'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'from 'insert into t1 values (5,"five"); select2'' at line 1
create table t2 create table t2
( (
a int a int
...@@ -99,13 +99,13 @@ prepare stmt1 from 'select 1 FROM t2 where a=?' ; ...@@ -99,13 +99,13 @@ prepare stmt1 from 'select 1 FROM t2 where a=?' ;
execute stmt1 using @arg00 ; execute stmt1 using @arg00 ;
1 1
prepare stmt1 from @nosuchvar; prepare stmt1 from @nosuchvar;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL' at line 1
set @ivar= 1234; set @ivar= 1234;
prepare stmt1 from @ivar; prepare stmt1 from @ivar;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1234' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1234' at line 1
set @fvar= 123.4567; set @fvar= 123.4567;
prepare stmt1 from @fvar; prepare stmt1 from @fvar;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '123.4567' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '123.4567' at line 1
set @str1 = 'select ?'; set @str1 = 'select ?';
set @str2 = convert(@str1 using ucs2); set @str2 = convert(@str1 using ucs2);
prepare stmt1 from @str2; prepare stmt1 from @str2;
......
...@@ -593,7 +593,7 @@ select * from t1; ...@@ -593,7 +593,7 @@ select * from t1;
a a
set GLOBAL query_cache_size=1024; set GLOBAL query_cache_size=1024;
Warnings: Warnings:
Warning 1282 Query cache failed to set size 1024, new query cache size is 0 Warning 1282 Query cache failed to set size 1024; new query cache size is 0
show global variables like "query_cache_size"; show global variables like "query_cache_size";
Variable_name Value Variable_name Value
query_cache_size 0 query_cache_size 0
...@@ -601,7 +601,7 @@ select * from t1; ...@@ -601,7 +601,7 @@ select * from t1;
a a
set GLOBAL query_cache_size=10240; set GLOBAL query_cache_size=10240;
Warnings: Warnings:
Warning 1282 Query cache failed to set size 10240, new query cache size is 0 Warning 1282 Query cache failed to set size 10240; new query cache size is 0
show global variables like "query_cache_size"; show global variables like "query_cache_size";
Variable_name Value Variable_name Value
query_cache_size 0 query_cache_size 0
...@@ -609,7 +609,7 @@ select * from t1; ...@@ -609,7 +609,7 @@ select * from t1;
a a
set GLOBAL query_cache_size=20480; set GLOBAL query_cache_size=20480;
Warnings: Warnings:
Warning 1282 Query cache failed to set size 20480, new query cache size is 0 Warning 1282 Query cache failed to set size 20480; new query cache size is 0
show global variables like "query_cache_size"; show global variables like "query_cache_size";
Variable_name Value Variable_name Value
query_cache_size 0 query_cache_size 0
...@@ -617,7 +617,7 @@ select * from t1; ...@@ -617,7 +617,7 @@ select * from t1;
a a
set GLOBAL query_cache_size=40960; set GLOBAL query_cache_size=40960;
Warnings: Warnings:
Warning 1282 Query cache failed to set size 40960, new query cache size is 0 Warning 1282 Query cache failed to set size 40960; new query cache size is 0
show global variables like "query_cache_size"; show global variables like "query_cache_size";
Variable_name Value Variable_name Value
query_cache_size 0 query_cache_size 0
......
drop table if exists t1, t2, t3, t4; drop table if exists t1, t2, t3, t4;
drop table if exists t1, t2, t3, t4; drop table if exists t1, t2, t3, t4;
start slave; start slave;
ERROR HY000: Could not initialize master info structure, more error messages can be found in the MySQL error log ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log
start slave; start slave;
ERROR HY000: Could not initialize master info structure, more error messages can be found in the MySQL error log ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
ERROR HY000: Could not initialize master info structure, more error messages can be found in the MySQL error log ERROR HY000: Could not initialize master info structure; more error messages can be found in the MySQL error log
reset slave; reset slave;
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root'; change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
reset master; reset master;
......
...@@ -7,12 +7,12 @@ start slave; ...@@ -7,12 +7,12 @@ start slave;
reset master; reset master;
SET @save_select_limit=@@session.sql_select_limit; SET @save_select_limit=@@session.sql_select_limit;
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100; SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100;
ERROR HY000: Access denied. You need the SUPER privilege for this operation ERROR HY000: Access denied; you need the SUPER privilege for this operation
SELECT @@session.sql_select_limit = @save_select_limit; SELECT @@session.sql_select_limit = @save_select_limit;
@@session.sql_select_limit = @save_select_limit @@session.sql_select_limit = @save_select_limit
1 1
SET @@session.sql_select_limit=10, @@session.sql_log_bin=0; SET @@session.sql_select_limit=10, @@session.sql_log_bin=0;
ERROR HY000: Access denied. You need the SUPER privilege for this operation ERROR HY000: Access denied; you need the SUPER privilege for this operation
SELECT @@session.sql_select_limit = @save_select_limit; SELECT @@session.sql_select_limit = @save_select_limit;
@@session.sql_select_limit = @save_select_limit @@session.sql_select_limit = @save_select_limit
1 1
......
...@@ -57,15 +57,15 @@ show slave status; ...@@ -57,15 +57,15 @@ show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 # master-bin.000001 Yes No 0 0 561 # Master master-bin.000001 561 No # # 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 561 slave-relay-bin.000002 # master-bin.000001 Yes No 0 0 561 # Master master-bin.000001 561 No #
start slave until master_log_file='master-bin', master_log_pos=561; start slave until master_log_file='master-bin', master_log_pos=561;
ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;
ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until master_log_file='master-bin.000001'; start slave until master_log_file='master-bin.000001';
ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until relay_log_file='slave-relay-bin.000002'; start slave until relay_log_file='slave-relay-bin.000002';
ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561; start slave until relay_log_file='slave-relay-bin.000002', master_log_pos=561;
ERROR HY000: Wrong parameter or combination of parameters for START SLAVE UNTIL ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
start slave sql_thread; start slave sql_thread;
start slave until master_log_file='master-bin.000001', master_log_pos=561; start slave until master_log_file='master-bin.000001', master_log_pos=561;
Warnings: Warnings:
......
...@@ -30,7 +30,7 @@ ERROR HY000: You are using safe update mode and you tried to update a table with ...@@ -30,7 +30,7 @@ ERROR HY000: You are using safe update mode and you tried to update a table with
delete from t1 where a+0=1; delete from t1 where a+0=1;
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
select 1 from t1,t1 as t2,t1 as t3,t1 as t4,t1 as t5; select 1 from t1,t1 as t2,t1 as t3,t1 as t4,t1 as t5;
ERROR 42000: The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
update t1 set b="a" limit 1; update t1 set b="a" limit 1;
update t1 set b="a" where b="b" limit 2; update t1 set b="a" where b="b" limit 2;
delete from t1 where b="test" limit 1; delete from t1 where b="test" limit 1;
...@@ -42,7 +42,7 @@ SELECT @@MAX_JOIN_SIZE, @@SQL_BIG_SELECTS; ...@@ -42,7 +42,7 @@ SELECT @@MAX_JOIN_SIZE, @@SQL_BIG_SELECTS;
2 0 2 0
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"); insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
SELECT * from t1 order by a; SELECT * from t1 order by a;
ERROR 42000: The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
SET SQL_BIG_SELECTS=1; SET SQL_BIG_SELECTS=1;
SELECT * from t1 order by a; SELECT * from t1 order by a;
a b a b
...@@ -52,7 +52,7 @@ a b ...@@ -52,7 +52,7 @@ a b
5 a 5 a
SET MAX_JOIN_SIZE=2; SET MAX_JOIN_SIZE=2;
SELECT * from t1; SELECT * from t1;
ERROR 42000: The SELECT would examine more rows than MAX_JOIN_SIZE. Check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is ok ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
SET MAX_JOIN_SIZE=DEFAULT; SET MAX_JOIN_SIZE=DEFAULT;
SELECT * from t1; SELECT * from t1;
a b a b
......
...@@ -378,21 +378,21 @@ show create database test_$1; ...@@ -378,21 +378,21 @@ show create database test_$1;
Database Create Database Database Create Database
test_$1 CREATE DATABASE `test_$1` /*!40100 DEFAULT CHARACTER SET latin1 */ test_$1 CREATE DATABASE `test_$1` /*!40100 DEFAULT CHARACTER SET latin1 */
drop table t1; drop table t1;
ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'test_$1' ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'test_$1'
drop database test_$1; drop database test_$1;
ERROR 42000: Access denied for user: 'mysqltest_1'@'localhost' to database 'test_$1' ERROR 42000: Access denied for user 'mysqltest_1'@'localhost' to database 'test_$1'
select * from test_$1.t1; select * from test_$1.t1;
ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1'
show create database test_$1; show create database test_$1;
ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1'
drop table test_$1.t1; drop table test_$1.t1;
ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1'
drop database test_$1; drop database test_$1;
ERROR 42000: Access denied for user: 'mysqltest_2'@'localhost' to database 'test_$1' ERROR 42000: Access denied for user 'mysqltest_2'@'localhost' to database 'test_$1'
select * from test_$1.t1; select * from test_$1.t1;
ERROR 42000: Access denied for user: 'mysqltest_3'@'localhost' to database 'test_$1' ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'test_$1'
show create database test_$1; show create database test_$1;
ERROR 42000: Access denied for user: 'mysqltest_3'@'localhost' to database 'test_$1' ERROR 42000: Access denied for user 'mysqltest_3'@'localhost' to database 'test_$1'
drop table test_$1.t1; drop table test_$1.t1;
drop database test_$1; drop database test_$1;
delete from mysql.user delete from mysql.user
......
...@@ -6,7 +6,7 @@ explain extended select (select 2); ...@@ -6,7 +6,7 @@ explain extended select (select 2);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used 1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings: Warnings:
Note 1249 Select 2 was reduced during optimisation Note 1249 Select 2 was reduced during optimization
Note 1003 select 2 AS `(select 2)` Note 1003 select 2 AS `(select 2)`
SELECT (SELECT 1) UNION SELECT (SELECT 2); SELECT (SELECT 1) UNION SELECT (SELECT 2);
(SELECT 1) (SELECT 1)
...@@ -18,8 +18,8 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -18,8 +18,8 @@ id select_type table type possible_keys key key_len ref rows Extra
3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used 3 UNION NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL NULL UNION RESULT <union1,3> ALL NULL NULL NULL NULL NULL
Warnings: Warnings:
Note 1249 Select 2 was reduced during optimisation Note 1249 Select 2 was reduced during optimization
Note 1249 Select 4 was reduced during optimisation Note 1249 Select 4 was reduced during optimization
Note 1003 select 1 AS `(SELECT 1)` union select 2 AS `(SELECT 2)` Note 1003 select 1 AS `(SELECT 1)` union select 2 AS `(SELECT 2)`
SELECT (SELECT (SELECT 0 UNION SELECT 0)); SELECT (SELECT (SELECT 0 UNION SELECT 0));
(SELECT (SELECT 0 UNION SELECT 0)) (SELECT (SELECT 0 UNION SELECT 0))
...@@ -31,7 +31,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -31,7 +31,7 @@ id select_type table type possible_keys key key_len ref rows Extra
4 UNION NULL NULL NULL NULL NULL NULL NULL No tables used 4 UNION NULL NULL NULL NULL NULL NULL NULL No tables used
NULL UNION RESULT <union3,4> ALL NULL NULL NULL NULL NULL NULL UNION RESULT <union3,4> ALL NULL NULL NULL NULL NULL
Warnings: Warnings:
Note 1249 Select 2 was reduced during optimisation Note 1249 Select 2 was reduced during optimization
Note 1003 select (select 0 AS `0` union select 0 AS `0`) AS `(SELECT (SELECT 0 UNION SELECT 0))` Note 1003 select (select 0 AS `0` union select 0 AS `0`) AS `(SELECT (SELECT 0 UNION SELECT 0))`
SELECT (SELECT 1 FROM (SELECT 1) as b HAVING a=1) as a; SELECT (SELECT 1 FROM (SELECT 1) as b HAVING a=1) as a;
ERROR 42S22: Reference 'a' not supported (forward reference in item list) ERROR 42S22: Reference 'a' not supported (forward reference in item list)
...@@ -73,7 +73,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a)); ...@@ -73,7 +73,7 @@ SELECT 1 FROM (SELECT 1 as a) b WHERE 1 IN (SELECT (SELECT a));
1 1
1 1
select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1)); select (SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE(1));
ERROR HY000: Wrong usage of PROCEDURE and subquery ERROR HY000: Incorrect usage of PROCEDURE and subquery
SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1)); SELECT 1 FROM (SELECT 1) a PROCEDURE ANALYSE((SELECT 1));
ERROR HY000: Incorrect parameters to procedure 'ANALYSE' ERROR HY000: Incorrect parameters to procedure 'ANALYSE'
SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL; SELECT (SELECT 1) as a FROM (SELECT 1) b WHERE (SELECT a) IS NULL;
...@@ -333,7 +333,7 @@ Warnings: ...@@ -333,7 +333,7 @@ Warnings:
Note 1276 Field or reference 'clinic_uq' of SELECT #2 was resolved in SELECT #1 Note 1276 Field or reference '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)) 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); select * from t1 where a= (select a from t2,t4 where t2.b=t4.b);
ERROR 23000: Column: 'a' in field list is ambiguous ERROR 23000: Column 'a' in field list is ambiguous
drop table t1,t2,t3; drop table t1,t2,t3;
CREATE TABLE t3 (a varchar(20),b char(1) NOT NULL default '0'); CREATE TABLE t3 (a varchar(20),b char(1) NOT NULL default '0');
INSERT INTO t3 VALUES ('W','a'),('A','c'),('J','b'); INSERT INTO t3 VALUES ('W','a'),('A','c'),('J','b');
...@@ -712,7 +712,7 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1); ...@@ -712,7 +712,7 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ref id id 5 const 1 Using where; Using index 1 PRIMARY t2 ref id id 5 const 1 Using where; Using index
Warnings: Warnings:
Note 1249 Select 2 was reduced during optimisation Note 1249 Select 2 was reduced during optimization
Note 1003 select test.t2.id AS `id` from test.t2 where (test.t2.id = 1) Note 1003 select test.t2.id AS `id` from test.t2 where (test.t2.id = 1)
SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3);
id id
...@@ -724,8 +724,8 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1)); ...@@ -724,8 +724,8 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1+(select 1));
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t2 ref id id 5 const 1 Using where; Using index 1 PRIMARY t2 ref id id 5 const 1 Using where; Using index
Warnings: Warnings:
Note 1249 Select 3 was reduced during optimisation Note 1249 Select 3 was reduced during optimization
Note 1249 Select 2 was reduced during optimisation Note 1249 Select 2 was reduced during optimization
Note 1003 select test.t2.id AS `id` from test.t2 where (test.t2.id = (1 + 1)) Note 1003 select test.t2.id AS `id` from test.t2 where (test.t2.id = (1 + 1))
EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3); EXPLAIN EXTENDED SELECT * FROM t2 WHERE id IN (SELECT 1 UNION SELECT 3);
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
...@@ -859,7 +859,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -859,7 +859,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 1 PRIMARY t1 ALL NULL NULL NULL NULL 3
Warnings: Warnings:
Note 1276 Field or reference 'a' of SELECT #2 was resolved in SELECT #1 Note 1276 Field or reference 'a' of SELECT #2 was resolved in SELECT #1
Note 1249 Select 2 was reduced during optimisation Note 1249 Select 2 was reduced during optimization
Note 1003 select (test.t1.a + 1) AS `(select a+1)` from test.t1 Note 1003 select (test.t1.a + 1) AS `(select a+1)` from test.t1
select (select a+1) from t1; select (select a+1) from t1;
(select a+1) (select a+1)
...@@ -976,7 +976,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist ...@@ -976,7 +976,7 @@ ERROR 42S02: Table 'test.t1' doesn't exist
CREATE TABLE t1 (a int, KEY(a)); CREATE TABLE t1 (a int, KEY(a));
HANDLER t1 OPEN; HANDLER t1 OPEN;
HANDLER t1 READ a=((SELECT 1)); HANDLER t1 READ a=((SELECT 1));
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1))' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT 1))' at line 1
HANDLER t1 CLOSE; HANDLER t1 CLOSE;
drop table t1; drop table t1;
create table t1 (a int); create table t1 (a int);
...@@ -1714,7 +1714,7 @@ create table t1(id int); ...@@ -1714,7 +1714,7 @@ create table t1(id int);
create table t2(id int); create table t2(id int);
create table t3(flag int); create table t3(flag int);
select (select * from t3 where id not null) from t1, t2; select (select * from t3 where id not null) from t1, t2;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'null) from t1, t2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'null) from t1, t2' at line 1
drop table t1,t2,t3; drop table t1,t2,t3;
CREATE TABLE t1 (id INT); CREATE TABLE t1 (id INT);
CREATE TABLE t2 (id INT); CREATE TABLE t2 (id INT);
......
...@@ -27,7 +27,7 @@ t3 CREATE TABLE `t3` ( ...@@ -27,7 +27,7 @@ t3 CREATE TABLE `t3` (
drop table t1,t2,t3 drop table t1,t2,t3
#; #;
CREATE TABLE t1 (a char(257) default "hello"); CREATE TABLE t1 (a char(257) default "hello");
ERROR 42000: Too big column length for column 'a' (max = 255). Use BLOB instead ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB instead
CREATE TABLE t2 (a blob default "hello"); CREATE TABLE t2 (a blob default "hello");
ERROR 42000: BLOB/TEXT column 'a' can't have a default value ERROR 42000: BLOB/TEXT column 'a' can't have a default value
drop table if exists t1,t2; drop table if exists t1,t2;
......
...@@ -36,11 +36,11 @@ test.t1 check status OK ...@@ -36,11 +36,11 @@ test.t1 check status OK
delete from t1; delete from t1;
insert into t1 values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"),("20030102030460"),("20030102036301"),("20030102240401"),("20030132030401"),("20031302030460"); insert into t1 values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"),("20030102030460"),("20030102036301"),("20030102240401"),("20030132030401"),("20031302030460");
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 't' at row 14 Warning 1264 Data truncated; out of range for column 't' at row 14
Warning 1264 Data truncated, out of range for column 't' at row 15 Warning 1264 Data truncated; out of range for column 't' at row 15
Warning 1264 Data truncated, out of range for column 't' at row 16 Warning 1264 Data truncated; out of range for column 't' at row 16
Warning 1264 Data truncated, out of range for column 't' at row 17 Warning 1264 Data truncated; out of range for column 't' at row 17
Warning 1264 Data truncated, out of range for column 't' at row 18 Warning 1264 Data truncated; out of range for column 't' at row 18
select * from t1; select * from t1;
t t
2000-01-01 00:00:00 2000-01-01 00:00:00
......
This diff is collapsed.
...@@ -15,8 +15,8 @@ f1 float NULL YES NULL select,insert,update,references ...@@ -15,8 +15,8 @@ f1 float NULL YES NULL select,insert,update,references
f2 double NULL YES NULL select,insert,update,references f2 double NULL YES NULL select,insert,update,references
insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150); insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150);
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 'f1' at row 7 Warning 1264 Data truncated; out of range for column 'f1' at row 7
Warning 1264 Data truncated, out of range for column 'f1' at row 8 Warning 1264 Data truncated; out of range for column 'f1' at row 8
insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150); insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150);
select * from t1; select * from t1;
f1 f2 f1 f2
......
...@@ -89,33 +89,33 @@ insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,N ...@@ -89,33 +89,33 @@ insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,N
insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3); insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3);
insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1); insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1);
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 'utiny' at row 1 Warning 1264 Data truncated; out of range for column 'utiny' at row 1
Warning 1264 Data truncated, out of range for column 'ushort' at row 1 Warning 1264 Data truncated; out of range for column 'ushort' at row 1
Warning 1264 Data truncated, out of range for column 'umedium' at row 1 Warning 1264 Data truncated; out of range for column 'umedium' at row 1
Warning 1264 Data truncated, out of range for column 'ulong' at row 1 Warning 1264 Data truncated; out of range for column 'ulong' at row 1
Warning 1265 Data truncated for column 'options' at row 1 Warning 1265 Data truncated for column 'options' at row 1
Warning 1265 Data truncated for column 'flags' at row 1 Warning 1265 Data truncated for column 'flags' at row 1
insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree"); insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree");
Warnings: Warnings:
Warning 1265 Data truncated for column 'string' at row 1 Warning 1265 Data truncated for column 'string' at row 1
Warning 1264 Data truncated, out of range for column 'tiny' at row 1 Warning 1264 Data truncated; out of range for column 'tiny' at row 1
Warning 1264 Data truncated, out of range for column 'short' at row 1 Warning 1264 Data truncated; out of range for column 'short' at row 1
Warning 1264 Data truncated, out of range for column 'medium' at row 1 Warning 1264 Data truncated; out of range for column 'medium' at row 1
Warning 1264 Data truncated, out of range for column 'long_int' at row 1 Warning 1264 Data truncated; out of range for column 'long_int' at row 1
Warning 1264 Data truncated, out of range for column 'utiny' at row 1 Warning 1264 Data truncated; out of range for column 'utiny' at row 1
Warning 1264 Data truncated, out of range for column 'ushort' at row 1 Warning 1264 Data truncated; out of range for column 'ushort' at row 1
Warning 1264 Data truncated, out of range for column 'umedium' at row 1 Warning 1264 Data truncated; out of range for column 'umedium' at row 1
Warning 1264 Data truncated, out of range for column 'ulong' at row 1 Warning 1264 Data truncated; out of range for column 'ulong' at row 1
Warning 1265 Data truncated for column 'options' at row 1 Warning 1265 Data truncated for column 'options' at row 1
insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0); insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0);
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 'tiny' at row 1 Warning 1264 Data truncated; out of range for column 'tiny' at row 1
Warning 1264 Data truncated, out of range for column 'short' at row 1 Warning 1264 Data truncated; out of range for column 'short' at row 1
Warning 1264 Data truncated, out of range for column 'medium' at row 1 Warning 1264 Data truncated; out of range for column 'medium' at row 1
Warning 1264 Data truncated, out of range for column 'long_int' at row 1 Warning 1264 Data truncated; out of range for column 'long_int' at row 1
Warning 1264 Data truncated, out of range for column 'utiny' at row 1 Warning 1264 Data truncated; out of range for column 'utiny' at row 1
Warning 1264 Data truncated, out of range for column 'ushort' at row 1 Warning 1264 Data truncated; out of range for column 'ushort' at row 1
Warning 1264 Data truncated, out of range for column 'umedium' at row 1 Warning 1264 Data truncated; out of range for column 'umedium' at row 1
Warning 1265 Data truncated for column 'options' at row 1 Warning 1265 Data truncated for column 'options' at row 1
insert into t1 (tiny) values (1); insert into t1 (tiny) values (1);
select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1; select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1;
......
...@@ -25,11 +25,11 @@ t ...@@ -25,11 +25,11 @@ t
36:30:31 36:30:31
insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a"); insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a");
Warnings: Warnings:
Note 1292 Truncated wrong time value: '10.22.22' Note 1292 Truncated incorrect time value: '10.22.22'
Warning 1264 Data truncated, out of range for column 't' at row 2 Warning 1264 Data truncated; out of range for column 't' at row 2
Warning 1264 Data truncated, out of range for column 't' at row 3 Warning 1264 Data truncated; out of range for column 't' at row 3
Warning 1264 Data truncated, out of range for column 't' at row 4 Warning 1264 Data truncated; out of range for column 't' at row 4
Note 1292 Truncated wrong time value: '12.45a' Note 1292 Truncated incorrect time value: '12.45a'
select * from t1; select * from t1;
t t
10:22:33 10:22:33
......
...@@ -129,15 +129,15 @@ t2 t4 t6 t8 t10 t12 t14 ...@@ -129,15 +129,15 @@ t2 t4 t6 t8 t10 t12 t14
1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59
drop table t1; drop table t1;
create table t1 (t1 timestamp, t2 timestamp default now()); create table t1 (t1 timestamp, t2 timestamp default now());
ERROR HY000: Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
create table t1 (t1 timestamp, t2 timestamp on update now()); create table t1 (t1 timestamp, t2 timestamp on update now());
ERROR HY000: Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
create table t1 (t1 timestamp, t2 timestamp default now() on update now()); create table t1 (t1 timestamp, t2 timestamp default now() on update now());
ERROR HY000: Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
create table t1 (t1 timestamp default now(), t2 timestamp on update now()); create table t1 (t1 timestamp default now(), t2 timestamp on update now());
ERROR HY000: Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
create table t1 (t1 timestamp on update now(), t2 timestamp default now() on update now()); create table t1 (t1 timestamp on update now(), t2 timestamp default now() on update now());
ERROR HY000: Incorrect table definition; There can only be one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause ERROR HY000: Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause
create table t1 (t1 timestamp default '2003-01-01 00:00:00', t2 datetime, t3 timestamp); create table t1 (t1 timestamp default '2003-01-01 00:00:00', t2 datetime, t3 timestamp);
SET TIMESTAMP=1000000000; SET TIMESTAMP=1000000000;
insert into t1 values (); insert into t1 values ();
......
...@@ -4,7 +4,7 @@ create table t1 (this int unsigned); ...@@ -4,7 +4,7 @@ create table t1 (this int unsigned);
insert into t1 values (1); insert into t1 values (1);
insert into t1 values (-1); insert into t1 values (-1);
Warnings: Warnings:
Warning 1264 Data truncated, out of range for column 'this' at row 1 Warning 1264 Data truncated; out of range for column 'this' at row 1
select * from t1; select * from t1;
this this
1 1
......
...@@ -81,7 +81,7 @@ a b ...@@ -81,7 +81,7 @@ a b
2 b 2 b
1 a 1 a
(select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b; (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by t1.b;
ERROR 42000: Table 't1' from one of SELECT's can not be used in global ORDER clause ERROR 42000: Table 't1' from one of the SELECTs cannot be used in global ORDER clause
explain extended (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc; explain extended (select a,b from t1 limit 2) union all (select a,b from t2 order by a limit 1) order by b desc;
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 4 1 PRIMARY t1 ALL NULL NULL NULL NULL 4
...@@ -117,11 +117,11 @@ ERROR 21000: The used SELECT statements have a different number of columns ...@@ -117,11 +117,11 @@ ERROR 21000: The used SELECT statements have a different number of columns
explain select a,b from t1 union select 1 limit 0; explain select a,b from t1 union select 1 limit 0;
ERROR 21000: The used SELECT statements have a different number of columns ERROR 21000: The used SELECT statements have a different number of columns
select a,b from t1 into outfile 'skr' union select a,b from t2; select a,b from t1 into outfile 'skr' union select a,b from t2;
ERROR HY000: Wrong usage of UNION and INTO ERROR HY000: Incorrect usage of UNION and INTO
select a,b from t1 order by a union select a,b from t2; select a,b from t1 order by a union select a,b from t2;
ERROR HY000: Wrong usage of UNION and ORDER BY ERROR HY000: Incorrect usage of UNION and ORDER BY
insert into t3 select a from t1 order by a union select a from t2; insert into t3 select a from t1 order by a union select a from t2;
ERROR HY000: Wrong usage of UNION and ORDER BY ERROR HY000: Incorrect usage of UNION and ORDER BY
create table t3 select a,b from t1 union select a from t2; create table t3 select a,b from t1 union select a from t2;
ERROR 21000: The used SELECT statements have a different number of columns ERROR 21000: The used SELECT statements have a different number of columns
select a,b from t1 union select a from t2; select a,b from t1 union select a from t2;
...@@ -131,7 +131,7 @@ ERROR 21000: The used SELECT statements have a different number of columns ...@@ -131,7 +131,7 @@ ERROR 21000: The used SELECT statements have a different number of columns
select a from t1 union select * from t2; select a from t1 union select * from t2;
ERROR 21000: The used SELECT statements have a different number of columns ERROR 21000: The used SELECT statements have a different number of columns
select * from t1 union select SQL_BUFFER_RESULT * from t2; select * from t1 union select SQL_BUFFER_RESULT * from t2;
ERROR 42000: Wrong usage/placement of 'SQL_BUFFER_RESULT' ERROR 42000: Incorrect usage/placement of 'SQL_BUFFER_RESULT'
create table t3 select a,b from t1 union all select a,b from t2; create table t3 select a,b from t1 union all select a,b from t2;
insert into t3 select a,b from t1 union all select a,b from t2; insert into t3 select a,b from t1 union all select a,b from t2;
replace into t3 select a,b as c from t1 union all select a,b from t2; replace into t3 select a,b as c from t1 union all select a,b from t2;
...@@ -341,7 +341,7 @@ select found_rows(); ...@@ -341,7 +341,7 @@ select found_rows();
found_rows() found_rows()
4 4
(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION SELECT * FROM t2 LIMIT 1; (SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION SELECT * FROM t2 LIMIT 1;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION all SELECT * FROM t2 LIMIT 2; SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION all SELECT * FROM t2 LIMIT 2;
a a
1 1
...@@ -424,7 +424,7 @@ a ...@@ -424,7 +424,7 @@ a
3 3
3 3
(SELECT * FROM t1) UNION all (SELECT SQL_CALC_FOUND_ROWS * FROM t2) LIMIT 1; (SELECT * FROM t1) UNION all (SELECT SQL_CALC_FOUND_ROWS * FROM t2) LIMIT 1;
ERROR 42000: Wrong usage/placement of 'SQL_CALC_FOUND_ROWS' ERROR 42000: Incorrect usage/placement of 'SQL_CALC_FOUND_ROWS'
create temporary table t1 select a from t1 union select a from t2; create temporary table t1 select a from t1 union select a from t2;
drop temporary table t1; drop temporary table t1;
create table t1 select a from t1 union select a from t2; create table t1 select a from t1 union select a from t2;
......
...@@ -18,7 +18,7 @@ Warnings: ...@@ -18,7 +18,7 @@ Warnings:
Note 1003 select test.t1.ID AS `ID`,test.t1.UNIQ AS `UNIQ` from test.t1 where (test.t1.UNIQ = 4084688022709641610) Note 1003 select test.t1.ID AS `ID`,test.t1.UNIQ AS `UNIQ` from test.t1 where (test.t1.UNIQ = 4084688022709641610)
drop table t1; drop table t1;
select x'hello'; select x'hello';
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'x'hello'' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'x'hello'' at line 1
select 0xfg; select 0xfg;
ERROR 42S22: Unknown column '0xfg' in 'field list' ERROR 42S22: Unknown column '0xfg' in 'field list'
create table t1 select 1 as x, 2 as xx; create table t1 select 1 as x, 2 as xx;
......
...@@ -217,7 +217,7 @@ ERROR 42000: Variable 'big_tables' can't be set to the value of 'OFFF' ...@@ -217,7 +217,7 @@ ERROR 42000: Variable 'big_tables' can't be set to the value of 'OFFF'
set unknown_variable=1; set unknown_variable=1;
ERROR HY000: Unknown system variable 'unknown_variable' ERROR HY000: Unknown system variable 'unknown_variable'
set max_join_size="hello"; set max_join_size="hello";
ERROR 42000: Wrong argument type to variable 'max_join_size' ERROR 42000: Incorrect argument type to variable 'max_join_size'
set storage_engine=UNKNOWN_TABLE_TYPE; set storage_engine=UNKNOWN_TABLE_TYPE;
ERROR 42000: Unknown table engine 'UNKNOWN_TABLE_TYPE' ERROR 42000: Unknown table engine 'UNKNOWN_TABLE_TYPE'
set storage_engine=INNODB, big_tables=2; set storage_engine=INNODB, big_tables=2;
...@@ -427,12 +427,12 @@ select @a, @b; ...@@ -427,12 +427,12 @@ select @a, @b;
@a @b @a @b
2 1 2 1
set @@global.global.key_buffer_size= 1; set @@global.global.key_buffer_size= 1;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size= 1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size= 1' at line 1
set GLOBAL global.key_buffer_size= 1; set GLOBAL global.key_buffer_size= 1;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size= 1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size= 1' at line 1
SELECT @@global.global.key_buffer_size; SELECT @@global.global.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1
SELECT @@global.session.key_buffer_size; SELECT @@global.session.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1
SELECT @@global.local.key_buffer_size; SELECT @@global.local.key_buffer_size;
ERROR 42000: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_buffer_size' at line 1
...@@ -43,13 +43,13 @@ drop table t1; ...@@ -43,13 +43,13 @@ drop table t1;
create table t1(a tinyint, b int not null, c date, d char(5)); create table t1(a tinyint, b int not null, c date, d char(5));
load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ','; load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'b' at row 2 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2
Warning 1265 Data truncated for column 'd' at row 3 Warning 1265 Data truncated for column 'd' at row 3
Warning 1265 Data truncated for column 'c' at row 4 Warning 1265 Data truncated for column 'c' at row 4
Warning 1261 Row 5 doesn't contain data for all columns Warning 1261 Row 5 doesn't contain data for all columns
Warning 1265 Data truncated for column 'b' at row 6 Warning 1265 Data truncated for column 'b' at row 6
Warning 1262 Row 7 was truncated; It contained more data than there were input columns Warning 1262 Row 7 was truncated; it contained more data than there were input columns
Warning 1264 Data truncated, out of range for column 'a' at row 8 Warning 1264 Data truncated; out of range for column 'a' at row 8
select @@warning_count; select @@warning_count;
@@warning_count @@warning_count
7 7
...@@ -57,11 +57,11 @@ drop table t1; ...@@ -57,11 +57,11 @@ drop table t1;
create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5)); create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test'); insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 1 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 1
Warning 1264 Data truncated, out of range for column 'b' at row 2 Warning 1264 Data truncated; out of range for column 'b' at row 2
Warning 1265 Data truncated for column 'c' at row 2 Warning 1265 Data truncated for column 'c' at row 2
Warning 1264 Data truncated, out of range for column 'a' at row 3 Warning 1264 Data truncated; out of range for column 'a' at row 3
Warning 1264 Data truncated, out of range for column 'b' at row 3 Warning 1264 Data truncated; out of range for column 'b' at row 3
Warning 1265 Data truncated for column 'c' at row 3 Warning 1265 Data truncated for column 'c' at row 3
alter table t1 modify c char(4); alter table t1 modify c char(4);
Warnings: Warnings:
...@@ -70,7 +70,7 @@ Warning 1265 Data truncated for column 'c' at row 2 ...@@ -70,7 +70,7 @@ Warning 1265 Data truncated for column 'c' at row 2
alter table t1 add d char(2); alter table t1 add d char(2);
update t1 set a=NULL where a=10; update t1 set a=NULL where a=10;
Warnings: Warnings:
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 2 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 2
update t1 set c='mysql ab' where c='test'; update t1 set c='mysql ab' where c='test';
Warnings: Warnings:
Warning 1265 Data truncated for column 'c' at row 4 Warning 1265 Data truncated for column 'c' at row 4
...@@ -86,7 +86,7 @@ Warnings: ...@@ -86,7 +86,7 @@ Warnings:
Warning 1265 Data truncated for column 'b' at row 1 Warning 1265 Data truncated for column 'b' at row 1
Warning 1265 Data truncated for column 'b' at row 2 Warning 1265 Data truncated for column 'b' at row 2
Warning 1265 Data truncated for column 'b' at row 3 Warning 1265 Data truncated for column 'b' at row 3
Warning 1263 Data truncated, NULL supplied to NOT NULL column 'a' at row 4 Warning 1263 Data truncated; NULL supplied to NOT NULL column 'a' at row 4
Warning 1265 Data truncated for column 'b' at row 4 Warning 1265 Data truncated for column 'b' at row 4
insert into t2(b) values('mysqlab'); insert into t2(b) values('mysqlab');
Warnings: Warnings:
...@@ -125,11 +125,11 @@ Warning 1266 Using storage engine MyISAM for table 't1' ...@@ -125,11 +125,11 @@ Warning 1266 Using storage engine MyISAM for table 't1'
drop table t1; drop table t1;
create table t1 (id int) type=heap; create table t1 (id int) type=heap;
Warnings: Warnings:
Warning 1287 'TYPE=storage_engine' is deprecated, use 'ENGINE=storage_engine' instead Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
alter table t1 type=myisam; alter table t1 type=myisam;
Warnings: Warnings:
Warning 1287 'TYPE=storage_engine' is deprecated, use 'ENGINE=storage_engine' instead Warning 1287 'TYPE=storage_engine' is deprecated; use 'ENGINE=storage_engine' instead
drop table t1; drop table t1;
set table_type=MYISAM; set table_type=MYISAM;
Warnings: Warnings:
Warning 1287 'table_type' is deprecated, use 'storage_engine' instead Warning 1287 'table_type' is deprecated; use 'storage_engine' instead
This diff is collapsed.
...@@ -279,3 +279,12 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabr ...@@ -279,3 +279,12 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabr
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck'); SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
DROP TABLE t1; DROP TABLE t1;
#
# bug#3964
#
CREATE TABLE t1 (s varchar(255), FULLTEXT (s)) DEFAULT CHARSET=utf8;
insert into t1 (s) values ('pra para para'),('para para para');
select * from t1 where match(s) against('para' in boolean mode);
select * from t1 where match(s) against('par*' in boolean mode);
DROP TABLE t1;
...@@ -189,3 +189,15 @@ INSERT INTO t1 VALUES (1), (2); ...@@ -189,3 +189,15 @@ INSERT INTO t1 VALUES (1), (2);
INSERT INTO t2 VALUES (1), (2); INSERT INTO t2 VALUES (1), (2);
SELECT GROUP_CONCAT(t1.a*t2.a ORDER BY t2.a) FROM t1, t2 GROUP BY t1.a; SELECT GROUP_CONCAT(t1.a*t2.a ORDER BY t2.a) FROM t1, t2 GROUP BY t1.a;
DROP TABLE t1, t2; DROP TABLE t1, t2;
#
# Bug #4035: group_concat() and HAVING
#
CREATE TABLE t1 (a char(4));
INSERT INTO t1 VALUES ('John'), ('Anna'), ('Bill');
SELECT GROUP_CONCAT(a SEPARATOR '||') AS names FROM t1
HAVING names LIKE '%An%';
SELECT GROUP_CONCAT(a SEPARATOR '###') AS names FROM t1
HAVING LEFT(names, 1) ='J';
DROP TABLE t1;
...@@ -12,7 +12,7 @@ show slave status; ...@@ -12,7 +12,7 @@ show slave status;
change master to master_host='127.0.0.1'; change master to master_host='127.0.0.1';
# The following needs to be cleaned up when change master is fixed # The following needs to be cleaned up when change master is fixed
--replace_result $MASTER_MYPORT MASTER_PORT 3306 MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT $MYSQL_TCP_PORT MASTER_PORT
--replace_column 1 # 33 # --replace_column 1 # 33 #
show slave status; show slave status;
--replace_result $MASTER_MYPORT MASTER_PORT --replace_result $MASTER_MYPORT MASTER_PORT
......
...@@ -33,6 +33,29 @@ extern CHARSET_INFO my_charset_ucs2_estonian_uca_ci; ...@@ -33,6 +33,29 @@ extern CHARSET_INFO my_charset_ucs2_estonian_uca_ci;
extern CHARSET_INFO my_charset_ucs2_spanish_uca_ci; extern CHARSET_INFO my_charset_ucs2_spanish_uca_ci;
extern CHARSET_INFO my_charset_ucs2_swedish_uca_ci; extern CHARSET_INFO my_charset_ucs2_swedish_uca_ci;
extern CHARSET_INFO my_charset_ucs2_turkish_uca_ci; extern CHARSET_INFO my_charset_ucs2_turkish_uca_ci;
extern CHARSET_INFO my_charset_ucs2_czech_uca_ci;
extern CHARSET_INFO my_charset_ucs2_danish_uca_ci;
extern CHARSET_INFO my_charset_ucs2_lithuanian_uca_ci;
extern CHARSET_INFO my_charset_ucs2_slovak_uca_ci;
extern CHARSET_INFO my_charset_ucs2_spanish2_uca_ci;
#endif
#ifdef HAVE_CHARSET_utf8
extern CHARSET_INFO my_charset_utf8_general_uca_ci;
extern CHARSET_INFO my_charset_utf8_icelandic_uca_ci;
extern CHARSET_INFO my_charset_utf8_latvian_uca_ci;
extern CHARSET_INFO my_charset_utf8_romanian_uca_ci;
extern CHARSET_INFO my_charset_utf8_slovenian_uca_ci;
extern CHARSET_INFO my_charset_utf8_polish_uca_ci;
extern CHARSET_INFO my_charset_utf8_estonian_uca_ci;
extern CHARSET_INFO my_charset_utf8_spanish_uca_ci;
extern CHARSET_INFO my_charset_utf8_swedish_uca_ci;
extern CHARSET_INFO my_charset_utf8_turkish_uca_ci;
extern CHARSET_INFO my_charset_utf8_czech_uca_ci;
extern CHARSET_INFO my_charset_utf8_danish_uca_ci;
extern CHARSET_INFO my_charset_utf8_lithuanian_uca_ci;
extern CHARSET_INFO my_charset_utf8_slovak_uca_ci;
extern CHARSET_INFO my_charset_utf8_spanish2_uca_ci;
#endif #endif
my_bool init_compiled_charsets(myf flags __attribute__((unused))) my_bool init_compiled_charsets(myf flags __attribute__((unused)))
...@@ -87,7 +110,6 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -87,7 +110,6 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_ucs2_general_ci); add_compiled_collation(&my_charset_ucs2_general_ci);
add_compiled_collation(&my_charset_ucs2_bin); add_compiled_collation(&my_charset_ucs2_bin);
add_compiled_collation(&my_charset_ucs2_general_uca); add_compiled_collation(&my_charset_ucs2_general_uca);
add_compiled_collation(&my_charset_ucs2_general_uca);
add_compiled_collation(&my_charset_ucs2_icelandic_uca_ci); add_compiled_collation(&my_charset_ucs2_icelandic_uca_ci);
add_compiled_collation(&my_charset_ucs2_latvian_uca_ci); add_compiled_collation(&my_charset_ucs2_latvian_uca_ci);
add_compiled_collation(&my_charset_ucs2_romanian_uca_ci); add_compiled_collation(&my_charset_ucs2_romanian_uca_ci);
...@@ -97,6 +119,11 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -97,6 +119,11 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
add_compiled_collation(&my_charset_ucs2_spanish_uca_ci); add_compiled_collation(&my_charset_ucs2_spanish_uca_ci);
add_compiled_collation(&my_charset_ucs2_swedish_uca_ci); add_compiled_collation(&my_charset_ucs2_swedish_uca_ci);
add_compiled_collation(&my_charset_ucs2_turkish_uca_ci); add_compiled_collation(&my_charset_ucs2_turkish_uca_ci);
add_compiled_collation(&my_charset_ucs2_czech_uca_ci);
add_compiled_collation(&my_charset_ucs2_danish_uca_ci);
add_compiled_collation(&my_charset_ucs2_lithuanian_uca_ci);
add_compiled_collation(&my_charset_ucs2_slovak_uca_ci);
add_compiled_collation(&my_charset_ucs2_spanish2_uca_ci);
#endif #endif
#ifdef HAVE_CHARSET_ujis #ifdef HAVE_CHARSET_ujis
...@@ -107,6 +134,21 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused))) ...@@ -107,6 +134,21 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
#ifdef HAVE_CHARSET_utf8 #ifdef HAVE_CHARSET_utf8
add_compiled_collation(&my_charset_utf8_general_ci); add_compiled_collation(&my_charset_utf8_general_ci);
add_compiled_collation(&my_charset_utf8_bin); add_compiled_collation(&my_charset_utf8_bin);
add_compiled_collation(&my_charset_utf8_general_uca_ci);
add_compiled_collation(&my_charset_utf8_icelandic_uca_ci);
add_compiled_collation(&my_charset_utf8_latvian_uca_ci);
add_compiled_collation(&my_charset_utf8_romanian_uca_ci);
add_compiled_collation(&my_charset_utf8_slovenian_uca_ci);
add_compiled_collation(&my_charset_utf8_polish_uca_ci);
add_compiled_collation(&my_charset_utf8_estonian_uca_ci);
add_compiled_collation(&my_charset_utf8_spanish_uca_ci);
add_compiled_collation(&my_charset_utf8_swedish_uca_ci);
add_compiled_collation(&my_charset_utf8_turkish_uca_ci);
add_compiled_collation(&my_charset_utf8_czech_uca_ci);
add_compiled_collation(&my_charset_utf8_danish_uca_ci);
add_compiled_collation(&my_charset_utf8_lithuanian_uca_ci);
add_compiled_collation(&my_charset_utf8_slovak_uca_ci);
add_compiled_collation(&my_charset_utf8_spanish2_uca_ci);
#endif #endif
/* Copy compiled charsets */ /* Copy compiled charsets */
......
...@@ -469,7 +469,6 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags) ...@@ -469,7 +469,6 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags)
} }
cs= (cs->state & MY_CS_AVAILABLE) ? cs : NULL; cs= (cs->state & MY_CS_AVAILABLE) ? cs : NULL;
} }
pthread_mutex_unlock(&THR_LOCK_charset);
if (cs && !(cs->state & MY_CS_READY)) if (cs && !(cs->state & MY_CS_READY))
{ {
if ((cs->cset->init && cs->cset->init(cs, cs_alloc)) || if ((cs->cset->init && cs->cset->init(cs, cs_alloc)) ||
...@@ -478,6 +477,7 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags) ...@@ -478,6 +477,7 @@ static CHARSET_INFO *get_internal_charset(uint cs_number, myf flags)
else else
cs->state|= MY_CS_READY; cs->state|= MY_CS_READY;
} }
pthread_mutex_unlock(&THR_LOCK_charset);
return cs; return cs;
} }
......
...@@ -21,13 +21,11 @@ int mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length, ...@@ -21,13 +21,11 @@ int mi_compare_text(CHARSET_INFO *charset_info, uchar *a, uint a_length,
uchar *b, uint b_length, my_bool part_key, uchar *b, uint b_length, my_bool part_key,
my_bool skip_end_space) my_bool skip_end_space)
{ {
if (part_key && b_length < a_length)
a_length=b_length;
if (skip_end_space) if (skip_end_space)
return charset_info->coll->strnncollsp(charset_info, a, a_length, return charset_info->coll->strnncollsp(charset_info, a, a_length,
b, b_length); b, b_length);
return charset_info->coll->strnncoll(charset_info, a, a_length, return charset_info->coll->strnncoll(charset_info, a, a_length,
b, b_length); b, b_length, part_key);
} }
......
SUBDIRS = src tools . include $(ndb_opt_test_subdirs) SUBDIRS = src tools . include @ndb_opt_subdirs@
DIST_SUBDIRS = src tools include test docs
EXTRA_DIST = config EXTRA_DIST = config
include $(top_srcdir)/ndb/config/common.mk.am include $(top_srcdir)/ndb/config/common.mk.am
......
#!/bin/sh
if [ -z "$MYSQLCLUSTER_TOP" -o ! -d "$MYSQLCLUSTER_TOP" ]; then
echo "MYSQLCLUSTER_TOP not set or directory does not exist"
exit 1
fi
if [ -z "$MYSQLCLUSTER_TOP" -o ! -d "$MYSQLCLUSTER_TOP/ndb" ]; then
echo "$MYSQLCLUSTER_TOP/ndb directory does not exist"
exit 1
fi
mysql --socket=$MYSQLCLUSTER_TOP/data/mysqlcluster.sock $*
This diff is collapsed.
This diff is collapsed.
...@@ -9,5 +9,4 @@ mgmapiincludedir = "$(pkgincludedir)/ndb/mgmapi" ...@@ -9,5 +9,4 @@ mgmapiincludedir = "$(pkgincludedir)/ndb/mgmapi"
INCLUDES = $(INCLUDES_LOC) INCLUDES = $(INCLUDES_LOC)
LDADD = $(top_srcdir)/ndb/src/common/portlib/gcc.cpp $(LDADD_LOC) LDADD = $(top_srcdir)/ndb/src/common/portlib/gcc.cpp $(LDADD_LOC)
DEFS = @DEFS@ @NDB_DEFS@ $(DEFS_LOC) $(NDB_EXTRA_FLAGS) DEFS = @DEFS@ @NDB_DEFS@ $(DEFS_LOC) $(NDB_EXTRA_FLAGS)
# ndb cannot be compiled with -fno-implicit-templaces NDB_CXXFLAGS=@ndb_cxxflags_fix@ $(NDB_CXXFLAGS_LOC)
NDB_CXXFLAGS=-fimplicit-templates
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment