Merge
sql/item.cc: Auto merged sql/item_func.cc: Auto merged sql/protocol.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/table.cc: Auto merged tests/mysql_client_test.c: Auto merged BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
This commit is contained in:
commit
ed7ad40523
@ -48,8 +48,8 @@ global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wch
|
||||
c_warnings="$global_warnings -Wunused"
|
||||
cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
|
||||
|
||||
base_max_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio"
|
||||
max_leave_isam_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-federated-storage-engine --with-raid --with-openssl --with-raid --with-vio --with-embedded-server"
|
||||
base_max_configs="--with-innodb --with-berkeley-db --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio"
|
||||
max_leave_isam_configs="--with-innodb --with-berkeley-db --with-ndbcluster --with-archive-storage-engine --with-federated-storage-engine --with-raid --with-openssl --with-raid --with-vio --with-embedded-server"
|
||||
max_no_es_configs="$max_leave_isam_configs --without-isam"
|
||||
max_configs="$max_no_es_configs --with-embedded-server"
|
||||
|
||||
|
@ -27,6 +27,7 @@ bar@deer.(none)
|
||||
bar@gw.udmsearch.izhnet.ru
|
||||
bar@mysql.com
|
||||
bar@noter.intranet.mysql.r18.ru
|
||||
bell@51.0.168.192.in-addr.arpa
|
||||
bell@laptop.sanja.is.com.ua
|
||||
bell@sanja.is.com.ua
|
||||
bk@admin.bk
|
||||
@ -38,6 +39,7 @@ brian@zim.(none)
|
||||
carsten@tsort.bitbybit.dk
|
||||
cps@silver_beast.(none)
|
||||
davida@isil.mysql.com
|
||||
dean@mysql.com
|
||||
dellis@goetia.(none)
|
||||
dlenev@brandersnatch.localdomain
|
||||
dlenev@build.mysql.com
|
||||
@ -154,6 +156,7 @@ mronstrom@mysql.com
|
||||
mskold@bk-internal.mysql.com
|
||||
mskold@mysql.com
|
||||
msvensson@build.mysql.com
|
||||
msvensson@neptunus.(none)
|
||||
msvensson@neptunus.homeip.net
|
||||
mwagner@cash.mwagner.org
|
||||
mwagner@evoq.mwagner.org
|
||||
@ -222,6 +225,7 @@ serg@sergbook.mysql.com
|
||||
sergefp@mysql.com
|
||||
sinisa@rhols221.adsl.netsonic.fi
|
||||
stewart@mysql.com
|
||||
svoj@mysql.com
|
||||
tfr@beta.frontier86.ee
|
||||
tfr@indrek.tfr.cafe.ee
|
||||
tfr@sarvik.tfr.cafe.ee
|
||||
|
@ -19,15 +19,28 @@ BK_STATUS=$BK_STATUS$BK_COMMIT
|
||||
if [ "$BK_STATUS" = OK ]
|
||||
then
|
||||
|
||||
HAS_ACTUAL_CHANGES=`bk cset -r+ -d | grep -v "^#"`
|
||||
if [ "$HAS_ACTUAL_CHANGES" = "" ]
|
||||
then
|
||||
echo ChangeSet had no real changes, not sending emails
|
||||
exit
|
||||
fi
|
||||
|
||||
CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
|
||||
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/ BUG#\1/p'`
|
||||
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'`
|
||||
WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'`
|
||||
|
||||
if [ "$BUG" = "" ]
|
||||
then
|
||||
TO=dev-public@mysql.com
|
||||
BS=""
|
||||
BH=""
|
||||
else
|
||||
TO=dev-bugs@mysql.com
|
||||
BS=" BUG#$BUG"
|
||||
# need newline here
|
||||
BH="X-Bug: $BUG
|
||||
"
|
||||
fi
|
||||
#++
|
||||
# dev-public@ / dev-bugs@
|
||||
@ -38,8 +51,8 @@ fi
|
||||
List-ID: <bk.mysql-$VERSION>
|
||||
From: $FROM
|
||||
To: $TO
|
||||
Subject: bk commit - $VERSION tree ($CHANGESET)${BUG}${WL}
|
||||
|
||||
Subject: bk commit - $VERSION tree ($CHANGESET)${BS}${WL}
|
||||
$BH
|
||||
EOF
|
||||
bk changes -v -r+
|
||||
bk cset -r+ -d
|
||||
@ -54,14 +67,14 @@ EOF
|
||||
List-ID: <bk.mysql-$VERSION>
|
||||
From: $FROM
|
||||
To: $INTERNALS
|
||||
Subject: bk commit into $VERSION tree ($CHANGESET)
|
||||
|
||||
Subject: bk commit into $VERSION tree ($CHANGESET)$BS
|
||||
$BH
|
||||
Below is the list of changes that have just been committed into a local
|
||||
$VERSION repository of $USER. When $USER does a push these changes will
|
||||
be propagated to the main repository and, within 24 hours after the
|
||||
push, to the public repository.
|
||||
For information on how to access the public repository
|
||||
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
|
||||
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
|
||||
|
||||
EOF
|
||||
bk changes -v -r+
|
||||
@ -81,7 +94,7 @@ EOF
|
||||
List-ID: <bk.mysql-$VERSION>
|
||||
From: $FROM
|
||||
To: $DOCS
|
||||
Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)
|
||||
Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)$BS
|
||||
|
||||
EOF
|
||||
bk changes -v -r+
|
||||
|
@ -811,7 +811,7 @@ sub find
|
||||
sub rm_all
|
||||
{
|
||||
my(@rm_files)=@_;
|
||||
my($dir,$current_dir,@files,@dirs);
|
||||
my($dir,$current_dir,@files,@dirs,$removed);
|
||||
$current_dir = `pwd`; chomp($current_dir);
|
||||
|
||||
foreach $dir (@rm_files)
|
||||
@ -835,7 +835,9 @@ sub rm_all
|
||||
}
|
||||
if ($#files >= 0)
|
||||
{
|
||||
system("rm -f " . join(" ",@files)) && abort("Can't remove files from $dir");
|
||||
$removed= unlink @files;
|
||||
print "rm_all : removed $removed files in $current_dir/$dir\n" if ($opt_debug);
|
||||
abort("Can't remove all $#files+1 from $current_dir/$dir, just $removed") if $removed != $#files+1;
|
||||
}
|
||||
foreach $dir (@dirs)
|
||||
{
|
||||
|
85
Build-tools/Do-hpux-depot
Executable file
85
Build-tools/Do-hpux-depot
Executable file
@ -0,0 +1,85 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
#
|
||||
# By Matt Wagner <matt@mysql.com> 2005
|
||||
#
|
||||
# This script generates HP Depot packages for MySQL Server.
|
||||
# It basically repackages a binary tarball as a depot.
|
||||
#
|
||||
# Usage: ./Do-hpux-depot <untarred-binary-tarball>
|
||||
#
|
||||
|
||||
$fullname = shift @ARGV;
|
||||
$fullname or die "No package name was specified";
|
||||
-d $fullname or die "That directory is not present!";
|
||||
|
||||
$fullname =~ s,/+$,,; # Remove ending slash if any
|
||||
|
||||
chomp($pwd= `pwd`);
|
||||
|
||||
%title= (
|
||||
"mysql-standard" => "MySQL Community Edition - Standard (GPL)",
|
||||
"mysql-debug" => "MySQL Community Edition - Debug (GPL)",
|
||||
"mysql-max" => "MySQL Community Edition - Experimental (GPL)",
|
||||
"mysql-pro" => "MySQL Pro (Commercial)",
|
||||
"mysql-classic" => "MySQL Classic (Commercial)",
|
||||
"mysql-cluster" => "MySQL Cluster (Commercial)",
|
||||
);
|
||||
|
||||
%architecture= (
|
||||
"hpux11.23" => "HP-UX_B.11.23",
|
||||
"hpux11.11" => "HP-UX_B.11.11",
|
||||
"hpux11.00" => "HP-UX_B.11.00",
|
||||
);
|
||||
|
||||
%os_release= (
|
||||
"hpux11.23" => "?.11.2?",
|
||||
"hpux11.11" => "?.11.1?",
|
||||
"hpux11.00" => "?.11.0?",
|
||||
);
|
||||
|
||||
%machine_type= (
|
||||
"ia64" => "ia64*",
|
||||
"hppa2.0w" => "9000/*",
|
||||
);
|
||||
|
||||
$fullname =~ m/^(mysql-\w+)-([\d\.]+)-hp-(hpux11\.\d\d)-(hppa2\.0w|(ia64))-?(64bit)?$/;
|
||||
|
||||
# print "title: $1\n";
|
||||
# print "version: $2\n";
|
||||
# print "os: $3\n";
|
||||
# print "cpu: $4\n";
|
||||
# print "64: $6\n";
|
||||
|
||||
$cpu64= ($6 ne "") ? "_64" : "";
|
||||
|
||||
open (PSF,">${fullname}.psf") or die "Unable to write PSF file ($!)\n";
|
||||
|
||||
print PSF <<EOF;
|
||||
product
|
||||
tag $1
|
||||
vendor_tag "MySQL_AB"
|
||||
title "$title{$1}"
|
||||
description "MySQL Database Server and Clients"
|
||||
revision $2
|
||||
|
||||
architecture $architecture{$3}$cpu64
|
||||
machine_type $machine_type{$4}
|
||||
os_name HP-UX
|
||||
os_release $os_release{$3}
|
||||
directory /usr/local
|
||||
|
||||
fileset
|
||||
tag all
|
||||
revision $2
|
||||
directory $fullname=/usr/local/$fullname
|
||||
file_permissions -u 222 -g bin -o bin
|
||||
file *
|
||||
end
|
||||
end
|
||||
EOF
|
||||
|
||||
close(PSF);
|
||||
|
||||
system("/usr/sbin/swpackage -v -d \"|gzip -c > $fullname.depot.gz\" -x target_type=tape -s ${pwd}/${fullname}.psf");
|
||||
|
@ -344,6 +344,10 @@ SOURCE=..\mysys\my_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mysys\my_decimal.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mysys\my_getopt.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -1085,6 +1085,10 @@ SOURCE=.\mf_iocache.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_decimal.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_time.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -177,6 +177,10 @@ SOURCE=.\ctype.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\decimal.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\int2str.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -66,18 +66,18 @@ LINK32=link.exe
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
|
||||
# ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
|
||||
# ADD BASE MTL /nologo /tlb".\Release\client_test.tlb" /win32
|
||||
# ADD MTL /nologo /tlb".\Release\client_test.tlb" /win32
|
||||
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
|
||||
# ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
|
||||
# ADD BASE MTL /nologo /tlb".\Release\mysql_client_test.tlb" /win32
|
||||
# ADD MTL /nologo /tlb".\Release\mysql_client_test.tlb" /win32
|
||||
# ADD BASE RSC /l 1033
|
||||
# ADD RSC /l 1033
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\client_test.exe" /incremental:no /pdb:".\Release\client_test.pdb" /pdbtype:sept /subsystem:console
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\client_test.exe" /incremental:no /pdb:".\Release\client_test.pdb" /pdbtype:sept /subsystem:console
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
@ -1100,7 +1100,7 @@ at offset %lu ; this could be a log format error or read error",
|
||||
/* EOF can't be hit here normally, so it's a real error */
|
||||
die("Could not read a Rotate_log_event event \
|
||||
at offset %lu ; this could be a log format error or read error",
|
||||
tmp_pos);
|
||||
tmp_pos);
|
||||
}
|
||||
else
|
||||
break;
|
||||
@ -1130,15 +1130,15 @@ static int dump_local_log_entries(const char* logname)
|
||||
}
|
||||
check_header(file, &description_event);
|
||||
}
|
||||
else // reading from stdin; TODO: check that it works
|
||||
else // reading from stdin;
|
||||
{
|
||||
if (init_io_cache(file, fileno(result_file), 0, READ_CACHE, (my_off_t) 0,
|
||||
if (init_io_cache(file, fileno(stdin), 0, READ_CACHE, (my_off_t) 0,
|
||||
0, MYF(MY_WME | MY_NABP | MY_DONT_CHECK_FILESIZE)))
|
||||
return 1;
|
||||
check_header(file, &description_event);
|
||||
if (start_position)
|
||||
{
|
||||
/* skip 'start_position' characters from stdout */
|
||||
/* skip 'start_position' characters from stdin */
|
||||
byte buff[IO_SIZE];
|
||||
my_off_t length,tmp;
|
||||
for (length= start_position_mot ; length > 0 ; length-=tmp)
|
||||
@ -1151,8 +1151,6 @@ static int dump_local_log_entries(const char* logname)
|
||||
}
|
||||
}
|
||||
}
|
||||
file->pos_in_file= start_position_mot;
|
||||
file->seek_not_done=0;
|
||||
}
|
||||
|
||||
if (!description_event || !description_event->is_valid())
|
||||
@ -1171,9 +1169,15 @@ static int dump_local_log_entries(const char* logname)
|
||||
Log_event* ev = Log_event::read_log_event(file, description_event);
|
||||
if (!ev)
|
||||
{
|
||||
if (file->error)
|
||||
/*
|
||||
if binlog wasn't closed properly ("in use" flag is set) don't complain
|
||||
about a corruption, but treat it as EOF and move to the next binlog.
|
||||
*/
|
||||
if (description_event->flags & LOG_EVENT_BINLOG_IN_USE_F)
|
||||
file->error= 0;
|
||||
else if (file->error)
|
||||
{
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"Could not read entry at offset %s:"
|
||||
"Error in log format or read error\n",
|
||||
llstr(old_off,llbuff));
|
||||
|
@ -253,6 +253,7 @@ VAR var_reg[10];
|
||||
/*Perl/shell-like variable registers */
|
||||
HASH var_hash;
|
||||
my_bool disable_query_log=0, disable_result_log=0, disable_warnings=0;
|
||||
my_bool disable_ps_warnings= 0;
|
||||
my_bool disable_info= 1; /* By default off */
|
||||
my_bool abort_on_error= 1;
|
||||
|
||||
@ -283,6 +284,7 @@ Q_ENABLE_RESULT_LOG, Q_DISABLE_RESULT_LOG,
|
||||
Q_SERVER_START, Q_SERVER_STOP,Q_REQUIRE_MANAGER,
|
||||
Q_WAIT_FOR_SLAVE_TO_STOP,
|
||||
Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS,
|
||||
Q_ENABLE_PS_WARNINGS, Q_DISABLE_PS_WARNINGS,
|
||||
Q_ENABLE_INFO, Q_DISABLE_INFO,
|
||||
Q_ENABLE_METADATA, Q_DISABLE_METADATA,
|
||||
Q_EXEC, Q_DELIMITER,
|
||||
@ -360,6 +362,8 @@ const char *command_names[]=
|
||||
"wait_for_slave_to_stop",
|
||||
"enable_warnings",
|
||||
"disable_warnings",
|
||||
"enable_ps_warnings",
|
||||
"disable_ps_warnings",
|
||||
"enable_info",
|
||||
"disable_info",
|
||||
"enable_metadata",
|
||||
@ -3021,7 +3025,8 @@ static int run_query_stmt(MYSQL *mysql, struct st_query *q, int flags)
|
||||
|
||||
/* We may have got warnings already, collect them if any */
|
||||
/* FIXME we only want this if the statement succeeds I think */
|
||||
run_query_stmt_handle_warnings(mysql, ds);
|
||||
if (!disable_ps_warnings)
|
||||
run_query_stmt_handle_warnings(mysql, ds);
|
||||
|
||||
/*
|
||||
No need to call mysql_stmt_bind_param() because we have no
|
||||
@ -3711,6 +3716,8 @@ int main(int argc, char **argv)
|
||||
case Q_DISABLE_RESULT_LOG: disable_result_log=1; break;
|
||||
case Q_ENABLE_WARNINGS: disable_warnings=0; break;
|
||||
case Q_DISABLE_WARNINGS: disable_warnings=1; break;
|
||||
case Q_ENABLE_PS_WARNINGS: disable_ps_warnings=0; break;
|
||||
case Q_DISABLE_PS_WARNINGS: disable_ps_warnings=1; break;
|
||||
case Q_ENABLE_INFO: disable_info=0; break;
|
||||
case Q_DISABLE_INFO: disable_info=1; break;
|
||||
case Q_ENABLE_METADATA: display_metadata=1; break;
|
||||
|
@ -311,7 +311,7 @@ rl_generic_bind (type, keyseq, data, map)
|
||||
mapped to something, `abc' to be mapped to something else,
|
||||
and the function bound to `a' to be executed when the user
|
||||
types `abx', leaving `bx' in the input queue. */
|
||||
if (k.function /* && k.type == ISFUNC */)
|
||||
if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR))
|
||||
{
|
||||
map[ANYOTHERKEY] = k;
|
||||
k.function = 0;
|
||||
|
25
configure.in
25
configure.in
@ -56,28 +56,6 @@ czech danish dutch english estonian french german greek hungarian \
|
||||
italian japanese korean norwegian norwegian-ny polish portuguese \
|
||||
romanian russian serbian slovak spanish swedish ukrainian"
|
||||
|
||||
|
||||
# Generate make rules for all error messages
|
||||
AVAILABLE_LANGUAGES_ERRORS=
|
||||
AVAILABLE_LANGUAGES_ERRORS_RULES=$srcdir/ac_available_languages_fragment
|
||||
rm -f $AVAILABLE_LANGUAGES_ERRORS_RULES
|
||||
for i in $AVAILABLE_LANGUAGES
|
||||
do
|
||||
AVAILABLE_LANGUAGES_ERRORS="$AVAILABLE_LANGUAGES_ERRORS $i/errmsg.sys"
|
||||
case $host_os in
|
||||
netware*)
|
||||
echo "$i/errmsg.sys: $i/errmsg.txt
|
||||
\$(top_builddir)/extra/comp_err.linux -C\$(srcdir)/charsets/ $i/errmsg.txt $i/errmsg.sys" \
|
||||
>> $AVAILABLE_LANGUAGES_ERRORS_RULES
|
||||
;;
|
||||
*)
|
||||
echo "$i/errmsg.sys: $i/errmsg.txt
|
||||
\$(top_builddir)/extra/comp_err -C\$(srcdir)/charsets/ $i/errmsg.txt $i/errmsg.sys" \
|
||||
>> $AVAILABLE_LANGUAGES_ERRORS_RULES
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
#####
|
||||
#####
|
||||
|
||||
@ -93,7 +71,6 @@ AC_DEFINE_UNQUOTED([DOT_FRM_VERSION], [$DOT_FRM_VERSION],
|
||||
AC_SUBST(SHARED_LIB_VERSION)
|
||||
AC_SUBST(AVAILABLE_LANGUAGES)
|
||||
AC_SUBST(AVAILABLE_LANGUAGES_ERRORS)
|
||||
AC_SUBST_FILE(AVAILABLE_LANGUAGES_ERRORS_RULES)
|
||||
|
||||
AC_SUBST([NDB_VERSION_MAJOR])
|
||||
AC_SUBST([NDB_VERSION_MINOR])
|
||||
@ -1910,7 +1887,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
|
||||
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
|
||||
getpwuid getrlimit getrusage getwd gmtime_r index initgroups isnan \
|
||||
localtime_r locking longjmp lrand48 madvise mallinfo memcpy memmove \
|
||||
mkstemp mlockall perror poll pread pthread_attr_create mmap \
|
||||
mkstemp mlockall perror poll pread pthread_attr_create mmap getpagesize \
|
||||
pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
|
||||
pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
|
||||
pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
|
||||
|
@ -376,8 +376,8 @@ static REP_SET *make_new_set(REP_SETS *sets);
|
||||
static void make_sets_invisible(REP_SETS *sets);
|
||||
static void free_last_set(REP_SETS *sets);
|
||||
static void free_sets(REP_SETS *sets);
|
||||
static void set_bit(REP_SET *set, uint bit);
|
||||
static void clear_bit(REP_SET *set, uint bit);
|
||||
static void internal_set_bit(REP_SET *set, uint bit);
|
||||
static void internal_clear_bit(REP_SET *set, uint bit);
|
||||
static void or_bits(REP_SET *to,REP_SET *from);
|
||||
static void copy_bits(REP_SET *to,REP_SET *from);
|
||||
static int cmp_bits(REP_SET *set1,REP_SET *set2);
|
||||
@ -454,7 +454,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
{
|
||||
if (from[i][0] == '\\' && from[i][1] == '^')
|
||||
{
|
||||
set_bit(start_states,states+1);
|
||||
internal_set_bit(start_states,states+1);
|
||||
if (!from[i][2])
|
||||
{
|
||||
start_states->table_offset=i;
|
||||
@ -463,8 +463,8 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
}
|
||||
else if (from[i][0] == '\\' && from[i][1] == '$')
|
||||
{
|
||||
set_bit(start_states,states);
|
||||
set_bit(word_states,states);
|
||||
internal_set_bit(start_states,states);
|
||||
internal_set_bit(word_states,states);
|
||||
if (!from[i][2] && start_states->table_offset == (uint) ~0)
|
||||
{
|
||||
start_states->table_offset=i;
|
||||
@ -473,11 +473,11 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
}
|
||||
else
|
||||
{
|
||||
set_bit(word_states,states);
|
||||
internal_set_bit(word_states,states);
|
||||
if (from[i][0] == '\\' && (from[i][1] == 'b' && from[i][2]))
|
||||
set_bit(start_states,states+1);
|
||||
internal_set_bit(start_states,states+1);
|
||||
else
|
||||
set_bit(start_states,states);
|
||||
internal_set_bit(start_states,states);
|
||||
}
|
||||
for (pos=from[i], len=0; *pos ; pos++)
|
||||
{
|
||||
@ -583,9 +583,9 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
follow[i].len > found_end)
|
||||
found_end=follow[i].len;
|
||||
if (chr && follow[i].chr)
|
||||
set_bit(new_set,i+1); /* To next set */
|
||||
internal_set_bit(new_set,i+1); /* To next set */
|
||||
else
|
||||
set_bit(new_set,i);
|
||||
internal_set_bit(new_set,i);
|
||||
}
|
||||
}
|
||||
if (found_end)
|
||||
@ -602,7 +602,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
||||
if (follow[bit_nr-1].len < found_end ||
|
||||
(new_set->found_len &&
|
||||
(chr == 0 || !follow[bit_nr].chr)))
|
||||
clear_bit(new_set,i);
|
||||
internal_clear_bit(new_set,i);
|
||||
else
|
||||
{
|
||||
if (chr == 0 || !follow[bit_nr].chr)
|
||||
@ -751,13 +751,13 @@ static void free_sets(REP_SETS *sets)
|
||||
return;
|
||||
}
|
||||
|
||||
static void set_bit(REP_SET *set, uint bit)
|
||||
static void internal_set_bit(REP_SET *set, uint bit)
|
||||
{
|
||||
set->bits[bit / WORD_BIT] |= 1 << (bit % WORD_BIT);
|
||||
return;
|
||||
}
|
||||
|
||||
static void clear_bit(REP_SET *set, uint bit)
|
||||
static void internal_clear_bit(REP_SET *set, uint bit)
|
||||
{
|
||||
set->bits[bit / WORD_BIT] &= ~ (1 << (bit % WORD_BIT));
|
||||
return;
|
||||
|
@ -31,18 +31,25 @@ functions */
|
||||
|
||||
#define HAVE_SMEM 1
|
||||
|
||||
#if defined(__NT__)
|
||||
#define SYSTEM_TYPE "NT"
|
||||
#elif defined(__WIN2000__)
|
||||
#define SYSTEM_TYPE "WIN2000"
|
||||
#if defined(_WIN64) || defined(WIN64)
|
||||
#define SYSTEM_TYPE "Win64"
|
||||
#elif defined(_WIN32) || defined(WIN32)
|
||||
#define SYSTEM_TYPE "Win32"
|
||||
#else
|
||||
#define SYSTEM_TYPE "Win95/Win98"
|
||||
#define SYSTEM_TYPE "Windows"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64) || defined(WIN64)
|
||||
#define MACHINE_TYPE "ia64" /* Define to machine type name */
|
||||
#if defined(_M_IA64)
|
||||
#define MACHINE_TYPE "ia64"
|
||||
#elif defined(_M_IX86)
|
||||
#define MACHINE_TYPE "ia32"
|
||||
#elif defined(_M_ALPHA)
|
||||
#define MACHINE_TYPE "axp"
|
||||
#else
|
||||
#define MACHINE_TYPE "i32" /* Define to machine type name */
|
||||
#define MACHINE_TYPE "unknown" /* Define to machine type name */
|
||||
#endif
|
||||
|
||||
#if !(defined(_WIN64) || defined(WIN64))
|
||||
#ifndef _WIN32
|
||||
#define _WIN32 /* Compatible with old source */
|
||||
#endif
|
||||
@ -346,6 +353,8 @@ inline double ulonglong2double(ulonglong value)
|
||||
|
||||
#define DO_NOT_REMOVE_THREAD_WRAPPERS
|
||||
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
|
||||
#define thread_safe_decrement(V,L) InterlockedDecrement((long*) &(V))
|
||||
#define thread_safe_dec_and_test(V, L) thread_safe_decrement(V,L)
|
||||
/* The following is only used for statistics, so it should be good enough */
|
||||
#ifdef __NT__ /* This should also work on Win98 but .. */
|
||||
#define thread_safe_add(V,C,L) InterlockedExchangeAdd((long*) &(V),(C))
|
||||
@ -359,6 +368,7 @@ inline double ulonglong2double(ulonglong value)
|
||||
#define statistic_add(V,C,L) (V)+=(C)
|
||||
#endif
|
||||
#define statistic_increment(V,L) thread_safe_increment((V),(L))
|
||||
#define statistic_decrement(V,L) thread_safe_decrement((V),(L))
|
||||
|
||||
#define shared_memory_buffer_length 16000
|
||||
#define default_shared_memory_base_name "MYSQL"
|
||||
|
@ -17,7 +17,9 @@
|
||||
#ifndef _decimal_h
|
||||
#define _decimal_h
|
||||
|
||||
typedef enum {TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR} decimal_round_mode;
|
||||
typedef enum
|
||||
{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
|
||||
decimal_round_mode;
|
||||
typedef int32 decimal_digit;
|
||||
|
||||
typedef struct st_decimal {
|
||||
@ -26,11 +28,10 @@ typedef struct st_decimal {
|
||||
decimal_digit *buf;
|
||||
} decimal;
|
||||
|
||||
int internal_str2dec(const char *from, decimal *to, char **end, my_bool fixed);
|
||||
int decimal2string(decimal *from, char *to, int *to_len,
|
||||
int fixed_precision, int fixed_decimals,
|
||||
char filler);
|
||||
int string2decimal(char *from, decimal *to, char **end);
|
||||
int string2decimal_fixed(char *from, decimal *to, char **end);
|
||||
int decimal2ulonglong(decimal *from, ulonglong *to);
|
||||
int ulonglong2decimal(ulonglong from, decimal *to);
|
||||
int decimal2longlong(decimal *from, longlong *to);
|
||||
@ -51,10 +52,14 @@ int decimal_cmp(decimal *from1, decimal *from2);
|
||||
int decimal_mul(decimal *from1, decimal *from2, decimal *to);
|
||||
int decimal_div(decimal *from1, decimal *from2, decimal *to, int scale_incr);
|
||||
int decimal_mod(decimal *from1, decimal *from2, decimal *to);
|
||||
int decimal_round(decimal *from, decimal *to, int new_scale, decimal_round_mode mode);
|
||||
int decimal_round(decimal *from, decimal *to, int new_scale,
|
||||
decimal_round_mode mode);
|
||||
int decimal_is_zero(decimal *from);
|
||||
void max_decimal(int precision, int frac, decimal *to);
|
||||
|
||||
#define string2decimal(A,B,C) internal_str2dec((A), (B), (C), 0)
|
||||
#define string2decimal_fixed(A,B,C) internal_str2dec((A), (B), (C), 1)
|
||||
|
||||
/* set a decimal to zero */
|
||||
|
||||
#define decimal_make_zero(dec) do { \
|
||||
|
@ -761,7 +761,7 @@ typedef long int32;
|
||||
#endif
|
||||
typedef unsigned long uint32; /* Short for unsigned integer >= 32 bits */
|
||||
#else
|
||||
error "Neither int or long is of 4 bytes width"
|
||||
#error "Neither int or long is of 4 bytes width"
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_ULONG) && !defined(HAVE_LINUXTHREADS) && !defined(__USE_MISC)
|
||||
|
@ -637,7 +637,7 @@ extern int pthread_dummy(int);
|
||||
MySQL can survive with 32K, but some glibc libraries require > 128K stack
|
||||
To resolve hostnames
|
||||
*/
|
||||
#define DEFAULT_THREAD_STACK (192*1024L)
|
||||
#define DEFAULT_THREAD_STACK (256*1024L)
|
||||
#else
|
||||
#define DEFAULT_THREAD_STACK (192*1024)
|
||||
#endif
|
||||
@ -689,12 +689,12 @@ extern pthread_t shutdown_th, main_th, signal_th;
|
||||
#define thread_safe_add(V,C,L) (pthread_mutex_lock((L)), (V)+=(C), pthread_mutex_unlock((L)))
|
||||
#define thread_safe_sub(V,C,L) \
|
||||
(pthread_mutex_lock((L)), (V)-=(C), pthread_mutex_unlock((L)))
|
||||
#if defined (__GNUC__) || defined (__cplusplus)
|
||||
static inline bool thread_safe_dec_and_test(ulong V, pthread_mutex_t *L)
|
||||
#ifdef __cplusplus
|
||||
static inline bool thread_safe_dec_and_test(ulong &V, pthread_mutex_t *L)
|
||||
{
|
||||
ulong res;
|
||||
pthread_mutex_lock(L);
|
||||
res=V--;
|
||||
res=--V;
|
||||
pthread_mutex_unlock(L);
|
||||
return res==0;
|
||||
}
|
||||
|
@ -811,7 +811,8 @@ my_bool my_gethwaddr(uchar *to);
|
||||
/* not a complete set of mmap() flags, but only those that nesessary */
|
||||
#define PROT_READ 1
|
||||
#define PROT_WRITE 2
|
||||
#define MAP_NOSYNC 0x800
|
||||
#define MAP_SHARED 0x0001
|
||||
#define MAP_NOSYNC 0x0800
|
||||
#define MAP_FAILED ((void *)-1)
|
||||
#define MS_SYNC 0x0000
|
||||
|
||||
|
@ -41,58 +41,37 @@ charset-collation code for them. */
|
||||
ulint data_mysql_default_charset_coll = 99999999;
|
||||
ulint data_mysql_latin1_swedish_charset_coll = 99999999;
|
||||
|
||||
dtype_t dtype_binary_val = {DATA_BINARY, 0, 0, 0};
|
||||
dtype_t dtype_binary_val = {DATA_BINARY, 0, 0, 0, 0, 0};
|
||||
dtype_t* dtype_binary = &dtype_binary_val;
|
||||
|
||||
/*************************************************************************
|
||||
Checks if a string type has to be compared by the MySQL comparison functions.
|
||||
InnoDB internally only handles binary byte string comparisons, as well as
|
||||
latin1_swedish_ci strings. For example, UTF-8 strings have to be compared
|
||||
by MySQL. */
|
||||
|
||||
ibool
|
||||
dtype_str_needs_mysql_cmp(
|
||||
/*======================*/
|
||||
/* out: TRUE if a string type that requires
|
||||
comparison with MySQL functions */
|
||||
dtype_t* dtype) /* in: type struct */
|
||||
{
|
||||
if (dtype->mtype == DATA_MYSQL
|
||||
|| dtype->mtype == DATA_VARMYSQL
|
||||
|| (dtype->mtype == DATA_BLOB
|
||||
&& 0 == (dtype->prtype & DATA_BINARY_TYPE)
|
||||
&& dtype_get_charset_coll(dtype->prtype) !=
|
||||
data_mysql_latin1_swedish_charset_coll)) {
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
For the documentation of this function, see innobase_get_at_most_n_mbchars()
|
||||
in ha_innodb.cc. */
|
||||
Determine how many bytes the first n characters of the given string occupy.
|
||||
If the string is shorter than n characters, returns the number of bytes
|
||||
the characters in the string occupy. */
|
||||
|
||||
ulint
|
||||
dtype_get_at_most_n_mbchars(
|
||||
/*========================*/
|
||||
dtype_t* dtype,
|
||||
ulint prefix_len,
|
||||
ulint data_len,
|
||||
const char* str)
|
||||
/* out: length of the prefix,
|
||||
in bytes */
|
||||
const dtype_t* dtype, /* in: data type */
|
||||
ulint prefix_len, /* in: length of the requested
|
||||
prefix, in characters, multiplied by
|
||||
dtype_get_mbmaxlen(dtype) */
|
||||
ulint data_len, /* in: length of str (in bytes) */
|
||||
const char* str) /* in: the string whose prefix
|
||||
length is being determined */
|
||||
{
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
ut_a(data_len != UNIV_SQL_NULL);
|
||||
ut_a(!(prefix_len % dtype->mbmaxlen));
|
||||
|
||||
if (dtype_str_needs_mysql_cmp(dtype)) {
|
||||
if (dtype->mbminlen != dtype->mbmaxlen) {
|
||||
return(innobase_get_at_most_n_mbchars(
|
||||
dtype_get_charset_coll(dtype->prtype),
|
||||
prefix_len, data_len, str));
|
||||
}
|
||||
|
||||
/* We assume here that the string types that InnoDB itself can compare
|
||||
are single-byte charsets! */
|
||||
|
||||
if (prefix_len < data_len) {
|
||||
|
||||
return(prefix_len);
|
||||
@ -216,6 +195,8 @@ dtype_validate(
|
||||
ut_a((type->prtype & DATA_MYSQL_TYPE_MASK) < DATA_N_SYS_COLS);
|
||||
}
|
||||
|
||||
ut_a(type->mbminlen <= type->mbmaxlen);
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
@ -220,6 +220,8 @@ dict_build_table_def_step(
|
||||
const char* path_or_name;
|
||||
ibool is_path;
|
||||
mtr_t mtr;
|
||||
ulint i;
|
||||
ulint row_len;
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(mutex_own(&(dict_sys->mutex)));
|
||||
@ -231,6 +233,15 @@ dict_build_table_def_step(
|
||||
|
||||
thr_get_trx(thr)->table_id = table->id;
|
||||
|
||||
row_len = 0;
|
||||
for (i = 0; i < table->n_def; i++) {
|
||||
row_len += dtype_get_min_size(dict_col_get_type(
|
||||
&table->cols[i]));
|
||||
}
|
||||
if (row_len > BTR_PAGE_MAX_REC_SIZE) {
|
||||
return(DB_TOO_BIG_RECORD);
|
||||
}
|
||||
|
||||
if (table->type == DICT_TABLE_CLUSTER_MEMBER) {
|
||||
|
||||
cluster_table = dict_table_get_low(table->cluster_name);
|
||||
|
@ -145,28 +145,22 @@ store the charset-collation number; one byte is left unused, though */
|
||||
#define DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE 6
|
||||
|
||||
/*************************************************************************
|
||||
Checks if a string type has to be compared by the MySQL comparison functions.
|
||||
InnoDB internally only handles binary byte string comparisons, as well as
|
||||
latin1_swedish_ci strings. For example, UTF-8 strings have to be compared
|
||||
by MySQL. */
|
||||
|
||||
ibool
|
||||
dtype_str_needs_mysql_cmp(
|
||||
/*======================*/
|
||||
/* out: TRUE if a string type that requires
|
||||
comparison with MySQL functions */
|
||||
dtype_t* dtype); /* in: type struct */
|
||||
/*************************************************************************
|
||||
For the documentation of this function, see innobase_get_at_most_n_mbchars()
|
||||
in ha_innodb.cc. */
|
||||
Determine how many bytes the first n characters of the given string occupy.
|
||||
If the string is shorter than n characters, returns the number of bytes
|
||||
the characters in the string occupy. */
|
||||
|
||||
ulint
|
||||
dtype_get_at_most_n_mbchars(
|
||||
/*========================*/
|
||||
dtype_t* dtype,
|
||||
ulint prefix_len,
|
||||
ulint data_len,
|
||||
const char* str);
|
||||
/* out: length of the prefix,
|
||||
in bytes */
|
||||
const dtype_t* dtype, /* in: data type */
|
||||
ulint prefix_len, /* in: length of the requested
|
||||
prefix, in characters, multiplied by
|
||||
dtype_get_mbmaxlen(dtype) */
|
||||
ulint data_len, /* in: length of str (in bytes) */
|
||||
const char* str); /* in: the string whose prefix
|
||||
length is being determined */
|
||||
/*************************************************************************
|
||||
Checks if a data main type is a string type. Also a BLOB is considered a
|
||||
string type. */
|
||||
@ -271,6 +265,24 @@ dtype_get_prec(
|
||||
/*===========*/
|
||||
dtype_t* type);
|
||||
/*************************************************************************
|
||||
Gets the minimum length of a character, in bytes. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dtype_get_mbminlen(
|
||||
/*===============*/
|
||||
/* out: minimum length of a char, in bytes,
|
||||
or 0 if this is not a character type */
|
||||
const dtype_t* type); /* in: type */
|
||||
/*************************************************************************
|
||||
Gets the maximum length of a character, in bytes. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dtype_get_mbmaxlen(
|
||||
/*===============*/
|
||||
/* out: maximum length of a char, in bytes,
|
||||
or 0 if this is not a character type */
|
||||
const dtype_t* type); /* in: type */
|
||||
/*************************************************************************
|
||||
Gets the padding character code for the type. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
@ -288,6 +300,14 @@ dtype_get_fixed_size(
|
||||
/* out: fixed size, or 0 */
|
||||
dtype_t* type); /* in: type */
|
||||
/***************************************************************************
|
||||
Returns the minimum size of a data type. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dtype_get_min_size(
|
||||
/*===============*/
|
||||
/* out: minimum size */
|
||||
const dtype_t* type); /* in: type */
|
||||
/***************************************************************************
|
||||
Returns a stored SQL NULL size for a type. For fixed length types it is
|
||||
the fixed length of the type, otherwise 0. */
|
||||
UNIV_INLINE
|
||||
@ -352,16 +372,25 @@ dtype_print(
|
||||
/*========*/
|
||||
dtype_t* type); /* in: type */
|
||||
|
||||
/* Structure for an SQL data type */
|
||||
/* Structure for an SQL data type.
|
||||
If you add fields to this structure, be sure to initialize them everywhere.
|
||||
This structure is initialized in the following functions:
|
||||
dtype_set()
|
||||
dtype_read_for_order_and_null_size()
|
||||
dtype_new_read_for_order_and_null_size()
|
||||
sym_tab_add_null_lit() */
|
||||
|
||||
struct dtype_struct{
|
||||
ulint mtype; /* main data type */
|
||||
ulint prtype; /* precise type; MySQL data type */
|
||||
|
||||
/* the remaining two fields do not affect alphabetical ordering: */
|
||||
/* the remaining fields do not affect alphabetical ordering: */
|
||||
|
||||
ulint len; /* length */
|
||||
ulint prec; /* precision */
|
||||
|
||||
ulint mbminlen; /* minimum length of a character, in bytes */
|
||||
ulint mbmaxlen; /* maximum length of a character, in bytes */
|
||||
};
|
||||
|
||||
#ifndef UNIV_NONINL
|
||||
|
@ -9,15 +9,46 @@ Created 1/16/1996 Heikki Tuuri
|
||||
#include "mach0data.h"
|
||||
|
||||
/**********************************************************************
|
||||
Determines whether the given character set is of variable length.
|
||||
Get the variable length bounds of the given character set.
|
||||
|
||||
NOTE: the prototype of this function is copied from ha_innodb.cc! If you change
|
||||
this function, you MUST change also the prototype here! */
|
||||
extern
|
||||
ibool
|
||||
innobase_is_mb_cset(
|
||||
/*================*/
|
||||
ulint cset); /* in: MySQL charset-collation code */
|
||||
void
|
||||
innobase_get_cset_width(
|
||||
/*====================*/
|
||||
ulint cset, /* in: MySQL charset-collation code */
|
||||
ulint* mbminlen, /* out: minimum length of a char (in bytes) */
|
||||
ulint* mbmaxlen); /* out: maximum length of a char (in bytes) */
|
||||
|
||||
/*************************************************************************
|
||||
Gets the MySQL charset-collation code for MySQL string types. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dtype_get_charset_coll(
|
||||
/*===================*/
|
||||
ulint prtype) /* in: precise data type */
|
||||
{
|
||||
return((prtype >> 16) & 0xFFUL);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Sets the mbminlen and mbmaxlen members of a data type structure. */
|
||||
UNIV_INLINE
|
||||
void
|
||||
dtype_set_mblen(
|
||||
/*============*/
|
||||
dtype_t* type) /* in/out: type struct */
|
||||
{
|
||||
ut_ad(type);
|
||||
if (dtype_is_string_type(type->mtype)) {
|
||||
innobase_get_cset_width(dtype_get_charset_coll(type->prtype),
|
||||
&type->mbminlen, &type->mbmaxlen);
|
||||
ut_ad(type->mbminlen <= type->mbmaxlen);
|
||||
} else {
|
||||
type->mbminlen = type->mbmaxlen = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Sets a data type structure. */
|
||||
@ -39,6 +70,7 @@ dtype_set(
|
||||
type->len = len;
|
||||
type->prec = prec;
|
||||
|
||||
dtype_set_mblen(type);
|
||||
ut_ad(dtype_validate(type));
|
||||
}
|
||||
|
||||
@ -82,17 +114,6 @@ dtype_get_prtype(
|
||||
return(type->prtype);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Gets the MySQL charset-collation code for MySQL string types. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dtype_get_charset_coll(
|
||||
/*===================*/
|
||||
ulint prtype) /* in: precise data type */
|
||||
{
|
||||
return((prtype >> 16) & 0xFFUL);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Gets the type length. */
|
||||
UNIV_INLINE
|
||||
@ -119,6 +140,33 @@ dtype_get_prec(
|
||||
return(type->prec);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Gets the minimum length of a character, in bytes. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dtype_get_mbminlen(
|
||||
/*===============*/
|
||||
/* out: minimum length of a char, in bytes,
|
||||
or 0 if this is not a character type */
|
||||
const dtype_t* type) /* in: type */
|
||||
{
|
||||
ut_ad(type);
|
||||
return(type->mbminlen);
|
||||
}
|
||||
/*************************************************************************
|
||||
Gets the maximum length of a character, in bytes. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dtype_get_mbmaxlen(
|
||||
/*===============*/
|
||||
/* out: maximum length of a char, in bytes,
|
||||
or 0 if this is not a character type */
|
||||
const dtype_t* type) /* in: type */
|
||||
{
|
||||
ut_ad(type);
|
||||
return(type->mbmaxlen);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Gets the padding character code for the type. */
|
||||
UNIV_INLINE
|
||||
@ -211,6 +259,7 @@ dtype_read_for_order_and_null_size(
|
||||
|
||||
type->prtype = dtype_form_prtype(type->prtype,
|
||||
data_mysql_default_charset_coll);
|
||||
dtype_set_mblen(type);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
@ -262,8 +311,10 @@ dtype_new_read_for_order_and_null_size(
|
||||
|
||||
type->prtype = dtype_form_prtype(type->prtype, charset_coll);
|
||||
}
|
||||
dtype_set_mblen(type);
|
||||
}
|
||||
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
/***************************************************************************
|
||||
Returns the size of a fixed size data type, 0 if not a fixed size type. */
|
||||
UNIV_INLINE
|
||||
@ -273,7 +324,6 @@ dtype_get_fixed_size(
|
||||
/* out: fixed size, or 0 */
|
||||
dtype_t* type) /* in: type */
|
||||
{
|
||||
#ifndef UNIV_HOTBACKUP
|
||||
ulint mtype;
|
||||
|
||||
mtype = dtype_get_mtype(type);
|
||||
@ -304,12 +354,42 @@ dtype_get_fixed_size(
|
||||
case DATA_INT:
|
||||
case DATA_FLOAT:
|
||||
case DATA_DOUBLE:
|
||||
return(dtype_get_len(type));
|
||||
case DATA_MYSQL:
|
||||
if ((type->prtype & DATA_BINARY_TYPE)
|
||||
|| !innobase_is_mb_cset(
|
||||
dtype_get_charset_coll(
|
||||
type->prtype))) {
|
||||
if (type->prtype & DATA_BINARY_TYPE) {
|
||||
return(dtype_get_len(type));
|
||||
} else {
|
||||
/* We play it safe here and ask MySQL for
|
||||
mbminlen and mbmaxlen. Although
|
||||
type->mbminlen and type->mbmaxlen are
|
||||
initialized if and only if type->prtype
|
||||
is (in one of the 3 functions in this file),
|
||||
it could be that none of these functions
|
||||
has been called. */
|
||||
|
||||
ulint mbminlen, mbmaxlen;
|
||||
|
||||
innobase_get_cset_width(
|
||||
dtype_get_charset_coll(type->prtype),
|
||||
&mbminlen, &mbmaxlen);
|
||||
|
||||
if (type->mbminlen != mbminlen
|
||||
|| type->mbmaxlen != mbmaxlen) {
|
||||
|
||||
ut_print_timestamp(stderr);
|
||||
fprintf(stderr, " InnoDB: "
|
||||
"mbminlen=%lu, "
|
||||
"mbmaxlen=%lu, "
|
||||
"type->mbminlen=%lu, "
|
||||
"type->mbmaxlen=%lu\n",
|
||||
(ulong) mbminlen,
|
||||
(ulong) mbmaxlen,
|
||||
(ulong) type->mbminlen,
|
||||
(ulong) type->mbmaxlen);
|
||||
}
|
||||
if (mbminlen == mbmaxlen) {
|
||||
return(dtype_get_len(type));
|
||||
}
|
||||
}
|
||||
/* fall through for variable-length charsets */
|
||||
case DATA_VARCHAR:
|
||||
@ -322,14 +402,67 @@ dtype_get_fixed_size(
|
||||
}
|
||||
|
||||
return(0);
|
||||
#else /* UNIV_HOTBACKUP */
|
||||
/* This function depends on MySQL code that is not included in
|
||||
InnoDB Hot Backup builds. Besides, this function should never
|
||||
be called in InnoDB Hot Backup. */
|
||||
ut_error;
|
||||
#endif /* UNIV_HOTBACKUP */
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
Returns the size of a fixed size data type, 0 if not a fixed size type. */
|
||||
UNIV_INLINE
|
||||
ulint
|
||||
dtype_get_min_size(
|
||||
/*===============*/
|
||||
/* out: minimum size */
|
||||
const dtype_t* type) /* in: type */
|
||||
{
|
||||
switch (type->mtype) {
|
||||
case DATA_SYS:
|
||||
#ifdef UNIV_DEBUG
|
||||
switch (type->prtype & DATA_MYSQL_TYPE_MASK) {
|
||||
default:
|
||||
ut_ad(0);
|
||||
return(0);
|
||||
case DATA_ROW_ID:
|
||||
ut_ad(type->len == DATA_ROW_ID_LEN);
|
||||
break;
|
||||
case DATA_TRX_ID:
|
||||
ut_ad(type->len == DATA_TRX_ID_LEN);
|
||||
break;
|
||||
case DATA_ROLL_PTR:
|
||||
ut_ad(type->len == DATA_ROLL_PTR_LEN);
|
||||
break;
|
||||
case DATA_MIX_ID:
|
||||
ut_ad(type->len == DATA_MIX_ID_LEN);
|
||||
break;
|
||||
}
|
||||
#endif /* UNIV_DEBUG */
|
||||
case DATA_CHAR:
|
||||
case DATA_FIXBINARY:
|
||||
case DATA_INT:
|
||||
case DATA_FLOAT:
|
||||
case DATA_DOUBLE:
|
||||
return(type->len);
|
||||
case DATA_MYSQL:
|
||||
if ((type->prtype & DATA_BINARY_TYPE)
|
||||
|| type->mbminlen == type->mbmaxlen) {
|
||||
return(type->len);
|
||||
}
|
||||
/* this is a variable-length character set */
|
||||
ut_a(type->mbminlen > 0);
|
||||
ut_a(type->mbmaxlen > type->mbminlen);
|
||||
ut_a(type->len % type->mbmaxlen == 0);
|
||||
return(type->len * type->mbminlen / type->mbmaxlen);
|
||||
case DATA_VARCHAR:
|
||||
case DATA_BINARY:
|
||||
case DATA_DECIMAL:
|
||||
case DATA_VARMYSQL:
|
||||
case DATA_BLOB:
|
||||
return(0);
|
||||
default: ut_error;
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
#endif /* !UNIV_HOTBACKUP */
|
||||
|
||||
/***************************************************************************
|
||||
Returns a stored SQL NULL size for a type. For fixed length types it is
|
||||
the fixed length of the type, otherwise 0. */
|
||||
|
@ -99,6 +99,7 @@ row_mysql_store_col_in_innobase_format(
|
||||
as dfield is used! */
|
||||
ulint col_len, /* in: MySQL column length */
|
||||
ulint type, /* in: data type */
|
||||
bool comp, /* in: TRUE=compact format */
|
||||
ulint is_unsigned); /* in: != 0 if unsigned integer type */
|
||||
/********************************************************************
|
||||
Handles user errors and lock waits detected by the database engine. */
|
||||
@ -458,6 +459,10 @@ struct mysql_row_templ_struct {
|
||||
numbers DATA_CHAR... */
|
||||
ulint charset; /* MySQL charset-collation code
|
||||
of the column, or zero */
|
||||
ulint mbminlen; /* minimum length of a char, in bytes,
|
||||
or zero if not a char type */
|
||||
ulint mbmaxlen; /* maximum length of a char, in bytes,
|
||||
or zero if not a char type */
|
||||
ulint is_unsigned; /* if a column type is an integer
|
||||
type and this field is != 0, then
|
||||
it is an unsigned integer type */
|
||||
|
@ -67,6 +67,7 @@ row_mysql_store_col_in_innobase_format(
|
||||
as dfield is used! */
|
||||
ulint col_len, /* in: MySQL column length */
|
||||
ulint type, /* in: data type */
|
||||
bool comp, /* in: TRUE=compact format */
|
||||
ulint is_unsigned) /* in: != 0 if unsigned integer type */
|
||||
{
|
||||
byte* ptr = mysql_data;
|
||||
@ -93,17 +94,11 @@ row_mysql_store_col_in_innobase_format(
|
||||
|| type == DATA_BINARY) {
|
||||
/* Remove trailing spaces. */
|
||||
|
||||
/* Handle UCS2 strings differently. As no new
|
||||
collations will be introduced in 4.1, we hardcode the
|
||||
charset-collation codes here. In 5.0, the logic will
|
||||
be based on mbminlen. */
|
||||
ulint cset = dtype_get_charset_coll(
|
||||
dtype_get_prtype(dfield_get_type(dfield)));
|
||||
/* Handle UCS2 strings differently. */
|
||||
ulint mbminlen = dtype_get_mbminlen(
|
||||
dfield_get_type(dfield));
|
||||
ptr = row_mysql_read_var_ref(&col_len, mysql_data);
|
||||
if (cset == 35/*ucs2_general_ci*/
|
||||
|| cset == 90/*ucs2_bin*/
|
||||
|| (cset >= 128/*ucs2_unicode_ci*/
|
||||
&& cset <= 144/*ucs2_persian_ci*/)) {
|
||||
if (mbminlen == 2) {
|
||||
/* space=0x0020 */
|
||||
/* Trim "half-chars", just in case. */
|
||||
col_len &= ~1;
|
||||
@ -113,11 +108,43 @@ row_mysql_store_col_in_innobase_format(
|
||||
col_len -= 2;
|
||||
}
|
||||
} else {
|
||||
ut_a(mbminlen == 1);
|
||||
/* space=0x20 */
|
||||
while (col_len > 0 && ptr[col_len - 1] == 0x20) {
|
||||
col_len--;
|
||||
}
|
||||
}
|
||||
} else if (comp && type == DATA_MYSQL
|
||||
&& dtype_get_mbminlen(dfield_get_type(dfield)) == 1
|
||||
&& dtype_get_mbmaxlen(dfield_get_type(dfield)) > 1) {
|
||||
/* We assume that this CHAR field is encoded in a
|
||||
variable-length character set where spaces have
|
||||
1:1 correspondence to 0x20 bytes, such as UTF-8.
|
||||
|
||||
Consider a CHAR(n) field, a field of n characters.
|
||||
It will contain between n*mbminlen and n*mbmaxlen bytes.
|
||||
We will try to truncate it to n bytes by stripping
|
||||
space padding. If the field contains single-byte
|
||||
characters only, it will be truncated to n characters.
|
||||
Consider a CHAR(5) field containing the string ".a "
|
||||
where "." denotes a 3-byte character represented by
|
||||
the bytes "$%&". After our stripping, the string will
|
||||
be stored as "$%&a " (5 bytes). The string ".abc "
|
||||
will be stored as "$%&abc" (6 bytes).
|
||||
|
||||
The space padding will be restored in row0sel.c, function
|
||||
row_sel_field_store_in_mysql_format(). */
|
||||
|
||||
ulint n_chars;
|
||||
dtype_t* dtype = dfield_get_type(dfield);
|
||||
|
||||
ut_a(!(dtype_get_len(dtype) % dtype_get_mbmaxlen(dtype)));
|
||||
n_chars = dtype_get_len(dtype) / dtype_get_mbmaxlen(dtype);
|
||||
|
||||
/* Strip space padding. */
|
||||
while (col_len > n_chars && ptr[col_len - 1] == 0x20) {
|
||||
col_len--;
|
||||
}
|
||||
} else if (type == DATA_BLOB) {
|
||||
ptr = row_mysql_read_blob_ref(&col_len, mysql_data, col_len);
|
||||
}
|
||||
|
@ -315,7 +315,7 @@ trx_is_active(
|
||||
}
|
||||
|
||||
if (ut_dulint_cmp(trx_id, trx_sys->max_trx_id) >= 0) {
|
||||
|
||||
|
||||
/* There must be corruption: we return TRUE because this
|
||||
function is only called by lock_clust_rec_some_has_impl()
|
||||
and row_vers_impl_x_locked_off_kernel() and they have
|
||||
@ -325,8 +325,9 @@ trx_is_active(
|
||||
}
|
||||
|
||||
trx = trx_get_on_id(trx_id);
|
||||
if (trx && (trx->conc_state == TRX_ACTIVE)) {
|
||||
|
||||
if (trx && (trx->conc_state == TRX_ACTIVE ||
|
||||
trx->conc_state == TRX_PREPARED)) {
|
||||
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
@ -153,10 +153,11 @@ read_view_open_now(
|
||||
/* No active transaction should be visible, except cr_trx */
|
||||
|
||||
while (trx) {
|
||||
if (trx != cr_trx && trx->conc_state == TRX_ACTIVE) {
|
||||
if (trx != cr_trx && (trx->conc_state == TRX_ACTIVE ||
|
||||
trx->conc_state == TRX_PREPARED)) {
|
||||
|
||||
read_view_set_nth_trx_id(view, n, trx->id);
|
||||
|
||||
|
||||
n++;
|
||||
|
||||
/* NOTE that a transaction whose trx number is <
|
||||
@ -164,7 +165,7 @@ read_view_open_now(
|
||||
in the middle of its commit! Note that when a
|
||||
transaction starts, we initialize trx->no to
|
||||
ut_dulint_max. */
|
||||
|
||||
|
||||
if (ut_dulint_cmp(view->low_limit_no, trx->no) > 0) {
|
||||
|
||||
view->low_limit_no = trx->no;
|
||||
|
@ -238,7 +238,8 @@ row_mysql_convert_row_to_innobase(
|
||||
+ templ->mysql_col_offset,
|
||||
mysql_rec + templ->mysql_col_offset,
|
||||
templ->mysql_col_len,
|
||||
templ->type, templ->is_unsigned);
|
||||
templ->type, prebuilt->table->comp,
|
||||
templ->is_unsigned);
|
||||
next_column:
|
||||
;
|
||||
}
|
||||
@ -424,10 +425,13 @@ row_create_prebuilt(
|
||||
prebuilt->sel_graph = NULL;
|
||||
|
||||
prebuilt->search_tuple = dtuple_create(heap,
|
||||
dict_table_get_n_cols(table));
|
||||
2 * dict_table_get_n_cols(table));
|
||||
|
||||
clust_index = dict_table_get_first_index(table);
|
||||
|
||||
/* Make sure that search_tuple is long enough for clustered index */
|
||||
ut_a(2 * dict_table_get_n_cols(table) >= clust_index->n_fields);
|
||||
|
||||
ref_len = dict_index_get_n_unique(clust_index);
|
||||
|
||||
ref = dtuple_create(heap, ref_len);
|
||||
|
@ -2137,6 +2137,7 @@ row_sel_convert_mysql_key_to_innobase(
|
||||
row_mysql_store_col_in_innobase_format(
|
||||
dfield, buf, key_ptr + data_offset,
|
||||
data_len, type,
|
||||
index->table->comp,
|
||||
dfield_get_type(dfield)->prtype
|
||||
& DATA_UNSIGNED);
|
||||
buf += data_len;
|
||||
@ -2232,17 +2233,17 @@ row_sel_field_store_in_mysql_format(
|
||||
are not in themselves stored here: the caller must
|
||||
allocate and copy the BLOB into buffer before, and pass
|
||||
the pointer to the BLOB in 'data' */
|
||||
ulint col_len,/* in: MySQL column length */
|
||||
const mysql_row_templ_t* templ, /* in: MySQL column template.
|
||||
Its following fields are referenced:
|
||||
type, is_unsigned, mysql_col_len, mbminlen, mbmaxlen */
|
||||
byte* data, /* in: data to store */
|
||||
ulint len, /* in: length of the data */
|
||||
ulint type, /* in: data type */
|
||||
ulint is_unsigned)/* in: != 0 if an unsigned integer type */
|
||||
ulint len) /* in: length of the data */
|
||||
{
|
||||
byte* ptr;
|
||||
|
||||
ut_ad(len != UNIV_SQL_NULL);
|
||||
|
||||
if (type == DATA_INT) {
|
||||
if (templ->type == DATA_INT) {
|
||||
/* Convert integer data from Innobase to a little-endian
|
||||
format, sign bit restored to normal */
|
||||
|
||||
@ -2257,31 +2258,58 @@ row_sel_field_store_in_mysql_format(
|
||||
data++;
|
||||
}
|
||||
|
||||
if (!is_unsigned) {
|
||||
if (!templ->is_unsigned) {
|
||||
dest[len - 1] = (byte) (dest[len - 1] ^ 128);
|
||||
}
|
||||
|
||||
ut_ad(col_len == len);
|
||||
} else if (type == DATA_VARCHAR || type == DATA_VARMYSQL
|
||||
|| type == DATA_BINARY) {
|
||||
ut_ad(templ->mysql_col_len == len);
|
||||
} else if (templ->type == DATA_VARCHAR || templ->type == DATA_VARMYSQL
|
||||
|| templ->type == DATA_BINARY) {
|
||||
/* Store the length of the data to the first two bytes of
|
||||
dest; does not do anything yet because MySQL has
|
||||
no real vars! */
|
||||
|
||||
dest = row_mysql_store_var_len(dest, len);
|
||||
ut_memcpy(dest, data, len);
|
||||
|
||||
/* ut_ad(col_len >= len + 2); No real var implemented in
|
||||
MySQL yet! */
|
||||
#if 0
|
||||
/* No real var implemented in MySQL yet! */
|
||||
ut_ad(templ->mysql_col_len >= len + 2);
|
||||
#endif
|
||||
|
||||
} else if (type == DATA_BLOB) {
|
||||
} else if (templ->type == DATA_BLOB) {
|
||||
/* Store a pointer to the BLOB buffer to dest: the BLOB was
|
||||
already copied to the buffer in row_sel_store_mysql_rec */
|
||||
|
||||
row_mysql_store_blob_ref(dest, col_len, data, len);
|
||||
row_mysql_store_blob_ref(dest, templ->mysql_col_len,
|
||||
data, len);
|
||||
} else if (templ->type == DATA_MYSQL) {
|
||||
memcpy(dest, data, len);
|
||||
|
||||
ut_a(templ->mysql_col_len >= len);
|
||||
ut_a(templ->mbmaxlen >= templ->mbminlen);
|
||||
|
||||
ut_a(templ->mbmaxlen > templ->mbminlen
|
||||
|| templ->mysql_col_len == len);
|
||||
ut_a(!templ->mbmaxlen
|
||||
|| !(templ->mysql_col_len % templ->mbmaxlen));
|
||||
ut_a(len * templ->mbmaxlen >= templ->mysql_col_len);
|
||||
|
||||
if (templ->mbminlen != templ->mbmaxlen) {
|
||||
/* Pad with spaces. This undoes the stripping
|
||||
done in row0mysql.ic, function
|
||||
row_mysql_store_col_in_innobase_format(). */
|
||||
memset(dest + len, 0x20, templ->mysql_col_len - len);
|
||||
}
|
||||
} else {
|
||||
ut_memcpy(dest, data, len);
|
||||
ut_ad(col_len == len);
|
||||
ut_a(templ->type == DATA_CHAR
|
||||
|| templ->type == DATA_FIXBINARY
|
||||
/*|| templ->type == DATA_SYS_CHILD
|
||||
|| templ->type == DATA_SYS*/
|
||||
|| templ->type == DATA_FLOAT
|
||||
|| templ->type == DATA_DOUBLE
|
||||
|| templ->type == DATA_DECIMAL);
|
||||
ut_ad(templ->mysql_col_len == len);
|
||||
memcpy(dest, data, len);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2401,8 +2429,7 @@ row_sel_store_mysql_rec(
|
||||
|
||||
row_sel_field_store_in_mysql_format(
|
||||
mysql_rec + templ->mysql_col_offset,
|
||||
templ->mysql_col_len, data, len,
|
||||
templ->type, templ->is_unsigned);
|
||||
templ, data, len);
|
||||
|
||||
if (templ->type == DATA_VARCHAR
|
||||
|| templ->type == DATA_VARMYSQL
|
||||
@ -2410,14 +2437,9 @@ row_sel_store_mysql_rec(
|
||||
/* Pad with trailing spaces */
|
||||
data = mysql_rec + templ->mysql_col_offset;
|
||||
|
||||
/* Handle UCS2 strings differently. As no new
|
||||
collations will be introduced in 4.1, we
|
||||
hardcode the charset-collation codes here.
|
||||
5.0 will use a different approach. */
|
||||
if (templ->charset == 35
|
||||
|| templ->charset == 90
|
||||
|| (templ->charset >= 128
|
||||
&& templ->charset <= 144)) {
|
||||
ut_ad(templ->mbminlen <= templ->mbmaxlen);
|
||||
/* Handle UCS2 strings differently. */
|
||||
if (templ->mbminlen == 2) {
|
||||
/* space=0x0020 */
|
||||
ulint col_len = templ->mysql_col_len;
|
||||
|
||||
@ -2436,6 +2458,7 @@ row_sel_store_mysql_rec(
|
||||
data[len++] = 0x20;
|
||||
}
|
||||
} else {
|
||||
ut_ad(templ->mbminlen == 1);
|
||||
/* space=0x20 */
|
||||
memset(data + len, 0x20,
|
||||
templ->mysql_col_len - len);
|
||||
@ -2477,14 +2500,8 @@ row_sel_store_mysql_rec(
|
||||
pad_char = '\0';
|
||||
}
|
||||
|
||||
/* Handle UCS2 strings differently. As no new
|
||||
collations will be introduced in 4.1,
|
||||
we hardcode the charset-collation codes here.
|
||||
5.0 will use a different approach. */
|
||||
if (templ->charset == 35
|
||||
|| templ->charset == 90
|
||||
|| (templ->charset >= 128
|
||||
&& templ->charset <= 144)) {
|
||||
/* Handle UCS2 strings differently. */
|
||||
if (templ->mbminlen == 2) {
|
||||
/* There are two bytes per char, so the length
|
||||
has to be an even number. */
|
||||
ut_a(!(templ->mysql_col_len & 1));
|
||||
@ -2497,6 +2514,7 @@ row_sel_store_mysql_rec(
|
||||
len -= 2;
|
||||
}
|
||||
} else {
|
||||
ut_ad(!pad_char || templ->mbminlen == 1);
|
||||
memset(mysql_rec + templ->mysql_col_offset,
|
||||
pad_char, templ->mysql_col_len);
|
||||
}
|
||||
@ -2864,9 +2882,11 @@ row_sel_push_cache_row_for_mysql(
|
||||
|
||||
ut_ad(prebuilt->fetch_cache_first == 0);
|
||||
|
||||
ut_a(row_sel_store_mysql_rec(
|
||||
if (!row_sel_store_mysql_rec(
|
||||
prebuilt->fetch_cache[prebuilt->n_fetch_cached],
|
||||
prebuilt, rec, offsets));
|
||||
prebuilt, rec, offsets)) {
|
||||
ut_error;
|
||||
}
|
||||
|
||||
prebuilt->n_fetch_cached++;
|
||||
}
|
||||
|
@ -1617,20 +1617,21 @@ trx_print(
|
||||
(ulong) ut_dulint_get_high(trx->id),
|
||||
(ulong) ut_dulint_get_low(trx->id));
|
||||
|
||||
switch (trx->conc_state) {
|
||||
switch (trx->conc_state) {
|
||||
case TRX_NOT_STARTED:
|
||||
fputs(", not started", f);
|
||||
break;
|
||||
case TRX_ACTIVE:
|
||||
case TRX_PREPARED:
|
||||
fprintf(f, ", ACTIVE %lu sec",
|
||||
(ulong)difftime(time(NULL), trx->start_time));
|
||||
break;
|
||||
break;
|
||||
case TRX_COMMITTED_IN_MEMORY:
|
||||
fputs(", COMMITTED IN MEMORY", f);
|
||||
break;
|
||||
default:
|
||||
fprintf(f, " state %lu", (ulong) trx->conc_state);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef UNIV_LINUX
|
||||
fprintf(f, ", process no %lu", trx->mysql_process_no);
|
||||
|
@ -21,7 +21,7 @@ extern my_string mysql_unix_port;
|
||||
CLIENT_TRANSACTIONS | \
|
||||
CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION)
|
||||
|
||||
sig_handler pipe_sig_handler(int sig);
|
||||
sig_handler my_pipe_sig_handler(int sig);
|
||||
void read_user_name(char *name);
|
||||
my_bool handle_local_infile(MYSQL *mysql, const char *net_filename);
|
||||
|
||||
@ -32,7 +32,7 @@ my_bool handle_local_infile(MYSQL *mysql, const char *net_filename);
|
||||
|
||||
#if !defined(__WIN__) && defined(SIGPIPE) && !defined(THREAD)
|
||||
#define init_sigpipe_variables sig_return old_signal_handler=(sig_return) 0;
|
||||
#define set_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) old_signal_handler=signal(SIGPIPE,pipe_sig_handler)
|
||||
#define set_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) old_signal_handler=signal(SIGPIPE, my_pipe_sig_handler)
|
||||
#define reset_sigpipe(mysql) if ((mysql)->client_flag & CLIENT_IGNORE_SIGPIPE) signal(SIGPIPE,old_signal_handler);
|
||||
#else
|
||||
#define init_sigpipe_variables
|
||||
|
@ -92,7 +92,7 @@ my_bool net_flush(NET *net);
|
||||
#define unsigned_field(A) ((A)->flags & UNSIGNED_FLAG)
|
||||
|
||||
static void append_wild(char *to,char *end,const char *wild);
|
||||
sig_handler pipe_sig_handler(int sig);
|
||||
sig_handler my_pipe_sig_handler(int sig);
|
||||
|
||||
static my_bool mysql_client_init= 0;
|
||||
static my_bool org_my_init_done= 0;
|
||||
@ -294,11 +294,11 @@ mysql_debug(const char *debug __attribute__((unused)))
|
||||
**************************************************************************/
|
||||
|
||||
sig_handler
|
||||
pipe_sig_handler(int sig __attribute__((unused)))
|
||||
my_pipe_sig_handler(int sig __attribute__((unused)))
|
||||
{
|
||||
DBUG_PRINT("info",("Hit by signal %d",sig));
|
||||
#ifdef DONT_REMEMBER_SIGNAL
|
||||
(void) signal(SIGPIPE,pipe_sig_handler);
|
||||
(void) signal(SIGPIPE, my_pipe_sig_handler);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -71,9 +71,11 @@ void Querycache_stream::store_int(uint i)
|
||||
cur_data+= 4;
|
||||
return;
|
||||
}
|
||||
memcpy(cur_data, &i, rest_len);
|
||||
char buf[4];
|
||||
int4store(buf, i);
|
||||
memcpy(cur_data, buf, rest_len);
|
||||
use_next_block();
|
||||
memcpy(cur_data, ((byte*)&i)+rest_len, 4-rest_len);
|
||||
memcpy(cur_data, buf+rest_len, 4-rest_len);
|
||||
cur_data+= 4-rest_len;
|
||||
}
|
||||
|
||||
@ -186,10 +188,12 @@ uint Querycache_stream::load_int()
|
||||
cur_data+= 4;
|
||||
return result;
|
||||
}
|
||||
memcpy(&result, cur_data, rest_len);
|
||||
char buf[4];
|
||||
memcpy(buf, cur_data, rest_len);
|
||||
use_next_block();
|
||||
memcpy(((byte*)&result)+rest_len, cur_data, 4-rest_len);
|
||||
memcpy(buf+rest_len, cur_data, 4-rest_len);
|
||||
cur_data+= 4-rest_len;
|
||||
result= uint4korr(buf);
|
||||
return result;
|
||||
}
|
||||
|
||||
@ -270,10 +274,10 @@ int Querycache_stream::load_column(MEM_ROOT *alloc, char** column)
|
||||
return 0;
|
||||
}
|
||||
len--;
|
||||
if (!(*column= (char *)alloc_root(alloc, len + 4 + 1)))
|
||||
if (!(*column= (char *)alloc_root(alloc, len + sizeof(uint) + 1)))
|
||||
return 1;
|
||||
int4store(*column, len);
|
||||
(*column)+= 4;
|
||||
*((uint*)*column)= len;
|
||||
(*column)+= sizeof(uint);
|
||||
load_str_only(*column, len);
|
||||
return 1;
|
||||
}
|
||||
|
0
libmysqld/libmysqld.rc
Executable file → Normal file
0
libmysqld/libmysqld.rc
Executable file → Normal file
0
libmysqld/resource.h
Executable file → Normal file
0
libmysqld/resource.h
Executable file → Normal file
@ -436,32 +436,24 @@ static int _ftb_strstr(const byte *s0, const byte *e0,
|
||||
const byte *s1, const byte *e1,
|
||||
CHARSET_INFO *cs)
|
||||
{
|
||||
const byte *p0, *p1;
|
||||
my_bool s_after, e_before;
|
||||
|
||||
s_after=true_word_char(cs, s1[0]);
|
||||
e_before=true_word_char(cs, e1[-1]);
|
||||
p0=s0;
|
||||
const byte *p0= s0;
|
||||
my_bool s_after= true_word_char(cs, s1[0]);
|
||||
my_bool e_before= true_word_char(cs, e1[-1]);
|
||||
uint p0_len;
|
||||
my_match_t m[2];
|
||||
|
||||
while (p0 < e0)
|
||||
{
|
||||
while (p0 < e0 && cs->to_upper[(uint) (uchar) *p0++] !=
|
||||
cs->to_upper[(uint) (uchar) *s1])
|
||||
/* no-op */;
|
||||
if (p0 >= e0)
|
||||
return 0;
|
||||
|
||||
if (s_after && p0-1 > s0 && true_word_char(cs, p0[-2]))
|
||||
continue;
|
||||
|
||||
p1=s1+1;
|
||||
while (p0 < e0 && p1 < e1 && cs->to_upper[(uint) (uchar) *p0] ==
|
||||
cs->to_upper[(uint) (uchar) *p1])
|
||||
p0++, p1++;
|
||||
if (p1 == e1 && (!e_before || p0 == e0 || !true_word_char(cs, p0[0])))
|
||||
return 1;
|
||||
if (cs->coll->instr(cs, p0, e0 - p0, s1, e1 - s1, m, 2) != 2)
|
||||
return(0);
|
||||
if ((!s_after || p0 + m[1].beg == s0 || !true_word_char(cs, p0[m[1].beg-1])) &&
|
||||
(!e_before || p0 + m[1].end == e0 || !true_word_char(cs, p0[m[1].end])))
|
||||
return(1);
|
||||
p0+= m[1].beg;
|
||||
p0+= (p0_len= my_mbcharlen(cs, *(uchar *)p0)) ? p0_len : 1;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -261,6 +261,10 @@ FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, byte *query,
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
If ndocs == 0, this will not allocate RAM for FT_INFO.doc[],
|
||||
so if ndocs == 0, FT_INFO.doc[] must not be accessed.
|
||||
*/
|
||||
dlist=(FT_INFO *)my_malloc(sizeof(FT_INFO)+
|
||||
sizeof(FT_DOC)*(aio.dtree.elements_in_tree-1),
|
||||
MYF(0));
|
||||
@ -329,7 +333,8 @@ float ft_nlq_find_relevance(FT_INFO *handler,
|
||||
else
|
||||
a=c;
|
||||
}
|
||||
if (docs[a].dpos == docid)
|
||||
/* bounds check to avoid accessing unallocated handler->doc */
|
||||
if (a < handler->ndocs && docs[a].dpos == docid)
|
||||
return (float) docs[a].weight;
|
||||
else
|
||||
return 0.0;
|
||||
|
@ -125,4 +125,5 @@ void ft_free_stopwords()
|
||||
my_free((char*) stopwords3,MYF(0));
|
||||
stopwords3=0;
|
||||
}
|
||||
ft_stopword_file= 0;
|
||||
}
|
||||
|
@ -71,15 +71,15 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
|
||||
|
||||
if (flush_key_blocks(share->key_cache,share->kfile, FLUSH_RELEASE))
|
||||
goto err;
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
/* Read the next block of index file into the preload buffer */
|
||||
if ((my_off_t) length > (key_file_length-pos))
|
||||
length= (ulong) (key_file_length-pos);
|
||||
if (my_pread(share->kfile, (byte*) buff, length, pos, MYF(MY_FAE)))
|
||||
if (my_pread(share->kfile, (byte*) buff, length, pos, MYF(MY_FAE|MY_FNABP)))
|
||||
goto err;
|
||||
|
||||
|
||||
if (ignore_leaves)
|
||||
{
|
||||
uchar *end= buff+length;
|
||||
@ -88,7 +88,7 @@ int mi_preload(MI_INFO *info, ulonglong key_map, my_bool ignore_leaves)
|
||||
if (mi_test_if_nod(buff))
|
||||
{
|
||||
if (key_cache_insert(share->key_cache,
|
||||
share->kfile, pos, DFLT_INIT_HITS,
|
||||
share->kfile, pos, DFLT_INIT_HITS,
|
||||
(byte*) buff, block_length))
|
||||
goto err;
|
||||
}
|
||||
|
@ -45,7 +45,8 @@ mysql_test_run_new_SOURCES= mysql_test_run_new.c my_manage.c my_create_tables.c
|
||||
dist-hook:
|
||||
mkdir -p $(distdir)/t $(distdir)/r $(distdir)/include \
|
||||
$(distdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(srcdir)/t/*.slave-mi $(distdir)/t
|
||||
$(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.disabled $(distdir)/t
|
||||
$(INSTALL_DATA) $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(srcdir)/t/*.slave-mi $(distdir)/t
|
||||
$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
|
||||
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.result.es $(srcdir)/r/*.require $(distdir)/r
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data
|
||||
@ -62,10 +63,12 @@ install-data-local:
|
||||
$(DESTDIR)$(testdir)/std_data
|
||||
$(INSTALL_DATA) $(srcdir)/README $(DESTDIR)$(testdir)
|
||||
$(INSTALL_DATA) $(srcdir)/t/*.test $(DESTDIR)$(testdir)/t
|
||||
$(INSTALL_DATA) $(srcdir)/t/*.disabled $(DESTDIR)$(testdir)/t
|
||||
$(INSTALL_DATA) $(srcdir)/t/*.opt $(DESTDIR)$(testdir)/t
|
||||
$(INSTALL_DATA) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t
|
||||
$(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t
|
||||
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.result.es $(DESTDIR)$(testdir)/r
|
||||
$(INSTALL_DATA) $(srcdir)/r/*.result $(DESTDIR)$(testdir)/r
|
||||
$(INSTALL_DATA) $(srcdir)/r/*.result.es $(DESTDIR)$(testdir)/r
|
||||
$(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r
|
||||
$(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include
|
||||
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data
|
||||
|
File diff suppressed because one or more lines are too long
@ -123,6 +123,17 @@ sub spawn_impl ($$$$$$$) {
|
||||
|
||||
$SIG{INT}= 'DEFAULT'; # Parent do some stuff, we don't
|
||||
|
||||
if ( $::glob_cygwin_shell and $mode eq 'test' )
|
||||
{
|
||||
# Programs started from mysqltest under Cygwin, are to
|
||||
# execute them within Cygwin. Else simple things in test
|
||||
# files like
|
||||
# --system "echo 1 > file"
|
||||
# will fail.
|
||||
# FIXME not working :-(
|
||||
# $ENV{'COMSPEC'}= "$::glob_cygwin_shell -c";
|
||||
}
|
||||
|
||||
if ( $output )
|
||||
{
|
||||
if ( ! open(STDOUT,">",$output) )
|
||||
@ -130,6 +141,7 @@ sub spawn_impl ($$$$$$$) {
|
||||
mtr_error("can't redirect STDOUT to \"$output\": $!");
|
||||
}
|
||||
}
|
||||
|
||||
if ( $error )
|
||||
{
|
||||
if ( $output eq $error )
|
||||
@ -147,6 +159,7 @@ sub spawn_impl ($$$$$$$) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $input )
|
||||
{
|
||||
if ( ! open(STDIN,"<",$input) )
|
||||
@ -154,7 +167,11 @@ sub spawn_impl ($$$$$$$) {
|
||||
mtr_error("can't redirect STDIN to \"$input\": $!");
|
||||
}
|
||||
}
|
||||
exec($path,@$arg_list_t);
|
||||
|
||||
if ( ! exec($path,@$arg_list_t) )
|
||||
{
|
||||
mtr_error("failed to execute \"$path\": $!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -569,7 +586,7 @@ sub mtr_stop_mysqld_servers ($) {
|
||||
sub mtr_mysqladmin_shutdown () {
|
||||
my $spec= shift;
|
||||
|
||||
my @mysql_admin_pids;
|
||||
my %mysql_admin_pids;
|
||||
my @to_kill_specs;
|
||||
|
||||
foreach my $srv ( @$spec )
|
||||
@ -611,13 +628,19 @@ sub mtr_mysqladmin_shutdown () {
|
||||
# We don't wait for termination of mysqladmin
|
||||
my $pid= mtr_spawn($::exe_mysqladmin, $args,
|
||||
"", $::path_manager_log, $::path_manager_log, "");
|
||||
push(@mysql_admin_pids, $pid);
|
||||
$mysql_admin_pids{$pid}= 1;
|
||||
}
|
||||
|
||||
# We wait blocking, we wait for the last one anyway
|
||||
foreach my $pid (@mysql_admin_pids)
|
||||
while (keys %mysql_admin_pids)
|
||||
{
|
||||
waitpid($pid,0); # FIXME no need to check -1 or 0?
|
||||
foreach my $pid (keys %mysql_admin_pids)
|
||||
{
|
||||
if ( waitpid($pid,0) > 0 )
|
||||
{
|
||||
delete $mysql_admin_pids{$pid};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# If we trusted "mysqladmin --shutdown_timeout= ..." we could just
|
||||
|
@ -50,12 +50,14 @@ sub mtr_show_failed_diff ($) {
|
||||
$result_file= "$result_file$::opt_result_ext";
|
||||
}
|
||||
|
||||
my $diffopts= $::opt_udiff ? "-u" : "-c";
|
||||
|
||||
if ( -f $reject_file )
|
||||
{
|
||||
print "Below are the diffs between actual and expected results:\n";
|
||||
print "-------------------------------------------------------\n";
|
||||
# FIXME check result code?!
|
||||
mtr_run("diff",["-c",$result_file,$reject_file], "", "", "", "");
|
||||
mtr_run("diff",[$diffopts,$result_file,$reject_file], "", "", "", "");
|
||||
print "-------------------------------------------------------\n";
|
||||
print "Please follow the instructions outlined at\n";
|
||||
print "http://www.mysql.com/doc/en/Reporting_mysqltest_bugs.html\n";
|
||||
|
@ -156,13 +156,13 @@ our @mysqld_src_dirs=
|
||||
our $glob_win32= 0; # OS and native Win32 executables
|
||||
our $glob_win32_perl= 0; # ActiveState Win32 Perl
|
||||
our $glob_cygwin_perl= 0; # Cygwin Perl
|
||||
our $glob_cygwin_shell= undef;
|
||||
our $glob_mysql_test_dir= undef;
|
||||
our $glob_mysql_bench_dir= undef;
|
||||
our $glob_hostname= undef;
|
||||
our $glob_scriptname= undef;
|
||||
our $glob_use_running_server= 0;
|
||||
our $glob_use_running_ndbcluster= 0;
|
||||
our $glob_user= 'test';
|
||||
our $glob_use_embedded_server= 0;
|
||||
|
||||
our $glob_basedir;
|
||||
@ -281,6 +281,8 @@ our $opt_wait_timeout= 10;
|
||||
|
||||
our $opt_warnings;
|
||||
|
||||
our $opt_udiff;
|
||||
|
||||
our $opt_with_ndbcluster;
|
||||
our $opt_with_openssl;
|
||||
|
||||
@ -358,6 +360,10 @@ sub main () {
|
||||
|
||||
if ( $opt_start_and_exit )
|
||||
{
|
||||
if ( ndbcluster_start() )
|
||||
{
|
||||
mtr_error("Can't start ndbcluster");
|
||||
}
|
||||
if ( mysqld_start('master',0,[],[]) )
|
||||
{
|
||||
mtr_report("Servers started, exiting");
|
||||
@ -422,7 +428,9 @@ sub initial_setup () {
|
||||
{
|
||||
# Windows programs like 'mysqld' needs Windows paths
|
||||
$glob_mysql_test_dir= `cygpath -m $glob_mysql_test_dir`;
|
||||
$glob_cygwin_shell= `cygpath -w $ENV{'SHELL'}`; # The Windows path c:\...
|
||||
chomp($glob_mysql_test_dir);
|
||||
chomp($glob_cygwin_shell);
|
||||
}
|
||||
$glob_basedir= dirname($glob_mysql_test_dir);
|
||||
$glob_mysql_bench_dir= "$glob_basedir/mysql-bench"; # FIXME make configurable
|
||||
@ -524,6 +532,7 @@ sub command_line_setup () {
|
||||
'start-from=s' => \$opt_start_from,
|
||||
'timer' => \$opt_timer,
|
||||
'tmpdir=s' => \$opt_tmpdir,
|
||||
'unified-diff|udiff' => \$opt_udiff,
|
||||
'user-test=s' => \$opt_user_test,
|
||||
'user=s' => \$opt_user,
|
||||
'verbose' => \$opt_verbose,
|
||||
@ -712,17 +721,16 @@ sub command_line_setup () {
|
||||
# }
|
||||
#}
|
||||
|
||||
if ( $opt_user )
|
||||
if ( ! $opt_user )
|
||||
{
|
||||
$glob_user= $opt_user;
|
||||
}
|
||||
elsif ( $glob_use_running_server )
|
||||
{
|
||||
$glob_user= "test";
|
||||
}
|
||||
else
|
||||
{
|
||||
$glob_user= "root"; # We want to do FLUSH xxx commands
|
||||
if ( $glob_use_running_server )
|
||||
{
|
||||
$opt_user= "test";
|
||||
}
|
||||
else
|
||||
{
|
||||
$opt_user= "root"; # We want to do FLUSH xxx commands
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -837,7 +845,7 @@ sub executable_setup () {
|
||||
}
|
||||
else
|
||||
{
|
||||
error("Cannot find embedded server 'mysqltest_embedded'");
|
||||
mtr_error("Cannot find embedded server 'mysqltest_embedded'");
|
||||
}
|
||||
if ( -d "$path_tests_bindir/mysql_client_test_embedded" )
|
||||
{
|
||||
@ -860,9 +868,6 @@ sub executable_setup () {
|
||||
$exe_ndb_mgm= "$glob_basedir/bin/ndb_mgm";
|
||||
}
|
||||
|
||||
# FIXME special $exe_master_mysqld and $exe_slave_mysqld
|
||||
# are not used that much....
|
||||
|
||||
if ( ! $exe_master_mysqld )
|
||||
{
|
||||
$exe_master_mysqld= $exe_mysqld;
|
||||
@ -1054,7 +1059,7 @@ sub ndbcluster_start () {
|
||||
"--data-dir=$glob_mysql_test_dir/var"],
|
||||
"", "/dev/null", "", "") )
|
||||
{
|
||||
mtr_error("Error ndbcluster_install");
|
||||
mtr_error("Error ndbcluster_start");
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -1102,7 +1107,7 @@ sub run_benchmarks ($) {
|
||||
mtr_init_args(\$args);
|
||||
|
||||
mtr_add_arg($args, "--socket=%s", $master->[0]->{'path_mysock'});
|
||||
mtr_add_arg($args, "--user=root");
|
||||
mtr_add_arg($args, "--user=%s", $opt_user);
|
||||
|
||||
if ( $opt_small_bench )
|
||||
{
|
||||
@ -1226,15 +1231,41 @@ sub install_db ($$) {
|
||||
my $type= shift;
|
||||
my $data_dir= shift;
|
||||
|
||||
my $init_db_sql= "lib/init_db.sql"; # FIXME this is too simple maybe
|
||||
my $init_db_sql= "lib/init_db.sql";
|
||||
my $init_db_sql_tmp= "/tmp/init_db.sql$$";
|
||||
my $args;
|
||||
|
||||
mtr_report("Installing \u$type Databases");
|
||||
|
||||
open(IN, $init_db_sql)
|
||||
or error("Can't open $init_db_sql: $!");
|
||||
open(OUT, ">", $init_db_sql_tmp)
|
||||
or error("Can't write to $init_db_sql_tmp: $!");
|
||||
while (<IN>)
|
||||
{
|
||||
chomp;
|
||||
s/\@HOSTNAME\@/$glob_hostname/;
|
||||
if ( /^\s*$/ )
|
||||
{
|
||||
print OUT "\n";
|
||||
}
|
||||
elsif (/;$/)
|
||||
{
|
||||
print OUT "$_\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
print OUT "$_ ";
|
||||
}
|
||||
}
|
||||
close OUT;
|
||||
close IN;
|
||||
|
||||
mtr_init_args(\$args);
|
||||
|
||||
mtr_add_arg($args, "--no-defaults");
|
||||
mtr_add_arg($args, "--bootstrap");
|
||||
mtr_add_arg($args, "--console");
|
||||
mtr_add_arg($args, "--skip-grant-tables");
|
||||
mtr_add_arg($args, "--basedir=%s", $path_my_basedir);
|
||||
mtr_add_arg($args, "--datadir=%s", $data_dir);
|
||||
@ -1248,12 +1279,14 @@ sub install_db ($$) {
|
||||
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||
}
|
||||
|
||||
if ( mtr_run($exe_mysqld, $args, $init_db_sql,
|
||||
if ( mtr_run($exe_mysqld, $args, $init_db_sql_tmp,
|
||||
$path_manager_log, $path_manager_log, "") != 0 )
|
||||
{
|
||||
unlink($init_db_sql_tmp);
|
||||
mtr_error("Error executing mysqld --bootstrap\n" .
|
||||
"Could not install $type test DBs");
|
||||
}
|
||||
unlink($init_db_sql_tmp);
|
||||
}
|
||||
|
||||
|
||||
@ -1491,8 +1524,8 @@ sub report_failure_and_restart ($) {
|
||||
# but stop before actually running mysqld or anything.
|
||||
|
||||
sub do_before_start_master ($$) {
|
||||
my $tname= shift;
|
||||
my $master_init_script= shift;
|
||||
my $tname= shift;
|
||||
my $init_script= shift;
|
||||
|
||||
# FIXME what about second master.....
|
||||
|
||||
@ -1502,8 +1535,8 @@ sub do_before_start_master ($$) {
|
||||
$tname ne "rpl_crash_binlog_ib_3b")
|
||||
{
|
||||
# FIXME we really want separate dir for binlogs
|
||||
`rm -fr $glob_mysql_test_dir/var/log/master-bin.*`;
|
||||
# unlink("$glob_mysql_test_dir/var/log/master-bin.*");
|
||||
`rm -f $glob_mysql_test_dir/var/log/master-bin*`;
|
||||
# unlink("$glob_mysql_test_dir/var/log/master-bin*");
|
||||
}
|
||||
|
||||
# Remove old master.info and relay-log.info files
|
||||
@ -1512,23 +1545,19 @@ sub do_before_start_master ($$) {
|
||||
unlink("$glob_mysql_test_dir/var/master1-data/master.info");
|
||||
unlink("$glob_mysql_test_dir/var/master1-data/relay-log.info");
|
||||
|
||||
#run master initialization shell script if one exists
|
||||
|
||||
if ( $master_init_script and
|
||||
mtr_run($master_init_script, [], "", "", "", "") != 0 )
|
||||
# Run master initialization shell script if one exists
|
||||
if ( $init_script )
|
||||
{
|
||||
mtr_error("Can't run $master_init_script");
|
||||
# We ignore the return code
|
||||
mtr_run("/bin/sh", ["-c",$init_script], "", "", "", "");
|
||||
}
|
||||
# for gcov FIXME needed? If so we need more absolute paths
|
||||
# chdir($glob_basedir);
|
||||
}
|
||||
|
||||
sub do_before_start_slave ($$) {
|
||||
my $tname= shift;
|
||||
my $slave_init_script= shift;
|
||||
|
||||
# When testing fail-safe replication, we will have more than one slave
|
||||
# in this case, we start secondary slaves with an argument
|
||||
my $tname= shift;
|
||||
my $init_script= shift;
|
||||
|
||||
# Remove stale binary logs and old master.info files
|
||||
# except for too tests which need them
|
||||
@ -1544,14 +1573,15 @@ sub do_before_start_slave ($$) {
|
||||
unlink("$glob_mysql_test_dir/var/slave-data/relay-log.info");
|
||||
}
|
||||
|
||||
#run slave initialization shell script if one exists
|
||||
if ( $slave_init_script and
|
||||
mtr_run($slave_init_script, [], "", "", "", "") != 0 )
|
||||
# Run slave initialization shell script if one exists
|
||||
if ( $init_script )
|
||||
{
|
||||
mtr_error("Can't run $slave_init_script");
|
||||
# We ignore the return code
|
||||
mtr_run("/bin/sh", ["-c",$init_script], "", "", "", "");
|
||||
}
|
||||
|
||||
unlink("$glob_mysql_test_dir/var/slave-data/log.*");
|
||||
`rm -f $glob_mysql_test_dir/var/slave-data/log.*`;
|
||||
# unlink("$glob_mysql_test_dir/var/slave-data/log.*");
|
||||
}
|
||||
|
||||
sub mysqld_arguments ($$$$$) {
|
||||
@ -1579,6 +1609,7 @@ sub mysqld_arguments ($$$$$) {
|
||||
mtr_add_arg($args, "%s--no-defaults", $prefix);
|
||||
}
|
||||
|
||||
mtr_add_arg($args, "%s--console", $prefix);
|
||||
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
|
||||
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
|
||||
mtr_add_arg($args, "%s--core", $prefix);
|
||||
@ -1669,12 +1700,12 @@ sub mysqld_arguments ($$$$$) {
|
||||
{
|
||||
if ( $type eq 'master' )
|
||||
{
|
||||
mtr_add_arg($args, "--debug=d:t:i:A,%s/var/log/master%s.trace",
|
||||
mtr_add_arg($args, "%s--debug=d:t:i:A,%s/var/log/master%s.trace",
|
||||
$prefix, $glob_mysql_test_dir, $sidx);
|
||||
}
|
||||
if ( $type eq 'slave' )
|
||||
{
|
||||
mtr_add_arg($args, "--debug=d:t:i:A,%s/var/log/slave%s.trace",
|
||||
mtr_add_arg($args, "%s--debug=d:t:i:A,%s/var/log/slave%s.trace",
|
||||
$prefix, $glob_mysql_test_dir, $sidx);
|
||||
}
|
||||
}
|
||||
@ -1789,18 +1820,17 @@ sub mysqld_start ($$$$) {
|
||||
my $exe;
|
||||
my $pid;
|
||||
|
||||
# FIXME code duplication, make up your mind....
|
||||
if ( $opt_source_dist )
|
||||
if ( $type eq 'master' )
|
||||
{
|
||||
$exe= "$glob_basedir/sql/mysqld";
|
||||
$exe= $exe_master_mysqld;
|
||||
}
|
||||
elsif ( $type eq 'slave' )
|
||||
{
|
||||
$exe= $exe_slave_mysqld;
|
||||
}
|
||||
else
|
||||
{
|
||||
$exe ="$glob_basedir/libexec/mysqld";
|
||||
if ( ! -x $exe )
|
||||
{
|
||||
$exe ="$glob_basedir/bin/mysqld";
|
||||
}
|
||||
$exe= $exe_mysqld;
|
||||
}
|
||||
|
||||
mtr_init_args(\$args);
|
||||
@ -1983,7 +2013,7 @@ sub run_mysqltest ($$) {
|
||||
mtr_add_arg($args, "--no-defaults");
|
||||
mtr_add_arg($args, "--socket=%s", $master->[0]->{'path_mysock'});
|
||||
mtr_add_arg($args, "--database=test");
|
||||
mtr_add_arg($args, "--user=%s", $glob_user);
|
||||
mtr_add_arg($args, "--user=%s", $opt_user);
|
||||
mtr_add_arg($args, "--password=");
|
||||
mtr_add_arg($args, "--silent");
|
||||
mtr_add_arg($args, "-v");
|
||||
@ -2054,7 +2084,7 @@ sub run_mysqltest ($$) {
|
||||
mysqld_arguments($args,'master',0,$tinfo->{'master_opt'},[]);
|
||||
}
|
||||
|
||||
return mtr_run($exe_mysqltest,$args,$tinfo->{'path'},"",$path_timefile,"");
|
||||
return mtr_run_test($exe_mysqltest,$args,$tinfo->{'path'},"",$path_timefile,"");
|
||||
}
|
||||
|
||||
##############################################################################
|
||||
@ -2136,6 +2166,7 @@ Misc options
|
||||
start-and-exit Only initiate and start the "mysqld" servers
|
||||
fast Don't try to cleanup from earlier runs
|
||||
help Get this help text
|
||||
unified-diff | udiff When presenting differences, use unified diff
|
||||
|
||||
Options not yet described, or that I want to look into more
|
||||
|
||||
|
@ -208,7 +208,6 @@ export UMASK UMASK_DIR
|
||||
MASTER_RUNNING=0
|
||||
MASTER1_RUNNING=0
|
||||
MASTER_MYPORT=9306
|
||||
MASTER_MYPORT1=9307
|
||||
SLAVE_RUNNING=0
|
||||
SLAVE_MYPORT=9308 # leave room for 2 masters for cluster tests
|
||||
MYSQL_MANAGER_PORT=9305 # needs to be out of the way of slaves
|
||||
@ -495,7 +494,7 @@ SLAVE_MYERR="$MYSQL_TEST_DIR/var/log/slave.err"
|
||||
CURRENT_TEST="$MYSQL_TEST_DIR/var/log/current_test"
|
||||
SMALL_SERVER="--key_buffer_size=1M --sort_buffer=256K --max_heap_table_size=1M"
|
||||
|
||||
export MASTER_MYPORT MASTER_MYPORT1 SLAVE_MYPORT MYSQL_TCP_PORT MASTER_MYSOCK MASTER_MYSOCK1
|
||||
export MASTER_MYPORT SLAVE_MYPORT MYSQL_TCP_PORT MASTER_MYSOCK MASTER_MYSOCK1
|
||||
|
||||
NDBCLUSTER_BASE_PORT=`expr $NDBCLUSTER_PORT + 2`
|
||||
NDBCLUSTER_OPTS="--port=$NDBCLUSTER_PORT --port-base=$NDBCLUSTER_BASE_PORT --data-dir=$MYSQL_TEST_DIR/var --ndb_mgm-extra-opts=$NDB_MGM_EXTRA_OPTS --ndb_mgmd-extra-opts=$NDB_MGMD_EXTRA_OPTS --ndbd-extra-opts=$NDBD_EXTRA_OPTS"
|
||||
@ -1145,6 +1144,8 @@ start_master()
|
||||
id=`$EXPR $1 + 101`;
|
||||
this_master_myport=`$EXPR $MASTER_MYPORT + $1`
|
||||
NOT_FIRST_MASTER_EXTRA_OPTS="--skip-innodb"
|
||||
eval "MASTER_MYPORT$1=$this_master_myport"
|
||||
export MASTER_MYPORT$1
|
||||
else
|
||||
id=1;
|
||||
this_master_myport=$MASTER_MYPORT
|
||||
@ -1763,7 +1764,7 @@ then
|
||||
$MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK1 -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||
$MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||
$MYSQLADMIN --no-defaults --host=$hostname --port=$MASTER_MYPORT -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||
$MYSQLADMIN --no-defaults --host=$hostname --port=$MASTER_MYPORT1 -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||
$MYSQLADMIN --no-defaults --host=$hostname --port=`expr $MASTER_MYPORT+1` -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||
$MYSQLADMIN --no-defaults --host=$hostname --port=$SLAVE_MYPORT -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||
$MYSQLADMIN --no-defaults --host=$hostname --port=`expr $SLAVE_MYPORT + 1` -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
|
||||
sleep_until_file_deleted 0 $MASTER_MYPID
|
||||
|
@ -326,3 +326,15 @@ latin1_german2_ci 6109
|
||||
latin1_german2_ci 61
|
||||
latin1_german2_ci 6120
|
||||
drop table t1;
|
||||
SET NAMES latin1;
|
||||
CREATE TABLE t1 (
|
||||
col1 varchar(255) NOT NULL default ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 collate latin1_german2_ci;
|
||||
INSERT INTO t1 VALUES ('ß'),('ss'),('ss');
|
||||
ALTER TABLE t1 ADD KEY ifword(col1);
|
||||
SELECT * FROM t1 WHERE col1='ß' ORDER BY col1, BINARY col1;
|
||||
col1
|
||||
ss
|
||||
ss
|
||||
ß
|
||||
DROP TABLE t1;
|
||||
|
@ -91,3 +91,7 @@ sjis_bin 6109
|
||||
sjis_bin 61
|
||||
sjis_bin 6120
|
||||
drop table t1;
|
||||
SET NAMES sjis;
|
||||
SELECT HEX('佐淘 \圭') FROM DUAL;
|
||||
HEX('佐淘 \圭')
|
||||
8DB2939181408C5C
|
||||
|
@ -523,11 +523,12 @@ create table t2 (c char(30)) charset=ucs2;
|
||||
set @v=convert('abc' using ucs2);
|
||||
reset master;
|
||||
insert into t2 values (@v);
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 User var 1 135 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
|
||||
master-bin.000001 135 Query 1 225 use `test`; insert into t2 values (@v)
|
||||
master-bin.000001 96 User var 1 136 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
|
||||
master-bin.000001 136 Query 1 226 use `test`; insert into t2 values (@v)
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`;
|
||||
use test;
|
||||
SET TIMESTAMP=10000;
|
||||
@ -624,3 +625,17 @@ ucs2_bin 00610009
|
||||
ucs2_bin 0061
|
||||
ucs2_bin 00610020
|
||||
drop table t1;
|
||||
SET NAMES latin1;
|
||||
SET collation_connection='ucs2_swedish_ci';
|
||||
CREATE TABLE t1 (Field1 int(10) default '0');
|
||||
INSERT INTO t1 VALUES ('-1');
|
||||
SELECT * FROM t1;
|
||||
Field1
|
||||
-1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (Field1 int(10) unsigned default '0');
|
||||
INSERT INTO t1 VALUES ('-1');
|
||||
Warnings:
|
||||
Warning 1264 Out of range value adjusted for column 'Field1' at row 1
|
||||
DROP TABLE t1;
|
||||
SET NAMES latin1;
|
||||
|
@ -163,3 +163,12 @@ select * from t1;
|
||||
a b
|
||||
7 7
|
||||
drop table t1;
|
||||
CREATE TABLE t1 ( a int PRIMARY KEY );
|
||||
DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a;
|
||||
INSERT INTO t1 VALUES (0),(1),(2);
|
||||
DELETE FROM t1 WHERE t1.a > 0 ORDER BY t1.a LIMIT 1;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
0
|
||||
2
|
||||
DROP TABLE t1;
|
||||
|
@ -17,8 +17,6 @@ master-bin.000001 # Query 1 # create database `drop-temp+table-test`
|
||||
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn1 (a int)
|
||||
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table `table:name` (a int)
|
||||
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn2 (a int)
|
||||
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`
|
||||
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
|
||||
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn1`
|
||||
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`,`drop-temp+table-test`.`table:name`,`drop-temp+table-test`.`shortn1`
|
||||
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DO RELEASE_LOCK("a")
|
||||
drop database `drop-temp+table-test`;
|
||||
|
@ -402,9 +402,22 @@ select count(*) from t1;
|
||||
count(*)
|
||||
1
|
||||
drop table t1;
|
||||
CREATE TABLE t1 ( a TEXT, FULLTEXT (a) );
|
||||
INSERT INTO t1 VALUES ('testing ft_nlq_find_relevance');
|
||||
SELECT MATCH(a) AGAINST ('nosuchword') FROM t1;
|
||||
MATCH(a) AGAINST ('nosuchword')
|
||||
0
|
||||
DROP TABLE t1;
|
||||
create table t1 (a int primary key, b text, fulltext(b));
|
||||
create table t2 (a int, b text);
|
||||
insert t1 values (1, "aaaa"), (2, "bbbb");
|
||||
insert t2 values (10, "aaaa"), (2, "cccc");
|
||||
replace t1 select * from t2;
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1 (t VARCHAR(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci, FULLTEXT (t));
|
||||
SET NAMES latin1;
|
||||
INSERT INTO t1 VALUES('Mit freundlichem Grüß aus Osnabrück');
|
||||
SELECT COUNT(*) FROM t1 WHERE MATCH(t) AGAINST ('"osnabrück"' IN BOOLEAN MODE);
|
||||
COUNT(*)
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
@ -21,17 +21,17 @@ INSERT INTO t2 VALUES (5,2,'um copo de Vodka');
|
||||
INSERT INTO t2 VALUES (6,2,'um chocolate Snickers');
|
||||
INSERT INTO t2 VALUES (7,1,'Bife');
|
||||
INSERT INTO t2 VALUES (8,1,'Pizza de Salmao');
|
||||
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),8)
|
||||
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),6)
|
||||
as x FROM t1, t2 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
|
||||
q item id x
|
||||
aaaaaaaaa dsaass de sushi 1 1.92378664
|
||||
aaaaaaaaa dsaass de Bolo de Chocolate 2 0.00000000
|
||||
aaaaaaaaa dsaass de Feijoada 3 0.00000000
|
||||
aaaaaaaaa dsaass de Mousse de Chocolate 4 0.00000000
|
||||
ssde df s fsda sad er um copo de Vodka 5 0.00000000
|
||||
ssde df s fsda sad er um chocolate Snickers 6 0.00000000
|
||||
aaaaaaaaa dsaass de Bife 7 0.00000000
|
||||
aaaaaaaaa dsaass de Pizza de Salmao 8 0.00000000
|
||||
aaaaaaaaa dsaass de sushi 1 1.923787
|
||||
aaaaaaaaa dsaass de Bolo de Chocolate 2 0.000000
|
||||
aaaaaaaaa dsaass de Feijoada 3 0.000000
|
||||
aaaaaaaaa dsaass de Mousse de Chocolate 4 0.000000
|
||||
ssde df s fsda sad er um copo de Vodka 5 0.000000
|
||||
ssde df s fsda sad er um chocolate Snickers 6 0.000000
|
||||
aaaaaaaaa dsaass de Bife 7 0.000000
|
||||
aaaaaaaaa dsaass de Pizza de Salmao 8 0.000000
|
||||
SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi' IN BOOLEAN MODE)
|
||||
as x FROM t1, t2 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
|
||||
q item id x
|
||||
@ -43,17 +43,17 @@ ssde df s fsda sad er um copo de Vodka 5 0
|
||||
ssde df s fsda sad er um chocolate Snickers 6 0
|
||||
aaaaaaaaa dsaass de Bife 7 0
|
||||
aaaaaaaaa dsaass de Pizza de Salmao 8 0
|
||||
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),8)
|
||||
SELECT t1.q, t2.item, t2.id, round(MATCH t2.item AGAINST ('sushi'),6)
|
||||
as x FROM t2, t1 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
|
||||
q item id x
|
||||
aaaaaaaaa dsaass de sushi 1 1.92378664
|
||||
aaaaaaaaa dsaass de Bolo de Chocolate 2 0.00000000
|
||||
aaaaaaaaa dsaass de Feijoada 3 0.00000000
|
||||
aaaaaaaaa dsaass de Mousse de Chocolate 4 0.00000000
|
||||
ssde df s fsda sad er um copo de Vodka 5 0.00000000
|
||||
ssde df s fsda sad er um chocolate Snickers 6 0.00000000
|
||||
aaaaaaaaa dsaass de Bife 7 0.00000000
|
||||
aaaaaaaaa dsaass de Pizza de Salmao 8 0.00000000
|
||||
aaaaaaaaa dsaass de sushi 1 1.923787
|
||||
aaaaaaaaa dsaass de Bolo de Chocolate 2 0.000000
|
||||
aaaaaaaaa dsaass de Feijoada 3 0.000000
|
||||
aaaaaaaaa dsaass de Mousse de Chocolate 4 0.000000
|
||||
ssde df s fsda sad er um copo de Vodka 5 0.000000
|
||||
ssde df s fsda sad er um chocolate Snickers 6 0.000000
|
||||
aaaaaaaaa dsaass de Bife 7 0.000000
|
||||
aaaaaaaaa dsaass de Pizza de Salmao 8 0.000000
|
||||
SELECT t1.q, t2.item, t2.id, MATCH t2.item AGAINST ('sushi' IN BOOLEAN MODE)
|
||||
as x FROM t2, t1 WHERE (t2.id2 = t1.id) ORDER BY x DESC,t2.id;
|
||||
q item id x
|
||||
|
@ -90,6 +90,26 @@ id avg(rating)
|
||||
1 3.0000
|
||||
2 NULL
|
||||
3 2.0000
|
||||
select sql_small_result t2.id, avg(rating) from t2 group by t2.id;
|
||||
id avg(rating)
|
||||
1 3.0000
|
||||
2 NULL
|
||||
3 2.0000
|
||||
select sql_big_result t2.id, avg(rating) from t2 group by t2.id;
|
||||
id avg(rating)
|
||||
1 3.0000
|
||||
2 NULL
|
||||
3 2.0000
|
||||
select sql_small_result t2.id, avg(rating+0.0e0) from t2 group by t2.id;
|
||||
id avg(rating+0.0e0)
|
||||
1 3
|
||||
2 NULL
|
||||
3 2
|
||||
select sql_big_result t2.id, avg(rating+0.0e0) from t2 group by t2.id;
|
||||
id avg(rating+0.0e0)
|
||||
1 3
|
||||
2 NULL
|
||||
3 2
|
||||
drop table t1,t2;
|
||||
create table t1 (a smallint(6) primary key, c char(10), b text);
|
||||
INSERT INTO t1 VALUES (1,'1','1');
|
||||
|
@ -30,6 +30,12 @@ Y-N-N-Y-N Y,N,N,Y,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,
|
||||
select elt(2,1),field(NULL,"a","b","c");
|
||||
elt(2,1) field(NULL,"a","b","c")
|
||||
NULL 0
|
||||
select field("b","a",NULL),field(1,0,NULL)+0,field(1.0,0.0,NULL)+0.0,field(1.0e1,0.0e1,NULL)+0.0e1;
|
||||
field("b","a",NULL) field(1,0,NULL)+0 field(1.0,0.0,NULL)+0.0 field(1.0e1,0.0e1,NULL)+0.0e1
|
||||
0 0 0.0 0
|
||||
select field(NULL,"a",NULL),field(NULL,0,NULL)+0,field(NULL,0.0,NULL)+0.0,field(NULL,0.0e1,NULL)+0.0e1;
|
||||
field(NULL,"a",NULL) field(NULL,0,NULL)+0 field(NULL,0.0,NULL)+0.0 field(NULL,0.0e1,NULL)+0.0e1
|
||||
0 0 0.0 0
|
||||
select find_in_set("","a,b,c"),find_in_set("","a,b,c,"),find_in_set("",",a,b,c");
|
||||
find_in_set("","a,b,c") find_in_set("","a,b,c,") find_in_set("",",a,b,c")
|
||||
0 4 1
|
||||
|
@ -125,7 +125,7 @@ Field Type Collation Null Key Default Extra Privileges Comment
|
||||
a int(11) NULL YES MUL NULL select,insert,update,references
|
||||
show full columns from mysql.db like "Insert%";
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
Insert_priv enum('N','Y') utf8_bin NO N select,insert,update,references
|
||||
Insert_priv enum('N','Y') utf8_general_ci NO N select,insert,update,references
|
||||
show full columns from v1;
|
||||
Field Type Collation Null Key Default Extra Privileges Comment
|
||||
c varchar(64) utf8_general_ci NO select,insert,update,references
|
||||
@ -604,3 +604,9 @@ Variable_name Value
|
||||
show global status like "Threads_running";
|
||||
Variable_name Value
|
||||
Threads_running 1
|
||||
create table t1(f1 int);
|
||||
create table t2(f2 int);
|
||||
create view v1 as select * from t1, t2;
|
||||
set @got_val= (select count(*) from information_schema.columns);
|
||||
drop view v1;
|
||||
drop table t1, t2;
|
||||
|
@ -271,7 +271,7 @@ n
|
||||
6
|
||||
7
|
||||
rollback to savepoint `my_savepoint`;
|
||||
ERROR HY000: Got error 153 during ROLLBACK
|
||||
ERROR 42000: SAVEPOINT my_savepoint does not exist
|
||||
set autocommit=1;
|
||||
rollback;
|
||||
drop table t1;
|
||||
@ -1633,14 +1633,14 @@ t2 CREATE TABLE `t2` (
|
||||
drop table t2, t1;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 25
|
||||
Binlog_cache_use 152
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 0
|
||||
create table t1 (a int) engine=innodb;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 26
|
||||
Binlog_cache_use 153
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
@ -1649,7 +1649,7 @@ delete from t1;
|
||||
commit;
|
||||
show status like "binlog_cache_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_use 27
|
||||
Binlog_cache_use 154
|
||||
show status like "binlog_cache_disk_use";
|
||||
Variable_name Value
|
||||
Binlog_cache_disk_use 1
|
||||
@ -1718,9 +1718,6 @@ Innodb_rows_deleted 2070
|
||||
show status like "Innodb_rows_inserted";
|
||||
Variable_name Value
|
||||
Innodb_rows_inserted 31708
|
||||
show status like "Innodb_rows_read";
|
||||
Variable_name Value
|
||||
Innodb_rows_read 80162
|
||||
show status like "Innodb_rows_updated";
|
||||
Variable_name Value
|
||||
Innodb_rows_updated 29530
|
||||
|
@ -74,8 +74,8 @@ insert into t1 select * from t2;
|
||||
ERROR 23000: Duplicate entry '2' for key 1
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 95 Query 1 190 use `test`; insert into t1 select * from t2
|
||||
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 96 Query 1 191 use `test`; insert into t1 select * from t2
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
@ -88,7 +88,7 @@ create table t2(unique(a)) select a from t1;
|
||||
ERROR 23000: Duplicate entry '1' for key 1
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||
drop table t1;
|
||||
create table t1 (a int not null);
|
||||
create table t2 (a int not null);
|
||||
|
@ -140,10 +140,10 @@ a b c
|
||||
5 6 130
|
||||
TRUNCATE TABLE t1;
|
||||
INSERT t1 VALUES (1,2,10), (3,4,20);
|
||||
CREATE TABLE t2 (x INT, y INT, z INT, d INT);
|
||||
CREATE TABLE t2 (a INT, b INT, c INT, d INT);
|
||||
INSERT t2 VALUES (5,6,30,1), (7,4,40,1), (8,9,60,1);
|
||||
INSERT t2 VALUES (2,1,11,2), (7,4,40,2);
|
||||
INSERT t1 SELECT x,y,z FROM t2 WHERE d=1 ON DUPLICATE KEY UPDATE c=c+100;
|
||||
INSERT t1 SELECT a,b,c FROM t2 WHERE d=1 ON DUPLICATE KEY UPDATE c=c+100;
|
||||
SELECT * FROM t1;
|
||||
a b c
|
||||
1 2 10
|
||||
@ -157,7 +157,7 @@ a b c
|
||||
3 4 120
|
||||
5 0 30
|
||||
8 9 60
|
||||
INSERT t1 SELECT x,y,z FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=c+VALUES(a);
|
||||
INSERT t1 SELECT a,b,c FROM t2 WHERE d=2 ON DUPLICATE KEY UPDATE c=c+VALUES(a);
|
||||
SELECT *, VALUES(a) FROM t1;
|
||||
a b c VALUES(a)
|
||||
1 2 10 NULL
|
||||
|
@ -141,3 +141,21 @@ select * from T1;
|
||||
a b
|
||||
1 abc
|
||||
drop table T1;
|
||||
create database mysqltest_LC2;
|
||||
use mysqltest_LC2;
|
||||
create table myUC (i int);
|
||||
insert into myUC values (1),(2),(3);
|
||||
select * from myUC;
|
||||
i
|
||||
1
|
||||
2
|
||||
3
|
||||
use test;
|
||||
drop database mysqltest_LC2;
|
||||
create database mysqltest_LC2;
|
||||
use mysqltest_LC2;
|
||||
create table myUC (i int);
|
||||
select * from myUC;
|
||||
i
|
||||
use test;
|
||||
drop database mysqltest_LC2;
|
||||
|
@ -6,5 +6,5 @@ drop table t1;
|
||||
flush tables;
|
||||
CREATE TABLE t1 (a int) ENGINE=INNODB;
|
||||
SELECT * from T1;
|
||||
ERROR HY000: Can't open file: 'T1.ibd' (errno: 1)
|
||||
ERROR 42S02: Table 'test.T1' doesn't exist
|
||||
drop table t1;
|
||||
|
23
mysql-test/r/lowercase_table_grant.result
Normal file
23
mysql-test/r/lowercase_table_grant.result
Normal file
@ -0,0 +1,23 @@
|
||||
use mysql;
|
||||
create database MYSQLtest;
|
||||
grant all on MySQLtest.* to mysqltest_1@localhost;
|
||||
show grants for mysqltest_1@localhost;
|
||||
Grants for mysqltest_1@localhost
|
||||
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
|
||||
select * from db where user = 'mysqltest_1';
|
||||
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv
|
||||
localhost mysqltest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y
|
||||
update db set db = 'MYSQLtest' where db = 'mysqltest' and user = 'mysqltest_1' and host = 'localhost';
|
||||
flush privileges;
|
||||
show grants for mysqltest_1@localhost;
|
||||
Grants for mysqltest_1@localhost
|
||||
GRANT USAGE ON *.* TO 'mysqltest_1'@'localhost'
|
||||
GRANT ALL PRIVILEGES ON `mysqltest`.* TO 'mysqltest_1'@'localhost'
|
||||
select * from db where user = 'mysqltest_1';
|
||||
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv
|
||||
localhost MYSQLtest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y
|
||||
delete from db where db = 'MYSQLtest' and user = 'mysqltest_1' and host = 'localhost';
|
||||
flush privileges;
|
||||
drop user mysqltest_1@localhost;
|
||||
drop database MYSQLtest;
|
@ -6,12 +6,12 @@ begin;
|
||||
insert into t1 values(1);
|
||||
insert into t2 select * from t1;
|
||||
commit;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(1)
|
||||
master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 347 Query 1 # use `test`; COMMIT
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(1)
|
||||
master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 348 Xid 1 # COMMIT /* xid=7 */
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
reset master;
|
||||
@ -21,12 +21,12 @@ insert into t2 select * from t1;
|
||||
rollback;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(2)
|
||||
master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 347 Query 1 # use `test`; ROLLBACK
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(2)
|
||||
master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 348 Query 1 # use `test`; ROLLBACK
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
reset master;
|
||||
@ -39,15 +39,15 @@ rollback to savepoint my_savepoint;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
commit;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(3)
|
||||
master-bin.000001 252 Query 1 # use `test`; savepoint my_savepoint
|
||||
master-bin.000001 338 Query 1 # use `test`; insert into t1 values(4)
|
||||
master-bin.000001 426 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 521 Query 1 # use `test`; rollback to savepoint my_savepoint
|
||||
master-bin.000001 619 Query 1 # use `test`; COMMIT
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(3)
|
||||
master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint
|
||||
master-bin.000001 339 Query 1 # use `test`; insert into t1 values(4)
|
||||
master-bin.000001 427 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 522 Query 1 # use `test`; rollback to savepoint my_savepoint
|
||||
master-bin.000001 620 Xid 1 # COMMIT /* xid=24 */
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
reset master;
|
||||
@ -65,16 +65,16 @@ select a from t1 order by a;
|
||||
a
|
||||
5
|
||||
7
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(5)
|
||||
master-bin.000001 252 Query 1 # use `test`; savepoint my_savepoint
|
||||
master-bin.000001 338 Query 1 # use `test`; insert into t1 values(6)
|
||||
master-bin.000001 426 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 521 Query 1 # use `test`; rollback to savepoint my_savepoint
|
||||
master-bin.000001 619 Query 1 # use `test`; insert into t1 values(7)
|
||||
master-bin.000001 707 Query 1 # use `test`; COMMIT
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(5)
|
||||
master-bin.000001 253 Query 1 # use `test`; savepoint my_savepoint
|
||||
master-bin.000001 339 Query 1 # use `test`; insert into t1 values(6)
|
||||
master-bin.000001 427 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 522 Query 1 # use `test`; rollback to savepoint my_savepoint
|
||||
master-bin.000001 620 Query 1 # use `test`; insert into t1 values(7)
|
||||
master-bin.000001 708 Xid 1 # COMMIT /* xid=36 */
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
reset master;
|
||||
@ -87,40 +87,47 @@ insert into t2 select * from t1;
|
||||
select get_lock("a",10);
|
||||
get_lock("a",10)
|
||||
1
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(8)
|
||||
master-bin.000001 252 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 347 Query 1 # use `test`; ROLLBACK
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(8)
|
||||
master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 348 Query 1 # use `test`; ROLLBACK
|
||||
master-bin.000001 420 Query 1 # use `test`; DO RELEASE_LOCK("a")
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
reset master;
|
||||
insert into t1 values(9);
|
||||
insert into t2 select * from t1;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; insert into t1 values(9)
|
||||
master-bin.000001 183 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(9)
|
||||
master-bin.000001 253 Xid 1 # COMMIT /* xid=59 */
|
||||
master-bin.000001 280 Query 1 # use `test`; insert into t2 select * from t1
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
reset master;
|
||||
insert into t1 values(10);
|
||||
begin;
|
||||
insert into t2 select * from t1;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; insert into t1 values(10)
|
||||
master-bin.000001 184 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(10)
|
||||
master-bin.000001 254 Xid 1 # COMMIT /* xid=65 */
|
||||
master-bin.000001 281 Query 1 # use `test`; insert into t2 select * from t1
|
||||
insert into t1 values(11);
|
||||
commit;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; insert into t1 values(10)
|
||||
master-bin.000001 184 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 279 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 348 Query 1 # use `test`; insert into t1 values(11)
|
||||
master-bin.000001 437 Query 1 # use `test`; COMMIT
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(10)
|
||||
master-bin.000001 254 Xid 1 # COMMIT /* xid=65 */
|
||||
master-bin.000001 281 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 376 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 445 Query 1 # use `test`; insert into t1 values(11)
|
||||
master-bin.000001 534 Xid 1 # COMMIT /* xid=67 */
|
||||
alter table t2 engine=INNODB;
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
@ -129,12 +136,12 @@ begin;
|
||||
insert into t1 values(12);
|
||||
insert into t2 select * from t1;
|
||||
commit;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(12)
|
||||
master-bin.000001 253 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 348 Query 1 # use `test`; COMMIT
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(12)
|
||||
master-bin.000001 254 Query 1 # use `test`; insert into t2 select * from t1
|
||||
master-bin.000001 349 Xid 1 # COMMIT /* xid=77 */
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
reset master;
|
||||
@ -142,7 +149,7 @@ begin;
|
||||
insert into t1 values(13);
|
||||
insert into t2 select * from t1;
|
||||
rollback;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
@ -154,11 +161,11 @@ insert into t1 values(15);
|
||||
insert into t2 select * from t1;
|
||||
rollback to savepoint my_savepoint;
|
||||
commit;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(14)
|
||||
master-bin.000001 253 Query 1 # use `test`; COMMIT
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(14)
|
||||
master-bin.000001 254 Xid 1 # COMMIT /* xid=93 */
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
reset master;
|
||||
@ -174,12 +181,12 @@ select a from t1 order by a;
|
||||
a
|
||||
16
|
||||
18
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 164 Query 1 # use `test`; insert into t1 values(16)
|
||||
master-bin.000001 253 Query 1 # use `test`; insert into t1 values(18)
|
||||
master-bin.000001 342 Query 1 # use `test`; COMMIT
|
||||
master-bin.000001 96 Query 1 # use `test`; BEGIN
|
||||
master-bin.000001 165 Query 1 # use `test`; insert into t1 values(16)
|
||||
master-bin.000001 254 Query 1 # use `test`; insert into t1 values(18)
|
||||
master-bin.000001 343 Xid 1 # COMMIT /* xid=104 */
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
alter table t2 type=MyISAM;
|
||||
|
@ -15,6 +15,7 @@ flush logs;
|
||||
|
||||
--- Local --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1000000000;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -47,6 +48,7 @@ insert into t1 values ("Alas");
|
||||
|
||||
--- --database --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET INSERT_ID=1;
|
||||
|
||||
--- --position --
|
||||
@ -60,6 +62,7 @@ insert into t1 values ("Alas");
|
||||
|
||||
--- Remote --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1000000000;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -92,6 +95,7 @@ insert into t1 values ("Alas");
|
||||
|
||||
--- --database --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET INSERT_ID=1;
|
||||
|
||||
--- --position --
|
||||
@ -102,4 +106,15 @@ SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.uniq
|
||||
SET @@session.sql_mode=0;
|
||||
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
|
||||
insert into t1 values ("Alas");
|
||||
|
||||
--- reading stdin --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1065204671;
|
||||
BEGIN;
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
use test;
|
||||
SET TIMESTAMP=1065204671;
|
||||
BEGIN;
|
||||
drop table t1, t2;
|
||||
|
@ -16,6 +16,7 @@ insert into t1 values(null, "f");
|
||||
|
||||
--- Local --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -40,6 +41,7 @@ insert into t1 values(null, "e");
|
||||
|
||||
--- offset --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET INSERT_ID=1;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
@ -75,6 +77,7 @@ insert into t1 values(null, "e");
|
||||
|
||||
--- stop-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -93,6 +96,7 @@ insert into t1 values(null, "c");
|
||||
|
||||
--- start-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET INSERT_ID=3;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609944;
|
||||
@ -109,6 +113,7 @@ insert into t1 values(null, "e");
|
||||
|
||||
--- stop-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -124,6 +129,7 @@ insert into t1 values(null, "b");
|
||||
|
||||
--- Local with 2 binlogs on command line --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -155,6 +161,7 @@ insert into t1 values(null, "f");
|
||||
|
||||
--- offset --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET INSERT_ID=1;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
@ -204,6 +211,7 @@ insert into t1 values(null, "f");
|
||||
|
||||
--- stop-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -229,6 +237,7 @@ SET INSERT_ID=6;
|
||||
|
||||
--- start-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET INSERT_ID=3;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609944;
|
||||
@ -252,6 +261,7 @@ insert into t1 values(null, "f");
|
||||
|
||||
--- stop-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -267,6 +277,7 @@ insert into t1 values(null, "b");
|
||||
|
||||
--- Remote --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -291,6 +302,7 @@ insert into t1 values(null, "e");
|
||||
|
||||
--- offset --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET INSERT_ID=1;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
@ -326,6 +338,7 @@ insert into t1 values(null, "e");
|
||||
|
||||
--- stop-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -344,6 +357,7 @@ insert into t1 values(null, "c");
|
||||
|
||||
--- start-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET INSERT_ID=3;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609944;
|
||||
@ -360,6 +374,7 @@ insert into t1 values(null, "e");
|
||||
|
||||
--- stop-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -375,6 +390,7 @@ insert into t1 values(null, "b");
|
||||
|
||||
--- Remote with 2 binlogs on command line --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -406,6 +422,7 @@ insert into t1 values(null, "f");
|
||||
|
||||
--- offset --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET INSERT_ID=1;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
@ -455,6 +472,7 @@ insert into t1 values(null, "f");
|
||||
|
||||
--- stop-position --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -480,6 +498,7 @@ SET INSERT_ID=6;
|
||||
|
||||
--- start-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET INSERT_ID=3;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609944;
|
||||
@ -503,6 +522,7 @@ insert into t1 values(null, "f");
|
||||
|
||||
--- stop-datetime --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
@ -518,6 +538,7 @@ insert into t1 values(null, "b");
|
||||
|
||||
--- to-last-log --
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
use test;
|
||||
SET TIMESTAMP=1579609942;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
|
@ -167,6 +167,25 @@ show status like 'handler_discover%';
|
||||
Variable_name Value
|
||||
Handler_discover 0
|
||||
drop table t4;
|
||||
ERROR 42S02: Unknown table 't4'
|
||||
create table t4(
|
||||
id int not null primary key,
|
||||
name char(27)
|
||||
) engine=ndb;
|
||||
insert into t4 values (1, "Automatic");
|
||||
select * from t4;
|
||||
id name
|
||||
1 Automatic
|
||||
select * from t4;
|
||||
ERROR 42S02: Table 'test.t4' doesn't exist
|
||||
drop table if exists t4;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't4'
|
||||
drop table t5;
|
||||
ERROR 42S02: Unknown table 't5'
|
||||
drop table if exists t5;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 't5'
|
||||
flush status;
|
||||
create table t4(
|
||||
id int not null primary key,
|
||||
|
@ -1,7 +1,7 @@
|
||||
drop table if exists t1;
|
||||
set GLOBAL query_cache_type=on;
|
||||
set GLOBAL query_cache_size=1355776;
|
||||
set GLOBAL ndb_cache_check_time=5;
|
||||
set GLOBAL ndb_cache_check_time=1;
|
||||
reset query cache;
|
||||
flush status;
|
||||
CREATE TABLE t1 ( pk int not null primary key,
|
||||
|
@ -554,6 +554,89 @@ select count(*)-9 from t1 use index (ts) where ts <= '2001-01-01 23:59:59';
|
||||
count(*)-9
|
||||
0
|
||||
drop table t1;
|
||||
create table t1 (
|
||||
a int primary key,
|
||||
s decimal(12),
|
||||
t decimal(12, 5),
|
||||
u decimal(12) unsigned,
|
||||
v decimal(12, 5) unsigned,
|
||||
key (s),
|
||||
key (t),
|
||||
key (u),
|
||||
key (v)
|
||||
) engine=ndb;
|
||||
insert into t1 values
|
||||
( 0, -000000000007, -0000061.00003, 000000000061, 0000965.00042),
|
||||
( 1, -000000000007, -0000061.00042, 000000000061, 0000965.00003),
|
||||
( 2, -071006035767, 4210253.00024, 000000000001, 0000001.84488),
|
||||
( 3, 000000007115, 0000000.77607, 000077350625, 0000018.00013),
|
||||
( 4, -000000068391, -0346486.00000, 000000005071, 0005334.00002),
|
||||
( 5, -521579890459, -1936874.00001, 000000000154, 0000003.00018),
|
||||
( 6, -521579890459, -1936874.00018, 000000000154, 0000003.00001),
|
||||
( 7, 000000000333, 0000051.39140, 000000907958, 0788643.08374),
|
||||
( 8, 000042731229, 0000009.00000, 000000000009, 6428667.00000),
|
||||
( 9, -000008159769, 0000918.00004, 000096951421, 7607730.00008);
|
||||
select count(*)- 5 from t1 use index (s) where s < -000000000007;
|
||||
count(*)- 5
|
||||
0
|
||||
select count(*)- 7 from t1 use index (s) where s <= -000000000007;
|
||||
count(*)- 7
|
||||
0
|
||||
select count(*)- 2 from t1 use index (s) where s = -000000000007;
|
||||
count(*)- 2
|
||||
0
|
||||
select count(*)- 5 from t1 use index (s) where s >= -000000000007;
|
||||
count(*)- 5
|
||||
0
|
||||
select count(*)- 3 from t1 use index (s) where s > -000000000007;
|
||||
count(*)- 3
|
||||
0
|
||||
select count(*)- 4 from t1 use index (t) where t < -0000061.00003;
|
||||
count(*)- 4
|
||||
0
|
||||
select count(*)- 5 from t1 use index (t) where t <= -0000061.00003;
|
||||
count(*)- 5
|
||||
0
|
||||
select count(*)- 1 from t1 use index (t) where t = -0000061.00003;
|
||||
count(*)- 1
|
||||
0
|
||||
select count(*)- 6 from t1 use index (t) where t >= -0000061.00003;
|
||||
count(*)- 6
|
||||
0
|
||||
select count(*)- 5 from t1 use index (t) where t > -0000061.00003;
|
||||
count(*)- 5
|
||||
0
|
||||
select count(*)- 2 from t1 use index (u) where u < 000000000061;
|
||||
count(*)- 2
|
||||
0
|
||||
select count(*)- 4 from t1 use index (u) where u <= 000000000061;
|
||||
count(*)- 4
|
||||
0
|
||||
select count(*)- 2 from t1 use index (u) where u = 000000000061;
|
||||
count(*)- 2
|
||||
0
|
||||
select count(*)- 8 from t1 use index (u) where u >= 000000000061;
|
||||
count(*)- 8
|
||||
0
|
||||
select count(*)- 6 from t1 use index (u) where u > 000000000061;
|
||||
count(*)- 6
|
||||
0
|
||||
select count(*)- 5 from t1 use index (v) where v < 0000965.00042;
|
||||
count(*)- 5
|
||||
0
|
||||
select count(*)- 6 from t1 use index (v) where v <= 0000965.00042;
|
||||
count(*)- 6
|
||||
0
|
||||
select count(*)- 1 from t1 use index (v) where v = 0000965.00042;
|
||||
count(*)- 1
|
||||
0
|
||||
select count(*)- 5 from t1 use index (v) where v >= 0000965.00042;
|
||||
count(*)- 5
|
||||
0
|
||||
select count(*)- 4 from t1 use index (v) where v > 0000965.00042;
|
||||
count(*)- 4
|
||||
0
|
||||
drop table t1;
|
||||
create table t1(a int primary key, b int not null, index(b));
|
||||
insert into t1 values (1,1), (2,2);
|
||||
set autocommit=0;
|
||||
|
@ -74,15 +74,15 @@ Table Op Msg_type Msg_text
|
||||
test.t1 preload_keys status OK
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 0
|
||||
Key_reads 0
|
||||
Key_read_requests 581
|
||||
Key_reads 581
|
||||
select count(*) from t1 where b = 'test1';
|
||||
count(*)
|
||||
4181
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 217
|
||||
Key_reads 45
|
||||
Key_read_requests 798
|
||||
Key_reads 581
|
||||
flush tables;
|
||||
flush status;
|
||||
show status like "key_read%";
|
||||
@ -98,15 +98,15 @@ Table Op Msg_type Msg_text
|
||||
test.t1 preload_keys status OK
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 0
|
||||
Key_reads 0
|
||||
Key_read_requests 10
|
||||
Key_reads 10
|
||||
select count(*) from t1 where b = 'test1';
|
||||
count(*)
|
||||
4181
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 217
|
||||
Key_reads 45
|
||||
Key_read_requests 227
|
||||
Key_reads 52
|
||||
flush tables;
|
||||
flush status;
|
||||
show status like "key_read%";
|
||||
@ -123,8 +123,8 @@ test.t1 preload_keys status OK
|
||||
test.t2 preload_keys status OK
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 0
|
||||
Key_reads 0
|
||||
Key_read_requests 587
|
||||
Key_reads 587
|
||||
select count(*) from t1 where b = 'test1';
|
||||
count(*)
|
||||
4181
|
||||
@ -133,8 +133,8 @@ count(*)
|
||||
2584
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 351
|
||||
Key_reads 73
|
||||
Key_read_requests 938
|
||||
Key_reads 613
|
||||
flush tables;
|
||||
flush status;
|
||||
show status like "key_read%";
|
||||
@ -147,8 +147,8 @@ test.t3 preload_keys error Table 'test.t3' doesn't exist
|
||||
test.t2 preload_keys status OK
|
||||
show status like "key_read%";
|
||||
Variable_name Value
|
||||
Key_read_requests 0
|
||||
Key_reads 0
|
||||
Key_read_requests 355
|
||||
Key_reads 355
|
||||
flush tables;
|
||||
flush status;
|
||||
show status like "key_read%";
|
||||
|
@ -2674,7 +2674,6 @@ Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'c7' at row 1
|
||||
Note 1265 Data truncated for column 'c12' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 1
|
||||
@ -2725,7 +2724,6 @@ Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'c7' at row 1
|
||||
Note 1265 Data truncated for column 'c12' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 -1
|
||||
|
@ -59,8 +59,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63
|
||||
def test t9 t9 c8 c8 5 22 1 Y 32768 31 63
|
||||
def test t9 t9 c9 c9 5 22 1 Y 32768 31 63
|
||||
def test t9 t9 c10 c10 5 22 1 Y 32768 31 63
|
||||
def test t9 t9 c11 c11 0 9 6 Y 32768 4 63
|
||||
def test t9 t9 c12 c12 0 10 6 Y 32768 4 63
|
||||
def test t9 t9 c11 c11 246 7 6 Y 0 4 63
|
||||
def test t9 t9 c12 c12 246 8 6 Y 0 4 63
|
||||
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
|
||||
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
|
||||
def test t9 t9 c15 c15 7 19 19 N 1249 0 63
|
||||
@ -1755,8 +1755,8 @@ Table Create Table
|
||||
t5 CREATE TABLE `t5` (
|
||||
`const01` bigint(1) NOT NULL default '0',
|
||||
`param01` bigint(20) default NULL,
|
||||
`const02` double(3,1) NOT NULL default '0.0',
|
||||
`param02` double default NULL,
|
||||
`const02` decimal(3,1) NOT NULL default '0.0',
|
||||
`param02` decimal(64,30) default NULL,
|
||||
`const03` double NOT NULL default '0',
|
||||
`param03` double default NULL,
|
||||
`const04` varchar(3) NOT NULL default '',
|
||||
@ -1777,7 +1777,7 @@ t5 CREATE TABLE `t5` (
|
||||
`param11` bigint(20) default NULL,
|
||||
`const12` binary(0) default NULL,
|
||||
`param12` bigint(20) default NULL,
|
||||
`param13` double default NULL,
|
||||
`param13` decimal(64,30) default NULL,
|
||||
`param14` longtext,
|
||||
`param15` longblob
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
@ -1785,9 +1785,9 @@ select * from t5 ;
|
||||
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
|
||||
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
|
||||
def test t5 t5 const02 const02 5 3 3 N 32769 1 63
|
||||
def test t5 t5 param02 param02 5 20 1 Y 32768 31 63
|
||||
def test t5 t5 const03 const03 5 23 1 N 32769 31 63
|
||||
def test t5 t5 const02 const02 246 3 3 N 1 1 63
|
||||
def test t5 t5 param02 param02 246 64 32 Y 0 30 63
|
||||
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
|
||||
def test t5 t5 param03 param03 5 20 1 Y 32768 31 63
|
||||
def test t5 t5 const04 const04 253 3 3 N 1 0 8
|
||||
def test t5 t5 param04 param04 252 16777215 3 Y 16 0 8
|
||||
@ -1807,13 +1807,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
|
||||
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
|
||||
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
|
||||
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
|
||||
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
|
||||
def test t5 t5 param13 param13 246 64 0 Y 0 30 63
|
||||
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
|
||||
def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63
|
||||
const01 8
|
||||
param01 8
|
||||
const02 8.0
|
||||
param02 8
|
||||
param02 8.000000000000000000000000000000
|
||||
const03 8
|
||||
param03 8
|
||||
const04 abc
|
||||
@ -1905,8 +1905,8 @@ def @arg07 253 20 1 Y 128 31 63
|
||||
def @arg08 253 20 1 Y 128 31 63
|
||||
def @arg09 253 20 1 Y 128 31 63
|
||||
def @arg10 253 20 1 Y 128 31 63
|
||||
def @arg11 253 20 1 Y 128 31 63
|
||||
def @arg12 253 20 1 Y 128 31 63
|
||||
def @arg11 253 64 6 Y 128 30 63
|
||||
def @arg12 253 64 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
@ -1928,7 +1928,7 @@ def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
|
||||
@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8,
|
||||
@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12,
|
||||
@ -1952,8 +1952,8 @@ def @arg07 253 20 0 Y 128 31 63
|
||||
def @arg08 253 20 0 Y 128 31 63
|
||||
def @arg09 253 20 0 Y 128 31 63
|
||||
def @arg10 253 20 0 Y 128 31 63
|
||||
def @arg11 253 20 0 Y 128 31 63
|
||||
def @arg12 253 20 0 Y 128 31 63
|
||||
def @arg11 253 64 0 Y 128 30 63
|
||||
def @arg12 253 64 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
@ -2002,8 +2002,8 @@ def @arg07 253 20 1 Y 128 31 63
|
||||
def @arg08 253 20 1 Y 128 31 63
|
||||
def @arg09 253 20 1 Y 128 31 63
|
||||
def @arg10 253 20 1 Y 128 31 63
|
||||
def @arg11 253 20 1 Y 128 31 63
|
||||
def @arg12 253 20 1 Y 128 31 63
|
||||
def @arg11 253 64 6 Y 128 30 63
|
||||
def @arg12 253 64 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
@ -2025,7 +2025,7 @@ def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
execute stmt1 using @my_key ;
|
||||
@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32
|
||||
@ -2042,8 +2042,8 @@ def @arg07 253 20 0 Y 128 31 63
|
||||
def @arg08 253 20 0 Y 128 31 63
|
||||
def @arg09 253 20 0 Y 128 31 63
|
||||
def @arg10 253 20 0 Y 128 31 63
|
||||
def @arg11 253 20 0 Y 128 31 63
|
||||
def @arg12 253 20 0 Y 128 31 63
|
||||
def @arg11 253 64 0 Y 128 30 63
|
||||
def @arg12 253 64 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
@ -2090,8 +2090,8 @@ def @arg07 253 20 1 Y 128 31 63
|
||||
def @arg08 253 20 1 Y 128 31 63
|
||||
def @arg09 253 20 1 Y 128 31 63
|
||||
def @arg10 253 20 1 Y 128 31 63
|
||||
def @arg11 253 20 1 Y 128 31 63
|
||||
def @arg12 253 20 1 Y 128 31 63
|
||||
def @arg11 253 64 6 Y 128 30 63
|
||||
def @arg12 253 64 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
@ -2113,7 +2113,7 @@ def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
|
||||
c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24,
|
||||
c25, c26, c27, c28, c29, c30, c31, c32
|
||||
@ -2134,8 +2134,8 @@ def @arg07 253 20 0 Y 128 31 63
|
||||
def @arg08 253 20 0 Y 128 31 63
|
||||
def @arg09 253 20 0 Y 128 31 63
|
||||
def @arg10 253 20 0 Y 128 31 63
|
||||
def @arg11 253 20 0 Y 128 31 63
|
||||
def @arg12 253 20 0 Y 128 31 63
|
||||
def @arg11 253 64 0 Y 128 30 63
|
||||
def @arg12 253 64 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
@ -2180,8 +2180,8 @@ def @arg07 253 20 1 Y 128 31 63
|
||||
def @arg08 253 20 1 Y 128 31 63
|
||||
def @arg09 253 20 1 Y 128 31 63
|
||||
def @arg10 253 20 1 Y 128 31 63
|
||||
def @arg11 253 20 1 Y 128 31 63
|
||||
def @arg12 253 20 1 Y 128 31 63
|
||||
def @arg11 253 64 6 Y 128 30 63
|
||||
def @arg12 253 64 6 Y 128 30 63
|
||||
def @arg13 253 8192 10 Y 128 31 63
|
||||
def @arg14 253 8192 19 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
@ -2203,7 +2203,7 @@ def @arg30 253 8192 8 Y 0 31 8
|
||||
def @arg31 253 8192 3 Y 0 31 8
|
||||
def @arg32 253 8192 6 Y 0 31 8
|
||||
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
|
||||
set @my_key= 0 ;
|
||||
execute stmt1 using @my_key ;
|
||||
execute full_info ;
|
||||
@ -2218,8 +2218,8 @@ def @arg07 253 20 0 Y 128 31 63
|
||||
def @arg08 253 20 0 Y 128 31 63
|
||||
def @arg09 253 20 0 Y 128 31 63
|
||||
def @arg10 253 20 0 Y 128 31 63
|
||||
def @arg11 253 20 0 Y 128 31 63
|
||||
def @arg12 253 20 0 Y 128 31 63
|
||||
def @arg11 253 64 0 Y 128 30 63
|
||||
def @arg12 253 64 0 Y 128 30 63
|
||||
def @arg13 253 8192 0 Y 128 31 63
|
||||
def @arg14 253 8192 0 Y 128 31 63
|
||||
def @arg15 253 8192 19 Y 128 31 63
|
||||
@ -2567,7 +2567,7 @@ c7 9.22337e+18
|
||||
c8 9.22337203685478e+18
|
||||
c9 9.22337203685478e+18
|
||||
c10 9.22337203685478e+18
|
||||
c12 99999.9999
|
||||
c12 9999.9999
|
||||
execute my_delete ;
|
||||
set @arg00= '9223372036854775807' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@ -2590,7 +2590,7 @@ c7 9.22337e+18
|
||||
c8 9.22337203685478e+18
|
||||
c9 9.22337203685478e+18
|
||||
c10 9.22337203685478e+18
|
||||
c12 99999.9999
|
||||
c12 9999.9999
|
||||
execute my_delete ;
|
||||
set @arg00= -9223372036854775808 ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@ -2661,7 +2661,7 @@ c7 3.40282e+38
|
||||
c8 1.11111111111111e+50
|
||||
c9 1.11111111111111e+50
|
||||
c10 1.11111111111111e+50
|
||||
c12 99999.9999
|
||||
c12 9999.9999
|
||||
execute my_delete ;
|
||||
set @arg00= '1.11111111111111111111e+50' ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@ -2674,7 +2674,6 @@ Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'c7' at row 1
|
||||
Note 1265 Data truncated for column 'c12' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 1
|
||||
@ -2687,7 +2686,7 @@ c7 3.40282e+38
|
||||
c8 1.11111111111111e+50
|
||||
c9 1.11111111111111e+50
|
||||
c10 1.11111111111111e+50
|
||||
c12 99999.9999
|
||||
c12 9999.9999
|
||||
execute my_delete ;
|
||||
set @arg00= -1.11111111111111111111e+50 ;
|
||||
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
|
||||
@ -2725,7 +2724,6 @@ Warning 1265 Data truncated for column 'c4' at row 1
|
||||
Warning 1265 Data truncated for column 'c5' at row 1
|
||||
Warning 1265 Data truncated for column 'c6' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'c7' at row 1
|
||||
Note 1265 Data truncated for column 'c12' at row 1
|
||||
Warning 1264 Out of range value adjusted for column 'c12' at row 1
|
||||
execute my_select ;
|
||||
c1 -1
|
||||
@ -2798,10 +2796,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30
|
||||
41 4 41 41 41 41 41 41 41 41 41 41
|
||||
42 4 42 42 42 42 42 42 42 42 42 42
|
||||
43 4 43 43 43 43 43 43 43 43 43 43
|
||||
50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00
|
||||
51 5 51 51 51 51 51 51 51 51 51 51
|
||||
52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00
|
||||
53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00
|
||||
50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0
|
||||
51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0
|
||||
52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0
|
||||
53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0
|
||||
54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00
|
||||
55 5 55 55 55 55 55 55 55 55 55 55
|
||||
56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00
|
||||
|
@ -1,7 +1,7 @@
|
||||
reset master;
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 95
|
||||
master-bin.000001 96
|
||||
reset slave;
|
||||
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
|
||||
@ -17,7 +17,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
|
||||
start slave;
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 95 # # master-bin.000001 Yes Yes 0 0 95 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No #
|
||||
drop table if exists t1;
|
||||
create table t1 (n int);
|
||||
insert into t1 values (10),(45),(90);
|
||||
|
@ -16,11 +16,11 @@ n
|
||||
1
|
||||
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
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 376 # # master-bin.000001 No No 0 0 288 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 377 # # master-bin.000001 No No 0 0 289 # None 0 No #
|
||||
change master to master_user='root';
|
||||
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
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 288 # # master-bin.000001 No No 0 0 288 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 289 # # master-bin.000001 No No 0 0 289 # None 0 No #
|
||||
select release_lock("a");
|
||||
release_lock("a")
|
||||
1
|
||||
|
@ -103,7 +103,7 @@ a b
|
||||
1 cp850_general_ci
|
||||
drop database mysqltest2;
|
||||
drop database mysqltest3;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # drop database if exists mysqltest2
|
||||
master-bin.000001 # Query 1 # drop database if exists mysqltest3
|
||||
@ -175,6 +175,7 @@ select hex(c1), hex(c2) from t1;
|
||||
hex(c1) hex(c2)
|
||||
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
ROLLBACK;
|
||||
SET TIMESTAMP=1000000000;
|
||||
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
|
||||
SET @@session.sql_mode=0;
|
||||
|
12
mysql-test/r/rpl_drop_temp.result
Normal file
12
mysql-test/r/rpl_drop_temp.result
Normal file
@ -0,0 +1,12 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create database if not exists mysqltest;
|
||||
create temporary table mysqltest.t1 (n int);
|
||||
create temporary table mysqltest.t2 (n int);
|
||||
show status like 'Slave_open_temp_tables';
|
||||
Variable_name Value
|
||||
Slave_open_temp_tables 0
|
@ -9,7 +9,7 @@ insert into t1 values (1),(1);
|
||||
ERROR 23000: Duplicate entry '1' for key 1
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 287 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 287 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 288 # # master-bin.000001 Yes Yes test.t3,test.t1,test.t2 0 0 288 # None 0 No #
|
||||
show tables like 't1';
|
||||
Tables_in_test (t1)
|
||||
drop table t1;
|
||||
@ -26,14 +26,14 @@ select (@id := id) - id from t3;
|
||||
0
|
||||
kill @id;
|
||||
drop table t2,t3;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 194 use `test`; create table t1 (a int primary key)
|
||||
master-bin.000001 194 Query 1 287 use `test`; insert into t1 values (1),(1)
|
||||
master-bin.000001 287 Query 1 364 use `test`; drop table t1
|
||||
master-bin.000001 364 Query 1 463 use `test`; create table t2 (a int primary key)
|
||||
master-bin.000001 463 Query 1 551 use `test`; insert into t2 values(1)
|
||||
master-bin.000001 551 Query 1 639 use `test`; create table t3 (id int)
|
||||
master-bin.000001 639 Query 1 741 use `test`; insert into t3 values(connection_id())
|
||||
master-bin.000001 741 Query 1 861 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10)
|
||||
master-bin.000001 861 Query 1 941 use `test`; drop table t2,t3
|
||||
master-bin.000001 96 Query 1 195 use `test`; create table t1 (a int primary key)
|
||||
master-bin.000001 195 Query 1 288 use `test`; insert into t1 values (1),(1)
|
||||
master-bin.000001 288 Query 1 365 use `test`; drop table t1
|
||||
master-bin.000001 365 Query 1 464 use `test`; create table t2 (a int primary key)
|
||||
master-bin.000001 464 Query 1 552 use `test`; insert into t2 values(1)
|
||||
master-bin.000001 552 Query 1 640 use `test`; create table t3 (id int)
|
||||
master-bin.000001 640 Query 1 742 use `test`; insert into t3 values(connection_id())
|
||||
master-bin.000001 742 Query 1 862 use `test`; update t2 set a = a + 1 + get_lock('crash_lock%20C', 10)
|
||||
master-bin.000001 862 Query 1 942 use `test`; drop table t2,t3
|
||||
|
@ -14,4 +14,4 @@ start slave;
|
||||
flush logs;
|
||||
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
|
||||
# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 206 # # slave-bin.000001 Yes Yes 0 0 206 # None 0 No #
|
||||
# 127.0.0.1 root SLAVE_PORT 60 slave-bin.000001 207 # # slave-bin.000001 Yes Yes 0 0 207 # None 0 No #
|
||||
|
@ -14,27 +14,27 @@ rename table t1 to t5, t2 to t1;
|
||||
flush no_write_to_binlog tables;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 95 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 95 Query 1 182 use `test`; create table t1 (a int)
|
||||
master-bin.000001 182 Query 1 272 use `test`; insert into t1 values (10)
|
||||
master-bin.000001 272 Query 1 359 use `test`; create table t2 (a int)
|
||||
master-bin.000001 359 Query 1 469 use `test`; create table t3 (a int) engine=merge union(t1)
|
||||
master-bin.000001 469 Query 1 556 use `test`; create table t4 (a int)
|
||||
master-bin.000001 556 Query 1 651 use `test`; insert into t4 select * from t3
|
||||
master-bin.000001 651 Query 1 746 use `test`; rename table t1 to t5, t2 to t1
|
||||
master-bin.000001 4 Format_desc 1 96 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 96 Query 1 183 use `test`; create table t1 (a int)
|
||||
master-bin.000001 183 Query 1 273 use `test`; insert into t1 values (10)
|
||||
master-bin.000001 273 Query 1 360 use `test`; create table t2 (a int)
|
||||
master-bin.000001 360 Query 1 470 use `test`; create table t3 (a int) engine=merge union(t1)
|
||||
master-bin.000001 470 Query 1 557 use `test`; create table t4 (a int)
|
||||
master-bin.000001 557 Query 1 652 use `test`; insert into t4 select * from t3
|
||||
master-bin.000001 652 Query 1 747 use `test`; rename table t1 to t5, t2 to t1
|
||||
select * from t3;
|
||||
a
|
||||
flush tables;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 95 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 95 Query 1 182 use `test`; create table t1 (a int)
|
||||
master-bin.000001 182 Query 1 272 use `test`; insert into t1 values (10)
|
||||
master-bin.000001 272 Query 1 359 use `test`; create table t2 (a int)
|
||||
master-bin.000001 359 Query 1 469 use `test`; create table t3 (a int) engine=merge union(t1)
|
||||
master-bin.000001 469 Query 1 556 use `test`; create table t4 (a int)
|
||||
master-bin.000001 556 Query 1 651 use `test`; insert into t4 select * from t3
|
||||
master-bin.000001 651 Query 1 746 use `test`; rename table t1 to t5, t2 to t1
|
||||
master-bin.000001 746 Query 1 822 use `test`; flush tables
|
||||
master-bin.000001 4 Format_desc 1 96 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 96 Query 1 183 use `test`; create table t1 (a int)
|
||||
master-bin.000001 183 Query 1 273 use `test`; insert into t1 values (10)
|
||||
master-bin.000001 273 Query 1 360 use `test`; create table t2 (a int)
|
||||
master-bin.000001 360 Query 1 470 use `test`; create table t3 (a int) engine=merge union(t1)
|
||||
master-bin.000001 470 Query 1 557 use `test`; create table t4 (a int)
|
||||
master-bin.000001 557 Query 1 652 use `test`; insert into t4 select * from t3
|
||||
master-bin.000001 652 Query 1 747 use `test`; rename table t1 to t5, t2 to t1
|
||||
master-bin.000001 747 Query 1 823 use `test`; flush tables
|
||||
select * from t3;
|
||||
a
|
||||
|
@ -22,7 +22,7 @@ day id category name
|
||||
2003-03-22 2416 a bbbbb
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
slave-bin.000001 1096
|
||||
slave-bin.000001 1097
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
@ -33,7 +33,7 @@ set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1559 # # master-bin.000001 Yes Yes 0 0 1559 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1560 # # master-bin.000001 Yes Yes 0 0 1560 # None 0 No #
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
@ -43,7 +43,7 @@ change master to master_user='test';
|
||||
change master to master_user='root';
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1667 # # master-bin.000001 No No 0 0 1667 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1668 # # master-bin.000001 No No 0 0 1668 # None 0 No #
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
set sql_log_bin=0;
|
||||
@ -64,5 +64,5 @@ terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
||||
ERROR 23000: Duplicate entry '2003-03-22' for key 1
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 536
|
||||
master-bin.000001 537
|
||||
drop table t2;
|
||||
|
@ -10,8 +10,8 @@ create database mysqltest;
|
||||
create table t1(a int, b int, unique(b));
|
||||
use mysqltest;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 197 drop database if exists mysqltest
|
||||
master-bin.000001 197 Query 1 291 create database mysqltest
|
||||
master-bin.000001 96 Query 1 198 drop database if exists mysqltest
|
||||
master-bin.000001 198 Query 1 292 create database mysqltest
|
||||
drop database mysqltest;
|
||||
|
@ -10,5 +10,5 @@ load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
2
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
|
@ -19,25 +19,25 @@ count(*)
|
||||
drop table t1;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 217 Intvar 1 245 INSERT_ID=1
|
||||
master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL)
|
||||
master-bin.000001 337 Query 1 414 use `test`; drop table t1
|
||||
master-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null)
|
||||
master-bin.000001 518 Create_file 1 1188 db=test;table=t1;file_id=1;block_len=581
|
||||
master-bin.000001 1188 Exec_load 1 1211 ;file_id=1
|
||||
master-bin.000001 1211 Query 1 1288 use `test`; drop table t1
|
||||
show binlog events from 95 limit 1;
|
||||
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 218 Intvar 1 246 INSERT_ID=1
|
||||
master-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL)
|
||||
master-bin.000001 338 Query 1 415 use `test`; drop table t1
|
||||
master-bin.000001 415 Query 1 519 use `test`; create table t1 (word char(20) not null)
|
||||
master-bin.000001 519 Create_file 1 1189 db=test;table=t1;file_id=1;block_len=581
|
||||
master-bin.000001 1189 Exec_load 1 1212 ;file_id=1
|
||||
master-bin.000001 1212 Query 1 1289 use `test`; drop table t1
|
||||
show binlog events from 96 limit 1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
show binlog events from 95 limit 2;
|
||||
master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
show binlog events from 96 limit 2;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 217 Intvar 1 245 INSERT_ID=1
|
||||
show binlog events from 95 limit 2,1;
|
||||
master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 218 Intvar 1 246 INSERT_ID=1
|
||||
show binlog events from 96 limit 2,1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL)
|
||||
master-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL)
|
||||
flush logs;
|
||||
create table t5 (a int);
|
||||
drop table t5;
|
||||
@ -49,24 +49,24 @@ insert into t1 values (1);
|
||||
drop table t1;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 217 Intvar 1 245 INSERT_ID=1
|
||||
master-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL)
|
||||
master-bin.000001 337 Query 1 414 use `test`; drop table t1
|
||||
master-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null)
|
||||
master-bin.000001 518 Create_file 1 1188 db=test;table=t1;file_id=1;block_len=581
|
||||
master-bin.000001 1188 Exec_load 1 1211 ;file_id=1
|
||||
master-bin.000001 1211 Query 1 1288 use `test`; drop table t1
|
||||
master-bin.000001 1288 Rotate 1 1332 master-bin.000002;pos=4
|
||||
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 218 Intvar 1 246 INSERT_ID=1
|
||||
master-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL)
|
||||
master-bin.000001 338 Query 1 415 use `test`; drop table t1
|
||||
master-bin.000001 415 Query 1 519 use `test`; create table t1 (word char(20) not null)
|
||||
master-bin.000001 519 Create_file 1 1189 db=test;table=t1;file_id=1;block_len=581
|
||||
master-bin.000001 1189 Exec_load 1 1212 ;file_id=1
|
||||
master-bin.000001 1212 Query 1 1289 use `test`; drop table t1
|
||||
master-bin.000001 1289 Rotate 1 1333 master-bin.000002;pos=4
|
||||
show binlog events in 'master-bin.000002';
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000002 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000002 95 Query 1 182 use `test`; create table t5 (a int)
|
||||
master-bin.000002 182 Query 1 259 use `test`; drop table t5
|
||||
master-bin.000002 259 Query 1 346 use `test`; create table t1 (n int)
|
||||
master-bin.000002 346 Query 1 435 use `test`; insert into t1 values (1)
|
||||
master-bin.000002 435 Query 1 512 use `test`; drop table t1
|
||||
master-bin.000002 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000002 96 Query 1 183 use `test`; create table t5 (a int)
|
||||
master-bin.000002 183 Query 1 260 use `test`; drop table t5
|
||||
master-bin.000002 260 Query 1 347 use `test`; create table t1 (n int)
|
||||
master-bin.000002 347 Query 1 436 use `test`; insert into t1 values (1)
|
||||
master-bin.000002 436 Query 1 513 use `test`; drop table t1
|
||||
show binary logs;
|
||||
Log_name
|
||||
master-bin.000001
|
||||
@ -78,26 +78,26 @@ slave-bin.000001
|
||||
slave-bin.000002
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000001 4 Format_desc 2 95 Server ver: VERSION, Binlog ver: 4
|
||||
slave-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
slave-bin.000001 217 Intvar 1 245 INSERT_ID=1
|
||||
slave-bin.000001 245 Query 1 337 use `test`; insert into t1 values (NULL)
|
||||
slave-bin.000001 337 Query 1 414 use `test`; drop table t1
|
||||
slave-bin.000001 414 Query 1 518 use `test`; create table t1 (word char(20) not null)
|
||||
slave-bin.000001 518 Create_file 1 1197 db=test;table=t1;file_id=1;block_len=581
|
||||
slave-bin.000001 1197 Exec_load 1 1220 ;file_id=1
|
||||
slave-bin.000001 1220 Query 1 1297 use `test`; drop table t1
|
||||
slave-bin.000001 1297 Query 1 1384 use `test`; create table t5 (a int)
|
||||
slave-bin.000001 1384 Query 1 1461 use `test`; drop table t5
|
||||
slave-bin.000001 1461 Rotate 2 1504 slave-bin.000002;pos=4
|
||||
slave-bin.000001 4 Format_desc 2 96 Server ver: VERSION, Binlog ver: 4
|
||||
slave-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
slave-bin.000001 218 Intvar 1 246 INSERT_ID=1
|
||||
slave-bin.000001 246 Query 1 338 use `test`; insert into t1 values (NULL)
|
||||
slave-bin.000001 338 Query 1 415 use `test`; drop table t1
|
||||
slave-bin.000001 415 Query 1 519 use `test`; create table t1 (word char(20) not null)
|
||||
slave-bin.000001 519 Create_file 1 1198 db=test;table=t1;file_id=1;block_len=581
|
||||
slave-bin.000001 1198 Exec_load 1 1221 ;file_id=1
|
||||
slave-bin.000001 1221 Query 1 1298 use `test`; drop table t1
|
||||
slave-bin.000001 1298 Query 1 1385 use `test`; create table t5 (a int)
|
||||
slave-bin.000001 1385 Query 1 1462 use `test`; drop table t5
|
||||
slave-bin.000001 1462 Rotate 2 1505 slave-bin.000002;pos=4
|
||||
show binlog events in 'slave-bin.000002' from 4;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000002 4 Format_desc 2 95 Server ver: VERSION, Binlog ver: 4
|
||||
slave-bin.000002 95 Query 1 182 use `test`; create table t1 (n int)
|
||||
slave-bin.000002 182 Query 1 271 use `test`; insert into t1 values (1)
|
||||
slave-bin.000002 271 Query 1 348 use `test`; drop table t1
|
||||
slave-bin.000002 4 Format_desc 2 96 Server ver: VERSION, Binlog ver: 4
|
||||
slave-bin.000002 96 Query 1 183 use `test`; create table t1 (n int)
|
||||
slave-bin.000002 183 Query 1 272 use `test`; insert into t1 values (1)
|
||||
slave-bin.000002 272 Query 1 349 use `test`; drop table t1
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 512 # # master-bin.000002 Yes Yes 0 0 512 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 513 # # master-bin.000002 Yes Yes 0 0 513 # None 0 No #
|
||||
show binlog events in 'slave-bin.000005' from 4;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
||||
|
@ -6,10 +6,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 95
|
||||
master-bin.000001 96
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 95 # # master-bin.000001 Yes Yes 0 0 95 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No #
|
||||
stop slave;
|
||||
change master to master_log_pos=73;
|
||||
start slave;
|
||||
@ -30,13 +30,13 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 173 # # master-bin.000001 No Yes 0 0 173 # None 0 No #
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000001 95
|
||||
master-bin.000001 96
|
||||
create table if not exists t1 (n int);
|
||||
drop table if exists t1;
|
||||
create table t1 (n int);
|
||||
insert into t1 values (1),(2),(3);
|
||||
stop slave;
|
||||
change master to master_log_pos=95;
|
||||
change master to master_log_pos=96;
|
||||
start slave;
|
||||
select * from t1;
|
||||
n
|
||||
|
@ -16,7 +16,7 @@ select @@global.max_relay_log_size;
|
||||
start slave;
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73752 # # master-bin.000001 Yes Yes 0 0 73752 # None 0 No #
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=(5*4096);
|
||||
@ -26,7 +26,7 @@ select @@global.max_relay_log_size;
|
||||
start slave;
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73752 # # master-bin.000001 Yes Yes 0 0 73752 # None 0 No #
|
||||
stop slave;
|
||||
reset slave;
|
||||
set global max_relay_log_size=0;
|
||||
@ -36,7 +36,7 @@ select @@global.max_relay_log_size;
|
||||
start slave;
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73751 # # master-bin.000001 Yes Yes 0 0 73751 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73752 # # master-bin.000001 Yes Yes 0 0 73752 # None 0 No #
|
||||
stop slave;
|
||||
reset slave;
|
||||
flush logs;
|
||||
@ -49,13 +49,13 @@ flush logs;
|
||||
create table t1 (a int);
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73838 # # master-bin.000001 Yes Yes 0 0 73838 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73839 # # master-bin.000001 Yes Yes 0 0 73839 # None 0 No #
|
||||
flush logs;
|
||||
drop table t1;
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73915 # # master-bin.000001 Yes Yes 0 0 73915 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 73916 # # master-bin.000001 Yes Yes 0 0 73916 # None 0 No #
|
||||
flush logs;
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000002 95
|
||||
master-bin.000002 96
|
||||
|
32
mysql-test/r/rpl_multi_query.result
Normal file
32
mysql-test/r/rpl_multi_query.result
Normal file
@ -0,0 +1,32 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
drop database if exists mysqltest;
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1 ( n int);
|
||||
insert into mysqltest.t1 values(1)/
|
||||
insert into mysqltest.t1 values(2);
|
||||
insert into mysqltest.t1 values(3);
|
||||
insert into mysqltest.t1 values(4);
|
||||
insert into mysqltest.t1 values(5)/
|
||||
select * from mysqltest.t1;
|
||||
n
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # drop database if exists mysqltest
|
||||
master-bin.000001 # Query 1 # create database mysqltest
|
||||
master-bin.000001 # Query 1 # use `test`; create table mysqltest.t1 ( n int)
|
||||
master-bin.000001 # Query 1 # use `test`; insert into mysqltest.t1 values(1)
|
||||
master-bin.000001 # Query 1 # use `test`; insert into mysqltest.t1 values(2)
|
||||
master-bin.000001 # Query 1 # use `test`; insert into mysqltest.t1 values(3)
|
||||
master-bin.000001 # Query 1 # use `test`; insert into mysqltest.t1 values(4)
|
||||
master-bin.000001 # Query 1 # use `test`; insert into mysqltest.t1 values(5)
|
||||
drop database mysqltest;
|
@ -18,5 +18,5 @@ max(a)
|
||||
8000
|
||||
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
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 743228 # # master-bin.000001 Yes Yes 0 0 743228 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 743186 # # master-bin.000001 Yes Yes 0 0 743186 # None 0 No #
|
||||
drop table t1;
|
||||
|
@ -28,4 +28,4 @@ ERROR 42S02: Table 'test.t11' doesn't exist
|
||||
drop table if exists t1,t2,t11;
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1617 # # master-bin.000001 Yes Yes test.t1 0 0 1617 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1618 # # master-bin.000001 Yes Yes test.t1 0 0 1618 # None 0 No #
|
||||
|
@ -6,12 +6,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 95 # # master-bin.000001 Yes Yes 0 0 95 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No #
|
||||
stop slave;
|
||||
change master to master_user='test';
|
||||
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
|
||||
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 95 # # master-bin.000001 No No 0 0 95 # None 0 No #
|
||||
# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 96 # # master-bin.000001 No No 0 0 96 # None 0 No #
|
||||
reset slave;
|
||||
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
|
||||
@ -19,7 +19,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
|
||||
start slave;
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 95 # # master-bin.000001 Yes Yes 0 0 95 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 96 # # master-bin.000001 Yes Yes 0 0 96 # None 0 No #
|
||||
stop slave;
|
||||
reset slave;
|
||||
start slave;
|
||||
|
@ -16,7 +16,7 @@ create table t1 (s text);
|
||||
insert into t1 values('Could not break slave'),('Tried hard');
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 549 # # master-bin.000001 Yes Yes 0 0 549 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 550 # # master-bin.000001 Yes Yes 0 0 550 # None 0 No #
|
||||
select * from t1;
|
||||
s
|
||||
Could not break slave
|
||||
@ -57,7 +57,7 @@ master-bin.000003
|
||||
insert into t2 values (65);
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 497 # # master-bin.000003 Yes Yes 0 0 497 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 498 # # master-bin.000003 Yes Yes 0 0 498 # None 0 No #
|
||||
select * from t2;
|
||||
m
|
||||
34
|
||||
@ -79,13 +79,13 @@ master-bin.000004
|
||||
master-bin.000005
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
master-bin.000005 2050
|
||||
master-bin.000005 2051
|
||||
select * from t4;
|
||||
a
|
||||
testing temporary tables part 2
|
||||
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
|
||||
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2050 # # master-bin.000005 Yes Yes 0 0 2050 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2051 # # master-bin.000005 Yes Yes 0 0 2051 # None 0 No #
|
||||
lock tables t3 read;
|
||||
select count(*) from t3 where n >= 4;
|
||||
count(*)
|
||||
|
@ -10,7 +10,7 @@ stop slave;
|
||||
change master to master_port=SLAVE_PORT;
|
||||
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
|
||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 95 None 0 No NULL
|
||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 96 None 0 No NULL
|
||||
start slave;
|
||||
insert into t1 values (1);
|
||||
show status like "slave_running";
|
||||
|
@ -10,7 +10,7 @@ stop slave;
|
||||
change master to master_port=SLAVE_PORT;
|
||||
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
|
||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 95 None 0 No NULL
|
||||
127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 96 None 0 No NULL
|
||||
start slave;
|
||||
insert into t1 values (1);
|
||||
select * from t1;
|
||||
|
@ -38,19 +38,19 @@ f
|
||||
7
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 95 Query 1 185 use `test`; drop table if exists t1,t2
|
||||
master-bin.000001 185 Query 1 271 use `test`; create table t1(f int)
|
||||
master-bin.000001 271 Query 1 357 use `test`; create table t2(f int)
|
||||
master-bin.000001 357 Query 1 483 use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10)
|
||||
master-bin.000001 483 Query 1 579 use `test`; create temporary table t3(f int)
|
||||
master-bin.000001 579 Query 1 684 use `test`; insert into t3 select * from t1 where f<6
|
||||
master-bin.000001 684 Query 1 780 use `test`; create temporary table t3(f int)
|
||||
master-bin.000001 780 Query 1 882 use `test`; insert into t2 select count(*) from t3
|
||||
master-bin.000001 882 Query 1 988 use `test`; insert into t3 select * from t1 where f>=4
|
||||
master-bin.000001 988 Query 1 1075 use `test`; drop temporary table t3
|
||||
master-bin.000001 1075 Query 1 1177 use `test`; insert into t2 select count(*) from t3
|
||||
master-bin.000001 1177 Query 1 1264 use `test`; drop temporary table t3
|
||||
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 96 Query 1 186 use `test`; drop table if exists t1,t2
|
||||
master-bin.000001 186 Query 1 272 use `test`; create table t1(f int)
|
||||
master-bin.000001 272 Query 1 358 use `test`; create table t2(f int)
|
||||
master-bin.000001 358 Query 1 484 use `test`; insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10)
|
||||
master-bin.000001 484 Query 1 580 use `test`; create temporary table t3(f int)
|
||||
master-bin.000001 580 Query 1 685 use `test`; insert into t3 select * from t1 where f<6
|
||||
master-bin.000001 685 Query 1 781 use `test`; create temporary table t3(f int)
|
||||
master-bin.000001 781 Query 1 883 use `test`; insert into t2 select count(*) from t3
|
||||
master-bin.000001 883 Query 1 989 use `test`; insert into t3 select * from t1 where f>=4
|
||||
master-bin.000001 989 Query 1 1076 use `test`; drop temporary table t3
|
||||
master-bin.000001 1076 Query 1 1178 use `test`; insert into t2 select count(*) from t3
|
||||
master-bin.000001 1178 Query 1 1265 use `test`; drop temporary table t3
|
||||
drop table t1, t2;
|
||||
use test;
|
||||
SET TIMESTAMP=1040323920;
|
||||
|
@ -32,13 +32,13 @@ t
|
||||
2004-06-11 09:39:02
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 95 Query 1 188 use `test`; create table t1 (t timestamp)
|
||||
master-bin.000001 188 Query 1 280 use `test`; create table t2 (t char(32))
|
||||
master-bin.000001 280 Query 1 372 use `test`; SET ONE_SHOT TIME_ZONE='UTC'
|
||||
master-bin.000001 372 Query 1 496 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
|
||||
master-bin.000001 496 Query 1 574 use `test`; delete from t1
|
||||
master-bin.000001 574 Query 1 698 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
|
||||
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 96 Query 1 189 use `test`; create table t1 (t timestamp)
|
||||
master-bin.000001 189 Query 1 281 use `test`; create table t2 (t char(32))
|
||||
master-bin.000001 281 Query 1 373 use `test`; SET ONE_SHOT TIME_ZONE='UTC'
|
||||
master-bin.000001 373 Query 1 497 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
|
||||
master-bin.000001 497 Query 1 575 use `test`; delete from t1
|
||||
master-bin.000001 575 Query 1 699 use `test`; insert into t1 values ('20040101000000'), ('20040611093902')
|
||||
set time_zone='MET';
|
||||
insert into t2 (select t from t1);
|
||||
select * from t1;
|
||||
|
@ -14,14 +14,14 @@ insert into t2 values (3),(4);
|
||||
drop table t2;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 95 Query 1 217 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 217 Query 1 318 use `test`; insert into t1 values (1),(2),(3),(4)
|
||||
master-bin.000001 318 Query 1 395 use `test`; drop table t1
|
||||
master-bin.000001 395 Query 1 517 use `test`; create table t2(n int not null auto_increment primary key)
|
||||
master-bin.000001 517 Query 1 610 use `test`; insert into t2 values (1),(2)
|
||||
master-bin.000001 610 Query 1 703 use `test`; insert into t2 values (3),(4)
|
||||
master-bin.000001 703 Query 1 780 use `test`; drop table t2
|
||||
master-bin.000001 4 Format_desc 1 96 Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 96 Query 1 218 use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 218 Query 1 319 use `test`; insert into t1 values (1),(2),(3),(4)
|
||||
master-bin.000001 319 Query 1 396 use `test`; drop table t1
|
||||
master-bin.000001 396 Query 1 518 use `test`; create table t2(n int not null auto_increment primary key)
|
||||
master-bin.000001 518 Query 1 611 use `test`; insert into t2 values (1),(2)
|
||||
master-bin.000001 611 Query 1 704 use `test`; insert into t2 values (3),(4)
|
||||
master-bin.000001 704 Query 1 781 use `test`; drop table t2
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=304;
|
||||
select * from t1;
|
||||
n
|
||||
@ -31,7 +31,7 @@ n
|
||||
4
|
||||
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
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 318 # Master master-bin.000001 304 No #
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319 # Master master-bin.000001 304 No #
|
||||
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
|
||||
select * from t1;
|
||||
n
|
||||
@ -41,7 +41,7 @@ n
|
||||
4
|
||||
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
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 318 # Master master-no-such-bin.000001 291 No #
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 319 # Master master-no-such-bin.000001 291 No #
|
||||
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=710;
|
||||
select * from t2;
|
||||
n
|
||||
@ -49,13 +49,13 @@ n
|
||||
2
|
||||
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
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 610 # Relay slave-relay-bin.000004 710 No #
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 611 # Relay slave-relay-bin.000004 710 No #
|
||||
start slave;
|
||||
stop slave;
|
||||
start slave until master_log_file='master-bin.000001', master_log_pos=710;
|
||||
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
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 780 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 780 # Master master-bin.000001 710 No #
|
||||
# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 781 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 781 # Master master-bin.000001 710 No #
|
||||
start slave until master_log_file='master-bin', master_log_pos=561;
|
||||
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;
|
||||
|
@ -76,35 +76,35 @@ abcn1n2
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
show binlog events from 95;
|
||||
show binlog events from 96;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000001 95 Query 1 186 use `test`; create table t1(n char(30))
|
||||
slave-bin.000001 186 User var 2 229 @`i1`=12345678901234
|
||||
slave-bin.000001 229 User var 2 272 @`i2`=-12345678901234
|
||||
slave-bin.000001 272 User var 2 315 @`i3`=0
|
||||
slave-bin.000001 315 User var 2 358 @`i4`=-1
|
||||
slave-bin.000001 358 Query 1 470 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4)
|
||||
slave-bin.000001 470 User var 2 509 @`r1`=12.5
|
||||
slave-bin.000001 509 User var 2 548 @`r2`=-12.5
|
||||
slave-bin.000001 548 Query 1 646 use `test`; insert into t1 values (@r1), (@r2)
|
||||
slave-bin.000001 646 User var 2 695 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 695 User var 2 730 @`s2`=_latin1 "" COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 730 User var 2 772 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 772 User var 2 814 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 814 User var 2 856 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 856 Query 1 975 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5)
|
||||
slave-bin.000001 975 User var 2 1001 @`n1`=NULL
|
||||
slave-bin.000001 1001 Query 1 1092 use `test`; insert into t1 values (@n1)
|
||||
slave-bin.000001 1092 User var 2 1118 @`n2`=NULL
|
||||
slave-bin.000001 1118 Query 1 1209 use `test`; insert into t1 values (@n2)
|
||||
slave-bin.000001 1209 Query 1 1326 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
|
||||
slave-bin.000001 1326 User var 2 1368 @`a`=2
|
||||
slave-bin.000001 1368 Query 1 1469 use `test`; insert into t1 values (@a+(@b:=@a+1))
|
||||
slave-bin.000001 1469 User var 2 1506 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 1506 Query 1 1639 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
|
||||
slave-bin.000001 1639 User var 2 1681 @`a`=5
|
||||
slave-bin.000001 1681 Query 1 1776 use `test`; insert into t1 values (@a),(@a)
|
||||
slave-bin.000001 1776 User var 2 1801 @`a`=NULL
|
||||
slave-bin.000001 1801 Query 1 1903 use `test`; insert into t1 values (@a),(@a),(@a*5)
|
||||
slave-bin.000001 96 Query 1 187 use `test`; create table t1(n char(30))
|
||||
slave-bin.000001 187 User var 2 230 @`i1`=12345678901234
|
||||
slave-bin.000001 230 User var 2 273 @`i2`=-12345678901234
|
||||
slave-bin.000001 273 User var 2 316 @`i3`=0
|
||||
slave-bin.000001 316 User var 2 359 @`i4`=-1
|
||||
slave-bin.000001 359 Query 1 471 use `test`; insert into t1 values (@i1), (@i2), (@i3), (@i4)
|
||||
slave-bin.000001 471 User var 2 510 @`r1`=12.5
|
||||
slave-bin.000001 510 User var 2 549 @`r2`=-12.5
|
||||
slave-bin.000001 549 Query 1 647 use `test`; insert into t1 values (@r1), (@r2)
|
||||
slave-bin.000001 647 User var 2 696 @`s1`=_latin1 0x5468697320697320612074657374 COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 696 User var 2 731 @`s2`=_latin1 "" COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 731 User var 2 773 @`s3`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 773 User var 2 815 @`s4`=_latin1 0x6162635C646566 COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 815 User var 2 857 @`s5`=_latin1 0x61626327646566 COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 857 Query 1 976 use `test`; insert into t1 values (@s1), (@s2), (@s3), (@s4), (@s5)
|
||||
slave-bin.000001 976 User var 2 1002 @`n1`=NULL
|
||||
slave-bin.000001 1002 Query 1 1093 use `test`; insert into t1 values (@n1)
|
||||
slave-bin.000001 1093 User var 2 1119 @`n2`=NULL
|
||||
slave-bin.000001 1119 Query 1 1210 use `test`; insert into t1 values (@n2)
|
||||
slave-bin.000001 1210 Query 1 1327 use `test`; insert into t1 values (@a:=0), (@a:=@a+1), (@a:=@a+1)
|
||||
slave-bin.000001 1327 User var 2 1369 @`a`=2
|
||||
slave-bin.000001 1369 Query 1 1470 use `test`; insert into t1 values (@a+(@b:=@a+1))
|
||||
slave-bin.000001 1470 User var 2 1507 @`q`=_latin1 0x616263 COLLATE latin1_swedish_ci
|
||||
slave-bin.000001 1507 Query 1 1640 use `test`; insert t1 values (@q), (@q:=concat(@q, 'n1')), (@q:=concat(@q, 'n2'))
|
||||
slave-bin.000001 1640 User var 2 1682 @`a`=5
|
||||
slave-bin.000001 1682 Query 1 1777 use `test`; insert into t1 values (@a),(@a)
|
||||
slave-bin.000001 1777 User var 2 1802 @`a`=NULL
|
||||
slave-bin.000001 1802 Query 1 1904 use `test`; insert into t1 values (@a),(@a),(@a*5)
|
||||
drop table t1;
|
||||
stop slave;
|
||||
|
@ -2388,3 +2388,38 @@ WART 0100 1
|
||||
WART 0200 1
|
||||
WART 0300 3
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( a BLOB, INDEX (a(20)) );
|
||||
CREATE TABLE t2 ( a BLOB, INDEX (a(20)) );
|
||||
INSERT INTO t1 VALUES ('one'),('two'),('three'),('four'),('five');
|
||||
INSERT INTO t2 VALUES ('one'),('two'),('three'),('four'),('five');
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
|
||||
1 SIMPLE t2 ref a a 23 test.t1.a 2
|
||||
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
|
||||
1 SIMPLE t2 ref a a 23 test.t1.a 2
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 ( city char(30) );
|
||||
INSERT INTO t1 VALUES ('London');
|
||||
INSERT INTO t1 VALUES ('Paris');
|
||||
SELECT * FROM t1 WHERE city='London';
|
||||
city
|
||||
London
|
||||
SELECT * FROM t1 WHERE city='london';
|
||||
city
|
||||
London
|
||||
EXPLAIN SELECT * FROM t1 WHERE city='London' AND city='london';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
|
||||
SELECT * FROM t1 WHERE city='London' AND city='london';
|
||||
city
|
||||
London
|
||||
EXPLAIN SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
|
||||
SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
|
||||
city
|
||||
London
|
||||
DROP TABLE t1;
|
||||
|
7
mysql-test/r/skip_name_resolve.result
Normal file
7
mysql-test/r/skip_name_resolve.result
Normal file
@ -0,0 +1,7 @@
|
||||
GRANT ALL ON test.* TO mysqltest_1@'127.0.0.1/255.255.255.255';
|
||||
SHOW GRANTS FOR mysqltest_1@'127.0.0.1/255.255.255.255';
|
||||
Grants for mysqltest_1@127.0.0.1/255.255.255.255
|
||||
GRANT USAGE ON *.* TO 'mysqltest_1'@'127.0.0.1/255.255.255.255'
|
||||
GRANT ALL PRIVILEGES ON `test`.* TO 'mysqltest_1'@'127.0.0.1/255.255.255.255'
|
||||
REVOKE ALL ON test.* FROM mysqltest_1@'127.0.0.1/255.255.255.255';
|
||||
DROP USER mysqltest_1@'127.0.0.1/255.255.255.255';
|
@ -2059,6 +2059,107 @@ call bug6029()|
|
||||
1136
|
||||
drop procedure bug6029|
|
||||
drop table t3|
|
||||
drop procedure if exists bug8540|
|
||||
create procedure bug8540()
|
||||
begin
|
||||
declare x int default 1;
|
||||
select x as y, x+0 as z;
|
||||
end|
|
||||
call bug8540()|
|
||||
y z
|
||||
1 1
|
||||
drop procedure bug8540|
|
||||
drop table if exists t3|
|
||||
create table t3 (s1 int)|
|
||||
drop procedure if exists bug6642|
|
||||
create procedure bug6642()
|
||||
select abs(count(s1)) from t3|
|
||||
call bug6642()|
|
||||
abs(count(s1))
|
||||
0
|
||||
call bug6642()|
|
||||
abs(count(s1))
|
||||
0
|
||||
drop procedure bug6642|
|
||||
insert into t3 values (0),(1)|
|
||||
drop procedure if exists bug7013|
|
||||
create procedure bug7013()
|
||||
select s1,count(s1) from t3 group by s1 with rollup|
|
||||
call bug7013()|
|
||||
s1 count(s1)
|
||||
0 1
|
||||
1 1
|
||||
NULL 2
|
||||
call bug7013()|
|
||||
s1 count(s1)
|
||||
0 1
|
||||
1 1
|
||||
NULL 2
|
||||
drop procedure bug7013|
|
||||
drop table if exists t4;
|
||||
--enable_warnings|
|
||||
create table t4 (
|
||||
a mediumint(8) unsigned not null auto_increment,
|
||||
b smallint(5) unsigned not null,
|
||||
c char(32) not null,
|
||||
primary key (a)
|
||||
) engine=myisam default charset=latin1|
|
||||
insert into t4 values (1, 2, 'oneword')|
|
||||
insert into t4 values (2, 2, 'anotherword')|
|
||||
drop procedure if exists bug7743|
|
||||
create procedure bug7743 ( searchstring char(28) )
|
||||
begin
|
||||
declare var mediumint(8) unsigned;
|
||||
select a into var from t4 where b = 2 and c = binary searchstring limit 1;
|
||||
select var;
|
||||
end|
|
||||
call bug7743("oneword")|
|
||||
var
|
||||
1
|
||||
call bug7743("OneWord")|
|
||||
var
|
||||
NULL
|
||||
call bug7743("anotherword")|
|
||||
var
|
||||
2
|
||||
call bug7743("AnotherWord")|
|
||||
var
|
||||
NULL
|
||||
drop procedure bug7743|
|
||||
drop table t4|
|
||||
delete from t3|
|
||||
insert into t3 values(1)|
|
||||
drop procedure if exists bug7992_1|
|
||||
Warnings:
|
||||
Note 1305 PROCEDURE bug7992_1 does not exist
|
||||
drop procedure if exists bug7992_2|
|
||||
Warnings:
|
||||
Note 1305 PROCEDURE bug7992_2 does not exist
|
||||
create procedure bug7992_1()
|
||||
begin
|
||||
declare i int;
|
||||
select max(s1)+1 into i from t3;
|
||||
end|
|
||||
create procedure bug7992_2()
|
||||
insert into t3 (s1) select max(t4.s1)+1 from t3 as t4|
|
||||
call bug7992_1()|
|
||||
call bug7992_1()|
|
||||
call bug7992_2()|
|
||||
call bug7992_2()|
|
||||
drop procedure bug7992_1|
|
||||
drop procedure bug7992_2|
|
||||
drop table t3|
|
||||
drop table if exists t3|
|
||||
create table t3 ( userid bigint(20) not null default 0 )|
|
||||
drop procedure if exists bug8116|
|
||||
create procedure bug8116(in _userid int)
|
||||
select * from t3 where userid = _userid|
|
||||
call bug8116(42)|
|
||||
userid
|
||||
call bug8116(42)|
|
||||
userid
|
||||
drop procedure bug8116|
|
||||
drop table t3|
|
||||
drop table if exists fac|
|
||||
create table fac (n int unsigned not null primary key, f bigint unsigned)|
|
||||
drop procedure if exists ifac|
|
||||
|
@ -129,6 +129,8 @@ INSERT INTO t1 VALUES('2004-09-31 15:30:00');
|
||||
ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 VALUES('2004-10-32 15:30:00');
|
||||
ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 VALUES('2003-02-29 15:30:00');
|
||||
ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 VALUES('2004-13-15 15:30:00');
|
||||
ERROR 22007: Incorrect datetime value: '2004-13-15 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 VALUES('0000-00-00 15:30:00');
|
||||
@ -153,6 +155,8 @@ INSERT INTO t1 VALUES('2004-09-31 15:30:00');
|
||||
ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 VALUES('2004-10-32 15:30:00');
|
||||
ERROR 22007: Incorrect datetime value: '2004-10-32 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 VALUES('2003-02-29 15:30:00');
|
||||
ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 VALUES('2004-13-15 15:30:00');
|
||||
ERROR 22007: Incorrect datetime value: '2004-13-15 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 VALUES('2004-02-29 25:30:00');
|
||||
@ -194,6 +198,85 @@ col1
|
||||
0000-00-00 00:00:00
|
||||
0000-00-00 00:00:00
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (col1 date, col2 datetime, col3 timestamp);
|
||||
INSERT INTO t1 (col1) VALUES (STR_TO_DATE('15.10.2004','%d.%m.%Y'));
|
||||
INSERT INTO t1 (col2) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i'));
|
||||
INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i'));
|
||||
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i'));
|
||||
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect date value: '2004-00-31 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect date value: '2004-10-00 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect date value: '2004-09-31 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect date value: '2003-02-29 15:30:00' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y'));
|
||||
ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i'));
|
||||
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect datetime value: '2004-00-31 15:30:00' for column 'col2' at row 1
|
||||
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1
|
||||
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col2' at row 1
|
||||
INSERT INTO t1 (col2) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col2' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect datetime value: '2004-00-31 15:30:00' for column 'col3' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('31.9.2004 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect datetime value: '2004-09-31 15:30:00' for column 'col3' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('29.02.2003 15.30','%d.%m.%Y %H.%i'));
|
||||
ERROR 22007: Incorrect datetime value: '2003-02-29 15:30:00' for column 'col3' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y'));
|
||||
ERROR 22007: Incorrect datetime value: '0000-00-00' for column 'col3' at row 1
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (col1 date, col2 datetime, col3 timestamp);
|
||||
INSERT INTO t1 (col1) VALUES (CAST('2004-10-15' AS DATE));
|
||||
INSERT INTO t1 (col2) VALUES (CAST('2004-10-15 10:15' AS DATETIME));
|
||||
INSERT INTO t1 (col3) VALUES (CAST('2004-10-15 10:15' AS DATETIME));
|
||||
INSERT INTO t1 (col1) VALUES(CAST('0000-10-31' AS DATE));
|
||||
INSERT INTO t1 (col1) VALUES(CAST('2004-10-0' AS DATE));
|
||||
ERROR 22007: Incorrect date value: '2004-10-00' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col1) VALUES(CAST('2004-0-10' AS DATE));
|
||||
ERROR 22007: Incorrect date value: '2004-00-10' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col2) VALUES(CAST('0000-10-31 15:30' AS DATETIME));
|
||||
INSERT INTO t1 (col2) VALUES(CAST('2004-10-0 15:30' AS DATETIME));
|
||||
ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1
|
||||
INSERT INTO t1 (col2) VALUES(CAST('2004-0-10 15:30' AS DATETIME));
|
||||
ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col2' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(CAST('0000-10-31 15:30' AS DATETIME));
|
||||
ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(CAST('2004-10-0 15:30' AS DATETIME));
|
||||
ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(CAST('2004-0-10 15:30' AS DATETIME));
|
||||
ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col3' at row 1
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (col1 date, col2 datetime, col3 timestamp);
|
||||
INSERT INTO t1 (col1) VALUES (CONVERT('2004-10-15',DATE));
|
||||
INSERT INTO t1 (col2) VALUES (CONVERT('2004-10-15 10:15',DATETIME));
|
||||
INSERT INTO t1 (col3) VALUES (CONVERT('2004-10-15 10:15',DATETIME));
|
||||
INSERT INTO t1 (col1) VALUES(CONVERT('0000-10-31' , DATE));
|
||||
INSERT INTO t1 (col1) VALUES(CONVERT('2004-10-0' , DATE));
|
||||
ERROR 22007: Incorrect date value: '2004-10-00' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col1) VALUES(CONVERT('2004-0-10' , DATE));
|
||||
ERROR 22007: Incorrect date value: '2004-00-10' for column 'col1' at row 1
|
||||
INSERT INTO t1 (col2) VALUES(CONVERT('0000-10-31 15:30',DATETIME));
|
||||
INSERT INTO t1 (col2) VALUES(CONVERT('2004-10-0 15:30',DATETIME));
|
||||
ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1
|
||||
INSERT INTO t1 (col2) VALUES(CONVERT('2004-0-10 15:30',DATETIME));
|
||||
ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col2' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(CONVERT('0000-10-31 15:30',DATETIME));
|
||||
ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(CONVERT('2004-10-0 15:30',DATETIME));
|
||||
ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1
|
||||
INSERT INTO t1 (col3) VALUES(CONVERT('2004-0-10 15:30',DATETIME));
|
||||
ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col3' at row 1
|
||||
drop table t1;
|
||||
CREATE TABLE t1(col1 TINYINT, col2 TINYINT UNSIGNED);
|
||||
INSERT INTO t1 VALUES(-128,0),(0,0),(127,255),('-128','0'),('0','0'),('127','255'),(-128.0,0.0),(0.0,0.0),(127.0,255.0);
|
||||
SELECT MOD(col1,0) FROM t1 WHERE col1 > 0 LIMIT 2;
|
||||
|
@ -2176,3 +2176,103 @@ ERROR 42S22: Reference 'xx' not supported (forward reference in item list)
|
||||
select 1 = ALL (select 1 from t1 where 1 = xx ), 1 as xx from DUAL;
|
||||
ERROR 42S22: Reference 'xx' not supported (forward reference in item list)
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (
|
||||
categoryId int(11) NOT NULL,
|
||||
courseId int(11) NOT NULL,
|
||||
startDate datetime NOT NULL,
|
||||
endDate datetime NOT NULL,
|
||||
createDate datetime NOT NULL,
|
||||
modifyDate timestamp NOT NULL,
|
||||
attributes text NOT NULL
|
||||
);
|
||||
INSERT INTO t1 VALUES (1,41,'2004-02-09','2010-01-01','2004-02-09','2004-02-09',''),
|
||||
(1,86,'2004-08-16','2004-08-16','2004-08-16','2004-08-16',''),
|
||||
(1,87,'2004-08-16','2004-08-16','2004-08-16','2004-08-16',''),
|
||||
(2,52,'2004-03-15','2004-10-01','2004-03-15','2004-09-17',''),
|
||||
(2,53,'2004-03-16','2004-10-01','2004-03-16','2004-09-17',''),
|
||||
(2,88,'2004-08-16','2004-08-16','2004-08-16','2004-08-16',''),
|
||||
(2,89,'2004-08-16','2004-08-16','2004-08-16','2004-08-16',''),
|
||||
(3,51,'2004-02-09','2010-01-01','2004-02-09','2004-02-09',''),
|
||||
(5,12,'2004-02-18','2010-01-01','2004-02-18','2004-02-18','');
|
||||
CREATE TABLE t2 (
|
||||
userId int(11) NOT NULL,
|
||||
courseId int(11) NOT NULL,
|
||||
date datetime NOT NULL
|
||||
);
|
||||
INSERT INTO t2 VALUES (5141,71,'2003-11-18'),
|
||||
(5141,72,'2003-11-25'),(5141,41,'2004-08-06'),
|
||||
(5141,52,'2004-08-06'),(5141,53,'2004-08-06'),
|
||||
(5141,12,'2004-08-06'),(5141,86,'2004-10-21'),
|
||||
(5141,87,'2004-10-21'),(5141,88,'2004-10-21'),
|
||||
(5141,89,'2004-10-22'),(5141,51,'2004-10-26');
|
||||
CREATE TABLE t3 (
|
||||
groupId int(11) NOT NULL,
|
||||
parentId int(11) NOT NULL,
|
||||
startDate datetime NOT NULL,
|
||||
endDate datetime NOT NULL,
|
||||
createDate datetime NOT NULL,
|
||||
modifyDate timestamp NOT NULL,
|
||||
ordering int(11)
|
||||
);
|
||||
INSERT INTO t3 VALUES (12,9,'1000-01-01','3999-12-31','2004-01-29','2004-01-29',NULL);
|
||||
CREATE TABLE t4 (
|
||||
id int(11) NOT NULL,
|
||||
groupTypeId int(11) NOT NULL,
|
||||
groupKey varchar(50) NOT NULL,
|
||||
name text,
|
||||
ordering int(11),
|
||||
description text,
|
||||
createDate datetime NOT NULL,
|
||||
modifyDate timestamp NOT NULL
|
||||
);
|
||||
INSERT INTO t4 VALUES (9,5,'stationer','stationer',0,'Stationer','2004-01-29','2004-01-29'),
|
||||
(12,5,'group2','group2',0,'group2','2004-01-29','2004-01-29');
|
||||
CREATE TABLE t5 (
|
||||
userId int(11) NOT NULL,
|
||||
groupId int(11) NOT NULL,
|
||||
createDate datetime NOT NULL,
|
||||
modifyDate timestamp NOT NULL
|
||||
);
|
||||
INSERT INTO t5 VALUES (5141,12,'2004-08-06','2004-08-06');
|
||||
select
|
||||
count(distinct t2.userid) pass,
|
||||
groupstuff.*,
|
||||
count(t2.courseid) crse,
|
||||
t1.categoryid,
|
||||
t2.courseid,
|
||||
date_format(date, '%b%y') as colhead
|
||||
from t2
|
||||
join t1 on t2.courseid=t1.courseid
|
||||
join
|
||||
(
|
||||
select
|
||||
t5.userid,
|
||||
parentid,
|
||||
parentgroup,
|
||||
childid,
|
||||
groupname,
|
||||
grouptypeid
|
||||
from t5
|
||||
join
|
||||
(
|
||||
select t4.id as parentid,
|
||||
t4.name as parentgroup,
|
||||
t4.id as childid,
|
||||
t4.name as groupname,
|
||||
t4.grouptypeid
|
||||
from t4
|
||||
) as gin on t5.groupid=gin.childid
|
||||
) as groupstuff on t2.userid = groupstuff.userid
|
||||
group by
|
||||
groupstuff.groupname, colhead , t2.courseid;
|
||||
pass userid parentid parentgroup childid groupname grouptypeid crse categoryid courseid colhead
|
||||
1 5141 12 group2 12 group2 5 1 5 12 Aug04
|
||||
1 5141 12 group2 12 group2 5 1 1 41 Aug04
|
||||
1 5141 12 group2 12 group2 5 1 2 52 Aug04
|
||||
1 5141 12 group2 12 group2 5 1 2 53 Aug04
|
||||
1 5141 12 group2 12 group2 5 1 3 51 Oct04
|
||||
1 5141 12 group2 12 group2 5 1 1 86 Oct04
|
||||
1 5141 12 group2 12 group2 5 1 1 87 Oct04
|
||||
1 5141 12 group2 12 group2 5 1 2 88 Oct04
|
||||
1 5141 12 group2 12 group2 5 1 2 89 Oct04
|
||||
drop table if exists t1, t2, t3, t4, t5;
|
||||
|
@ -24,23 +24,23 @@ db CREATE TABLE `db` (
|
||||
`Host` char(60) collate utf8_bin NOT NULL default '',
|
||||
`Db` char(64) collate utf8_bin NOT NULL default '',
|
||||
`User` char(16) collate utf8_bin NOT NULL default '',
|
||||
`Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Show_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_routine_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Alter_routine_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Execute_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Delete_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Drop_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Grant_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`References_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Index_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
PRIMARY KEY (`Host`,`Db`,`User`),
|
||||
KEY `User` (`User`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges'
|
||||
@ -49,20 +49,20 @@ Table Create Table
|
||||
host CREATE TABLE `host` (
|
||||
`Host` char(60) collate utf8_bin NOT NULL default '',
|
||||
`Db` char(64) collate utf8_bin NOT NULL default '',
|
||||
`Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Show_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Delete_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Drop_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Grant_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`References_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Index_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
PRIMARY KEY (`Host`,`Db`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges; Merged with database privileges'
|
||||
show create table user;
|
||||
@ -71,32 +71,32 @@ user CREATE TABLE `user` (
|
||||
`Host` char(60) collate utf8_bin NOT NULL default '',
|
||||
`User` char(16) collate utf8_bin NOT NULL default '',
|
||||
`Password` char(41) collate utf8_bin NOT NULL default '',
|
||||
`Select_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Insert_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Update_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Delete_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Drop_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Reload_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Shutdown_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Process_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`File_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Grant_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`References_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Index_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Alter_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Show_db_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Super_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_tmp_table_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Lock_tables_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Execute_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Repl_slave_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Repl_client_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Show_view_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Create_routine_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`Alter_routine_priv` enum('N','Y') collate utf8_bin NOT NULL default 'N',
|
||||
`ssl_type` enum('','ANY','X509','SPECIFIED') collate utf8_bin NOT NULL default '',
|
||||
`Select_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Insert_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Update_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Delete_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Drop_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Reload_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Shutdown_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Process_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`File_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Grant_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`References_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Index_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Alter_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Show_db_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Super_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_tmp_table_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Lock_tables_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Execute_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Repl_slave_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Repl_client_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Show_view_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Create_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`Alter_routine_priv` enum('N','Y') character set utf8 NOT NULL default 'N',
|
||||
`ssl_type` enum('','ANY','X509','SPECIFIED') character set utf8 NOT NULL default '',
|
||||
`ssl_cipher` blob NOT NULL,
|
||||
`x509_issuer` blob NOT NULL,
|
||||
`x509_subject` blob NOT NULL,
|
||||
@ -112,7 +112,7 @@ func CREATE TABLE `func` (
|
||||
`name` char(64) collate utf8_bin NOT NULL default '',
|
||||
`ret` tinyint(1) NOT NULL default '0',
|
||||
`dl` char(128) collate utf8_bin NOT NULL default '',
|
||||
`type` enum('function','aggregate') collate utf8_bin NOT NULL default 'function',
|
||||
`type` enum('function','aggregate') character set utf8 NOT NULL default 'function',
|
||||
PRIMARY KEY (`name`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='User defined functions'
|
||||
show create table tables_priv;
|
||||
@ -124,8 +124,8 @@ tables_priv CREATE TABLE `tables_priv` (
|
||||
`Table_name` char(64) collate utf8_bin NOT NULL default '',
|
||||
`Grantor` char(77) collate utf8_bin NOT NULL default '',
|
||||
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') collate utf8_bin NOT NULL default '',
|
||||
`Column_priv` set('Select','Insert','Update','References') collate utf8_bin NOT NULL default '',
|
||||
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter') character set utf8 NOT NULL default '',
|
||||
`Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '',
|
||||
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
|
||||
KEY `Grantor` (`Grantor`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges'
|
||||
@ -138,7 +138,7 @@ columns_priv CREATE TABLE `columns_priv` (
|
||||
`Table_name` char(64) collate utf8_bin NOT NULL default '',
|
||||
`Column_name` char(64) collate utf8_bin NOT NULL default '',
|
||||
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
`Column_priv` set('Select','Insert','Update','References') collate utf8_bin NOT NULL default '',
|
||||
`Column_priv` set('Select','Insert','Update','References') character set utf8 NOT NULL default '',
|
||||
PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges'
|
||||
show create table procs_priv;
|
||||
@ -150,7 +150,7 @@ procs_priv CREATE TABLE `procs_priv` (
|
||||
`Routine_name` char(64) collate utf8_bin NOT NULL default '',
|
||||
`Grantor` char(77) collate utf8_bin NOT NULL default '',
|
||||
`Timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
|
||||
`Proc_priv` set('Execute','Alter Routine','Grant') collate utf8_bin NOT NULL default '',
|
||||
`Proc_priv` set('Execute','Alter Routine','Grant') character set utf8 NOT NULL default '',
|
||||
PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`),
|
||||
KEY `Grantor` (`Grantor`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges'
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user