Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1
into eel.(none):/home/jonas/src/mysql-5.1-push
This commit is contained in:
commit
183aab9d22
65
README
65
README
@ -1,52 +1,35 @@
|
||||
This is a release of MySQL, a GPL (free) SQL database server (more
|
||||
licence information in the PUBLIC file and in the reference manual).
|
||||
This is a release of MySQL, a dual-license SQL database server.
|
||||
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
|
||||
migrating from older versions of MySQL!
|
||||
License information can be found in these files:
|
||||
- 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
|
||||
manual.
|
||||
For further information about MySQL or additional documentation, see:
|
||||
- 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
|
||||
manual.
|
||||
Some manual sections of special interest:
|
||||
|
||||
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.
|
||||
|
||||
For the currently known bugs/misfeatures (known errors) see the bugs
|
||||
appendix in the manual.
|
||||
|
||||
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.
|
||||
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
|
||||
download it in any of several formats at the URL given earlier in this
|
||||
file.
|
||||
|
||||
************************************************************
|
||||
|
||||
IMPORTANT:
|
||||
|
||||
Send bug (error) reports, questions and comments to the mailing list
|
||||
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'.
|
||||
Bug or error reports should be sent to http://bugs.mysql.com.
|
||||
|
@ -2382,7 +2382,8 @@ int read_line(char *buf, int size)
|
||||
if (feof(cur_file->file))
|
||||
{
|
||||
found_eof:
|
||||
if (cur_file->file != stdin){
|
||||
if (cur_file->file != stdin)
|
||||
{
|
||||
my_fclose(cur_file->file, MYF(0));
|
||||
cur_file->file= 0;
|
||||
}
|
||||
|
@ -343,7 +343,7 @@ case $default_charset in
|
||||
default_charset_default_collation="ucs2_general_ci"
|
||||
define(UCSC1, ucs2_general_ci ucs2_bin)
|
||||
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(UCSC5, ucs2_persian_ci ucs2_polish_ci ucs2_romanian_ci)
|
||||
define(UCSC6, ucs2_slovak_ci ucs2_slovenian_ci)
|
||||
@ -367,7 +367,7 @@ case $default_charset in
|
||||
else
|
||||
define(UTFC1, utf8_general_ci utf8_bin)
|
||||
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(UTFC5, utf8_persian_ci utf8_polish_ci utf8_romanian_ci)
|
||||
define(UTFC6, utf8_slovak_ci utf8_slovenian_ci)
|
||||
|
102
configure.in
102
configure.in
@ -323,19 +323,19 @@ case "$target_os" in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sysv5UnixWare*)
|
||||
sysv5UnixWare* | sysv5OpenUNIX8*)
|
||||
if test "$GCC" != "yes"; then
|
||||
# We are using built-in inline function
|
||||
# Use the built-in alloca()
|
||||
CFLAGS="$CFLAGS -Kalloca"
|
||||
fi
|
||||
CXXFLAGS="$CXXFLAGS -DNO_CPLUSPLUS_ALLOCA"
|
||||
;;
|
||||
sysv5OpenUNIX8*)
|
||||
sysv5SCO_SV6.0.0*)
|
||||
if test "$GCC" != "yes"; then
|
||||
# We are using built-in inline function
|
||||
# Use the built-in alloca()
|
||||
CFLAGS="$CFLAGS -Kalloca"
|
||||
CXXFLAGS="$CFLAGS -Kalloca"
|
||||
fi
|
||||
CXXFLAGS="$CXXFLAGS -DNO_CPLUSPLUS_ALLOCA"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(CC)
|
||||
@ -1048,6 +1048,15 @@ case $SYSTEM_TYPE in
|
||||
MAX_C_OPTIMIZE="-O"
|
||||
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*)
|
||||
AC_MSG_WARN([Adding fix for interrupted reads])
|
||||
OSVERSION=`sysctl -a | grep osreldate | awk '{ print $2 }'`
|
||||
@ -1360,8 +1369,6 @@ then
|
||||
if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null
|
||||
then
|
||||
AC_DEFINE(HAVE_UNIXWARE7_THREADS, [1])
|
||||
else
|
||||
AC_DEFINE(HAVE_UNIXWARE7_POSIX, [1])
|
||||
fi
|
||||
AC_MSG_RESULT("yes")
|
||||
# We must have cc
|
||||
@ -1387,87 +1394,40 @@ then
|
||||
AC_MSG_RESULT("no")
|
||||
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"
|
||||
then
|
||||
AC_MSG_CHECKING("OpenUNIX8 native threads")
|
||||
if expr "$SYSTEM_TYPE" : ".*OpenUNIX*" > /dev/null
|
||||
AC_MSG_CHECKING([SCO OpenServer 6, UnixWare 7 or OpenUNIX 8 native threads])
|
||||
if expr "$SYSTEM_TYPE" : ".*UnixWare.*" > /dev/null || \
|
||||
expr "$SYSTEM_TYPE" : ".*SCO_SV6.*" > /dev/null || \
|
||||
expr "$SYSTEM_TYPE" : ".*OpenUNIX.*" > /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.*"
|
||||
if expr "$CC" : ".*gcc.*" > /dev/null
|
||||
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
|
||||
with_named_thread="-Kthread -lsocket -lnsl"
|
||||
CC="$CC -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
|
||||
CXX="$CXX -Kthread -DUNIXWARE_7 -DHAVE_BROKEN_RWLOCK";
|
||||
fi
|
||||
if expr "$SYSTEM_TYPE" : ".*unixware7.0.0" > /dev/null
|
||||
then
|
||||
AC_DEFINE([HAVE_UNIXWARE7_THREADS], [1],
|
||||
[UNIXWARE7 threads are not posix])
|
||||
else
|
||||
AC_DEFINE([HAVE_UNIXWARE7_POSIX], [1],
|
||||
[new UNIXWARE7 threads that are not yet posix])
|
||||
AC_DEFINE(HAVE_UNIXWARE7_THREADS, [1], [Have UnixWare 7 (or similar) almost-POSIX threading library])
|
||||
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")
|
||||
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.])
|
||||
AC_MSG_ERROR([configure: error: Can't find thread library on SCO/Caldera system. See the Installation chapter in the Reference Manual.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT("no")
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -2510,7 +2470,7 @@ then
|
||||
AC_CONFIG_FILES(storage/bdb/Makefile)
|
||||
|
||||
echo "CONFIGURING FOR BERKELEY DB"
|
||||
bdb_conf_flags="--disable-shared"
|
||||
bdb_conf_flags="--disable-shared --build=$build_alias"
|
||||
if test $with_debug = "yes"
|
||||
then
|
||||
bdb_conf_flags="$bdb_conf_flags --enable-debug --enable-diagnostic"
|
||||
|
@ -38,7 +38,7 @@ $(top_builddir)/include/mysqld_ername.h: $(top_builddir)/include/mysqld_error.h
|
||||
$(top_builddir)/include/sql_state.h: $(top_builddir)/include/mysqld_error.h
|
||||
|
||||
bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \
|
||||
resolve_stack_dump mysql_waitpid # innochecksum
|
||||
resolve_stack_dump mysql_waitpid innochecksum
|
||||
noinst_PROGRAMS = charset2html
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
|
@ -24,7 +24,7 @@
|
||||
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 _LARGEFILE64_SOURCE
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
#include <sys/stat.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_MASK2 1653893711
|
||||
#define FIL_PAGE_LSN 16
|
||||
@ -46,18 +46,19 @@
|
||||
#define FIL_PAGE_SPACE_OR_CHKSUM 0
|
||||
#define UNIV_PAGE_SIZE (2 * 8192)
|
||||
|
||||
// command line argument to do page checks (that's it)
|
||||
// another argument to specify page ranges... seek to right spot and go from there
|
||||
/* command line argument to do page checks (that's it) */
|
||||
/* another argument to specify page ranges... seek to right spot and go from there */
|
||||
|
||||
typedef unsigned long int ulint;
|
||||
typedef unsigned char byte;
|
||||
|
||||
/* 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) {
|
||||
return( ((ulint)(b[0]) << 24)
|
||||
+ ((ulint)(b[1]) << 16)
|
||||
+ ((ulint)(b[2]) << 8)
|
||||
+ (ulint)(b[3])
|
||||
ulint mach_read_from_4(byte *b)
|
||||
{
|
||||
return( ((ulint)(b[0]) << 24)
|
||||
+ ((ulint)(b[1]) << 16)
|
||||
+ ((ulint)(b[2]) << 8)
|
||||
+ (ulint)(b[3])
|
||||
);
|
||||
}
|
||||
|
||||
@ -80,12 +81,13 @@ ut_fold_binary(
|
||||
ulint len) /* in: length */
|
||||
{
|
||||
ulint i;
|
||||
ulint fold = 0;
|
||||
ulint fold= 0;
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
fold = ut_fold_ulint_pair(fold, (ulint)(*str));
|
||||
for (i= 0; i < len; i++)
|
||||
{
|
||||
fold= ut_fold_ulint_pair(fold, (ulint)(*str));
|
||||
|
||||
str++;
|
||||
str++;
|
||||
}
|
||||
|
||||
return(fold);
|
||||
@ -106,12 +108,12 @@ buf_calc_page_new_checksum(
|
||||
checksum is stored, and also the last 8 bytes of page because
|
||||
there we store the old formula checksum. */
|
||||
|
||||
checksum = ut_fold_binary(page + FIL_PAGE_OFFSET,
|
||||
FIL_PAGE_FILE_FLUSH_LSN - FIL_PAGE_OFFSET)
|
||||
+ ut_fold_binary(page + FIL_PAGE_DATA,
|
||||
UNIV_PAGE_SIZE - FIL_PAGE_DATA
|
||||
- FIL_PAGE_END_LSN_OLD_CHKSUM);
|
||||
checksum = checksum & 0xFFFFFFFF;
|
||||
checksum= ut_fold_binary(page + FIL_PAGE_OFFSET,
|
||||
FIL_PAGE_FILE_FLUSH_LSN - FIL_PAGE_OFFSET)
|
||||
+ ut_fold_binary(page + FIL_PAGE_DATA,
|
||||
UNIV_PAGE_SIZE - FIL_PAGE_DATA
|
||||
- FIL_PAGE_END_LSN_OLD_CHKSUM);
|
||||
checksum= checksum & 0xFFFFFFFF;
|
||||
|
||||
return(checksum);
|
||||
}
|
||||
@ -124,179 +126,203 @@ buf_calc_page_old_checksum(
|
||||
{
|
||||
ulint checksum;
|
||||
|
||||
checksum = ut_fold_binary(page, FIL_PAGE_FILE_FLUSH_LSN);
|
||||
checksum= ut_fold_binary(page, FIL_PAGE_FILE_FLUSH_LSN);
|
||||
|
||||
checksum = checksum & 0xFFFFFFFF;
|
||||
checksum= checksum & 0xFFFFFFFF;
|
||||
|
||||
return(checksum);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
FILE *f; // our input file
|
||||
byte *p; // storage of pages read
|
||||
int bytes; // bytes read count
|
||||
ulint ct; // current page number (0 based)
|
||||
int now; // current time
|
||||
int lastt; // last time
|
||||
ulint oldcsum, oldcsumfield, csum, csumfield, logseq, logseqfield; // ulints for checksum storage
|
||||
struct stat64 st; // for stat, if you couldn't guess
|
||||
unsigned long long int size; // size of file (has to be 64 bits)
|
||||
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
|
||||
int just_count = 0; // if true, just print page count
|
||||
int verbose = 0;
|
||||
int debug = 0;
|
||||
int c;
|
||||
int fd;
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
FILE *f; /* our input file */
|
||||
byte *p; /* storage of pages read */
|
||||
int bytes; /* bytes read count */
|
||||
ulint ct; /* current page number (0 based) */
|
||||
int now; /* current time */
|
||||
int lastt; /* last time */
|
||||
ulint oldcsum, oldcsumfield, csum, csumfield, logseq, logseqfield; /* ulints for checksum storage */
|
||||
struct stat st; /* for stat, if you couldn't guess */
|
||||
unsigned long long int size; /* size of file (has to be 64 bits) */
|
||||
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;
|
||||
int just_count= 0; /* if true, just print page count */
|
||||
int verbose= 0;
|
||||
int debug= 0;
|
||||
int c;
|
||||
int fd;
|
||||
|
||||
// remove arguments
|
||||
while ((c = getopt(argc, argv, "cvds:e:p:")) != -1) {
|
||||
switch (c) {
|
||||
case 'v':
|
||||
verbose = 1;
|
||||
break;
|
||||
case 'c':
|
||||
just_count = 1;
|
||||
break;
|
||||
case 's':
|
||||
start_page = atoi(optarg);
|
||||
break;
|
||||
case 'e':
|
||||
end_page = atoi(optarg);
|
||||
use_end_page = 1;
|
||||
break;
|
||||
case 'p':
|
||||
start_page = atoi(optarg);
|
||||
end_page = atoi(optarg);
|
||||
use_end_page = 1;
|
||||
break;
|
||||
case 'd':
|
||||
debug = 1;
|
||||
break;
|
||||
case ':':
|
||||
fprintf(stderr, "option -%c requires an argument\n", optopt);
|
||||
return 1;
|
||||
break;
|
||||
case '?':
|
||||
fprintf(stderr, "unrecognized option: -%c\n", optopt);
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
/* remove arguments */
|
||||
while ((c= getopt(argc, argv, "cvds:e:p:")) != -1)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case 'v':
|
||||
verbose= 1;
|
||||
break;
|
||||
case 'c':
|
||||
just_count= 1;
|
||||
break;
|
||||
case 's':
|
||||
start_page= atoi(optarg);
|
||||
break;
|
||||
case 'e':
|
||||
end_page= atoi(optarg);
|
||||
use_end_page= 1;
|
||||
break;
|
||||
case 'p':
|
||||
start_page= atoi(optarg);
|
||||
end_page= atoi(optarg);
|
||||
use_end_page= 1;
|
||||
break;
|
||||
case 'd':
|
||||
debug= 1;
|
||||
break;
|
||||
case ':':
|
||||
fprintf(stderr, "option -%c requires an argument\n", optopt);
|
||||
return 1;
|
||||
break;
|
||||
case '?':
|
||||
fprintf(stderr, "unrecognized option: -%c\n", optopt);
|
||||
return 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// debug implies verbose...
|
||||
if (debug) verbose = 1;
|
||||
/* debug implies verbose... */
|
||||
if (debug) verbose= 1;
|
||||
|
||||
// make sure we have the right arguments
|
||||
if (optind >= argc) {
|
||||
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("\t-c\tprint the count of pages in the file\n");
|
||||
printf("\t-s n\tstart on this page number (0 based)\n");
|
||||
printf("\t-e n\tend at this page number (0 based)\n");
|
||||
printf("\t-p n\tcheck only this page (0 based)\n");
|
||||
printf("\t-v\tverbose (prints progress every 5 seconds)\n");
|
||||
printf("\t-d\tdebug mode (prints checksums for each page)\n");
|
||||
return 1;
|
||||
}
|
||||
/* make sure we have the right arguments */
|
||||
if (optind >= argc)
|
||||
{
|
||||
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("\t-c\tprint the count of pages in the file\n");
|
||||
printf("\t-s n\tstart on this page number (0 based)\n");
|
||||
printf("\t-e n\tend at this page number (0 based)\n");
|
||||
printf("\t-p n\tcheck only this page (0 based)\n");
|
||||
printf("\t-v\tverbose (prints progress every 5 seconds)\n");
|
||||
printf("\t-d\tdebug mode (prints checksums for each page)\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// stat the file to get size and page count
|
||||
if (stat64(argv[optind], &st)) {
|
||||
perror("error statting file");
|
||||
return 1;
|
||||
}
|
||||
size = st.st_size;
|
||||
pages = size / UNIV_PAGE_SIZE;
|
||||
if (just_count) {
|
||||
printf("%lu\n", pages);
|
||||
return 0;
|
||||
} else if (verbose) {
|
||||
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));
|
||||
}
|
||||
|
||||
// open the file for reading
|
||||
f = fopen64(argv[optind], "r");
|
||||
if (!f) {
|
||||
perror("error opening file");
|
||||
return 1;
|
||||
}
|
||||
|
||||
// seek to the necessary position
|
||||
if (start_page) {
|
||||
fd = fileno(f);
|
||||
if (!fd) {
|
||||
perror("unable to obtain file descriptor number");
|
||||
return 1;
|
||||
}
|
||||
if (lseek64(fd, start_page * UNIV_PAGE_SIZE, SEEK_SET) != (start_page * UNIV_PAGE_SIZE)) {
|
||||
perror("unable to seek to necessary offset");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
// allocate buffer for reading (so we don't realloc every time)
|
||||
p = (byte *)malloc(UNIV_PAGE_SIZE);
|
||||
|
||||
// main checksumming loop
|
||||
ct = start_page;
|
||||
lastt = 0;
|
||||
while (!feof(f)) {
|
||||
bytes = fread(p, 1, UNIV_PAGE_SIZE, f);
|
||||
if (!bytes && feof(f)) return 0;
|
||||
if (bytes != UNIV_PAGE_SIZE) {
|
||||
fprintf(stderr, "bytes read (%d) doesn't match universal page size (%d)\n", bytes, UNIV_PAGE_SIZE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// check the "stored log sequence numbers"
|
||||
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);
|
||||
if (debug)
|
||||
printf("page %lu: log sequence number: first = %lu; second = %lu\n", ct, logseq, logseqfield);
|
||||
if (logseq != logseqfield) {
|
||||
fprintf(stderr, "page %lu invalid (fails log sequence number check)\n", ct);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// check old method of checksumming
|
||||
oldcsum = buf_calc_page_old_checksum(p);
|
||||
oldcsumfield = mach_read_from_4(p + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM);
|
||||
if (debug)
|
||||
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) {
|
||||
fprintf(stderr, "page %lu invalid (fails old style checksum)\n", ct);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// now check the new method
|
||||
csum = buf_calc_page_new_checksum(p);
|
||||
csumfield = mach_read_from_4(p + FIL_PAGE_SPACE_OR_CHKSUM);
|
||||
if (debug)
|
||||
printf("page %lu: new style: calculated = %lu; recorded = %lu\n", ct, csum, csumfield);
|
||||
if (csumfield != 0 && csum != csumfield) {
|
||||
fprintf(stderr, "page %lu invalid (fails new style checksum)\n", ct);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// end if this was the last page we were supposed to check
|
||||
if (use_end_page && (ct >= end_page))
|
||||
return 0;
|
||||
|
||||
// do counter increase and progress printing
|
||||
ct++;
|
||||
if (verbose) {
|
||||
if (ct % 64 == 0) {
|
||||
now = time(0);
|
||||
if (!lastt) lastt = now;
|
||||
if (now - lastt >= 1) {
|
||||
printf("page %lu okay: %.3f%% done\n", (ct - 1), (float) ct / pages * 100);
|
||||
lastt = now;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/* stat the file to get size and page count */
|
||||
if (stat(argv[optind], &st))
|
||||
{
|
||||
perror("error statting file");
|
||||
return 1;
|
||||
}
|
||||
size= st.st_size;
|
||||
pages= size / UNIV_PAGE_SIZE;
|
||||
if (just_count)
|
||||
{
|
||||
printf("%lu\n", pages);
|
||||
return 0;
|
||||
}
|
||||
else if (verbose)
|
||||
{
|
||||
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));
|
||||
}
|
||||
|
||||
/* open the file for reading */
|
||||
f= fopen(argv[optind], "r");
|
||||
if (!f)
|
||||
{
|
||||
perror("error opening file");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* seek to the necessary position */
|
||||
if (start_page)
|
||||
{
|
||||
fd= fileno(f);
|
||||
if (!fd)
|
||||
{
|
||||
perror("unable to obtain file descriptor number");
|
||||
return 1;
|
||||
}
|
||||
|
||||
offset= (off_t)start_page * (off_t)UNIV_PAGE_SIZE;
|
||||
|
||||
if (lseek(fd, offset, SEEK_SET) != offset)
|
||||
{
|
||||
perror("unable to seek to necessary offset");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* allocate buffer for reading (so we don't realloc every time) */
|
||||
p= (byte *)malloc(UNIV_PAGE_SIZE);
|
||||
|
||||
/* main checksumming loop */
|
||||
ct= start_page;
|
||||
lastt= 0;
|
||||
while (!feof(f))
|
||||
{
|
||||
bytes= fread(p, 1, UNIV_PAGE_SIZE, f);
|
||||
if (!bytes && feof(f)) return 0;
|
||||
if (bytes != UNIV_PAGE_SIZE)
|
||||
{
|
||||
fprintf(stderr, "bytes read (%d) doesn't match universal page size (%d)\n", bytes, UNIV_PAGE_SIZE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* check the "stored log sequence numbers" */
|
||||
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);
|
||||
if (debug)
|
||||
printf("page %lu: log sequence number: first = %lu; second = %lu\n", ct, logseq, logseqfield);
|
||||
if (logseq != logseqfield)
|
||||
{
|
||||
fprintf(stderr, "page %lu invalid (fails log sequence number check)\n", ct);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* check old method of checksumming */
|
||||
oldcsum= buf_calc_page_old_checksum(p);
|
||||
oldcsumfield= mach_read_from_4(p + UNIV_PAGE_SIZE - FIL_PAGE_END_LSN_OLD_CHKSUM);
|
||||
if (debug)
|
||||
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)
|
||||
{
|
||||
fprintf(stderr, "page %lu invalid (fails old style checksum)\n", ct);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* now check the new method */
|
||||
csum= buf_calc_page_new_checksum(p);
|
||||
csumfield= mach_read_from_4(p + FIL_PAGE_SPACE_OR_CHKSUM);
|
||||
if (debug)
|
||||
printf("page %lu: new style: calculated = %lu; recorded = %lu\n", ct, csum, csumfield);
|
||||
if (csumfield != 0 && csum != csumfield)
|
||||
{
|
||||
fprintf(stderr, "page %lu invalid (fails new style checksum)\n", ct);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* end if this was the last page we were supposed to check */
|
||||
if (use_end_page && (ct >= end_page))
|
||||
return 0;
|
||||
|
||||
/* do counter increase and progress printing */
|
||||
ct++;
|
||||
if (verbose)
|
||||
{
|
||||
if (ct % 64 == 0)
|
||||
{
|
||||
now= time(0);
|
||||
if (!lastt) lastt= now;
|
||||
if (now - lastt >= 1)
|
||||
{
|
||||
printf("page %lu okay: %.3f%% done\n", (ct - 1), (float) ct / pages * 100);
|
||||
lastt= now;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -922,6 +922,7 @@ typedef off_t os_off_t;
|
||||
#define socket_errno WSAGetLastError()
|
||||
#define SOCKET_EINTR WSAEINTR
|
||||
#define SOCKET_EAGAIN WSAEINPROGRESS
|
||||
#define SOCKET_ETIMEDOUT WSAETIMEDOUT
|
||||
#define SOCKET_EWOULDBLOCK WSAEWOULDBLOCK
|
||||
#define SOCKET_ENFILE ENFILE
|
||||
#define SOCKET_EMFILE EMFILE
|
||||
@ -929,6 +930,7 @@ typedef off_t os_off_t;
|
||||
#define socket_errno sock_errno()
|
||||
#define SOCKET_EINTR SOCEINTR
|
||||
#define SOCKET_EAGAIN SOCEINPROGRESS
|
||||
#define SOCKET_ETIMEDOUT SOCKET_EINTR
|
||||
#define SOCKET_EWOULDBLOCK SOCEWOULDBLOCK
|
||||
#define SOCKET_ENFILE SOCENFILE
|
||||
#define SOCKET_EMFILE SOCEMFILE
|
||||
@ -938,6 +940,7 @@ typedef off_t os_off_t;
|
||||
#define closesocket(A) close(A)
|
||||
#define SOCKET_EINTR EINTR
|
||||
#define SOCKET_EAGAIN EAGAIN
|
||||
#define SOCKET_ETIMEDOUT SOCKET_EINTR
|
||||
#define SOCKET_EWOULDBLOCK EWOULDBLOCK
|
||||
#define SOCKET_ENFILE ENFILE
|
||||
#define SOCKET_EMFILE EMFILE
|
||||
|
@ -298,11 +298,6 @@ extern int my_pthread_create_detached;
|
||||
int sigwait(sigset_t *set, int *sig);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_UNIXWARE7_POSIX)
|
||||
#undef HAVE_NONPOSIX_SIGWAIT
|
||||
#define HAVE_NONPOSIX_SIGWAIT /* sigwait takes only 1 argument */
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_NONPOSIX_SIGWAIT
|
||||
#define my_sigwait(A,B) sigwait((A),(B))
|
||||
#else
|
||||
|
@ -74,6 +74,8 @@ int vio_fastsend(Vio *vio);
|
||||
int vio_keepalive(Vio *vio, my_bool onoff);
|
||||
/* Whenever we should retry the last read/write operation. */
|
||||
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.. */
|
||||
const char* vio_description(Vio *vio);
|
||||
/* 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_keepalive(vio, set_keep_alive) (vio)->viokeepalive(vio, set_keep_alive)
|
||||
#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_peer_addr(vio, buf, prt) (vio)->peer_addr(vio, buf, prt)
|
||||
#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*);
|
||||
void (*in_addr)(Vio*, struct in_addr*);
|
||||
my_bool (*should_retry)(Vio*);
|
||||
my_bool (*was_interrupted)(Vio*);
|
||||
int (*vioclose)(Vio*);
|
||||
void (*timeout)(Vio*, unsigned int which, unsigned int timeout);
|
||||
void *ssl_arg;
|
||||
|
@ -179,6 +179,7 @@ our $exe_mysql_fix_system_tables;
|
||||
our $exe_mysqltest;
|
||||
our $exe_slave_mysqld;
|
||||
our $exe_im;
|
||||
our $exe_my_print_defaults;
|
||||
|
||||
our $opt_bench= 0;
|
||||
our $opt_small_bench= 0;
|
||||
@ -872,6 +873,8 @@ sub executable_setup () {
|
||||
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
|
||||
$exe_mysql_fix_system_tables=
|
||||
mtr_script_exists("$glob_basedir/scripts/mysql_fix_privilege_tables");
|
||||
$exe_my_print_defaults=
|
||||
mtr_script_exists("$glob_basedir/extra/my_print_defaults");
|
||||
$path_ndb_tools_dir= mtr_path_exists("$glob_basedir/storage/ndb/tools");
|
||||
$exe_ndb_mgm= "$glob_basedir/storage/ndb/src/mgmclient/ndb_mgm";
|
||||
}
|
||||
@ -887,6 +890,8 @@ sub executable_setup () {
|
||||
$exe_mysql_fix_system_tables=
|
||||
mtr_script_exists("$path_client_bindir/mysql_fix_privilege_tables",
|
||||
"$glob_basedir/scripts/mysql_fix_privilege_tables");
|
||||
$exe_my_print_defaults=
|
||||
mtr_script_exists("$path_client_bindir/my_print_defaults");
|
||||
|
||||
$path_language= mtr_path_exists("$glob_basedir/share/mysql/english/",
|
||||
"$glob_basedir/share/english/");
|
||||
@ -2384,6 +2389,7 @@ sub run_mysqltest ($) {
|
||||
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
|
||||
$ENV{'MYSQL_CLIENT_TEST'}= $cmdline_mysql_client_test;
|
||||
$ENV{'CHARSETSDIR'}= $path_charsetsdir;
|
||||
$ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults;
|
||||
|
||||
$ENV{'NDB_STATUS_OK'}= $flag_ndb_status_ok;
|
||||
$ENV{'NDB_MGM'}= $exe_ndb_mgm;
|
||||
|
@ -575,6 +575,7 @@ if [ x$SOURCE_DIST = x1 ] ; then
|
||||
CLIENT_BINDIR="$BASEDIR/client"
|
||||
MYSQLADMIN="$CLIENT_BINDIR/mysqladmin"
|
||||
WAIT_PID="$BASEDIR/extra/mysql_waitpid"
|
||||
MYSQL_MY_PRINT_DEFAULTS="$BASEDIR/extra/my_print_defaults"
|
||||
MYSQL_MANAGER_CLIENT="$CLIENT_BINDIR/mysqltestmanagerc"
|
||||
MYSQL_MANAGER="$BASEDIR/tools/mysqltestmanager"
|
||||
MYSQL_MANAGER_PWGEN="$CLIENT_BINDIR/mysqltestmanager-pwgen"
|
||||
@ -635,6 +636,7 @@ else
|
||||
MYSQL_BINLOG="$CLIENT_BINDIR/mysqlbinlog"
|
||||
MYSQLADMIN="$CLIENT_BINDIR/mysqladmin"
|
||||
WAIT_PID="$CLIENT_BINDIR/mysql_waitpid"
|
||||
MYSQL_MY_PRINT_DEFAULTS="$CLIENT_BINDIR/my_print_defaults"
|
||||
MYSQL_MANAGER="$CLIENT_BINDIR/mysqltestmanager"
|
||||
MYSQL_MANAGER_CLIENT="$CLIENT_BINDIR/mysqltestmanagerc"
|
||||
MYSQL_MANAGER_PWGEN="$CLIENT_BINDIR/mysqltestmanager-pwgen"
|
||||
@ -716,7 +718,7 @@ MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR --charact
|
||||
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
|
||||
MYSQL="$MYSQL --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
|
||||
export MYSQL MYSQL_DUMP MYSQL_SHOW MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES
|
||||
export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR
|
||||
export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR MYSQL_MY_PRINT_DEFAULTS
|
||||
export NDB_TOOLS_DIR
|
||||
export NDB_MGM
|
||||
export NDB_BACKUP_DIR
|
||||
|
@ -109,3 +109,9 @@ select * from t1 procedure analyse();
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.df 1.1 2.2 8 8 0 0 1.650000000 0.302500000 ENUM('1.1','2.2') NOT NULL
|
||||
drop table t1;
|
||||
create table t1 (d double);
|
||||
insert into t1 values (100000);
|
||||
select * from t1 procedure analyse (1,1);
|
||||
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
|
||||
test.t1.d 100000 100000 6 6 0 0 100000 0 MEDIUMINT(6) UNSIGNED NOT NULL
|
||||
drop table t1;
|
||||
|
@ -9,6 +9,8 @@ NULL
|
||||
drop table if exists t1;
|
||||
create table 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);
|
||||
Warnings:
|
||||
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;
|
||||
create table t1 select 1,2,3;
|
||||
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;
|
||||
ERROR 21S01: Column count doesn't match value count at row 1
|
||||
create table if not exists t1 select 1;
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
select * from t1;
|
||||
1 2 3
|
||||
1 2 3
|
||||
@ -255,9 +261,13 @@ select * from t1;
|
||||
drop table t1;
|
||||
create table t1 select 1,2,3;
|
||||
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;
|
||||
ERROR 21S01: Column count doesn't match value count at row 1
|
||||
create table if not exists t1 select 1;
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
select * from t1;
|
||||
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);
|
||||
create table if not exists t1 select 2;
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
Warning 1364 Field 'a' doesn't have a default value
|
||||
select * from t1;
|
||||
a b
|
||||
@ -275,6 +286,7 @@ a b
|
||||
0 2
|
||||
create table if not exists t1 select 3 as 'a',4 as 'b';
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
Warning 1364 Field 'a' doesn't have a default value
|
||||
create table if not exists t1 select 3 as 'a',3 as 'b';
|
||||
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
|
||||
drop view v1;
|
||||
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;
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE t1 (c varchar(255) NOT NULL COLLATE utf8_general_ci, INDEX (c));
|
||||
|
@ -1027,3 +1027,15 @@ aa
|
||||
xxx
|
||||
yyy
|
||||
DROP TABLE t1;
|
||||
set names utf8;
|
||||
create table t1 (a char(1)) default character set utf8;
|
||||
create table t2 (a char(1)) default character set utf8;
|
||||
insert into t1 values('a'),('a'),(0xE38182),(0xE38182);
|
||||
insert into t1 values('i'),('i'),(0xE38184),(0xE38184);
|
||||
select * from t1 union distinct select * from t2;
|
||||
a
|
||||
a
|
||||
あ
|
||||
i
|
||||
い
|
||||
drop table t1,t2;
|
||||
|
@ -1719,6 +1719,17 @@ select * from t1;
|
||||
a
|
||||
42
|
||||
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;
|
||||
insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
|
||||
select * from t1;
|
||||
@ -1765,7 +1776,7 @@ Variable_name Value
|
||||
Innodb_rows_deleted 2070
|
||||
show status like "Innodb_rows_inserted";
|
||||
Variable_name Value
|
||||
Innodb_rows_inserted 31722
|
||||
Innodb_rows_inserted 31725
|
||||
show status like "Innodb_rows_updated";
|
||||
Variable_name Value
|
||||
Innodb_rows_updated 29530
|
||||
|
@ -668,3 +668,13 @@ ERROR 42S22: Unknown column 't2.a' in 'field list'
|
||||
insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= t1.a + t2.b;
|
||||
ERROR 42S22: Unknown column 't2.b' in 'field list'
|
||||
drop table t1,t2,t3;
|
||||
create table t1(f1 varchar(5) key);
|
||||
insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1;
|
||||
insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1;
|
||||
insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1;
|
||||
select * from t1;
|
||||
f1
|
||||
2000
|
||||
2001
|
||||
2002
|
||||
drop table t1;
|
||||
|
@ -1875,6 +1875,8 @@ set @fired:= "No";
|
||||
end if;
|
||||
end BEFORE # STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER
|
||||
DROP TABLE t1, t2;
|
||||
--port=1234
|
||||
--port=1234
|
||||
DROP TABLE IF EXISTS `test1`;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'test1'
|
||||
|
@ -99,6 +99,8 @@ id int not null primary key,
|
||||
id2 int not null,
|
||||
name char(20)
|
||||
) engine=ndb;
|
||||
Warnings:
|
||||
Note 1050 Table 't3' already exists
|
||||
show status like 'handler_discover%';
|
||||
Variable_name Value
|
||||
Handler_discover 0
|
||||
|
@ -19,7 +19,7 @@ flush privileges;
|
||||
stop slave;
|
||||
start slave;
|
||||
show slave status;
|
||||
Slave_IO_State Connecting to master
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User rpl
|
||||
Master_Port MASTER_MYPORT
|
||||
|
@ -2912,3 +2912,34 @@ ERROR 23000: Column 'id' in from clause is ambiguous
|
||||
SELECT id,t3.id FROM (t1 JOIN t2 ON (t2.id=t1.id)) LEFT JOIN t3 USING (id);
|
||||
ERROR 23000: Column 'id' in from clause is ambiguous
|
||||
drop table t1, t2, t3;
|
||||
create table t1 (a int(10),b int(10));
|
||||
create table t2 (a int(10),b int(10));
|
||||
insert into t1 values (1,10),(2,20),(3,30);
|
||||
insert into t2 values (1,10);
|
||||
select * from t1 inner join t2 using (A);
|
||||
a b b
|
||||
1 10 10
|
||||
select * from t1 inner join t2 using (a);
|
||||
a b b
|
||||
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
|
||||
create TEMPORARY TABLE t2 engine=heap select * from t1;
|
||||
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);
|
||||
ERROR 42S01: Table 't1' already exists
|
||||
ALTER TABLE t1 RENAME t2;
|
||||
|
@ -63,9 +63,11 @@ show count(*) warnings;
|
||||
1
|
||||
create table t1(id int);
|
||||
create table if not exists t1(id int);
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
select @@warning_count;
|
||||
@@warning_count
|
||||
0
|
||||
1
|
||||
drop table t1;
|
||||
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 ',';
|
||||
|
@ -48,8 +48,6 @@ insert into t1 values ('abc'),('abc\'def\\hij\"klm\0opq'),('\''),('\"'),('\\'),(
|
||||
select * from t1 procedure analyse();
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
#decimal-related test
|
||||
|
||||
create table t1 (df decimal(5,1));
|
||||
@ -57,3 +55,15 @@ insert into t1 values(1.1);
|
||||
insert into t1 values(2.2);
|
||||
select * from t1 procedure analyse();
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#10716 - Procedure Analyse results in wrong values for optimal field type
|
||||
#
|
||||
|
||||
create table t1 (d double);
|
||||
insert into t1 values (100000);
|
||||
select * from t1 procedure analyse (1,1);
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
|
@ -533,4 +533,16 @@ create view v1 as select 'foo' from dual;
|
||||
create table t1 like v1;
|
||||
drop view v1;
|
||||
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
|
||||
|
@ -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_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_esperanto_ci;
|
||||
|
||||
drop table t1;
|
||||
|
||||
|
@ -863,3 +863,14 @@ SELECT DISTINCT id FROM t1;
|
||||
SELECT DISTINCT id FROM t1 ORDER BY id;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#12891: UNION doesn't return DISTINCT result for multi-byte characters
|
||||
#
|
||||
set names utf8;
|
||||
create table t1 (a char(1)) default character set utf8;
|
||||
create table t2 (a char(1)) default character set utf8;
|
||||
insert into t1 values('a'),('a'),(0xE38182),(0xE38182);
|
||||
insert into t1 values('i'),('i'),(0xE38184),(0xE38184);
|
||||
select * from t1 union distinct select * from t2;
|
||||
drop table t1,t2;
|
||||
|
@ -1249,6 +1249,16 @@ insert into t1 values (42);
|
||||
select * from 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
|
||||
|
||||
#
|
||||
|
@ -202,4 +202,14 @@ insert into t1 select t2.a from t2 on duplicate key update t2.a= a + t2.b;
|
||||
insert into t1 select t2.a from t2 group by t2.a on duplicate key update a= t1.a + t2.b;
|
||||
drop table t1,t2,t3;
|
||||
|
||||
#
|
||||
# Bug #12695 Item_func_isnull::update_used_tables() did not update
|
||||
# const_item_cache
|
||||
create table t1(f1 varchar(5) key);
|
||||
insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1;
|
||||
insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1;
|
||||
insert into t1(f1) select if(max(f1) is null, '2000',max(f1)+1) from t1;
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
@ -762,7 +762,20 @@ show tables;
|
||||
show triggers;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
#
|
||||
# Bugs #9136, #12917: problems with --defaults-extra-file option
|
||||
#
|
||||
|
||||
--exec echo "[client]" > $MYSQL_TEST_DIR/var/tmp/tmp.cnf
|
||||
--exec echo "port=1234" >> $MYSQL_TEST_DIR/var/tmp/tmp.cnf
|
||||
--exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQL_TEST_DIR/var/tmp/tmp.cnf client
|
||||
--exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQL_TEST_DIR/var/tmp/tmp.cnf client
|
||||
--exec rm $MYSQL_TEST_DIR/var/tmp/tmp.cnf
|
||||
|
||||
#
|
||||
# Test of fix to BUG 12597
|
||||
#
|
||||
|
||||
DROP TABLE IF EXISTS `test1`;
|
||||
CREATE TABLE `test1` (
|
||||
`a1` int(11) default NULL
|
||||
|
@ -57,3 +57,4 @@ connection slave;
|
||||
sync_with_master;
|
||||
|
||||
# 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.
|
||||
|
||||
# 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;
|
||||
|
||||
# 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;
|
||||
|
||||
# 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;
|
||||
|
||||
# End of 4.1 tests
|
||||
#
|
||||
|
@ -29,3 +29,4 @@ drop database mysqltest;
|
||||
sync_slave_with_master;
|
||||
|
||||
# End of 4.1 tests
|
||||
#
|
||||
|
@ -48,3 +48,4 @@ sync_with_master;
|
||||
show status like 'slave_open_temp_tables';
|
||||
|
||||
# End of 4.1 tests
|
||||
#
|
||||
|
@ -23,7 +23,9 @@ connection slave;
|
||||
stop slave;
|
||||
start slave;
|
||||
--replace_result $MASTER_MYPORT MASTER_MYPORT
|
||||
--replace_column 7 # 8 # 9 # 22 # 23 #
|
||||
# Column 1 is replaced, since the output can be either
|
||||
# "Connecting to master" or "Waiting for master update"
|
||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 #
|
||||
--vertical_results
|
||||
show slave status;
|
||||
|
||||
|
@ -2487,3 +2487,39 @@ SELECT id,t3.id FROM t1 JOIN t2 ON (t2.id=t1.id) LEFT JOIN t3 USING (id);
|
||||
SELECT id,t3.id FROM (t1 JOIN t2 ON (t2.id=t1.id)) LEFT JOIN t3 USING (id);
|
||||
|
||||
drop table t1, t2, t3;
|
||||
|
||||
#
|
||||
# Bug #13067 JOIN xxx USING is case sensitive
|
||||
#
|
||||
|
||||
create table t1 (a int(10),b int(10));
|
||||
create table t2 (a int(10),b int(10));
|
||||
insert into t1 values (1,10),(2,20),(3,30);
|
||||
insert into t2 values (1,10);
|
||||
# both queries should produce the same result
|
||||
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_roman_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_persian_uca_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_esperanto_uca_ci;
|
||||
#endif
|
||||
|
||||
#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_roman_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
|
||||
extern CHARSET_INFO my_charset_utf8_general_cs;
|
||||
#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_roman_uca_ci);
|
||||
add_compiled_collation(&my_charset_ucs2_persian_uca_ci);
|
||||
add_compiled_collation(&my_charset_ucs2_esperanto_uca_ci);
|
||||
#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_roman_uca_ci);
|
||||
add_compiled_collation(&my_charset_utf8_persian_uca_ci);
|
||||
add_compiled_collation(&my_charset_utf8_esperanto_uca_ci);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -136,6 +136,9 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
|
||||
|
||||
if (! defaults_group_suffix)
|
||||
defaults_group_suffix= getenv(STRINGIFY_ARG(DEFAULT_GROUP_SUFFIX_ENV));
|
||||
|
||||
if (forced_extra_defaults)
|
||||
defaults_extra_file= forced_extra_defaults;
|
||||
|
||||
/*
|
||||
We can only handle 'defaults-group-suffix' if we are called from
|
||||
|
@ -599,7 +599,7 @@ net_safe_read(MYSQL *mysql)
|
||||
DBUG_PRINT("error",("Wrong connection or packet. fd: %s len: %d",
|
||||
vio_description(net->vio),len));
|
||||
#ifdef MYSQL_SERVER
|
||||
if (vio_errno(net->vio) == SOCKET_EINTR)
|
||||
if (vio_was_interrupted(net->vio))
|
||||
return (packet_error);
|
||||
#endif /*MYSQL_SERVER*/
|
||||
end_server(mysql);
|
||||
|
@ -544,7 +544,7 @@ int ha_archive::create(const char *name, TABLE *table_arg,
|
||||
error= my_errno;
|
||||
goto error;
|
||||
}
|
||||
if ((archive= gzdopen(create_file, "ab")) == NULL)
|
||||
if ((archive= gzdopen(create_file, "wb")) == NULL)
|
||||
{
|
||||
error= errno;
|
||||
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
|
||||
record+= sort_form->s->db_record_offset;
|
||||
}
|
||||
else
|
||||
else if (!error)
|
||||
file->position(sort_form->record[0]);
|
||||
}
|
||||
if (error && error != HA_ERR_RECORD_DELETED)
|
||||
|
@ -6577,13 +6577,24 @@ void ndb_serialize_cond(const Item *item, void *arg)
|
||||
case Item_func::BETWEEN:
|
||||
{
|
||||
DBUG_PRINT("info", ("BETWEEN, rewriting using AND"));
|
||||
Item_func_between *between_func= (Item_func_between *) func_item;
|
||||
Ndb_rewrite_context *rewrite_context=
|
||||
new Ndb_rewrite_context(func_item);
|
||||
rewrite_context->next= context->rewrite_stack;
|
||||
context->rewrite_stack= rewrite_context;
|
||||
if (between_func->negated)
|
||||
{
|
||||
DBUG_PRINT("info", ("NOT_FUNC"));
|
||||
curr_cond->ndb_item= new Ndb_item(Item_func::NOT_FUNC, 1);
|
||||
prev_cond= curr_cond;
|
||||
curr_cond= context->cond_ptr= new Ndb_cond();
|
||||
curr_cond->prev= prev_cond;
|
||||
prev_cond->next= curr_cond;
|
||||
}
|
||||
DBUG_PRINT("info", ("COND_AND_FUNC"));
|
||||
curr_cond->ndb_item= new Ndb_item(Item_func::COND_AND_FUNC,
|
||||
func_item->argument_count() - 1);
|
||||
curr_cond->ndb_item=
|
||||
new Ndb_item(Item_func::COND_AND_FUNC,
|
||||
func_item->argument_count() - 1);
|
||||
context->expect_only(Item::FIELD_ITEM);
|
||||
context->expect(Item::INT_ITEM);
|
||||
context->expect(Item::STRING_ITEM);
|
||||
@ -6594,10 +6605,20 @@ void ndb_serialize_cond(const Item *item, void *arg)
|
||||
case Item_func::IN_FUNC:
|
||||
{
|
||||
DBUG_PRINT("info", ("IN_FUNC, rewriting using OR"));
|
||||
Item_func_in *in_func= (Item_func_in *) func_item;
|
||||
Ndb_rewrite_context *rewrite_context=
|
||||
new Ndb_rewrite_context(func_item);
|
||||
rewrite_context->next= context->rewrite_stack;
|
||||
context->rewrite_stack= rewrite_context;
|
||||
if (in_func->negated)
|
||||
{
|
||||
DBUG_PRINT("info", ("NOT_FUNC"));
|
||||
curr_cond->ndb_item= new Ndb_item(Item_func::NOT_FUNC, 1);
|
||||
prev_cond= curr_cond;
|
||||
curr_cond= context->cond_ptr= new Ndb_cond();
|
||||
curr_cond->prev= prev_cond;
|
||||
prev_cond->next= curr_cond;
|
||||
}
|
||||
DBUG_PRINT("info", ("COND_OR_FUNC"));
|
||||
curr_cond->ndb_item= new Ndb_item(Item_func::COND_OR_FUNC,
|
||||
func_item->argument_count() - 1);
|
||||
@ -6919,6 +6940,7 @@ void ndb_serialize_cond(const Item *item, void *arg)
|
||||
DBUG_PRINT("info", ("End of condition group"));
|
||||
prev_cond= curr_cond;
|
||||
curr_cond= context->cond_ptr= new Ndb_cond();
|
||||
curr_cond->prev= prev_cond;
|
||||
prev_cond->next= curr_cond;
|
||||
curr_cond->ndb_item= new Ndb_item(NDB_END_COND);
|
||||
// Pop rewrite stack
|
||||
|
@ -1017,8 +1017,7 @@ longlong Item_func_interval::val_int()
|
||||
1 got error
|
||||
*/
|
||||
|
||||
bool
|
||||
Item_func_between::fix_fields(THD *thd, Item **ref)
|
||||
bool Item_func_between::fix_fields(THD *thd, Item **ref)
|
||||
{
|
||||
if (Item_func_opt_neg::fix_fields(thd, ref))
|
||||
return 1;
|
||||
@ -1028,8 +1027,9 @@ Item_func_between::fix_fields(THD *thd, Item **ref)
|
||||
return 0;
|
||||
|
||||
/* not_null_tables_cache == union(T1(e), intersection(T1(e1),T1(e2))) */
|
||||
not_null_tables_cache= args[0]->not_null_tables() |
|
||||
(args[1]->not_null_tables() & args[2]->not_null_tables());
|
||||
not_null_tables_cache= (args[0]->not_null_tables() |
|
||||
(args[1]->not_null_tables() &
|
||||
args[2]->not_null_tables()));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1330,8 +1330,8 @@ Item_func_if::fix_fields(THD *thd, Item **ref)
|
||||
if (Item_func::fix_fields(thd, ref))
|
||||
return 1;
|
||||
|
||||
not_null_tables_cache= (args[1]->not_null_tables()
|
||||
& args[2]->not_null_tables());
|
||||
not_null_tables_cache= (args[1]->not_null_tables() &
|
||||
args[2]->not_null_tables());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -763,7 +763,7 @@ my_real_read(NET *net, ulong *complen)
|
||||
net->error= 2; /* Close socket */
|
||||
net->report_error= 1;
|
||||
#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);
|
||||
#endif
|
||||
goto end;
|
||||
|
@ -880,18 +880,23 @@ void field_real::get_opt_type(String *answer,
|
||||
if (!max_notzero_dec_len)
|
||||
{
|
||||
if (min_arg >= -128 && max_arg <= (min_arg >= 0 ? 255 : 127))
|
||||
sprintf(buff, "TINYINT(%d)", (int) max_length - (item->decimals + 1));
|
||||
sprintf(buff, "TINYINT(%d)", (int) max_length -
|
||||
((item->decimals == NOT_FIXED_DEC) ? 0 : (item->decimals + 1)));
|
||||
else if (min_arg >= INT_MIN16 && max_arg <= (min_arg >= 0 ?
|
||||
UINT_MAX16 : INT_MAX16))
|
||||
sprintf(buff, "SMALLINT(%d)", (int) max_length - (item->decimals + 1));
|
||||
sprintf(buff, "SMALLINT(%d)", (int) max_length -
|
||||
((item->decimals == NOT_FIXED_DEC) ? 0 : (item->decimals + 1)));
|
||||
else if (min_arg >= INT_MIN24 && max_arg <= (min_arg >= 0 ?
|
||||
UINT_MAX24 : INT_MAX24))
|
||||
sprintf(buff, "MEDIUMINT(%d)", (int) max_length - (item->decimals + 1));
|
||||
sprintf(buff, "MEDIUMINT(%d)", (int) max_length -
|
||||
((item->decimals == NOT_FIXED_DEC) ? 0 : (item->decimals + 1)));
|
||||
else if (min_arg >= INT_MIN32 && max_arg <= (min_arg >= 0 ?
|
||||
UINT_MAX32 : INT_MAX32))
|
||||
sprintf(buff, "INT(%d)", (int) max_length - (item->decimals + 1));
|
||||
sprintf(buff, "INT(%d)", (int) max_length -
|
||||
((item->decimals == NOT_FIXED_DEC) ? 0 : (item->decimals + 1)));
|
||||
else
|
||||
sprintf(buff, "BIGINT(%d)", (int) max_length - (item->decimals + 1));
|
||||
sprintf(buff, "BIGINT(%d)", (int) max_length -
|
||||
((item->decimals == NOT_FIXED_DEC) ? 0 : (item->decimals + 1)));
|
||||
answer->append(buff, (uint) strlen(buff));
|
||||
if (min_arg >= 0)
|
||||
answer->append(" UNSIGNED");
|
||||
|
@ -3455,7 +3455,7 @@ test_if_string_in_list(const char *find, List<String> *str_list)
|
||||
{
|
||||
if (find_length != curr_str->length())
|
||||
continue;
|
||||
if (!strncmp(find, curr_str->ptr(), find_length))
|
||||
if (!my_strcasecmp(system_charset_info, find, curr_str->ptr()))
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
@ -437,7 +437,11 @@ bool mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
|
||||
error= -1;
|
||||
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
|
||||
{
|
||||
|
@ -3520,7 +3520,6 @@ end_with_restore_list:
|
||||
!rpl_filter->db_ok_with_wild_table(lex->name)))
|
||||
{
|
||||
my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
|
||||
reset_one_shot_variables(thd);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -3555,7 +3554,6 @@ end_with_restore_list:
|
||||
!rpl_filter->db_ok_with_wild_table(lex->name)))
|
||||
{
|
||||
my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
|
||||
reset_one_shot_variables(thd);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -3596,7 +3594,6 @@ end_with_restore_list:
|
||||
!rpl_filter->db_ok_with_wild_table(lex->name)))
|
||||
{
|
||||
my_message(ER_SLAVE_IGNORED_TABLE, ER(ER_SLAVE_IGNORED_TABLE), MYF(0));
|
||||
reset_one_shot_variables(thd);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -6367,7 +6364,7 @@ void st_select_lex::set_lock_for_tables(thr_lock_type lock_type)
|
||||
SYNOPSIS
|
||||
make_join_on_context()
|
||||
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
|
||||
|
||||
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;
|
||||
Item **arg,**arg_end;
|
||||
bool arg_changed= FALSE;
|
||||
for (arg= expr->arguments(),
|
||||
arg_end= expr->arguments()+expr->arg_count;
|
||||
arg != arg_end; arg++)
|
||||
{
|
||||
Item *item= *arg;
|
||||
bool arg_changed= FALSE;
|
||||
if (item->type() == Item::FIELD_ITEM || item->type() == Item::REF_ITEM)
|
||||
{
|
||||
ORDER *group_tmp;
|
||||
@ -13131,11 +13131,11 @@ 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))
|
||||
return 1;
|
||||
}
|
||||
if (arg_changed)
|
||||
{
|
||||
expr->maybe_null= 1;
|
||||
*changed= TRUE;
|
||||
}
|
||||
}
|
||||
if (arg_changed)
|
||||
{
|
||||
expr->maybe_null= 1;
|
||||
*changed= TRUE;
|
||||
}
|
||||
}
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias);
|
||||
@ -1708,12 +1711,8 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||
if (!access(path,F_OK))
|
||||
{
|
||||
if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
|
||||
{
|
||||
create_info->table_existed= 1; // Mark that table existed
|
||||
error= FALSE;
|
||||
}
|
||||
else
|
||||
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name);
|
||||
goto warn;
|
||||
my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
@ -1736,12 +1735,8 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||
DBUG_PRINT("info", ("Table with same name already existed in handler"));
|
||||
|
||||
if (create_if_not_exists)
|
||||
{
|
||||
create_info->table_existed= 1; // Mark that table existed
|
||||
error= FALSE;
|
||||
}
|
||||
else
|
||||
my_error(ER_TABLE_EXISTS_ERROR, MYF(0), table_name);
|
||||
goto warn;
|
||||
my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
@ -1774,6 +1769,14 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name,
|
||||
mysql_bin_log.write(&qinfo);
|
||||
}
|
||||
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:
|
||||
VOID(pthread_mutex_unlock(&LOCK_open));
|
||||
|
@ -670,6 +670,9 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
|
||||
%token YEAR_SYM
|
||||
%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 OR_OR_SYM OR_SYM OR2_SYM XOR
|
||||
%left AND_SYM AND_AND_SYM
|
||||
@ -5776,7 +5779,13 @@ derived_table_list:
|
||||
;
|
||||
|
||||
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
|
||||
{ YYERROR_UNLESS($1 && ($$=$3)); $3->straight=1; }
|
||||
| table_ref normal_join table_ref
|
||||
|
@ -551,11 +551,13 @@ int hp_rec_key_cmp(HP_KEYDEF *keydef, const byte *rec1, const byte *rec2,
|
||||
}
|
||||
if (cs->mbmaxlen > 1)
|
||||
{
|
||||
uint safe_length1= char_length1;
|
||||
uint safe_length2= char_length2;
|
||||
uint char_length= seg->length / cs->mbmaxlen;
|
||||
char_length1= my_charpos(cs, pos1, pos1 + char_length1, char_length1);
|
||||
set_if_smaller(char_length1, seg->length);
|
||||
char_length2= my_charpos(cs, pos2, pos2 + char_length2, char_length2);
|
||||
set_if_smaller(char_length2, seg->length);
|
||||
char_length1= my_charpos(cs, pos1, pos1 + char_length1, char_length);
|
||||
set_if_smaller(char_length1, safe_length1);
|
||||
char_length2= my_charpos(cs, pos2, pos2 + char_length2, char_length);
|
||||
set_if_smaller(char_length2, safe_length2);
|
||||
}
|
||||
|
||||
if (cs->coll->strnncollsp(seg->charset,
|
||||
|
@ -285,7 +285,7 @@ template<class T>
|
||||
inline
|
||||
void
|
||||
Parser<T>::setBreakOnInvalidArg(bool v){
|
||||
impl->m_breakOnInvalidArg;
|
||||
impl->m_breakOnInvalidArg = v;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -678,12 +678,10 @@ ndb_mgm_get_status(NdbMgmHandle handle)
|
||||
Vector<BaseString> split;
|
||||
tmp.split(split, ":");
|
||||
if(split.size() != 2){
|
||||
abort();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if(!(split[0].trim() == "nodes")){
|
||||
abort();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -731,7 +729,6 @@ ndb_mgm_get_status(NdbMgmHandle handle)
|
||||
|
||||
if(i+1 != noOfNodes){
|
||||
free(state);
|
||||
abort();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -2521,10 +2521,7 @@ MgmtSrvr::startBackup(Uint32& backupId, int waitCompleted)
|
||||
case GSN_NODE_FAILREP:{
|
||||
const NodeFailRep * const rep =
|
||||
CAST_CONSTPTR(NodeFailRep, signal->getDataPtr());
|
||||
#ifdef VM_TRACE
|
||||
ndbout_c("Node %d failed", rep->failNo);
|
||||
#endif
|
||||
if (rep->failNo == nodeId ||
|
||||
if (NodeBitmask::get(rep->theNodes,nodeId) ||
|
||||
waitCompleted == 1)
|
||||
return 1326;
|
||||
// wait for next signal
|
||||
|
@ -250,14 +250,22 @@ SignalSender::execNodeStatus(void* signalSender,
|
||||
// node shutdown complete
|
||||
s->header.theVerId_signalNumber = GSN_NF_COMPLETEREP;
|
||||
NFCompleteRep *rep = (NFCompleteRep *)s->getDataPtrSend();
|
||||
rep->blockNo = 0;
|
||||
rep->nodeId = 0;
|
||||
rep->failedNodeId = nodeId;
|
||||
rep->unused = 0;
|
||||
rep->from = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// node failure
|
||||
s->header.theVerId_signalNumber = GSN_NODE_FAILREP;
|
||||
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);
|
||||
|
@ -6692,6 +6692,18 @@ static const char persian[]=
|
||||
" < \\uFEF5 < \\uFEF6 < \\uFEF7 < \\uFEF8 < \\uFEF9 < \\uFEFA"
|
||||
" < \\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:
|
||||
@ -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
|
||||
|
||||
|
||||
@ -9140,6 +9184,37 @@ CHARSET_INFO my_charset_utf8_persian_uca_ci=
|
||||
&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_UCA_COLLATIONS */
|
||||
|
@ -54,6 +54,7 @@ static void vio_init(Vio* vio, enum enum_vio_type type,
|
||||
vio->fastsend =vio_fastsend;
|
||||
vio->viokeepalive =vio_keepalive;
|
||||
vio->should_retry =vio_should_retry;
|
||||
vio->was_interrupted=vio_was_interrupted;
|
||||
vio->vioclose =vio_close_pipe;
|
||||
vio->peer_addr =vio_peer_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->viokeepalive =vio_keepalive;
|
||||
vio->should_retry =vio_should_retry;
|
||||
vio->was_interrupted=vio_was_interrupted;
|
||||
vio->vioclose =vio_close_shared_memory;
|
||||
vio->peer_addr =vio_peer_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->viokeepalive =vio_ssl_keepalive;
|
||||
vio->should_retry =vio_ssl_should_retry;
|
||||
vio->was_interrupted=vio_ssl_was_interrupted;
|
||||
vio->vioclose =vio_ssl_close;
|
||||
vio->peer_addr =vio_ssl_peer_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->viokeepalive =vio_keepalive;
|
||||
vio->should_retry =vio_should_retry;
|
||||
vio->was_interrupted=vio_was_interrupted;
|
||||
vio->vioclose =vio_close;
|
||||
vio->peer_addr =vio_peer_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);
|
||||
/* Whenever we should retry the last read/write operation. */
|
||||
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... */
|
||||
int vio_ssl_close(Vio *vio);
|
||||
/* 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 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 r;
|
||||
|
Loading…
x
Reference in New Issue
Block a user