Merge
This commit is contained in:
commit
4e8595862d
65
README
65
README
@ -1,52 +1,35 @@
|
|||||||
This is a release of MySQL, a GPL (free) SQL database server (more
|
This is a release of MySQL, a dual-license SQL database server.
|
||||||
licence information in the PUBLIC file and in the reference manual).
|
MySQL is brought to you by the MySQL team at MySQL AB.
|
||||||
|
|
||||||
Please read the "Upgrading from..." section in the manual first, if you are
|
License information can be found in these files:
|
||||||
migrating from older versions of MySQL!
|
- For GPL (free) distributions, see the COPYING file.
|
||||||
|
- For commercial distributions, see the MySQLEULA.txt file.
|
||||||
|
|
||||||
The latest information about MySQL can be found at:
|
|
||||||
http://www.mysql.com
|
|
||||||
|
|
||||||
To see what it can do take a look at the features section in the
|
For further information about MySQL or additional documentation, see:
|
||||||
manual.
|
- The latest information about MySQL: http://www.mysql.com
|
||||||
|
- The current MySQL documentation: http:/dev.mysql.com/doc
|
||||||
|
|
||||||
For installation instructions see the Installation chapter in the
|
Some manual sections of special interest:
|
||||||
manual.
|
|
||||||
|
|
||||||
For future plans see the TODO appendix in the manual.
|
- If you are migrating from an older version of MySQL, please read the
|
||||||
|
"Upgrading from..." section first!
|
||||||
|
- To see what MySQL can do, take a look at the features section.
|
||||||
|
- For installation instructions, see the Installation chapter.
|
||||||
|
- For future plans, see the TODO appendix.
|
||||||
|
- For the new features/bugfix history, see the News appendix.
|
||||||
|
- For the currently known bugs/misfeatures (known errors) see the problems
|
||||||
|
appendix.
|
||||||
|
- For a list of developers and other contributors, see the Credits
|
||||||
|
appendix.
|
||||||
|
|
||||||
New features/bug fixes history is in the news appendix in the manual.
|
A local copy of the MySQL Reference Manual can be found in the Docs
|
||||||
|
directory in GNU Info format. You can also browse the manual online or
|
||||||
For the currently known bugs/misfeatures (known errors) see the bugs
|
download it in any of several formats at the URL given earlier in this
|
||||||
appendix in the manual.
|
file.
|
||||||
|
|
||||||
For examples of SQL and benchmarking information see the bench
|
|
||||||
directory.
|
|
||||||
|
|
||||||
The manual mentioned above can be found in the Docs directory. The
|
|
||||||
manual is available in the following formats: as plain ASCII text in
|
|
||||||
Docs/manual.txt, in HTML format in Docs/manual_toc.html, as GNU Info in
|
|
||||||
Docs/mysql.info and as PostScript in Docs/manual.ps.
|
|
||||||
|
|
||||||
MySQL is brought to you by the MySQL team at MySQL AB
|
|
||||||
|
|
||||||
For a list of developers and other contributors, see the Credits appendix
|
|
||||||
in the manual.
|
|
||||||
|
|
||||||
************************************************************
|
************************************************************
|
||||||
|
|
||||||
IMPORTANT:
|
IMPORTANT:
|
||||||
|
|
||||||
Send bug (error) reports, questions and comments to the mailing list
|
Bug or error reports should be sent to http://bugs.mysql.com.
|
||||||
at mysql@lists.mysql.com
|
|
||||||
|
|
||||||
Please use the 'mysqlbug' script when posting bug reports or questions
|
|
||||||
about MySQL. mysqlbug will gather some information about your system
|
|
||||||
and start your editor with a form in which you can describe your
|
|
||||||
problem. Bug reports might be silently ignored by the MySQL
|
|
||||||
maintainers if there is not a good reason included in the report as to
|
|
||||||
why mysqlbug has not been used. A report that says 'MySQL does not
|
|
||||||
work for me. Why?' is not considered a valid bug report.
|
|
||||||
|
|
||||||
The mysqlbug script can be found in the 'scripts' directory of the
|
|
||||||
distribution, that is '<where-you-installed-mysql>/scripts'.
|
|
||||||
|
@ -2382,7 +2382,8 @@ int read_line(char *buf, int size)
|
|||||||
if (feof(cur_file->file))
|
if (feof(cur_file->file))
|
||||||
{
|
{
|
||||||
found_eof:
|
found_eof:
|
||||||
if (cur_file->file != stdin){
|
if (cur_file->file != stdin)
|
||||||
|
{
|
||||||
my_fclose(cur_file->file, MYF(0));
|
my_fclose(cur_file->file, MYF(0));
|
||||||
cur_file->file= 0;
|
cur_file->file= 0;
|
||||||
}
|
}
|
||||||
|
@ -343,7 +343,7 @@ case $default_charset in
|
|||||||
default_charset_default_collation="ucs2_general_ci"
|
default_charset_default_collation="ucs2_general_ci"
|
||||||
define(UCSC1, ucs2_general_ci ucs2_bin)
|
define(UCSC1, ucs2_general_ci ucs2_bin)
|
||||||
define(UCSC2, ucs2_czech_ci ucs2_danish_ci)
|
define(UCSC2, ucs2_czech_ci ucs2_danish_ci)
|
||||||
define(UCSC3, ucs2_estonian_ci ucs2_icelandic_ci)
|
define(UCSC3, ucs2_esperanto_ci ucs2_estonian_ci ucs2_icelandic_ci)
|
||||||
define(UCSC4, ucs2_latvian_ci ucs2_lithuanian_ci)
|
define(UCSC4, ucs2_latvian_ci ucs2_lithuanian_ci)
|
||||||
define(UCSC5, ucs2_persian_ci ucs2_polish_ci ucs2_romanian_ci)
|
define(UCSC5, ucs2_persian_ci ucs2_polish_ci ucs2_romanian_ci)
|
||||||
define(UCSC6, ucs2_slovak_ci ucs2_slovenian_ci)
|
define(UCSC6, ucs2_slovak_ci ucs2_slovenian_ci)
|
||||||
@ -367,7 +367,7 @@ case $default_charset in
|
|||||||
else
|
else
|
||||||
define(UTFC1, utf8_general_ci utf8_bin)
|
define(UTFC1, utf8_general_ci utf8_bin)
|
||||||
define(UTFC2, utf8_czech_ci utf8_danish_ci)
|
define(UTFC2, utf8_czech_ci utf8_danish_ci)
|
||||||
define(UTFC3, utf8_estonian_ci utf8_icelandic_ci)
|
define(UTFC3, utf8_esperanto_ci utf8_estonian_ci utf8_icelandic_ci)
|
||||||
define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci)
|
define(UTFC4, utf8_latvian_ci utf8_lithuanian_ci)
|
||||||
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
|
define(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
|
||||||
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
|
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
|
||||||
|
100
configure.in
100
configure.in
@ -323,19 +323,19 @@ case "$target_os" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
sysv5UnixWare*)
|
sysv5UnixWare* | sysv5OpenUNIX8*)
|
||||||
if test "$GCC" != "yes"; then
|
if test "$GCC" != "yes"; then
|
||||||
# We are using built-in inline function
|
# Use the built-in alloca()
|
||||||
CFLAGS="$CFLAGS -Kalloca"
|
CFLAGS="$CFLAGS -Kalloca"
|
||||||
fi
|
fi
|
||||||
CXXFLAGS="$CXXFLAGS -DNO_CPLUSPLUS_ALLOCA"
|
CXXFLAGS="$CXXFLAGS -DNO_CPLUSPLUS_ALLOCA"
|
||||||
;;
|
;;
|
||||||
sysv5OpenUNIX8*)
|
sysv5SCO_SV6.0.0*)
|
||||||
if test "$GCC" != "yes"; then
|
if test "$GCC" != "yes"; then
|
||||||
# We are using built-in inline function
|
# Use the built-in alloca()
|
||||||
CFLAGS="$CFLAGS -Kalloca"
|
CFLAGS="$CFLAGS -Kalloca"
|
||||||
|
CXXFLAGS="$CFLAGS -Kalloca"
|
||||||
fi
|
fi
|
||||||
CXXFLAGS="$CXXFLAGS -DNO_CPLUSPLUS_ALLOCA"
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
AC_SUBST(CC)
|
AC_SUBST(CC)
|
||||||
@ -1048,6 +1048,15 @@ case $SYSTEM_TYPE in
|
|||||||
MAX_C_OPTIMIZE="-O"
|
MAX_C_OPTIMIZE="-O"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
*darwin9*)
|
||||||
|
if test "$ac_cv_prog_gcc" = "yes"
|
||||||
|
then
|
||||||
|
FLAGS="-D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT"
|
||||||
|
CFLAGS="$CFLAGS $FLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAGS $FLAGS"
|
||||||
|
MAX_C_OPTIMIZE="-O"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*freebsd*)
|
*freebsd*)
|
||||||
AC_MSG_WARN([Adding fix for interrupted reads])
|
AC_MSG_WARN([Adding fix for interrupted reads])
|
||||||
OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'`
|
OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'`
|
||||||
@ -1360,8 +1369,6 @@ then
|
|||||||
if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null
|
if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null
|
||||||
then
|
then
|
||||||
AC_DEFINE(HAVE_UNIXWARE7_THREADS, [1])
|
AC_DEFINE(HAVE_UNIXWARE7_THREADS, [1])
|
||||||
else
|
|
||||||
AC_DEFINE(HAVE_UNIXWARE7_POSIX, [1])
|
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT("yes")
|
AC_MSG_RESULT("yes")
|
||||||
# We must have cc
|
# We must have cc
|
||||||
@ -1387,87 +1394,40 @@ then
|
|||||||
AC_MSG_RESULT("no")
|
AC_MSG_RESULT("no")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# Hack for SCO UnixWare7
|
|
||||||
#
|
|
||||||
if test "$with_named_thread" = "no"
|
|
||||||
then
|
|
||||||
AC_MSG_CHECKING("SCO UnixWare7 native threads")
|
|
||||||
if expr "$SYSTEM_TYPE" : ".*UnixWare*" > /dev/null
|
|
||||||
then
|
|
||||||
if test -f /usr/lib/libthread.so -o -f /usr/lib/libthreadT.so
|
|
||||||
then
|
|
||||||
MYSQL_REMOVE_SOCKET_FROM_LIBS_HACK
|
|
||||||
if expr "$CC" : ".*gcc.*"
|
|
||||||
then
|
|
||||||
with_named_thread="-pthread -lsocket -lnsl"
|
|
||||||
else
|
|
||||||
with_named_thread="-Kthread -lsocket -lnsl"
|
|
||||||
fi
|
|
||||||
if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null
|
|
||||||
then
|
|
||||||
AC_DEFINE(HAVE_UNIXWARE7_THREADS, [1])
|
|
||||||
else
|
|
||||||
AC_DEFINE(HAVE_UNIXWARE7_POSIX, [1])
|
|
||||||
fi
|
|
||||||
# We must have cc
|
|
||||||
AC_MSG_CHECKING("for gcc")
|
|
||||||
if expr "$CC" : ".*gcc.*"
|
|
||||||
then
|
|
||||||
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
|
|
||||||
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
|
|
||||||
else
|
|
||||||
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
|
|
||||||
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT("yes")
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([configure: error: Can't find thread libs on SCO UnixWare7. See the Installation chapter in the Reference Manual.])
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT("no")
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Hack for Caldera OpenUNIX8
|
#
|
||||||
|
# Check for SCO threading libraries
|
||||||
#
|
#
|
||||||
if test "$with_named_thread" = "no"
|
if test "$with_named_thread" = "no"
|
||||||
then
|
then
|
||||||
AC_MSG_CHECKING("OpenUNIX8 native threads")
|
AC_MSG_CHECKING([SCO OpenServer 6, UnixWare 7 or OpenUNIX 8 native threads])
|
||||||
if expr "$SYSTEM_TYPE" : ".*OpenUNIX*" > /dev/null
|
if expr "$SYSTEM_TYPE" : ".*UnixWare.*" > /dev/null || \
|
||||||
|
expr "$SYSTEM_TYPE" : ".*SCO_SV6.*" > /dev/null || \
|
||||||
|
expr "$SYSTEM_TYPE" : ".*OpenUNIX.*" > /dev/null
|
||||||
then
|
then
|
||||||
if test -f /usr/lib/libthread.so -o -f /usr/lib/libthreadT.so
|
if test -f /usr/lib/libthread.so -o -f /usr/lib/libthreadT.so
|
||||||
then
|
then
|
||||||
MYSQL_REMOVE_SOCKET_FROM_LIBS_HACK
|
MYSQL_REMOVE_SOCKET_FROM_LIBS_HACK
|
||||||
if expr "$CC" : ".*gcc.*"
|
if expr "$CC" : ".*gcc.*" > /dev/null
|
||||||
then
|
then
|
||||||
with_named_thread="-pthread -lsocket -lnsl"
|
with_named_thread="-pthread -lsocket -lnsl"
|
||||||
|
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
|
||||||
|
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
|
||||||
else
|
else
|
||||||
with_named_thread="-Kthread -lsocket -lnsl"
|
with_named_thread="-Kthread -lsocket -lnsl"
|
||||||
|
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
|
||||||
|
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
|
||||||
fi
|
fi
|
||||||
if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null
|
if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null
|
||||||
then
|
then
|
||||||
AC_DEFINE([HAVE_UNIXWARE7_THREADS], [1],
|
AC_DEFINE(HAVE_UNIXWARE7_THREADS, [1], [Have UnixWare 7 (or similar) almost-POSIX threading library])
|
||||||
[UNIXWARE7 threads are not posix])
|
|
||||||
else
|
|
||||||
AC_DEFINE([HAVE_UNIXWARE7_POSIX], [1],
|
|
||||||
[new UNIXWARE7 threads that are not yet posix])
|
|
||||||
fi
|
fi
|
||||||
# We must have cc
|
AC_MSG_RESULT(yes)
|
||||||
AC_MSG_CHECKING("for gcc")
|
|
||||||
if expr "$CC" : ".*gcc.*"
|
|
||||||
then
|
|
||||||
CC="$CC -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
|
|
||||||
CXX="$CXX -pthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
|
|
||||||
else
|
else
|
||||||
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
|
AC_MSG_ERROR([configure: error: Can't find thread library on SCO/Caldera system. See the Installation chapter in the Reference Manual.])
|
||||||
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK"
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT("yes")
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([configure: error: Can't find thread libs on Caldera OpenUNIX 8. See the Installation chapter in the Reference Manual.])
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT("no")
|
AC_MSG_RESULT(no)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -2510,7 +2470,7 @@ then
|
|||||||
AC_CONFIG_FILES(storage/bdb/Makefile)
|
AC_CONFIG_FILES(storage/bdb/Makefile)
|
||||||
|
|
||||||
echo "CONFIGURING FOR BERKELEY DB"
|
echo "CONFIGURING FOR BERKELEY DB"
|
||||||
bdb_conf_flags="--disable-shared"
|
bdb_conf_flags="--disable-shared --build=$build_alias"
|
||||||
if test $with_debug = "yes"
|
if test $with_debug = "yes"
|
||||||
then
|
then
|
||||||
bdb_conf_flags="$bdb_conf_flags --enable-debug --enable-diagnostic"
|
bdb_conf_flags="$bdb_conf_flags --enable-debug --enable-diagnostic"
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
Published with a permission.
|
Published with a permission.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// needed to have access to 64 bit file functions
|
/* needed to have access to 64 bit file functions */
|
||||||
#define _LARGEFILE_SOURCE
|
#define _LARGEFILE_SOURCE
|
||||||
#define _LARGEFILE64_SOURCE
|
#define _LARGEFILE64_SOURCE
|
||||||
|
|
||||||
@ -35,7 +35,7 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
// all of these ripped from InnoDB code from MySQL 4.0.22
|
/* all of these ripped from InnoDB code from MySQL 4.0.22 */
|
||||||
#define UT_HASH_RANDOM_MASK 1463735687
|
#define UT_HASH_RANDOM_MASK 1463735687
|
||||||
#define UT_HASH_RANDOM_MASK2 1653893711
|
#define UT_HASH_RANDOM_MASK2 1653893711
|
||||||
#define FIL_PAGE_LSN 16
|
#define FIL_PAGE_LSN 16
|
||||||
@ -46,14 +46,15 @@
|
|||||||
#define FIL_PAGE_SPACE_OR_CHKSUM 0
|
#define FIL_PAGE_SPACE_OR_CHKSUM 0
|
||||||
#define UNIV_PAGE_SIZE (2 * 8192)
|
#define UNIV_PAGE_SIZE (2 * 8192)
|
||||||
|
|
||||||
// command line argument to do page checks (that's it)
|
/* command line argument to do page checks (that's it) */
|
||||||
// another argument to specify page ranges... seek to right spot and go from there
|
/* another argument to specify page ranges... seek to right spot and go from there */
|
||||||
|
|
||||||
typedef unsigned long int ulint;
|
typedef unsigned long int ulint;
|
||||||
typedef unsigned char byte;
|
typedef unsigned char byte;
|
||||||
|
|
||||||
/* innodb function in name; modified slightly to not have the ASM version (lots of #ifs that didn't apply) */
|
/* innodb function in name; modified slightly to not have the ASM version (lots of #ifs that didn't apply) */
|
||||||
ulint mach_read_from_4(byte *b) {
|
ulint mach_read_from_4(byte *b)
|
||||||
|
{
|
||||||
return( ((ulint)(b[0]) << 24)
|
return( ((ulint)(b[0]) << 24)
|
||||||
+ ((ulint)(b[1]) << 16)
|
+ ((ulint)(b[1]) << 16)
|
||||||
+ ((ulint)(b[2]) << 8)
|
+ ((ulint)(b[2]) << 8)
|
||||||
@ -82,7 +83,8 @@ ut_fold_binary(
|
|||||||
ulint i;
|
ulint i;
|
||||||
ulint fold= 0;
|
ulint fold= 0;
|
||||||
|
|
||||||
for (i = 0; i < len; i++) {
|
for (i= 0; i < len; i++)
|
||||||
|
{
|
||||||
fold= ut_fold_ulint_pair(fold, (ulint)(*str));
|
fold= ut_fold_ulint_pair(fold, (ulint)(*str));
|
||||||
|
|
||||||
str++;
|
str++;
|
||||||
@ -132,28 +134,31 @@ buf_calc_page_old_checksum(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv)
|
||||||
FILE *f; // our input file
|
{
|
||||||
byte *p; // storage of pages read
|
FILE *f; /* our input file */
|
||||||
int bytes; // bytes read count
|
byte *p; /* storage of pages read */
|
||||||
ulint ct; // current page number (0 based)
|
int bytes; /* bytes read count */
|
||||||
int now; // current time
|
ulint ct; /* current page number (0 based) */
|
||||||
int lastt; // last time
|
int now; /* current time */
|
||||||
ulint oldcsum, oldcsumfield, csum, csumfield, logseq, logseqfield; // ulints for checksum storage
|
int lastt; /* last time */
|
||||||
struct stat st; // for stat, if you couldn't guess
|
ulint oldcsum, oldcsumfield, csum, csumfield, logseq, logseqfield; /* ulints for checksum storage */
|
||||||
unsigned long long int size; // size of file (has to be 64 bits)
|
struct stat st; /* for stat, if you couldn't guess */
|
||||||
ulint pages; // number of pages in file
|
unsigned long long int size; /* size of file (has to be 64 bits) */
|
||||||
ulint start_page = 0, end_page = 0, use_end_page = 0; // for starting and ending at certain pages
|
ulint pages; /* number of pages in file */
|
||||||
|
ulint start_page= 0, end_page= 0, use_end_page= 0; /* for starting and ending at certain pages */
|
||||||
off_t offset= 0;
|
off_t offset= 0;
|
||||||
int just_count = 0; // if true, just print page count
|
int just_count= 0; /* if true, just print page count */
|
||||||
int verbose= 0;
|
int verbose= 0;
|
||||||
int debug= 0;
|
int debug= 0;
|
||||||
int c;
|
int c;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
// remove arguments
|
/* remove arguments */
|
||||||
while ((c = getopt(argc, argv, "cvds:e:p:")) != -1) {
|
while ((c= getopt(argc, argv, "cvds:e:p:")) != -1)
|
||||||
switch (c) {
|
{
|
||||||
|
switch (c)
|
||||||
|
{
|
||||||
case 'v':
|
case 'v':
|
||||||
verbose= 1;
|
verbose= 1;
|
||||||
break;
|
break;
|
||||||
@ -186,11 +191,12 @@ int main(int argc, char **argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// debug implies verbose...
|
/* debug implies verbose... */
|
||||||
if (debug) verbose= 1;
|
if (debug) verbose= 1;
|
||||||
|
|
||||||
// make sure we have the right arguments
|
/* make sure we have the right arguments */
|
||||||
if (optind >= argc) {
|
if (optind >= argc)
|
||||||
|
{
|
||||||
printf("InnoDB offline file checksum utility.\n");
|
printf("InnoDB offline file checksum utility.\n");
|
||||||
printf("usage: %s [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-d] <filename>\n", argv[0]);
|
printf("usage: %s [-c] [-s <start page>] [-e <end page>] [-p <page>] [-v] [-d] <filename>\n", argv[0]);
|
||||||
printf("\t-c\tprint the count of pages in the file\n");
|
printf("\t-c\tprint the count of pages in the file\n");
|
||||||
@ -202,99 +208,115 @@ int main(int argc, char **argv) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// stat the file to get size and page count
|
/* stat the file to get size and page count */
|
||||||
if (stat(argv[optind], &st)) {
|
if (stat(argv[optind], &st))
|
||||||
|
{
|
||||||
perror("error statting file");
|
perror("error statting file");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
size= st.st_size;
|
size= st.st_size;
|
||||||
pages= size / UNIV_PAGE_SIZE;
|
pages= size / UNIV_PAGE_SIZE;
|
||||||
if (just_count) {
|
if (just_count)
|
||||||
|
{
|
||||||
printf("%lu\n", pages);
|
printf("%lu\n", pages);
|
||||||
return 0;
|
return 0;
|
||||||
} else if (verbose) {
|
}
|
||||||
|
else if (verbose)
|
||||||
|
{
|
||||||
printf("file %s= %llu bytes (%lu pages)...\n", argv[1], size, pages);
|
printf("file %s= %llu bytes (%lu pages)...\n", argv[1], size, pages);
|
||||||
printf("checking pages in range %lu to %lu\n", start_page, use_end_page ? end_page : (pages - 1));
|
printf("checking pages in range %lu to %lu\n", start_page, use_end_page ? end_page : (pages - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
// open the file for reading
|
/* open the file for reading */
|
||||||
f= fopen(argv[optind], "r");
|
f= fopen(argv[optind], "r");
|
||||||
if (!f) {
|
if (!f)
|
||||||
|
{
|
||||||
perror("error opening file");
|
perror("error opening file");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// seek to the necessary position
|
/* seek to the necessary position */
|
||||||
if (start_page) {
|
if (start_page)
|
||||||
|
{
|
||||||
fd= fileno(f);
|
fd= fileno(f);
|
||||||
if (!fd) {
|
if (!fd)
|
||||||
|
{
|
||||||
perror("unable to obtain file descriptor number");
|
perror("unable to obtain file descriptor number");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
offset= (off_t)start_page * (off_t)UNIV_PAGE_SIZE;
|
offset= (off_t)start_page * (off_t)UNIV_PAGE_SIZE;
|
||||||
|
|
||||||
if (lseek(fd, offset, SEEK_SET) != offset) {
|
if (lseek(fd, offset, SEEK_SET) != offset)
|
||||||
|
{
|
||||||
perror("unable to seek to necessary offset");
|
perror("unable to seek to necessary offset");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// allocate buffer for reading (so we don't realloc every time)
|
/* allocate buffer for reading (so we don't realloc every time) */
|
||||||
p= (byte *)malloc(UNIV_PAGE_SIZE);
|
p= (byte *)malloc(UNIV_PAGE_SIZE);
|
||||||
|
|
||||||
// main checksumming loop
|
/* main checksumming loop */
|
||||||
ct= start_page;
|
ct= start_page;
|
||||||
lastt= 0;
|
lastt= 0;
|
||||||
while (!feof(f)) {
|
while (!feof(f))
|
||||||
|
{
|
||||||
bytes= fread(p, 1, UNIV_PAGE_SIZE, f);
|
bytes= fread(p, 1, UNIV_PAGE_SIZE, f);
|
||||||
if (!bytes && feof(f)) return 0;
|
if (!bytes && feof(f)) return 0;
|
||||||
if (bytes != UNIV_PAGE_SIZE) {
|
if (bytes != UNIV_PAGE_SIZE)
|
||||||
|
{
|
||||||
fprintf(stderr, "bytes read (%d) doesn't match universal page size (%d)\n", bytes, UNIV_PAGE_SIZE);
|
fprintf(stderr, "bytes read (%d) doesn't match universal page size (%d)\n", bytes, UNIV_PAGE_SIZE);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check the "stored log sequence numbers"
|
/* check the "stored log sequence numbers" */
|
||||||
logseq= mach_read_from_4(p + FIL_PAGE_LSN + 4);
|
logseq= mach_read_from_4(p + FIL_PAGE_LSN + 4);
|
||||||
logseqfield= mach_read_from_4(p + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM + 4);
|
logseqfield= mach_read_from_4(p + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM + 4);
|
||||||
if (debug)
|
if (debug)
|
||||||
printf("page %lu: log sequence number: first = %lu; second = %lu\n", ct, logseq, logseqfield);
|
printf("page %lu: log sequence number: first = %lu; second = %lu\n", ct, logseq, logseqfield);
|
||||||
if (logseq != logseqfield) {
|
if (logseq != logseqfield)
|
||||||
|
{
|
||||||
fprintf(stderr, "page %lu invalid (fails log sequence number check)\n", ct);
|
fprintf(stderr, "page %lu invalid (fails log sequence number check)\n", ct);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check old method of checksumming
|
/* check old method of checksumming */
|
||||||
oldcsum= buf_calc_page_old_checksum(p);
|
oldcsum= buf_calc_page_old_checksum(p);
|
||||||
oldcsumfield= mach_read_from_4(p + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM);
|
oldcsumfield= mach_read_from_4(p + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM);
|
||||||
if (debug)
|
if (debug)
|
||||||
printf("page %lu: old style: calculated = %lu; recorded = %lu\n", ct, oldcsum, oldcsumfield);
|
printf("page %lu: old style: calculated = %lu; recorded = %lu\n", ct, oldcsum, oldcsumfield);
|
||||||
if (oldcsumfield != mach_read_from_4(p + FIL_PAGE_LSN) && oldcsumfield != oldcsum) {
|
if (oldcsumfield != mach_read_from_4(p + FIL_PAGE_LSN) && oldcsumfield != oldcsum)
|
||||||
|
{
|
||||||
fprintf(stderr, "page %lu invalid (fails old style checksum)\n", ct);
|
fprintf(stderr, "page %lu invalid (fails old style checksum)\n", ct);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// now check the new method
|
/* now check the new method */
|
||||||
csum= buf_calc_page_new_checksum(p);
|
csum= buf_calc_page_new_checksum(p);
|
||||||
csumfield= mach_read_from_4(p + FIL_PAGE_SPACE_OR_CHKSUM);
|
csumfield= mach_read_from_4(p + FIL_PAGE_SPACE_OR_CHKSUM);
|
||||||
if (debug)
|
if (debug)
|
||||||
printf("page %lu: new style: calculated = %lu; recorded = %lu\n", ct, csum, csumfield);
|
printf("page %lu: new style: calculated = %lu; recorded = %lu\n", ct, csum, csumfield);
|
||||||
if (csumfield != 0 && csum != csumfield) {
|
if (csumfield != 0 && csum != csumfield)
|
||||||
|
{
|
||||||
fprintf(stderr, "page %lu invalid (fails new style checksum)\n", ct);
|
fprintf(stderr, "page %lu invalid (fails new style checksum)\n", ct);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// end if this was the last page we were supposed to check
|
/* end if this was the last page we were supposed to check */
|
||||||
if (use_end_page && (ct >= end_page))
|
if (use_end_page && (ct >= end_page))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
// do counter increase and progress printing
|
/* do counter increase and progress printing */
|
||||||
ct++;
|
ct++;
|
||||||
if (verbose) {
|
if (verbose)
|
||||||
if (ct % 64 == 0) {
|
{
|
||||||
|
if (ct % 64 == 0)
|
||||||
|
{
|
||||||
now= time(0);
|
now= time(0);
|
||||||
if (!lastt) lastt= now;
|
if (!lastt) lastt= now;
|
||||||
if (now - lastt >= 1) {
|
if (now - lastt >= 1)
|
||||||
|
{
|
||||||
printf("page %lu okay: %.3f%% done\n", (ct - 1), (float) ct / pages * 100);
|
printf("page %lu okay: %.3f%% done\n", (ct - 1), (float) ct / pages * 100);
|
||||||
lastt= now;
|
lastt= now;
|
||||||
}
|
}
|
||||||
|
@ -922,6 +922,7 @@ typedef off_t os_off_t;
|
|||||||
#define socket_errno WSAGetLastError()
|
#define socket_errno WSAGetLastError()
|
||||||
#define SOCKET_EINTR WSAEINTR
|
#define SOCKET_EINTR WSAEINTR
|
||||||
#define SOCKET_EAGAIN WSAEINPROGRESS
|
#define SOCKET_EAGAIN WSAEINPROGRESS
|
||||||
|
#define SOCKET_ETIMEDOUT WSAETIMEDOUT
|
||||||
#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
|
#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
|
||||||
#define SOCKET_ENFILE ENFILE
|
#define SOCKET_ENFILE ENFILE
|
||||||
#define SOCKET_EMFILE EMFILE
|
#define SOCKET_EMFILE EMFILE
|
||||||
@ -929,6 +930,7 @@ typedef off_t os_off_t;
|
|||||||
#define socket_errno sock_errno()
|
#define socket_errno sock_errno()
|
||||||
#define SOCKET_EINTR SOCEINTR
|
#define SOCKET_EINTR SOCEINTR
|
||||||
#define SOCKET_EAGAIN SOCEINPROGRESS
|
#define SOCKET_EAGAIN SOCEINPROGRESS
|
||||||
|
#define SOCKET_ETIMEDOUT SOCKET_EINTR
|
||||||
#define SOCKET_EWOULDBLOCK SOCEWOULDBLOCK
|
#define SOCKET_EWOULDBLOCK SOCEWOULDBLOCK
|
||||||
#define SOCKET_ENFILE SOCENFILE
|
#define SOCKET_ENFILE SOCENFILE
|
||||||
#define SOCKET_EMFILE SOCEMFILE
|
#define SOCKET_EMFILE SOCEMFILE
|
||||||
@ -938,6 +940,7 @@ typedef off_t os_off_t;
|
|||||||
#define closesocket(A) close(A)
|
#define closesocket(A) close(A)
|
||||||
#define SOCKET_EINTR EINTR
|
#define SOCKET_EINTR EINTR
|
||||||
#define SOCKET_EAGAIN EAGAIN
|
#define SOCKET_EAGAIN EAGAIN
|
||||||
|
#define SOCKET_ETIMEDOUT SOCKET_EINTR
|
||||||
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
|
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
|
||||||
#define SOCKET_ENFILE ENFILE
|
#define SOCKET_ENFILE ENFILE
|
||||||
#define SOCKET_EMFILE EMFILE
|
#define SOCKET_EMFILE EMFILE
|
||||||
|
@ -298,11 +298,6 @@ extern int my_pthread_create_detached;
|
|||||||
int sigwait(sigset_t *set, int *sig);
|
int sigwait(sigset_t *set, int *sig);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_UNIXWARE7_POSIX)
|
|
||||||
#undef HAVE_NONPOSIX_SIGWAIT
|
|
||||||
#define HAVE_NONPOSIX_SIGWAIT /* sigwait takes only 1 argument */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_NONPOSIX_SIGWAIT
|
#ifndef HAVE_NONPOSIX_SIGWAIT
|
||||||
#define my_sigwait(A,B) sigwait((A),(B))
|
#define my_sigwait(A,B) sigwait((A),(B))
|
||||||
#else
|
#else
|
||||||
|
@ -74,6 +74,8 @@ int vio_fastsend(Vio *vio);
|
|||||||
int vio_keepalive(Vio *vio, my_bool onoff);
|
int vio_keepalive(Vio *vio, my_bool onoff);
|
||||||
/* Whenever we should retry the last read/write operation. */
|
/* Whenever we should retry the last read/write operation. */
|
||||||
my_bool vio_should_retry(Vio *vio);
|
my_bool vio_should_retry(Vio *vio);
|
||||||
|
/* Check that operation was timed out */
|
||||||
|
my_bool vio_was_interrupted(Vio *vio);
|
||||||
/* Short text description of the socket for those, who are curious.. */
|
/* Short text description of the socket for those, who are curious.. */
|
||||||
const char* vio_description(Vio *vio);
|
const char* vio_description(Vio *vio);
|
||||||
/* Return the type of the connection */
|
/* Return the type of the connection */
|
||||||
@ -153,6 +155,7 @@ int vio_close_shared_memory(Vio * vio);
|
|||||||
#define vio_fastsend(vio) (vio)->fastsend(vio)
|
#define vio_fastsend(vio) (vio)->fastsend(vio)
|
||||||
#define vio_keepalive(vio, set_keep_alive) (vio)->viokeepalive(vio, set_keep_alive)
|
#define vio_keepalive(vio, set_keep_alive) (vio)->viokeepalive(vio, set_keep_alive)
|
||||||
#define vio_should_retry(vio) (vio)->should_retry(vio)
|
#define vio_should_retry(vio) (vio)->should_retry(vio)
|
||||||
|
#define vio_was_interrupted(vio) (vio)->was_interrupted(vio)
|
||||||
#define vio_close(vio) ((vio)->vioclose)(vio)
|
#define vio_close(vio) ((vio)->vioclose)(vio)
|
||||||
#define vio_peer_addr(vio, buf, prt) (vio)->peer_addr(vio, buf, prt)
|
#define vio_peer_addr(vio, buf, prt) (vio)->peer_addr(vio, buf, prt)
|
||||||
#define vio_in_addr(vio, in) (vio)->in_addr(vio, in)
|
#define vio_in_addr(vio, in) (vio)->in_addr(vio, in)
|
||||||
@ -198,6 +201,7 @@ struct st_vio
|
|||||||
my_bool (*peer_addr)(Vio*, char *, uint16*);
|
my_bool (*peer_addr)(Vio*, char *, uint16*);
|
||||||
void (*in_addr)(Vio*, struct in_addr*);
|
void (*in_addr)(Vio*, struct in_addr*);
|
||||||
my_bool (*should_retry)(Vio*);
|
my_bool (*should_retry)(Vio*);
|
||||||
|
my_bool (*was_interrupted)(Vio*);
|
||||||
int (*vioclose)(Vio*);
|
int (*vioclose)(Vio*);
|
||||||
void (*timeout)(Vio*, unsigned int which, unsigned int timeout);
|
void (*timeout)(Vio*, unsigned int which, unsigned int timeout);
|
||||||
void *ssl_arg;
|
void *ssl_arg;
|
||||||
|
@ -891,7 +891,7 @@ sub executable_setup () {
|
|||||||
mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables",
|
mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables",
|
||||||
"$glob_basedir/scripts/mysql_fix_privilege_tables");
|
"$glob_basedir/scripts/mysql_fix_privilege_tables");
|
||||||
$exe_my_print_defaults=
|
$exe_my_print_defaults=
|
||||||
mtr_script_exists("path_client_bindir/my_print_defaults");
|
mtr_script_exists("$path_client_bindir/my_print_defaults");
|
||||||
|
|
||||||
$path_language= mtr_path_exists("$glob_basedir/share/mysql/english/",
|
$path_language= mtr_path_exists("$glob_basedir/share/mysql/english/",
|
||||||
"$glob_basedir/share/english/");
|
"$glob_basedir/share/english/");
|
||||||
|
@ -9,6 +9,8 @@ NULL
|
|||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
create table t1 (b char(0) not null);
|
create table t1 (b char(0) not null);
|
||||||
create table if not exists t1 (b char(0) not null);
|
create table if not exists t1 (b char(0) not null);
|
||||||
|
Warnings:
|
||||||
|
Note 1050 Table 't1' already exists
|
||||||
insert into t1 values (""),(null);
|
insert into t1 values (""),(null);
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
|
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
|
||||||
@ -244,9 +246,13 @@ create table t1 select x'4132';
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 select 1,2,3;
|
create table t1 select 1,2,3;
|
||||||
create table if not exists t1 select 1,2;
|
create table if not exists t1 select 1,2;
|
||||||
|
Warnings:
|
||||||
|
Note 1050 Table 't1' already exists
|
||||||
create table if not exists t1 select 1,2,3,4;
|
create table if not exists t1 select 1,2,3,4;
|
||||||
ERROR 21S01: Column count doesn't match value count at row 1
|
ERROR 21S01: Column count doesn't match value count at row 1
|
||||||
create table if not exists t1 select 1;
|
create table if not exists t1 select 1;
|
||||||
|
Warnings:
|
||||||
|
Note 1050 Table 't1' already exists
|
||||||
select * from t1;
|
select * from t1;
|
||||||
1 2 3
|
1 2 3
|
||||||
1 2 3
|
1 2 3
|
||||||
@ -255,9 +261,13 @@ select * from t1;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 select 1,2,3;
|
create table t1 select 1,2,3;
|
||||||
create table if not exists t1 select 1,2;
|
create table if not exists t1 select 1,2;
|
||||||
|
Warnings:
|
||||||
|
Note 1050 Table 't1' already exists
|
||||||
create table if not exists t1 select 1,2,3,4;
|
create table if not exists t1 select 1,2,3,4;
|
||||||
ERROR 21S01: Column count doesn't match value count at row 1
|
ERROR 21S01: Column count doesn't match value count at row 1
|
||||||
create table if not exists t1 select 1;
|
create table if not exists t1 select 1;
|
||||||
|
Warnings:
|
||||||
|
Note 1050 Table 't1' already exists
|
||||||
select * from t1;
|
select * from t1;
|
||||||
1 2 3
|
1 2 3
|
||||||
1 2 3
|
1 2 3
|
||||||
@ -268,6 +278,7 @@ create table t1 (a int not null, b int, primary key (a));
|
|||||||
insert into t1 values (1,1);
|
insert into t1 values (1,1);
|
||||||
create table if not exists t1 select 2;
|
create table if not exists t1 select 2;
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1050 Table 't1' already exists
|
||||||
Warning 1364 Field 'a' doesn't have a default value
|
Warning 1364 Field 'a' doesn't have a default value
|
||||||
select * from t1;
|
select * from t1;
|
||||||
a b
|
a b
|
||||||
@ -275,6 +286,7 @@ a b
|
|||||||
0 2
|
0 2
|
||||||
create table if not exists t1 select 3 as 'a',4 as 'b';
|
create table if not exists t1 select 3 as 'a',4 as 'b';
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1050 Table 't1' already exists
|
||||||
Warning 1364 Field 'a' doesn't have a default value
|
Warning 1364 Field 'a' doesn't have a default value
|
||||||
create table if not exists t1 select 3 as 'a',3 as 'b';
|
create table if not exists t1 select 3 as 'a',3 as 'b';
|
||||||
ERROR 23000: Duplicate entry '3' for key 1
|
ERROR 23000: Duplicate entry '3' for key 1
|
||||||
@ -615,3 +627,17 @@ create table t1 like v1;
|
|||||||
ERROR HY000: 'mysqltest.v1' is not BASE TABLE
|
ERROR HY000: 'mysqltest.v1' is not BASE TABLE
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
|
create database mysqltest;
|
||||||
|
create database if not exists mysqltest character set latin2;
|
||||||
|
Warnings:
|
||||||
|
Note 1007 Can't create database 'mysqltest'; database exists
|
||||||
|
show create database mysqltest;
|
||||||
|
Database Create Database
|
||||||
|
mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */
|
||||||
|
drop database mysqltest;
|
||||||
|
use test;
|
||||||
|
create table t1 (a int);
|
||||||
|
create table if not exists t1 (a int);
|
||||||
|
Warnings:
|
||||||
|
Note 1050 Table 't1' already exists
|
||||||
|
drop table t1;
|
||||||
|
@ -1905,6 +1905,116 @@ Z,z,Ź,ź,Ż,ż,Ž,ž
|
|||||||
ǁ
|
ǁ
|
||||||
ǂ
|
ǂ
|
||||||
ǃ
|
ǃ
|
||||||
|
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_esperanto_ci;
|
||||||
|
group_concat(c1 order by c1)
|
||||||
|
÷
|
||||||
|
×
|
||||||
|
A,a,À,Á,Â,Ã,Ä,Å,à,á,â,ã,ä,å,Ā,ā,Ă,ă,Ą,ą,Ǎ,ǎ,Ǟ,ǟ,Ǡ,ǡ,Ǻ,ǻ
|
||||||
|
AA,Aa,aA,aa
|
||||||
|
Æ,æ,Ǣ,ǣ,Ǽ,ǽ
|
||||||
|
B,b
|
||||||
|
ƀ
|
||||||
|
Ɓ
|
||||||
|
Ƃ,ƃ
|
||||||
|
C,c,Ç,ç,Ć,ć,Ċ,ċ,Č,č
|
||||||
|
CH,Ch,cH,ch
|
||||||
|
Ĉ,ĉ
|
||||||
|
Ƈ,ƈ
|
||||||
|
D,d,Ď,ď
|
||||||
|
DZ,Dz,dZ,dz,DŽ,Dž,dž,DZ,Dz,dz
|
||||||
|
Đ,đ
|
||||||
|
Ɖ
|
||||||
|
Ɗ
|
||||||
|
Ƌ,ƌ
|
||||||
|
Ð,ð
|
||||||
|
E,e,È,É,Ê,Ë,è,é,ê,ë,Ē,ē,Ĕ,ĕ,Ė,ė,Ę,ę,Ě,ě
|
||||||
|
Ǝ,ǝ
|
||||||
|
Ə
|
||||||
|
Ɛ
|
||||||
|
F,f
|
||||||
|
Ƒ,ƒ
|
||||||
|
G,g,Ğ,ğ,Ġ,ġ,Ģ,ģ,Ǧ,ǧ,Ǵ,ǵ
|
||||||
|
Ĝ,ĝ
|
||||||
|
Ǥ,ǥ
|
||||||
|
Ɠ
|
||||||
|
Ɣ
|
||||||
|
Ƣ,ƣ
|
||||||
|
H,h
|
||||||
|
Ĥ,ĥ
|
||||||
|
ƕ,Ƕ
|
||||||
|
Ħ,ħ
|
||||||
|
I,i,Ì,Í,Î,Ï,ì,í,î,ï,Ĩ,ĩ,Ī,ī,Ĭ,ĭ,Į,į,İ,Ǐ,ǐ
|
||||||
|
IJ,Ij,iJ,ij,IJ,ij
|
||||||
|
ı
|
||||||
|
Ɨ
|
||||||
|
Ɩ
|
||||||
|
J,j,ǰ
|
||||||
|
Ĵ,ĵ
|
||||||
|
K,k,Ķ,ķ,Ǩ,ǩ
|
||||||
|
Ƙ,ƙ
|
||||||
|
L,l,Ĺ,ĺ,Ļ,ļ,Ľ,ľ
|
||||||
|
Ŀ,ŀ
|
||||||
|
LJ,Lj,lJ,lj,LJ,Lj,lj
|
||||||
|
LL,Ll,lL,ll
|
||||||
|
Ł,ł
|
||||||
|
ƚ
|
||||||
|
ƛ
|
||||||
|
M,m
|
||||||
|
N,n,Ñ,ñ,Ń,ń,Ņ,ņ,Ň,ň,Ǹ,ǹ
|
||||||
|
NJ,Nj,nJ,nj,NJ,Nj,nj
|
||||||
|
Ɲ
|
||||||
|
ƞ
|
||||||
|
Ŋ,ŋ
|
||||||
|
O,o,Ò,Ó,Ô,Õ,Ö,ò,ó,ô,õ,ö,Ō,ō,Ŏ,ŏ,Ő,ő,Ơ,ơ,Ǒ,ǒ,Ǫ,ǫ,Ǭ,ǭ
|
||||||
|
OE,Oe,oE,oe,Œ,œ
|
||||||
|
Ø,ø,Ǿ,ǿ
|
||||||
|
Ɔ
|
||||||
|
Ɵ
|
||||||
|
P,p
|
||||||
|
Ƥ,ƥ
|
||||||
|
Q,q
|
||||||
|
ĸ
|
||||||
|
R,r,Ŕ,ŕ,Ŗ,ŗ,Ř,ř
|
||||||
|
RR,Rr,rR,rr
|
||||||
|
Ʀ
|
||||||
|
S,s,Ś,ś,Ş,ş,Š,š,ſ
|
||||||
|
SS,Ss,sS,ss,ß
|
||||||
|
Ŝ,ŝ
|
||||||
|
Ʃ
|
||||||
|
ƪ
|
||||||
|
T,t,Ţ,ţ,Ť,ť
|
||||||
|
ƾ
|
||||||
|
Ŧ,ŧ
|
||||||
|
ƫ
|
||||||
|
Ƭ,ƭ
|
||||||
|
Ʈ
|
||||||
|
U,u,Ù,Ú,Û,Ü,ù,ú,û,ü,Ũ,ũ,Ū,ū,Ů,ů,Ű,ű,Ų,ų,Ư,ư,Ǔ,ǔ,Ǖ,ǖ,Ǘ,ǘ,Ǚ,ǚ,Ǜ,ǜ
|
||||||
|
Ŭ,ŭ
|
||||||
|
Ɯ
|
||||||
|
Ʊ
|
||||||
|
V,v
|
||||||
|
Ʋ
|
||||||
|
W,w,Ŵ,ŵ
|
||||||
|
X,x
|
||||||
|
Y,y,Ý,ý,ÿ,Ŷ,ŷ,Ÿ
|
||||||
|
Ƴ,ƴ
|
||||||
|
Z,z,Ź,ź,Ż,ż,Ž,ž
|
||||||
|
ƍ
|
||||||
|
Ƶ,ƶ
|
||||||
|
Ʒ,Ǯ,ǯ
|
||||||
|
Ƹ,ƹ
|
||||||
|
ƺ
|
||||||
|
Þ,þ
|
||||||
|
ƿ,Ƿ
|
||||||
|
ƻ
|
||||||
|
Ƨ,ƨ
|
||||||
|
Ƽ,ƽ
|
||||||
|
Ƅ,ƅ
|
||||||
|
ʼn
|
||||||
|
ǀ
|
||||||
|
ǁ
|
||||||
|
ǂ
|
||||||
|
ǃ
|
||||||
drop table t1;
|
drop table t1;
|
||||||
SET NAMES utf8;
|
SET NAMES utf8;
|
||||||
CREATE TABLE t1 (c varchar(255) NOT NULL COLLATE utf8_general_ci, INDEX (c));
|
CREATE TABLE t1 (c varchar(255) NOT NULL COLLATE utf8_general_ci, INDEX (c));
|
||||||
|
@ -1719,6 +1719,17 @@ select * from t1;
|
|||||||
a
|
a
|
||||||
42
|
42
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
|
||||||
|
insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
|
||||||
|
select * from t1 order by a,b,c,d;
|
||||||
|
a b c d e
|
||||||
|
1 1 a 1 1
|
||||||
|
2 2 b 2 2
|
||||||
|
3 3 ab 3 3
|
||||||
|
explain select * from t1 order by a,b,c,d;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
|
||||||
|
drop table t1;
|
||||||
create table t1 (x bigint unsigned not null primary key) engine=innodb;
|
create table t1 (x bigint unsigned not null primary key) engine=innodb;
|
||||||
insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
|
insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
|
||||||
select * from t1;
|
select * from t1;
|
||||||
@ -1765,7 +1776,7 @@ Variable_name Value
|
|||||||
Innodb_rows_deleted 2070
|
Innodb_rows_deleted 2070
|
||||||
show status like "Innodb_rows_inserted";
|
show status like "Innodb_rows_inserted";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Innodb_rows_inserted 31722
|
Innodb_rows_inserted 31725
|
||||||
show status like "Innodb_rows_updated";
|
show status like "Innodb_rows_updated";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Innodb_rows_updated 29530
|
Innodb_rows_updated 29530
|
||||||
|
@ -99,6 +99,8 @@ id int not null primary key,
|
|||||||
id2 int not null,
|
id2 int not null,
|
||||||
name char(20)
|
name char(20)
|
||||||
) engine=ndb;
|
) engine=ndb;
|
||||||
|
Warnings:
|
||||||
|
Note 1050 Table 't3' already exists
|
||||||
show status like 'handler_discover%';
|
show status like 'handler_discover%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_discover 0
|
Handler_discover 0
|
||||||
|
@ -2922,3 +2922,24 @@ a b b
|
|||||||
select * from t1 inner join t2 using (a);
|
select * from t1 inner join t2 using (a);
|
||||||
a b b
|
a b b
|
||||||
1 10 10
|
1 10 10
|
||||||
|
drop table t1, t2;
|
||||||
|
create table t1 (a int, c int);
|
||||||
|
create table t2 (b int);
|
||||||
|
create table t3 (b int, a int);
|
||||||
|
create table t4 (c int);
|
||||||
|
insert into t1 values (1,1);
|
||||||
|
insert into t2 values (1);
|
||||||
|
insert into t3 values (1,1);
|
||||||
|
insert into t4 values (1);
|
||||||
|
select * from t1 join t2 join t3 on (t2.b = t3.b and t1.a = t3.a);
|
||||||
|
a c b b a
|
||||||
|
1 1 1 1 1
|
||||||
|
select * from t1, t2 join t3 on (t2.b = t3.b and t1.a = t3.a);
|
||||||
|
ERROR 42S22: Unknown column 't1.a' in 'on clause'
|
||||||
|
select * from t1 join t2 join t3 join t4 on (t1.a = t4.c and t2.b = t4.c);
|
||||||
|
a c b b a c
|
||||||
|
1 1 1 1 1 1
|
||||||
|
select * from t1 join t2 join t4 using (c);
|
||||||
|
c a b
|
||||||
|
1 1 1
|
||||||
|
drop table t1, t2, t3, t4;
|
||||||
|
@ -23,6 +23,8 @@ a b
|
|||||||
6 g
|
6 g
|
||||||
create TEMPORARY TABLE t2 engine=heap select * from t1;
|
create TEMPORARY TABLE t2 engine=heap select * from t1;
|
||||||
create TEMPORARY TABLE IF NOT EXISTS t2 (a int) engine=heap;
|
create TEMPORARY TABLE IF NOT EXISTS t2 (a int) engine=heap;
|
||||||
|
Warnings:
|
||||||
|
Note 1050 Table 't2' already exists
|
||||||
CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
|
CREATE TEMPORARY TABLE t1 (a int not null, b char (10) not null);
|
||||||
ERROR 42S01: Table 't1' already exists
|
ERROR 42S01: Table 't1' already exists
|
||||||
ALTER TABLE t1 RENAME t2;
|
ALTER TABLE t1 RENAME t2;
|
||||||
|
@ -63,9 +63,11 @@ show count(*) warnings;
|
|||||||
1
|
1
|
||||||
create table t1(id int);
|
create table t1(id int);
|
||||||
create table if not exists t1(id int);
|
create table if not exists t1(id int);
|
||||||
|
Warnings:
|
||||||
|
Note 1050 Table 't1' already exists
|
||||||
select @@warning_count;
|
select @@warning_count;
|
||||||
@@warning_count
|
@@warning_count
|
||||||
0
|
1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1(a tinyint, b int not null, c date, d char(5));
|
create table t1(a tinyint, b int not null, c date, d char(5));
|
||||||
load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
|
load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
|
||||||
|
@ -533,4 +533,16 @@ create view v1 as select 'foo' from dual;
|
|||||||
create table t1 like v1;
|
create table t1 like v1;
|
||||||
drop view v1;
|
drop view v1;
|
||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
|
# Bug #6008 MySQL does not create warnings when
|
||||||
|
# creating database and using IF NOT EXISTS
|
||||||
|
#
|
||||||
|
create database mysqltest;
|
||||||
|
create database if not exists mysqltest character set latin2;
|
||||||
|
show create database mysqltest;
|
||||||
|
drop database mysqltest;
|
||||||
|
use test;
|
||||||
|
create table t1 (a int);
|
||||||
|
create table if not exists t1 (a int);
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
@ -211,6 +211,7 @@ select group_concat(c1 order by c1) from t1 group by c1 collate utf8_lithuanian_
|
|||||||
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovak_ci;
|
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_slovak_ci;
|
||||||
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish2_ci;
|
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_spanish2_ci;
|
||||||
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_roman_ci;
|
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_roman_ci;
|
||||||
|
select group_concat(c1 order by c1) from t1 group by c1 collate utf8_esperanto_ci;
|
||||||
|
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
@ -1249,6 +1249,16 @@ insert into t1 values (42);
|
|||||||
select * from t1;
|
select * from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #13025 Server crash during filesort
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (a int not null, b int not null, c blob not null, d int not null, e int, primary key (a,b,c(255),d)) engine=innodb;
|
||||||
|
insert into t1 values (2,2,"b",2,2),(1,1,"a",1,1),(3,3,"ab",3,3);
|
||||||
|
select * from t1 order by a,b,c,d;
|
||||||
|
explain select * from t1 order by a,b,c,d;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -57,3 +57,4 @@ connection slave;
|
|||||||
sync_with_master;
|
sync_with_master;
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
# Adding comment for force manual merge 5.0 -> wl1012. delete me if needed
|
||||||
|
@ -40,3 +40,4 @@ select * from t3;
|
|||||||
# in the .err files; these are not fatal and are not reported by mysql-test-run.
|
# in the .err files; these are not fatal and are not reported by mysql-test-run.
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
# Adding comment for force manual merge 5.0 -> wl1012. Delete me if needed.
|
||||||
|
@ -27,3 +27,4 @@ show binlog events from 98;
|
|||||||
drop database mysqltest;
|
drop database mysqltest;
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
# Adding comment for force manual merge 5.0 -> wl1012: Delete me
|
||||||
|
@ -110,3 +110,4 @@ show slave status;
|
|||||||
show binlog events in 'slave-bin.000005' from 4;
|
show binlog events in 'slave-bin.000005' from 4;
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
# Adding comment for force manual merge 5.0 -> wl1012: Delete me
|
||||||
|
@ -93,3 +93,4 @@ flush logs;
|
|||||||
show master status;
|
show master status;
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
#
|
||||||
|
@ -29,3 +29,4 @@ drop database mysqltest;
|
|||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
#
|
||||||
|
@ -48,3 +48,4 @@ sync_with_master;
|
|||||||
show status like 'slave_open_temp_tables';
|
show status like 'slave_open_temp_tables';
|
||||||
|
|
||||||
# End of 4.1 tests
|
# End of 4.1 tests
|
||||||
|
#
|
||||||
|
@ -2499,3 +2499,27 @@ insert into t2 values (1,10);
|
|||||||
# both queries should produce the same result
|
# both queries should produce the same result
|
||||||
select * from t1 inner join t2 using (A);
|
select * from t1 inner join t2 using (A);
|
||||||
select * from t1 inner join t2 using (a);
|
select * from t1 inner join t2 using (a);
|
||||||
|
drop table t1, t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #12943 Incorrect nesting of [INNER| CROSS] JOIN due to unspecified
|
||||||
|
# associativity in the parser.
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (a int, c int);
|
||||||
|
create table t2 (b int);
|
||||||
|
create table t3 (b int, a int);
|
||||||
|
create table t4 (c int);
|
||||||
|
insert into t1 values (1,1);
|
||||||
|
insert into t2 values (1);
|
||||||
|
insert into t3 values (1,1);
|
||||||
|
insert into t4 values (1);
|
||||||
|
|
||||||
|
select * from t1 join t2 join t3 on (t2.b = t3.b and t1.a = t3.a);
|
||||||
|
# Notice that ',' has lower priority than 'join', thus we have that:
|
||||||
|
# t1, t2 join t3 <==> t1, (t2 join t3).
|
||||||
|
-- error 1054
|
||||||
|
select * from t1, t2 join t3 on (t2.b = t3.b and t1.a = t3.a);
|
||||||
|
select * from t1 join t2 join t3 join t4 on (t1.a = t4.c and t2.b = t4.c);
|
||||||
|
select * from t1 join t2 join t4 using (c);
|
||||||
|
drop table t1, t2, t3, t4;
|
||||||
|
@ -42,6 +42,7 @@ extern CHARSET_INFO my_charset_ucs2_slovak_uca_ci;
|
|||||||
extern CHARSET_INFO my_charset_ucs2_spanish2_uca_ci;
|
extern CHARSET_INFO my_charset_ucs2_spanish2_uca_ci;
|
||||||
extern CHARSET_INFO my_charset_ucs2_roman_uca_ci;
|
extern CHARSET_INFO my_charset_ucs2_roman_uca_ci;
|
||||||
extern CHARSET_INFO my_charset_ucs2_persian_uca_ci;
|
extern CHARSET_INFO my_charset_ucs2_persian_uca_ci;
|
||||||
|
extern CHARSET_INFO my_charset_ucs2_esperanto_uca_ci;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_CHARSET_utf8
|
#ifdef HAVE_CHARSET_utf8
|
||||||
@ -62,6 +63,7 @@ extern CHARSET_INFO my_charset_utf8_slovak_uca_ci;
|
|||||||
extern CHARSET_INFO my_charset_utf8_spanish2_uca_ci;
|
extern CHARSET_INFO my_charset_utf8_spanish2_uca_ci;
|
||||||
extern CHARSET_INFO my_charset_utf8_roman_uca_ci;
|
extern CHARSET_INFO my_charset_utf8_roman_uca_ci;
|
||||||
extern CHARSET_INFO my_charset_utf8_persian_uca_ci;
|
extern CHARSET_INFO my_charset_utf8_persian_uca_ci;
|
||||||
|
extern CHARSET_INFO my_charset_utf8_esperanto_uca_ci;
|
||||||
#ifdef HAVE_UTF8_GENERAL_CS
|
#ifdef HAVE_UTF8_GENERAL_CS
|
||||||
extern CHARSET_INFO my_charset_utf8_general_cs;
|
extern CHARSET_INFO my_charset_utf8_general_cs;
|
||||||
#endif
|
#endif
|
||||||
@ -148,6 +150,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
|
|||||||
add_compiled_collation(&my_charset_ucs2_spanish2_uca_ci);
|
add_compiled_collation(&my_charset_ucs2_spanish2_uca_ci);
|
||||||
add_compiled_collation(&my_charset_ucs2_roman_uca_ci);
|
add_compiled_collation(&my_charset_ucs2_roman_uca_ci);
|
||||||
add_compiled_collation(&my_charset_ucs2_persian_uca_ci);
|
add_compiled_collation(&my_charset_ucs2_persian_uca_ci);
|
||||||
|
add_compiled_collation(&my_charset_ucs2_esperanto_uca_ci);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -180,6 +183,7 @@ my_bool init_compiled_charsets(myf flags __attribute__((unused)))
|
|||||||
add_compiled_collation(&my_charset_utf8_spanish2_uca_ci);
|
add_compiled_collation(&my_charset_utf8_spanish2_uca_ci);
|
||||||
add_compiled_collation(&my_charset_utf8_roman_uca_ci);
|
add_compiled_collation(&my_charset_utf8_roman_uca_ci);
|
||||||
add_compiled_collation(&my_charset_utf8_persian_uca_ci);
|
add_compiled_collation(&my_charset_utf8_persian_uca_ci);
|
||||||
|
add_compiled_collation(&my_charset_utf8_esperanto_uca_ci);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -599,7 +599,7 @@ net_safe_read(MYSQL *mysql)
|
|||||||
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d",
|
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d",
|
||||||
vio_description(net->vio),len));
|
vio_description(net->vio),len));
|
||||||
#ifdef MYSQL_SERVER
|
#ifdef MYSQL_SERVER
|
||||||
if (vio_errno(net->vio) == SOCKET_EINTR)
|
if (vio_was_interrupted(net->vio))
|
||||||
return (packet_error);
|
return (packet_error);
|
||||||
#endif /*MYSQL_SERVER*/
|
#endif /*MYSQL_SERVER*/
|
||||||
end_server(mysql);
|
end_server(mysql);
|
||||||
|
@ -544,7 +544,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
|
|||||||
error= my_errno;
|
error= my_errno;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if ((archive= gzdopen(create_file, "ab")) == NULL)
|
if ((archive= gzdopen(create_file, "wb")) == NULL)
|
||||||
{
|
{
|
||||||
error= errno;
|
error= errno;
|
||||||
goto error2;
|
goto error2;
|
||||||
|
@ -466,7 +466,7 @@ static ha_rows find_all_keys(SORTPARAM *param, SQL_SELECT *select,
|
|||||||
my_store_ptr(ref_pos,ref_length,record); // Position to row
|
my_store_ptr(ref_pos,ref_length,record); // Position to row
|
||||||
record+= sort_form->s->db_record_offset;
|
record+= sort_form->s->db_record_offset;
|
||||||
}
|
}
|
||||||
else
|
else if (!error)
|
||||||
file->position(sort_form->record[0]);
|
file->position(sort_form->record[0]);
|
||||||
}
|
}
|
||||||
if (error && error != HA_ERR_RECORD_DELETED)
|
if (error && error != HA_ERR_RECORD_DELETED)
|
||||||
|
@ -1017,8 +1017,7 @@ longlong Item_func_interval::val_int()
|
|||||||
1 got error
|
1 got error
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool
|
bool Item_func_between::fix_fields(THD *thd, Item **ref)
|
||||||
Item_func_between::fix_fields(THD *thd, Item **ref)
|
|
||||||
{
|
{
|
||||||
if (Item_func_opt_neg::fix_fields(thd, ref))
|
if (Item_func_opt_neg::fix_fields(thd, ref))
|
||||||
return 1;
|
return 1;
|
||||||
@ -1028,8 +1027,9 @@ Item_func_between::fix_fields(THD *thd, Item **ref)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* not_null_tables_cache == union(T1(e), intersection(T1(e1),T1(e2))) */
|
/* not_null_tables_cache == union(T1(e), intersection(T1(e1),T1(e2))) */
|
||||||
not_null_tables_cache= args[0]->not_null_tables() |
|
not_null_tables_cache= (args[0]->not_null_tables() |
|
||||||
(args[1]->not_null_tables() & args[2]->not_null_tables());
|
(args[1]->not_null_tables() &
|
||||||
|
args[2]->not_null_tables()));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1330,8 +1330,8 @@ Item_func_if::fix_fields(THD *thd, Item **ref)
|
|||||||
if (Item_func::fix_fields(thd, ref))
|
if (Item_func::fix_fields(thd, ref))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
not_null_tables_cache= (args[1]->not_null_tables()
|
not_null_tables_cache= (args[1]->not_null_tables() &
|
||||||
& args[2]->not_null_tables());
|
args[2]->not_null_tables());
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -763,7 +763,7 @@ my_real_read(NET *net, ulong *complen)
|
|||||||
net->error= 2; /* Close socket */
|
net->error= 2; /* Close socket */
|
||||||
net->report_error= 1;
|
net->report_error= 1;
|
||||||
#ifdef MYSQL_SERVER
|
#ifdef MYSQL_SERVER
|
||||||
net->last_errno= (interrupted ? ER_NET_READ_INTERRUPTED :
|
net->last_errno= (vio_was_interrupted(net->vio) ? ER_NET_READ_INTERRUPTED :
|
||||||
ER_NET_READ_ERROR);
|
ER_NET_READ_ERROR);
|
||||||
#endif
|
#endif
|
||||||
goto end;
|
goto end;
|
||||||
|
@ -437,7 +437,11 @@ bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
|
|||||||
error= -1;
|
error= -1;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
result= 0;
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||||
|
ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db);
|
||||||
|
error= 0;
|
||||||
|
send_ok(thd);
|
||||||
|
goto exit;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -6364,7 +6364,7 @@ void st_select_lex::set_lock_for_tables(thr_lock_type lock_type)
|
|||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
make_join_on_context()
|
make_join_on_context()
|
||||||
thd pointer to current thread
|
thd pointer to current thread
|
||||||
left_op lefto operand of the JOIN
|
left_op left operand of the JOIN
|
||||||
right_op rigth operand of the JOIN
|
right_op rigth operand of the JOIN
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
|
@ -13104,12 +13104,12 @@ static bool change_group_ref(THD *thd, Item_func *expr, ORDER *group_list,
|
|||||||
{
|
{
|
||||||
Name_resolution_context *context= &thd->lex->current_select->context;
|
Name_resolution_context *context= &thd->lex->current_select->context;
|
||||||
Item **arg,**arg_end;
|
Item **arg,**arg_end;
|
||||||
|
bool arg_changed= FALSE;
|
||||||
for (arg= expr->arguments(),
|
for (arg= expr->arguments(),
|
||||||
arg_end= expr->arguments()+expr->arg_count;
|
arg_end= expr->arguments()+expr->arg_count;
|
||||||
arg != arg_end; arg++)
|
arg != arg_end; arg++)
|
||||||
{
|
{
|
||||||
Item *item= *arg;
|
Item *item= *arg;
|
||||||
bool arg_changed= FALSE;
|
|
||||||
if (item->type() == Item::FIELD_ITEM || item->type() == Item::REF_ITEM)
|
if (item->type() == Item::FIELD_ITEM || item->type() == Item::REF_ITEM)
|
||||||
{
|
{
|
||||||
ORDER *group_tmp;
|
ORDER *group_tmp;
|
||||||
@ -13131,13 +13131,13 @@ static bool change_group_ref(THD *thd, Item_func *expr, ORDER *group_list,
|
|||||||
if (change_group_ref(thd, (Item_func *) item, group_list, &arg_changed))
|
if (change_group_ref(thd, (Item_func *) item, group_list, &arg_changed))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (arg_changed)
|
if (arg_changed)
|
||||||
{
|
{
|
||||||
expr->maybe_null= 1;
|
expr->maybe_null= 1;
|
||||||
*changed= TRUE;
|
*changed= TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1695,6 +1695,9 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
|||||||
if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
|
if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
|
||||||
{
|
{
|
||||||
create_info->table_existed= 1; // Mark that table existed
|
create_info->table_existed= 1; // Mark that table existed
|
||||||
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||||
|
ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
|
||||||
|
alias);
|
||||||
goto no_err;
|
goto no_err;
|
||||||
}
|
}
|
||||||
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias);
|
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias);
|
||||||
@ -1708,11 +1711,7 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
|||||||
if (!access(path,F_OK))
|
if (!access(path,F_OK))
|
||||||
{
|
{
|
||||||
if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
|
if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
|
||||||
{
|
goto warn;
|
||||||
create_info->table_existed= 1; // Mark that table existed
|
|
||||||
error= FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
|
my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
@ -1736,11 +1735,7 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
|||||||
DBUG_PRINT("info", ("Table with same name already existed in handler"));
|
DBUG_PRINT("info", ("Table with same name already existed in handler"));
|
||||||
|
|
||||||
if (create_if_not_exists)
|
if (create_if_not_exists)
|
||||||
{
|
goto warn;
|
||||||
create_info->table_existed= 1; // Mark that table existed
|
|
||||||
error= FALSE;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
|
my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
@ -1774,6 +1769,14 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
|||||||
mysql_bin_log.write(&qinfo);
|
mysql_bin_log.write(&qinfo);
|
||||||
}
|
}
|
||||||
error= FALSE;
|
error= FALSE;
|
||||||
|
goto end;
|
||||||
|
|
||||||
|
warn:
|
||||||
|
error= 0;
|
||||||
|
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
|
||||||
|
ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
|
||||||
|
alias);
|
||||||
|
create_info->table_existed= 1; // Mark that table existed
|
||||||
|
|
||||||
end:
|
end:
|
||||||
VOID(pthread_mutex_unlock(&LOCK_open));
|
VOID(pthread_mutex_unlock(&LOCK_open));
|
||||||
|
@ -670,6 +670,9 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
|||||||
%token YEAR_SYM
|
%token YEAR_SYM
|
||||||
%token ZEROFILL
|
%token ZEROFILL
|
||||||
|
|
||||||
|
%left JOIN_SYM
|
||||||
|
/* A dummy token to force the priority of table_ref production in a join. */
|
||||||
|
%left TABLE_REF_PRIORITY
|
||||||
%left SET_VAR
|
%left SET_VAR
|
||||||
%left OR_OR_SYM OR_SYM OR2_SYM XOR
|
%left OR_OR_SYM OR_SYM OR2_SYM XOR
|
||||||
%left AND_SYM AND_AND_SYM
|
%left AND_SYM AND_AND_SYM
|
||||||
@ -5776,7 +5779,13 @@ derived_table_list:
|
|||||||
;
|
;
|
||||||
|
|
||||||
join_table:
|
join_table:
|
||||||
table_ref normal_join table_ref { YYERROR_UNLESS($1 && ($$=$3)); }
|
/*
|
||||||
|
Evaluate production 'table_ref' before 'normal_join' so that
|
||||||
|
[INNER | CROSS] JOIN is properly nested as other left-associative
|
||||||
|
joins.
|
||||||
|
*/
|
||||||
|
table_ref %prec TABLE_REF_PRIORITY normal_join table_ref
|
||||||
|
{ YYERROR_UNLESS($1 && ($$=$3)); }
|
||||||
| table_ref STRAIGHT_JOIN table_factor
|
| table_ref STRAIGHT_JOIN table_factor
|
||||||
{ YYERROR_UNLESS($1 && ($$=$3)); $3->straight=1; }
|
{ YYERROR_UNLESS($1 && ($$=$3)); $3->straight=1; }
|
||||||
| table_ref normal_join table_ref
|
| table_ref normal_join table_ref
|
||||||
|
@ -2521,10 +2521,7 @@ MgmtSrvr::startBackup(Uint32& backupId, int waitCompleted)
|
|||||||
case GSN_NODE_FAILREP:{
|
case GSN_NODE_FAILREP:{
|
||||||
const NodeFailRep * const rep =
|
const NodeFailRep * const rep =
|
||||||
CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
|
CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
|
||||||
#ifdef VM_TRACE
|
if (NodeBitmask::get(rep->theNodes,nodeId) ||
|
||||||
ndbout_c("Node %d failed", rep->failNo);
|
|
||||||
#endif
|
|
||||||
if (rep->failNo == nodeId ||
|
|
||||||
waitCompleted == 1)
|
waitCompleted == 1)
|
||||||
return 1326;
|
return 1326;
|
||||||
// wait for next signal
|
// wait for next signal
|
||||||
|
@ -250,14 +250,22 @@ SignalSender::execNodeStatus(void* signalSender,
|
|||||||
// node shutdown complete
|
// node shutdown complete
|
||||||
s->header.theVerId_signalNumber = GSN_NF_COMPLETEREP;
|
s->header.theVerId_signalNumber = GSN_NF_COMPLETEREP;
|
||||||
NFCompleteRep *rep = (NFCompleteRep *)s->getDataPtrSend();
|
NFCompleteRep *rep = (NFCompleteRep *)s->getDataPtrSend();
|
||||||
|
rep->blockNo = 0;
|
||||||
|
rep->nodeId = 0;
|
||||||
rep->failedNodeId = nodeId;
|
rep->failedNodeId = nodeId;
|
||||||
|
rep->unused = 0;
|
||||||
|
rep->from = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// node failure
|
// node failure
|
||||||
s->header.theVerId_signalNumber = GSN_NODE_FAILREP;
|
s->header.theVerId_signalNumber = GSN_NODE_FAILREP;
|
||||||
NodeFailRep *rep = (NodeFailRep *)s->getDataPtrSend();
|
NodeFailRep *rep = (NodeFailRep *)s->getDataPtrSend();
|
||||||
rep->failNo = nodeId;
|
rep->failNo = 0;
|
||||||
|
rep->masterNodeId = 0;
|
||||||
|
rep->noOfNodes = 1;
|
||||||
|
NodeBitmask::clear(rep->theNodes);
|
||||||
|
NodeBitmask::set(rep->theNodes,nodeId);
|
||||||
}
|
}
|
||||||
|
|
||||||
ss->m_jobBuffer.push_back(s);
|
ss->m_jobBuffer.push_back(s);
|
||||||
|
@ -6692,6 +6692,18 @@ static const char persian[]=
|
|||||||
" < \\uFEF5 < \\uFEF6 < \\uFEF7 < \\uFEF8 < \\uFEF9 < \\uFEFA"
|
" < \\uFEF5 < \\uFEF6 < \\uFEF7 < \\uFEF8 < \\uFEF9 < \\uFEFA"
|
||||||
" < \\uFEFB < \\uFEFC";
|
" < \\uFEFB < \\uFEFC";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Esperanto tailoring.
|
||||||
|
Contributed by Bertilo Wennergren <bertilow at gmail dot com>
|
||||||
|
September 1, 2005
|
||||||
|
*/
|
||||||
|
static const char esperanto[]=
|
||||||
|
"& C < \\u0109 <<< \\u0108"
|
||||||
|
"& G < \\u011D <<< \\u011C"
|
||||||
|
"& H < \\u0125 <<< \\u0124"
|
||||||
|
"& J < \\u0135 <<< \\u0134"
|
||||||
|
"& S < \\u015d <<< \\u015c"
|
||||||
|
"& U < \\u016d <<< \\u016c";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Unicode Collation Algorithm:
|
Unicode Collation Algorithm:
|
||||||
@ -8564,6 +8576,38 @@ CHARSET_INFO my_charset_ucs2_persian_uca_ci=
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
CHARSET_INFO my_charset_ucs2_esperanto_uca_ci=
|
||||||
|
{
|
||||||
|
145,0,0, /* number */
|
||||||
|
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
|
||||||
|
"ucs2", /* cs name */
|
||||||
|
"ucs2_esperanto_ci",/* name */
|
||||||
|
"", /* comment */
|
||||||
|
esperanto, /* tailoring */
|
||||||
|
NULL, /* ctype */
|
||||||
|
NULL, /* to_lower */
|
||||||
|
NULL, /* to_upper */
|
||||||
|
NULL, /* sort_order */
|
||||||
|
NULL, /* contractions */
|
||||||
|
NULL, /* sort_order_big*/
|
||||||
|
NULL, /* tab_to_uni */
|
||||||
|
NULL, /* tab_from_uni */
|
||||||
|
my_unicase_default, /* caseinfo */
|
||||||
|
NULL, /* state_map */
|
||||||
|
NULL, /* ident_map */
|
||||||
|
8, /* strxfrm_multiply */
|
||||||
|
1, /* caseup_multiply */
|
||||||
|
1, /* casedn_multiply */
|
||||||
|
2, /* mbminlen */
|
||||||
|
2, /* mbmaxlen */
|
||||||
|
9, /* min_sort_char */
|
||||||
|
0xFFFF, /* max_sort_char */
|
||||||
|
0, /* escape_with_backslash_is_dangerous */
|
||||||
|
&my_charset_ucs2_handler,
|
||||||
|
&my_collation_ucs2_uca_handler
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -9140,6 +9184,37 @@ CHARSET_INFO my_charset_utf8_persian_uca_ci=
|
|||||||
&my_collation_any_uca_handler
|
&my_collation_any_uca_handler
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CHARSET_INFO my_charset_utf8_esperanto_uca_ci=
|
||||||
|
{
|
||||||
|
209,0,0, /* number */
|
||||||
|
MY_CS_COMPILED|MY_CS_STRNXFRM|MY_CS_UNICODE,
|
||||||
|
"utf8", /* cs name */
|
||||||
|
"utf8_esperanto_ci",/* name */
|
||||||
|
"", /* comment */
|
||||||
|
esperanto, /* tailoring */
|
||||||
|
ctype_utf8, /* ctype */
|
||||||
|
NULL, /* to_lower */
|
||||||
|
NULL, /* to_upper */
|
||||||
|
NULL, /* sort_order */
|
||||||
|
NULL, /* contractions */
|
||||||
|
NULL, /* sort_order_big*/
|
||||||
|
NULL, /* tab_to_uni */
|
||||||
|
NULL, /* tab_from_uni */
|
||||||
|
my_unicase_default, /* caseinfo */
|
||||||
|
NULL, /* state_map */
|
||||||
|
NULL, /* ident_map */
|
||||||
|
8, /* strxfrm_multiply */
|
||||||
|
1, /* caseup_multiply */
|
||||||
|
1, /* casedn_multiply */
|
||||||
|
1, /* mbminlen */
|
||||||
|
3, /* mbmaxlen */
|
||||||
|
9, /* min_sort_char */
|
||||||
|
0xFFFF, /* max_sort_char */
|
||||||
|
0, /* escape_with_backslash_is_dangerous */
|
||||||
|
&my_charset_utf8_handler,
|
||||||
|
&my_collation_any_uca_handler
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* HAVE_CHARSET_utf8 */
|
#endif /* HAVE_CHARSET_utf8 */
|
||||||
|
|
||||||
#endif /* HAVE_UCA_COLLATIONS */
|
#endif /* HAVE_UCA_COLLATIONS */
|
||||||
|
@ -54,6 +54,7 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
|
|||||||
vio->fastsend =vio_fastsend;
|
vio->fastsend =vio_fastsend;
|
||||||
vio->viokeepalive =vio_keepalive;
|
vio->viokeepalive =vio_keepalive;
|
||||||
vio->should_retry =vio_should_retry;
|
vio->should_retry =vio_should_retry;
|
||||||
|
vio->was_interrupted=vio_was_interrupted;
|
||||||
vio->vioclose =vio_close_pipe;
|
vio->vioclose =vio_close_pipe;
|
||||||
vio->peer_addr =vio_peer_addr;
|
vio->peer_addr =vio_peer_addr;
|
||||||
vio->in_addr =vio_in_addr;
|
vio->in_addr =vio_in_addr;
|
||||||
@ -73,6 +74,7 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
|
|||||||
vio->fastsend =vio_fastsend;
|
vio->fastsend =vio_fastsend;
|
||||||
vio->viokeepalive =vio_keepalive;
|
vio->viokeepalive =vio_keepalive;
|
||||||
vio->should_retry =vio_should_retry;
|
vio->should_retry =vio_should_retry;
|
||||||
|
vio->was_interrupted=vio_was_interrupted;
|
||||||
vio->vioclose =vio_close_shared_memory;
|
vio->vioclose =vio_close_shared_memory;
|
||||||
vio->peer_addr =vio_peer_addr;
|
vio->peer_addr =vio_peer_addr;
|
||||||
vio->in_addr =vio_in_addr;
|
vio->in_addr =vio_in_addr;
|
||||||
@ -92,6 +94,7 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
|
|||||||
vio->fastsend =vio_ssl_fastsend;
|
vio->fastsend =vio_ssl_fastsend;
|
||||||
vio->viokeepalive =vio_ssl_keepalive;
|
vio->viokeepalive =vio_ssl_keepalive;
|
||||||
vio->should_retry =vio_ssl_should_retry;
|
vio->should_retry =vio_ssl_should_retry;
|
||||||
|
vio->was_interrupted=vio_ssl_was_interrupted;
|
||||||
vio->vioclose =vio_ssl_close;
|
vio->vioclose =vio_ssl_close;
|
||||||
vio->peer_addr =vio_ssl_peer_addr;
|
vio->peer_addr =vio_ssl_peer_addr;
|
||||||
vio->in_addr =vio_ssl_in_addr;
|
vio->in_addr =vio_ssl_in_addr;
|
||||||
@ -109,6 +112,7 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
|
|||||||
vio->fastsend =vio_fastsend;
|
vio->fastsend =vio_fastsend;
|
||||||
vio->viokeepalive =vio_keepalive;
|
vio->viokeepalive =vio_keepalive;
|
||||||
vio->should_retry =vio_should_retry;
|
vio->should_retry =vio_should_retry;
|
||||||
|
vio->was_interrupted=vio_was_interrupted;
|
||||||
vio->vioclose =vio_close;
|
vio->vioclose =vio_close;
|
||||||
vio->peer_addr =vio_peer_addr;
|
vio->peer_addr =vio_peer_addr;
|
||||||
vio->in_addr =vio_in_addr;
|
vio->in_addr =vio_in_addr;
|
||||||
|
@ -39,6 +39,8 @@ int vio_ssl_fastsend(Vio *vio);
|
|||||||
int vio_ssl_keepalive(Vio *vio, my_bool onoff);
|
int vio_ssl_keepalive(Vio *vio, my_bool onoff);
|
||||||
/* Whenever we should retry the last read/write operation. */
|
/* Whenever we should retry the last read/write operation. */
|
||||||
my_bool vio_ssl_should_retry(Vio *vio);
|
my_bool vio_ssl_should_retry(Vio *vio);
|
||||||
|
/* Check that operation was timed out */
|
||||||
|
my_bool vio_ssl_was_interrupted(Vio *vio);
|
||||||
/* When the workday is over... */
|
/* When the workday is over... */
|
||||||
int vio_ssl_close(Vio *vio);
|
int vio_ssl_close(Vio *vio);
|
||||||
/* Return last error number */
|
/* Return last error number */
|
||||||
|
@ -242,6 +242,15 @@ vio_should_retry(Vio * vio __attribute__((unused)))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
my_bool
|
||||||
|
vio_was_interrupted(Vio *vio __attribute__((unused)))
|
||||||
|
{
|
||||||
|
int en= socket_errno;
|
||||||
|
return (en == SOCKET_EAGAIN || en == SOCKET_EINTR ||
|
||||||
|
en == SOCKET_EWOULDBLOCK || en == SOCKET_ETIMEDOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int vio_close(Vio * vio)
|
int vio_close(Vio * vio)
|
||||||
{
|
{
|
||||||
int r=0;
|
int r=0;
|
||||||
|
@ -184,6 +184,15 @@ vio_ssl_should_retry(Vio * vio __attribute__((unused)))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
my_bool
|
||||||
|
vio_ssl_was_interrupted(Vio *vio __attribute__((unused)))
|
||||||
|
{
|
||||||
|
int en= socket_errno;
|
||||||
|
return (en == SOCKET_EAGAIN || en == SOCKET_EINTR ||
|
||||||
|
en == SOCKET_EWOULDBLOCK || en == SOCKET_ETIMEDOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int vio_ssl_close(Vio * vio)
|
int vio_ssl_close(Vio * vio)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user