Merge with the latest changes in the 5.2 tree.
This commit is contained in:
commit
1a507f4ffd
@ -9,9 +9,9 @@ export CCACHE_DISABLE
|
||||
|
||||
export LDFLAGS="$gcov_link_flags"
|
||||
|
||||
extra_flags="$pentium64_cflags $debug_cflags $max_cflags $gcov_compile_flags"
|
||||
extra_flags="$pentium64_cflags $max_cflags $gcov_compile_flags"
|
||||
c_warnings="$c_warnings $debug_extra_warnings"
|
||||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||
extra_configs="$pentium64_configs $debug_configs $gcov_configs $max_configs"
|
||||
extra_configs="$pentium_configs $debug_configs $gcov_configs $max_configs --with-zlib-dir=bundled"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -4,6 +4,6 @@ path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium64_cflags $gprof_compile_flags"
|
||||
extra_configs="$pentium64_configs $debug_configs $gprof_link_flags"
|
||||
extra_configs="$pentium_configs $max_configs $gprof_link_flags --with-zlib-dir=bundled"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -325,6 +325,7 @@ ADD_SUBDIRECTORY(client)
|
||||
ADD_SUBDIRECTORY(sql)
|
||||
ADD_SUBDIRECTORY(server-tools/instance-manager)
|
||||
ADD_SUBDIRECTORY(libmysql)
|
||||
ADD_SUBDIRECTORY(libservices)
|
||||
ADD_SUBDIRECTORY(tests)
|
||||
ADD_SUBDIRECTORY(unittest/mytap)
|
||||
ADD_SUBDIRECTORY(unittest/examples)
|
||||
|
@ -25,7 +25,7 @@ EXTRA_DIST = INSTALL-SOURCE INSTALL-WIN-SOURCE \
|
||||
|
||||
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
|
||||
@readline_topdir@ sql-common scripts \
|
||||
@pstack_dir@ \
|
||||
@pstack_dir@ libservices \
|
||||
@sql_union_dirs@ storage \
|
||||
@sql_server@ @man_dirs@ tests \
|
||||
netware @libmysqld_dirs@ \
|
||||
@ -34,7 +34,7 @@ SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
|
||||
|
||||
DIST_SUBDIRS = . include Docs zlib \
|
||||
cmd-line-utils sql-common scripts \
|
||||
pstack \
|
||||
pstack libservices \
|
||||
strings mysys dbug extra regex libmysql libmysql_r client unittest storage plugin \
|
||||
vio sql man tests \
|
||||
netware libmysqld \
|
||||
|
@ -31,6 +31,15 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Version numbers for deprecation messages */
|
||||
#define VER_CELOSIA "5.6"
|
||||
|
||||
#define WARN_DEPRECATED(Ver,Old,New) \
|
||||
do { \
|
||||
printf("Warning: The option '%s' is deprecated and will be removed " \
|
||||
"in a future release. Please use %s instead.\n", (Old), (New)); \
|
||||
} while(0);
|
||||
|
||||
enum options_client
|
||||
{
|
||||
OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
|
||||
@ -48,8 +57,8 @@ enum options_client
|
||||
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
|
||||
OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
|
||||
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
|
||||
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS, OPT_SERVER_ARG,
|
||||
OPT_START_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
|
||||
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_SERVER_ARG,
|
||||
OPT_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
|
||||
OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY, OPT_COUNT,
|
||||
#ifdef HAVE_NDBCLUSTER_DB
|
||||
OPT_NDBCLUSTER, OPT_NDB_CONNECTSTRING,
|
||||
@ -81,6 +90,8 @@ enum options_client
|
||||
OPT_DEBUG_INFO, OPT_DEBUG_CHECK, OPT_COLUMN_TYPES, OPT_ERROR_LOG_FILE,
|
||||
OPT_WRITE_BINLOG, OPT_DUMP_DATE,
|
||||
OPT_ABORT_SOURCE_ON_ERROR,
|
||||
OPT_FIRST_SLAVE,
|
||||
OPT_ALL,
|
||||
OPT_REWRITE_DB,
|
||||
OPT_MAX_CLIENT_OPTION
|
||||
};
|
||||
|
@ -54,6 +54,9 @@ static char *server_version= NULL;
|
||||
/* Array of options to pass to libemysqld */
|
||||
#define MAX_SERVER_ARGS 64
|
||||
|
||||
/* Version numbers for deprecation messages */
|
||||
#define VER_CELOSIA "5.6"
|
||||
|
||||
void* sql_alloc(unsigned size); // Don't use mysqld alloc for these
|
||||
void sql_element_free(void *ptr);
|
||||
#include "sql_string.h"
|
||||
@ -1349,7 +1352,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_rehash, (uchar**) &opt_rehash, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0,
|
||||
0, 0},
|
||||
{"no-auto-rehash", 'A',
|
||||
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect. WARNING: options deprecated; use --disable-auto-rehash instead.",
|
||||
"No automatic rehashing. One has to use 'rehash' to get table and field completion. This gives a quicker start of mysql and disables rehashing on reconnect.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"batch", 'B',
|
||||
"Don't use history file. Disable interactive behavior. (Enables --silent)", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -1418,7 +1421,7 @@ static struct my_option my_long_options[] =
|
||||
{"line-numbers", OPT_LINE_NUMBERS, "Write line numbers for errors.",
|
||||
(uchar**) &line_numbers, (uchar**) &line_numbers, 0, GET_BOOL,
|
||||
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"skip-line-numbers", 'L', "Don't write line number for errors. WARNING: -L is deprecated, use long version of this option instead.", 0, 0, 0, GET_NO_ARG,
|
||||
{"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"unbuffered", 'n', "Flush buffer after each query.", (uchar**) &unbuffered,
|
||||
(uchar**) &unbuffered, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -1426,7 +1429,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &column_names, (uchar**) &column_names, 0, GET_BOOL,
|
||||
NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"skip-column-names", 'N',
|
||||
"Don't write column names in results. WARNING: -N is deprecated, use long version of this options instead.",
|
||||
"Don't write column names in results.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"set-variable", 'O',
|
||||
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
|
||||
@ -1633,7 +1636,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
init_tee(argument);
|
||||
break;
|
||||
case OPT_NOTEE:
|
||||
printf("WARNING: option deprecated; use --disable-tee instead.\n");
|
||||
WARN_DEPRECATED(VER_CELOSIA, "--no-tee", "--disable-tee");
|
||||
if (opt_outfile)
|
||||
end_tee();
|
||||
break;
|
||||
@ -1656,7 +1659,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
}
|
||||
break;
|
||||
case OPT_NOPAGER:
|
||||
printf("WARNING: option deprecated; use --disable-pager instead.\n");
|
||||
WARN_DEPRECATED(VER_CELOSIA, "--no-pager", "--disable-pager");
|
||||
opt_nopager= 1;
|
||||
break;
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
@ -1702,12 +1705,18 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
if (!(status.line_buff= batch_readline_command(status.line_buff, argument)))
|
||||
return 1;
|
||||
break;
|
||||
case 'g':
|
||||
WARN_DEPRECATED(VER_CELOSIA, "-g, --no-named-commands", "--skip-named-commands");
|
||||
break;
|
||||
case 'o':
|
||||
if (argument == disabled_my_option)
|
||||
one_database= 0;
|
||||
else
|
||||
one_database= skip_updates= 1;
|
||||
break;
|
||||
case 'O':
|
||||
WARN_DEPRECATED(VER_CELOSIA, "-O, --set-variable", "--variable-name=value");
|
||||
break;
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
@ -3530,7 +3539,8 @@ print_table_data_vertically(MYSQL_RES *result)
|
||||
for (uint off=0; off < mysql_num_fields(result); off++)
|
||||
{
|
||||
field= mysql_fetch_field(result);
|
||||
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
|
||||
if (column_names)
|
||||
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
|
||||
if (cur[off])
|
||||
{
|
||||
unsigned int i;
|
||||
@ -4215,7 +4225,7 @@ char *get_arg(char *line, my_bool get_next_arg)
|
||||
if (*ptr == '\\' && ptr[1]) // escaped character
|
||||
{
|
||||
// Remove the backslash
|
||||
strmov(ptr, ptr+1);
|
||||
strmov_overlapp(ptr, ptr+1);
|
||||
}
|
||||
else if ((!quoted && *ptr == ' ') || (quoted && *ptr == qtype))
|
||||
{
|
||||
|
@ -776,6 +776,10 @@ static int run_sql_fix_privilege_tables(void)
|
||||
found_real_errors++;
|
||||
print_line(line);
|
||||
}
|
||||
else if (strncmp(line, "WARNING", 7) == 0)
|
||||
{
|
||||
print_line(line);
|
||||
}
|
||||
} while ((line= get_line(line)) && *line);
|
||||
}
|
||||
|
||||
|
@ -288,6 +288,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
charsets_dir = argument;
|
||||
#endif
|
||||
break;
|
||||
case 'O':
|
||||
WARN_DEPRECATED(VER_CELOSIA, "--set-variable", "--variable-name=value");
|
||||
break;
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
|
@ -50,6 +50,7 @@ Rpl_filter *binlog_filter;
|
||||
|
||||
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_LOCAL_FILES)
|
||||
|
||||
|
||||
char server_version[SERVER_VERSION_LENGTH];
|
||||
ulong server_id = 0;
|
||||
|
||||
@ -1119,7 +1120,7 @@ static struct my_option my_long_options[] =
|
||||
"built-in default (" STRINGIFY_ARG(MYSQL_PORT) ").",
|
||||
(uchar**) &port, (uchar**) &port, 0, GET_INT, REQUIRED_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"position", 'j', "Deprecated. Use --start-position instead.",
|
||||
{"position", OPT_POSITION, "Deprecated. Use --start-position instead.",
|
||||
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
|
||||
REQUIRED_ARG, BIN_LOG_HEADER_SIZE, BIN_LOG_HEADER_SIZE,
|
||||
/* COM_BINLOG_DUMP accepts only 4 bytes for the position */
|
||||
@ -1162,7 +1163,7 @@ static struct my_option my_long_options[] =
|
||||
"(you should probably use quotes for your shell to set it properly).",
|
||||
(uchar**) &start_datetime_str, (uchar**) &start_datetime_str,
|
||||
0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"start-position", OPT_START_POSITION,
|
||||
{"start-position", 'j',
|
||||
"Start reading the binlog at position N. Applies to the first binlog "
|
||||
"passed on the command line.",
|
||||
(uchar**) &start_position, (uchar**) &start_position, 0, GET_ULL,
|
||||
@ -1377,6 +1378,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
case 'R':
|
||||
remote_opt= 1;
|
||||
break;
|
||||
case OPT_POSITION:
|
||||
WARN_DEPRECATED(VER_CELOSIA, "--position", "--start-position");
|
||||
break;
|
||||
case OPT_MYSQL_PROTOCOL:
|
||||
opt_protocol= find_type_or_exit(argument, &sql_protocol_typelib,
|
||||
opt->name);
|
||||
|
@ -179,7 +179,7 @@ HASH ignore_table;
|
||||
|
||||
static struct my_option my_long_options[] =
|
||||
{
|
||||
{"all", 'a', "Deprecated. Use --create-options instead.",
|
||||
{"all", OPT_ALL, "Deprecated. Use --create-options instead.",
|
||||
(uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
|
||||
0, 0, 0, 0, 0},
|
||||
{"all-databases", 'A',
|
||||
@ -230,7 +230,7 @@ static struct my_option my_long_options[] =
|
||||
{"compress", 'C', "Use compression in server/client protocol.",
|
||||
(uchar**) &opt_compress, (uchar**) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"create-options", OPT_CREATE_OPTIONS,
|
||||
{"create-options", 'a',
|
||||
"Include all MySQL specific create options.",
|
||||
(uchar**) &create_options, (uchar**) &create_options, 0, GET_BOOL, NO_ARG, 1,
|
||||
0, 0, 0, 0, 0},
|
||||
@ -268,7 +268,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_events, (uchar**) &opt_events, 0, GET_BOOL,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"extended-insert", 'e',
|
||||
"Allows utilization of the new, much faster INSERT syntax.",
|
||||
"Use multiple-row INSERT syntax that include several VALUES lists.",
|
||||
(uchar**) &extended_insert, (uchar**) &extended_insert, 0, GET_BOOL, NO_ARG,
|
||||
1, 0, 0, 0, 0, 0},
|
||||
{"fields-terminated-by", OPT_FTB,
|
||||
@ -282,7 +282,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
{"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...",
|
||||
(uchar**) &escaped, (uchar**) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"first-slave", 'x', "Deprecated, renamed to --lock-all-tables.",
|
||||
{"first-slave", OPT_FIRST_SLAVE, "Deprecated, renamed to --lock-all-tables.",
|
||||
(uchar**) &opt_lock_all_tables, (uchar**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"flush-logs", 'F', "Flush logs file in server before starting dump. "
|
||||
@ -366,8 +366,7 @@ static struct my_option my_long_options[] =
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-data", 'd', "No row information.", (uchar**) &opt_no_data,
|
||||
(uchar**) &opt_no_data, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-set-names", 'N',
|
||||
"Deprecated. Use --skip-set-charset instead.",
|
||||
{"no-set-names", 'N',"Suppress the SET NAMES statement",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"opt", OPT_OPTIMIZE,
|
||||
"Same as --add-drop-table, --add-locks, --create-options, --quick, --extended-insert, --lock-tables, --set-charset, and --disable-keys. Enabled by default, disable with --skip-opt.",
|
||||
@ -760,6 +759,15 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
case '?':
|
||||
usage();
|
||||
exit(0);
|
||||
case 'O':
|
||||
WARN_DEPRECATED(VER_CELOSIA, "--set-variable", "--variable-name=value");
|
||||
break;
|
||||
case (int) OPT_ALL:
|
||||
WARN_DEPRECATED(VER_CELOSIA, "--all", "--create-options");
|
||||
break;
|
||||
case (int) OPT_FIRST_SLAVE:
|
||||
WARN_DEPRECATED(VER_CELOSIA, "--first-slave", "--lock-all-tables");
|
||||
break;
|
||||
case (int) OPT_MASTER_DATA:
|
||||
if (!argument) /* work like in old versions */
|
||||
opt_master_data= MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL;
|
||||
@ -808,7 +816,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
&err_ptr, &err_len);
|
||||
if (err_len)
|
||||
{
|
||||
strmake(buff, err_ptr, min(sizeof(buff), err_len));
|
||||
strmake(buff, err_ptr, min(sizeof(buff) - 1, err_len));
|
||||
fprintf(stderr, "Invalid mode to --compatible: %s\n", buff);
|
||||
exit(1);
|
||||
}
|
||||
@ -4486,7 +4494,7 @@ static ulong find_set(TYPELIB *lib, const char *x, uint length,
|
||||
|
||||
for (; pos != end && *pos != ','; pos++) ;
|
||||
var_len= (uint) (pos - start);
|
||||
strmake(buff, start, min(sizeof(buff), var_len));
|
||||
strmake(buff, start, min(sizeof(buff) - 1, var_len));
|
||||
find= find_type(buff, lib, var_len);
|
||||
if (!find)
|
||||
{
|
||||
|
43
configure.in
43
configure.in
@ -1,22 +1,27 @@
|
||||
dnl -*- ksh -*-
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.52)dnl Minimum Autoconf version required.
|
||||
# Minimum Autoconf version required.
|
||||
AC_PREREQ(2.59)
|
||||
|
||||
AC_INIT(sql/mysqld.cc)
|
||||
AC_CANONICAL_SYSTEM
|
||||
# The Docs Makefile.am parses this line!
|
||||
# remember to also update version.c in ndb
|
||||
#
|
||||
# Remember to also update version.c in ndb.
|
||||
# When changing major version number please also check switch statement
|
||||
# in mysqlbinlog.cc / check_master_version().
|
||||
# in client/mysqlbinlog.cc / check_master_version().
|
||||
#
|
||||
# When merging new MySQL releases, update the version number to match the
|
||||
# MySQL version number.
|
||||
#
|
||||
# Note: the following line must be parseable by win/configure.js:GetVersion()
|
||||
AM_INIT_AUTOMAKE(mysql, 5.2.0-MariaDB-alpha)
|
||||
AM_CONFIG_HEADER([include/config.h:config.h.in])
|
||||
AC_INIT([MariaDB Server], [5.2.0-MariaDB-alpha], [], [mysql])
|
||||
AC_CONFIG_SRCDIR([sql/mysqld.cc])
|
||||
AC_CANONICAL_SYSTEM
|
||||
# USTAR format gives us the possibility to store longer path names in
|
||||
# TAR files, the path name is split into two parts, a 155 chacater
|
||||
# first part and a 100 character second part.
|
||||
AM_INIT_AUTOMAKE([1.9 tar-ustar])
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AM_CONFIG_HEADER([include/config.h])
|
||||
|
||||
# Request support for automake silent-rules if available.
|
||||
# Default to verbose output. One can use the configure-time
|
||||
@ -36,12 +41,14 @@ NDB_SHARED_LIB_VERSION=$NDB_SHARED_LIB_MAJOR_VERSION:0:0
|
||||
# Remember that regexps needs to quote [ and ] since this is run through m4
|
||||
# We take some made up examples
|
||||
#
|
||||
# VERSION 5.1.40sp1-alpha 5.0.34a
|
||||
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a
|
||||
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34
|
||||
# MYSQL_BASE_VERSION 5.1 5.0
|
||||
# MYSQL_VERSION_ID 50140 50034
|
||||
# VERSION 5.1.40sp1-alpha 5.0.34a 5.5.1-m2
|
||||
# MYSQL_U_SCORE_VERSION 5.1.40sp1_alpha 5.0.34a 5.5.1_m2
|
||||
# MYSQL_NO_DASH_VERSION 5.1.40sp1 5.0.34a 5.5.1
|
||||
# MYSQL_NUMERIC_VERSION 5.1.40 5.0.34 5.5.1
|
||||
# MYSQL_BASE_VERSION 5.1 5.0 5.5
|
||||
# MYSQL_VERSION_ID 50140 50034 50501
|
||||
#
|
||||
MYSQL_U_SCORE_VERSION=`echo $VERSION | sed -e "s|-|_|"`
|
||||
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|-.*$||"`
|
||||
MYSQL_NUMERIC_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|[[a-z]][[a-z0-9]]*$||"`
|
||||
MYSQL_BASE_VERSION=`echo $MYSQL_NUMERIC_VERSION | sed -e "s|\.[[^.]]*$||"`
|
||||
@ -79,6 +86,7 @@ romanian russian serbian slovak spanish swedish ukrainian"
|
||||
#####
|
||||
#####
|
||||
|
||||
AC_SUBST(MYSQL_U_SCORE_VERSION)
|
||||
AC_SUBST(MYSQL_NO_DASH_VERSION)
|
||||
AC_SUBST(MYSQL_BASE_VERSION)
|
||||
AC_SUBST(MYSQL_VERSION_ID)
|
||||
@ -2100,7 +2108,7 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bsearch bzero \
|
||||
sighold sigset sigthreadmask port_create sleep thr_yield \
|
||||
snprintf socket stpcpy strcasecmp strerror strsignal strnlen strpbrk strstr \
|
||||
strtol strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr \
|
||||
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd)
|
||||
posix_fallocate backtrace backtrace_symbols backtrace_symbols_fd printstack)
|
||||
|
||||
#
|
||||
#
|
||||
@ -2913,7 +2921,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
|
||||
man/Makefile BUILD/Makefile vio/Makefile dnl
|
||||
libmysql/Makefile libmysql_r/Makefile client/Makefile dnl
|
||||
sql/Makefile sql/share/Makefile dnl
|
||||
sql/sql_builtin.cc sql-common/Makefile dnl
|
||||
sql/sql_builtin.cc sql-common/Makefile libservices/Makefile dnl
|
||||
dbug/Makefile scripts/Makefile include/Makefile dnl
|
||||
tests/Makefile Docs/Makefile support-files/Makefile dnl
|
||||
support-files/MacOSX/Makefile support-files/RHEL4-SElinux/Makefile dnl
|
||||
@ -2954,7 +2962,8 @@ echo " * Community Features: $ENABLE_COMMUNITY_FEATURES"
|
||||
echo ""
|
||||
echo "---"
|
||||
|
||||
# The following text is checked in ./Do-compile to verify that configure
|
||||
# The first line "Thank you ..." is checked in ./Do-compile to verify that configure
|
||||
# ended sucessfully - don't remove it.
|
||||
echo
|
||||
echo "Thank you for choosing MariaDB!"
|
||||
echo
|
||||
|
@ -652,22 +652,20 @@ word32 CertDecoder::GetDigest()
|
||||
}
|
||||
|
||||
|
||||
// memory length checked add tag to buffer
|
||||
char* CertDecoder::AddTag(char* ptr, const char* buf_end, const char* tag_name,
|
||||
word32 tag_name_length, word32 tag_value_length)
|
||||
char *CertDecoder::AddTag(char *ptr, const char *buf_end,
|
||||
const char *tag_name, word32 tag_name_length,
|
||||
word32 tag_value_length)
|
||||
{
|
||||
if (ptr + tag_name_length + tag_value_length > buf_end) {
|
||||
source_.SetError(CONTENT_E);
|
||||
return 0;
|
||||
}
|
||||
|
||||
memcpy(ptr, tag_name, tag_name_length);
|
||||
ptr += tag_name_length;
|
||||
|
||||
memcpy(ptr, source_.get_current(), tag_value_length);
|
||||
ptr += tag_value_length;
|
||||
|
||||
return ptr;
|
||||
if (ptr + tag_name_length + tag_value_length > buf_end)
|
||||
return 0;
|
||||
|
||||
memcpy(ptr, tag_name, tag_name_length);
|
||||
ptr+= tag_name_length;
|
||||
|
||||
memcpy(ptr, source_.get_current(), tag_value_length);
|
||||
ptr+= tag_value_length;
|
||||
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
@ -680,19 +678,18 @@ void CertDecoder::GetName(NameType nt)
|
||||
word32 length = GetSequence(); // length of all distinguished names
|
||||
|
||||
if (length >= ASN_NAME_MAX)
|
||||
return;
|
||||
goto err;
|
||||
length += source_.get_index();
|
||||
|
||||
char* ptr;
|
||||
char* buf_end;
|
||||
char *ptr, *buf_end;
|
||||
|
||||
if (nt == ISSUER) {
|
||||
ptr = issuer_;
|
||||
buf_end = ptr + sizeof(issuer_) - 1; // 1 byte for trailing 0
|
||||
ptr= issuer_;
|
||||
buf_end= ptr + sizeof(issuer_) - 1; // 1 byte for trailing 0
|
||||
}
|
||||
else {
|
||||
ptr = subject_;
|
||||
buf_end = ptr + sizeof(subject_) - 1; // 1 byte for trailing 0
|
||||
ptr= subject_;
|
||||
buf_end= ptr + sizeof(subject_) - 1; // 1 byte for trailing 0
|
||||
}
|
||||
|
||||
while (source_.get_index() < length) {
|
||||
@ -718,32 +715,32 @@ void CertDecoder::GetName(NameType nt)
|
||||
|
||||
switch (id) {
|
||||
case COMMON_NAME:
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/CN=", 4, strLen)))
|
||||
return;
|
||||
if (!(ptr= AddTag(ptr, buf_end, "/CN=", 4, strLen)))
|
||||
goto err;
|
||||
break;
|
||||
case SUR_NAME:
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/SN=", 4, strLen)))
|
||||
return;
|
||||
if (!(ptr= AddTag(ptr, buf_end, "/SN=", 4, strLen)))
|
||||
goto err;
|
||||
break;
|
||||
case COUNTRY_NAME:
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/C=", 3, strLen)))
|
||||
return;
|
||||
if (!(ptr= AddTag(ptr, buf_end, "/C=", 3, strLen)))
|
||||
goto err;
|
||||
break;
|
||||
case LOCALITY_NAME:
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/L=", 3, strLen)))
|
||||
return;
|
||||
if (!(ptr= AddTag(ptr, buf_end, "/L=", 3, strLen)))
|
||||
goto err;
|
||||
break;
|
||||
case STATE_NAME:
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/ST=", 4, strLen)))
|
||||
return;
|
||||
if (!(ptr= AddTag(ptr, buf_end, "/ST=", 4, strLen)))
|
||||
goto err;
|
||||
break;
|
||||
case ORG_NAME:
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/O=", 3, strLen)))
|
||||
return;
|
||||
if (!(ptr= AddTag(ptr, buf_end, "/O=", 3, strLen)))
|
||||
goto err;
|
||||
break;
|
||||
case ORGUNIT_NAME:
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/OU=", 4, strLen)))
|
||||
return;
|
||||
if (!(ptr= AddTag(ptr, buf_end, "/OU=", 4, strLen)))
|
||||
goto err;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -758,21 +755,20 @@ void CertDecoder::GetName(NameType nt)
|
||||
source_.advance(oidSz + 1);
|
||||
word32 length = GetLength(source_);
|
||||
|
||||
if (email) {
|
||||
if (!(ptr = AddTag(ptr, buf_end, "/emailAddress=", 14, length)))
|
||||
return;
|
||||
}
|
||||
if (email && !(ptr= AddTag(ptr, buf_end, "/emailAddress=", 14, length)))
|
||||
goto err;
|
||||
|
||||
source_.advance(length);
|
||||
}
|
||||
}
|
||||
*ptr= 0;
|
||||
|
||||
*ptr = 0;
|
||||
|
||||
if (nt == ISSUER)
|
||||
sha.Final(issuerHash_);
|
||||
else
|
||||
sha.Final(subjectHash_);
|
||||
sha.Final(nt == ISSUER ? issuerHash_ : subjectHash_);
|
||||
|
||||
return;
|
||||
|
||||
err:
|
||||
source_.SetError(CONTENT_E);
|
||||
}
|
||||
|
||||
|
||||
|
@ -21,7 +21,8 @@ HEADERS_GEN_MAKE = my_config.h
|
||||
HEADERS_ABI = mysql.h mysql_com.h mysql_time.h \
|
||||
my_list.h my_alloc.h typelib.h mysql/plugin.h
|
||||
pkginclude_HEADERS = $(HEADERS_ABI) my_dbug.h m_string.h my_sys.h \
|
||||
my_xml.h mysql_embed.h \
|
||||
my_xml.h mysql_embed.h mysql/services.h \
|
||||
mysql/service_my_snprintf.h mysql/service_thd_alloc.h \
|
||||
my_pthread.h my_no_pthread.h \
|
||||
decimal.h errmsg.h my_global.h my_net.h \
|
||||
my_getopt.h sslopt-longopts.h my_dir.h \
|
||||
@ -36,7 +37,7 @@ noinst_HEADERS = config-win.h config-netware.h lf.h my_bit.h \
|
||||
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
|
||||
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
|
||||
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
|
||||
my_handler.h my_time.h \
|
||||
my_handler.h my_time.h service_versions.h \
|
||||
my_vle.h my_user.h my_atomic.h atomic/nolock.h \
|
||||
atomic/rwlock.h atomic/x86-gcc.h atomic/generic-msvc.h \
|
||||
atomic/gcc_builtins.h my_libwrap.h my_stacktrace.h \
|
||||
|
@ -192,7 +192,7 @@ typedef SSIZE_T ssize_t;
|
||||
#define isnan(X) _isnan(X)
|
||||
#define finite(X) _finite(X)
|
||||
|
||||
#ifndef UNDEF_THREAD_HACK
|
||||
#ifndef MYSQL_CLIENT_NO_THREADS
|
||||
#define THREAD
|
||||
#endif
|
||||
#define VOID_SIGHANDLER
|
||||
|
@ -95,13 +95,7 @@ extern const char NEAR _dig_vec_lower[];
|
||||
/* Defined in strtod.c */
|
||||
extern const double log_10[309];
|
||||
|
||||
#ifdef BAD_STRING_COMPILER
|
||||
#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
|
||||
#else
|
||||
extern char *strmov_overlapp(char *dest, const char *src);
|
||||
/* Warning: the following is likely not to work: */
|
||||
#define strmake_overlapp(A,B,C) strmake(A,B,C)
|
||||
#endif
|
||||
|
||||
#ifdef BAD_MEMCPY /* Problem with gcc on Alpha */
|
||||
#define memcpy_fixed(A,B,C) bmove((A),(B),(C))
|
||||
@ -162,9 +156,6 @@ extern size_t strinstr(const char *str,const char *search);
|
||||
extern size_t r_strinstr(const char *str, size_t from, const char *search);
|
||||
extern char *strkey(char *dst,char *head,char *tail,char *flags);
|
||||
extern char *strmake(char *dst,const char *src,size_t length);
|
||||
#ifndef strmake_overlapp
|
||||
extern char *strmake_overlapp(char *dst,const char *src, size_t length);
|
||||
#endif
|
||||
|
||||
#ifndef strmov
|
||||
extern char *strmov(char *dst,const char *src);
|
||||
@ -257,16 +248,10 @@ extern size_t my_snprintf(char *to, size_t n, const char *fmt, ...)
|
||||
|
||||
/*
|
||||
LEX_STRING -- a pair of a C-string and its length.
|
||||
(it's part of the plugin API as a MYSQL_LEX_STRING)
|
||||
*/
|
||||
|
||||
#ifndef _my_plugin_h
|
||||
/* This definition must match the one given in mysql/plugin.h */
|
||||
struct st_mysql_lex_string
|
||||
{
|
||||
char *str;
|
||||
size_t length;
|
||||
};
|
||||
#endif
|
||||
#include <mysql/plugin.h>
|
||||
typedef struct st_mysql_lex_string LEX_STRING;
|
||||
|
||||
#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
|
||||
|
@ -889,7 +889,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
#define FLT_MAX ((float)3.40282346638528860e+38)
|
||||
#endif
|
||||
#ifndef SIZE_T_MAX
|
||||
#define SIZE_T_MAX ~((size_t) 0)
|
||||
#define SIZE_T_MAX (~((size_t) 0))
|
||||
#endif
|
||||
|
||||
#ifndef isfinite
|
||||
@ -1260,9 +1260,9 @@ do { doubleget_union _tmp; \
|
||||
} while (0)
|
||||
#define float4get(V,M) do { *((float *) &(V)) = *((const float*) (M)); } while(0)
|
||||
#define float8get(V,M) doubleget((V),(M))
|
||||
#define float4store(V,M) memcpy((uchar*) V,(const uchar*) (&M),sizeof(float))
|
||||
#define floatstore(T,V) memcpy((uchar*)(T), (const uchar*)(&V),sizeof(float))
|
||||
#define floatget(V,M) memcpy((uchar*) &V,(const uchar*) (M),sizeof(float))
|
||||
#define float4store(V,M) memcpy((uchar*) V,(uchar*) (&M),sizeof(float))
|
||||
#define floatstore(T,V) memcpy((uchar*)(T), (uchar*)(&V),sizeof(float))
|
||||
#define floatget(V,M) memcpy((uchar*) &V,(uchar*) (M),sizeof(float))
|
||||
#define float8store(V,M) doublestore((V),(M))
|
||||
#else
|
||||
|
||||
|
@ -47,4 +47,12 @@
|
||||
#define rw_unlock(A)
|
||||
#define rwlock_destroy(A)
|
||||
|
||||
typedef int my_pthread_once_t;
|
||||
#define MY_PTHREAD_ONCE_INIT 0
|
||||
#define MY_PTHREAD_ONCE_DONE 1
|
||||
|
||||
#define my_pthread_once(C,F) do { \
|
||||
if (*(C) != MY_PTHREAD_ONCE_DONE) { F(); *(C)= MY_PTHREAD_ONCE_DONE; } \
|
||||
} while(0)
|
||||
|
||||
#endif
|
||||
|
@ -69,6 +69,11 @@ typedef int pthread_mutexattr_t;
|
||||
#define pthread_handler_t EXTERNC void * __cdecl
|
||||
typedef void * (__cdecl *pthread_handler)(void *);
|
||||
|
||||
typedef volatile LONG my_pthread_once_t;
|
||||
#define MY_PTHREAD_ONCE_INIT 0
|
||||
#define MY_PTHREAD_ONCE_INPROGRESS 1
|
||||
#define MY_PTHREAD_ONCE_DONE 2
|
||||
|
||||
/*
|
||||
Struct and macros to be used in combination with the
|
||||
windows implementation of pthread_cond_timedwait
|
||||
@ -116,6 +121,7 @@ int pthread_attr_init(pthread_attr_t *connect_att);
|
||||
int pthread_attr_setstacksize(pthread_attr_t *connect_att,DWORD stack);
|
||||
int pthread_attr_setprio(pthread_attr_t *connect_att,int priority);
|
||||
int pthread_attr_destroy(pthread_attr_t *connect_att);
|
||||
int my_pthread_once(my_pthread_once_t *once_control,void (*init_routine)(void));
|
||||
struct tm *localtime_r(const time_t *timep,struct tm *tmp);
|
||||
struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
|
||||
|
||||
@ -215,6 +221,10 @@ extern int my_pthread_getprio(pthread_t thread_id);
|
||||
#define pthread_handler_t EXTERNC void *
|
||||
typedef void *(* pthread_handler)(void *);
|
||||
|
||||
#define my_pthread_once_t pthread_once_t
|
||||
#define MY_PTHREAD_ONCE_INIT PTHREAD_ONCE_INIT
|
||||
#define my_pthread_once(C,F) pthread_once(C,F)
|
||||
|
||||
/* Test first for RTS or FSU threads */
|
||||
|
||||
#if defined(PTHREAD_SCOPE_GLOBAL) && !defined(PTHREAD_SCOPE_SYSTEM)
|
||||
|
@ -23,7 +23,7 @@
|
||||
(defined(__alpha__) && defined(__GNUC__))
|
||||
#define HAVE_STACKTRACE 1
|
||||
#endif
|
||||
#elif defined(__WIN__)
|
||||
#elif defined(__WIN__) || defined(HAVE_PRINTSTACK)
|
||||
#define HAVE_STACKTRACE 1
|
||||
#endif
|
||||
|
||||
|
@ -247,6 +247,7 @@ extern struct charset_info_st compiled_charsets[];
|
||||
/* statistics */
|
||||
extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
|
||||
extern ulong my_file_total_opened;
|
||||
extern ulong my_sync_count;
|
||||
extern uint mysys_usage_id;
|
||||
extern my_bool my_init_done;
|
||||
|
||||
@ -999,7 +1000,6 @@ extern my_bool resolve_collation(const char *cl_name,
|
||||
CHARSET_INFO *default_cl,
|
||||
CHARSET_INFO **cl);
|
||||
|
||||
extern void free_charsets(void);
|
||||
extern char *get_charsets_dir(char *buf);
|
||||
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
|
||||
extern my_bool init_compiled_charsets(myf flags);
|
||||
|
@ -251,6 +251,8 @@ extern ulong myisam_bulk_insert_tree_size, myisam_data_pointer_size;
|
||||
/* usually used to check if a symlink points into the mysql data home */
|
||||
/* which is normally forbidden */
|
||||
extern int (*myisam_test_invalid_symlink)(const char *filename);
|
||||
extern ulonglong myisam_mmap_size, myisam_mmap_used;
|
||||
extern pthread_mutex_t THR_LOCK_myisam_mmap;
|
||||
|
||||
/* Prototypes for myisam-functions */
|
||||
|
||||
@ -296,6 +298,7 @@ extern int mi_delete_all_rows(struct st_myisam_info *info);
|
||||
extern ulong _mi_calc_blob_length(uint length , const uchar *pos);
|
||||
extern uint mi_get_pointer_length(ulonglong file_length, uint def);
|
||||
|
||||
#define MEMMAP_EXTRA_MARGIN 7 /* Write this as a suffix for mmap file */
|
||||
/* this is used to pass to mysql_myisamchk_table */
|
||||
|
||||
#define MYISAMCHK_REPAIR 1 /* equivalent to myisamchk -r */
|
||||
|
@ -28,7 +28,7 @@ typedef struct st_net {
|
||||
unsigned int *return_status;
|
||||
unsigned char reading_or_writing;
|
||||
char save_char;
|
||||
my_bool unused0;
|
||||
char net_skip_rest_factor;
|
||||
my_bool unused;
|
||||
my_bool compress;
|
||||
my_bool unused1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2005 MySQL AB
|
||||
/* Copyright (C) 2005 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -34,15 +34,7 @@ class Item;
|
||||
#define MYSQL_THD void*
|
||||
#endif
|
||||
|
||||
#ifndef _m_string_h
|
||||
/* This definition must match the one given in m_string.h */
|
||||
struct st_mysql_lex_string
|
||||
{
|
||||
char *str;
|
||||
unsigned int length;
|
||||
};
|
||||
#endif /* _m_string_h */
|
||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
||||
#include <mysql/services.h>
|
||||
|
||||
#define MYSQL_XIDDATASIZE 128
|
||||
/**
|
||||
@ -65,7 +57,7 @@ typedef struct st_mysql_xid MYSQL_XID;
|
||||
Plugin API. Common for all plugin types.
|
||||
*/
|
||||
|
||||
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0100
|
||||
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0101
|
||||
|
||||
/*
|
||||
The allowable types of plugins
|
||||
@ -120,7 +112,8 @@ enum enum_mysql_show_type
|
||||
{
|
||||
SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG,
|
||||
SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR,
|
||||
SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE
|
||||
SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE,
|
||||
SHOW_always_last
|
||||
};
|
||||
|
||||
struct st_mysql_show_var {
|
||||
@ -739,54 +732,6 @@ int thd_killed(const MYSQL_THD thd);
|
||||
*/
|
||||
unsigned long thd_get_thread_id(const MYSQL_THD thd);
|
||||
|
||||
|
||||
/**
|
||||
Allocate memory in the connection's local memory pool
|
||||
|
||||
@details
|
||||
When properly used in place of @c my_malloc(), this can significantly
|
||||
improve concurrency. Don't use this or related functions to allocate
|
||||
large chunks of memory. Use for temporary storage only. The memory
|
||||
will be freed automatically at the end of the statement; no explicit
|
||||
code is required to prevent memory leaks.
|
||||
|
||||
@see alloc_root()
|
||||
*/
|
||||
void *thd_alloc(MYSQL_THD thd, unsigned int size);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
void *thd_calloc(MYSQL_THD thd, unsigned int size);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
char *thd_strdup(MYSQL_THD thd, const char *str);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
|
||||
|
||||
/**
|
||||
Create a LEX_STRING in this connection's local memory pool
|
||||
|
||||
@param thd user thread connection handle
|
||||
@param lex_str pointer to LEX_STRING object to be initialized
|
||||
@param str initializer to be copied into lex_str
|
||||
@param size length of str, in bytes
|
||||
@param allocate_lex_string flag: if TRUE, allocate new LEX_STRING object,
|
||||
instead of using lex_str value
|
||||
@return NULL on failure, or pointer to the LEX_STRING object
|
||||
|
||||
@see thd_alloc()
|
||||
*/
|
||||
MYSQL_LEX_STRING *thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_str,
|
||||
const char *str, unsigned int size,
|
||||
int allocate_lex_string);
|
||||
|
||||
/**
|
||||
Get the XID for this connection's transaction
|
||||
|
||||
|
@ -1,9 +1,38 @@
|
||||
#include <mysql/services.h>
|
||||
#include <mysql/service_my_snprintf.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
extern struct my_snprintf_service_st {
|
||||
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
||||
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
||||
} *my_snprintf_service;
|
||||
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
||||
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
||||
#include <mysql/service_thd_alloc.h>
|
||||
#include <stdlib.h>
|
||||
struct st_mysql_lex_string
|
||||
{
|
||||
char *str;
|
||||
unsigned int length;
|
||||
size_t length;
|
||||
};
|
||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
||||
extern struct thd_alloc_service_st {
|
||||
void *(*thd_alloc_func)(void*, unsigned int);
|
||||
void *(*thd_calloc_func)(void*, unsigned int);
|
||||
char *(*thd_strdup_func)(void*, const char *);
|
||||
char *(*thd_strmake_func)(void*, const char *, unsigned int);
|
||||
void *(*thd_memdup_func)(void*, const void*, unsigned int);
|
||||
MYSQL_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_LEX_STRING *,
|
||||
const char *, unsigned int, int);
|
||||
} *thd_alloc_service;
|
||||
void *thd_alloc(void* thd, unsigned int size);
|
||||
void *thd_calloc(void* thd, unsigned int size);
|
||||
char *thd_strdup(void* thd, const char *str);
|
||||
char *thd_strmake(void* thd, const char *str, unsigned int size);
|
||||
void *thd_memdup(void* thd, const void* str, unsigned int size);
|
||||
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
||||
const char *str, unsigned int size,
|
||||
int allocate_lex_string);
|
||||
struct st_mysql_xid {
|
||||
long formatID;
|
||||
long gtrid_length;
|
||||
@ -15,7 +44,8 @@ enum enum_mysql_show_type
|
||||
{
|
||||
SHOW_UNDEF, SHOW_BOOL, SHOW_INT, SHOW_LONG,
|
||||
SHOW_LONGLONG, SHOW_CHAR, SHOW_CHAR_PTR,
|
||||
SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE
|
||||
SHOW_ARRAY, SHOW_FUNC, SHOW_DOUBLE,
|
||||
SHOW_always_last
|
||||
};
|
||||
struct st_mysql_show_var {
|
||||
const char *name;
|
||||
@ -127,14 +157,6 @@ const char *set_thd_proc_info(void*, const char * info, const char *func,
|
||||
int mysql_tmpfile(const char *prefix);
|
||||
int thd_killed(const void* thd);
|
||||
unsigned long thd_get_thread_id(const void* thd);
|
||||
void *thd_alloc(void* thd, unsigned int size);
|
||||
void *thd_calloc(void* thd, unsigned int size);
|
||||
char *thd_strdup(void* thd, const char *str);
|
||||
char *thd_strmake(void* thd, const char *str, unsigned int size);
|
||||
void *thd_memdup(void* thd, const void* str, unsigned int size);
|
||||
MYSQL_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_LEX_STRING *lex_str,
|
||||
const char *str, unsigned int size,
|
||||
int allocate_lex_string);
|
||||
void thd_get_xid(const void* thd, MYSQL_XID *xid);
|
||||
void mysql_query_cache_invalidate4(void* thd,
|
||||
const char *key, unsigned int key_length,
|
||||
|
98
include/mysql/service_my_snprintf.h
Normal file
98
include/mysql/service_my_snprintf.h
Normal file
@ -0,0 +1,98 @@
|
||||
#ifndef MYSQL_SERVICE_MY_SNPRINTF_INCLUDED
|
||||
/* Copyright (C) 2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/**
|
||||
@file
|
||||
my_snprintf service
|
||||
|
||||
Portable and limited vsnprintf() implementation.
|
||||
|
||||
This is a portable, limited vsnprintf() implementation, with some
|
||||
extra features. "Portable" means that it'll produce identical result
|
||||
on all platforms (for example, on Windows and Linux system printf %e
|
||||
formats the exponent differently, on different systems %p either
|
||||
prints leading 0x or not, %s may accept null pointer or crash on
|
||||
it). "Limited" means that it does not support all the C89 features.
|
||||
But it supports few extensions, not in any standard.
|
||||
|
||||
my_vsnprintf(to, n, fmt, ap)
|
||||
|
||||
@param[out] to A buffer to store the result in
|
||||
@param[in] n Store up to n-1 characters, followed by an end 0
|
||||
@param[in] fmt printf-like format string
|
||||
@param[in] ap Arguments
|
||||
|
||||
@return a number of bytes written to a buffer *excluding* terminating '\0'
|
||||
|
||||
@post
|
||||
The syntax of a format string is generally the same:
|
||||
% <flag> <width> <precision> <length modifier> <format>
|
||||
where everithing but the format is optional.
|
||||
|
||||
Three one-character flags are recognized:
|
||||
'0' has the standard zero-padding semantics;
|
||||
'-' is parsed, but silently ignored;
|
||||
'`' (backtick) is only supported for strings (%s) and means that the
|
||||
string will be quoted according to MySQL identifier quoting rules.
|
||||
|
||||
Both <width> and <precision> can be specified as numbers or '*'.
|
||||
|
||||
<length modifier> can be 'l', 'll', or 'z'.
|
||||
|
||||
Supported formats are 's' (null pointer is accepted, printed as
|
||||
"(null)"), 'b' (extension, see below), 'c', 'd', 'u', 'x',
|
||||
'X', 'p' (works as 0x%x).
|
||||
|
||||
Standard syntax for positional arguments $n is supported.
|
||||
|
||||
Extensions:
|
||||
|
||||
Flag '`' (backtick): see above.
|
||||
|
||||
Format 'b': binary buffer, prints exactly <precision> bytes from the
|
||||
argument, without stopping at '\0'.
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
extern struct my_snprintf_service_st {
|
||||
size_t (*my_snprintf_type)(char*, size_t, const char*, ...);
|
||||
size_t (*my_vsnprintf_type)(char *, size_t, const char*, va_list);
|
||||
} *my_snprintf_service;
|
||||
|
||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#define my_vsnprintf my_snprintf_service->my_vsnprintf_type
|
||||
#define my_snprintf my_snprintf_service->my_snprintf_type
|
||||
|
||||
#else
|
||||
|
||||
size_t my_snprintf(char* to, size_t n, const char* fmt, ...);
|
||||
size_t my_vsnprintf(char *to, size_t n, const char* fmt, va_list ap);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MYSQL_SERVICE_MY_SNPRINTF_INCLUDED
|
||||
#endif
|
||||
|
128
include/mysql/service_thd_alloc.h
Normal file
128
include/mysql/service_thd_alloc.h
Normal file
@ -0,0 +1,128 @@
|
||||
#ifndef MYSQL_SERVICE_THD_ALLOC_INCLUDED
|
||||
/* Copyright (C) 2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/**
|
||||
@file
|
||||
This service provdes functions to allocate memory in a connection local
|
||||
memory pool. The memory allocated there will be automatically freed at the
|
||||
end of the statement, don't use it for allocations that should live longer
|
||||
than that. For short living allocations this is more efficient than
|
||||
using my_malloc and friends, and automatic "garbage collection" allows not
|
||||
to think about memory leaks.
|
||||
|
||||
The pool is best for small to medium objects, don't use it for large
|
||||
allocations - they are better served with my_malloc.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct st_mysql_lex_string
|
||||
{
|
||||
char *str;
|
||||
size_t length;
|
||||
};
|
||||
typedef struct st_mysql_lex_string MYSQL_LEX_STRING;
|
||||
|
||||
extern struct thd_alloc_service_st {
|
||||
void *(*thd_alloc_func)(MYSQL_THD, unsigned int);
|
||||
void *(*thd_calloc_func)(MYSQL_THD, unsigned int);
|
||||
char *(*thd_strdup_func)(MYSQL_THD, const char *);
|
||||
char *(*thd_strmake_func)(MYSQL_THD, const char *, unsigned int);
|
||||
void *(*thd_memdup_func)(MYSQL_THD, const void*, unsigned int);
|
||||
MYSQL_LEX_STRING *(*thd_make_lex_string_func)(MYSQL_THD, MYSQL_LEX_STRING *,
|
||||
const char *, unsigned int, int);
|
||||
} *thd_alloc_service;
|
||||
|
||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#define thd_alloc(thd,size) (thd_alloc_service->thd_alloc_func((thd), (size)))
|
||||
|
||||
#define thd_calloc(thd,size) (thd_alloc_service->thd_calloc_func((thd), (size)))
|
||||
|
||||
#define thd_strdup(thd,str) (thd_alloc_service->thd_strdup_func((thd), (str)))
|
||||
|
||||
#define thd_strmake(thd,str,size) \
|
||||
(thd_alloc_service->thd_strmake_func((thd), (str), (size)))
|
||||
|
||||
#define thd_memdup(thd,str,size) \
|
||||
(thd_alloc_service->thd_memdup_func((thd), (str), (size)))
|
||||
|
||||
#define thd_make_lex_string(thd, lex_str, str, size, allocate_lex_string) \
|
||||
(thd_alloc_service->thd_make_lex_string_func((thd), (lex_str), (str), \
|
||||
(size), (allocate_lex_string)))
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
Allocate memory in the connection's local memory pool
|
||||
|
||||
@details
|
||||
When properly used in place of @c my_malloc(), this can significantly
|
||||
improve concurrency. Don't use this or related functions to allocate
|
||||
large chunks of memory. Use for temporary storage only. The memory
|
||||
will be freed automatically at the end of the statement; no explicit
|
||||
code is required to prevent memory leaks.
|
||||
|
||||
@see alloc_root()
|
||||
*/
|
||||
void *thd_alloc(MYSQL_THD thd, unsigned int size);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
void *thd_calloc(MYSQL_THD thd, unsigned int size);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
char *thd_strdup(MYSQL_THD thd, const char *str);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size);
|
||||
/**
|
||||
@see thd_alloc()
|
||||
*/
|
||||
void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
|
||||
|
||||
/**
|
||||
Create a LEX_STRING in this connection's local memory pool
|
||||
|
||||
@param thd user thread connection handle
|
||||
@param lex_str pointer to LEX_STRING object to be initialized
|
||||
@param str initializer to be copied into lex_str
|
||||
@param size length of str, in bytes
|
||||
@param allocate_lex_string flag: if TRUE, allocate new LEX_STRING object,
|
||||
instead of using lex_str value
|
||||
@return NULL on failure, or pointer to the LEX_STRING object
|
||||
|
||||
@see thd_alloc()
|
||||
*/
|
||||
MYSQL_LEX_STRING *thd_make_lex_string(MYSQL_THD thd, MYSQL_LEX_STRING *lex_str,
|
||||
const char *str, unsigned int size,
|
||||
int allocate_lex_string);
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MYSQL_SERVICE_THD_ALLOC_INCLUDED
|
||||
#endif
|
||||
|
30
include/mysql/services.h
Normal file
30
include/mysql/services.h
Normal file
@ -0,0 +1,30 @@
|
||||
#ifndef MYSQL_SERVICES_INCLUDED
|
||||
/* Copyright (C) 2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <mysql/service_my_snprintf.h>
|
||||
#include <mysql/service_thd_alloc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MYSQL_SERVICES_INCLUDED
|
||||
#endif
|
||||
|
@ -261,7 +261,7 @@ typedef struct st_net {
|
||||
unsigned int *return_status;
|
||||
unsigned char reading_or_writing;
|
||||
char save_char;
|
||||
my_bool unused0; /* Please remove with the next incompatible ABI change. */
|
||||
char net_skip_rest_factor;
|
||||
my_bool unused; /* Please remove with the next incompatible ABI change */
|
||||
my_bool compress;
|
||||
my_bool unused1; /* Please remove with the next incompatible ABI change. */
|
||||
|
24
include/service_versions.h
Normal file
24
include/service_versions.h
Normal file
@ -0,0 +1,24 @@
|
||||
/* Copyright (C) 2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifdef _WIN32
|
||||
#define SERVICE_VERSION __declspec(dllexport) void *
|
||||
#else
|
||||
#define SERVICE_VERSION void *
|
||||
#endif
|
||||
|
||||
#define VERSION_my_snprintf 0x0100
|
||||
#define VERSION_thd_alloc 0x0100
|
||||
|
@ -211,7 +211,6 @@ void STDCALL mysql_server_end()
|
||||
}
|
||||
else
|
||||
{
|
||||
free_charsets();
|
||||
mysql_thread_end();
|
||||
}
|
||||
|
||||
@ -719,7 +718,10 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
|
||||
if (!passwd)
|
||||
passwd="";
|
||||
|
||||
/* Store user into the buffer */
|
||||
/*
|
||||
Store user into the buffer.
|
||||
Advance position as strmake returns a pointer to the closing NUL.
|
||||
*/
|
||||
end= strmake(end, user, USERNAME_LENGTH) + 1;
|
||||
|
||||
/* write scrambled password according to server capabilities */
|
||||
@ -1269,7 +1271,7 @@ mysql_list_fields(MYSQL *mysql, const char *table, const char *wild)
|
||||
{
|
||||
MYSQL_RES *result;
|
||||
MYSQL_FIELD *fields;
|
||||
char buff[257],*end;
|
||||
char buff[258],*end;
|
||||
DBUG_ENTER("mysql_list_fields");
|
||||
DBUG_PRINT("enter",("table: '%s' wild: '%s'",table,wild ? wild : ""));
|
||||
|
||||
@ -2284,7 +2286,7 @@ mysql_stmt_param_metadata(MYSQL_STMT *stmt)
|
||||
|
||||
/* Store type of parameter in network buffer. */
|
||||
|
||||
static void store_param_type(uchar **pos, MYSQL_BIND *param)
|
||||
static void store_param_type(unsigned char **pos, MYSQL_BIND *param)
|
||||
{
|
||||
uint typecode= param->buffer_type | (param->is_unsigned ? 32768 : 0);
|
||||
int2store(*pos, typecode);
|
||||
|
20
libservices/CMakeLists.txt
Normal file
20
libservices/CMakeLists.txt
Normal file
@ -0,0 +1,20 @@
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
|
||||
|
||||
SET(MYSQLSERVICES_SOURCES my_snprintf_service.c thd_alloc_service.c)
|
||||
|
||||
ADD_LIBRARY(mysqlservices ${MYSQLSERVICES_SOURCES})
|
100
libservices/HOWTO
Normal file
100
libservices/HOWTO
Normal file
@ -0,0 +1,100 @@
|
||||
How to create a new service
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
A "service" is a set of C functions in a structure that a
|
||||
service dynamic linker uses when a dynamic plugin is loaded.
|
||||
|
||||
If you want to export C++ class you need to provide an
|
||||
extern "C" function that will create a new instance of your class,
|
||||
and put it in a service.
|
||||
|
||||
Data structures are not part of the service structure, but they are part
|
||||
of the API you create and usually need to be declared in the same
|
||||
service_*.h file.
|
||||
|
||||
To turn a set of functions (foo_func1, foo_func2)
|
||||
into a service "foo" you need to
|
||||
|
||||
1. create a new file include/mysql/service_foo.h
|
||||
|
||||
2. the template is
|
||||
==================================================================
|
||||
#ifndef MYSQL_SERVICE_FOO_INCLUDED
|
||||
/* standard GPL header */
|
||||
|
||||
/**
|
||||
@file
|
||||
*exhaustive* description of the interface you provide.
|
||||
This file is the main user documentation of the new service
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern struct foo_service_st {
|
||||
int (*foo_func1_type)(...); /* fix the prototype as appropriate */
|
||||
void (*foo_func2_type)(...); /* fix the prototype as appropriate */
|
||||
} *foo_service;
|
||||
|
||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#define foo_func1(...) foo_service->foo_func1_type(...)
|
||||
#define foo_func2(...) foo_service->foo_func2_type(...)
|
||||
|
||||
#else
|
||||
|
||||
int foo_func1(...); /* fix the prototype as appropriate */
|
||||
void foo_func2(...); /* fix the prototype as appropriate */
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MYSQL_SERVICE_FOO_INCLUDED
|
||||
#endif
|
||||
==================================================================
|
||||
|
||||
the service_foo.h file should be self-contained, if it needs system headers -
|
||||
include them in it, e.g. if you use size_t - #include <stdlib.h>
|
||||
|
||||
it should also declare all the accompanying data structures, as necessary
|
||||
(e.g. thd_alloc_service declares MYSQL_LEX_STRING).
|
||||
|
||||
3. add the new file to include/Makefile.am (pkginclude_HEADERS)
|
||||
4. add the new file to include/mysql/services.h
|
||||
5. increase the minor plugin ABI version in include/mysql/plugin.h
|
||||
(MYSQL_PLUGIN_INTERFACE_VERSION = MYSQL_PLUGIN_INTERFACE_VERSION+1)
|
||||
6. add the version of your service to include/service_versions.h:
|
||||
==================================================================
|
||||
#define VERSION_foo 0x0100
|
||||
==================================================================
|
||||
|
||||
7. create a new file libservices/foo_service.c using the following template:
|
||||
==================================================================
|
||||
/* GPL header */
|
||||
#include <service_versions.h>
|
||||
SERVICE_VERSION *foo_service= (void*)VERSION_foo;
|
||||
==================================================================
|
||||
|
||||
8. add the new file to libservices/CMakeLists.txt (MYSQLSERVICES_SOURCES)
|
||||
9. add the new file to libservices/Makefile.am (libmysqlservices_a_SOURCES)
|
||||
10. and finally, register your service for dynamic linking in
|
||||
sql/sql_plugin_services.h
|
||||
10.1 fill in the service structure:
|
||||
==================================================================
|
||||
static struct foo_service_st foo_handler = {
|
||||
foo_func1,
|
||||
foo_func2
|
||||
}
|
||||
==================================================================
|
||||
|
||||
10.2 and add it to the list of services
|
||||
|
||||
==================================================================
|
||||
{ "foo_service", VERSION_foo, &foo_handler }
|
||||
==================================================================
|
||||
|
||||
that's all.
|
||||
|
19
libservices/Makefile.am
Normal file
19
libservices/Makefile.am
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright 2009 Sun Microsystems, Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/include
|
||||
pkglib_LIBRARIES = libmysqlservices.a
|
||||
libmysqlservices_a_SOURCES = my_snprintf_service.c thd_alloc_service.c
|
||||
EXTRA_DIST = CMakeLists.txt
|
17
libservices/my_snprintf_service.c
Normal file
17
libservices/my_snprintf_service.c
Normal file
@ -0,0 +1,17 @@
|
||||
/* Copyright (C) 2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include <service_versions.h>
|
||||
SERVICE_VERSION my_snprintf_service= (void*)VERSION_my_snprintf;
|
17
libservices/thd_alloc_service.c
Normal file
17
libservices/thd_alloc_service.c
Normal file
@ -0,0 +1,17 @@
|
||||
/* Copyright (C) 2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include <service_versions.h>
|
||||
SERVICE_VERSION *thd_alloc_service= (void*)VERSION_thd_alloc;
|
@ -102,7 +102,8 @@ TEST_DIRS = t r include std_data std_data/parts collections \
|
||||
suite/rpl_ndb suite/rpl_ndb/t suite/rpl_ndb/r \
|
||||
suite/parts suite/parts/t suite/parts/r suite/parts/inc \
|
||||
suite/pbxt/t suite/pbxt/r \
|
||||
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include
|
||||
suite/innodb suite/innodb/t suite/innodb/r suite/innodb/include \
|
||||
suite/vcol suite/vcol/t suite/vcol/r suite/vcol/inc
|
||||
|
||||
# Used by dist-hook and install-data-local to copy all
|
||||
# test files into either dist or install directory
|
||||
|
@ -14,13 +14,11 @@ funcs_2.ndb_charset # joro : NDB tests marked as experiment
|
||||
|
||||
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
|
||||
main.plugin_load @solaris # Bug#42144
|
||||
main.outfile_loaddata @solaris # joro : Bug #46895
|
||||
|
||||
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
|
||||
rpl.rpl_cross_version* # Bug#48340 2009-12-01 Daogang rpl_cross_version: Found warnings/errors in server log file!
|
||||
rpl.rpl_get_master_version_and_clock* # Bug #49191 2009-12-01 Daogang rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed
|
||||
rpl.rpl_innodb_bug28430* @solaris # Bug#46029
|
||||
rpl.rpl_trigger* # Bug#47810 2009-10-04 joro rpl.rpl_trigger.test fails with valgrind errors with the innodb plugin
|
||||
|
||||
rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
|
||||
rpl_ndb.rpl_ndb_log # Bug#38998
|
||||
|
@ -21,14 +21,26 @@ connection slave;
|
||||
reset master;
|
||||
connection master;
|
||||
|
||||
# MTR is not case-sensitive.
|
||||
let $lower_stmt_head= load data;
|
||||
let $UPPER_STMT_HEAD= LOAD DATA;
|
||||
if (`SELECT '$lock_option' <> ''`)
|
||||
{
|
||||
#if $lock_option is null, an extra blank is added into the statement,
|
||||
#this will change the result of rpl_loaddata test case. so $lock_option
|
||||
#is set only when it is not null.
|
||||
let $lower_stmt_head= load data $lock_option;
|
||||
let $UPPER_STMT_HEAD= LOAD DATA $lock_option;
|
||||
}
|
||||
|
||||
select last_insert_id();
|
||||
create table t1(a int not null auto_increment, b int, primary key(a) );
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
# verify that LAST_INSERT_ID() is set by LOAD DATA INFILE
|
||||
select last_insert_id();
|
||||
|
||||
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
|
||||
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
|
||||
eval $lower_stmt_head infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
|
||||
|
||||
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
|
||||
insert into t3 select * from t2;
|
||||
@ -56,7 +68,7 @@ sync_with_master;
|
||||
insert into t1 values(1,10);
|
||||
|
||||
connection master;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
@ -70,9 +82,11 @@ connection slave;
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
sync_with_master;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
|
||||
show slave status;
|
||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
||||
echo Last_SQL_Errno=$last_error;
|
||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
||||
echo Last_SQL_Error;
|
||||
echo $last_error;
|
||||
|
||||
# Trigger error again to test CHANGE MASTER
|
||||
|
||||
@ -80,7 +94,7 @@ connection master;
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
# The SQL slave thread should be stopped now.
|
||||
@ -92,9 +106,11 @@ connection slave;
|
||||
stop slave;
|
||||
change master to master_user='test';
|
||||
change master to master_user='root';
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
|
||||
show slave status;
|
||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
||||
echo Last_SQL_Errno=$last_error;
|
||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
||||
echo Last_SQL_Error;
|
||||
echo $last_error;
|
||||
|
||||
# Trigger error again to test RESET SLAVE
|
||||
|
||||
@ -105,7 +121,7 @@ connection master;
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
# The SQL slave thread should be stopped now.
|
||||
@ -114,9 +130,11 @@ connection slave;
|
||||
# RESET SLAVE and see if error is cleared in SHOW SLAVE STATUS.
|
||||
stop slave;
|
||||
reset slave;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
|
||||
show slave status;
|
||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
|
||||
echo Last_SQL_Errno=$last_error;
|
||||
let $last_error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
|
||||
echo Last_SQL_Error;
|
||||
echo $last_error;
|
||||
|
||||
# Finally, see if logging is done ok on master for a failing LOAD DATA INFILE
|
||||
|
||||
@ -125,7 +143,7 @@ reset master;
|
||||
eval create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
|
||||
unique(day)) engine=$engine_type; # no transactions
|
||||
--error ER_DUP_ENTRY
|
||||
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
|
||||
eval $lower_stmt_head infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
|
||||
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
||||
'\n##\n' starting by '>' ignore 1 lines;
|
||||
select * from t2;
|
||||
@ -141,7 +159,7 @@ alter table t2 drop key day;
|
||||
connection master;
|
||||
delete from t2;
|
||||
--error ER_DUP_ENTRY
|
||||
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
|
||||
eval $lower_stmt_head infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
|
||||
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
||||
'\n##\n' starting by '>' ignore 1 lines;
|
||||
connection slave;
|
||||
@ -154,7 +172,7 @@ drop table t1, t2;
|
||||
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
|
||||
--error ER_DUP_ENTRY
|
||||
LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1;
|
||||
eval $UPPER_STMT_HEAD INFILE "../../std_data/words.dat" INTO TABLE t1;
|
||||
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
||||
@ -182,17 +200,17 @@ DROP TABLE IF EXISTS t1;
|
||||
|
||||
-- echo ### assertion: works with cross-referenced database
|
||||
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
-- eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
|
||||
-- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
|
||||
|
||||
-- eval use $db1
|
||||
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
-- echo ### assertion: works with fully qualified name on current database
|
||||
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
-- eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
|
||||
-- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
|
||||
|
||||
-- echo ### assertion: works without fully qualified name on current database
|
||||
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
-- eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1
|
||||
-- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1
|
||||
|
||||
-- echo ### create connection without default database
|
||||
-- echo ### connect (conn2,localhost,root,,*NO-ONE*);
|
||||
@ -200,7 +218,7 @@ connect (conn2,localhost,root,,*NO-ONE*);
|
||||
-- connection conn2
|
||||
-- echo ### assertion: works without stating the default database
|
||||
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
-- eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
|
||||
-- eval $UPPER_STMT_HEAD LOCAL INFILE '$MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE $db1.t1
|
||||
-- echo ### disconnect and switch back to master connection
|
||||
-- disconnect conn2
|
||||
-- connection master
|
||||
@ -219,4 +237,18 @@ source include/diff_tables.inc;
|
||||
|
||||
-- sync_slave_with_master
|
||||
|
||||
# BUG#49479: LOAD DATA INFILE is binlogged without escaping field names
|
||||
-- source include/master-slave-reset.inc
|
||||
-- connection master
|
||||
use test;
|
||||
CREATE TABLE t1 (`key` TEXT, `text` TEXT);
|
||||
|
||||
LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ',';
|
||||
SELECT * FROM t1;
|
||||
|
||||
-- sync_slave_with_master
|
||||
-- connection master
|
||||
DROP TABLE t1;
|
||||
-- sync_slave_with_master
|
||||
|
||||
# End of 4.1 tests
|
||||
|
554
mysql-test/extra/rpl_tests/rpl_mixing_engines.inc
Normal file
554
mysql-test/extra/rpl_tests/rpl_mixing_engines.inc
Normal file
@ -0,0 +1,554 @@
|
||||
################################################################################
|
||||
# This is an auxiliary file used by rpl_mixing_engines.test, and that it
|
||||
# executes SQL statements according to a format string, as specified in
|
||||
# rpl_mixing_engines.test. In addition, it accepts the special format
|
||||
# strings 'configure' and 'clean', used before and after everything else.
|
||||
################################################################################
|
||||
|
||||
if (`SELECT HEX(@commands) = HEX('configure')`)
|
||||
{
|
||||
connection master;
|
||||
|
||||
SET SQL_LOG_BIN=0;
|
||||
eval CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE nt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE nt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE nt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE tt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval CREATE TABLE tt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval CREATE TABLE tt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval SET SQL_LOG_BIN=1;
|
||||
|
||||
connection slave;
|
||||
|
||||
SET SQL_LOG_BIN=0;
|
||||
eval CREATE TABLE nt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE nt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE nt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE nt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE nt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE nt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = MyISAM;
|
||||
eval CREATE TABLE tt_1 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval CREATE TABLE tt_2 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval CREATE TABLE tt_3 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval CREATE TABLE tt_4 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval CREATE TABLE tt_5 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
eval CREATE TABLE tt_6 (trans_id INT, stmt_id INT, info VARCHAR(64), PRIMARY KEY(trans_id, stmt_id)) ENGINE = $engine_type;
|
||||
SET SQL_LOG_BIN=1;
|
||||
|
||||
connection master;
|
||||
|
||||
INSERT INTO nt_1(trans_id, stmt_id) VALUES(1,1);
|
||||
INSERT INTO nt_2(trans_id, stmt_id) VALUES(1,1);
|
||||
INSERT INTO nt_3(trans_id, stmt_id) VALUES(1,1);
|
||||
INSERT INTO nt_4(trans_id, stmt_id) VALUES(1,1);
|
||||
INSERT INTO nt_5(trans_id, stmt_id) VALUES(1,1);
|
||||
INSERT INTO nt_6(trans_id, stmt_id) VALUES(1,1);
|
||||
|
||||
INSERT INTO tt_1(trans_id, stmt_id) VALUES(1,1);
|
||||
INSERT INTO tt_2(trans_id, stmt_id) VALUES(1,1);
|
||||
INSERT INTO tt_3(trans_id, stmt_id) VALUES(1,1);
|
||||
INSERT INTO tt_4(trans_id, stmt_id) VALUES(1,1);
|
||||
INSERT INTO tt_5(trans_id, stmt_id) VALUES(1,1);
|
||||
INSERT INTO tt_6(trans_id, stmt_id) VALUES(1,1);
|
||||
|
||||
DELIMITER |;
|
||||
|
||||
CREATE PROCEDURE pc_i_tt_5_suc (IN p_trans_id INTEGER, IN p_stmt_id INTEGER)
|
||||
BEGIN
|
||||
DECLARE in_stmt_id INTEGER;
|
||||
SELECT max(stmt_id) INTO in_stmt_id FROM tt_5 WHERE trans_id= p_trans_id;
|
||||
SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id;
|
||||
INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id);
|
||||
INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1);
|
||||
END|
|
||||
|
||||
CREATE PROCEDURE pc_i_nt_5_suc (IN p_trans_id INTEGER, IN p_stmt_id INTEGER)
|
||||
BEGIN
|
||||
DECLARE in_stmt_id INTEGER;
|
||||
SELECT max(stmt_id) INTO in_stmt_id FROM nt_5 WHERE trans_id= p_trans_id;
|
||||
SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id;
|
||||
INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id);
|
||||
INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1);
|
||||
END|
|
||||
|
||||
CREATE FUNCTION fc_i_tt_5_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64)
|
||||
BEGIN
|
||||
DECLARE in_stmt_id INTEGER;
|
||||
SELECT max(stmt_id) INTO in_stmt_id FROM tt_5 WHERE trans_id= p_trans_id;
|
||||
SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id;
|
||||
INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id);
|
||||
INSERT INTO tt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1);
|
||||
RETURN "fc_i_tt_5_suc";
|
||||
END|
|
||||
|
||||
CREATE FUNCTION fc_i_nt_5_suc (p_trans_id INTEGER, p_stmt_id INTEGER) RETURNS VARCHAR(64)
|
||||
BEGIN
|
||||
DECLARE in_stmt_id INTEGER;
|
||||
SELECT max(stmt_id) INTO in_stmt_id FROM nt_5 WHERE trans_id= p_trans_id;
|
||||
SELECT COALESCE(greatest(in_stmt_id + 1, p_stmt_id), 1) INTO in_stmt_id;
|
||||
INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id);
|
||||
INSERT INTO nt_5(trans_id, stmt_id) VALUES (p_trans_id, in_stmt_id + 1);
|
||||
RETURN "fc_i_nt_5_suc";
|
||||
END|
|
||||
|
||||
CREATE TRIGGER tr_i_tt_3_to_nt_3 AFTER INSERT ON tt_3 FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE in_stmt_id INTEGER;
|
||||
SELECT max(stmt_id) INTO in_stmt_id FROM nt_3 WHERE trans_id= NEW.trans_id;
|
||||
SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id;
|
||||
INSERT INTO nt_3(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id);
|
||||
INSERT INTO nt_3(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1);
|
||||
END|
|
||||
|
||||
CREATE TRIGGER tr_i_nt_4_to_tt_4 AFTER INSERT ON nt_4 FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE in_stmt_id INTEGER;
|
||||
SELECT max(stmt_id) INTO in_stmt_id FROM tt_4 WHERE trans_id= NEW.trans_id;
|
||||
SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id;
|
||||
INSERT INTO tt_4(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id);
|
||||
INSERT INTO tt_4(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1);
|
||||
END|
|
||||
|
||||
CREATE TRIGGER tr_i_tt_5_to_tt_6 AFTER INSERT ON tt_5 FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE in_stmt_id INTEGER;
|
||||
SELECT max(stmt_id) INTO in_stmt_id FROM tt_6 WHERE trans_id= NEW.trans_id;
|
||||
SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id, 1), 1) INTO in_stmt_id;
|
||||
INSERT INTO tt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id);
|
||||
INSERT INTO tt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1);
|
||||
END|
|
||||
|
||||
CREATE TRIGGER tr_i_nt_5_to_nt_6 AFTER INSERT ON nt_5 FOR EACH ROW
|
||||
BEGIN
|
||||
DECLARE in_stmt_id INTEGER;
|
||||
SELECT max(stmt_id) INTO in_stmt_id FROM nt_6 WHERE trans_id= NEW.trans_id;
|
||||
SELECT COALESCE(greatest(in_stmt_id + 1, NEW.stmt_id), 1) INTO in_stmt_id;
|
||||
INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id);
|
||||
INSERT INTO nt_6(trans_id, stmt_id) VALUES (NEW.trans_id, in_stmt_id + 1);
|
||||
END|
|
||||
|
||||
DELIMITER ;|
|
||||
|
||||
let $pos_trans_command= query_get_value("SHOW MASTER STATUS", Position, 1);
|
||||
|
||||
let $trans_id= 7;
|
||||
let $tb_id= 1;
|
||||
let $stmt_id= 1;
|
||||
let $commands= '';
|
||||
|
||||
SET @commands= '';
|
||||
}
|
||||
|
||||
if (`SELECT HEX(@commands) = HEX('clean')`)
|
||||
{
|
||||
connection master;
|
||||
|
||||
DROP TABLE tt_1;
|
||||
DROP TABLE tt_2;
|
||||
DROP TABLE tt_3;
|
||||
DROP TABLE tt_4;
|
||||
DROP TABLE tt_5;
|
||||
DROP TABLE tt_6;
|
||||
|
||||
DROP TABLE nt_1;
|
||||
DROP TABLE nt_2;
|
||||
DROP TABLE nt_3;
|
||||
DROP TABLE nt_4;
|
||||
DROP TABLE nt_5;
|
||||
DROP TABLE nt_6;
|
||||
|
||||
DROP PROCEDURE pc_i_tt_5_suc;
|
||||
DROP PROCEDURE pc_i_nt_5_suc;
|
||||
DROP FUNCTION fc_i_tt_5_suc;
|
||||
DROP FUNCTION fc_i_nt_5_suc;
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
SET @commands= '';
|
||||
}
|
||||
|
||||
while (`SELECT HEX(@commands) != HEX('')`)
|
||||
{
|
||||
--disable_query_log
|
||||
SET @command= SUBSTRING_INDEX(@commands, ' ', 1);
|
||||
let $command= `SELECT @command`;
|
||||
--eval SET @check_commands= '$commands'
|
||||
if (`SELECT HEX(@check_commands) = HEX('''')`)
|
||||
{
|
||||
let $commands= `SELECT @commands`;
|
||||
}
|
||||
--echo -b-b-b-b-b-b-b-b-b-b-b- >> $command << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
let $pos_command= query_get_value("SHOW MASTER STATUS", Position, 1);
|
||||
--enable_query_log
|
||||
if (`SELECT HEX(@command) = HEX('B')`)
|
||||
{
|
||||
eval BEGIN;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('T')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval INSERT INTO tt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('T-trig')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval INSERT INTO tt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('T-func')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval SELECT fc_i_tt_5_suc ($trans_id, $stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('T-proc')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval CALL pc_i_tt_5_suc ($trans_id, $stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('eT')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from tt_1`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from tt_1 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO tt_1(trans_id, stmt_id) VALUES ($old_trans_id, $old_stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Te')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from tt_1`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from tt_1 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO tt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Te-trig')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from tt_5`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from tt_5 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO tt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Te-func')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from tt_1`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from tt_1 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO tt_1(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_tt_5_suc ($trans_id, $stmt_id));
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('N')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval INSERT INTO nt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('N-trig')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval INSERT INTO nt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('N-func')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval SELECT fc_i_nt_5_suc ($trans_id, $stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('N-proc')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval CALL pc_i_nt_5_suc ($trans_id, $stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('eN')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from nt_1`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from nt_1 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO nt_1(trans_id, stmt_id) VALUES ($old_trans_id, $old_stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Ne')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from nt_1`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from nt_1 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO nt_1(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Ne-trig')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from nt_5`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from nt_5 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO nt_5(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('Ne-func')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from nt_1`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from nt_1 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO nt_1(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_nt_5_suc ($trans_id, $stmt_id));
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('tN')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval INSERT INTO nt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM tt_1;
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('tNe')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from nt_1`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from nt_1 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO nt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM tt_1 UNION SELECT $old_trans_id, $old_stmt_id, COUNT(*) FROM tt_1;
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('nT')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval INSERT INTO tt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM nt_1;
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('nTe')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from tt_1`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from tt_1 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO tt_1(trans_id, stmt_id, info) SELECT $trans_id, $stmt_id, COUNT(*) FROM nt_1 UNION SELECT $old_trans_id, $old_stmt_id, COUNT(*) FROM nt_1;
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('NT')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval UPDATE nt_3, tt_3 SET nt_3.info= "new text $trans_id --> $stmt_id", tt_3.info= "new text $trans_id --> $stmt_id" where nt_3.trans_id = tt_3.trans_id and tt_3.trans_id = 1;
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('NT-trig')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval INSERT INTO nt_4(trans_id, stmt_id) VALUES ($trans_id, $stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('NT-func')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval INSERT INTO nt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, fc_i_tt_5_suc($trans_id, $stmt_id));
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('NeT-trig')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from nt_4`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from nt_4 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO nt_4(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('NeT-func')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from nt_5`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from nt_5 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO nt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_tt_5_suc ($trans_id, $stmt_id));
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('TN')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval UPDATE tt_4, nt_4 SET tt_4.info= "new text $trans_id --> $stmt_id", nt_4.info= "new text $trans_id --> $stmt_id" where nt_4.trans_id = tt_4.trans_id and tt_4.trans_id = 1;
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('TN-trig')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval INSERT INTO tt_3(trans_id, stmt_id) VALUES ($trans_id, $stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('TN-func')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
eval INSERT INTO tt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, fc_i_nt_5_suc($trans_id, $stmt_id));
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('TeN-trig')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from tt_3`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from tt_3 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO tt_3(trans_id, stmt_id) VALUES ($trans_id, $stmt_id), ($old_trans_id, $old_stmt_id);
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('TeN-func')`)
|
||||
{
|
||||
#--echo DEBUG-- (trans_id, stmt_id) --> ($trans_id, $stmt_id)
|
||||
let $old_trans_id= `SELECT max(trans_id) from tt_5`;
|
||||
let $old_stmt_id= `SELECT max(stmt_id) from tt_5 where trans_id= $old_trans_id`;
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
eval INSERT INTO tt_5(trans_id, stmt_id, info) VALUES ($trans_id, $stmt_id, ''), ($old_trans_id, $old_stmt_id, fc_i_nt_5_suc ($trans_id, $stmt_id));
|
||||
inc $stmt_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('CS-T->T')`)
|
||||
{
|
||||
--eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=$engine_type SELECT * FROM tt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('CS-N->N')`)
|
||||
{
|
||||
--eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM nt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('CS-T->N')`)
|
||||
{
|
||||
--eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=$engine_type SELECT * FROM nt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('CS-N->T')`)
|
||||
{
|
||||
--eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY(trans_id, stmt_id)) engine=MyIsam SELECT * FROM tt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('CSe-T->T')`)
|
||||
{
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
--eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=$engine_type SELECT stmt_id FROM tt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('CSe-N->N')`)
|
||||
{
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
--eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=MyIsam SELECT stmt_id FROM nt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('CSe-T->N')`)
|
||||
{
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
--eval CREATE TABLE tt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=$engine_type SELECT stmt_id FROM nt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('CSe-N->T')`)
|
||||
{
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
--eval CREATE TABLE nt_xx_$tb_id (PRIMARY KEY (stmt_id)) engine=MyIsam SELECT stmt_id FROM tt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('CT')`)
|
||||
{
|
||||
--eval CREATE TEMPORARY TABLE tt_xx_$tb_id (a int) engine=$engine_type;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('IS-T<-N')`)
|
||||
{
|
||||
--eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('ISe-T<-N')`)
|
||||
{
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
--eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('IS-N<-T')`)
|
||||
{
|
||||
--eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('ISe-N<-T')`)
|
||||
{
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
--eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('IS-T<-T')`)
|
||||
{
|
||||
--eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM tt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('ISe-T<-T')`)
|
||||
{
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
--eval INSERT INTO tt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM tt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('IS-N<-N')`)
|
||||
{
|
||||
--eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, stmt_id, USER() FROM nt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('ISe-N<-N')`)
|
||||
{
|
||||
--error ER_DUP_ENTRY, ER_DUP_KEY
|
||||
--eval INSERT INTO nt_xx_$tb_id(trans_id, stmt_id, info) SELECT trans_id, trans_id, USER() FROM nt_1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('trunc-CS-T')`)
|
||||
{
|
||||
eval TRUNCATE TABLE tt_xx_$tb_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('trunc-CS-N')`)
|
||||
{
|
||||
eval TRUNCATE TABLE nt_xx_$tb_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('trunc-CT')`)
|
||||
{
|
||||
eval TRUNCATE TABLE tt_xx_$tb_id;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('drop-CS')`)
|
||||
{
|
||||
--disable_warnings
|
||||
eval DROP TABLE IF EXISTS tt_xx_$tb_id, nt_xx_$tb_id;
|
||||
inc $tb_id;
|
||||
--enable_warnings
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('drop-CT')`)
|
||||
{
|
||||
--disable_warnings
|
||||
eval DROP TEMPORARY TABLE IF EXISTS tt_xx_$tb_id;
|
||||
inc $tb_id;
|
||||
--enable_warnings
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('C')`)
|
||||
{
|
||||
--error 0, ER_GET_ERRMSG
|
||||
eval COMMIT;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('R')`)
|
||||
{
|
||||
--error 0, ER_GET_ERRMSG
|
||||
eval ROLLBACK;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('S1')`)
|
||||
{
|
||||
eval SAVEPOINT s1;
|
||||
}
|
||||
if (`SELECT HEX(@command) = HEX('R1')`)
|
||||
{
|
||||
eval ROLLBACK TO s1;
|
||||
}
|
||||
--disable_query_log
|
||||
SET @commands= LTRIM(SUBSTRING(@commands, LENGTH(@command) + 1));
|
||||
inc $stmt_id;
|
||||
|
||||
let $binlog_start= $pos_command;
|
||||
--source include/show_binlog_events.inc
|
||||
--echo -e-e-e-e-e-e-e-e-e-e-e- >> $command << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
if (`SELECT HEX(@commands) = HEX('')`)
|
||||
{
|
||||
let $binlog_start= $pos_trans_command;
|
||||
--echo -b-b-b-b-b-b-b-b-b-b-b- >> $commands << -b-b-b-b-b-b-b-b-b-b-b-
|
||||
--source include/show_binlog_events.inc
|
||||
--echo -e-e-e-e-e-e-e-e-e-e-e- >> $commands << -e-e-e-e-e-e-e-e-e-e-e-
|
||||
--echo
|
||||
let $pos_trans_command= query_get_value("SHOW MASTER STATUS", Position, 1);
|
||||
let $stmt_id= 1;
|
||||
inc $trans_id;
|
||||
let $commands= '';
|
||||
}
|
||||
}
|
@ -18,6 +18,8 @@
|
||||
# Vs slave. #
|
||||
#############################################################################
|
||||
|
||||
CALL mtr.add_suppression('Statement may not be safe to log in statement format.');
|
||||
|
||||
# Begin clean up test section
|
||||
connection master;
|
||||
--disable_warnings
|
||||
@ -43,10 +45,12 @@ RETURN tmp;
|
||||
END|
|
||||
delimiter ;|
|
||||
|
||||
--disable_warnings
|
||||
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
||||
sleep 6;
|
||||
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
||||
sleep 6;
|
||||
--enable_warnings
|
||||
|
||||
#Select in this test are used for debugging
|
||||
#select * from test.t1;
|
||||
@ -56,7 +60,9 @@ sleep 6;
|
||||
connection master;
|
||||
SET AUTOCOMMIT=0;
|
||||
START TRANSACTION;
|
||||
--disable_warnings
|
||||
INSERT INTO test.t1 VALUES (null,test.f1());
|
||||
--enable_warnings
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=1;
|
||||
#select * from test.t1;
|
||||
|
86
mysql-test/extra/rpl_tests/rpl_set_null.test
Normal file
86
mysql-test/extra/rpl_tests/rpl_set_null.test
Normal file
@ -0,0 +1,86 @@
|
||||
# Both of the following tests check that comparison of binlog BI
|
||||
# against SE record will not fail due to remains from previous values
|
||||
# in the SE record (before a given field was set to null).
|
||||
#
|
||||
# In MIXED mode:
|
||||
# - Insert and update are executed as statements
|
||||
# - Delete is executed as a row event
|
||||
# - Assertion: checks that comparison will not fail because the update
|
||||
# statement will clear the record contents for the nulled
|
||||
# field. If data was not cleared, some engines may keep
|
||||
# the value and return it later as garbage - despite the
|
||||
# fact that field is null. This may cause slave to
|
||||
# falsely fail in the comparison (memcmp would fail
|
||||
# because of "garbage" in record data).
|
||||
#
|
||||
# In ROW mode:
|
||||
# - Insert, update and delete are executed as row events.
|
||||
# - Assertion: checks that comparison will not fail because the update
|
||||
# rows event will clear the record contents before
|
||||
# feeding the new value to the SE. This protects against
|
||||
# SEs that do not clear record contents when storing
|
||||
# nulled fields. If the engine did not clear the data it
|
||||
# would cause slave to falsely fail in the comparison
|
||||
# (memcmp would fail because of "garbage" in record
|
||||
# data). This scenario is pretty much the same described
|
||||
# above in MIXED mode, but checks different execution
|
||||
# path in the slave.
|
||||
|
||||
# BUG#49481: RBR: MyISAM and bit fields may cause slave to stop on
|
||||
# delete cant find record
|
||||
|
||||
-- source include/master-slave-reset.inc
|
||||
|
||||
-- connection master
|
||||
-- eval CREATE TABLE t1 (c1 BIT, c2 INT) Engine=$engine
|
||||
INSERT INTO `t1` VALUES ( 1, 1 );
|
||||
UPDATE t1 SET c1=NULL where c2=1;
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- let $diff_table_1=master:test.t1
|
||||
-- let $diff_table_2=slave:test.t1
|
||||
-- source include/diff_tables.inc
|
||||
|
||||
-- connection master
|
||||
# triggers switch to row mode when on mixed
|
||||
DELETE FROM t1 WHERE c2=1 LIMIT 1;
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- let $diff_table_1=master:test.t1
|
||||
-- let $diff_table_2=slave:test.t1
|
||||
-- source include/diff_tables.inc
|
||||
|
||||
-- connection master
|
||||
DROP TABLE t1;
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- source include/master-slave-reset.inc
|
||||
|
||||
-- connection master
|
||||
|
||||
# BUG#49482: RBR: Replication may break on deletes when MyISAM tables
|
||||
# + char field are used
|
||||
|
||||
-- eval CREATE TABLE t1 (c1 CHAR) Engine=$engine
|
||||
|
||||
INSERT INTO t1 ( c1 ) VALUES ( 'w' ) ;
|
||||
SELECT * FROM t1;
|
||||
UPDATE t1 SET c1=NULL WHERE c1='w';
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- let $diff_table_1=master:test.t1
|
||||
-- let $diff_table_2=slave:test.t1
|
||||
-- source include/diff_tables.inc
|
||||
|
||||
-- connection master
|
||||
# triggers switch to row mode when on mixed
|
||||
DELETE FROM t1 LIMIT 2;
|
||||
-- sync_slave_with_master
|
||||
|
||||
-- let $diff_table_1=master:test.t1
|
||||
-- let $diff_table_2=slave:test.t1
|
||||
-- source include/diff_tables.inc
|
||||
|
||||
-- connection master
|
||||
DROP TABLE t1;
|
||||
-- sync_slave_with_master
|
159
mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test
Normal file
159
mysql-test/extra/rpl_tests/rpl_tmp_table_and_DDL.test
Normal file
@ -0,0 +1,159 @@
|
||||
#
|
||||
# This test verify if executing DDL statement before trying to manipulate
|
||||
# a temporary table causes row-based replication to break with error 'table
|
||||
# does not exist'.
|
||||
#
|
||||
|
||||
# CREATE TABLE when a temporary table is open.
|
||||
CREATE TEMPORARY TABLE t1 (a INT);
|
||||
EVAL CREATE TABLE t2 (a INT, b INT) ENGINE= $ENGINE_TYPE;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# CREATE EVENT when a temporary table is open.
|
||||
CREATE EVENT e1 ON SCHEDULE EVERY 10 HOUR DO SELECT 1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# ALTER EVENT when a temporary table is open.
|
||||
ALTER EVENT e1 ON SCHEDULE EVERY 20 HOUR DO SELECT 1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# DROP EVENT when a temporary table is open.
|
||||
DROP EVENT IF EXISTS e1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# CREATE PROCEDURE when a temporary table is open.
|
||||
CREATE PROCEDURE p1() SELECT 1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# Alter PROCEDURE when a temporary table is open.
|
||||
ALTER PROCEDURE p1 SQL SECURITY INVOKER;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# CREATE FUNCTION when a temporary table is open.
|
||||
CREATE FUNCTION f1() RETURNS INT RETURN 123;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# ALTER FUNCTION when a temporary table is open.
|
||||
ALTER FUNCTION f1 SQL SECURITY INVOKER;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# CREATE DATABASE when a temporary table is open.
|
||||
CREATE DATABASE mysqltest1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# DROP DATABASE when a temporary table is open.
|
||||
DROP DATABASE mysqltest1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# CREATE USER when a temporary table is open.
|
||||
CREATE USER test_1@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# GRANT select on table to user when a temporary table is open.
|
||||
GRANT SELECT ON t2 TO test_1@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# GRANT all on function to user when a temporary table is open.
|
||||
GRANT ALL ON f1 TO test_1@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# GRANT all on procedure to user when a temporary table is open.
|
||||
GRANT ALL ON p1 TO test_1@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# GRANT usage on *.* to user when a temporary table is open.
|
||||
GRANT USAGE ON *.* TO test_1@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# REVOKE ALL PRIVILEGES on function to user when a temporary table is open.
|
||||
REVOKE ALL PRIVILEGES ON f1 FROM test_1@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# REVOKE ALL PRIVILEGES on procedure to user when a temporary table is open.
|
||||
REVOKE ALL PRIVILEGES ON p1 FROM test_1@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# REVOKE ALL PRIVILEGES on table to user when a temporary table is open.
|
||||
REVOKE ALL PRIVILEGES ON t2 FROM test_1@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# REVOKE usage on *.* from user when a temporary table is open.
|
||||
REVOKE USAGE ON *.* FROM test_1@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# RENAME USER when a temporary table is open.
|
||||
RENAME USER test_1@localhost TO test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# DROP USER when a temporary table is open.
|
||||
DROP USER test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# Test ACL statement in sub statement
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE p2()
|
||||
BEGIN
|
||||
# CREATE USER when a temporary table is open.
|
||||
CREATE TEMPORARY TABLE t3 (a INT);
|
||||
CREATE USER test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# GRANT select on table to user when a temporary table is open.
|
||||
GRANT SELECT ON t2 TO test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# GRANT all on function to user when a temporary table is open.
|
||||
GRANT ALL ON f1 TO test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# GRANT all on procedure to user when a temporary table is open.
|
||||
GRANT ALL ON p1 TO test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# GRANT usage on *.* to user when a temporary table is open.
|
||||
GRANT USAGE ON *.* TO test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# REVOKE ALL PRIVILEGES on function to user when a temporary table is open.
|
||||
REVOKE ALL PRIVILEGES ON f1 FROM test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# REVOKE ALL PRIVILEGES on procedure to user when a temporary table is open.
|
||||
REVOKE ALL PRIVILEGES ON p1 FROM test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# REVOKE ALL PRIVILEGES on table to user when a temporary table is open.
|
||||
REVOKE ALL PRIVILEGES ON t2 FROM test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# REVOKE usage on *.* from user when a temporary table is open.
|
||||
REVOKE USAGE ON *.* FROM test_2@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# RENAME USER when a temporary table is open.
|
||||
RENAME USER test_2@localhost TO test_3@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# DROP USER when a temporary table is open.
|
||||
DROP USER test_3@localhost;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
DROP TEMPORARY TABLE t3;
|
||||
END |
|
||||
DELIMITER ;|
|
||||
|
||||
# DROP PROCEDURE when a temporary table is open.
|
||||
DROP PROCEDURE p1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
DROP PROCEDURE p2;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# DROP FUNCTION when a temporary table is open.
|
||||
DROP FUNCTION f1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
# DROP TABLE when a temporary table is open.
|
||||
DROP TABLE t2;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
DROP TEMPORARY TABLE t1;
|
||||
|
22
mysql-test/include/binlog_inject_error.inc
Normal file
22
mysql-test/include/binlog_inject_error.inc
Normal file
@ -0,0 +1,22 @@
|
||||
#
|
||||
# === Name
|
||||
#
|
||||
# binlog_inject_error.inc
|
||||
#
|
||||
# === Description
|
||||
#
|
||||
# Inject binlog write error when running the query, verifies that the
|
||||
# query is ended with the proper error (ER_ERROR_ON_WRITE).
|
||||
#
|
||||
# === Usage
|
||||
#
|
||||
# let query= 'CREATE TABLE t1 (a INT)';
|
||||
# source include/binlog_inject_error.inc;
|
||||
#
|
||||
|
||||
SET GLOBAL debug='d,injecting_fault_writing';
|
||||
--echo $query;
|
||||
--replace_regex /(errno: .*)/(errno: #)/
|
||||
--error ER_ERROR_ON_WRITE
|
||||
--eval $query
|
||||
SET GLOBAL debug='';
|
@ -52,7 +52,7 @@ if (`SELECT '$debug_lock' != ''`)
|
||||
|
||||
# reap the result of the waiting query
|
||||
connection $connection_name;
|
||||
error 0, 1317, 1307, 1306, 1334, 1305;
|
||||
error 0, 1317, 1307, 1306, 1334, 1305, 1034;
|
||||
reap;
|
||||
|
||||
connection master;
|
||||
|
@ -69,7 +69,22 @@ let $_fake_relay_log_purge= `SELECT @@global.relay_log_purge`;
|
||||
# Create relay log file.
|
||||
copy_file $fake_relay_log $_fake_relay_log;
|
||||
# Create relay log index.
|
||||
--exec echo $_fake_filename-fake.000001 > $_fake_relay_index
|
||||
|
||||
if (`SELECT LENGTH(@@secure_file_priv) > 0`)
|
||||
{
|
||||
-- let $_file_priv_dir= `SELECT @@secure_file_priv`;
|
||||
-- let $_suffix= `SELECT UUID()`
|
||||
-- let $_tmp_file= $_file_priv_dir/fake-index.$_suffix
|
||||
|
||||
-- eval select '$_fake_filename-fake.000001\n' into dumpfile '$_tmp_file'
|
||||
-- copy_file $_tmp_file $_fake_relay_index
|
||||
-- remove_file $_tmp_file
|
||||
}
|
||||
|
||||
if (`SELECT LENGTH(@@secure_file_priv) = 0`)
|
||||
{
|
||||
-- eval select '$_fake_filename-fake.000001\n' into dumpfile '$_fake_relay_index'
|
||||
}
|
||||
|
||||
# Setup replication from existing relay log.
|
||||
eval CHANGE MASTER TO MASTER_HOST='dummy.localdomain', RELAY_LOG_FILE='$_fake_filename-fake.000001', RELAY_LOG_POS=4;
|
||||
|
16
mysql-test/include/truncate_file.inc
Normal file
16
mysql-test/include/truncate_file.inc
Normal file
@ -0,0 +1,16 @@
|
||||
# truncate a giving file, all contents of the file are be cleared
|
||||
|
||||
if (`SELECT 'x$file' = 'x'`)
|
||||
{
|
||||
--echo Please assign a file name to $file!!
|
||||
exit;
|
||||
}
|
||||
|
||||
let TRUNCATE_FILE= $file;
|
||||
|
||||
perl;
|
||||
use Env;
|
||||
Env::import('TRUNCATE_FILE');
|
||||
open FILE, '>', $TRUNCATE_FILE || die "Can not open file $file";
|
||||
close FILE;
|
||||
EOF
|
@ -384,9 +384,9 @@ sub kill {
|
||||
|
||||
|
||||
sub _collect {
|
||||
my ($self)= @_;
|
||||
my ($self, $exit_code)= @_;
|
||||
|
||||
$self->{EXIT_STATUS}= $?;
|
||||
$self->{EXIT_STATUS}= $exit_code;
|
||||
_verbose("_collect: $self");
|
||||
|
||||
# Take the process out of running list
|
||||
@ -453,6 +453,7 @@ sub wait_one {
|
||||
#_verbose("blocking: $blocking, use_alarm: $use_alarm");
|
||||
|
||||
my $retpid;
|
||||
my $exit_code;
|
||||
eval
|
||||
{
|
||||
# alarm should break the wait
|
||||
@ -461,6 +462,7 @@ sub wait_one {
|
||||
alarm($timeout) if $use_alarm;
|
||||
|
||||
$retpid= waitpid($pid, $blocking ? 0 : &WNOHANG);
|
||||
$exit_code= $?;
|
||||
|
||||
alarm(0) if $use_alarm;
|
||||
};
|
||||
@ -492,7 +494,7 @@ sub wait_one {
|
||||
#warn "wait_one: expected pid $pid but got $retpid"
|
||||
# unless( $retpid == $pid );
|
||||
|
||||
$self->_collect();
|
||||
$self->_collect($exit_code);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -505,6 +507,8 @@ sub wait_one {
|
||||
#
|
||||
sub wait_any {
|
||||
my $ret_pid;
|
||||
my $exit_code;
|
||||
|
||||
if (IS_WIN32PERL) {
|
||||
# Can't wait for -1 => use a polling loop
|
||||
do {
|
||||
@ -514,6 +518,7 @@ sub wait_any {
|
||||
last if $pid == $ret_pid;
|
||||
}
|
||||
} while ($ret_pid == 0);
|
||||
$exit_code= $?;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -523,6 +528,7 @@ sub wait_any {
|
||||
print STDERR "wait_any, got invalid pid: $ret_pid\n";
|
||||
return undef;
|
||||
}
|
||||
$exit_code= $?;
|
||||
}
|
||||
|
||||
# Look it up in "running" table
|
||||
@ -532,7 +538,7 @@ sub wait_any {
|
||||
print STDERR "running: ". join(", ", keys(%running)). "\n";
|
||||
return undef;
|
||||
}
|
||||
$proc->_collect;
|
||||
$proc->_collect($exit_code);
|
||||
return $proc;
|
||||
}
|
||||
|
||||
|
@ -1117,14 +1117,16 @@ sub command_line_setup () {
|
||||
|
||||
if ( ! $opt_testcase_timeout )
|
||||
{
|
||||
$opt_testcase_timeout= $default_testcase_timeout;
|
||||
$opt_testcase_timeout=
|
||||
$ENV{MTR_TESTCASE_TIMEOUT} || $default_testcase_timeout;
|
||||
$opt_testcase_timeout*= 10 if $opt_valgrind;
|
||||
$opt_testcase_timeout*= 10 if ($opt_debug and $glob_win32);
|
||||
}
|
||||
|
||||
if ( ! $opt_suite_timeout )
|
||||
{
|
||||
$opt_suite_timeout= $default_suite_timeout;
|
||||
$opt_suite_timeout=
|
||||
$ENV{MTR_SUITE_TIMEOUT} || $default_suite_timeout;
|
||||
$opt_suite_timeout*= 6 if $opt_valgrind;
|
||||
$opt_suite_timeout*= 6 if ($opt_debug and $glob_win32);
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ my $path_config_file; # The generated config file, var/my.cnf
|
||||
# executables will be used by the test suite.
|
||||
our $opt_vs_config = $ENV{'MTR_VS_CONFIG'};
|
||||
|
||||
my $DEFAULT_SUITES= "main,binlog,federated,rpl,maria,parts";
|
||||
my $DEFAULT_SUITES= "main,binlog,federated,rpl,maria,parts,vcol";
|
||||
my $opt_suites;
|
||||
|
||||
our $opt_verbose= 0; # Verbose output, enable with --verbose
|
||||
@ -201,10 +201,10 @@ my $opt_mark_progress;
|
||||
|
||||
my $opt_sleep;
|
||||
|
||||
my $opt_testcase_timeout= 15; # 15 minutes
|
||||
my $opt_suite_timeout = 360; # 6 hours
|
||||
my $opt_shutdown_timeout= 10; # 10 seconds
|
||||
my $opt_start_timeout = 180; # 180 seconds
|
||||
my $opt_testcase_timeout= $ENV{MTR_TESTCASE_TIMEOUT} || 15; # minutes
|
||||
my $opt_suite_timeout = $ENV{MTR_SUITE_TIMEOUT} || 360; # minutes
|
||||
my $opt_shutdown_timeout= $ENV{MTR_SHUTDOWN_TIMEOUT} || 10; # seconds
|
||||
my $opt_start_timeout = $ENV{MTR_START_TIMEOUT} || 180; # seconds
|
||||
|
||||
sub testcase_timeout { return $opt_testcase_timeout * 60; };
|
||||
sub suite_timeout { return $opt_suite_timeout * 60; };
|
||||
@ -4018,6 +4018,8 @@ sub extract_warning_lines ($) {
|
||||
qr/Error reading packet/,
|
||||
qr/Slave: Can't drop database.* database doesn't exist/,
|
||||
qr/Slave: Operation DROP USER failed for 'create_rout_db'/,
|
||||
qr|Checking table: '\./mtr/test_suppressions'|,
|
||||
qr|mysqld: Table '\./mtr/test_suppressions' is marked as crashed and should be repaired|
|
||||
);
|
||||
|
||||
my $matched_lines= [];
|
||||
@ -4100,7 +4102,7 @@ sub start_check_warnings ($$) {
|
||||
error => $errfile,
|
||||
output => $errfile,
|
||||
args => \$args,
|
||||
user_data => $errfile,
|
||||
user_data => [$errfile, $mysqld],
|
||||
verbose => $opt_verbose,
|
||||
);
|
||||
mtr_verbose("Started $proc");
|
||||
@ -4146,7 +4148,7 @@ sub check_warnings ($) {
|
||||
if ( delete $started{$proc->pid()} ) {
|
||||
# One check warning process returned
|
||||
my $res= $proc->exit_status();
|
||||
my $err_file= $proc->user_data();
|
||||
my ($err_file, $mysqld)= @{$proc->user_data()};
|
||||
|
||||
if ( $res == 0 or $res == 62 ){
|
||||
|
||||
@ -4182,7 +4184,8 @@ sub check_warnings ($) {
|
||||
my $report= mtr_grab_file($err_file);
|
||||
$tinfo->{comment}.=
|
||||
"Could not execute 'check-warnings' for ".
|
||||
"testcase '$tname' (res: $res):\n";
|
||||
"testcase '$tname' (res: $res) server: '".
|
||||
$mysqld->name() .":\n";
|
||||
$tinfo->{comment}.= $report;
|
||||
|
||||
$result= 2;
|
||||
|
@ -1245,4 +1245,11 @@ ALTER TABLE t1 CHANGE COLUMN f1 f1_no_real_change TIMESTAMP NULL DEFAULT NULL;
|
||||
affected rows: 0
|
||||
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #31145: ALTER TABLE DROP COLUMN, ADD COLUMN crashes (linux)
|
||||
# or freezes (win) the server
|
||||
#
|
||||
CREATE TABLE t1 (a TEXT, id INT, b INT);
|
||||
ALTER TABLE t1 DROP COLUMN a, ADD COLUMN c TEXT FIRST;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
4
mysql-test/r/bug46080.result
Normal file → Executable file
4
mysql-test/r/bug46080.result
Normal file → Executable file
@ -2,8 +2,8 @@
|
||||
# Bug #46080: group_concat(... order by) crashes server when
|
||||
# sort_buffer_size cannot allocate
|
||||
#
|
||||
call mtr.add_suppression("Out of memory at line .*, 'my_alloc.c'");
|
||||
call mtr.add_suppression("needed .* byte .*k., memory in use: .* bytes .*k");
|
||||
call mtr.add_suppression("Out of memory at line .*, '.*my_alloc.c'");
|
||||
call mtr.add_suppression("needed .* byte (.*k)., memory in use: .* bytes (.*k)");
|
||||
CREATE TABLE t1(a CHAR(255));
|
||||
INSERT INTO t1 VALUES ('a');
|
||||
SET @@SESSION.sort_buffer_size=5*16*1000000;
|
||||
|
@ -40,6 +40,26 @@ select t2.isbn,city,t1.libname,count(distinct t1.libname) as a from t3 left join
|
||||
isbn city libname a
|
||||
007 Berkeley Berkeley Public1 2
|
||||
000 New York New York Public Libra 2
|
||||
select t2.isbn,city,@bar:=t1.libname,count(distinct t1.libname) as a
|
||||
from t3 left join t1 on t3.libname=t1.libname left join t2
|
||||
on t3.isbn=t2.isbn group by city having count(distinct
|
||||
t1.libname) > 1;
|
||||
isbn city @bar:=t1.libname a
|
||||
007 Berkeley Berkeley Public1 2
|
||||
000 New York New York Public Libra 2
|
||||
SELECT @bar;
|
||||
@bar
|
||||
Berkeley Public2
|
||||
select t2.isbn,city,concat(@bar:=t1.libname),count(distinct t1.libname) as a
|
||||
from t3 left join t1 on t3.libname=t1.libname left join t2
|
||||
on t3.isbn=t2.isbn group by city having count(distinct
|
||||
t1.libname) > 1;
|
||||
isbn city concat(@bar:=t1.libname) a
|
||||
007 Berkeley Berkeley Public1 2
|
||||
000 New York New York Public Libra 2
|
||||
SELECT @bar;
|
||||
@bar
|
||||
Berkeley Public2
|
||||
drop table t1, t2, t3;
|
||||
create table t1 (f1 int);
|
||||
insert into t1 values (1);
|
||||
|
@ -820,16 +820,13 @@ i
|
||||
drop table t1;
|
||||
create temporary table t1 (j int);
|
||||
create table if not exists t1 select 1;
|
||||
Warnings:
|
||||
Note 1050 Table 't1' already exists
|
||||
select * from t1;
|
||||
j
|
||||
1
|
||||
drop temporary table t1;
|
||||
select * from t1;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
1
|
||||
1
|
||||
drop table t1;
|
||||
ERROR 42S02: Unknown table 't1'
|
||||
create table t1 (i int);
|
||||
insert into t1 values (1), (2);
|
||||
lock tables t1 read;
|
||||
|
@ -116,6 +116,26 @@ select binary 'a a' > 'a', binary 'a \0' > 'a', binary 'a\0' > 'a';
|
||||
binary 'a a' > 'a' binary 'a \0' > 'a' binary 'a\0' > 'a'
|
||||
1 1 1
|
||||
SET CHARACTER SET koi8r;
|
||||
create table t1 (a varchar(2) character set ucs2 collate ucs2_bin, key(a));
|
||||
insert into t1 values ('A'),('A'),('B'),('C'),('D'),('A\t');
|
||||
insert into t1 values ('A\0'),('A\0'),('A\0'),('A\0'),('AZ');
|
||||
select hex(a) from t1 where a like 'A_' order by a;
|
||||
hex(a)
|
||||
00410000
|
||||
00410000
|
||||
00410000
|
||||
00410000
|
||||
00410009
|
||||
0041005A
|
||||
select hex(a) from t1 ignore key(a) where a like 'A_' order by a;
|
||||
hex(a)
|
||||
00410000
|
||||
00410000
|
||||
00410000
|
||||
00410000
|
||||
00410009
|
||||
0041005A
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (word VARCHAR(64) CHARACTER SET ucs2, word2 CHAR(64) CHARACTER SET ucs2);
|
||||
INSERT INTO t1 VALUES (_koi8r'ò',_koi8r'ò'), (X'2004',X'2004');
|
||||
SELECT hex(word) FROM t1 ORDER BY word;
|
||||
|
@ -1850,6 +1850,24 @@ select hex(_utf8 B'001111111111');
|
||||
ERROR HY000: Invalid utf8 character string: 'FF'
|
||||
select (_utf8 X'616263FF');
|
||||
ERROR HY000: Invalid utf8 character string: 'FF'
|
||||
#
|
||||
# Bug#44131 Binary-mode "order by" returns records in incorrect order for UTF-8 strings
|
||||
#
|
||||
CREATE TABLE t1 (id int not null primary key, name varchar(10)) character set utf8;
|
||||
INSERT INTO t1 VALUES
|
||||
(2,'一二三01'),(3,'一二三09'),(4,'一二三02'),(5,'一二三08'),
|
||||
(6,'一二三11'),(7,'一二三91'),(8,'一二三21'),(9,'一二三81');
|
||||
SELECT * FROM t1 ORDER BY BINARY(name);
|
||||
id name
|
||||
2 一二三01
|
||||
4 一二三02
|
||||
5 一二三08
|
||||
3 一二三09
|
||||
6 一二三11
|
||||
8 一二三21
|
||||
9 一二三81
|
||||
7 一二三91
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT NOT NULL, b INT NOT NULL);
|
||||
INSERT INTO t1 VALUES (70000, 1092), (70001, 1085), (70002, 1065);
|
||||
SELECT CONVERT(a, CHAR), CONVERT(b, CHAR) FROM t1 GROUP BY b;
|
||||
|
@ -337,3 +337,16 @@ END |
|
||||
DELETE IGNORE FROM t1;
|
||||
ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #49552 : sql_buffer_result cause crash + not found records
|
||||
# in multitable delete/subquery
|
||||
#
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
SET SESSION SQL_BUFFER_RESULT=1;
|
||||
DELETE t1 FROM (SELECT SUM(a) a FROM t1) x,t1;
|
||||
SET SESSION SQL_BUFFER_RESULT=DEFAULT;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -1,4 +1,4 @@
|
||||
drop table if exists t1;
|
||||
drop table if exists t1,t2;
|
||||
create table t1 (
|
||||
a int not null references t2,
|
||||
b int not null references t2 (c),
|
||||
@ -13,3 +13,30 @@ foreign key (a,b) references t3 (c,d) on update set null);
|
||||
create index a on t1 (a);
|
||||
create unique index b on t1 (a,b);
|
||||
drop table t1;
|
||||
create table t1 (id int primary key) engine = innodb;
|
||||
create table t2 (id int PRIMARY KEY, FOREIGN KEY (id) REFERENCES t1(id)) engine=innodb;
|
||||
insert into t1 values (1), (2), (3), (4), (5), (6);
|
||||
insert into t2 values (3), (5);
|
||||
delete from t1;
|
||||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
|
||||
select * from t1;
|
||||
id
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
delete ignore from t1;
|
||||
Warnings:
|
||||
Error 1451 Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
|
||||
Error 1451 Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`))
|
||||
select row_count();
|
||||
row_count()
|
||||
-1
|
||||
select * from t1;
|
||||
id
|
||||
3
|
||||
5
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
|
@ -560,6 +560,20 @@ MATCH (col) AGAINST('findme')
|
||||
DEALLOCATE PREPARE s;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #49250 : spatial btree index corruption and crash
|
||||
# Part two : fulltext syntax check
|
||||
#
|
||||
CREATE TABLE t1(col1 TEXT,
|
||||
FULLTEXT INDEX USING BTREE (col1));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE (col1))' at line 2
|
||||
CREATE TABLE t2(col1 TEXT);
|
||||
CREATE FULLTEXT INDEX USING BTREE ON t2(col);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE ON t2(col)' at line 1
|
||||
ALTER TABLE t2 ADD FULLTEXT INDEX USING BTREE (col1);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE (col1)' at line 1
|
||||
DROP TABLE t2;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug #47930: MATCH IN BOOLEAN MODE returns too many results
|
||||
# inside subquery
|
||||
#
|
||||
@ -597,4 +611,12 @@ WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE)
|
||||
count(*)
|
||||
0
|
||||
DROP TABLE t1,t2,t3;
|
||||
#
|
||||
# Bug #49445: Assertion failed: 0, file .\item_row.cc, line 55 with
|
||||
# fulltext search and row op
|
||||
#
|
||||
CREATE TABLE t1(a CHAR(1),FULLTEXT(a));
|
||||
SELECT 1 FROM t1 WHERE MATCH(a) AGAINST ('') AND ROW(a,a) > ROW(1,1);
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -126,7 +126,7 @@ group by
|
||||
a.text, b.id, b.betreff
|
||||
order by
|
||||
match(b.betreff) against ('+abc' in boolean mode) desc;
|
||||
ERROR 42S22: Unknown column 'b.betreff' in 'order clause'
|
||||
ERROR 42000: Incorrect usage/placement of 'MATCH()'
|
||||
select a.text, b.id, b.betreff
|
||||
from
|
||||
t2 a inner join t3 b on a.id = b.forum inner join
|
||||
@ -142,7 +142,7 @@ where
|
||||
match(c.beitrag) against ('+abc' in boolean mode)
|
||||
order by
|
||||
match(b.betreff) against ('+abc' in boolean mode) desc;
|
||||
ERROR 42S22: Unknown column 'b.betreff' in 'order clause'
|
||||
ERROR 42000: Incorrect usage/placement of 'MATCH()'
|
||||
select a.text, b.id, b.betreff
|
||||
from
|
||||
t2 a inner join t3 b on a.id = b.forum inner join
|
||||
@ -158,7 +158,7 @@ where
|
||||
match(c.beitrag) against ('+abc' in boolean mode)
|
||||
order by
|
||||
match(betreff) against ('+abc' in boolean mode) desc;
|
||||
text id betreff
|
||||
ERROR 42000: Incorrect usage/placement of 'MATCH()'
|
||||
(select b.id, b.betreff from t3 b) union
|
||||
(select b.id, b.betreff from t3 b)
|
||||
order by match(betreff) against ('+abc' in boolean mode) desc;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE TABLE t1 ( number INT NOT NULL, alpha CHAR(6) NOT NULL );
|
||||
INSERT INTO t1 VALUES (1413006,'idlfmv'),
|
||||
(1413065,'smpsfz'),(1413127,'sljrhx'),(1413304,'qerfnd');
|
||||
@ -119,4 +120,14 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index NULL PRIMARY 102 NULL 3 Using index
|
||||
1 SIMPLE t1 eq_ref PRIMARY,a PRIMARY 318 func,const,const 1
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug #50096: CONCAT_WS inside procedure returning wrong data
|
||||
#
|
||||
CREATE PROCEDURE p1(a varchar(255), b int, c int)
|
||||
SET @query = CONCAT_WS(",", a, b, c);
|
||||
CALL p1("abcde", "0", "1234");
|
||||
SELECT @query;
|
||||
@query
|
||||
abcde,0,1234
|
||||
DROP PROCEDURE p1;
|
||||
# End of 5.1 tests
|
||||
|
@ -2558,3 +2558,32 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2 Using join buffer
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 2
|
||||
drop table t1;
|
||||
#
|
||||
# Bug#49141: Encode function is significantly slower in 5.1 compared to 5.0
|
||||
#
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1 (a VARCHAR(20), b INT);
|
||||
CREATE TABLE t2 (a VARCHAR(20), b INT);
|
||||
INSERT INTO t1 VALUES ('ABC', 1);
|
||||
INSERT INTO t2 VALUES ('ABC', 1);
|
||||
SELECT DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), t2.a)
|
||||
FROM t1,t2 WHERE t1.b = t1.b > 0 GROUP BY t2.b;
|
||||
DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), t2.a)
|
||||
secret
|
||||
SELECT DECODE((SELECT ENCODE('secret', 'ABC') FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), t2.a)
|
||||
FROM t1,t2 WHERE t1.b = t1.b > 0 GROUP BY t2.b;
|
||||
DECODE((SELECT ENCODE('secret', 'ABC') FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), t2.a)
|
||||
secret
|
||||
SELECT DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), 'ABC')
|
||||
FROM t1,t2 WHERE t1.b = t1.b > 0 GROUP BY t2.b;
|
||||
DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b), 'ABC')
|
||||
secret
|
||||
TRUNCATE TABLE t1;
|
||||
TRUNCATE TABLE t2;
|
||||
INSERT INTO t1 VALUES ('EDF', 3), ('BCD', 2), ('ABC', 1);
|
||||
INSERT INTO t2 VALUES ('EDF', 3), ('BCD', 2), ('ABC', 1);
|
||||
SELECT DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b LIMIT 1), t2.a)
|
||||
FROM t2 WHERE t2.b = 1 GROUP BY t2.b;
|
||||
DECODE((SELECT ENCODE('secret', t1.a) FROM t1,t2 WHERE t1.a = t2.a GROUP BY t1.b LIMIT 1), t2.a)
|
||||
secret
|
||||
DROP TABLE t1, t2;
|
||||
|
@ -682,7 +682,7 @@ select timestampadd(SQL_TSI_FRAC_SECOND, 1, date) from t1;
|
||||
timestampadd(SQL_TSI_FRAC_SECOND, 1, date)
|
||||
2003-01-02 00:00:00.000001
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead
|
||||
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
|
||||
select timestampdiff(MONTH, '2001-02-01', '2001-05-01') as a;
|
||||
a
|
||||
3
|
||||
@ -717,7 +717,7 @@ select timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05
|
||||
a
|
||||
7689538999999
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead
|
||||
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
|
||||
select timestampdiff(SQL_TSI_DAY, '1986-02-01', '1986-03-01') as a1,
|
||||
timestampdiff(SQL_TSI_DAY, '1900-02-01', '1900-03-01') as a2,
|
||||
timestampdiff(SQL_TSI_DAY, '1996-02-01', '1996-03-01') as a3,
|
||||
@ -1088,7 +1088,7 @@ timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead
|
||||
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
|
||||
Note 1003 select timestampdiff(WEEK,'2001-02-01','2001-05-01') AS `a1`,timestampdiff(SECOND_FRAC,'2001-02-01 12:59:59.120000','2001-05-01 12:58:58.119999') AS `a2`
|
||||
select time_format('100:00:00', '%H %k %h %I %l');
|
||||
time_format('100:00:00', '%H %k %h %I %l')
|
||||
@ -1287,12 +1287,12 @@ SELECT TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18');
|
||||
TIMESTAMPADD(FRAC_SECOND, 1, '2008-02-18')
|
||||
2008-02-18 00:00:00.000001
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead
|
||||
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
|
||||
SELECT TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18');
|
||||
TIMESTAMPDIFF(FRAC_SECOND, '2008-02-17', '2008-02-18')
|
||||
86400000000
|
||||
Warnings:
|
||||
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 6.2. Please use MICROSECOND instead
|
||||
Warning 1287 The syntax 'FRAC_SECOND' is deprecated and will be removed in MySQL 5.6. Please use MICROSECOND instead
|
||||
SELECT DATE_ADD('2008-02-18', INTERVAL 1 FRAC_SECOND);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FRAC_SECOND)' at line 1
|
||||
SELECT DATE_SUB('2008-02-18', INTERVAL 1 FRAC_SECOND);
|
||||
|
@ -984,6 +984,19 @@ GEOMFROMTEXT(
|
||||
SELECT 1 FROM t1 WHERE a <> (SELECT GEOMETRYCOLLECTIONFROMWKB(b) FROM t1);
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #49250 : spatial btree index corruption and crash
|
||||
# Part one : spatial syntax check
|
||||
#
|
||||
CREATE TABLE t1(col1 MULTIPOLYGON NOT NULL,
|
||||
SPATIAL INDEX USING BTREE (col1));
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE (col1))' at line 2
|
||||
CREATE TABLE t2(col1 MULTIPOLYGON NOT NULL);
|
||||
CREATE SPATIAL INDEX USING BTREE ON t2(col);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE ON t2(col)' at line 1
|
||||
ALTER TABLE t2 ADD SPATIAL INDEX USING BTREE (col1);
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USING BTREE (col1)' at line 1
|
||||
DROP TABLE t2;
|
||||
End of 5.0 tests
|
||||
create table t1 (f1 tinyint(1), f2 char(1), f3 varchar(1), f4 geometry, f5 datetime);
|
||||
create view v1 as select * from t1;
|
||||
|
@ -1399,7 +1399,7 @@ who
|
||||
other connection here
|
||||
SELECT IF(`time` > 0, 'OK', `time`) AS time_low,
|
||||
IF(`time` < 1000, 'OK', `time`) AS time_high,
|
||||
IF(time_ms > 1500, 'OK', time_ms) AS time_ms_low,
|
||||
IF(time_ms >= 1000, 'OK', time_ms) AS time_ms_low,
|
||||
IF(time_ms < 1000000, 'OK', time_ms) AS time_ms_high
|
||||
FROM INFORMATION_SCHEMA.PROCESSLIST
|
||||
WHERE ID=@tid;
|
||||
@ -1630,4 +1630,26 @@ SET TIMESTAMP=@@TIMESTAMP + 10000000;
|
||||
SELECT 'NOT_OK' AS TEST_RESULT FROM INFORMATION_SCHEMA.PROCESSLIST WHERE time < 0;
|
||||
TEST_RESULT
|
||||
SET TIMESTAMP=DEFAULT;
|
||||
#
|
||||
# Bug #50276: Security flaw in INFORMATION_SCHEMA.TABLES
|
||||
#
|
||||
CREATE DATABASE db1;
|
||||
USE db1;
|
||||
CREATE TABLE t1 (id INT);
|
||||
CREATE USER nonpriv;
|
||||
USE test;
|
||||
# connected as nonpriv
|
||||
# Should return 0
|
||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='t1';
|
||||
COUNT(*)
|
||||
0
|
||||
USE INFORMATION_SCHEMA;
|
||||
# Should return 0
|
||||
SELECT COUNT(*) FROM TABLES WHERE TABLE_NAME='t1';
|
||||
COUNT(*)
|
||||
0
|
||||
# connected as root
|
||||
DROP USER nonpriv;
|
||||
DROP TABLE db1.t1;
|
||||
DROP DATABASE db1;
|
||||
End of 5.1 tests.
|
||||
|
30
mysql-test/r/innodb-autoinc-44030.result
Normal file
30
mysql-test/r/innodb-autoinc-44030.result
Normal file
@ -0,0 +1,30 @@
|
||||
drop table if exists t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
INSERT INTO t1 VALUES (null);
|
||||
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
|
||||
SELECT * FROM t1;
|
||||
d1
|
||||
1
|
||||
2
|
||||
SELECT * FROM t1;
|
||||
d1
|
||||
1
|
||||
2
|
||||
INSERT INTO t1 VALUES(null);
|
||||
Got one of the listed errors
|
||||
ALTER TABLE t1 AUTO_INCREMENT = 3;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`d1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
d1
|
||||
1
|
||||
2
|
||||
3
|
||||
DROP TABLE t1;
|
@ -868,35 +868,6 @@ Got one of the listed errors
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
CREATE TABLE t1 (c1 INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (null);
|
||||
INSERT INTO t1 VALUES (null);
|
||||
ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
|
||||
SELECT * FROM t1;
|
||||
d1
|
||||
1
|
||||
2
|
||||
SELECT * FROM t1;
|
||||
d1
|
||||
1
|
||||
2
|
||||
INSERT INTO t1 VALUES(null);
|
||||
Got one of the listed errors
|
||||
ALTER TABLE t1 AUTO_INCREMENT = 3;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`d1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES(null);
|
||||
SELECT * FROM t1;
|
||||
d1
|
||||
1
|
||||
2
|
||||
3
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
@ -1111,43 +1082,43 @@ c1 c2
|
||||
3 innodb
|
||||
4 NULL
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE T1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) AUTO_INCREMENT=10 ENGINE=InnoDB;
|
||||
CREATE INDEX i1 on T1(c2);
|
||||
SHOW CREATE TABLE T1;
|
||||
CREATE TABLE t1 (c1 INT AUTO_INCREMENT, c2 INT, PRIMARY KEY(c1)) AUTO_INCREMENT=10 ENGINE=InnoDB;
|
||||
CREATE INDEX i1 on t1(c2);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
T1 CREATE TABLE `T1` (
|
||||
t1 CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`c2` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`),
|
||||
KEY `i1` (`c2`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1
|
||||
INSERT INTO T1 (c2) values (0);
|
||||
SELECT * FROM T1;
|
||||
INSERT INTO t1 (c2) values (0);
|
||||
SELECT * FROM t1;
|
||||
c1 c2
|
||||
10 0
|
||||
DROP TABLE T1;
|
||||
CREATE TABLE T1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO T1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
|
||||
INSERT INTO T1(C2) VALUES ('innodb');
|
||||
SHOW CREATE TABLE T1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
|
||||
INSERT INTO t1(C2) VALUES ('innodb');
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
T1 CREATE TABLE `T1` (
|
||||
t1 CREATE TABLE `t1` (
|
||||
`C1` double NOT NULL AUTO_INCREMENT,
|
||||
`C2` char(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`C1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
|
||||
DROP TABLE T1;
|
||||
CREATE TABLE T1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO T1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
|
||||
INSERT INTO T1(C2) VALUES ('innodb');
|
||||
SHOW CREATE TABLE T1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
|
||||
INSERT INTO t1(C2) VALUES ('innodb');
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
T1 CREATE TABLE `T1` (
|
||||
t1 CREATE TABLE `t1` (
|
||||
`C1` float NOT NULL AUTO_INCREMENT,
|
||||
`C2` char(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`C1`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
|
||||
DROP TABLE T1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 SET c1 = 1;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
@ -1254,3 +1254,38 @@ SELECT * FROM t1 LEFT JOIN t2 ON e<>0 WHERE c=1 AND d<=>NULL;
|
||||
c e d
|
||||
1 0 NULL
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug#47650: using group by with rollup without indexes returns incorrect
|
||||
# results with where
|
||||
#
|
||||
CREATE TABLE t1 ( a INT );
|
||||
INSERT INTO t1 VALUES (1);
|
||||
CREATE TABLE t2 ( a INT, b INT );
|
||||
INSERT INTO t2 VALUES (1, 1),(1, 2),(1, 3),(2, 4),(2, 5);
|
||||
EXPLAIN
|
||||
SELECT t1.a, COUNT( t2.b ), SUM( t2.b ), MAX( t2.b )
|
||||
FROM t1 LEFT JOIN t2 USING( a )
|
||||
GROUP BY t1.a WITH ROLLUP;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 Using temporary; Using filesort
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 5
|
||||
SELECT t1.a, COUNT( t2.b ), SUM( t2.b ), MAX( t2.b )
|
||||
FROM t1 LEFT JOIN t2 USING( a )
|
||||
GROUP BY t1.a WITH ROLLUP;
|
||||
a COUNT( t2.b ) SUM( t2.b ) MAX( t2.b )
|
||||
1 3 6 3
|
||||
NULL 3 6 3
|
||||
EXPLAIN
|
||||
SELECT t1.a, COUNT( t2.b ), SUM( t2.b ), MAX( t2.b )
|
||||
FROM t1 JOIN t2 USING( a )
|
||||
GROUP BY t1.a WITH ROLLUP;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 Using filesort
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 5 Using where
|
||||
SELECT t1.a, COUNT( t2.b ), SUM( t2.b ), MAX( t2.b )
|
||||
FROM t1 JOIN t2 USING( a )
|
||||
GROUP BY t1.a WITH ROLLUP;
|
||||
a COUNT( t2.b ) SUM( t2.b ) MAX( t2.b )
|
||||
1 3 6 3
|
||||
NULL 3 6 3
|
||||
DROP TABLE t1, t2;
|
||||
|
@ -1853,6 +1853,21 @@ CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #49465: valgrind warnings and incorrect live checksum...
|
||||
#
|
||||
CREATE TABLE t1(
|
||||
a VARCHAR(1), b VARCHAR(1), c VARCHAR(1),
|
||||
f VARCHAR(1), g VARCHAR(1), h VARCHAR(1),
|
||||
i VARCHAR(1), j VARCHAR(1), k VARCHAR(1)) CHECKSUM=1;
|
||||
INSERT INTO t1 VALUES('', '', '', '', '', '', '', '', '');
|
||||
CHECKSUM TABLE t1 QUICK;
|
||||
Table Checksum
|
||||
test.t1 467455460
|
||||
CHECKSUM TABLE t1 EXTENDED;
|
||||
Table Checksum
|
||||
test.t1 467455460
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
create table t1 (a int not null, key `a` (a) key_block_size=1024);
|
||||
show create table t1;
|
||||
|
@ -229,4 +229,10 @@ a: b
|
||||
</row>
|
||||
</resultset>
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
||||
Bug #47147: mysql client option --skip-column-names does not apply to vertical output
|
||||
|
||||
*************************** 1. row ***************************
|
||||
1
|
||||
|
||||
End of tests
|
||||
|
@ -127,3 +127,45 @@ mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
set GLOBAL sql_mode=default;
|
||||
#
|
||||
# Bug #41569 mysql_upgrade (ver 5.1) add 3 fields to mysql.proc table
|
||||
# but does not set values.
|
||||
#
|
||||
CREATE PROCEDURE testproc() BEGIN END;
|
||||
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
|
||||
UPDATE mysql.proc SET collation_connection = NULL WHERE name LIKE 'testproc';
|
||||
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
|
||||
mtr.global_suppressions OK
|
||||
mtr.test_suppressions OK
|
||||
mysql.columns_priv OK
|
||||
mysql.db OK
|
||||
mysql.event OK
|
||||
mysql.func OK
|
||||
mysql.general_log
|
||||
Error : You can't use locks with log tables.
|
||||
status : OK
|
||||
mysql.help_category OK
|
||||
mysql.help_keyword OK
|
||||
mysql.help_relation OK
|
||||
mysql.help_topic OK
|
||||
mysql.host OK
|
||||
mysql.ndb_binlog_index OK
|
||||
mysql.plugin OK
|
||||
mysql.proc OK
|
||||
mysql.procs_priv OK
|
||||
mysql.servers OK
|
||||
mysql.slow_log
|
||||
Error : You can't use locks with log tables.
|
||||
status : OK
|
||||
mysql.tables_priv OK
|
||||
mysql.time_zone OK
|
||||
mysql.time_zone_leap_second OK
|
||||
mysql.time_zone_name OK
|
||||
mysql.time_zone_transition OK
|
||||
mysql.time_zone_transition_type OK
|
||||
mysql.user OK
|
||||
CALL testproc();
|
||||
DROP PROCEDURE testproc;
|
||||
WARNING: NULL values of the 'character_set_client' column ('mysql.proc' table) have been updated with a default value (latin1). Please verify if necessary.
|
||||
WARNING: NULL values of the 'collation_connection' column ('mysql.proc' table) have been updated with a default value (latin1_swedish_ci). Please verify if necessary.
|
||||
WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been updated with default values. Please verify if necessary.
|
||||
|
@ -44,16 +44,16 @@ SET TIMESTAMP=1000000000/*!*/;
|
||||
insert into t2 values ()
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||
/*!*/;
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
@ -93,6 +93,7 @@ ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
|
||||
--- --position --
|
||||
Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead.
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||
DELIMITER /*!*/;
|
||||
@ -144,16 +145,16 @@ SET TIMESTAMP=1000000000/*!*/;
|
||||
insert into t2 values ()
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (word)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`word`)
|
||||
/*!*/;
|
||||
DELIMITER ;
|
||||
# End of log file
|
||||
@ -193,6 +194,7 @@ ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
|
||||
--- --position --
|
||||
Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead.
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||
DELIMITER /*!*/;
|
||||
@ -233,6 +235,7 @@ DELIMITER ;
|
||||
# End of log file
|
||||
ROLLBACK /* added by mysqlbinlog */;
|
||||
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
|
||||
Warning: The option '--position' is deprecated and will be removed in a future release. Please use --start-position instead.
|
||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||
DELIMITER /*!*/;
|
||||
@ -359,29 +362,29 @@ SET @@session.collation_database=DEFAULT/*!*/;
|
||||
create table t1 (a varchar(64) character set utf8)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.collation_database=7/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.collation_database=DEFAULT/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-#-#' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.collation_database=7/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
SET @@session.collation_database=DEFAULT/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO TABLE `t1` FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (a)
|
||||
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO TABLE `t1` CHARACTER SET koi8r FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`a`)
|
||||
/*!*/;
|
||||
SET TIMESTAMP=1000000000/*!*/;
|
||||
drop table t1
|
||||
|
@ -3,10 +3,8 @@ create table t1(f1 int);
|
||||
insert into t1 values (5);
|
||||
grant select on test.* to ssl_user1@localhost require SSL;
|
||||
grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
|
||||
grant select on test.* to ssl_user3@localhost require cipher
|
||||
"DHE-RSA-AES256-SHA" AND SUBJECT "/C=FI/ST=Tuusula/O=Monty Program Ab/emailAddress=abstract.developer@askmonty.org";
|
||||
grant select on test.* to ssl_user4@localhost require cipher
|
||||
"DHE-RSA-AES256-SHA" AND SUBJECT "/C=FI/ST=Tuusula/O=Monty Program Ab/emailAddress=abstract.developer@askmonty.org" ISSUER "/C=FI/ST=Tuusula/O=Monty Program Ab/emailAddress=abstract.developer@askmonty.org";
|
||||
grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB";
|
||||
grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
|
||||
grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
|
||||
flush privileges;
|
||||
connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET);
|
||||
|
@ -1463,6 +1463,15 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c;
|
||||
col
|
||||
1
|
||||
# Must use ref-or-null on the a_c index
|
||||
EXPLAIN
|
||||
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c DESC;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x x x ref_or_null a_c,a x x x x x
|
||||
# Must return 1 row
|
||||
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c DESC;
|
||||
col
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
CREATE TABLE t2 (a varchar(32), b int(11), c float, d double,
|
||||
|
@ -24,8 +24,8 @@ a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
b varchar(10),
|
||||
PRIMARY KEY (a)
|
||||
)
|
||||
PARTITION BY RANGE (to_days(a)) (
|
||||
PARTITION p1 VALUES LESS THAN (733407),
|
||||
PARTITION BY RANGE (UNIX_TIMESTAMP(a)) (
|
||||
PARTITION p1 VALUES LESS THAN (1199134800),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE
|
||||
);
|
||||
INSERT INTO t1 VALUES ('2007-07-30 17:35:48', 'p1');
|
||||
@ -37,7 +37,7 @@ a b
|
||||
2009-07-14 17:35:55 pmax
|
||||
2009-09-21 17:31:42 pmax
|
||||
ALTER TABLE t1 REORGANIZE PARTITION pmax INTO (
|
||||
PARTITION p3 VALUES LESS THAN (733969),
|
||||
PARTITION p3 VALUES LESS THAN (1247688000),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
@ -51,9 +51,9 @@ t1 CREATE TABLE `t1` (
|
||||
`b` varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (`a`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
/*!50100 PARTITION BY RANGE (to_days(a))
|
||||
(PARTITION p1 VALUES LESS THAN (733407) ENGINE = MyISAM,
|
||||
PARTITION p3 VALUES LESS THAN (733969) ENGINE = MyISAM,
|
||||
/*!50100 PARTITION BY RANGE (UNIX_TIMESTAMP(a))
|
||||
(PARTITION p1 VALUES LESS THAN (1199134800) ENGINE = MyISAM,
|
||||
PARTITION p3 VALUES LESS THAN (1247688000) ENGINE = MyISAM,
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
|
||||
DROP TABLE t1;
|
||||
create table t1 (a int NOT NULL, b varchar(5) NOT NULL)
|
||||
|
@ -126,7 +126,7 @@ ERROR HY000: This partition function is not allowed
|
||||
create table t1 (col1 date)
|
||||
partition by range(unix_timestamp(col1))
|
||||
(partition p0 values less than (10), partition p1 values less than (30));
|
||||
ERROR HY000: This partition function is not allowed
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
create table t1 (col1 datetime)
|
||||
partition by range(week(col1))
|
||||
(partition p0 values less than (10), partition p1 values less than (30));
|
||||
|
@ -138,7 +138,7 @@ primary key(a,b))
|
||||
partition by hash (rand(a))
|
||||
partitions 2
|
||||
(partition x1, partition x2);
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')
|
||||
partitions 2
|
||||
(partition x1, partition x2)' at line 6
|
||||
CREATE TABLE t1 (
|
||||
@ -149,7 +149,7 @@ primary key(a,b))
|
||||
partition by range (rand(a))
|
||||
partitions 2
|
||||
(partition x1 values less than (0), partition x2 values less than (2));
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')
|
||||
partitions 2
|
||||
(partition x1 values less than (0), partition x2 values less than' at line 6
|
||||
CREATE TABLE t1 (
|
||||
@ -160,7 +160,7 @@ primary key(a,b))
|
||||
partition by list (rand(a))
|
||||
partitions 2
|
||||
(partition x1 values in (1), partition x2 values in (2));
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')
|
||||
partitions 2
|
||||
(partition x1 values in (1), partition x2 values in (2))' at line 6
|
||||
CREATE TABLE t1 (
|
||||
@ -275,7 +275,7 @@ c int not null,
|
||||
primary key (a,b))
|
||||
partition by key (a)
|
||||
subpartition by hash (rand(a+b));
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 7
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')' at line 7
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
@ -372,7 +372,7 @@ partition by range (3+4)
|
||||
partitions 2
|
||||
(partition x1 values less than (4) tablespace ts1,
|
||||
partition x2 values less than (8) tablespace ts2);
|
||||
ERROR HY000: Constant/Random expression in (sub)partitioning function is not allowed
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
@ -542,7 +542,7 @@ partition by list (3+4)
|
||||
partitions 2
|
||||
(partition x1 values in (4) tablespace ts1,
|
||||
partition x2 values in (8) tablespace ts2);
|
||||
ERROR HY000: Constant/Random expression in (sub)partitioning function is not allowed
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
@ -634,13 +634,13 @@ partition by range (ascii(v))
|
||||
ERROR HY000: This partition function is not allowed
|
||||
create table t1 (a int)
|
||||
partition by hash (rand(a));
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')' at line 2
|
||||
create table t1 (a int)
|
||||
partition by hash(CURTIME() + a);
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')' at line 2
|
||||
create table t1 (a int)
|
||||
partition by hash (NOW()+a);
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')' at line 2
|
||||
create table t1 (a int)
|
||||
partition by hash (extract(hour from convert_tz(a, '+00:00', '+00:00')));
|
||||
ERROR HY000: This partition function is not allowed
|
||||
@ -651,3 +651,295 @@ ERROR HY000: This partition function is not allowed
|
||||
create table t1 (a char(10))
|
||||
partition by hash (extractvalue(a,'a'));
|
||||
ERROR HY000: This partition function is not allowed
|
||||
#
|
||||
# Bug #42849: innodb crash with varying time_zone on partitioned
|
||||
# timestamp primary key
|
||||
#
|
||||
CREATE TABLE old (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (UNIX_TIMESTAMP(a)) (
|
||||
PARTITION p VALUES LESS THAN (1219089600),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (a) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: The PARTITION function returns the wrong type
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (a) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: The PARTITION function returns the wrong type
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (a+0) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (a+0) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (a % 2) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (a % 2) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (ABS(a)) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (ABS(a)) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (CEILING(a)) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (CEILING(a)) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (FLOOR(a)) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (FLOOR(a)) (
|
||||
PARTITION p VALUES LESS THAN (20080819),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (TO_DAYS(a)) (
|
||||
PARTITION p VALUES LESS THAN (733638),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (TO_DAYS(a)) (
|
||||
PARTITION p VALUES LESS THAN (733638),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (DAYOFYEAR(a)) (
|
||||
PARTITION p VALUES LESS THAN (231),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (DAYOFYEAR(a)) (
|
||||
PARTITION p VALUES LESS THAN (231),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (DAYOFMONTH(a)) (
|
||||
PARTITION p VALUES LESS THAN (19),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (DAYOFMONTH(a)) (
|
||||
PARTITION p VALUES LESS THAN (19),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (DAYOFWEEK(a)) (
|
||||
PARTITION p VALUES LESS THAN (3),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (DAYOFWEEK(a)) (
|
||||
PARTITION p VALUES LESS THAN (3),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (MONTH(a)) (
|
||||
PARTITION p VALUES LESS THAN (8),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (MONTH(a)) (
|
||||
PARTITION p VALUES LESS THAN (8),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (HOUR(a)) (
|
||||
PARTITION p VALUES LESS THAN (17),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (HOUR(a)) (
|
||||
PARTITION p VALUES LESS THAN (17),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (MINUTE(a)) (
|
||||
PARTITION p VALUES LESS THAN (55),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (MINUTE(a)) (
|
||||
PARTITION p VALUES LESS THAN (55),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (QUARTER(a)) (
|
||||
PARTITION p VALUES LESS THAN (3),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (QUARTER(a)) (
|
||||
PARTITION p VALUES LESS THAN (3),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (SECOND(a)) (
|
||||
PARTITION p VALUES LESS THAN (7),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (SECOND(a)) (
|
||||
PARTITION p VALUES LESS THAN (7),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (YEARWEEK(a)) (
|
||||
PARTITION p VALUES LESS THAN (200833),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (YEARWEEK(a)) (
|
||||
PARTITION p VALUES LESS THAN (200833),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (YEAR(a)) (
|
||||
PARTITION p VALUES LESS THAN (2008),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (YEAR(a)) (
|
||||
PARTITION p VALUES LESS THAN (2008),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (WEEKDAY(a)) (
|
||||
PARTITION p VALUES LESS THAN (3),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (WEEKDAY(a)) (
|
||||
PARTITION p VALUES LESS THAN (3),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (TIME_TO_SEC(a)) (
|
||||
PARTITION p VALUES LESS THAN (64507),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (TIME_TO_SEC(a)) (
|
||||
PARTITION p VALUES LESS THAN (64507),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (EXTRACT(DAY FROM a)) (
|
||||
PARTITION p VALUES LESS THAN (18),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (EXTRACT(DAY FROM a)) (
|
||||
PARTITION p VALUES LESS THAN (18),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL, b TIMESTAMP NOT NULL, PRIMARY KEY(a,b))
|
||||
PARTITION BY RANGE (DATEDIFF(a, a)) (
|
||||
PARTITION p VALUES LESS THAN (18),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (DATEDIFF(a, a)) (
|
||||
PARTITION p VALUES LESS THAN (18),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (YEAR(a + 0)) (
|
||||
PARTITION p VALUES LESS THAN (2008),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (YEAR(a + 0)) (
|
||||
PARTITION p VALUES LESS THAN (2008),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (TO_DAYS(a + '2008-01-01')) (
|
||||
PARTITION p VALUES LESS THAN (733638),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (TO_DAYS(a + '2008-01-01')) (
|
||||
PARTITION p VALUES LESS THAN (733638),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP NOT NULL PRIMARY KEY)
|
||||
PARTITION BY RANGE (YEAR(a + '2008-01-01')) (
|
||||
PARTITION p VALUES LESS THAN (2008),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (YEAR(a + '2008-01-01')) (
|
||||
PARTITION p VALUES LESS THAN (2008),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old ADD COLUMN b DATE;
|
||||
CREATE TABLE new (a TIMESTAMP, b DATE)
|
||||
PARTITION BY RANGE (YEAR(a + b)) (
|
||||
PARTITION p VALUES LESS THAN (2008),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (YEAR(a + b)) (
|
||||
PARTITION p VALUES LESS THAN (2008),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP, b DATE)
|
||||
PARTITION BY RANGE (TO_DAYS(a + b)) (
|
||||
PARTITION p VALUES LESS THAN (733638),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (TO_DAYS(a + b)) (
|
||||
PARTITION p VALUES LESS THAN (733638),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP, b date)
|
||||
PARTITION BY RANGE (UNIX_TIMESTAMP(a + b)) (
|
||||
PARTITION p VALUES LESS THAN (1219089600),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (UNIX_TIMESTAMP(a + b)) (
|
||||
PARTITION p VALUES LESS THAN (1219089600),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE new (a TIMESTAMP, b TIMESTAMP)
|
||||
PARTITION BY RANGE (UNIX_TIMESTAMP(a + b)) (
|
||||
PARTITION p VALUES LESS THAN (1219089600),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
ALTER TABLE old MODIFY b TIMESTAMP;
|
||||
ALTER TABLE old
|
||||
PARTITION BY RANGE (UNIX_TIMESTAMP(a + b)) (
|
||||
PARTITION p VALUES LESS THAN (1219089600),
|
||||
PARTITION pmax VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
DROP TABLE old;
|
||||
End of 5.1 tests
|
||||
|
@ -274,3 +274,47 @@ CREATE TABLE t1 (a INT) ENGINE=InnoDB
|
||||
PARTITION BY list(a) (PARTITION p1 VALUES IN (1));
|
||||
CREATE INDEX i1 ON t1 (a);
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#47343: InnoDB fails to clean-up after lock wait timeout on
|
||||
# REORGANIZE PARTITION
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a INT,
|
||||
b DATE NOT NULL,
|
||||
PRIMARY KEY (a, b)
|
||||
) ENGINE=InnoDB
|
||||
PARTITION BY RANGE (a) (
|
||||
PARTITION pMAX VALUES LESS THAN MAXVALUE
|
||||
) ;
|
||||
INSERT INTO t1 VALUES (1, '2001-01-01'), (2, '2002-02-02'), (3, '2003-03-03');
|
||||
START TRANSACTION;
|
||||
SELECT * FROM t1 FOR UPDATE;
|
||||
a b
|
||||
1 2001-01-01
|
||||
2 2002-02-02
|
||||
3 2003-03-03
|
||||
# Connection con1
|
||||
ALTER TABLE t1 REORGANIZE PARTITION pMAX INTO
|
||||
(PARTITION p3 VALUES LESS THAN (3),
|
||||
PARTITION pMAX VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1205 Lock wait timeout exceeded; try restarting transaction
|
||||
ALTER TABLE t1 REORGANIZE PARTITION pMAX INTO
|
||||
(PARTITION p3 VALUES LESS THAN (3),
|
||||
PARTITION pMAX VALUES LESS THAN MAXVALUE);
|
||||
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Error 1205 Lock wait timeout exceeded; try restarting transaction
|
||||
t1.frm
|
||||
t1.par
|
||||
# Connection default
|
||||
SELECT * FROM t1;
|
||||
a b
|
||||
1 2001-01-01
|
||||
2 2002-02-02
|
||||
3 2003-03-03
|
||||
COMMIT;
|
||||
DROP TABLE t1;
|
||||
|
@ -1,4 +1,614 @@
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
#
|
||||
# Bug#49742: Partition Pruning not working correctly for RANGE
|
||||
#
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY)
|
||||
PARTITION BY RANGE (a) (
|
||||
PARTITION p0 VALUES LESS THAN (1),
|
||||
PARTITION p1 VALUES LESS THAN (2),
|
||||
PARTITION p2 VALUES LESS THAN (3),
|
||||
PARTITION p3 VALUES LESS THAN (4),
|
||||
PARTITION p4 VALUES LESS THAN (5),
|
||||
PARTITION p5 VALUES LESS THAN (6),
|
||||
PARTITION max VALUES LESS THAN MAXVALUE);
|
||||
INSERT INTO t1 VALUES (-1),(0),(1),(2),(3),(4),(5),(6),(7),(8);
|
||||
SELECT * FROM t1 WHERE a < 1;
|
||||
a
|
||||
-1
|
||||
0
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 2;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 3;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 4;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 5 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 5;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 6;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4,p5 index PRIMARY PRIMARY 4 NULL 7 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 7;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 7;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 1;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 2;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 3;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 4;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 5;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4,p5 index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 6;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 7;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 7;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4,p5,max range PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a = 1;
|
||||
a
|
||||
1
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1 system PRIMARY NULL NULL NULL 1
|
||||
SELECT * FROM t1 WHERE a = 2;
|
||||
a
|
||||
2
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2 system PRIMARY NULL NULL NULL 1
|
||||
SELECT * FROM t1 WHERE a = 3;
|
||||
a
|
||||
3
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p3 system PRIMARY NULL NULL NULL 1
|
||||
SELECT * FROM t1 WHERE a = 4;
|
||||
a
|
||||
4
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4 system PRIMARY NULL NULL NULL 1
|
||||
SELECT * FROM t1 WHERE a = 5;
|
||||
a
|
||||
5
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p5 system PRIMARY NULL NULL NULL 1
|
||||
SELECT * FROM t1 WHERE a = 6;
|
||||
a
|
||||
6
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max const PRIMARY PRIMARY 4 const 1 Using index
|
||||
SELECT * FROM t1 WHERE a = 7;
|
||||
a
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 7;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max const PRIMARY PRIMARY 4 const 1 Using index
|
||||
SELECT * FROM t1 WHERE a >= 1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1,p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 2;
|
||||
a
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 3;
|
||||
a
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 4;
|
||||
a
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 5;
|
||||
a
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 6;
|
||||
a
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 7;
|
||||
a
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 7;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 1;
|
||||
a
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2,p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 2;
|
||||
a
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p3,p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 3;
|
||||
a
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4,p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 4;
|
||||
a
|
||||
5
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p5,max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 5;
|
||||
a
|
||||
6
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 10 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 6;
|
||||
a
|
||||
7
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 7;
|
||||
a
|
||||
8
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 7;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY)
|
||||
PARTITION BY RANGE (a) (
|
||||
PARTITION p0 VALUES LESS THAN (1),
|
||||
PARTITION p1 VALUES LESS THAN (2),
|
||||
PARTITION p2 VALUES LESS THAN (3),
|
||||
PARTITION p3 VALUES LESS THAN (4),
|
||||
PARTITION p4 VALUES LESS THAN (5),
|
||||
PARTITION max VALUES LESS THAN MAXVALUE);
|
||||
INSERT INTO t1 VALUES (-1),(0),(1),(2),(3),(4),(5),(6),(7);
|
||||
SELECT * FROM t1 WHERE a < 1;
|
||||
a
|
||||
-1
|
||||
0
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 2;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 3 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 3;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 4 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 4;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 5 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 5;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 6 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a < 6;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 1;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1 index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 2;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2 index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 3;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3 index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 4;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4 index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 5;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a <= 6;
|
||||
a
|
||||
-1
|
||||
0
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p0,p1,p2,p3,p4,max range PRIMARY PRIMARY 4 NULL 8 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a = 1;
|
||||
a
|
||||
1
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1 system PRIMARY NULL NULL NULL 1
|
||||
SELECT * FROM t1 WHERE a = 2;
|
||||
a
|
||||
2
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2 system PRIMARY NULL NULL NULL 1
|
||||
SELECT * FROM t1 WHERE a = 3;
|
||||
a
|
||||
3
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p3 system PRIMARY NULL NULL NULL 1
|
||||
SELECT * FROM t1 WHERE a = 4;
|
||||
a
|
||||
4
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4 system PRIMARY NULL NULL NULL 1
|
||||
SELECT * FROM t1 WHERE a = 5;
|
||||
a
|
||||
5
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max const PRIMARY PRIMARY 4 const 1 Using index
|
||||
SELECT * FROM t1 WHERE a = 6;
|
||||
a
|
||||
6
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max const PRIMARY PRIMARY 4 const 1 Using index
|
||||
SELECT * FROM t1 WHERE a >= 1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p1,p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 2;
|
||||
a
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 3;
|
||||
a
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 4;
|
||||
a
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 5;
|
||||
a
|
||||
5
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a >= 6;
|
||||
a
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 1;
|
||||
a
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 1;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p2,p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 2;
|
||||
a
|
||||
3
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 2;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p3,p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 3;
|
||||
a
|
||||
4
|
||||
5
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 3;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 p4,max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 4;
|
||||
a
|
||||
5
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max index PRIMARY PRIMARY 4 NULL 9 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 5;
|
||||
a
|
||||
6
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 5;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
SELECT * FROM t1 WHERE a > 6;
|
||||
a
|
||||
7
|
||||
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > 6;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 max range PRIMARY PRIMARY 4 NULL 2 Using where; Using index
|
||||
DROP TABLE t1;
|
||||
# test of RANGE and index
|
||||
CREATE TABLE t1 (a DATE, KEY(a))
|
||||
PARTITION BY RANGE (TO_DAYS(a))
|
||||
@ -1816,7 +2426,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 p0,p4 ALL NULL NULL NULL NULL 910 Using where
|
||||
explain partitions select * from t2 where (a > 100 AND a < 600);
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 p0,p1,p2,p3 ALL NULL NULL NULL NULL 910 Using where
|
||||
1 SIMPLE t2 p0,p1,p2 ALL NULL NULL NULL NULL 910 Using where
|
||||
explain partitions select * from t2 where b = 4;
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 p0,p1,p2,p3,p4 ref b b 5 const 76 Using where
|
||||
|
@ -12,6 +12,15 @@ CREATE TABLE t1(a int) ENGINE=EXAMPLE;
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
DROP TABLE t1;
|
||||
set global example_ulong_var=500;
|
||||
set global example_enum_var= e1;
|
||||
show status like 'example%';
|
||||
Variable_name Value
|
||||
example_func_example enum_var is 0, ulong_var is 500, really
|
||||
show variables like 'example%';
|
||||
Variable_name Value
|
||||
example_enum_var e1
|
||||
example_ulong_var 500
|
||||
UNINSTALL PLUGIN example;
|
||||
UNINSTALL PLUGIN EXAMPLE;
|
||||
ERROR 42000: PLUGIN EXAMPLE does not exist
|
||||
|
@ -1917,6 +1917,53 @@ execute stmt using @arg;
|
||||
?
|
||||
-12345.5432100000
|
||||
deallocate prepare stmt;
|
||||
#
|
||||
# Bug#48508: Crash on prepared statement re-execution.
|
||||
#
|
||||
create table t1(b int);
|
||||
insert into t1 values (0);
|
||||
create view v1 AS select 1 as a from t1 where b;
|
||||
prepare stmt from "select * from v1 where a";
|
||||
execute stmt;
|
||||
a
|
||||
execute stmt;
|
||||
a
|
||||
deallocate prepare stmt;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
create table t1(a bigint);
|
||||
create table t2(b tinyint);
|
||||
insert into t2 values (null);
|
||||
prepare stmt from "select 1 from t1 join t2 on a xor b where b > 1 and a =1";
|
||||
execute stmt;
|
||||
1
|
||||
execute stmt;
|
||||
1
|
||||
deallocate prepare stmt;
|
||||
drop table t1,t2;
|
||||
#
|
||||
#
|
||||
# Bug #49570: Assertion failed: !(order->used & map)
|
||||
# on re-execution of prepared statement
|
||||
#
|
||||
CREATE TABLE t1(a INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES(0), (1);
|
||||
PREPARE stmt FROM
|
||||
"SELECT 1 FROM t1 JOIN t1 t2 USING(a) GROUP BY t2.a, t1.a";
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
1
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
1
|
||||
EXECUTE stmt;
|
||||
1
|
||||
1
|
||||
1
|
||||
DEALLOCATE PREPARE stmt;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests.
|
||||
create procedure proc_1() reset query cache;
|
||||
call proc_1();
|
||||
@ -2922,4 +2969,23 @@ execute stmt;
|
||||
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
|
||||
drop table t1;
|
||||
deallocate prepare stmt;
|
||||
#
|
||||
# Bug#49141: Encode function is significantly slower in 5.1 compared to 5.0
|
||||
#
|
||||
prepare encode from "select encode(?, ?) into @ciphertext";
|
||||
prepare decode from "select decode(?, ?) into @plaintext";
|
||||
set @str="abc", @key="cba";
|
||||
execute encode using @str, @key;
|
||||
execute decode using @ciphertext, @key;
|
||||
select @plaintext;
|
||||
@plaintext
|
||||
abc
|
||||
set @str="bcd", @key="dcb";
|
||||
execute encode using @str, @key;
|
||||
execute decode using @ciphertext, @key;
|
||||
select @plaintext;
|
||||
@plaintext
|
||||
bcd
|
||||
deallocate prepare encode;
|
||||
deallocate prepare decode;
|
||||
End of 5.1 tests.
|
||||
|
@ -1695,23 +1695,23 @@ SUCCESS
|
||||
drop table t2;
|
||||
create temporary table t2 (a int);
|
||||
execute stmt;
|
||||
ERROR 42S01: Table 't2' already exists
|
||||
call p_verify_reprepare_count(1);
|
||||
SUCCESS
|
||||
|
||||
execute stmt;
|
||||
ERROR 42S01: Table 't2' already exists
|
||||
call p_verify_reprepare_count(0);
|
||||
call p_verify_reprepare_count(1);
|
||||
SUCCESS
|
||||
|
||||
drop temporary table t2;
|
||||
execute stmt;
|
||||
call p_verify_reprepare_count(1);
|
||||
ERROR 42S01: Table 't2' already exists
|
||||
call p_verify_reprepare_count(0);
|
||||
SUCCESS
|
||||
|
||||
drop table t2;
|
||||
execute stmt;
|
||||
call p_verify_reprepare_count(0);
|
||||
call p_verify_reprepare_count(1);
|
||||
SUCCESS
|
||||
|
||||
drop table t2;
|
||||
|
@ -4440,6 +4440,154 @@ SELECT 1 FROM t2 JOIN t1 ON 1=1
|
||||
WHERE a != '1' AND NOT a >= b OR NOT ROW(b,a )<> ROW(a,a);
|
||||
1
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug #49199: Optimizer handles incorrectly:
|
||||
# field='const1' AND field='const2' in some cases
|
||||
|
||||
CREATE TABLE t1(a DATETIME NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
a
|
||||
2001-01-01 00:00:00
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a` from `test`.`t1` where 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a DATE NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
a
|
||||
2001-01-01
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01' AS `a` from `test`.`t1` where 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a TIMESTAMP NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
a
|
||||
2001-01-01 00:00:00
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a` from `test`.`t1` where 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
a b
|
||||
2001-01-01 00:00:00 2001-01-01
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a DATETIME NOT NULL, b VARCHAR(20) NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
a b
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 0
|
||||
SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2001-01-01';
|
||||
a b
|
||||
2001-01-01 00:00:00 2001-01-01
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2001-01-01';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
|
||||
SELECT x.a, y.a, z.a FROM t1 x
|
||||
JOIN t1 y ON x.a=y.a
|
||||
JOIN t1 z ON y.a=z.a
|
||||
WHERE x.a='2001-01-01' AND z.a='2001-01-01 00:00:00';
|
||||
a a a
|
||||
2001-01-01 00:00:00 2001-01-01 00:00:00 2001-01-01 00:00:00
|
||||
EXPLAIN EXTENDED SELECT x.a, y.a, z.a FROM t1 x
|
||||
JOIN t1 y ON x.a=y.a
|
||||
JOIN t1 z ON y.a=z.a
|
||||
WHERE x.a='2001-01-01' AND z.a='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE x system NULL NULL NULL NULL 1 100.00
|
||||
1 SIMPLE y system NULL NULL NULL NULL 1 100.00
|
||||
1 SIMPLE z system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a` from `test`.`t1` `x` join `test`.`t1` `y` join `test`.`t1` `z` where 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #49897: crash in ptr_compare when char(0) NOT NULL
|
||||
# column is used for ORDER BY
|
||||
#
|
||||
SET @old_sort_buffer_size= @@session.sort_buffer_size;
|
||||
SET @@sort_buffer_size= 40000;
|
||||
CREATE TABLE t1(a CHAR(0) NOT NULL);
|
||||
INSERT INTO t1 VALUES (0), (0), (0);
|
||||
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
|
||||
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
|
||||
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
|
||||
EXPLAIN SELECT a FROM t1 ORDER BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 24492
|
||||
SELECT a FROM t1 ORDER BY a;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int);
|
||||
INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1);
|
||||
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
|
||||
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
|
||||
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
|
||||
EXPLAIN SELECT a FROM t1 ORDER BY a LIMIT 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 24492
|
||||
SELECT a FROM t1 ORDER BY a LIMIT 5;
|
||||
a
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EXPLAIN SELECT * FROM t1 ORDER BY a, b LIMIT 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 24492
|
||||
SELECT * FROM t1 ORDER BY a, b LIMIT 5;
|
||||
a b c
|
||||
0
|
||||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
EXPLAIN SELECT * FROM t1 ORDER BY a, b, c LIMIT 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 24492 Using filesort
|
||||
SELECT * FROM t1 ORDER BY a, b, c LIMIT 5;
|
||||
a b c
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
EXPLAIN SELECT * FROM t1 ORDER BY c, a LIMIT 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 24492 Using filesort
|
||||
SELECT * FROM t1 ORDER BY c, a LIMIT 5;
|
||||
a b c
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
SET @@sort_buffer_size= @old_sort_buffer_size;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
create table t1(a INT, KEY (a));
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
|
||||
|
@ -4440,6 +4440,154 @@ SELECT 1 FROM t2 JOIN t1 ON 1=1
|
||||
WHERE a != '1' AND NOT a >= b OR NOT ROW(b,a )<> ROW(a,a);
|
||||
1
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# Bug #49199: Optimizer handles incorrectly:
|
||||
# field='const1' AND field='const2' in some cases
|
||||
|
||||
CREATE TABLE t1(a DATETIME NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
a
|
||||
2001-01-01 00:00:00
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a` from `test`.`t1` where 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a DATE NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
a
|
||||
2001-01-01
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01' AS `a` from `test`.`t1` where 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a TIMESTAMP NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
a
|
||||
2001-01-01 00:00:00
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a` from `test`.`t1` where 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
a b
|
||||
2001-01-01 00:00:00 2001-01-01
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a DATETIME NOT NULL, b VARCHAR(20) NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
|
||||
SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
a b
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01' AND a=b AND b='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 0
|
||||
SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2001-01-01';
|
||||
a b
|
||||
2001-01-01 00:00:00 2001-01-01
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a='2001-01-01 00:00:00' AND a=b AND b='2001-01-01';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01' AS `b` from `test`.`t1` where 1
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a DATETIME NOT NULL, b DATE NOT NULL);
|
||||
INSERT INTO t1 VALUES('2001-01-01', '2001-01-01');
|
||||
SELECT x.a, y.a, z.a FROM t1 x
|
||||
JOIN t1 y ON x.a=y.a
|
||||
JOIN t1 z ON y.a=z.a
|
||||
WHERE x.a='2001-01-01' AND z.a='2001-01-01 00:00:00';
|
||||
a a a
|
||||
2001-01-01 00:00:00 2001-01-01 00:00:00 2001-01-01 00:00:00
|
||||
EXPLAIN EXTENDED SELECT x.a, y.a, z.a FROM t1 x
|
||||
JOIN t1 y ON x.a=y.a
|
||||
JOIN t1 z ON y.a=z.a
|
||||
WHERE x.a='2001-01-01' AND z.a='2001-01-01 00:00:00';
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE x system NULL NULL NULL NULL 1 100.00
|
||||
1 SIMPLE y system NULL NULL NULL NULL 1 100.00
|
||||
1 SIMPLE z system NULL NULL NULL NULL 1 100.00
|
||||
Warnings:
|
||||
Note 1003 select '2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a`,'2001-01-01 00:00:00' AS `a` from `test`.`t1` `x` join `test`.`t1` `y` join `test`.`t1` `z` where 1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #49897: crash in ptr_compare when char(0) NOT NULL
|
||||
# column is used for ORDER BY
|
||||
#
|
||||
SET @old_sort_buffer_size= @@session.sort_buffer_size;
|
||||
SET @@sort_buffer_size= 40000;
|
||||
CREATE TABLE t1(a CHAR(0) NOT NULL);
|
||||
INSERT INTO t1 VALUES (0), (0), (0);
|
||||
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
|
||||
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
|
||||
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
|
||||
EXPLAIN SELECT a FROM t1 ORDER BY a;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 24492
|
||||
SELECT a FROM t1 ORDER BY a;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int);
|
||||
INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1);
|
||||
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
|
||||
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
|
||||
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
|
||||
EXPLAIN SELECT a FROM t1 ORDER BY a LIMIT 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 24492
|
||||
SELECT a FROM t1 ORDER BY a LIMIT 5;
|
||||
a
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
EXPLAIN SELECT * FROM t1 ORDER BY a, b LIMIT 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 24492
|
||||
SELECT * FROM t1 ORDER BY a, b LIMIT 5;
|
||||
a b c
|
||||
0
|
||||
2
|
||||
1
|
||||
0
|
||||
2
|
||||
EXPLAIN SELECT * FROM t1 ORDER BY a, b, c LIMIT 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 24492 Using filesort
|
||||
SELECT * FROM t1 ORDER BY a, b, c LIMIT 5;
|
||||
a b c
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
EXPLAIN SELECT * FROM t1 ORDER BY c, a LIMIT 5;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 24492 Using filesort
|
||||
SELECT * FROM t1 ORDER BY c, a LIMIT 5;
|
||||
a b c
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
SET @@sort_buffer_size= @old_sort_buffer_size;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
create table t1(a INT, KEY (a));
|
||||
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
|
||||
|
@ -12,3 +12,29 @@ a
|
||||
foo string
|
||||
drop function bug17615|
|
||||
drop table t3|
|
||||
SET NAMES utf8;
|
||||
DROP FUNCTION IF EXISTS bug48766;
|
||||
CREATE FUNCTION bug48766 ()
|
||||
RETURNS ENUM( 'w' ) CHARACTER SET ucs2
|
||||
RETURN 0;
|
||||
SHOW CREATE FUNCTION bug48766;
|
||||
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
||||
bug48766 CREATE DEFINER=`root`@`localhost` FUNCTION `bug48766`() RETURNS enum('w') CHARSET ucs2
|
||||
RETURN 0 utf8 utf8_general_ci latin1_swedish_ci
|
||||
SELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINES
|
||||
WHERE ROUTINE_NAME='bug48766';
|
||||
DTD_IDENTIFIER
|
||||
enum('w') CHARSET ucs2
|
||||
DROP FUNCTION bug48766;
|
||||
CREATE FUNCTION bug48766 ()
|
||||
RETURNS ENUM('а','б','в','г') CHARACTER SET ucs2
|
||||
RETURN 0;
|
||||
SHOW CREATE FUNCTION bug48766;
|
||||
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
||||
bug48766 CREATE DEFINER=`root`@`localhost` FUNCTION `bug48766`() RETURNS enum('а','б','в','г') CHARSET ucs2
|
||||
RETURN 0 utf8 utf8_general_ci latin1_swedish_ci
|
||||
SELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINES
|
||||
WHERE ROUTINE_NAME='bug48766';
|
||||
DTD_IDENTIFIER
|
||||
enum('а','б','в','г') CHARSET ucs2
|
||||
DROP FUNCTION bug48766;
|
||||
|
@ -6963,6 +6963,22 @@ CALL p1();
|
||||
CALL p1();
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( f1 integer, primary key (f1));
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
CREATE TEMPORARY TABLE t3 LIKE t1;
|
||||
CREATE PROCEDURE p1 () BEGIN SELECT f1 FROM t3 AS A WHERE A.f1 IN ( SELECT f1 FROM t3 ) ;
|
||||
END|
|
||||
CALL p1;
|
||||
ERROR HY000: Can't reopen table: 'A'
|
||||
CREATE VIEW t3 AS SELECT f1 FROM t2 A WHERE A.f1 IN ( SELECT f1 FROM t2 );
|
||||
DROP TABLE t3;
|
||||
CALL p1;
|
||||
f1
|
||||
CALL p1;
|
||||
f1
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1, t2;
|
||||
DROP VIEW t3;
|
||||
#
|
||||
# Bug #46629: Item_in_subselect::val_int(): Assertion `0'
|
||||
# on subquery inside a SP
|
||||
|
23
mysql-test/r/sp_sync.result
Normal file
23
mysql-test/r/sp_sync.result
Normal file
@ -0,0 +1,23 @@
|
||||
Tests of syncronization of stored procedure execution.
|
||||
#
|
||||
# Bug#48157: crash in Item_field::used_tables
|
||||
#
|
||||
CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b;
|
||||
CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b;
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
UPDATE t1 JOIN t2 USING( a, b ) SET t1.b = 1, t2.b = 1;
|
||||
END|
|
||||
LOCK TABLES t1 WRITE, t2 WRITE;
|
||||
SET DEBUG_SYNC = 'multi_update_reopen_tables SIGNAL parked WAIT_FOR go';
|
||||
CALL p1();
|
||||
DROP TABLE t1, t2;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR parked';
|
||||
CREATE TABLE t1 AS SELECT 1 AS a, 1 AS b;
|
||||
CREATE TABLE t2 AS SELECT 1 AS a, 1 AS b;
|
||||
SET DEBUG_SYNC = 'now SIGNAL go';
|
||||
# Without the DEBUG_SYNC supplied in the same patch as this test in the
|
||||
# code, this test statement will hang.
|
||||
DROP TABLE t1, t2;
|
||||
DROP PROCEDURE p1;
|
||||
SET DEBUG_SYNC = 'RESET';
|
@ -67,7 +67,7 @@ set @save_general_log=@@global.general_log;
|
||||
set @@global.general_log=0;
|
||||
set @@global.userstat=1;
|
||||
flush status;
|
||||
create table t1 (a int, primary key (a), b int default 0) engine=myisam;
|
||||
create table t1 (a int, primary key (a), b int default 0) engine=innodb;
|
||||
insert into t1 (a) values (1),(2),(3),(4);
|
||||
update t1 set b=1;
|
||||
update t1 set b=5 where a=2;
|
||||
@ -96,12 +96,12 @@ Rows_read 6
|
||||
Rows_sent 1
|
||||
show status like "ha%";
|
||||
Variable_name Value
|
||||
Handler_commit 10
|
||||
Handler_commit 19
|
||||
Handler_delete 1
|
||||
Handler_discover 0
|
||||
Handler_prepare 10
|
||||
Handler_read_first 0
|
||||
Handler_read_key 3
|
||||
Handler_prepare 18
|
||||
Handler_read_first 1
|
||||
Handler_read_key 8
|
||||
Handler_read_next 0
|
||||
Handler_read_prev 0
|
||||
Handler_read_rnd 0
|
||||
@ -113,7 +113,7 @@ Handler_update 5
|
||||
Handler_write 7
|
||||
select variable_value - @global_read_key as "handler_read_key" from information_schema.global_status where variable_name="handler_read_key";
|
||||
handler_read_key
|
||||
3
|
||||
8
|
||||
set @@global.userstat=0;
|
||||
select * from information_schema.index_statistics;
|
||||
TABLE_SCHEMA TABLE_NAME INDEX_NAME ROWS_READ
|
||||
@ -127,20 +127,40 @@ test t1 6 13 13
|
||||
show index_statistics;
|
||||
Table_schema Table_name Index_name Rows_read
|
||||
test t1 PRIMARY 2
|
||||
select TOTAL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT,
|
||||
ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS,
|
||||
UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS,
|
||||
ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS,
|
||||
ACCESS_DENIED, EMPTY_QUERIES from information_schema.client_statistics;
|
||||
TOTAL_CONNECTIONS CONCURRENT_CONNECTIONS ROWS_READ ROWS_SENT ROWS_DELETED ROWS_INSERTED ROWS_UPDATED SELECT_COMMANDS UPDATE_COMMANDS OTHER_COMMANDS COMMIT_TRANSACTIONS ROLLBACK_TRANSACTIONS DENIED_CONNECTIONS LOST_CONNECTIONS ACCESS_DENIED EMPTY_QUERIES
|
||||
1 0 6 2 1 8 5 3 11 9 10 2 0 0 0 1
|
||||
select TOTAL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT,
|
||||
ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS,
|
||||
UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS,
|
||||
ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS,
|
||||
ACCESS_DENIED, EMPTY_QUERIES from information_schema.user_statistics;
|
||||
TOTAL_CONNECTIONS CONCURRENT_CONNECTIONS ROWS_READ ROWS_SENT ROWS_DELETED ROWS_INSERTED ROWS_UPDATED SELECT_COMMANDS UPDATE_COMMANDS OTHER_COMMANDS COMMIT_TRANSACTIONS ROLLBACK_TRANSACTIONS DENIED_CONNECTIONS LOST_CONNECTIONS ACCESS_DENIED EMPTY_QUERIES
|
||||
1 0 6 2 1 8 5 3 11 9 10 2 0 0 0 1
|
||||
select TOTAL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.client_statistics;;
|
||||
TOTAL_CONNECTIONS 1
|
||||
CONCURRENT_CONNECTIONS 0
|
||||
ROWS_READ 6
|
||||
ROWS_SENT 2
|
||||
ROWS_DELETED 1
|
||||
ROWS_INSERTED 8
|
||||
ROWS_UPDATED 5
|
||||
SELECT_COMMANDS 3
|
||||
UPDATE_COMMANDS 11
|
||||
OTHER_COMMANDS 9
|
||||
COMMIT_TRANSACTIONS 19
|
||||
ROLLBACK_TRANSACTIONS 2
|
||||
DENIED_CONNECTIONS 0
|
||||
LOST_CONNECTIONS 0
|
||||
ACCESS_DENIED 0
|
||||
EMPTY_QUERIES 1
|
||||
select TOTAL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, OTHER_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.user_statistics;;
|
||||
TOTAL_CONNECTIONS 1
|
||||
CONCURRENT_CONNECTIONS 0
|
||||
ROWS_READ 6
|
||||
ROWS_SENT 2
|
||||
ROWS_DELETED 1
|
||||
ROWS_INSERTED 8
|
||||
ROWS_UPDATED 5
|
||||
SELECT_COMMANDS 3
|
||||
UPDATE_COMMANDS 11
|
||||
OTHER_COMMANDS 9
|
||||
COMMIT_TRANSACTIONS 19
|
||||
ROLLBACK_TRANSACTIONS 2
|
||||
DENIED_CONNECTIONS 0
|
||||
LOST_CONNECTIONS 0
|
||||
ACCESS_DENIED 0
|
||||
EMPTY_QUERIES 1
|
||||
flush table_statistics;
|
||||
flush index_statistics;
|
||||
select * from information_schema.index_statistics;
|
||||
|
@ -4410,6 +4410,31 @@ WHERE a = 230;
|
||||
MAX(b) (SELECT COUNT(*) FROM st1,st2 WHERE st2.b <= t1.b)
|
||||
NULL 0
|
||||
DROP TABLE t1, st1, st2;
|
||||
#
|
||||
# Bug #48709: Assertion failed in sql_select.cc:11782:
|
||||
# int join_read_key(JOIN_TAB*)
|
||||
#
|
||||
CREATE TABLE t1 (pk int PRIMARY KEY, int_key int);
|
||||
INSERT INTO t1 VALUES (10,1), (14,1);
|
||||
CREATE TABLE t2 (pk int PRIMARY KEY, int_key int);
|
||||
INSERT INTO t2 VALUES (3,3), (5,NULL), (7,3);
|
||||
# should have eq_ref for t1
|
||||
EXPLAIN
|
||||
SELECT * FROM t2 outr
|
||||
WHERE outr.int_key NOT IN (SELECT t1.pk FROM t1, t2)
|
||||
ORDER BY outr.pk;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
x x outr ALL x x x x x x
|
||||
x x t1 eq_ref x x x x x x
|
||||
x x t2 index x x x x x x
|
||||
# should not crash on debug binaries
|
||||
SELECT * FROM t2 outr
|
||||
WHERE outr.int_key NOT IN (SELECT t1.pk FROM t1, t2)
|
||||
ORDER BY outr.pk;
|
||||
pk int_key
|
||||
3 3
|
||||
7 3
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.0 tests.
|
||||
CREATE TABLE t1 (a INT, b INT);
|
||||
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
|
||||
@ -4574,4 +4599,17 @@ SELECT 1 FROM t1 GROUP BY
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug #49512 : subquery with aggregate function crash
|
||||
# subselect_single_select_engine::exec()
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES();
|
||||
# should not crash
|
||||
SELECT 1 FROM t1 WHERE a <> SOME
|
||||
(
|
||||
SELECT MAX((SELECT a FROM t1 LIMIT 1)) AS d
|
||||
FROM t1,t1 a
|
||||
);
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests.
|
||||
|
@ -1,4 +1,4 @@
|
||||
drop table if exists t0, t1, t2, t3;
|
||||
drop table if exists t0, t1, t2, t3, t4, t5, t6;
|
||||
drop view if exists v1, v2;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (0),(1),(2),(3);
|
||||
@ -418,3 +418,120 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 4
|
||||
1 SIMPLE t2 range PRIMARY PRIMARY 4 NULL 2 Using where
|
||||
drop table t1, t2;
|
||||
#
|
||||
# LPBUG#523593: Running RQG optimizer_no_subquery crashes MariaDB
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
`pk` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`col_int_nokey` int(11) DEFAULT NULL,
|
||||
`col_int_key` int(11) DEFAULT NULL,
|
||||
`col_date_key` date DEFAULT NULL,
|
||||
`col_date_nokey` date DEFAULT NULL,
|
||||
`col_time_key` time DEFAULT NULL,
|
||||
`col_time_nokey` time DEFAULT NULL,
|
||||
`col_datetime_key` datetime DEFAULT NULL,
|
||||
`col_datetime_nokey` datetime DEFAULT NULL,
|
||||
`col_varchar_key` varchar(1) DEFAULT NULL,
|
||||
`col_varchar_nokey` varchar(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`pk`),
|
||||
KEY `col_int_key` (`col_int_key`),
|
||||
KEY `col_date_key` (`col_date_key`),
|
||||
KEY `col_time_key` (`col_time_key`),
|
||||
KEY `col_datetime_key` (`col_datetime_key`),
|
||||
KEY `col_varchar_key` (`col_varchar_key`,`col_int_key`)
|
||||
);
|
||||
CREATE TABLE t2 LIKE t1;
|
||||
INSERT INTO t1 VALUES
|
||||
(10,7,8,NULL,NULL,'01:27:35','01:27:35','2002-02-26 06:14:37','2002-02-26 06:14:37','v','v'),
|
||||
(11,1,9,'2006-06-14','2006-06-14','19:48:31','19:48:31','1900-01-01 00:00:00','1900-01-01 00:00:00','r','r');
|
||||
INSERT INTO t2 SELECT * FROM t1;
|
||||
SELECT table2.col_int_key AS field1
|
||||
FROM (
|
||||
t2 AS table1
|
||||
RIGHT OUTER JOIN
|
||||
(
|
||||
( t1 AS table2 STRAIGHT_JOIN
|
||||
t1 AS table3 ON (
|
||||
(table3.col_varchar_nokey = table2.col_varchar_key ) AND
|
||||
(table3.pk = table2.col_int_key))
|
||||
)
|
||||
) ON
|
||||
(
|
||||
(table3.col_varchar_key = table2.col_varchar_key) OR
|
||||
(table3.col_int_key = table2.pk)
|
||||
)
|
||||
)
|
||||
HAVING field1 < 216;
|
||||
field1
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# LPBUG#524025 Running RQG outer_join test leads to crash
|
||||
#
|
||||
CREATE TABLE t0 (
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (pk)
|
||||
);
|
||||
CREATE TABLE t1 (
|
||||
col_int int(11) DEFAULT NULL,
|
||||
col_int_key int(11) DEFAULT NULL,
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
col_varchar_10_latin1 varchar(10) DEFAULT NULL,
|
||||
PRIMARY KEY (pk)
|
||||
);
|
||||
INSERT INTO t1 VALUES (5,5,1,'t'), (NULL,NULL,2,'y');
|
||||
CREATE TABLE t2 (
|
||||
col_int int(11) DEFAULT NULL
|
||||
);
|
||||
INSERT INTO t2 VALUES (8), (4);
|
||||
CREATE TABLE t3 (
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (pk)
|
||||
);
|
||||
INSERT INTO t3 VALUES (1),(8);
|
||||
CREATE TABLE t4 (
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
col_varchar_1024_latin1_key varchar(1024) DEFAULT NULL,
|
||||
col_int int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (pk)
|
||||
);
|
||||
INSERT INTO t4 VALUES (1,'o',1), (2,'w',2);
|
||||
CREATE TABLE t5 (
|
||||
col_varchar_1024_utf8_key varchar(1024) CHARACTER SET utf8 DEFAULT NULL,
|
||||
col_varchar_1024_latin1_key varchar(1024) DEFAULT NULL,
|
||||
col_varchar_10_utf8_key varchar(1024) CHARACTER SET utf8 DEFAULT NULL,
|
||||
pk int(11) NOT NULL AUTO_INCREMENT,
|
||||
col_int_key int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (pk)
|
||||
);
|
||||
INSERT INTO t5 VALUES ('k','a','z',1,2),('x','a','w',2,7);
|
||||
CREATE TABLE t6 (
|
||||
col_int int(11) DEFAULT NULL,
|
||||
col_int_key int(11) DEFAULT NULL
|
||||
);
|
||||
INSERT INTO t6 VALUES (6,1),(8,3);
|
||||
SELECT
|
||||
table3.col_int AS field1,
|
||||
table1.col_int AS field2,
|
||||
table1.col_int_key AS field3,
|
||||
table1.pk AS field4,
|
||||
table1.col_int AS field5,
|
||||
table2.col_int AS field6
|
||||
FROM
|
||||
t1 AS table1
|
||||
LEFT OUTER JOIN
|
||||
t4 AS table2
|
||||
LEFT JOIN t6 AS table3
|
||||
RIGHT JOIN t3 AS table4
|
||||
LEFT JOIN t5 AS table5 ON table4.pk = table5.pk
|
||||
LEFT JOIN t0 AS table6 ON table5.col_int_key = table6.pk
|
||||
ON table3.col_int_key = table5.pk
|
||||
ON table2.col_varchar_1024_latin1_key = table5.col_varchar_10_utf8_key
|
||||
LEFT JOIN t6 AS table7 ON table2.pk = table7.col_int
|
||||
ON table1.col_varchar_10_latin1 = table5.col_varchar_1024_latin1_key
|
||||
LEFT JOIN t2 AS table8 ON table3.col_int = table8.col_int
|
||||
WHERE
|
||||
table1.col_int_key < table2.pk
|
||||
HAVING
|
||||
field4 != 6;
|
||||
field1 field2 field3 field4 field5 field6
|
||||
drop table t0,t1,t2,t3,t4,t5,t6;
|
||||
|
@ -1588,3 +1588,63 @@ Warnings:
|
||||
Note 1003 select '0' AS `a` from `test`.`t1` union select '0' AS `a` from `test`.`t1` order by `a`
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug #49734: Crash on EXPLAIN EXTENDED UNION ... ORDER BY
|
||||
# <any non-const-function>
|
||||
#
|
||||
CREATE TABLE t1 (a VARCHAR(10), FULLTEXT KEY a (a));
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
CREATE TABLE t2 (b INT);
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
# Should not crash
|
||||
EXPLAIN EXTENDED
|
||||
SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY a + 12;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
|
||||
2 UNION t1 ALL NULL NULL NULL NULL 2 100.00
|
||||
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` union select `test`.`t1`.`a` AS `a` from `test`.`t1` order by (`a` + 12)
|
||||
# Should not crash
|
||||
SELECT * FROM t1 UNION SELECT * FROM t1 ORDER BY a + 12;
|
||||
a
|
||||
1
|
||||
2
|
||||
# Should not crash
|
||||
EXPLAIN EXTENDED
|
||||
SELECT * FROM t1 UNION SELECT * FROM t1
|
||||
ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE);
|
||||
ERROR 42000: Incorrect usage/placement of 'MATCH()'
|
||||
# Should not crash
|
||||
SELECT * FROM t1 UNION SELECT * FROM t1
|
||||
ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE);
|
||||
ERROR 42000: Incorrect usage/placement of 'MATCH()'
|
||||
# Should not crash
|
||||
(SELECT * FROM t1) UNION (SELECT * FROM t1)
|
||||
ORDER BY MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE);
|
||||
a
|
||||
1
|
||||
2
|
||||
# Should not crash
|
||||
EXPLAIN EXTENDED
|
||||
SELECT * FROM t1 UNION SELECT * FROM t1
|
||||
ORDER BY (SELECT a FROM t2 WHERE b = 12);
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
|
||||
2 UNION t1 ALL NULL NULL NULL NULL 2 100.00
|
||||
3 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
|
||||
Warnings:
|
||||
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` union select `test`.`t1`.`a` AS `a` from `test`.`t1` order by (select `test`.`t1`.`a` AS `a` from `test`.`t2` where (`test`.`t2`.`b` = 12))
|
||||
# Should not crash
|
||||
SELECT * FROM t1 UNION SELECT * FROM t1
|
||||
ORDER BY (SELECT a FROM t2 WHERE b = 12);
|
||||
# Should not crash
|
||||
SELECT * FROM t2 UNION SELECT * FROM t2
|
||||
ORDER BY (SELECT * FROM t1 WHERE MATCH(a) AGAINST ('+abc' IN BOOLEAN MODE));
|
||||
b
|
||||
1
|
||||
2
|
||||
DROP TABLE t1,t2;
|
||||
End of 5.1 tests
|
||||
|
@ -409,6 +409,21 @@ SELECT a, b FROM t1 WHERE a=2 AND b=3 GROUP BY a, b;
|
||||
a b
|
||||
2 3
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (f1 int(11) default NULL, f2 int(11) default NULL);
|
||||
CREATE TABLE t2 (f1 int(11) default NULL, f2 int(11) default NULL, foo int(11));
|
||||
CREATE TABLE t3 (f1 int(11) default NULL, f2 int(11) default NULL);
|
||||
INSERT INTO t1 VALUES(10, 10);
|
||||
INSERT INTO t1 VALUES(10, 10);
|
||||
INSERT INTO t2 VALUES(10, 10, 10);
|
||||
INSERT INTO t2 VALUES(10, 10, 10);
|
||||
INSERT INTO t3 VALUES(10, 10);
|
||||
INSERT INTO t3 VALUES(10, 10);
|
||||
SELECT MIN(t2.f1),
|
||||
@bar:= (SELECT MIN(t3.f2) FROM t3 WHERE t3.f2 > foo)
|
||||
FROM t1,t2 WHERE t1.f1 = t2.f1 ORDER BY t2.f1;
|
||||
MIN(t2.f1) @bar:= (SELECT MIN(t3.f2) FROM t3 WHERE t3.f2 > foo)
|
||||
10 NULL
|
||||
DROP TABLE t1, t2, t3;
|
||||
End of 5.0 tests
|
||||
CREATE TABLE t1 (i INT);
|
||||
CREATE TRIGGER t_after_insert AFTER INSERT ON t1 FOR EACH ROW SET @bug42188 = 10;
|
||||
|
@ -559,7 +559,7 @@ set sql_log_bin=1;
|
||||
set sql_log_off=1;
|
||||
set sql_log_update=1;
|
||||
Warnings:
|
||||
Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored
|
||||
Note 1315 The update log is deprecated and replaced by the binary log; SET SQL_LOG_UPDATE has been ignored. This option will be removed in MySQL 5.6.
|
||||
set sql_low_priority_updates=1;
|
||||
set sql_max_join_size=200;
|
||||
select @@sql_max_join_size,@@max_join_size;
|
||||
@ -575,8 +575,6 @@ set storage_engine=myisam;
|
||||
set global thread_cache_size=100;
|
||||
set timestamp=1, timestamp=default;
|
||||
set tmp_table_size=100;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect tmp_table_size value: '100'
|
||||
set tx_isolation="READ-COMMITTED";
|
||||
set wait_timeout=100;
|
||||
set log_warnings=1;
|
||||
@ -1011,6 +1009,12 @@ ERROR HY000: Variable 'hostname' is a read only variable
|
||||
show variables like 'hostname';
|
||||
Variable_name Value
|
||||
hostname #
|
||||
#
|
||||
# BUG#37408 - Compressed MyISAM files should not require/use mmap()
|
||||
#
|
||||
# Test 'myisam_mmap_size' option is not dynamic
|
||||
SET @@myisam_mmap_size= 500M;
|
||||
ERROR HY000: Variable 'myisam_mmap_size' is a read only variable
|
||||
End of 5.0 tests
|
||||
set join_buffer_size=1;
|
||||
Warnings:
|
||||
|
@ -8,6 +8,13 @@
|
||||
</rules>
|
||||
</collation>
|
||||
|
||||
<collation name="utf8_hugeid_ci" id="2047000000">
|
||||
<rules>
|
||||
<reset>a</reset>
|
||||
<s>b</s>
|
||||
</rules>
|
||||
</collation>
|
||||
|
||||
</charset>
|
||||
|
||||
<charset name="ucs2">
|
||||
|
BIN
mysql-test/std_data/bug47142_master-bin.000001
Normal file
BIN
mysql-test/std_data/bug47142_master-bin.000001
Normal file
Binary file not shown.
@ -1,19 +1,17 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDIjCCAougAwIBAgIJAJhuvLP+2mGwMA0GCSqGSIb3DQEBBQUAMGoxCzAJBgNV
|
||||
BAYTAkZJMRAwDgYDVQQIEwdUdXVzdWxhMRkwFwYDVQQKExBNb250eSBQcm9ncmFt
|
||||
IEFiMS4wLAYJKoZIhvcNAQkBFh9hYnN0cmFjdC5kZXZlbG9wZXJAYXNrbW9udHku
|
||||
b3JnMB4XDTEwMDEyODIxNTcyNVoXDTEwMDIyNzIxNTcyNVowajELMAkGA1UEBhMC
|
||||
RkkxEDAOBgNVBAgTB1R1dXN1bGExGTAXBgNVBAoTEE1vbnR5IFByb2dyYW0gQWIx
|
||||
LjAsBgkqhkiG9w0BCQEWH2Fic3RyYWN0LmRldmVsb3BlckBhc2ttb250eS5vcmcw
|
||||
gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMIaY4pwbst50S32xJH3bSXhPGep
|
||||
6gx1AWwZKsHTXL3VeMO6PHmC8zu5HM0zbOcrIJcXL3YVnpmE4b9OQxIiMSx1Yd+U
|
||||
u8/sTkxgpsEKhCbIzECIwPhppyT/JP5aSXCadEvg+PSjikv8dOVkD68wVG4CcFIX
|
||||
MFttsPebBVzEokZZAgMBAAGjgc8wgcwwHQYDVR0OBBYEFOCKaNHFFPrju8AwzWxS
|
||||
f96IKfRwMIGcBgNVHSMEgZQwgZGAFOCKaNHFFPrju8AwzWxSf96IKfRwoW6kbDBq
|
||||
MQswCQYDVQQGEwJGSTEQMA4GA1UECBMHVHV1c3VsYTEZMBcGA1UEChMQTW9udHkg
|
||||
UHJvZ3JhbSBBYjEuMCwGCSqGSIb3DQEJARYfYWJzdHJhY3QuZGV2ZWxvcGVyQGFz
|
||||
a21vbnR5Lm9yZ4IJAJhuvLP+2mGwMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEF
|
||||
BQADgYEAsmCX2/k9AInq2qhXtnkLip6cB0iOerLTNAzEijZc/aVf4wUjkL3cqhmC
|
||||
kSTCwAHIOxp+ICwh6ky3xghXjoI9QnPFDVkRkzPT2tV0IoBaeQuI4e0CU2EY7L3P
|
||||
XoDqp3oq1XtVcr9ZZdP68fBYUG/qcrWcXWk45ZFaBmBv3TotsGk=
|
||||
MIICrTCCAhagAwIBAgIJAMI7xZKjhrDbMA0GCSqGSIb3DQEBBAUAMEQxCzAJBgNV
|
||||
BAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxhMREwDwYD
|
||||
VQQKEwhNeVNRTCBBQjAeFw0xMDAxMjkxMTQ3MTBaFw0xNTAxMjgxMTQ3MTBaMEQx
|
||||
CzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxh
|
||||
MREwDwYDVQQKEwhNeVNRTCBBQjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
|
||||
wQYsOEfrN4ESP3FjsI8cghE+tZVuyK2gck61lwieVxjgFMtBd65mI5a1y9pmlOI1
|
||||
yM4SB2Ppqcuw7/e1CdV1y7lvHrGNt5yqEHbN4QX1gvsN8TQauP/2WILturk4R4Hq
|
||||
rKg0ZySu7f1Xhl0ed9a48LpaEHD17IcxWEGMMJwAxF0CAwEAAaOBpjCBozAMBgNV
|
||||
HRMEBTADAQH/MB0GA1UdDgQWBBSvktYQ0ahLnyxyVKqty+WpBbBrDTB0BgNVHSME
|
||||
bTBrgBSvktYQ0ahLnyxyVKqty+WpBbBrDaFIpEYwRDELMAkGA1UEBhMCU0UxEDAO
|
||||
BgNVBAgTB1VwcHNhbGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FM
|
||||
IEFCggkAwjvFkqOGsNswDQYJKoZIhvcNAQEEBQADgYEAdKN1PjwMHAKG2Ww1145g
|
||||
JQGBnKxSFOUaoSvkBi/4ntTM+ysnViWh7WvxyWjR9zU9arfr7aqsDeQxm0XDOqzj
|
||||
AQ/cQIla2/Li8tXyfc06bisH/IHRaSc2zWqioTKbEwMdVOdrvq4a8V8ic3xYyIWn
|
||||
7F4WeS07J8LKardSvM0+hOA=
|
||||
-----END CERTIFICATE-----
|
||||
|
@ -1,60 +1,46 @@
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number: 2 (0x2)
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Issuer: C=FI, ST=Tuusula, O=Monty Program Ab/emailAddress=abstract.developer@askmonty.org
|
||||
Version: 1 (0x0)
|
||||
Serial Number: 1048577 (0x100001)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB
|
||||
Validity
|
||||
Not Before: Jan 28 22:01:38 2010 GMT
|
||||
Not After : Dec 7 22:01:38 2019 GMT
|
||||
Subject: C=FI, ST=Tuusula, O=Monty Program Ab/emailAddress=abstract.developer@askmonty.org
|
||||
Not Before: Jan 29 11:50:22 2010 GMT
|
||||
Not After : Jan 28 11:50:22 2015 GMT
|
||||
Subject: C=SE, ST=Uppsala, O=MySQL AB
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public Key: (1024 bit)
|
||||
Modulus (1024 bit):
|
||||
00:bd:dc:3d:f8:3c:0b:d4:d2:c0:a3:9c:34:2d:e7:
|
||||
11:ff:4d:43:35:17:f6:0d:91:01:92:9e:4f:4d:c0:
|
||||
38:d5:62:03:55:33:db:66:a2:91:d3:f2:b6:23:34:
|
||||
95:53:50:3d:4f:e3:0c:d7:76:fd:f6:54:64:e6:f6:
|
||||
dc:70:74:7c:6b:74:41:59:b0:19:5d:62:90:3c:a7:
|
||||
c8:5e:21:8f:2b:22:6b:c7:43:9b:be:79:84:60:da:
|
||||
16:c9:ce:ee:fd:66:cb:54:81:e2:b5:1c:cf:f9:74:
|
||||
de:38:2b:28:d4:31:33:55:d2:30:1c:a3:e4:c2:c7:
|
||||
31:46:43:d5:33:3d:8a:0b:47
|
||||
Public-Key: (1024 bit)
|
||||
Modulus:
|
||||
00:cc:9a:37:49:13:66:dc:cf:e3:0b:13:a1:23:ed:
|
||||
78:db:4e:bd:11:f6:8c:0d:76:f9:a3:32:56:9a:f8:
|
||||
a1:21:6a:55:4e:4d:3f:e6:67:9d:26:99:b2:cd:a4:
|
||||
9a:d2:2b:59:5c:d7:8a:d3:60:68:f8:18:bd:c5:be:
|
||||
15:e1:2a:3c:a3:d4:61:cb:f5:11:94:17:81:81:f7:
|
||||
87:8c:f6:6a:d2:ee:d8:e6:77:f6:62:66:4d:2e:16:
|
||||
8d:08:81:4a:c9:c6:4b:31:e5:b9:c7:8a:84:96:48:
|
||||
a7:47:8c:0d:26:90:56:4e:e6:a5:6e:8c:b3:f2:9f:
|
||||
fc:3d:78:9b:49:6e:86:83:77
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Basic Constraints:
|
||||
CA:FALSE
|
||||
Netscape Comment:
|
||||
OpenSSL Generated Certificate
|
||||
X509v3 Subject Key Identifier:
|
||||
BE:E6:DB:19:8D:DB:72:9A:85:EE:B2:B8:5D:E7:FF:61:DF:09:08:AF
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:E0:8A:68:D1:C5:14:FA:E3:BB:C0:30:CD:6C:52:7F:DE:88:29:F4:70
|
||||
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
41:95:6d:0a:a4:ee:af:68:cd:94:26:59:9a:18:b7:75:3c:c5:
|
||||
0f:22:d3:5c:31:9b:85:a0:93:b3:f0:50:29:ba:1e:d3:5a:43:
|
||||
0b:77:2d:98:87:a7:a7:39:0f:40:8d:03:d3:b3:67:43:77:bc:
|
||||
3c:51:c2:f9:9e:7a:2d:39:c4:5c:16:d7:70:d6:74:d1:6c:e1:
|
||||
6a:4d:fd:1f:10:af:64:3b:f4:64:e9:b2:b3:fb:c8:cd:c5:41:
|
||||
cd:99:e0:ac:83:1d:81:2c:6b:99:ba:80:02:12:72:f7:3b:bb:
|
||||
93:72:00:da:ff:d3:87:75:d2:3a:a4:ca:4d:c1:8b:c1:21:50:
|
||||
cb:57
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
5e:1f:a3:53:5f:24:13:1c:f8:28:32:b0:7f:69:69:f3:0e:c0:
|
||||
34:87:10:03:7d:da:15:8b:bd:19:b8:1a:56:31:e7:85:49:81:
|
||||
c9:7f:45:20:74:3e:89:c0:e0:26:84:51:cc:04:16:ce:69:99:
|
||||
01:e1:26:99:b3:e3:f5:bd:ec:5f:a0:84:e4:38:da:75:78:7b:
|
||||
89:9c:d2:cd:60:95:20:ba:8e:e3:7c:e6:df:76:3a:7c:89:77:
|
||||
02:94:86:11:3a:c4:61:7d:6f:71:83:21:8a:17:fb:17:e2:ee:
|
||||
02:6b:61:c1:b4:52:63:d7:d8:46:b2:c5:9c:6f:38:91:8a:35:
|
||||
32:0b
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICxTCCAi6gAwIBAgIBAjANBgkqhkiG9w0BAQUFADBqMQswCQYDVQQGEwJGSTEQ
|
||||
MA4GA1UECBMHVHV1c3VsYTEZMBcGA1UEChMQTW9udHkgUHJvZ3JhbSBBYjEuMCwG
|
||||
CSqGSIb3DQEJARYfYWJzdHJhY3QuZGV2ZWxvcGVyQGFza21vbnR5Lm9yZzAeFw0x
|
||||
MDAxMjgyMjAxMzhaFw0xOTEyMDcyMjAxMzhaMGoxCzAJBgNVBAYTAkZJMRAwDgYD
|
||||
VQQIEwdUdXVzdWxhMRkwFwYDVQQKExBNb250eSBQcm9ncmFtIEFiMS4wLAYJKoZI
|
||||
hvcNAQkBFh9hYnN0cmFjdC5kZXZlbG9wZXJAYXNrbW9udHkub3JnMIGfMA0GCSqG
|
||||
SIb3DQEBAQUAA4GNADCBiQKBgQC93D34PAvU0sCjnDQt5xH/TUM1F/YNkQGSnk9N
|
||||
wDjVYgNVM9tmopHT8rYjNJVTUD1P4wzXdv32VGTm9txwdHxrdEFZsBldYpA8p8he
|
||||
IY8rImvHQ5u+eYRg2hbJzu79ZstUgeK1HM/5dN44KyjUMTNV0jAco+TCxzFGQ9Uz
|
||||
PYoLRwIDAQABo3sweTAJBgNVHRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NM
|
||||
IEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNVHQ4EFgQUvubbGY3bcpqF7rK4Xef/
|
||||
Yd8JCK8wHwYDVR0jBBgwFoAU4Ipo0cUU+uO7wDDNbFJ/3ogp9HAwDQYJKoZIhvcN
|
||||
AQEFBQADgYEAQZVtCqTur2jNlCZZmhi3dTzFDyLTXDGbhaCTs/BQKboe01pDC3ct
|
||||
mIenpzkPQI0D07NnQ3e8PFHC+Z56LTnEXBbXcNZ00Wzhak39HxCvZDv0ZOmys/vI
|
||||
zcVBzZngrIMdgSxrmbqAAhJy9zu7k3IA2v/Th3XSOqTKTcGLwSFQy1c=
|
||||
MIIB5zCCAVACAxAAATANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G
|
||||
A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg
|
||||
QUIwHhcNMTAwMTI5MTE1MDIyWhcNMTUwMTI4MTE1MDIyWjAyMQswCQYDVQQGEwJT
|
||||
RTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIwgZ8wDQYJKoZI
|
||||
hvcNAQEBBQADgY0AMIGJAoGBAMyaN0kTZtzP4wsToSPteNtOvRH2jA12+aMyVpr4
|
||||
oSFqVU5NP+ZnnSaZss2kmtIrWVzXitNgaPgYvcW+FeEqPKPUYcv1EZQXgYH3h4z2
|
||||
atLu2OZ39mJmTS4WjQiBSsnGSzHluceKhJZIp0eMDSaQVk7mpW6Ms/Kf/D14m0lu
|
||||
hoN3AgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAXh+jU18kExz4KDKwf2lp8w7ANIcQ
|
||||
A33aFYu9GbgaVjHnhUmByX9FIHQ+icDgJoRRzAQWzmmZAeEmmbPj9b3sX6CE5Dja
|
||||
dXh7iZzSzWCVILqO43zm33Y6fIl3ApSGETrEYX1vcYMhihf7F+LuAmthwbRSY9fY
|
||||
RrLFnG84kYo1Mgs=
|
||||
-----END CERTIFICATE-----
|
||||
|
@ -1,15 +1,15 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXgIBAAKBgQC93D34PAvU0sCjnDQt5xH/TUM1F/YNkQGSnk9NwDjVYgNVM9tm
|
||||
opHT8rYjNJVTUD1P4wzXdv32VGTm9txwdHxrdEFZsBldYpA8p8heIY8rImvHQ5u+
|
||||
eYRg2hbJzu79ZstUgeK1HM/5dN44KyjUMTNV0jAco+TCxzFGQ9UzPYoLRwIDAQAB
|
||||
AoGBAJa2lprPT7UJ99Ho1aL6ota/RnKHKtNqII17DgjyZis9OtgP6kJ3GrvdF6iq
|
||||
vT79my4nVrJTyxYXuGF/5U1/qqNjuPPBE1Xbu1ubQlFv8CT0kKYynQ7Z3ls8fAHC
|
||||
B3VJXnUVlG+GHtUEFFG4FQVX1fn/Sga67ioJ6ivAiBlHKaPBAkEA5f2ToWlj4u9O
|
||||
KgfRkN54wdIp4yu2c40pbhMfKGjGGsBAHk92+qSBpzEmxLcI6Ay+4/QysSR4jYmK
|
||||
jCJuxiTu1QJBANNU3Hx8Il2SF/2BqGLcIh2SHxzKQIT5wAyD2jb+P2cHvbk6pKGR
|
||||
VTmw5bibxXmYMS6J/L2zUF2xtFe+Svwz96sCQEnKYSqBqOWvyBFeLtPfPTlal8vm
|
||||
Q4SxfuBtTCrn6t+8XRYcgt0KGPsunvSwkS/6nuh+eiExxWgMACLUDVyPjv0CQQC4
|
||||
sJJc7LOv6Oy0bWr2swHRrBEqvQsz63zOszCzHPHWHirNxZV5aiT8XT/2XZRwlvRs
|
||||
gsVyGFLk/1fn0vN/g/8vAkEAxUdzUKvC1ZwjzGhgcz2bQU0tEZN4C9jBCiwOI2ud
|
||||
BpAsPG0xAGGL2+hz0B0n88XiTHobiTZ1bg4Z41i4pXx2ZA==
|
||||
MIICXQIBAAKBgQDMmjdJE2bcz+MLE6Ej7XjbTr0R9owNdvmjMlaa+KEhalVOTT/m
|
||||
Z50mmbLNpJrSK1lc14rTYGj4GL3FvhXhKjyj1GHL9RGUF4GB94eM9mrS7tjmd/Zi
|
||||
Zk0uFo0IgUrJxksx5bnHioSWSKdHjA0mkFZO5qVujLPyn/w9eJtJboaDdwIDAQAB
|
||||
AoGASqk/4We2En+93y3jkIO4pXafIe3w/3zZ7caRue1ehx4RUQh5d+95djuB9u7J
|
||||
HEZ7TpjM7QNyao5EueL6gvbxt0LXFvqAMni7yM9tt/HUYtHHPqYiRtUny9bKYFTm
|
||||
l8szCCMal/wD9GZU9ByHDNHm7tHUMyMhARNTYSgx+SERFmECQQD/6jJocC4SXf6f
|
||||
T3LqimWR02lbJ7qCoDgRglsUXh0zjrG+IIiAyE+QOCCx1GMe3Uw6bsIuYwdHT6as
|
||||
WcdPs04xAkEAzKulvEvLVvN5zfa/DTYRTV7jh6aDleOxjsD5oN/oJXoACnPzVuUL
|
||||
qQQMNtuAXm6Q1QItrRxpQsSKbY0UQka6JwJBAOSgoNoG5lIIYTKIMvzwGV+XBLeo
|
||||
HYsXgh+6Wo4uql3mLErUG78ZtWL9kc/tE4R+ZdyKGLaCR/1gXmH5bwN4B/ECQEBb
|
||||
uUH8k3REG4kojesZlVc+/00ojzgS4UKCa/yqa9VdB6ZBz8MDQydinnShkTwgiGpy
|
||||
xOoqhO753o2UT0qH8wECQQC99IEJWUnwvExVMkLaZH5NjAFJkb22sjkmuT11tAgU
|
||||
RQgOMoDOm6driojnOnDWOkx1r1Gy9NgMLooduja4v6cx
|
||||
-----END RSA PRIVATE KEY-----
|
||||
|
@ -1,61 +1,41 @@
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number: 1 (0x1)
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Issuer: C=FI, ST=Tuusula, O=Monty Program Ab/emailAddress=abstract.developer@askmonty.org
|
||||
Version: 1 (0x0)
|
||||
Serial Number: 1048578 (0x100002)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB
|
||||
Validity
|
||||
Not Before: Jan 28 21:59:14 2010 GMT
|
||||
Not After : Dec 7 21:59:14 2019 GMT
|
||||
Subject: C=FI, ST=Tuusula, O=Monty Program Ab, CN=localhost/emailAddress=abstract.developer@askmonty.org
|
||||
Not Before: Jan 29 11:56:49 2010 GMT
|
||||
Not After : Jan 28 11:56:49 2015 GMT
|
||||
Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=localhost
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public Key: (1024 bit)
|
||||
Modulus (1024 bit):
|
||||
00:cc:79:74:2a:14:7e:77:06:b0:ec:1b:b6:da:70:
|
||||
4c:4f:0e:94:04:8a:e7:69:f4:4c:9c:67:22:41:56:
|
||||
3a:96:53:9e:95:9d:17:55:80:41:c0:13:d6:94:0f:
|
||||
cd:2c:51:fe:a4:6e:f2:74:d8:5d:3b:3a:80:e3:85:
|
||||
5b:a5:bc:7d:5c:25:55:e5:40:77:fe:f3:cb:5b:cd:
|
||||
da:a5:f4:36:64:30:a2:a0:7f:93:b3:c4:56:75:2a:
|
||||
c0:f7:65:2a:d7:e6:ff:88:25:03:e0:b4:40:2e:74:
|
||||
4c:cb:46:95:73:cb:25:5c:87:0e:ec:0f:5a:19:c2:
|
||||
b6:dc:9e:e8:f0:30:b1:9c:99
|
||||
Public-Key: (512 bit)
|
||||
Modulus:
|
||||
00:cd:e4:87:51:9d:72:11:a0:d1:fa:f3:92:8b:13:
|
||||
1c:eb:f7:e2:9a:2f:72:a8:d6:65:48:d1:69:af:1b:
|
||||
c0:4c:13:e5:60:60:51:41:e9:ab:a6:bc:13:bb:0c:
|
||||
5e:32:7c:d9:6c:9e:cd:05:24:84:78:db:80:91:2e:
|
||||
d8:88:2b:c2:ed
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Basic Constraints:
|
||||
CA:FALSE
|
||||
Netscape Comment:
|
||||
OpenSSL Generated Certificate
|
||||
X509v3 Subject Key Identifier:
|
||||
6D:13:3B:40:52:3C:AF:18:EA:33:D1:B7:56:21:1B:05:FE:0B:9E:38
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:E0:8A:68:D1:C5:14:FA:E3:BB:C0:30:CD:6C:52:7F:DE:88:29:F4:70
|
||||
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
97:db:65:23:7f:f1:15:3c:1e:83:ac:0e:0a:50:a0:0c:22:b8:
|
||||
45:d4:ca:21:05:47:3b:3d:03:b5:6c:4b:8d:bb:5f:57:c3:c7:
|
||||
4e:71:23:cf:33:a3:7f:a0:3d:bd:58:75:b8:37:22:16:2f:e9:
|
||||
ed:ae:9b:94:29:81:6e:34:79:cf:41:bd:3d:8d:17:d7:22:1c:
|
||||
1b:58:c7:0f:79:13:56:1d:e8:d8:4e:e5:07:3f:79:1b:dd:c4:
|
||||
06:9b:c5:b6:02:34:43:c5:bf:e5:87:ad:f1:c1:8a:f2:be:c2:
|
||||
00:1d:d4:27:1f:87:c8:80:31:ec:6e:97:95:b4:84:40:d1:73:
|
||||
42:71
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
73:ce:9c:6e:39:46:b4:14:be:da:3f:f3:1b:ba:90:bc:23:43:
|
||||
d7:82:2a:70:4e:a6:d9:5a:65:5c:b7:df:71:df:75:77:c5:80:
|
||||
a4:af:fa:d2:59:e2:fd:c9:9c:f0:98:95:8e:69:a9:8c:7c:d8:
|
||||
6f:48:d2:e3:36:e0:cd:ff:3f:d1:a5:e6:ab:75:09:c4:50:10:
|
||||
c4:96:dd:bf:3b:de:32:46:da:ca:4a:f1:d6:52:8a:33:2f:ab:
|
||||
f5:2e:70:3f:d4:9c:be:00:c8:03:f9:39:8a:df:5b:70:3c:40:
|
||||
ef:03:be:7c:3d:1d:32:32:f3:51:81:e2:83:30:6e:3d:38:9b:
|
||||
fb:3c
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIC2TCCAkKgAwIBAgIBATANBgkqhkiG9w0BAQUFADBqMQswCQYDVQQGEwJGSTEQ
|
||||
MA4GA1UECBMHVHV1c3VsYTEZMBcGA1UEChMQTW9udHkgUHJvZ3JhbSBBYjEuMCwG
|
||||
CSqGSIb3DQEJARYfYWJzdHJhY3QuZGV2ZWxvcGVyQGFza21vbnR5Lm9yZzAeFw0x
|
||||
MDAxMjgyMTU5MTRaFw0xOTEyMDcyMTU5MTRaMH4xCzAJBgNVBAYTAkZJMRAwDgYD
|
||||
VQQIEwdUdXVzdWxhMRkwFwYDVQQKExBNb250eSBQcm9ncmFtIEFiMRIwEAYDVQQD
|
||||
Ewlsb2NhbGhvc3QxLjAsBgkqhkiG9w0BCQEWH2Fic3RyYWN0LmRldmVsb3BlckBh
|
||||
c2ttb250eS5vcmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMx5dCoUfncG
|
||||
sOwbttpwTE8OlASK52n0TJxnIkFWOpZTnpWdF1WAQcAT1pQPzSxR/qRu8nTYXTs6
|
||||
gOOFW6W8fVwlVeVAd/7zy1vN2qX0NmQwoqB/k7PEVnUqwPdlKtfm/4glA+C0QC50
|
||||
TMtGlXPLJVyHDuwPWhnCttye6PAwsZyZAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJ
|
||||
YIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1Ud
|
||||
DgQWBBRtEztAUjyvGOoz0bdWIRsF/gueODAfBgNVHSMEGDAWgBTgimjRxRT647vA
|
||||
MM1sUn/eiCn0cDANBgkqhkiG9w0BAQUFAAOBgQCX22Ujf/EVPB6DrA4KUKAMIrhF
|
||||
1MohBUc7PQO1bEuNu19Xw8dOcSPPM6N/oD29WHW4NyIWL+ntrpuUKYFuNHnPQb09
|
||||
jRfXIhwbWMcPeRNWHejYTuUHP3kb3cQGm8W2AjRDxb/lh63xwYryvsIAHdQnH4fI
|
||||
gDHsbpeVtIRA0XNCcQ==
|
||||
MIIBtzCCASACAxAAAjANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G
|
||||
A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg
|
||||
QUIwHhcNMTAwMTI5MTE1NjQ5WhcNMTUwMTI4MTE1NjQ5WjBGMQswCQYDVQQGEwJT
|
||||
RTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxEjAQBgNVBAMT
|
||||
CWxvY2FsaG9zdDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDN5IdRnXIRoNH685KL
|
||||
Exzr9+KaL3Ko1mVI0WmvG8BME+VgYFFB6aumvBO7DF4yfNlsns0FJIR424CRLtiI
|
||||
K8LtAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAc86cbjlGtBS+2j/zG7qQvCND14Iq
|
||||
cE6m2VplXLffcd91d8WApK/60lni/cmc8JiVjmmpjHzYb0jS4zbgzf8/0aXmq3UJ
|
||||
xFAQxJbdvzveMkbaykrx1lKKMy+r9S5wP9ScvgDIA/k5it9bcDxA7wO+fD0dMjLz
|
||||
UYHigzBuPTib+zw=
|
||||
-----END CERTIFICATE-----
|
||||
|
@ -1,15 +1,9 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
MIICXgIBAAKBgQDMeXQqFH53BrDsG7bacExPDpQEiudp9EycZyJBVjqWU56VnRdV
|
||||
gEHAE9aUD80sUf6kbvJ02F07OoDjhVulvH1cJVXlQHf+88tbzdql9DZkMKKgf5Oz
|
||||
xFZ1KsD3ZSrX5v+IJQPgtEAudEzLRpVzyyVchw7sD1oZwrbcnujwMLGcmQIDAQAB
|
||||
AoGBAMdMYkNZsmJFbVDVOobzCg3Mgc1jrmeBrOKNS8AvUe+QFXRyp3m5B102eOHb
|
||||
/PmD+hU/5qao9UZzoYkiRM/oRq45jrqJEYwWrX007bKK0F9hnErtC1ImM1nBFVhx
|
||||
6+6cr+ShUkvtj8+wJ2d5bIccUzGCUfFR5tb5BnePTXK8IVoBAkEA7WGNxHAVKgjS
|
||||
AzlpHr5fvpivA07hNVJizTwZdWGGYeETilZhkkuMRwREceeohF6ILMf0FTZdFSa/
|
||||
8EeLa3icIQJBANyDKFjynKwWy5pyRSz75mVwrEi+4eTQPsCPNWLkbpbEPwqPLYWJ
|
||||
2VSFkISXF7b7Od48JkQWgiB8/kXqMDEdsXkCQQCzZvj3ryWvoP7nhOoXXBWMPGR4
|
||||
gZLe86bMKVGsTsp7CtnzwRj4sbQQr/7yfvvzHmaYQX4M0gtDQwfolomd7YdBAkEA
|
||||
y24ETuqjNu9grf81aiaJipPDnOjcJOcovSRgr/blPxmUvv0Pld5yLNN7W5a4PgrO
|
||||
fAMpmi7ZpXcqbP17sBQgoQJAWTDFKAmfHPVdDGZuCw4yceP5d+Tv7ABglZUvpPKx
|
||||
kAvGN1WBASUuCQJDOIgzl6gvYX07S5p147i9mv7UBWOpvw==
|
||||
MIIBOwIBAAJBAM3kh1GdchGg0frzkosTHOv34povcqjWZUjRaa8bwEwT5WBgUUHp
|
||||
q6a8E7sMXjJ82WyezQUkhHjbgJEu2Igrwu0CAwEAAQJBAJuwhFbF3NzRpBbEmnqJ
|
||||
4GPa1UJMQMLFJF+04tqj/HxJcAIVhOJhGmmtYNw1yjz/ZsPnfJCMz4eFOtdjvGtf
|
||||
peECIQDmFFg2WLvYo+2m9w9V7z4ZIkg7ixYkI/ObUUctfZkPOQIhAOUWnrvjFrAX
|
||||
bIvYT/YR50+3ZDLEc51XxNgJnWqWYl1VAiEAnTOFWgyivFC1DgF8PvDp8u5TgCt2
|
||||
A1d1GMgd490O+TECIC/WMl0/hTxOF9930vKqOGf//o9PUGkZq8QE9fcM4gtlAiAE
|
||||
iOcFpnLjtWj57jrhuw214ucnB5rklkQQe+AtcARNkg==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
|
@ -1,138 +1,125 @@
|
||||
Certificate:
|
||||
Data:
|
||||
Version: 3 (0x2)
|
||||
Serial Number: 4 (0x4)
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
Version: 1 (0x0)
|
||||
Serial Number: 1048579 (0x100003)
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB
|
||||
Validity
|
||||
Not Before: Jan 28 11:12:27 2009 GMT
|
||||
Not After : Jan 28 11:12:27 2010 GMT
|
||||
Not Before: Jan 29 12:01:53 2010 GMT
|
||||
Not After : Jan 28 12:01:53 2015 GMT
|
||||
Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=server
|
||||
Subject Public Key Info:
|
||||
Public Key Algorithm: rsaEncryption
|
||||
RSA Public Key: (8192 bit)
|
||||
Modulus (8192 bit):
|
||||
00:c0:8f:22:03:24:59:67:46:14:d6:8f:60:09:58:
|
||||
06:07:45:f1:78:71:55:f1:ea:b9:30:8a:cd:c3:3c:
|
||||
b9:bf:65:6e:18:ed:a0:b8:c9:19:56:6f:c4:90:19:
|
||||
c8:65:09:db:ff:bf:82:a1:08:ad:01:4f:5a:a3:d4:
|
||||
3d:78:7e:4b:4a:01:a4:7d:e8:7b:05:3e:7d:d8:b9:
|
||||
55:58:60:d6:1c:ce:e8:32:62:2c:19:60:f3:ed:05:
|
||||
99:6d:c9:77:07:2e:11:6d:0b:9a:c7:68:38:46:e8:
|
||||
fa:31:80:df:e8:79:f0:f1:fd:a9:94:c3:fa:0d:f5:
|
||||
78:ac:49:7e:d5:17:fd:e1:ee:44:f3:c7:0e:30:32:
|
||||
5d:a9:19:25:e4:bb:21:1d:fe:3c:84:48:40:f5:58:
|
||||
f4:bf:13:8c:85:68:bb:ec:f5:dd:c6:38:d1:b0:77:
|
||||
1f:a6:8e:4f:8d:e2:6f:49:74:f5:3f:90:65:8e:99:
|
||||
1e:59:9c:1c:b5:26:24:c4:b1:de:1e:fb:96:65:c4:
|
||||
31:14:1a:53:b8:5e:62:8a:c7:04:f7:b4:36:a4:af:
|
||||
07:c8:27:06:ed:dd:e6:f4:8c:62:f1:65:40:d0:9f:
|
||||
9f:a9:14:c8:8e:8b:74:d6:67:5a:d0:c9:4d:35:a1:
|
||||
d5:7b:39:3a:42:9f:e4:d0:f4:c6:0f:2e:42:30:4b:
|
||||
56:b2:3d:6d:8e:2d:58:c5:69:99:35:49:95:95:99:
|
||||
b6:87:29:2b:32:d1:50:08:cd:25:14:48:6d:10:99:
|
||||
85:61:3c:41:26:21:55:cc:1f:cf:ad:b0:2f:b9:89:
|
||||
d8:4e:a0:18:ff:75:1d:b6:97:7c:c5:fa:8b:dc:93:
|
||||
17:86:0a:64:d4:09:35:d5:83:34:6d:5c:6d:c6:8c:
|
||||
cd:b9:ec:c2:93:c6:c1:b7:cc:04:6f:22:e0:07:bf:
|
||||
e0:d9:9b:2f:d5:a0:50:cc:f9:f0:95:83:8f:f4:30:
|
||||
83:72:94:d7:b5:4b:da:cc:9f:54:3b:8d:78:77:0b:
|
||||
24:6c:0f:c2:96:61:96:2f:b8:5f:b5:7a:ab:7a:5b:
|
||||
97:7a:a9:ad:40:8b:f2:d6:c6:8d:81:d9:94:61:8f:
|
||||
9d:03:c5:b9:10:03:68:83:bf:04:81:cc:ac:bd:34:
|
||||
89:e8:d4:8d:43:20:e2:b6:a4:11:3d:15:2a:82:0c:
|
||||
d6:3a:6a:8c:62:d4:93:bc:c3:80:bf:1b:b4:2b:0a:
|
||||
7a:34:f0:cd:1e:82:3f:25:0f:d1:04:a8:0a:05:19:
|
||||
b0:d6:16:83:39:af:0b:45:7d:cb:14:7e:4d:aa:aa:
|
||||
c2:39:a8:46:38:ab:bd:ab:2a:bd:34:43:7f:da:25:
|
||||
de:2b:fb:69:3b:fe:3b:87:fd:98:94:76:4a:bf:04:
|
||||
a3:31:e3:3a:ff:6f:04:fa:fa:24:e4:2a:89:e9:0e:
|
||||
bf:44:4c:72:85:82:3c:89:4a:03:63:01:41:92:53:
|
||||
d0:82:60:6e:d8:ff:8c:a2:b4:1a:3b:20:6d:ae:74:
|
||||
92:30:4e:48:e3:51:a6:cb:73:97:06:13:03:32:23:
|
||||
9b:7d:a2:c7:3a:a9:af:97:8c:51:ed:fe:fa:b4:b4:
|
||||
1a:a3:87:fc:cf:8c:8e:e6:80:15:03:fd:fe:7d:bd:
|
||||
b1:76:f1:5f:b3:09:2b:4c:4d:a7:7c:b5:72:b1:d6:
|
||||
db:38:c0:67:a4:54:bc:87:09:a5:39:ba:1a:7e:3f:
|
||||
74:60:ad:3d:4b:be:94:53:f3:64:16:c7:33:35:ec:
|
||||
41:00:95:b6:de:99:62:a2:7a:28:9a:45:4d:fa:cd:
|
||||
a6:77:f6:de:58:72:50:c8:7d:69:38:db:07:04:84:
|
||||
d8:4d:39:f7:50:13:43:ae:2d:af:45:a4:2a:39:56:
|
||||
3c:b8:b7:d8:26:a4:36:c9:23:aa:aa:b8:49:0b:21:
|
||||
ba:9e:7a:2b:7f:4d:29:9f:0e:00:1e:b4:5e:a6:fa:
|
||||
49:fe:8d:e5:74:57:d8:ba:d9:92:2c:d2:ac:84:1d:
|
||||
f2:a6:a4:44:1c:bf:88:41:32:7e:d1:c3:2f:6e:bc:
|
||||
0f:5d:19:a6:8f:74:2b:67:ba:dd:a9:db:68:b5:ce:
|
||||
9d:25:48:df:54:08:d0:1d:4f:2e:5b:24:bc:05:0f:
|
||||
fb:58:46:fa:02:ca:53:93:29:cf:10:27:c2:a0:18:
|
||||
d0:f5:d4:b9:3c:5e:df:8e:6c:f5:7c:b9:b4:54:cc:
|
||||
39:16:5d:3c:da:96:b3:c3:6c:d4:70:5d:d3:30:a7:
|
||||
a6:bd:6f:dd:41:bc:a8:de:42:60:59:9a:85:25:0d:
|
||||
2a:45:c3:05:b4:6e:7a:4a:4d:ca:8c:0a:e5:6c:34:
|
||||
bc:20:9b:6d:4a:ca:ca:b6:a6:3a:a0:db:c3:0e:20:
|
||||
1a:12:1b:77:dd:cb:1d:7f:c3:0d:0d:e7:c1:fd:96:
|
||||
d2:c7:68:80:99:a0:d9:8a:33:21:a3:8b:a2:5a:a7:
|
||||
7e:27:06:02:7f:ed:60:11:37:34:54:17:7f:4d:90:
|
||||
14:1e:69:37:0d:ba:f0:2b:f0:a3:2d:62:79:c8:76:
|
||||
a8:ea:c8:e7:3b:1f:c6:4f:c2:0c:d7:ac:f0:77:53:
|
||||
5d:f0:50:b4:df:9b:03:ca:4d:41:e1:18:b2:25:30:
|
||||
86:1d:63:e5:67:b1:53:cd:6b:4e:83:1a:b9:5e:2d:
|
||||
05:15:6b:d4:8e:b1:97:fc:31:03:57:cb:bf:27:7f:
|
||||
cd:5f:27:7e:66:e7:3c:17:09:b6:11:2a:4f:33:cd:
|
||||
eb:1a:d3:6f:d5:15:8b:8b:ce:68:6b:7e:9a:95:e5:
|
||||
74:7f:17:57:d9
|
||||
Public-Key: (8192 bit)
|
||||
Modulus:
|
||||
00:ca:aa:1d:c4:11:ec:91:f0:c7:ff:5f:90:92:fc:
|
||||
40:0c:5e:b7:3d:00:c5:20:d5:0f:89:31:07:d7:41:
|
||||
4c:8b:60:80:aa:38:14:de:93:6b:9c:74:88:41:68:
|
||||
b5:02:41:01:2d:86:a2:7a:95:53:5e:7b:67:2f:6c:
|
||||
1e:29:51:f9:44:fd:4a:80:be:b2:23:a1:3e:1b:38:
|
||||
cf:88:c4:71:ee:f8:6b:41:c5:2d:c0:c3:52:ac:59:
|
||||
7d:81:34:19:95:32:b8:9a:51:b6:41:36:d4:c4:a1:
|
||||
ae:84:e6:38:b9:e8:bf:96:be:19:7a:6b:77:4d:e0:
|
||||
de:e6:b3:b6:6b:bc:3d:dd:68:bc:4b:c4:eb:f5:36:
|
||||
93:ed:56:a2:15:50:8a:10:e8:d6:22:ed:6c:b1:cd:
|
||||
c3:18:c9:f6:0a:e1:de:61:65:62:d6:14:41:8c:b5:
|
||||
fb:14:68:c1:cf:12:5d:41:21:9d:57:11:43:7d:bb:
|
||||
43:2c:21:bb:c3:44:7d:a8:cf:1f:c3:71:75:b5:47:
|
||||
c2:7d:ce:38:3c:73:64:9e:15:d8:a7:27:cf:bd:40:
|
||||
c8:45:08:e3:c8:39:a8:0b:8e:c2:5b:7b:f1:47:91:
|
||||
12:91:cc:e1:00:e0:94:5b:bd:32:e4:0c:8d:c3:be:
|
||||
cc:76:32:52:12:69:b0:18:e0:b0:c2:76:34:5a:5f:
|
||||
79:d9:f6:81:9d:02:0a:61:69:1c:33:ce:49:fa:76:
|
||||
03:1e:07:5b:27:0b:bf:34:9e:34:96:b8:03:9b:50:
|
||||
3a:6a:2f:17:7a:14:cf:65:63:00:37:52:a8:73:ce:
|
||||
4b:14:40:f4:d2:9a:56:54:33:b8:77:2e:42:5b:8f:
|
||||
ec:1f:18:f4:ad:ab:8a:4a:8d:6d:70:25:f3:58:e7:
|
||||
cb:66:51:14:7d:16:f4:eb:6d:56:76:76:51:6e:d6:
|
||||
1d:da:d3:8d:c0:64:5a:67:4e:af:e2:bf:33:d1:b8:
|
||||
f6:2a:fc:57:87:a7:35:5e:80:c9:ac:fc:87:c9:71:
|
||||
17:91:bf:b7:4d:a3:ed:3c:1b:27:f4:66:a0:f9:46:
|
||||
03:27:cc:ea:80:f6:4b:40:f6:41:94:cd:bd:0a:b3:
|
||||
ef:26:be:de:6f:69:ae:0f:3f:1c:55:63:33:90:9b:
|
||||
ed:ca:5a:12:4d:de:4b:06:c2:a2:92:b0:42:3d:31:
|
||||
af:a4:15:12:15:f8:8a:e9:88:8d:cf:fd:85:66:50:
|
||||
6f:11:f1:9f:48:f3:b5:ba:9d:86:68:24:a2:5d:a8:
|
||||
7c:54:42:fa:d8:b5:c5:f2:dd:0e:0f:d0:68:e4:54:
|
||||
7e:c5:b9:a0:9b:65:2d:77:f4:8f:b9:30:0a:d5:86:
|
||||
5c:ed:c9:7c:d1:da:9d:0d:63:50:ee:e5:1e:92:63:
|
||||
cc:a2:0c:e8:4a:96:02:4d:dc:8f:df:7c:8f:08:18:
|
||||
a8:30:88:d7:af:89:ad:fc:57:4b:10:f9:f1:cb:48:
|
||||
e8:b6:3b:c8:3f:fc:c2:d3:d1:4a:10:3c:1b:6b:64:
|
||||
dc:e5:65:1e:5b:b2:da:b1:e2:24:97:8f:ee:c0:4b:
|
||||
8e:18:83:7c:17:a6:3c:45:b3:60:06:23:f2:2f:18:
|
||||
13:9e:17:8a:c6:72:79:8c:4d:04:f3:9d:ea:e0:25:
|
||||
d3:33:8c:1e:11:47:63:1f:a5:45:3f:bd:85:b3:fe:
|
||||
a5:68:ee:48:b7:0c:a4:c9:7f:72:d0:75:66:9b:6a:
|
||||
f9:a0:50:f3:a8:59:6d:a3:dd:38:4f:70:2b:bb:ff:
|
||||
92:2e:71:ab:ef:e9:00:ed:0d:d1:b4:6f:f0:8e:b2:
|
||||
09:fb:4d:61:0d:d9:10:d5:54:11:cd:03:94:84:fd:
|
||||
a8:68:e4:45:6e:1e:6a:1e:2f:85:a1:6d:f5:b6:c0:
|
||||
f1:ee:f7:36:e9:fe:c2:f7:ad:cc:13:46:5b:88:42:
|
||||
f0:2d:1f:b5:0e:7e:b5:2b:e4:8d:ab:b9:87:30:6a:
|
||||
3d:12:f4:ad:f3:1c:ac:cc:1a:48:29:2a:96:7b:80:
|
||||
00:0b:6e:59:87:bf:a3:ca:70:99:1b:1c:fd:72:3d:
|
||||
b2:d3:94:4a:cf:55:75:be:1f:40:ec:55:35:48:2d:
|
||||
55:f0:00:da:3c:b0:60:ba:11:32:66:54:0b:be:06:
|
||||
a4:5e:b7:c9:59:bb:4d:f4:92:06:26:48:6e:c2:12:
|
||||
d4:7c:f0:20:b8:a2:e1:bc:6a:b6:19:0e:37:47:55:
|
||||
c9:f2:49:0d:96:75:a2:84:64:bf:34:fc:be:b2:41:
|
||||
e4:f5:88:eb:e1:b7:26:a5:e5:41:c2:20:0c:f6:e2:
|
||||
a8:a5:e7:76:54:a5:fb:4b:80:05:7d:18:85:7a:ba:
|
||||
bc:b7:ad:c0:2f:60:85:cc:15:12:1c:2f:0a:9e:f3:
|
||||
7c:40:cf:f4:3e:23:d2:95:ca:d0:06:58:52:f0:84:
|
||||
d8:0f:3d:eb:ff:12:68:94:79:8f:be:40:29:5f:98:
|
||||
c8:90:6c:05:2f:99:8c:2a:63:78:1f:23:b1:29:c5:
|
||||
e7:49:c9:b2:92:0f:53:0b:d5:71:28:17:c2:19:bf:
|
||||
60:bf:7c:87:a8:ab:c1:f4:0a:c1:b8:d2:68:ee:c1:
|
||||
ce:a7:13:13:17:6d:24:5d:a2:37:a6:d7:7d:48:8b:
|
||||
2b:74:2d:40:2e:ca:19:d5:b6:3e:6c:42:71:fa:cf:
|
||||
85:87:f9:de:80:73:8b:89:f4:70:f0:d8:d7:ff:40:
|
||||
41:9c:c7:15:6d:9b:6e:4c:b5:52:02:99:79:32:73:
|
||||
ca:26:a0:ac:31:6f:c4:b0:f5:da:bb:c2:1f:e0:9f:
|
||||
44:ba:25:f7:9f
|
||||
Exponent: 65537 (0x10001)
|
||||
X509v3 extensions:
|
||||
X509v3 Basic Constraints:
|
||||
CA:FALSE
|
||||
X509v3 Subject Key Identifier:
|
||||
58:12:24:59:A7:3C:29:15:89:5A:C2:12:DB:E7:A5:42:10:21:B7:BA
|
||||
X509v3 Authority Key Identifier:
|
||||
keyid:F2:E2:EA:55:65:A4:9A:E2:AC:9D:97:F5:45:6C:F6:F7:8C:11:AD:DF
|
||||
DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB
|
||||
serial:95:E9:78:F5:34:50:E4:D5
|
||||
|
||||
Signature Algorithm: sha1WithRSAEncryption
|
||||
cd:cb:5c:83:35:ea:cb:cb:c3:a8:c3:95:e2:e6:6f:4d:d8:e4:
|
||||
ee:41:dd:3f:35:82:ac:2f:fd:63:89:4f:3a:19:d7:81:75:b3:
|
||||
a3:fc:36:b2:12:d5:c6:56:bc:13:60:37:33:6e:a0:d8:ae:7c:
|
||||
88:f9:4b:ee:7b:1f:c8:f0:56:19:07:4d:bb:45:52:1c:78:81:
|
||||
07:7c:13:86:b8:86:70:85:e4:71:25:58:78:d1:be:de:22:82:
|
||||
6d:1a:4b:06:ac:f0:e8:50:87:c7:69:64:c2:61:43:cd:96:06:
|
||||
a6:7e:09:a9:02:01:2a:a2:40:f3:cd:10:80:48:d0:34:55:40:
|
||||
b9:ce
|
||||
Signature Algorithm: md5WithRSAEncryption
|
||||
08:75:dc:b9:3f:aa:b6:7e:81:7a:39:d1:ee:ed:44:b6:ce:1b:
|
||||
37:c4:4c:19:d0:66:e6:eb:b5:4f:2a:ef:95:58:64:21:55:01:
|
||||
12:30:ac:8a:95:d1:06:de:29:46:a4:f1:7d:7f:b0:1e:d2:4e:
|
||||
fb:f6:fa:9a:74:be:85:62:db:0b:82:90:58:62:c5:5f:f1:80:
|
||||
02:9f:c5:fb:f3:6b:b0:b4:3b:04:b1:e5:53:c2:d0:00:a1:1a:
|
||||
9d:65:60:6f:73:98:67:e0:9c:c8:12:94:79:59:bf:43:7b:f5:
|
||||
77:c8:8f:df:b1:cd:11:1c:01:19:99:c2:22:42:f7:41:ae:b4:
|
||||
b8:1a
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIGJTCCBY6gAwIBAgIBBDANBgkqhkiG9w0BAQUFADBEMQswCQYDVQQGEwJTRTEQ
|
||||
MA4GA1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlT
|
||||
UUwgQUIwHhcNMDkwMTI4MTExMjI3WhcNMTAwMTI4MTExMjI3WjBDMQswCQYDVQQG
|
||||
EwJTRTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxDzANBgNV
|
||||
BAMTBnNlcnZlcjCCBCIwDQYJKoZIhvcNAQEBBQADggQPADCCBAoCggQBAMCPIgMk
|
||||
WWdGFNaPYAlYBgdF8XhxVfHquTCKzcM8ub9lbhjtoLjJGVZvxJAZyGUJ2/+/gqEI
|
||||
rQFPWqPUPXh+S0oBpH3oewU+fdi5VVhg1hzO6DJiLBlg8+0FmW3JdwcuEW0Lmsdo
|
||||
OEbo+jGA3+h58PH9qZTD+g31eKxJftUX/eHuRPPHDjAyXakZJeS7IR3+PIRIQPVY
|
||||
9L8TjIVou+z13cY40bB3H6aOT43ib0l09T+QZY6ZHlmcHLUmJMSx3h77lmXEMRQa
|
||||
U7heYorHBPe0NqSvB8gnBu3d5vSMYvFlQNCfn6kUyI6LdNZnWtDJTTWh1Xs5OkKf
|
||||
5ND0xg8uQjBLVrI9bY4tWMVpmTVJlZWZtocpKzLRUAjNJRRIbRCZhWE8QSYhVcwf
|
||||
z62wL7mJ2E6gGP91HbaXfMX6i9yTF4YKZNQJNdWDNG1cbcaMzbnswpPGwbfMBG8i
|
||||
4Ae/4NmbL9WgUMz58JWDj/Qwg3KU17VL2syfVDuNeHcLJGwPwpZhli+4X7V6q3pb
|
||||
l3qprUCL8tbGjYHZlGGPnQPFuRADaIO/BIHMrL00iejUjUMg4rakET0VKoIM1jpq
|
||||
jGLUk7zDgL8btCsKejTwzR6CPyUP0QSoCgUZsNYWgzmvC0V9yxR+TaqqwjmoRjir
|
||||
vasqvTRDf9ol3iv7aTv+O4f9mJR2Sr8EozHjOv9vBPr6JOQqiekOv0RMcoWCPIlK
|
||||
A2MBQZJT0IJgbtj/jKK0Gjsgba50kjBOSONRpstzlwYTAzIjm32ixzqpr5eMUe3+
|
||||
+rS0GqOH/M+MjuaAFQP9/n29sXbxX7MJK0xNp3y1crHW2zjAZ6RUvIcJpTm6Gn4/
|
||||
dGCtPUu+lFPzZBbHMzXsQQCVtt6ZYqJ6KJpFTfrNpnf23lhyUMh9aTjbBwSE2E05
|
||||
91ATQ64tr0WkKjlWPLi32CakNskjqqq4SQshup56K39NKZ8OAB60Xqb6Sf6N5XRX
|
||||
2LrZkizSrIQd8qakRBy/iEEyftHDL268D10Zpo90K2e63anbaLXOnSVI31QI0B1P
|
||||
LlskvAUP+1hG+gLKU5MpzxAnwqAY0PXUuTxe345s9Xy5tFTMORZdPNqWs8Ns1HBd
|
||||
0zCnpr1v3UG8qN5CYFmahSUNKkXDBbRuekpNyowK5Ww0vCCbbUrKyramOqDbww4g
|
||||
GhIbd93LHX/DDQ3nwf2W0sdogJmg2YozIaOLolqnficGAn/tYBE3NFQXf02QFB5p
|
||||
Nw268Cvwoy1iech2qOrI5zsfxk/CDNes8HdTXfBQtN+bA8pNQeEYsiUwhh1j5Wex
|
||||
U81rToMauV4tBRVr1I6xl/wxA1fLvyd/zV8nfmbnPBcJthEqTzPN6xrTb9UVi4vO
|
||||
aGt+mpXldH8XV9kCAwEAAaOBozCBoDAJBgNVHRMEAjAAMB0GA1UdDgQWBBRYEiRZ
|
||||
pzwpFYlawhLb56VCECG3ujB0BgNVHSMEbTBrgBTy4upVZaSa4qydl/VFbPb3jBGt
|
||||
36FIpEYwRDELMAkGA1UEBhMCU0UxEDAOBgNVBAgTB1VwcHNhbGExEDAOBgNVBAcT
|
||||
B1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCggkAlel49TRQ5NUwDQYJKoZIhvcN
|
||||
AQEFBQADgYEAzctcgzXqy8vDqMOV4uZvTdjk7kHdPzWCrC/9Y4lPOhnXgXWzo/w2
|
||||
shLVxla8E2A3M26g2K58iPlL7nsfyPBWGQdNu0VSHHiBB3wThriGcIXkcSVYeNG+
|
||||
3iKCbRpLBqzw6FCHx2lkwmFDzZYGpn4JqQIBKqJA880QgEjQNFVAuc4=
|
||||
MIIFfDCCBOUCAxAAAzANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G
|
||||
A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg
|
||||
QUIwHhcNMTAwMTI5MTIwMTUzWhcNMTUwMTI4MTIwMTUzWjBDMQswCQYDVQQGEwJT
|
||||
RTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIxDzANBgNVBAMT
|
||||
BnNlcnZlcjCCBCIwDQYJKoZIhvcNAQEBBQADggQPADCCBAoCggQBAMqqHcQR7JHw
|
||||
x/9fkJL8QAxetz0AxSDVD4kxB9dBTItggKo4FN6Ta5x0iEFotQJBAS2GonqVU157
|
||||
Zy9sHilR+UT9SoC+siOhPhs4z4jEce74a0HFLcDDUqxZfYE0GZUyuJpRtkE21MSh
|
||||
roTmOLnov5a+GXprd03g3uaztmu8Pd1ovEvE6/U2k+1WohVQihDo1iLtbLHNwxjJ
|
||||
9grh3mFlYtYUQYy1+xRowc8SXUEhnVcRQ327Qywhu8NEfajPH8NxdbVHwn3OODxz
|
||||
ZJ4V2Kcnz71AyEUI48g5qAuOwlt78UeREpHM4QDglFu9MuQMjcO+zHYyUhJpsBjg
|
||||
sMJ2NFpfedn2gZ0CCmFpHDPOSfp2Ax4HWycLvzSeNJa4A5tQOmovF3oUz2VjADdS
|
||||
qHPOSxRA9NKaVlQzuHcuQluP7B8Y9K2rikqNbXAl81jny2ZRFH0W9OttVnZ2UW7W
|
||||
HdrTjcBkWmdOr+K/M9G49ir8V4enNV6Ayaz8h8lxF5G/t02j7TwbJ/RmoPlGAyfM
|
||||
6oD2S0D2QZTNvQqz7ya+3m9prg8/HFVjM5Cb7cpaEk3eSwbCopKwQj0xr6QVEhX4
|
||||
iumIjc/9hWZQbxHxn0jztbqdhmgkol2ofFRC+ti1xfLdDg/QaORUfsW5oJtlLXf0
|
||||
j7kwCtWGXO3JfNHanQ1jUO7lHpJjzKIM6EqWAk3cj998jwgYqDCI16+JrfxXSxD5
|
||||
8ctI6LY7yD/8wtPRShA8G2tk3OVlHluy2rHiJJeP7sBLjhiDfBemPEWzYAYj8i8Y
|
||||
E54XisZyeYxNBPOd6uAl0zOMHhFHYx+lRT+9hbP+pWjuSLcMpMl/ctB1Zptq+aBQ
|
||||
86hZbaPdOE9wK7v/ki5xq+/pAO0N0bRv8I6yCftNYQ3ZENVUEc0DlIT9qGjkRW4e
|
||||
ah4vhaFt9bbA8e73Nun+wvetzBNGW4hC8C0ftQ5+tSvkjau5hzBqPRL0rfMcrMwa
|
||||
SCkqlnuAAAtuWYe/o8pwmRsc/XI9stOUSs9Vdb4fQOxVNUgtVfAA2jywYLoRMmZU
|
||||
C74GpF63yVm7TfSSBiZIbsIS1HzwILii4bxqthkON0dVyfJJDZZ1ooRkvzT8vrJB
|
||||
5PWI6+G3JqXlQcIgDPbiqKXndlSl+0uABX0YhXq6vLetwC9ghcwVEhwvCp7zfEDP
|
||||
9D4j0pXK0AZYUvCE2A896/8SaJR5j75AKV+YyJBsBS+ZjCpjeB8jsSnF50nJspIP
|
||||
UwvVcSgXwhm/YL98h6irwfQKwbjSaO7BzqcTExdtJF2iN6bXfUiLK3QtQC7KGdW2
|
||||
PmxCcfrPhYf53oBzi4n0cPDY1/9AQZzHFW2bbky1UgKZeTJzyiagrDFvxLD12rvC
|
||||
H+CfRLol958CAwEAATANBgkqhkiG9w0BAQQFAAOBgQAIddy5P6q2foF6OdHu7US2
|
||||
zhs3xEwZ0Gbm67VPKu+VWGQhVQESMKyKldEG3ilGpPF9f7Ae0k779vqadL6FYtsL
|
||||
gpBYYsVf8YACn8X782uwtDsEseVTwtAAoRqdZWBvc5hn4JzIEpR5Wb9De/V3yI/f
|
||||
sc0RHAEZmcIiQvdBrrS4Gg==
|
||||
-----END CERTIFICATE-----
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user