mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
bzr merge -r4346 maria/10.0 (maria-10.0.13)
This commit is contained in:
@ -1470,3 +1470,4 @@ libmysql/libmysql_versions.ld
|
|||||||
scripts/mysql_config.pl
|
scripts/mysql_config.pl
|
||||||
pcre/pcre_chartables.c
|
pcre/pcre_chartables.c
|
||||||
pcre/test*grep
|
pcre/test*grep
|
||||||
|
import_executables.cmake
|
||||||
|
@ -26,6 +26,14 @@ IF(POLICY CMP0022)
|
|||||||
CMAKE_POLICY(SET CMP0022 OLD)
|
CMAKE_POLICY(SET CMP0022 OLD)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
# We use the LOCATION target property (CMP0026)
|
||||||
|
# and get_target_property() for non-existent targets (CMP0045)
|
||||||
|
IF(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
|
||||||
|
CMAKE_VERSION VERSION_GREATER "3.0.0")
|
||||||
|
CMAKE_POLICY(SET CMP0026 OLD)
|
||||||
|
CMAKE_POLICY(SET CMP0045 OLD)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
|
MESSAGE(STATUS "Running cmake version ${CMAKE_VERSION}")
|
||||||
|
|
||||||
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake)
|
||||||
@ -268,8 +276,10 @@ IF (ENABLE_GCOV AND NOT WIN32 AND NOT APPLE)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
MY_CHECK_C_COMPILER_FLAG(-ggdb3 HAVE_GGDB3)
|
MY_CHECK_C_COMPILER_FLAG(-ggdb3 HAVE_GGDB3)
|
||||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3")
|
IF(HAVE_GGDB3)
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3")
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -ggdb3")
|
||||||
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb3")
|
||||||
|
ENDIF(HAVE_GGDB3)
|
||||||
|
|
||||||
OPTION(ENABLED_LOCAL_INFILE
|
OPTION(ENABLED_LOCAL_INFILE
|
||||||
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
|
"If we should should enable LOAD DATA LOCAL by default" ${IF_WIN})
|
||||||
@ -310,16 +320,11 @@ ENDIF()
|
|||||||
# safemalloc can be enabled and disabled independently
|
# safemalloc can be enabled and disabled independently
|
||||||
SET(WITH_SAFEMALLOC "AUTO" CACHE STRING "Use safemalloc memory debugger. Will result in slower execution. Options are: ON OFF AUTO.")
|
SET(WITH_SAFEMALLOC "AUTO" CACHE STRING "Use safemalloc memory debugger. Will result in slower execution. Options are: ON OFF AUTO.")
|
||||||
|
|
||||||
# force -DUSE_MYSYS_NEW unless already done by HAVE_CXX_NEW
|
|
||||||
IF(HAVE_CXX_NEW)
|
|
||||||
SET(DUSE_MYSYS_NEW "-DUSE_MYSYS_NEW")
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF(WITH_SAFEMALLOC MATCHES "ON")
|
IF(WITH_SAFEMALLOC MATCHES "ON")
|
||||||
ADD_DEFINITIONS( -DSAFEMALLOC ${DUSE_MYSYS_NEW})
|
ADD_DEFINITIONS( -DSAFEMALLOC)
|
||||||
ELSEIF(WITH_SAFEMALLOC MATCHES "AUTO" AND NOT WIN32 AND NOT WITH_VALGRIND)
|
ELSEIF(WITH_SAFEMALLOC MATCHES "AUTO" AND NOT WIN32 AND NOT WITH_VALGRIND)
|
||||||
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC")
|
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC")
|
||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC ${DUSE_MYSYS_NEW}")
|
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Set commonly used variables
|
# Set commonly used variables
|
||||||
@ -357,6 +362,11 @@ ENDIF()
|
|||||||
# Run platform tests
|
# Run platform tests
|
||||||
INCLUDE(configure.cmake)
|
INCLUDE(configure.cmake)
|
||||||
|
|
||||||
|
# force -DUSE_MYSYS_NEW unless already done by HAVE_CXX_NEW
|
||||||
|
IF(NOT HAVE_CXX_NEW)
|
||||||
|
ADD_DEFINITIONS(-DUSE_MYSYS_NEW)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Find header files from the bundled libraries
|
# Find header files from the bundled libraries
|
||||||
# (jemalloc, yassl, readline, pcre, etc)
|
# (jemalloc, yassl, readline, pcre, etc)
|
||||||
# before the ones installed in the system
|
# before the ones installed in the system
|
||||||
@ -393,6 +403,11 @@ ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO")
|
|||||||
SET(CMAKE_CXX_FLAGS_DEBUG "${MY_MAINTAINER_CXX_WARNINGS} ${CMAKE_CXX_FLAGS_DEBUG}")
|
SET(CMAKE_CXX_FLAGS_DEBUG "${MY_MAINTAINER_CXX_WARNINGS} ${CMAKE_CXX_FLAGS_DEBUG}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
IF(CMAKE_CROSSCOMPILING)
|
||||||
|
SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Path to import_executables.cmake from a native build")
|
||||||
|
INCLUDE(${IMPORT_EXECUTABLES})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(WITH_UNIT_TESTS)
|
IF(WITH_UNIT_TESTS)
|
||||||
ENABLE_TESTING()
|
ENABLE_TESTING()
|
||||||
ADD_SUBDIRECTORY(unittest/mytap)
|
ADD_SUBDIRECTORY(unittest/mytap)
|
||||||
@ -444,7 +459,6 @@ IF(NOT WITHOUT_SERVER)
|
|||||||
IF(EXISTS ${CMAKE_SOURCE_DIR}/internal/CMakeLists.txt)
|
IF(EXISTS ${CMAKE_SOURCE_DIR}/internal/CMakeLists.txt)
|
||||||
ADD_SUBDIRECTORY(internal)
|
ADD_SUBDIRECTORY(internal)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ADD_SUBDIRECTORY(packaging/rpm-uln)
|
|
||||||
ADD_SUBDIRECTORY(packaging/rpm-oel)
|
ADD_SUBDIRECTORY(packaging/rpm-oel)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
@ -461,6 +475,13 @@ IF(WIN32)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
ADD_SUBDIRECTORY(packaging/solaris)
|
ADD_SUBDIRECTORY(packaging/solaris)
|
||||||
|
|
||||||
|
IF(NOT CMAKE_CROSSCOMPILING)
|
||||||
|
SET(EXPORTED comp_err comp_sql factorial gen_lex_hash)
|
||||||
|
# minimal target to build only binaries for export
|
||||||
|
ADD_CUSTOM_TARGET(import_executables DEPENDS ${EXPORTED})
|
||||||
|
EXPORT(TARGETS ${EXPORTED} FILE ${CMAKE_BINARY_DIR}/import_executables.cmake)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/my_config.h)
|
CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/my_config.h)
|
||||||
CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/config.h)
|
CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/config.h)
|
||||||
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/mysql_version.h.in
|
||||||
|
4
VERSION
4
VERSION
@ -1,7 +1,3 @@
|
|||||||
# Version number for MariaDB is maintained here.
|
|
||||||
# The version string is created from:
|
|
||||||
# MYSQL_VERSION_MAJOR.MYSQL_VERSION_MINOR.MYSQL_VERSION_PATCH-MYSQL_VERSION_EXTRA
|
|
||||||
#
|
|
||||||
MYSQL_VERSION_MAJOR=10
|
MYSQL_VERSION_MAJOR=10
|
||||||
MYSQL_VERSION_MINOR=0
|
MYSQL_VERSION_MINOR=0
|
||||||
MYSQL_VERSION_PATCH=13
|
MYSQL_VERSION_PATCH=13
|
||||||
|
@ -92,6 +92,7 @@ enum options_client
|
|||||||
OPT_REPORT_PROGRESS,
|
OPT_REPORT_PROGRESS,
|
||||||
OPT_SKIP_ANNOTATE_ROWS_EVENTS,
|
OPT_SKIP_ANNOTATE_ROWS_EVENTS,
|
||||||
OPT_SSL_CRL, OPT_SSL_CRLPATH,
|
OPT_SSL_CRL, OPT_SSL_CRLPATH,
|
||||||
|
OPT_USE_GTID,
|
||||||
OPT_GALERA_SST_MODE,
|
OPT_GALERA_SST_MODE,
|
||||||
OPT_MAX_CLIENT_OPTION /* should be always the last */
|
OPT_MAX_CLIENT_OPTION /* should be always the last */
|
||||||
};
|
};
|
||||||
|
@ -206,12 +206,12 @@ static void die(const char *fmt, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void verbose(const char *fmt, ...)
|
static int verbose(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
if (opt_silent)
|
if (opt_silent)
|
||||||
return;
|
return 0;
|
||||||
|
|
||||||
/* Print the verbose message */
|
/* Print the verbose message */
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -222,6 +222,7 @@ static void verbose(const char *fmt, ...)
|
|||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -741,20 +742,19 @@ static void print_conn_args(const char *tool_name)
|
|||||||
in the server using "mysqlcheck --check-upgrade .."
|
in the server using "mysqlcheck --check-upgrade .."
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int run_mysqlcheck_upgrade(void)
|
static int run_mysqlcheck_upgrade(const char *arg1, const char *arg2)
|
||||||
{
|
{
|
||||||
verbose("Phase 2/3: Checking and upgrading tables");
|
|
||||||
print_conn_args("mysqlcheck");
|
print_conn_args("mysqlcheck");
|
||||||
return run_tool(mysqlcheck_path,
|
return run_tool(mysqlcheck_path,
|
||||||
NULL, /* Send output from mysqlcheck directly to screen */
|
NULL, /* Send output from mysqlcheck directly to screen */
|
||||||
"--no-defaults",
|
"--no-defaults",
|
||||||
ds_args.str,
|
ds_args.str,
|
||||||
"--check-upgrade",
|
"--check-upgrade",
|
||||||
"--all-databases",
|
|
||||||
"--auto-repair",
|
"--auto-repair",
|
||||||
!opt_silent || opt_verbose ? "--verbose": "",
|
!opt_silent || opt_verbose ? "--verbose": "",
|
||||||
opt_silent ? "--silent": "",
|
opt_silent ? "--silent": "",
|
||||||
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
opt_write_binlog ? "--write-binlog" : "--skip-write-binlog",
|
||||||
|
arg1, arg2,
|
||||||
"2>&1",
|
"2>&1",
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
@ -762,7 +762,7 @@ static int run_mysqlcheck_upgrade(void)
|
|||||||
|
|
||||||
static int run_mysqlcheck_fixnames(void)
|
static int run_mysqlcheck_fixnames(void)
|
||||||
{
|
{
|
||||||
verbose("Phase 1/3: Fixing table and database names");
|
verbose("Phase 2/3: Fixing table and database names");
|
||||||
print_conn_args("mysqlcheck");
|
print_conn_args("mysqlcheck");
|
||||||
return run_tool(mysqlcheck_path,
|
return run_tool(mysqlcheck_path,
|
||||||
NULL, /* Send output from mysqlcheck directly to screen */
|
NULL, /* Send output from mysqlcheck directly to screen */
|
||||||
@ -848,7 +848,6 @@ static int run_sql_fix_privilege_tables(void)
|
|||||||
if (init_dynamic_string(&ds_result, "", 512, 512))
|
if (init_dynamic_string(&ds_result, "", 512, 512))
|
||||||
die("Out of memory");
|
die("Out of memory");
|
||||||
|
|
||||||
verbose("Phase 3/3: Running 'mysql_fix_privilege_tables'...");
|
|
||||||
/*
|
/*
|
||||||
Individual queries can not be executed independently by invoking
|
Individual queries can not be executed independently by invoking
|
||||||
a forked mysql client, because the script uses session variables
|
a forked mysql client, because the script uses session variables
|
||||||
@ -995,16 +994,12 @@ int main(int argc, char **argv)
|
|||||||
/* Find mysql */
|
/* Find mysql */
|
||||||
find_tool(mysql_path, IF_WIN("mysql.exe", "mysql"), self_name);
|
find_tool(mysql_path, IF_WIN("mysql.exe", "mysql"), self_name);
|
||||||
|
|
||||||
if (!opt_systables_only)
|
|
||||||
{
|
|
||||||
/* Find mysqlcheck */
|
/* Find mysqlcheck */
|
||||||
find_tool(mysqlcheck_path, IF_WIN("mysqlcheck.exe", "mysqlcheck"), self_name);
|
find_tool(mysqlcheck_path, IF_WIN("mysqlcheck.exe", "mysqlcheck"), self_name);
|
||||||
}
|
|
||||||
else
|
if (opt_systables_only && !opt_silent)
|
||||||
{
|
printf("The --upgrade-system-tables option was used, user tables won't be touched.\n");
|
||||||
if (!opt_silent)
|
|
||||||
printf("The --upgrade-system-tables option was used, databases won't be touched.\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Read the mysql_upgrade_info file to check if mysql_upgrade
|
Read the mysql_upgrade_info file to check if mysql_upgrade
|
||||||
@ -1024,16 +1019,16 @@ int main(int argc, char **argv)
|
|||||||
/*
|
/*
|
||||||
Run "mysqlcheck" and "mysql_fix_privilege_tables.sql"
|
Run "mysqlcheck" and "mysql_fix_privilege_tables.sql"
|
||||||
*/
|
*/
|
||||||
if ((!opt_systables_only &&
|
verbose("Phase 1/3: Running 'mysql_fix_privilege_tables'...");
|
||||||
(run_mysqlcheck_fixnames() || run_mysqlcheck_upgrade())) ||
|
if (run_mysqlcheck_upgrade("--databases", "mysql") ||
|
||||||
run_sql_fix_privilege_tables())
|
run_sql_fix_privilege_tables())
|
||||||
{
|
|
||||||
/*
|
|
||||||
The upgrade failed to complete in some way or another,
|
|
||||||
significant error message should have been printed to the screen
|
|
||||||
*/
|
|
||||||
die("Upgrade failed" );
|
die("Upgrade failed" );
|
||||||
}
|
if (!opt_systables_only &&
|
||||||
|
(run_mysqlcheck_fixnames() ||
|
||||||
|
verbose("Phase 3/3: Checking and upgrading tables") ||
|
||||||
|
run_mysqlcheck_upgrade("--all-databases","--skip-database=mysql")))
|
||||||
|
die("Upgrade failed" );
|
||||||
|
|
||||||
verbose("OK");
|
verbose("OK");
|
||||||
|
|
||||||
/* Create a file indicating upgrade has been performed */
|
/* Create a file indicating upgrade has been performed */
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2000, 2012, Oracle and/or its affiliates.
|
Copyright (c) 2000, 2014, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2010, 2012, Monty Program Ab.
|
Copyright (c) 2010, 2014, Monty Program Ab.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -71,6 +71,7 @@ extern "C" my_bool get_one_option(int optid, const struct my_option *opt,
|
|||||||
char *argument);
|
char *argument);
|
||||||
static my_bool sql_connect(MYSQL *mysql, uint wait);
|
static my_bool sql_connect(MYSQL *mysql, uint wait);
|
||||||
static int execute_commands(MYSQL *mysql,int argc, char **argv);
|
static int execute_commands(MYSQL *mysql,int argc, char **argv);
|
||||||
|
static char **mask_password(int argc, char ***argv);
|
||||||
static int drop_db(MYSQL *mysql,const char *db);
|
static int drop_db(MYSQL *mysql,const char *db);
|
||||||
extern "C" sig_handler endprog(int signal_number);
|
extern "C" sig_handler endprog(int signal_number);
|
||||||
static void nice_time(ulong sec,char *buff);
|
static void nice_time(ulong sec,char *buff);
|
||||||
@ -306,9 +307,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||||||
|
|
||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
int error= 0;
|
int error= 0, temp_argc;
|
||||||
MYSQL mysql;
|
MYSQL mysql;
|
||||||
char **commands, **save_argv;
|
char **commands, **save_argv, **temp_argv;
|
||||||
|
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
mysql_init(&mysql);
|
mysql_init(&mysql);
|
||||||
@ -316,8 +317,12 @@ int main(int argc,char *argv[])
|
|||||||
if ((error= load_defaults("my",load_default_groups,&argc,&argv)))
|
if ((error= load_defaults("my",load_default_groups,&argc,&argv)))
|
||||||
goto err1;
|
goto err1;
|
||||||
save_argv = argv; /* Save for free_defaults */
|
save_argv = argv; /* Save for free_defaults */
|
||||||
|
|
||||||
if ((error=handle_options(&argc, &argv, my_long_options, get_one_option)))
|
if ((error=handle_options(&argc, &argv, my_long_options, get_one_option)))
|
||||||
goto err2;
|
goto err2;
|
||||||
|
temp_argv= mask_password(argc, &argv);
|
||||||
|
temp_argc= argc;
|
||||||
|
|
||||||
if (debug_info_flag)
|
if (debug_info_flag)
|
||||||
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
|
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
|
||||||
if (debug_check_flag)
|
if (debug_check_flag)
|
||||||
@ -328,7 +333,7 @@ int main(int argc,char *argv[])
|
|||||||
usage();
|
usage();
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
commands = argv;
|
commands = temp_argv;
|
||||||
if (tty_password)
|
if (tty_password)
|
||||||
opt_password = get_tty_password(NullS);
|
opt_password = get_tty_password(NullS);
|
||||||
|
|
||||||
@ -475,6 +480,13 @@ int main(int argc,char *argv[])
|
|||||||
} /* got connection */
|
} /* got connection */
|
||||||
|
|
||||||
mysql_close(&mysql);
|
mysql_close(&mysql);
|
||||||
|
temp_argc--;
|
||||||
|
while(temp_argc >= 0)
|
||||||
|
{
|
||||||
|
my_free(temp_argv[temp_argc]);
|
||||||
|
temp_argc--;
|
||||||
|
}
|
||||||
|
my_free(temp_argv);
|
||||||
err2:
|
err2:
|
||||||
mysql_library_end();
|
mysql_library_end();
|
||||||
my_free(opt_password);
|
my_free(opt_password);
|
||||||
@ -1216,6 +1228,47 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@brief Masking the password if it is passed as command line argument.
|
||||||
|
|
||||||
|
@details It works in Linux and changes cmdline in ps and /proc/pid/cmdline,
|
||||||
|
but it won't work for history file of shell.
|
||||||
|
The command line arguments are copied to another array and the
|
||||||
|
password in the argv is masked. This function is called just after
|
||||||
|
"handle_options" because in "handle_options", the agrv pointers
|
||||||
|
are altered which makes freeing of dynamically allocated memory
|
||||||
|
difficult. The password masking is done before all other operations
|
||||||
|
in order to minimise the time frame of password visibility via cmdline.
|
||||||
|
|
||||||
|
@param argc command line options (count)
|
||||||
|
@param argv command line options (values)
|
||||||
|
|
||||||
|
@return temp_argv copy of argv
|
||||||
|
*/
|
||||||
|
|
||||||
|
static char **mask_password(int argc, char ***argv)
|
||||||
|
{
|
||||||
|
char **temp_argv;
|
||||||
|
temp_argv= (char **)(my_malloc(sizeof(char *) * argc, MYF(MY_WME)));
|
||||||
|
argc--;
|
||||||
|
while (argc > 0)
|
||||||
|
{
|
||||||
|
temp_argv[argc]= my_strdup((*argv)[argc], MYF(MY_FAE));
|
||||||
|
if (find_type((*argv)[argc - 1],&command_typelib, FIND_TYPE_BASIC) == ADMIN_PASSWORD ||
|
||||||
|
find_type((*argv)[argc - 1],&command_typelib, FIND_TYPE_BASIC) == ADMIN_OLD_PASSWORD)
|
||||||
|
{
|
||||||
|
char *start= (*argv)[argc];
|
||||||
|
while (*start)
|
||||||
|
*start++= 'x';
|
||||||
|
start= (*argv)[argc];
|
||||||
|
if (*start)
|
||||||
|
start[1]= 0; /* Cut length of argument */
|
||||||
|
}
|
||||||
|
argc--;
|
||||||
|
}
|
||||||
|
temp_argv[argc]= my_strdup((*argv)[argc], MYF(MY_FAE));
|
||||||
|
return(temp_argv);
|
||||||
|
}
|
||||||
|
|
||||||
static void print_version(void)
|
static void print_version(void)
|
||||||
{
|
{
|
||||||
|
@ -51,6 +51,7 @@ static char *opt_password = 0, *current_user = 0,
|
|||||||
*default_charset= 0, *current_host= 0;
|
*default_charset= 0, *current_host= 0;
|
||||||
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
static char *opt_plugin_dir= 0, *opt_default_auth= 0;
|
||||||
static int first_error = 0;
|
static int first_error = 0;
|
||||||
|
static char *opt_skip_database;
|
||||||
DYNAMIC_ARRAY tables4repair, tables4rebuild, alter_table_cmds;
|
DYNAMIC_ARRAY tables4repair, tables4rebuild, alter_table_cmds;
|
||||||
static char *shared_memory_base_name=0;
|
static char *shared_memory_base_name=0;
|
||||||
static uint opt_protocol=0;
|
static uint opt_protocol=0;
|
||||||
@ -178,6 +179,9 @@ static struct my_option my_long_options[] =
|
|||||||
#endif
|
#endif
|
||||||
{"silent", 's', "Print only error messages.", &opt_silent,
|
{"silent", 's', "Print only error messages.", &opt_silent,
|
||||||
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
&opt_silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"skip_database", 0, "Don't process the database specified as argument",
|
||||||
|
&opt_skip_database, &opt_skip_database, 0, GET_STR, REQUIRED_ARG,
|
||||||
|
0, 0, 0, 0, 0, 0},
|
||||||
{"socket", 'S', "The socket file to use for connection.",
|
{"socket", 'S', "The socket file to use for connection.",
|
||||||
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR,
|
&opt_mysql_unix_port, &opt_mysql_unix_port, 0, GET_STR,
|
||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -246,6 +250,9 @@ static void usage(void)
|
|||||||
puts("mysqlrepair: The default option will be -r");
|
puts("mysqlrepair: The default option will be -r");
|
||||||
puts("mysqlanalyze: The default option will be -a");
|
puts("mysqlanalyze: The default option will be -a");
|
||||||
puts("mysqloptimize: The default option will be -o\n");
|
puts("mysqloptimize: The default option will be -o\n");
|
||||||
|
printf("Usage: %s [OPTIONS] database [tables]\n", my_progname);
|
||||||
|
printf("OR %s [OPTIONS] --databases DB1 [DB2 DB3...]\n",
|
||||||
|
my_progname);
|
||||||
puts("Please consult the MariaDB/MySQL knowledgebase at");
|
puts("Please consult the MariaDB/MySQL knowledgebase at");
|
||||||
puts("http://kb.askmonty.org/v/mysqlcheck for latest information about");
|
puts("http://kb.askmonty.org/v/mysqlcheck for latest information about");
|
||||||
puts("this program.");
|
puts("this program.");
|
||||||
@ -696,6 +703,9 @@ static int process_one_db(char *database)
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("process_one_db");
|
DBUG_ENTER("process_one_db");
|
||||||
|
|
||||||
|
if (opt_skip_database && !strcmp(database, opt_skip_database))
|
||||||
|
DBUG_RETURN(0);
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
puts(database);
|
puts(database);
|
||||||
if (what_to_do == DO_UPGRADE)
|
if (what_to_do == DO_UPGRADE)
|
||||||
|
@ -87,6 +87,9 @@
|
|||||||
/* Chars needed to store LONGLONG, excluding trailing '\0'. */
|
/* Chars needed to store LONGLONG, excluding trailing '\0'. */
|
||||||
#define LONGLONG_LEN 20
|
#define LONGLONG_LEN 20
|
||||||
|
|
||||||
|
/* Max length GTID position that we will output. */
|
||||||
|
#define MAX_GTID_LENGTH 1024
|
||||||
|
|
||||||
static void add_load_option(DYNAMIC_STRING *str, const char *option,
|
static void add_load_option(DYNAMIC_STRING *str, const char *option,
|
||||||
const char *option_value);
|
const char *option_value);
|
||||||
static ulong find_set(TYPELIB *lib, const char *x, uint length,
|
static ulong find_set(TYPELIB *lib, const char *x, uint length,
|
||||||
@ -135,6 +138,7 @@ static ulong opt_compatible_mode= 0;
|
|||||||
#define MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL 2
|
#define MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL 2
|
||||||
static uint opt_mysql_port= 0, opt_master_data;
|
static uint opt_mysql_port= 0, opt_master_data;
|
||||||
static uint opt_slave_data;
|
static uint opt_slave_data;
|
||||||
|
static uint opt_use_gtid;
|
||||||
static uint my_end_arg;
|
static uint my_end_arg;
|
||||||
static char * opt_mysql_unix_port=0;
|
static char * opt_mysql_unix_port=0;
|
||||||
static int first_error=0;
|
static int first_error=0;
|
||||||
@ -355,6 +359,13 @@ static struct my_option my_long_options[] =
|
|||||||
"server receiving the resulting dump.",
|
"server receiving the resulting dump.",
|
||||||
&opt_galera_sst_mode, &opt_galera_sst_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
&opt_galera_sst_mode, &opt_galera_sst_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||||
0, 0, 0},
|
0, 0, 0},
|
||||||
|
{"gtid", OPT_USE_GTID, "Used together with --master-data=1 or --dump-slave=1."
|
||||||
|
"When enabled, the output from those options will set the GTID position "
|
||||||
|
"instead of the binlog file and offset; the file/offset will appear only as "
|
||||||
|
"a comment. When disabled, the GTID position will still appear in the "
|
||||||
|
"output, but only commented.",
|
||||||
|
&opt_use_gtid, &opt_use_gtid, 0, GET_BOOL, NO_ARG,
|
||||||
|
0, 0, 0, 0, 0, 0},
|
||||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, "
|
{"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, "
|
||||||
@ -1186,7 +1197,7 @@ check_consistent_binlog_pos(char *binlog_pos_file, char *binlog_pos_offset)
|
|||||||
|
|
||||||
if (mysql_query_with_error_report(mysql, &res,
|
if (mysql_query_with_error_report(mysql, &res,
|
||||||
"SHOW STATUS LIKE 'binlog_snapshot_%'"))
|
"SHOW STATUS LIKE 'binlog_snapshot_%'"))
|
||||||
return 1;
|
return 0;
|
||||||
|
|
||||||
found= 0;
|
found= 0;
|
||||||
while ((row= mysql_fetch_row(res)))
|
while ((row= mysql_fetch_row(res)))
|
||||||
@ -1209,6 +1220,90 @@ check_consistent_binlog_pos(char *binlog_pos_file, char *binlog_pos_offset)
|
|||||||
return (found == 2);
|
return (found == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get the GTID position corresponding to a given old-style binlog position.
|
||||||
|
This uses BINLOG_GTID_POS(). The advantage is that the GTID position can
|
||||||
|
be obtained completely non-blocking in this way (without the need for
|
||||||
|
FLUSH TABLES WITH READ LOCK), as the old-style position can be obtained
|
||||||
|
with START TRANSACTION WITH CONSISTENT SNAPSHOT.
|
||||||
|
|
||||||
|
Returns 0 if ok, non-zero if error.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
get_binlog_gtid_pos(char *binlog_pos_file, char *binlog_pos_offset,
|
||||||
|
char *out_gtid_pos)
|
||||||
|
{
|
||||||
|
DYNAMIC_STRING query;
|
||||||
|
MYSQL_RES *res;
|
||||||
|
MYSQL_ROW row;
|
||||||
|
int err;
|
||||||
|
char file_buf[FN_REFLEN*2+1], offset_buf[LONGLONG_LEN*2+1];
|
||||||
|
size_t len_pos_file= strlen(binlog_pos_file);
|
||||||
|
size_t len_pos_offset= strlen(binlog_pos_offset);
|
||||||
|
|
||||||
|
if (len_pos_file >= FN_REFLEN || len_pos_offset > LONGLONG_LEN)
|
||||||
|
return 0;
|
||||||
|
mysql_real_escape_string(mysql, file_buf, binlog_pos_file, len_pos_file);
|
||||||
|
mysql_real_escape_string(mysql, offset_buf, binlog_pos_offset, len_pos_offset);
|
||||||
|
init_dynamic_string_checked(&query, "SELECT BINLOG_GTID_POS('", 256, 1024);
|
||||||
|
dynstr_append_checked(&query, file_buf);
|
||||||
|
dynstr_append_checked(&query, "', '");
|
||||||
|
dynstr_append_checked(&query, offset_buf);
|
||||||
|
dynstr_append_checked(&query, "')");
|
||||||
|
|
||||||
|
err= mysql_query_with_error_report(mysql, &res, query.str);
|
||||||
|
dynstr_free(&query);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
|
||||||
|
err= 1;
|
||||||
|
if ((row= mysql_fetch_row(res)))
|
||||||
|
{
|
||||||
|
strmake(out_gtid_pos, row[0], MAX_GTID_LENGTH-1);
|
||||||
|
err= 0;
|
||||||
|
}
|
||||||
|
mysql_free_result(res);
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Get the GTID position on a master or slave.
|
||||||
|
The parameter MASTER is non-zero to get the position on a master
|
||||||
|
(@@gtid_binlog_pos) or zero for a slave (@@gtid_slave_pos).
|
||||||
|
|
||||||
|
This uses the @@gtid_binlog_pos or @@gtid_slave_pos, so requires FLUSH TABLES
|
||||||
|
WITH READ LOCK or similar to be consistent.
|
||||||
|
|
||||||
|
Returns 0 if ok, non-zero for error.
|
||||||
|
*/
|
||||||
|
static int
|
||||||
|
get_gtid_pos(char *out_gtid_pos, int master)
|
||||||
|
{
|
||||||
|
MYSQL_RES *res;
|
||||||
|
MYSQL_ROW row;
|
||||||
|
int found;
|
||||||
|
|
||||||
|
if (mysql_query_with_error_report(mysql, &res,
|
||||||
|
(master ?
|
||||||
|
"SELECT @@GLOBAL.gtid_binlog_pos" :
|
||||||
|
"SELECT @@GLOBAL.gtid_slave_pos")))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
found= 0;
|
||||||
|
if ((row= mysql_fetch_row(res)))
|
||||||
|
{
|
||||||
|
strmake(out_gtid_pos, row[0], MAX_GTID_LENGTH-1);
|
||||||
|
found++;
|
||||||
|
}
|
||||||
|
mysql_free_result(res);
|
||||||
|
|
||||||
|
return (found != 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static char *my_case_str(const char *str,
|
static char *my_case_str(const char *str,
|
||||||
uint str_len,
|
uint str_len,
|
||||||
const char *token,
|
const char *token,
|
||||||
@ -4844,12 +4939,15 @@ static int wsrep_set_sst_cmds(MYSQL *mysql) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
|
|
||||||
|
static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos,
|
||||||
|
int have_mariadb_gtid, int use_gtid)
|
||||||
{
|
{
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
MYSQL_RES *UNINIT_VAR(master);
|
MYSQL_RES *UNINIT_VAR(master);
|
||||||
char binlog_pos_file[FN_REFLEN];
|
char binlog_pos_file[FN_REFLEN];
|
||||||
char binlog_pos_offset[LONGLONG_LEN+1];
|
char binlog_pos_offset[LONGLONG_LEN+1];
|
||||||
|
char gtid_pos[MAX_GTID_LENGTH];
|
||||||
char *file, *offset;
|
char *file, *offset;
|
||||||
const char *comment_prefix=
|
const char *comment_prefix=
|
||||||
(opt_master_data == MYSQL_OPT_MASTER_DATA_COMMENTED_SQL) ? "-- " : "";
|
(opt_master_data == MYSQL_OPT_MASTER_DATA_COMMENTED_SQL) ? "-- " : "";
|
||||||
@ -4860,6 +4958,9 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
|
|||||||
return 1;
|
return 1;
|
||||||
file= binlog_pos_file;
|
file= binlog_pos_file;
|
||||||
offset= binlog_pos_offset;
|
offset= binlog_pos_offset;
|
||||||
|
if (have_mariadb_gtid &&
|
||||||
|
get_binlog_gtid_pos(binlog_pos_file, binlog_pos_offset, gtid_pos))
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -4889,6 +4990,9 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (have_mariadb_gtid && get_gtid_pos(gtid_pos, 1))
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* SHOW MASTER STATUS reports file and position */
|
/* SHOW MASTER STATUS reports file and position */
|
||||||
@ -4897,7 +5001,19 @@ static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
|
|||||||
"recovery from\n--\n\n");
|
"recovery from\n--\n\n");
|
||||||
fprintf(md_result_file,
|
fprintf(md_result_file,
|
||||||
"%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
|
"%sCHANGE MASTER TO MASTER_LOG_FILE='%s', MASTER_LOG_POS=%s;\n",
|
||||||
comment_prefix, file, offset);
|
(use_gtid ? "-- " : comment_prefix), file, offset);
|
||||||
|
if (have_mariadb_gtid)
|
||||||
|
{
|
||||||
|
print_comment(md_result_file, 0,
|
||||||
|
"\n--\n-- GTID to start replication from\n--\n\n");
|
||||||
|
if (use_gtid)
|
||||||
|
fprintf(md_result_file,
|
||||||
|
"%sCHANGE MASTER TO MASTER_USE_GTID=slave_pos;\n",
|
||||||
|
comment_prefix);
|
||||||
|
fprintf(md_result_file,
|
||||||
|
"%sSET GLOBAL gtid_slave_pos='%s';\n",
|
||||||
|
(!use_gtid ? "-- " : comment_prefix), gtid_pos);
|
||||||
|
}
|
||||||
check_io(md_result_file);
|
check_io(md_result_file);
|
||||||
|
|
||||||
if (!consistent_binlog_pos)
|
if (!consistent_binlog_pos)
|
||||||
@ -4967,12 +5083,16 @@ static int add_slave_statements(void)
|
|||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int do_show_slave_status(MYSQL *mysql_con)
|
static int do_show_slave_status(MYSQL *mysql_con, int use_gtid,
|
||||||
|
int have_mariadb_gtid)
|
||||||
{
|
{
|
||||||
MYSQL_RES *UNINIT_VAR(slave);
|
MYSQL_RES *UNINIT_VAR(slave);
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
const char *comment_prefix=
|
const char *comment_prefix=
|
||||||
(opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : "";
|
(opt_slave_data == MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL) ? "-- " : "";
|
||||||
|
const char *gtid_comment_prefix= (use_gtid ? comment_prefix : "-- ");
|
||||||
|
const char *nogtid_comment_prefix= (!use_gtid ? comment_prefix : "-- ");
|
||||||
|
int set_gtid_done= 0;
|
||||||
|
|
||||||
if (mysql_query_with_error_report(mysql_con, &slave,
|
if (mysql_query_with_error_report(mysql_con, &slave,
|
||||||
multi_source ?
|
multi_source ?
|
||||||
@ -4990,8 +5110,30 @@ static int do_show_slave_status(MYSQL *mysql_con)
|
|||||||
|
|
||||||
while ((row= mysql_fetch_row(slave)))
|
while ((row= mysql_fetch_row(slave)))
|
||||||
{
|
{
|
||||||
|
if (multi_source && !set_gtid_done)
|
||||||
|
{
|
||||||
|
char gtid_pos[MAX_GTID_LENGTH];
|
||||||
|
if (have_mariadb_gtid && get_gtid_pos(gtid_pos, 0))
|
||||||
|
return 1;
|
||||||
|
if (opt_comments)
|
||||||
|
fprintf(md_result_file, "\n--\n-- Gtid position to start replication "
|
||||||
|
"from\n--\n\n");
|
||||||
|
fprintf(md_result_file, "%sSET GLOBAL gtid_slave_pos='%s';\n",
|
||||||
|
gtid_comment_prefix, gtid_pos);
|
||||||
|
set_gtid_done= 1;
|
||||||
|
}
|
||||||
if (row[9 + multi_source] && row[21 + multi_source])
|
if (row[9 + multi_source] && row[21 + multi_source])
|
||||||
{
|
{
|
||||||
|
if (use_gtid)
|
||||||
|
{
|
||||||
|
if (multi_source)
|
||||||
|
fprintf(md_result_file, "%sCHANGE MASTER '%.80s' TO "
|
||||||
|
"MASTER_USE_GTID=slave_pos;\n", gtid_comment_prefix, row[0]);
|
||||||
|
else
|
||||||
|
fprintf(md_result_file, "%sCHANGE MASTER TO "
|
||||||
|
"MASTER_USE_GTID=slave_pos;\n", gtid_comment_prefix);
|
||||||
|
}
|
||||||
|
|
||||||
/* SHOW MASTER STATUS reports file and position */
|
/* SHOW MASTER STATUS reports file and position */
|
||||||
if (opt_comments)
|
if (opt_comments)
|
||||||
fprintf(md_result_file,
|
fprintf(md_result_file,
|
||||||
@ -5000,9 +5142,9 @@ static int do_show_slave_status(MYSQL *mysql_con)
|
|||||||
|
|
||||||
if (multi_source)
|
if (multi_source)
|
||||||
fprintf(md_result_file, "%sCHANGE MASTER '%.80s' TO ",
|
fprintf(md_result_file, "%sCHANGE MASTER '%.80s' TO ",
|
||||||
comment_prefix, row[0]);
|
nogtid_comment_prefix, row[0]);
|
||||||
else
|
else
|
||||||
fprintf(md_result_file, "%sCHANGE MASTER TO ", comment_prefix);
|
fprintf(md_result_file, "%sCHANGE MASTER TO ", nogtid_comment_prefix);
|
||||||
|
|
||||||
if (opt_include_master_host_port)
|
if (opt_include_master_host_port)
|
||||||
{
|
{
|
||||||
@ -5075,12 +5217,13 @@ static int do_flush_tables_read_lock(MYSQL *mysql_con)
|
|||||||
FLUSH TABLES is to lower the probability of a stage where both mysqldump
|
FLUSH TABLES is to lower the probability of a stage where both mysqldump
|
||||||
and most client connections are stalled. Of course, if a second long
|
and most client connections are stalled. Of course, if a second long
|
||||||
update starts between the two FLUSHes, we have that bad stall.
|
update starts between the two FLUSHes, we have that bad stall.
|
||||||
|
|
||||||
|
We use the LOCAL option, as we do not want the FLUSH TABLES replicated to
|
||||||
|
other servers.
|
||||||
*/
|
*/
|
||||||
return
|
return
|
||||||
( mysql_query_with_error_report(mysql_con, 0,
|
( mysql_query_with_error_report(mysql_con, 0,
|
||||||
((opt_master_data != 0) ?
|
"FLUSH /*!40101 LOCAL */ TABLES") ||
|
||||||
"FLUSH /*!40101 LOCAL */ TABLES" :
|
|
||||||
"FLUSH TABLES")) ||
|
|
||||||
mysql_query_with_error_report(mysql_con, 0,
|
mysql_query_with_error_report(mysql_con, 0,
|
||||||
"FLUSH TABLES WITH READ LOCK") );
|
"FLUSH TABLES WITH READ LOCK") );
|
||||||
}
|
}
|
||||||
@ -5701,6 +5844,7 @@ int main(int argc, char **argv)
|
|||||||
char bin_log_name[FN_REFLEN];
|
char bin_log_name[FN_REFLEN];
|
||||||
int exit_code;
|
int exit_code;
|
||||||
int consistent_binlog_pos= 0;
|
int consistent_binlog_pos= 0;
|
||||||
|
int have_mariadb_gtid= 0;
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
|
|
||||||
sf_leaking_memory=1; /* don't report memory leaks on early exits */
|
sf_leaking_memory=1; /* don't report memory leaks on early exits */
|
||||||
@ -5741,7 +5885,10 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/* Check if the server support multi source */
|
/* Check if the server support multi source */
|
||||||
if (mysql_get_server_version(mysql) >= 100000)
|
if (mysql_get_server_version(mysql) >= 100000)
|
||||||
|
{
|
||||||
multi_source= 2;
|
multi_source= 2;
|
||||||
|
have_mariadb_gtid= 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (opt_slave_data && do_stop_slave_sql(mysql))
|
if (opt_slave_data && do_stop_slave_sql(mysql))
|
||||||
goto err;
|
goto err;
|
||||||
@ -5792,9 +5939,11 @@ int main(int argc, char **argv)
|
|||||||
if (opt_galera_sst_mode && wsrep_set_sst_cmds(mysql))
|
if (opt_galera_sst_mode && wsrep_set_sst_cmds(mysql))
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
if (opt_master_data && do_show_master_status(mysql, consistent_binlog_pos))
|
if (opt_master_data && do_show_master_status(mysql, consistent_binlog_pos,
|
||||||
|
have_mariadb_gtid, opt_use_gtid))
|
||||||
goto err;
|
goto err;
|
||||||
if (opt_slave_data && do_show_slave_status(mysql))
|
if (opt_slave_data && do_show_slave_status(mysql, opt_use_gtid,
|
||||||
|
have_mariadb_gtid))
|
||||||
goto err;
|
goto err;
|
||||||
if (opt_single_transaction && do_unlock_tables(mysql)) /* unlock but no commit! */
|
if (opt_single_transaction && do_unlock_tables(mysql)) /* unlock but no commit! */
|
||||||
goto err;
|
goto err;
|
||||||
@ -5811,11 +5960,27 @@ int main(int argc, char **argv)
|
|||||||
dump_all_tablespaces();
|
dump_all_tablespaces();
|
||||||
dump_all_databases();
|
dump_all_databases();
|
||||||
}
|
}
|
||||||
else if (argc > 1 && !opt_databases)
|
else
|
||||||
|
{
|
||||||
|
// Check all arguments meet length condition. Currently database and table
|
||||||
|
// names are limited to NAME_LEN bytes and stack-based buffers assumes
|
||||||
|
// that escaped name will be not longer than NAME_LEN*2 + 2 bytes long.
|
||||||
|
int argument;
|
||||||
|
for (argument= 0; argument < argc; argument++)
|
||||||
|
{
|
||||||
|
size_t argument_length= strlen(argv[argument]);
|
||||||
|
if (argument_length > NAME_LEN)
|
||||||
|
{
|
||||||
|
die(EX_CONSCHECK, "[ERROR] Argument '%s' is too long, it cannot be "
|
||||||
|
"name for any table or database.\n", argv[argument]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argc > 1 && !opt_databases)
|
||||||
{
|
{
|
||||||
/* Only one database and selected table(s) */
|
/* Only one database and selected table(s) */
|
||||||
if (!opt_alltspcs && !opt_notspcs)
|
if (!opt_alltspcs && !opt_notspcs)
|
||||||
dump_tablespaces_for_tables(*argv, (argv + 1), (argc -1));
|
dump_tablespaces_for_tables(*argv, (argv + 1), (argc - 1));
|
||||||
dump_selected_tables(*argv, (argv + 1), (argc - 1));
|
dump_selected_tables(*argv, (argv + 1), (argc - 1));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -5825,6 +5990,7 @@ int main(int argc, char **argv)
|
|||||||
dump_tablespaces_for_databases(argv);
|
dump_tablespaces_for_databases(argv);
|
||||||
dump_databases(argv);
|
dump_databases(argv);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* add 'START SLAVE' to end of dump */
|
/* add 'START SLAVE' to end of dump */
|
||||||
if (opt_slave_apply && add_slave_statements())
|
if (opt_slave_apply && add_slave_statements())
|
||||||
|
@ -1796,8 +1796,8 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
|
|||||||
|
|
||||||
pthread_mutex_lock(&sleeper_mutex);
|
pthread_mutex_lock(&sleeper_mutex);
|
||||||
master_wakeup= 0;
|
master_wakeup= 0;
|
||||||
pthread_mutex_unlock(&sleeper_mutex);
|
|
||||||
pthread_cond_broadcast(&sleep_threshhold);
|
pthread_cond_broadcast(&sleep_threshhold);
|
||||||
|
pthread_mutex_unlock(&sleeper_mutex);
|
||||||
|
|
||||||
gettimeofday(&start_time, NULL);
|
gettimeofday(&start_time, NULL);
|
||||||
|
|
||||||
|
@ -8990,6 +8990,10 @@ int main(int argc, char **argv)
|
|||||||
128, 0, 0, get_var_key, 0, var_free, MYF(0)))
|
128, 0, 0, get_var_key, 0, var_free, MYF(0)))
|
||||||
die("Variable hash initialization failed");
|
die("Variable hash initialization failed");
|
||||||
|
|
||||||
|
{
|
||||||
|
char path_separator[]= { FN_LIBCHAR, 0 };
|
||||||
|
var_set_string("SYSTEM_PATH_SEPARATOR", path_separator);
|
||||||
|
}
|
||||||
var_set_string("MYSQL_SERVER_VERSION", MYSQL_SERVER_VERSION);
|
var_set_string("MYSQL_SERVER_VERSION", MYSQL_SERVER_VERSION);
|
||||||
var_set_string("MYSQL_SYSTEM_TYPE", SYSTEM_TYPE);
|
var_set_string("MYSQL_SYSTEM_TYPE", SYSTEM_TYPE);
|
||||||
var_set_string("MYSQL_MACHINE_TYPE", MACHINE_TYPE);
|
var_set_string("MYSQL_MACHINE_TYPE", MACHINE_TYPE);
|
||||||
@ -9910,36 +9914,34 @@ struct st_regex
|
|||||||
int reg_replace(char** buf_p, int* buf_len_p, char *pattern, char *replace,
|
int reg_replace(char** buf_p, int* buf_len_p, char *pattern, char *replace,
|
||||||
char *string, int icase);
|
char *string, int icase);
|
||||||
|
|
||||||
|
bool parse_re_part(char *start_re, char *end_re,
|
||||||
|
char **p, char *end, char **buf)
|
||||||
|
{
|
||||||
|
if (*start_re != *end_re)
|
||||||
|
{
|
||||||
|
switch ((*start_re= *(*p)++)) {
|
||||||
|
case '(': *end_re= ')'; break;
|
||||||
|
case '[': *end_re= ']'; break;
|
||||||
|
case '{': *end_re= '}'; break;
|
||||||
|
case '<': *end_re= '>'; break;
|
||||||
|
default: *end_re= *start_re;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
while (*p < end && **p != *end_re)
|
||||||
|
{
|
||||||
|
if ((*p)[0] == '\\' && *p + 1 < end && (*p)[1] == *end_re)
|
||||||
|
(*p)++;
|
||||||
|
|
||||||
/*
|
*(*buf)++= *(*p)++;
|
||||||
Finds the next (non-escaped) '/' in the expression.
|
}
|
||||||
(If the character '/' is needed, it can be escaped using '\'.)
|
*(*buf)++= 0;
|
||||||
*/
|
|
||||||
|
(*p)++;
|
||||||
|
|
||||||
|
return *p > end;
|
||||||
|
}
|
||||||
|
|
||||||
#define PARSE_REGEX_ARG \
|
|
||||||
while (p < expr_end) \
|
|
||||||
{ \
|
|
||||||
char c= *p; \
|
|
||||||
if (c == '/') \
|
|
||||||
{ \
|
|
||||||
if (last_c == '\\') \
|
|
||||||
{ \
|
|
||||||
buf_p[-1]= '/'; \
|
|
||||||
} \
|
|
||||||
else \
|
|
||||||
{ \
|
|
||||||
*buf_p++ = 0; \
|
|
||||||
break; \
|
|
||||||
} \
|
|
||||||
} \
|
|
||||||
else \
|
|
||||||
*buf_p++ = c; \
|
|
||||||
\
|
|
||||||
last_c= c; \
|
|
||||||
p++; \
|
|
||||||
} \
|
|
||||||
\
|
|
||||||
/*
|
/*
|
||||||
Initializes the regular substitution expression to be used in the
|
Initializes the regular substitution expression to be used in the
|
||||||
result output of test.
|
result output of test.
|
||||||
@ -9951,10 +9953,9 @@ struct st_replace_regex* init_replace_regex(char* expr)
|
|||||||
{
|
{
|
||||||
struct st_replace_regex* res;
|
struct st_replace_regex* res;
|
||||||
char* buf,*expr_end;
|
char* buf,*expr_end;
|
||||||
char* p;
|
char* p, start_re, end_re= 1;
|
||||||
char* buf_p;
|
char* buf_p;
|
||||||
uint expr_len= strlen(expr);
|
uint expr_len= strlen(expr);
|
||||||
char last_c = 0;
|
|
||||||
struct st_regex reg;
|
struct st_regex reg;
|
||||||
|
|
||||||
/* my_malloc() will die on fail with MY_FAE */
|
/* my_malloc() will die on fail with MY_FAE */
|
||||||
@ -9972,44 +9973,32 @@ struct st_replace_regex* init_replace_regex(char* expr)
|
|||||||
{
|
{
|
||||||
bzero(®,sizeof(reg));
|
bzero(®,sizeof(reg));
|
||||||
/* find the start of the statement */
|
/* find the start of the statement */
|
||||||
while (p < expr_end)
|
while (my_isspace(charset_info, *p) && p < expr_end)
|
||||||
{
|
|
||||||
if (*p == '/')
|
|
||||||
break;
|
|
||||||
p++;
|
p++;
|
||||||
}
|
|
||||||
|
|
||||||
if (p == expr_end || ++p == expr_end)
|
if (p >= expr_end)
|
||||||
{
|
{
|
||||||
if (res->regex_arr.elements)
|
if (res->regex_arr.elements)
|
||||||
break;
|
break;
|
||||||
else
|
else
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
/* we found the start */
|
|
||||||
|
start_re= 0;
|
||||||
reg.pattern= buf_p;
|
reg.pattern= buf_p;
|
||||||
|
if (parse_re_part(&start_re, &end_re, &p, expr_end, &buf_p))
|
||||||
/* Find first argument -- pattern string to be removed */
|
|
||||||
PARSE_REGEX_ARG
|
|
||||||
|
|
||||||
if (p == expr_end || ++p == expr_end)
|
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
/* buf_p now points to the replacement pattern terminated with \0 */
|
|
||||||
reg.replace= buf_p;
|
reg.replace= buf_p;
|
||||||
|
if (parse_re_part(&start_re, &end_re, &p, expr_end, &buf_p))
|
||||||
/* Find second argument -- replace string to replace pattern */
|
|
||||||
PARSE_REGEX_ARG
|
|
||||||
|
|
||||||
if (p == expr_end)
|
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
/* skip the ending '/' in the statement */
|
|
||||||
p++;
|
|
||||||
|
|
||||||
/* Check if we should do matching case insensitive */
|
/* Check if we should do matching case insensitive */
|
||||||
if (p < expr_end && *p == 'i')
|
if (p < expr_end && *p == 'i')
|
||||||
|
{
|
||||||
|
p++;
|
||||||
reg.icase= 1;
|
reg.icase= 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* done parsing the statement, now place it in regex_arr */
|
/* done parsing the statement, now place it in regex_arr */
|
||||||
if (insert_dynamic(&res->regex_arr,(uchar*) ®))
|
if (insert_dynamic(&res->regex_arr,(uchar*) ®))
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -80,13 +80,6 @@ IF(ENABLE_DTRACE)
|
|||||||
${CMAKE_BINARY_DIR}/include/probes_mysql_dtrace.h
|
${CMAKE_BINARY_DIR}/include/probes_mysql_dtrace.h
|
||||||
${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h
|
${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h
|
||||||
)
|
)
|
||||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
|
||||||
# Systemtap object
|
|
||||||
EXECUTE_PROCESS(
|
|
||||||
COMMAND ${DTRACE} -G -s ${CMAKE_SOURCE_DIR}/include/probes_mysql.d.base
|
|
||||||
-o ${CMAKE_BINARY_DIR}/probes_mysql.o
|
|
||||||
)
|
|
||||||
ENDIF()
|
|
||||||
ADD_CUSTOM_TARGET(gen_dtrace_header
|
ADD_CUSTOM_TARGET(gen_dtrace_header
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${CMAKE_BINARY_DIR}/include/probes_mysql.d
|
${CMAKE_BINARY_DIR}/include/probes_mysql.d
|
||||||
@ -105,12 +98,7 @@ FUNCTION(DTRACE_INSTRUMENT target)
|
|||||||
IF(ENABLE_DTRACE)
|
IF(ENABLE_DTRACE)
|
||||||
ADD_DEPENDENCIES(${target} gen_dtrace_header)
|
ADD_DEPENDENCIES(${target} gen_dtrace_header)
|
||||||
|
|
||||||
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
# Invoke dtrace to generate object file and link it together with target.
|
||||||
TARGET_LINK_LIBRARIES(${target} ${CMAKE_BINARY_DIR}/probes_mysql.o)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
# On Solaris, invoke dtrace -G to generate object file and
|
|
||||||
# link it together with target.
|
|
||||||
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
|
||||||
SET(objdir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.dir)
|
SET(objdir ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${target}.dir)
|
||||||
SET(outfile ${objdir}/${target}_dtrace.o)
|
SET(outfile ${objdir}/${target}_dtrace.o)
|
||||||
@ -127,6 +115,21 @@ FUNCTION(DTRACE_INSTRUMENT target)
|
|||||||
-P ${CMAKE_SOURCE_DIR}/cmake/dtrace_prelink.cmake
|
-P ${CMAKE_SOURCE_DIR}/cmake/dtrace_prelink.cmake
|
||||||
WORKING_DIRECTORY ${objdir}
|
WORKING_DIRECTORY ${objdir}
|
||||||
)
|
)
|
||||||
|
ELSEIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
|
# dtrace on Linux runs gcc and uses flags from environment
|
||||||
|
SET(CFLAGS_SAVED $ENV{CFLAGS})
|
||||||
|
SET(ENV{CFLAGS} ${CMAKE_C_FLAGS})
|
||||||
|
SET(outfile "${CMAKE_BINARY_DIR}/probes_mysql.o")
|
||||||
|
# Systemtap object
|
||||||
|
EXECUTE_PROCESS(
|
||||||
|
COMMAND ${DTRACE} -G -s ${CMAKE_SOURCE_DIR}/include/probes_mysql.d.base
|
||||||
|
-o ${outfile}
|
||||||
|
)
|
||||||
|
SET(ENV{CFLAGS} ${CFLAGS_SAVED})
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
# Do not try to extend the library if we have not built the .o file
|
||||||
|
IF(outfile)
|
||||||
# Add full object path to linker flags
|
# Add full object path to linker flags
|
||||||
GET_TARGET_PROPERTY(target_type ${target} TYPE)
|
GET_TARGET_PROPERTY(target_type ${target} TYPE)
|
||||||
IF(NOT target_type MATCHES "STATIC")
|
IF(NOT target_type MATCHES "STATIC")
|
||||||
|
@ -63,7 +63,9 @@ FUNCTION (INSTALL_DEBUG_SYMBOLS)
|
|||||||
STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
|
STRING(REPLACE ".dll" ".pdb" pdb_location ${pdb_location})
|
||||||
STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
|
STRING(REPLACE ".lib" ".pdb" pdb_location ${pdb_location})
|
||||||
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
|
IF(CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||||
STRING(REPLACE "${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}" pdb_location ${pdb_location})
|
STRING(REPLACE
|
||||||
|
"${CMAKE_CFG_INTDIR}" "\${CMAKE_INSTALL_CONFIG_NAME}"
|
||||||
|
pdb_location ${pdb_location})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
set(comp "")
|
set(comp "")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -62,22 +62,30 @@ IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
# Enable debug info also in Release build, and create PDB to be able to analyze
|
# Enable debug info also in Release build,
|
||||||
# crashes
|
# and create PDB to be able to analyze crashes.
|
||||||
FOREACH(lang C CXX)
|
|
||||||
SET(CMAKE_${lang}_FLAGS_RELEASE "${CMAKE_${lang}_FLAGS_RELEASE} /Zi")
|
|
||||||
ENDFOREACH()
|
|
||||||
FOREACH(type EXE SHARED MODULE)
|
FOREACH(type EXE SHARED MODULE)
|
||||||
SET(CMAKE_{type}_LINKER_FLAGS_RELEASE "${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug")
|
SET(CMAKE_{type}_LINKER_FLAGS_RELEASE
|
||||||
|
"${CMAKE_${type}_LINKER_FLAGS_RELEASE} /debug")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
# Force static runtime libraries
|
# Force static runtime libraries
|
||||||
|
# - Choose debugging information:
|
||||||
|
# /Z7
|
||||||
|
# Produces an .obj file containing full symbolic debugging
|
||||||
|
# information for use with the debugger. The symbolic debugging
|
||||||
|
# information includes the names and types of variables, as well as
|
||||||
|
# functions and line numbers. No .pdb file is produced by the compiler.
|
||||||
|
FOREACH(lang C CXX)
|
||||||
|
SET(CMAKE_${lang}_FLAGS_RELEASE "${CMAKE_${lang}_FLAGS_RELEASE} /Z7")
|
||||||
|
ENDFOREACH()
|
||||||
FOREACH(flag
|
FOREACH(flag
|
||||||
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
|
CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||||
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
|
CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_DEBUG_INIT
|
||||||
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
CMAKE_CXX_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||||
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
|
CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_DEBUG_INIT)
|
||||||
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
|
STRING(REPLACE "/MD" "/MT" "${flag}" "${${flag}}")
|
||||||
|
STRING(REPLACE "/Zi" "/Z7" "${flag}" "${${flag}}")
|
||||||
ENDFOREACH()
|
ENDFOREACH()
|
||||||
|
|
||||||
|
|
||||||
@ -105,7 +113,6 @@ IF(MSVC)
|
|||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996")
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /we4099")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /we4099")
|
||||||
|
|
||||||
|
|
||||||
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||||
# _WIN64 is defined by the compiler itself.
|
# _WIN64 is defined by the compiler itself.
|
||||||
# Yet, we define it here again to work around a bug with Intellisense
|
# Yet, we define it here again to work around a bug with Intellisense
|
||||||
|
@ -203,7 +203,7 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||||||
NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT} AND
|
NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT} AND
|
||||||
NOT WITH_WSREP)
|
NOT WITH_WSREP)
|
||||||
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} ${ARG_COMPONENT} PARENT_SCOPE)
|
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} ${ARG_COMPONENT} PARENT_SCOPE)
|
||||||
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB-server" PARENT_SCOPE)
|
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB" PARENT_SCOPE)
|
||||||
|
|
||||||
IF (NOT ARG_CONFIG)
|
IF (NOT ARG_CONFIG)
|
||||||
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${target}.cnf")
|
SET(ARG_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/${target}.cnf")
|
||||||
|
@ -520,6 +520,11 @@
|
|||||||
#endif
|
#endif
|
||||||
#define PSAPI_VERSION 1 /* for GetProcessMemoryInfo() */
|
#define PSAPI_VERSION 1 /* for GetProcessMemoryInfo() */
|
||||||
|
|
||||||
|
/* We don't want the min/max macros */
|
||||||
|
#ifdef __WIN__
|
||||||
|
#define NOMINMAX
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
MySQL features
|
MySQL features
|
||||||
*/
|
*/
|
||||||
|
@ -24,8 +24,10 @@ TARGET_LINK_LIBRARIES(dbug mysys)
|
|||||||
ADD_EXECUTABLE(tests tests.c)
|
ADD_EXECUTABLE(tests tests.c)
|
||||||
TARGET_LINK_LIBRARIES(tests dbug)
|
TARGET_LINK_LIBRARIES(tests dbug)
|
||||||
|
|
||||||
ADD_EXECUTABLE(factorial my_main.c factorial.c)
|
IF(NOT CMAKE_CROSSCOMPILING)
|
||||||
TARGET_LINK_LIBRARIES(factorial dbug)
|
ADD_EXECUTABLE(factorial my_main.c factorial.c)
|
||||||
|
TARGET_LINK_LIBRARIES(factorial dbug)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode)
|
IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode)
|
||||||
FIND_PROGRAM(GROFF groff)
|
FIND_PROGRAM(GROFF groff)
|
||||||
@ -36,11 +38,11 @@ IF(NOT WIN32 AND NOT CMAKE_GENERATOR MATCHES Xcode)
|
|||||||
SET(SOURCE_INC factorial.r main.r example1.r example2.r example3.r)
|
SET(SOURCE_INC factorial.r main.r example1.r example2.r example3.r)
|
||||||
ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT_INC}
|
ADD_CUSTOM_COMMAND(OUTPUT ${OUTPUT_INC}
|
||||||
DEPENDS factorial
|
DEPENDS factorial
|
||||||
COMMAND ./factorial 1 2 3 4 5 > output1.r
|
COMMAND factorial 1 2 3 4 5 > output1.r
|
||||||
COMMAND ./factorial -\#t:o 2 3 > output2.r
|
COMMAND factorial -\#t:o 2 3 > output2.r
|
||||||
COMMAND ./factorial -\#d:t:o 3 > output3.r
|
COMMAND factorial -\#d:t:o 3 > output3.r
|
||||||
COMMAND ./factorial -\#d,result:o 4 > output4.r
|
COMMAND factorial -\#d,result:o 4 > output4.r
|
||||||
COMMAND ./factorial -\#d:f,factorial:F:L:o 3 > output5.r)
|
COMMAND factorial -\#d:f,factorial:F:L:o 3 > output5.r)
|
||||||
FOREACH(file ${SOURCE_INC})
|
FOREACH(file ${SOURCE_INC})
|
||||||
STRING(REGEX REPLACE "\\.r" ".c" srcfile ${file})
|
STRING(REGEX REPLACE "\\.r" ".c" srcfile ${file})
|
||||||
ADD_CUSTOM_COMMAND(OUTPUT ${file} DEPENDS ${srcfile}
|
ADD_CUSTOM_COMMAND(OUTPUT ${file} DEPENDS ${srcfile}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -33,7 +33,6 @@ SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp sr
|
|||||||
ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES})
|
ADD_CONVENIENCE_LIBRARY(yassl ${YASSL_SOURCES})
|
||||||
RESTRICT_SYMBOL_EXPORTS(yassl)
|
RESTRICT_SYMBOL_EXPORTS(yassl)
|
||||||
|
|
||||||
INSTALL_DEBUG_SYMBOLS(yassl)
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
INSTALL_DEBUG_TARGET(yassl DESTINATION ${INSTALL_LIBDIR}/debug)
|
INSTALL_DEBUG_TARGET(yassl DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates.
|
Copyright (c) 2005, 2014, Oracle and/or its affiliates.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -791,7 +791,10 @@ int SSL_CTX_load_verify_locations(SSL_CTX* ctx, const char* file,
|
|||||||
strncpy(name, path, MAX_PATH - 1 - HALF_PATH);
|
strncpy(name, path, MAX_PATH - 1 - HALF_PATH);
|
||||||
strncat(name, "/", 1);
|
strncat(name, "/", 1);
|
||||||
strncat(name, entry->d_name, HALF_PATH);
|
strncat(name, entry->d_name, HALF_PATH);
|
||||||
if (stat(name, &buf) < 0) return SSL_BAD_STAT;
|
if (stat(name, &buf) < 0) {
|
||||||
|
closedir(dir);
|
||||||
|
return SSL_BAD_STAT;
|
||||||
|
}
|
||||||
|
|
||||||
if (S_ISREG(buf.st_mode))
|
if (S_ISREG(buf.st_mode))
|
||||||
ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA);
|
ret = read_file(ctx, name, SSL_FILETYPE_PEM, CA);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2006, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -32,7 +32,6 @@ SET(TAOCRYPT_SOURCES src/aes.cpp src/aestables.cpp src/algebra.cpp src/arc4.cpp
|
|||||||
ADD_CONVENIENCE_LIBRARY(taocrypt ${TAOCRYPT_SOURCES})
|
ADD_CONVENIENCE_LIBRARY(taocrypt ${TAOCRYPT_SOURCES})
|
||||||
RESTRICT_SYMBOL_EXPORTS(taocrypt)
|
RESTRICT_SYMBOL_EXPORTS(taocrypt)
|
||||||
|
|
||||||
INSTALL_DEBUG_SYMBOLS(taocrypt)
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
INSTALL_DEBUG_TARGET(taocrypt DESTINATION ${INSTALL_LIBDIR}/debug)
|
INSTALL_DEBUG_TARGET(taocrypt DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
|
Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -296,9 +296,9 @@ private:
|
|||||||
byte* signature_;
|
byte* signature_;
|
||||||
char issuer_[ASN_NAME_MAX]; // Names
|
char issuer_[ASN_NAME_MAX]; // Names
|
||||||
char subject_[ASN_NAME_MAX]; // Names
|
char subject_[ASN_NAME_MAX]; // Names
|
||||||
char beforeDate_[MAX_DATE_SZ]; // valid before date
|
char beforeDate_[MAX_DATE_SZ+1]; // valid before date, +null term
|
||||||
byte beforeDateType_; // beforeDate time type
|
byte beforeDateType_; // beforeDate time type
|
||||||
char afterDate_[MAX_DATE_SZ]; // valid after date
|
char afterDate_[MAX_DATE_SZ+1]; // valid after date, +null term
|
||||||
byte afterDateType_; // afterDate time type
|
byte afterDateType_; // afterDate time type
|
||||||
bool verify_; // Default to yes, but could be off
|
bool verify_; // Default to yes, but could be off
|
||||||
|
|
||||||
|
@ -67,11 +67,13 @@ typedef enum key_cache_type
|
|||||||
typedef
|
typedef
|
||||||
int (*INIT_KEY_CACHE)
|
int (*INIT_KEY_CACHE)
|
||||||
(void *, uint key_cache_block_size,
|
(void *, uint key_cache_block_size,
|
||||||
size_t use_mem, uint division_limit, uint age_threshold);
|
size_t use_mem, uint division_limit, uint age_threshold,
|
||||||
|
uint changed_blocks_hash_size);
|
||||||
typedef
|
typedef
|
||||||
int (*RESIZE_KEY_CACHE)
|
int (*RESIZE_KEY_CACHE)
|
||||||
(void *, uint key_cache_block_size,
|
(void *, uint key_cache_block_size,
|
||||||
size_t use_mem, uint division_limit, uint age_threshold);
|
size_t use_mem, uint division_limit, uint age_threshold,
|
||||||
|
uint changed_blocks_hash_size);
|
||||||
typedef
|
typedef
|
||||||
void (*CHANGE_KEY_CACHE_PARAM)
|
void (*CHANGE_KEY_CACHE_PARAM)
|
||||||
(void *keycache_cb,
|
(void *keycache_cb,
|
||||||
@ -146,6 +148,7 @@ typedef struct st_key_cache
|
|||||||
ulonglong param_division_limit;/* min. percentage of warm blocks */
|
ulonglong param_division_limit;/* min. percentage of warm blocks */
|
||||||
ulonglong param_age_threshold; /* determines when hot block is downgraded */
|
ulonglong param_age_threshold; /* determines when hot block is downgraded */
|
||||||
ulonglong param_partitions; /* number of the key cache partitions */
|
ulonglong param_partitions; /* number of the key cache partitions */
|
||||||
|
ulonglong changed_blocks_hash_size; /* number of hash buckets for changed files */
|
||||||
my_bool key_cache_inited; /* <=> key cache has been created */
|
my_bool key_cache_inited; /* <=> key cache has been created */
|
||||||
my_bool can_be_used; /* usage of cache for read/write is allowed */
|
my_bool can_be_used; /* usage of cache for read/write is allowed */
|
||||||
my_bool in_init; /* set to 1 in MySQL during init/resize */
|
my_bool in_init; /* set to 1 in MySQL during init/resize */
|
||||||
@ -160,10 +163,11 @@ extern KEY_CACHE dflt_key_cache_var, *dflt_key_cache;
|
|||||||
|
|
||||||
extern int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
extern int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
||||||
size_t use_mem, uint division_limit,
|
size_t use_mem, uint division_limit,
|
||||||
uint age_threshold, uint partitions);
|
uint age_threshold, uint changed_blocks_hash_size,
|
||||||
|
uint partitions);
|
||||||
extern int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
extern int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
||||||
size_t use_mem, uint division_limit,
|
size_t use_mem, uint division_limit,
|
||||||
uint age_threshold);
|
uint age_threshold, uint changed_blocks_hash_size);
|
||||||
extern void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
|
extern void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
|
||||||
uint age_threshold);
|
uint age_threshold);
|
||||||
extern uchar *key_cache_read(KEY_CACHE *keycache,
|
extern uchar *key_cache_read(KEY_CACHE *keycache,
|
||||||
@ -202,6 +206,7 @@ extern int repartition_key_cache(KEY_CACHE *keycache,
|
|||||||
size_t use_mem,
|
size_t use_mem,
|
||||||
uint division_limit,
|
uint division_limit,
|
||||||
uint age_threshold,
|
uint age_threshold,
|
||||||
|
uint changed_blocks_hash_size,
|
||||||
uint partitions);
|
uint partitions);
|
||||||
C_MODE_END
|
C_MODE_END
|
||||||
#endif /* _keycache_h */
|
#endif /* _keycache_h */
|
||||||
|
@ -94,7 +94,7 @@ my_bool net_write_command(NET *net,unsigned char command,
|
|||||||
const unsigned char *header, size_t head_len,
|
const unsigned char *header, size_t head_len,
|
||||||
const unsigned char *packet, size_t len);
|
const unsigned char *packet, size_t len);
|
||||||
int net_real_write(NET *net,const unsigned char *packet, size_t len);
|
int net_real_write(NET *net,const unsigned char *packet, size_t len);
|
||||||
unsigned long my_net_read(NET *net);
|
unsigned long my_net_read_packet(NET *net, my_bool read_from_server);
|
||||||
struct sockaddr;
|
struct sockaddr;
|
||||||
int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
|
int my_connect(my_socket s, const struct sockaddr *name, unsigned int namelen,
|
||||||
unsigned int timeout);
|
unsigned int timeout);
|
||||||
|
@ -541,7 +541,8 @@ my_bool net_write_command(NET *net,unsigned char command,
|
|||||||
const unsigned char *header, size_t head_len,
|
const unsigned char *header, size_t head_len,
|
||||||
const unsigned char *packet, size_t len);
|
const unsigned char *packet, size_t len);
|
||||||
int net_real_write(NET *net,const unsigned char *packet, size_t len);
|
int net_real_write(NET *net,const unsigned char *packet, size_t len);
|
||||||
unsigned long my_net_read(NET *net);
|
unsigned long my_net_read_packet(NET *net, my_bool read_from_server);
|
||||||
|
#define my_net_read(A) my_net_read_packet((A), 0)
|
||||||
|
|
||||||
#ifdef MY_GLOBAL_INCLUDED
|
#ifdef MY_GLOBAL_INCLUDED
|
||||||
void my_net_set_write_timeout(NET *net, uint timeout);
|
void my_net_set_write_timeout(NET *net, uint timeout);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#error don't use
|
#error don't use
|
||||||
/*
|
/*
|
||||||
Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
|
Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -406,7 +406,6 @@ SET(LIBS clientlib dbug strings vio mysys mysys_ssl ${ZLIB_LIBRARY} ${SSL_LIBRAR
|
|||||||
MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development)
|
MERGE_LIBRARIES(mysqlclient STATIC ${LIBS} COMPONENT Development)
|
||||||
|
|
||||||
# Visual Studio users need debug static library for debug projects
|
# Visual Studio users need debug static library for debug projects
|
||||||
INSTALL_DEBUG_SYMBOLS(clientlib)
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
|
INSTALL_DEBUG_TARGET(mysqlclient DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||||
INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug)
|
INSTALL_DEBUG_TARGET(clientlib DESTINATION ${INSTALL_LIBDIR}/debug)
|
||||||
@ -447,6 +446,10 @@ IF(NOT DISABLE_SHARED)
|
|||||||
SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
|
SOVERSION "${SHARED_LIB_MAJOR_VERSION}")
|
||||||
IF(LINK_FLAG_NO_UNDEFINED OR VERSION_SCRIPT_LINK_FLAGS)
|
IF(LINK_FLAG_NO_UNDEFINED OR VERSION_SCRIPT_LINK_FLAGS)
|
||||||
GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
|
GET_TARGET_PROPERTY(libmysql_link_flags libmysql LINK_FLAGS)
|
||||||
|
IF(NOT libmysql_link_flags)
|
||||||
|
# Avoid libmysql_link_flags-NOTFOUND
|
||||||
|
SET(libmysql_link_flags)
|
||||||
|
ENDIF()
|
||||||
SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS
|
SET_TARGET_PROPERTIES(libmysql PROPERTIES LINK_FLAGS
|
||||||
"${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED} ${VERSION_SCRIPT_LINK_FLAGS}")
|
"${libmysql_link_flags} ${LINK_FLAG_NO_UNDEFINED} ${VERSION_SCRIPT_LINK_FLAGS}")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
SET(MAN1_SERVER innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1
|
SET(MAN1_SERVER innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1
|
||||||
|
aria_chk.1 aria_dump_log.1 aria_ftdump.1 aria_pack.1 aria_read_log.1
|
||||||
myisamlog.1 myisampack.1 mysql.server.1
|
myisamlog.1 myisampack.1 mysql.server.1
|
||||||
mysql_convert_table_format.1 mysql_fix_extensions.1
|
mysql_convert_table_format.1 mysql_fix_extensions.1
|
||||||
mysql_install_db.1
|
mysql_install_db.1
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.TH ARIA_PACK "1" "May 2014" "aria_pack Ver 1.0" "User Commands"
|
.TH ARIA_PACK "1" "May 2014" "aria_pack Ver 1.0" "User Commands"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
aria_pack \- manual page for aria_pack Ver 1.0
|
aria_pack \- generate compressed, read\-only Aria tables
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B aria_pack
|
.B aria_pack
|
||||||
[\fIOPTIONS\fR] \fIfilename\fR...
|
[\fIOPTIONS\fR] \fIfilename\fR...
|
||||||
|
@ -1255,7 +1255,7 @@ indicates a
|
|||||||
FORMAT_DESCRIPTION_EVENT\&. The following table lists the possible type codes\&.
|
FORMAT_DESCRIPTION_EVENT\&. The following table lists the possible type codes\&.
|
||||||
.TS
|
.TS
|
||||||
allbox tab(:);
|
allbox tab(:);
|
||||||
l l l.
|
l l lx.
|
||||||
T{
|
T{
|
||||||
Type
|
Type
|
||||||
T}:T{
|
T}:T{
|
||||||
@ -1389,6 +1389,7 @@ T}
|
|||||||
T{
|
T{
|
||||||
0f
|
0f
|
||||||
T}:T{
|
T}:T{
|
||||||
|
.nf
|
||||||
FORMAT_DESCRIPTION_EVENT
|
FORMAT_DESCRIPTION_EVENT
|
||||||
T}:T{
|
T}:T{
|
||||||
This indicates the start of a log file written by MySQL 5 or later\&.
|
This indicates the start of a log file written by MySQL 5 or later\&.
|
||||||
@ -1526,7 +1527,7 @@ Master Pos: The position of the next event in the original master log file\&.
|
|||||||
Flags: 16 flags\&. Currently, the following flags are used\&. The others are reserved for future use\&.
|
Flags: 16 flags\&. Currently, the following flags are used\&. The others are reserved for future use\&.
|
||||||
.TS
|
.TS
|
||||||
allbox tab(:);
|
allbox tab(:);
|
||||||
l l l.
|
l l lx.
|
||||||
T{
|
T{
|
||||||
Flag
|
Flag
|
||||||
T}:T{
|
T}:T{
|
||||||
@ -1537,6 +1538,7 @@ T}
|
|||||||
T{
|
T{
|
||||||
01
|
01
|
||||||
T}:T{
|
T}:T{
|
||||||
|
.nf
|
||||||
LOG_EVENT_BINLOG_IN_USE_F
|
LOG_EVENT_BINLOG_IN_USE_F
|
||||||
T}:T{
|
T}:T{
|
||||||
Log file correctly closed\&. (Used only in
|
Log file correctly closed\&. (Used only in
|
||||||
@ -1558,6 +1560,7 @@ T}
|
|||||||
T{
|
T{
|
||||||
04
|
04
|
||||||
T}:T{
|
T}:T{
|
||||||
|
.nf
|
||||||
LOG_EVENT_THREAD_SPECIFIC_F
|
LOG_EVENT_THREAD_SPECIFIC_F
|
||||||
T}:T{
|
T}:T{
|
||||||
Set if the event is dependent on the connection it was executed in (for
|
Set if the event is dependent on the connection it was executed in (for
|
||||||
|
@ -2027,7 +2027,7 @@ value, an empty string, and the string value
|
|||||||
are distinguished from one another in the output generated by this option as follows\&.
|
are distinguished from one another in the output generated by this option as follows\&.
|
||||||
.TS
|
.TS
|
||||||
allbox tab(:);
|
allbox tab(:);
|
||||||
l l.
|
l lx.
|
||||||
T{
|
T{
|
||||||
\fBValue\fR:
|
\fBValue\fR:
|
||||||
T}:T{
|
T}:T{
|
||||||
|
161
mysql-test/include/gis_debug.inc
Normal file
161
mysql-test/include/gis_debug.inc
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
#
|
||||||
|
# This is a shared file included from t/gis-precise.test and t/gis-debug.test
|
||||||
|
#
|
||||||
|
# - gis-precise.test is executed both in debug and production builds
|
||||||
|
# and makes sure that the checked GIS functions return the expected results.
|
||||||
|
#
|
||||||
|
# - gis-debug.test is executed only in debug builds
|
||||||
|
# (and is skipped in production builds).
|
||||||
|
# gis-debug.test activates tracing of the internal GIS routines.
|
||||||
|
# The trace log is printed to the client side warnings.
|
||||||
|
# So gis-debug.test makes sure not only that the correct results are returned,
|
||||||
|
# but also check *how* these results were generated - makes sure that
|
||||||
|
# the internal GIS routines went through the expected data and code flow paths.
|
||||||
|
#
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS p1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
DELIMITER |;
|
||||||
|
CREATE PROCEDURE p1(dist DOUBLE, geom TEXT)
|
||||||
|
BEGIN
|
||||||
|
DECLARE g GEOMETRY;
|
||||||
|
SET g=GeomFromText(geom);
|
||||||
|
SELECT geom AS `-----`;
|
||||||
|
SELECT dist, GeometryType(@buf:=ST_Buffer(g, dist)) AS `buffer`, ROUND(ST_AREA(@buf),2) AS buf_area;
|
||||||
|
END|
|
||||||
|
DELIMITER ;|
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Testing ST_BUFFER with positive distance
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CALL p1(1, 'POINT(0 0))');
|
||||||
|
CALL p1(1, 'LineString(0 1, 1 1))');
|
||||||
|
CALL p1(1, 'LineString(9 9,8 1,1 5,0 0)');
|
||||||
|
CALL p1(1, 'Polygon((2 2,2 8,8 8,8 2,2 2))');
|
||||||
|
CALL p1(1, 'Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))');
|
||||||
|
CALL p1(1, 'Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))');
|
||||||
|
CALL p1(1, 'MultiPoint(9 9,8 1,1 5)');
|
||||||
|
CALL p1(1, 'MultiLineString((0 0,2 2))');
|
||||||
|
CALL p1(1, 'MultiLineString((0 0,2 2,0 4))');
|
||||||
|
CALL p1(1, 'MultiLineString((0 0,2 2),(0 2,2 0))');
|
||||||
|
CALL p1(1, 'MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))');
|
||||||
|
CALL p1(1, 'MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))');
|
||||||
|
CALL p1(1, 'MultiPolygon(((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)),((9 9,8 1,1 5,9 9)))');
|
||||||
|
CALL p1(1, 'GeometryCollection(Point(0 0))');
|
||||||
|
CALL p1(1, 'GeometryCollection(LineString(0 0, 2 2)))');
|
||||||
|
CALL p1(1, 'GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))');
|
||||||
|
CALL p1(1, 'GeometryCollection(MultiPoint(9 9,8 1,1 5))');
|
||||||
|
CALL p1(1, 'GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))');
|
||||||
|
CALL p1(1, 'GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))');
|
||||||
|
CALL p1(1, 'GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))');
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Testing ST_BUFFER with zero distance
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CALL p1(0, 'POINT(0 0))');
|
||||||
|
CALL p1(0, 'LineString(0 1, 1 1))');
|
||||||
|
CALL p1(0, 'LineString(9 9,8 1,1 5,0 0)');
|
||||||
|
CALL p1(0, 'Polygon((2 2,2 8,8 8,8 2,2 2))');
|
||||||
|
CALL p1(0, 'Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))');
|
||||||
|
CALL p1(0, 'Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))');
|
||||||
|
CALL p1(0, 'MultiPoint(9 9,8 1,1 5)');
|
||||||
|
CALL p1(0, 'MultiLineString((0 0,2 2))');
|
||||||
|
CALL p1(0, 'MultiLineString((0 0,2 2,0 4))');
|
||||||
|
CALL p1(0, 'MultiLineString((0 0,2 2),(0 2,2 0))');
|
||||||
|
CALL p1(0, 'MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))');
|
||||||
|
CALL p1(0, 'MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))');
|
||||||
|
CALL p1(0, 'MultiPolygon(((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)),((9 9,8 1,1 5,9 9)))');
|
||||||
|
CALL p1(0, 'GeometryCollection(Point(0 0))');
|
||||||
|
CALL p1(0, 'GeometryCollection(LineString(0 0, 2 2)))');
|
||||||
|
CALL p1(0, 'GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))');
|
||||||
|
CALL p1(0, 'GeometryCollection(MultiPoint(9 9,8 1,1 5))');
|
||||||
|
CALL p1(0, 'GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))');
|
||||||
|
CALL p1(0, 'GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))');
|
||||||
|
CALL p1(0, 'GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))');
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Testing ST_BUFFER with negative distance
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CALL p1(-1, 'POINT(0 0))');
|
||||||
|
CALL p1(-1, 'LineString(0 1, 1 1))');
|
||||||
|
CALL p1(-1, 'LineString(9 9,8 1,1 5,0 0)');
|
||||||
|
CALL p1(-1, 'Polygon((2 2,2 8,8 8,8 2,2 2))');
|
||||||
|
#
|
||||||
|
# Wrong shape
|
||||||
|
# CALL p1(-1, 'Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))');
|
||||||
|
# Wrong shape
|
||||||
|
# CALL p1(-1, 'Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))');
|
||||||
|
#
|
||||||
|
CALL p1(-1, 'MultiPoint(9 9,8 1,1 5)');
|
||||||
|
CALL p1(-1, 'MultiLineString((0 0,2 2))');
|
||||||
|
CALL p1(-1, 'MultiLineString((0 0,2 2,0 4))');
|
||||||
|
CALL p1(-1, 'MultiLineString((0 0,2 2),(0 2,2 0))');
|
||||||
|
CALL p1(-1, 'MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))');
|
||||||
|
#
|
||||||
|
# Wrong shape
|
||||||
|
#CALL p1(-1, 'MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))');
|
||||||
|
#CALL p1(-1, 'MultiPolygon(((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)),((9 9,8 1,1 5,9 9)))');
|
||||||
|
#
|
||||||
|
CALL p1(-1, 'GeometryCollection(Point(0 0))');
|
||||||
|
CALL p1(-1, 'GeometryCollection(LineString(0 0, 2 2)))');
|
||||||
|
CALL p1(-1, 'GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))');
|
||||||
|
CALL p1(-1, 'GeometryCollection(MultiPoint(9 9,8 1,1 5))');
|
||||||
|
CALL p1(-1, 'GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))');
|
||||||
|
#
|
||||||
|
# Wrong shape
|
||||||
|
# CALL p1(-1, 'GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))');
|
||||||
|
#
|
||||||
|
CALL p1(-1, 'GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))');
|
||||||
|
|
||||||
|
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
SELECT ST_CONTAINS(
|
||||||
|
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
|
||||||
|
GeomFromText('POINT(5 10)'));
|
||||||
|
SELECT AsText(ST_UNION(
|
||||||
|
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
|
||||||
|
GeomFromText('POINT(5 10)')));
|
||||||
|
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #13833019 ASSERTION `T1->RESULT_RANGE' FAILED IN GCALC_OPERATION_REDUCER::END_COUPLE
|
||||||
|
--echo #
|
||||||
|
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3));
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #13832749 HANDLE_FATAL_SIGNAL IN GCALC_FUNCTION::COUNT_INTERNAL
|
||||||
|
--echo #
|
||||||
|
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), ((9 9,8 1,1 5,9 9)))'),1));
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#13358363 - ASSERTION: N > 0 && N < SINUSES_CALCULATED*2+1 | GET_N_SINCOS/ADD_EDGE_BUFFER
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
DO ST_BUFFER(ST_GEOMCOLLFROMTEXT('linestring(1 1,2 2)'),'');
|
||||||
|
|
||||||
|
SELECT ST_WITHIN(
|
||||||
|
LINESTRINGFROMTEXT(' LINESTRING(3 8,9 2,3 8,3 3,7 6,4 7,4 7,8 1) '),
|
||||||
|
ST_BUFFER(MULTIPOLYGONFROMTEXT(' MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5))) '),
|
||||||
|
ST_NUMINTERIORRINGS(POLYGONFROMTEXT('POLYGON((3 5,2 4,2 5,3 5)) '))));
|
||||||
|
|
||||||
|
SELECT ST_DIMENSION(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((3 5,2 5,2 4,3 4,3 5)) '),
|
||||||
|
ST_NUMINTERIORRINGS(POLYGONFROMTEXT(' POLYGON((0 0,9 3,4 2,0 0))'))));
|
||||||
|
|
||||||
|
SELECT ST_NUMINTERIORRINGS(
|
||||||
|
ST_ENVELOPE(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5))) '),
|
||||||
|
SRID(MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 2,4 2,1 2,2 4,2 2)) ')))));
|
||||||
|
|
||||||
|
SELECT ASTEXT(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((9 9,5 2,4 5,9 9))'),
|
||||||
|
SRID(GEOMETRYFROMTEXT(' MULTIPOINT(8 4,5 0,7 8,6 9,3 4,7 3,5 5) '))));
|
@ -72,6 +72,19 @@ INSERT into gis_geometry SELECT * FROM gis_multi_line;
|
|||||||
INSERT into gis_geometry SELECT * FROM gis_multi_polygon;
|
INSERT into gis_geometry SELECT * FROM gis_multi_polygon;
|
||||||
INSERT into gis_geometry SELECT * FROM gis_geometrycollection;
|
INSERT into gis_geometry SELECT * FROM gis_geometrycollection;
|
||||||
|
|
||||||
|
-- disable_query_log
|
||||||
|
-- disable_result_log
|
||||||
|
ANALYZE TABLE gis_point;
|
||||||
|
ANALYZE TABLE gis_line;
|
||||||
|
ANALYZE TABLE gis_polygon;
|
||||||
|
ANALYZE TABLE gis_multi_point;
|
||||||
|
ANALYZE TABLE gis_multi_line;
|
||||||
|
ANALYZE TABLE gis_multi_polygon;
|
||||||
|
ANALYZE TABLE gis_geometrycollection;
|
||||||
|
ANALYZE TABLE gis_geometry;
|
||||||
|
-- enable_result_log
|
||||||
|
-- enable_query_log
|
||||||
|
|
||||||
SELECT fid, AsText(g) FROM gis_point ORDER by fid;
|
SELECT fid, AsText(g) FROM gis_point ORDER by fid;
|
||||||
SELECT fid, AsText(g) FROM gis_line ORDER by fid;
|
SELECT fid, AsText(g) FROM gis_line ORDER by fid;
|
||||||
SELECT fid, AsText(g) FROM gis_polygon ORDER by fid;
|
SELECT fid, AsText(g) FROM gis_polygon ORDER by fid;
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
--require r/have_mysql_upgrade.result
|
|
||||||
--disable_query_log
|
|
||||||
select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
|
|
||||||
--enable_query_log
|
|
15
mysql-test/include/have_semisync_plugin.inc
Normal file
15
mysql-test/include/have_semisync_plugin.inc
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Check if server has support for loading plugins
|
||||||
|
#
|
||||||
|
if (`SELECT @@have_dynamic_loading != 'YES'`) {
|
||||||
|
--skip Requires dynamic loading
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check if the variable SEMISYNC_MASTER_SO is set
|
||||||
|
#
|
||||||
|
if (!$SEMISYNC_MASTER_SO)
|
||||||
|
{
|
||||||
|
skip Need semisync plugins;
|
||||||
|
}
|
||||||
|
|
@ -14,7 +14,7 @@
|
|||||||
if ($value == No such row)
|
if ($value == No such row)
|
||||||
{
|
{
|
||||||
SET sql_log_bin = 0;
|
SET sql_log_bin = 0;
|
||||||
eval INSTALL PLUGIN rpl_semi_sync_master SONAME '$SEMISYNC_MASTER_PLUGIN';
|
install plugin rpl_semi_sync_master soname 'semisync_master';
|
||||||
SET GLOBAL rpl_semi_sync_master_enabled = 1;
|
SET GLOBAL rpl_semi_sync_master_enabled = 1;
|
||||||
SET sql_log_bin = 1;
|
SET sql_log_bin = 1;
|
||||||
}
|
}
|
||||||
@ -28,7 +28,7 @@ if ($value == No such row)
|
|||||||
if ($value == No such row)
|
if ($value == No such row)
|
||||||
{
|
{
|
||||||
SET sql_log_bin = 0;
|
SET sql_log_bin = 0;
|
||||||
eval INSTALL PLUGIN rpl_semi_sync_slave SONAME '$SEMISYNC_SLAVE_PLUGIN';
|
install plugin rpl_semi_sync_slave soname 'semisync_slave';
|
||||||
SET GLOBAL rpl_semi_sync_slave_enabled = 1;
|
SET GLOBAL rpl_semi_sync_slave_enabled = 1;
|
||||||
SET sql_log_bin = 1;
|
SET sql_log_bin = 1;
|
||||||
}
|
}
|
||||||
|
@ -159,6 +159,7 @@ INSERT INTO global_suppressions VALUES
|
|||||||
("InnoDB: Error: in ALTER TABLE `test`.`t[123]`"),
|
("InnoDB: Error: in ALTER TABLE `test`.`t[123]`"),
|
||||||
("InnoDB: Error: in RENAME TABLE table `test`.`t1`"),
|
("InnoDB: Error: in RENAME TABLE table `test`.`t1`"),
|
||||||
("InnoDB: Error: table `test`.`t[123]` .*does not exist in the InnoDB internal"),
|
("InnoDB: Error: table `test`.`t[123]` .*does not exist in the InnoDB internal"),
|
||||||
|
("InnoDB: Warning: semaphore wait:"),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
BUG#32080 - Excessive warnings on Solaris: setrlimit could not
|
BUG#32080 - Excessive warnings on Solaris: setrlimit could not
|
||||||
|
@ -2,13 +2,6 @@
|
|||||||
|
|
||||||
# Can't run test of external client with embedded server
|
# Can't run test of external client with embedded server
|
||||||
-- source include/not_embedded.inc
|
-- source include/not_embedded.inc
|
||||||
|
|
||||||
# Only run test if "mysql_upgrade" is found
|
|
||||||
--require r/have_mysql_upgrade.result
|
|
||||||
--disable_query_log
|
|
||||||
select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
|
|
||||||
--enable_query_log
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Hack:
|
# Hack:
|
||||||
#
|
#
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
# The environment variables SEARCH_FILE and SEARCH_PATTERN must be set
|
# The environment variables SEARCH_FILE and SEARCH_PATTERN must be set
|
||||||
# before sourcing this routine.
|
# before sourcing this routine.
|
||||||
#
|
#
|
||||||
|
# Optionally, SEARCH_RANGE can be set to the max number of bytes of the file
|
||||||
|
# to search. If negative, it will search that many bytes at the end of the
|
||||||
|
# file. The default is to search only the first 50000 bytes of the file.
|
||||||
|
#
|
||||||
# In case of
|
# In case of
|
||||||
# - SEARCH_FILE and/or SEARCH_PATTERN is not set
|
# - SEARCH_FILE and/or SEARCH_PATTERN is not set
|
||||||
# - SEARCH_FILE cannot be opened
|
# - SEARCH_FILE cannot be opened
|
||||||
@ -38,6 +42,7 @@
|
|||||||
# --error 0,1
|
# --error 0,1
|
||||||
# --remove_file $error_log
|
# --remove_file $error_log
|
||||||
# let SEARCH_FILE= $error_log;
|
# let SEARCH_FILE= $error_log;
|
||||||
|
# let SEARCH_RANGE= -50000;
|
||||||
# # Stop the server
|
# # Stop the server
|
||||||
# let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
|
# let $restart_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
|
||||||
# --exec echo "wait" > $restart_file
|
# --exec echo "wait" > $restart_file
|
||||||
@ -57,8 +62,18 @@ perl;
|
|||||||
use strict;
|
use strict;
|
||||||
my $search_file= $ENV{'SEARCH_FILE'} or die "SEARCH_FILE not set";
|
my $search_file= $ENV{'SEARCH_FILE'} or die "SEARCH_FILE not set";
|
||||||
my $search_pattern= $ENV{'SEARCH_PATTERN'} or die "SEARCH_PATTERN not set";
|
my $search_pattern= $ENV{'SEARCH_PATTERN'} or die "SEARCH_PATTERN not set";
|
||||||
|
my $search_range= $ENV{'SEARCH_RANGE'};
|
||||||
|
my $file_content;
|
||||||
|
$search_range= 50000 unless $search_range =~ /-?[0-9]+/;
|
||||||
open(FILE, "$search_file") or die("Unable to open '$search_file': $!\n");
|
open(FILE, "$search_file") or die("Unable to open '$search_file': $!\n");
|
||||||
read(FILE, my $file_content, 50000, 0);
|
if ($search_range >= 0) {
|
||||||
|
read(FILE, $file_content, $search_range, 0);
|
||||||
|
} else {
|
||||||
|
my $size= -s $search_file;
|
||||||
|
$search_range = -$size if $size > -$search_range;
|
||||||
|
seek(FILE, $search_range, 2);
|
||||||
|
read(FILE, $file_content, -$search_range, 0);
|
||||||
|
}
|
||||||
close(FILE);
|
close(FILE);
|
||||||
if ( not $file_content =~ m{$search_pattern} ) {
|
if ( not $file_content =~ m{$search_pattern} ) {
|
||||||
die("# ERROR: The file '$search_file' does not contain the expected pattern $search_pattern\n->$file_content<-\n");
|
die("# ERROR: The file '$search_file' does not contain the expected pattern $search_pattern\n->$file_content<-\n");
|
||||||
|
@ -83,7 +83,7 @@ let $script=
|
|||||||
s{block_len=[0-9]+}{block_len=#};
|
s{block_len=[0-9]+}{block_len=#};
|
||||||
s{Server ver:.*DOLLAR}{SERVER_VERSION, BINLOG_VERSION};
|
s{Server ver:.*DOLLAR}{SERVER_VERSION, BINLOG_VERSION};
|
||||||
s{GTID [0-9]+-[0-9]+-[0-9]+}{GTID #-#-#};
|
s{GTID [0-9]+-[0-9]+-[0-9]+}{GTID #-#-#};
|
||||||
s{\[[0-9]-[0-9]-[0-9]+\]}{[#-#-#]};
|
s{\[([0-9]-[0-9]-[0-9]+,?)+\]}{[#-#-#]};
|
||||||
s{cid=[0-9]+}{cid=#};
|
s{cid=[0-9]+}{cid=#};
|
||||||
s{SQL_LOAD-[a-z,0-9,-]*.[a-z]*}{SQL_LOAD-<SERVER UUID>-<MASTER server-id>-<file-id>.<extension>};
|
s{SQL_LOAD-[a-z,0-9,-]*.[a-z]*}{SQL_LOAD-<SERVER UUID>-<MASTER server-id>-<file-id>.<extension>};
|
||||||
s{rand_seed1=[0-9]*,rand_seed2=[0-9]*}{rand_seed1=<seed 1>,rand_seed2=<seed 2>};
|
s{rand_seed1=[0-9]*,rand_seed2=[0-9]*}{rand_seed1=<seed 1>,rand_seed2=<seed 2>};
|
||||||
|
32
mysql-test/include/stop_dump_threads.inc
Normal file
32
mysql-test/include/stop_dump_threads.inc
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# ==== Purpose ====
|
||||||
|
#
|
||||||
|
# Stop all dump threads on the server of the current connection.
|
||||||
|
#
|
||||||
|
# ==== Usage ====
|
||||||
|
#
|
||||||
|
# --source include/stop_dump_threads.inc
|
||||||
|
|
||||||
|
--let $include_filename= stop_dump_threads.inc
|
||||||
|
--source include/begin_include_file.inc
|
||||||
|
|
||||||
|
|
||||||
|
--let $_sdt_show_rpl_debug_info_old= $show_rpl_debug_info
|
||||||
|
--let $show_rpl_debug_info= 1
|
||||||
|
--disable_query_log
|
||||||
|
--disable_result_log
|
||||||
|
|
||||||
|
--let $_sdt_dump_thread_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND = 'Binlog dump'`
|
||||||
|
|
||||||
|
while ($_sdt_dump_thread_id != '')
|
||||||
|
{
|
||||||
|
eval KILL $_sdt_dump_thread_id;
|
||||||
|
--let $wait_condition= SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE ID = $_sdt_dump_thread_id
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--let $_sdt_dump_thread_id= `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND = 'Binlog dump'`
|
||||||
|
}
|
||||||
|
|
||||||
|
--let $show_rpl_debug_info= $_sdt_show_rpl_debug_info_old
|
||||||
|
|
||||||
|
--let $include_filename= stop_dump_threads.inc
|
||||||
|
--source include/end_include_file.inc
|
@ -13,6 +13,11 @@
|
|||||||
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
UNINSTALL PLUGIN rpl_semi_sync_slave;
|
||||||
|
|
||||||
--connection master
|
--connection master
|
||||||
|
# After BUG#17638477 fix, uninstallation of rpl_semi_sync_master
|
||||||
|
# is not allowed when there are semi sync slaves. Hence kill
|
||||||
|
# all dump threads before uninstalling it.
|
||||||
|
SET GLOBAL rpl_semi_sync_master_enabled = OFF;
|
||||||
|
--source include/stop_dump_threads.inc
|
||||||
UNINSTALL PLUGIN rpl_semi_sync_master;
|
UNINSTALL PLUGIN rpl_semi_sync_master;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
# Call mtr in out-of-source build
|
# Call mtr in out-of-source build
|
||||||
$ENV{MTR_BINDIR} = "@CMAKE_BINARY_DIR@";
|
$ENV{MTR_BINDIR} = '@CMAKE_BINARY_DIR@';
|
||||||
chdir("@CMAKE_SOURCE_DIR@/mysql-test");
|
chdir('@CMAKE_SOURCE_DIR@/mysql-test');
|
||||||
exit(system($^X, "@CMAKE_SOURCE_DIR@/mysql-test/mysql-test-run.pl", @ARGV) >> 8);
|
exit(system($^X, '@CMAKE_SOURCE_DIR@/mysql-test/mysql-test-run.pl', @ARGV) >> 8);
|
||||||
|
@ -4508,6 +4508,39 @@ COALESCE(c1)
|
|||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-5745 analyze MySQL fix for bug#12368495
|
||||||
|
#
|
||||||
|
SELECT CHAR_LENGTH(TRIM(LEADING 0x000000 FROM _ucs2 0x0061));
|
||||||
|
CHAR_LENGTH(TRIM(LEADING 0x000000 FROM _ucs2 0x0061))
|
||||||
|
2
|
||||||
|
SELECT CHAR_LENGTH(TRIM(LEADING 0x0001 FROM _ucs2 0x0061));
|
||||||
|
CHAR_LENGTH(TRIM(LEADING 0x0001 FROM _ucs2 0x0061))
|
||||||
|
2
|
||||||
|
SELECT CHAR_LENGTH(TRIM(LEADING 0x00 FROM _ucs2 0x0061));
|
||||||
|
CHAR_LENGTH(TRIM(LEADING 0x00 FROM _ucs2 0x0061))
|
||||||
|
1
|
||||||
|
SELECT CHAR_LENGTH(TRIM(TRAILING 0x000000 FROM _ucs2 0x0061));
|
||||||
|
CHAR_LENGTH(TRIM(TRAILING 0x000000 FROM _ucs2 0x0061))
|
||||||
|
2
|
||||||
|
SELECT CHAR_LENGTH(TRIM(TRAILING 0x0001 FROM _ucs2 0x0061));
|
||||||
|
CHAR_LENGTH(TRIM(TRAILING 0x0001 FROM _ucs2 0x0061))
|
||||||
|
2
|
||||||
|
SELECT CHAR_LENGTH(TRIM(TRAILING 0x61 FROM _ucs2 0x0061));
|
||||||
|
CHAR_LENGTH(TRIM(TRAILING 0x61 FROM _ucs2 0x0061))
|
||||||
|
1
|
||||||
|
SELECT CHAR_LENGTH(TRIM(BOTH 0x000000 FROM _ucs2 0x0061));
|
||||||
|
CHAR_LENGTH(TRIM(BOTH 0x000000 FROM _ucs2 0x0061))
|
||||||
|
2
|
||||||
|
SELECT CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _ucs2 0x0061));
|
||||||
|
CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _ucs2 0x0061))
|
||||||
|
2
|
||||||
|
SELECT CHAR_LENGTH(TRIM(BOTH 0x61 FROM _ucs2 0x0061));
|
||||||
|
CHAR_LENGTH(TRIM(BOTH 0x61 FROM _ucs2 0x0061))
|
||||||
|
1
|
||||||
|
SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061));
|
||||||
|
CHAR_LENGTH(TRIM(BOTH 0x00 FROM _ucs2 0x0061))
|
||||||
|
1
|
||||||
|
#
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -227,13 +227,8 @@ DROP TABLE mysql050614_xxx_croatian_ci;
|
|||||||
# Checking mysql_upgrade
|
# Checking mysql_upgrade
|
||||||
#
|
#
|
||||||
# Running mysql_upgrade
|
# Running mysql_upgrade
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -263,6 +258,13 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
test.maria050313_ucs2_croatian_ci_def Needs upgrade
|
test.maria050313_ucs2_croatian_ci_def Needs upgrade
|
||||||
@ -276,17 +278,11 @@ test.maria050313_ucs2_croatian_ci_def OK
|
|||||||
test.maria050313_utf8_croatian_ci OK
|
test.maria050313_utf8_croatian_ci OK
|
||||||
test.maria050533_xxx_croatian_ci OK
|
test.maria050533_xxx_croatian_ci OK
|
||||||
test.maria100004_xxx_croatian_ci OK
|
test.maria100004_xxx_croatian_ci OK
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
# Running mysql_upgrade for the second time
|
# Running mysql_upgrade for the second time
|
||||||
# This should report OK for all tables
|
# This should report OK for all tables
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -316,6 +312,13 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
test.maria050313_ucs2_croatian_ci_def OK
|
test.maria050313_ucs2_croatian_ci_def OK
|
||||||
@ -323,7 +326,6 @@ test.maria050313_utf8_croatian_ci OK
|
|||||||
test.maria050533_xxx_croatian_ci OK
|
test.maria050533_xxx_croatian_ci OK
|
||||||
test.maria100004_xxx_croatian_ci OK
|
test.maria100004_xxx_croatian_ci OK
|
||||||
test.mysql050614_xxx_croatian_ci OK
|
test.mysql050614_xxx_croatian_ci OK
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def;
|
SHOW CREATE TABLE maria050313_ucs2_croatian_ci_def;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
|
@ -1626,6 +1626,39 @@ SELECT '2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)'))
|
|||||||
'2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second
|
'2010-10-10 10:10:10' + INTERVAL GeometryType(GeomFromText('POINT(1 1)')) hour_second
|
||||||
2010-10-10 10:10:10
|
2010-10-10 10:10:10
|
||||||
#
|
#
|
||||||
|
# MDEV-5745 analyze MySQL fix for bug#12368495
|
||||||
|
#
|
||||||
|
SELECT CHAR_LENGTH(TRIM(LEADING 0x0000000000 FROM _utf32 0x00000061));
|
||||||
|
CHAR_LENGTH(TRIM(LEADING 0x0000000000 FROM _utf32 0x00000061))
|
||||||
|
4
|
||||||
|
SELECT CHAR_LENGTH(TRIM(LEADING 0x0001 FROM _utf32 0x00000061));
|
||||||
|
CHAR_LENGTH(TRIM(LEADING 0x0001 FROM _utf32 0x00000061))
|
||||||
|
4
|
||||||
|
SELECT CHAR_LENGTH(TRIM(LEADING 0x00 FROM _utf32 0x00000061));
|
||||||
|
CHAR_LENGTH(TRIM(LEADING 0x00 FROM _utf32 0x00000061))
|
||||||
|
1
|
||||||
|
SELECT CHAR_LENGTH(TRIM(TRAILING 0x0000000000 FROM _utf32 0x00000061));
|
||||||
|
CHAR_LENGTH(TRIM(TRAILING 0x0000000000 FROM _utf32 0x00000061))
|
||||||
|
4
|
||||||
|
SELECT CHAR_LENGTH(TRIM(TRAILING 0x0001 FROM _utf32 0x00000061));
|
||||||
|
CHAR_LENGTH(TRIM(TRAILING 0x0001 FROM _utf32 0x00000061))
|
||||||
|
4
|
||||||
|
SELECT CHAR_LENGTH(TRIM(TRAILING 0x61 FROM _utf32 0x00000061));
|
||||||
|
CHAR_LENGTH(TRIM(TRAILING 0x61 FROM _utf32 0x00000061))
|
||||||
|
3
|
||||||
|
SELECT CHAR_LENGTH(TRIM(BOTH 0x0000000000 FROM _utf32 0x00000061));
|
||||||
|
CHAR_LENGTH(TRIM(BOTH 0x0000000000 FROM _utf32 0x00000061))
|
||||||
|
4
|
||||||
|
SELECT CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _utf32 0x00000061));
|
||||||
|
CHAR_LENGTH(TRIM(BOTH 0x0001 FROM _utf32 0x00000061))
|
||||||
|
4
|
||||||
|
SELECT CHAR_LENGTH(TRIM(BOTH 0x61 FROM _utf32 0x00000061));
|
||||||
|
CHAR_LENGTH(TRIM(BOTH 0x61 FROM _utf32 0x00000061))
|
||||||
|
3
|
||||||
|
SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061));
|
||||||
|
CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061))
|
||||||
|
1
|
||||||
|
#
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
drop table if exists t1;
|
drop table if exists t1;
|
||||||
|
flush status;
|
||||||
show status like "feature%";
|
show status like "feature%";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
|
Feature_delay_key_write 0
|
||||||
Feature_dynamic_columns 0
|
Feature_dynamic_columns 0
|
||||||
Feature_fulltext 0
|
Feature_fulltext 0
|
||||||
Feature_gis 0
|
Feature_gis 0
|
||||||
@ -138,3 +140,17 @@ upd1
|
|||||||
show status like "feature_xml";
|
show status like "feature_xml";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Feature_xml 2
|
Feature_xml 2
|
||||||
|
#
|
||||||
|
# Feature delayed_keys
|
||||||
|
#
|
||||||
|
create table t1 (a int, key(a)) engine=myisam delay_key_write=1;
|
||||||
|
insert into t1 values(1);
|
||||||
|
insert into t1 values(2);
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (a int, key(a)) engine=aria delay_key_write=1;
|
||||||
|
insert into t1 values(1);
|
||||||
|
insert into t1 values(2);
|
||||||
|
drop table t1;
|
||||||
|
show status like "feature_delay_key_write";
|
||||||
|
Variable_name Value
|
||||||
|
Feature_delay_key_write 2
|
||||||
|
@ -2961,6 +2961,9 @@ replace(var, '00000000', table_name)
|
|||||||
(( t2 ++ t2 ))
|
(( t2 ++ t2 ))
|
||||||
drop procedure foo;
|
drop procedure foo;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
select md5(_filename "a"), sha(_filename "a");
|
||||||
|
md5(_filename "a") sha(_filename "a")
|
||||||
|
0cc175b9c0f1b6a831c399e269772661 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8
|
||||||
#
|
#
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
#
|
#
|
||||||
|
@ -2023,10 +2023,72 @@ SEC_TO_TIME(1.12)+0.1 decimal(14,2) YES NULL
|
|||||||
SEC_TO_TIME(1.123456)+0.1 decimal(18,6) YES NULL
|
SEC_TO_TIME(1.123456)+0.1 decimal(18,6) YES NULL
|
||||||
SEC_TO_TIME(1.1234567)+0.1 decimal(18,6) YES NULL
|
SEC_TO_TIME(1.1234567)+0.1 decimal(18,6) YES NULL
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a DATE) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||||
|
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(concat(a,'10'))*1;
|
||||||
|
a
|
||||||
|
2000-02-23
|
||||||
|
2005-05-04
|
||||||
|
SELECT * FROM t1 GROUP BY (-FROM_UNIXTIME(concat(a,'10')))*1;
|
||||||
|
a
|
||||||
|
2005-05-04
|
||||||
|
2000-02-23
|
||||||
|
SELECT * FROM t1 GROUP BY (-FROM_UNIXTIME(concat(a,'10')));
|
||||||
|
a
|
||||||
|
2005-05-04
|
||||||
|
2000-02-23
|
||||||
|
SELECT * FROM t1 GROUP BY ABS(FROM_UNIXTIME(concat(a,'10')));
|
||||||
|
a
|
||||||
|
2000-02-23
|
||||||
|
2005-05-04
|
||||||
|
SELECT * FROM t1 GROUP BY @a:=(FROM_UNIXTIME(concat(a,'10'))*1);
|
||||||
|
a
|
||||||
|
2000-02-23
|
||||||
|
2005-05-04
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET TIME_ZONE='+02:00';
|
||||||
|
#
|
||||||
|
# MDEV-6302 Wrong result set when using GROUP BY FROM_UNIXTIME(...)+0
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a DATE);
|
||||||
|
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||||
|
SELECT a, FROM_UNIXTIME(CONCAT(a,'10')) AS f1, FROM_UNIXTIME(CONCAT(a,'10'))+0 AS f2 FROM t1;
|
||||||
|
a f1 f2
|
||||||
|
2005-05-04 1970-01-01 02:33:25 19700101023325.000000
|
||||||
|
2000-02-23 1970-01-01 02:33:20 19700101023320.000000
|
||||||
|
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(CONCAT(a,'10'))+0;
|
||||||
|
a
|
||||||
|
2000-02-23
|
||||||
|
2005-05-04
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a DATE) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES ('2005-05-04'),('2000-02-23');
|
||||||
|
SELECT * FROM t1 GROUP BY FROM_UNIXTIME(concat(a,'10'))/1;
|
||||||
|
a
|
||||||
|
2000-02-23
|
||||||
|
2005-05-04
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a DATE);
|
||||||
|
INSERT INTO t1 VALUES ('2005-05-04');
|
||||||
|
SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1;
|
||||||
|
f2
|
||||||
|
0.000000
|
||||||
|
SELECT CHAR_LENGTH(CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10')))) AS f2 FROM t1;
|
||||||
|
f2
|
||||||
|
8
|
||||||
|
CREATE TABLE t2 AS SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1;
|
||||||
|
SHOW CREATE TABLE t2;
|
||||||
|
Table Create Table
|
||||||
|
t2 CREATE TABLE `t2` (
|
||||||
|
`f2` varchar(26) DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
SELECT * FROM t2;
|
||||||
|
f2
|
||||||
|
0.000000
|
||||||
|
DROP TABLE t1,t2;
|
||||||
#
|
#
|
||||||
# MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
|
# MDEV-4635 Crash in UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
|
||||||
#
|
#
|
||||||
SET TIME_ZONE='+02:00';
|
|
||||||
SELECT UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'));
|
SELECT UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'));
|
||||||
UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
|
UNIX_TIMESTAMP(STR_TO_DATE('2020','%Y'))
|
||||||
NULL
|
NULL
|
||||||
@ -2600,3 +2662,18 @@ SELECT COALESCE(TIME'10:20:30',DATE'2001-01-01');
|
|||||||
COALESCE(TIME'10:20:30',DATE'2001-01-01')
|
COALESCE(TIME'10:20:30',DATE'2001-01-01')
|
||||||
2014-04-15 10:20:30
|
2014-04-15 10:20:30
|
||||||
SET timestamp=DEFAULT;
|
SET timestamp=DEFAULT;
|
||||||
|
#
|
||||||
|
# MDEV-5750 Assertion `ltime->year == 0' fails on a query with EXTRACT DAY_MINUTE and TIME column
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 ( d DATE, t TIME );
|
||||||
|
INSERT INTO t1 VALUES ('2008-12-05','22:34:09'),('2005-03-27','14:26:02');
|
||||||
|
SELECT EXTRACT(DAY_MINUTE FROM GREATEST(t,d)), GREATEST(t,d) FROM t1;
|
||||||
|
EXTRACT(DAY_MINUTE FROM GREATEST(t,d)) GREATEST(t,d)
|
||||||
|
342259 838:59:59
|
||||||
|
342259 838:59:59
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect time value: '9336:00:00'
|
||||||
|
Warning 1292 Truncated incorrect time value: '9336:00:00'
|
||||||
|
Warning 1292 Truncated incorrect time value: '2952:00:00'
|
||||||
|
Warning 1292 Truncated incorrect time value: '2952:00:00'
|
||||||
|
DROP TABLE t1;
|
||||||
|
294
mysql-test/r/gis-debug.result
Normal file
294
mysql-test/r/gis-debug.result
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
SET @tmp=ST_GIS_DEBUG(1);
|
||||||
|
DROP TABLE IF EXISTS p1;
|
||||||
|
CREATE PROCEDURE p1(dist DOUBLE, geom TEXT)
|
||||||
|
BEGIN
|
||||||
|
DECLARE g GEOMETRY;
|
||||||
|
SET g=GeomFromText(geom);
|
||||||
|
SELECT geom AS `-----`;
|
||||||
|
SELECT dist, GeometryType(@buf:=ST_Buffer(g, dist)) AS `buffer`, ROUND(ST_AREA(@buf),2) AS buf_area;
|
||||||
|
END|
|
||||||
|
#
|
||||||
|
# Testing ST_BUFFER with positive distance
|
||||||
|
#
|
||||||
|
-----
|
||||||
|
POINT(0 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 3.14
|
||||||
|
-----
|
||||||
|
LineString(0 1, 1 1))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 5.14
|
||||||
|
-----
|
||||||
|
LineString(9 9,8 1,1 5,0 0)
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 44.63
|
||||||
|
-----
|
||||||
|
Polygon((2 2,2 8,8 8,8 2,2 2))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 63.14
|
||||||
|
-----
|
||||||
|
Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 95.14
|
||||||
|
-----
|
||||||
|
Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 174.93
|
||||||
|
-----
|
||||||
|
MultiPoint(9 9,8 1,1 5)
|
||||||
|
dist buffer buf_area
|
||||||
|
1 MULTIPOLYGON 9.42
|
||||||
|
-----
|
||||||
|
MultiLineString((0 0,2 2))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 8.80
|
||||||
|
-----
|
||||||
|
MultiLineString((0 0,2 2,0 4))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 14.24
|
||||||
|
-----
|
||||||
|
MultiLineString((0 0,2 2),(0 2,2 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 13.59
|
||||||
|
-----
|
||||||
|
MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 MULTIPOLYGON 70.06
|
||||||
|
-----
|
||||||
|
MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 73.18
|
||||||
|
-----
|
||||||
|
MultiPolygon(((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)),((9 9,8 1,1 5,9 9)))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 73.18
|
||||||
|
-----
|
||||||
|
GeometryCollection(Point(0 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 3.14
|
||||||
|
-----
|
||||||
|
GeometryCollection(LineString(0 0, 2 2)))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 8.80
|
||||||
|
-----
|
||||||
|
GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 63.14
|
||||||
|
-----
|
||||||
|
GeometryCollection(MultiPoint(9 9,8 1,1 5))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 MULTIPOLYGON 9.42
|
||||||
|
-----
|
||||||
|
GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 MULTIPOLYGON 10.28
|
||||||
|
-----
|
||||||
|
GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 MULTIPOLYGON 48.28
|
||||||
|
-----
|
||||||
|
GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))
|
||||||
|
dist buffer buf_area
|
||||||
|
1 POLYGON 75.92
|
||||||
|
#
|
||||||
|
# Testing ST_BUFFER with zero distance
|
||||||
|
#
|
||||||
|
-----
|
||||||
|
POINT(0 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 POINT 0.00
|
||||||
|
-----
|
||||||
|
LineString(0 1, 1 1))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 LINESTRING 0.00
|
||||||
|
-----
|
||||||
|
LineString(9 9,8 1,1 5,0 0)
|
||||||
|
dist buffer buf_area
|
||||||
|
0 LINESTRING 0.00
|
||||||
|
-----
|
||||||
|
Polygon((2 2,2 8,8 8,8 2,2 2))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 POLYGON 36.00
|
||||||
|
-----
|
||||||
|
Polygon((0 0,0 8,8 8,8 0,0 0),(2 2,6 2,6 6,2 6,2 2))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 POLYGON 48.00
|
||||||
|
-----
|
||||||
|
Polygon((0 0, 0 8, 8 8, 8 10, -10 10, -10 0, 0 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 POLYGON 116.00
|
||||||
|
-----
|
||||||
|
MultiPoint(9 9,8 1,1 5)
|
||||||
|
dist buffer buf_area
|
||||||
|
0 MULTIPOINT NULL
|
||||||
|
-----
|
||||||
|
MultiLineString((0 0,2 2))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 MULTILINESTRING NULL
|
||||||
|
-----
|
||||||
|
MultiLineString((0 0,2 2,0 4))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 MULTILINESTRING NULL
|
||||||
|
-----
|
||||||
|
MultiLineString((0 0,2 2),(0 2,2 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 MULTILINESTRING NULL
|
||||||
|
-----
|
||||||
|
MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 MULTILINESTRING NULL
|
||||||
|
-----
|
||||||
|
MultiPolygon(((2 2,2 8,8 8,8 2,2 2)), ((9 9,8 1,1 5,9 9)))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 MULTIPOLYGON 66.00
|
||||||
|
-----
|
||||||
|
MultiPolygon(((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)),((9 9,8 1,1 5,9 9)))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 MULTIPOLYGON 62.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(Point(0 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(LineString(0 0, 2 2)))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 GEOMETRYCOLLECTION 36.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(MultiPoint(9 9,8 1,1 5))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 GEOMETRYCOLLECTION NULL
|
||||||
|
-----
|
||||||
|
GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 GEOMETRYCOLLECTION NULL
|
||||||
|
-----
|
||||||
|
GeometryCollection(MultiPolygon(((0 0, 3 0, 3 3, 0 3, 0 0)),((6 6,6 9,9 9,9 6,6 6))))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 GEOMETRYCOLLECTION 18.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))
|
||||||
|
dist buffer buf_area
|
||||||
|
0 GEOMETRYCOLLECTION 36.00
|
||||||
|
#
|
||||||
|
# Testing ST_BUFFER with negative distance
|
||||||
|
#
|
||||||
|
-----
|
||||||
|
POINT(0 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
LineString(0 1, 1 1))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
LineString(9 9,8 1,1 5,0 0)
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
Polygon((2 2,2 8,8 8,8 2,2 2))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 POLYGON 16.00
|
||||||
|
-----
|
||||||
|
MultiPoint(9 9,8 1,1 5)
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
MultiLineString((0 0,2 2))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
MultiLineString((0 0,2 2,0 4))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
MultiLineString((0 0,2 2),(0 2,2 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
MultiLineString((2 2,2 8,-2 8),(-6 -6, 6 6),(10 10, 14 14))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(Point(0 0))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(LineString(0 0, 2 2)))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(Polygon((2 2,2 8,8 8,8 2,2 2))))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 POLYGON 16.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(MultiPoint(9 9,8 1,1 5))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(MultiLineString((0 0,0 1),(3 0,3 1)))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 GEOMETRYCOLLECTION 0.00
|
||||||
|
-----
|
||||||
|
GeometryCollection(Point(9 9),LineString(1 5,0 0),Polygon((2 2,2 8,8 8,8 2,2 2)))
|
||||||
|
dist buffer buf_area
|
||||||
|
-1 POLYGON 16.00
|
||||||
|
SELECT ST_CONTAINS(
|
||||||
|
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
|
||||||
|
GeomFromText('POINT(5 10)'));
|
||||||
|
ST_CONTAINS(
|
||||||
|
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
|
||||||
|
GeomFromText('POINT(5 10)'))
|
||||||
|
0
|
||||||
|
SELECT AsText(ST_UNION(
|
||||||
|
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
|
||||||
|
GeomFromText('POINT(5 10)')));
|
||||||
|
AsText(ST_UNION(
|
||||||
|
GeomFromText('MULTIPOLYGON(((0 0, 0 5, 5 5, 5 0, 0 0)),((6 6, 6 11, 11 11, 11 6, 6 6)))'),
|
||||||
|
GeomFromText('POINT(5 10)')))
|
||||||
|
GEOMETRYCOLLECTION(POLYGON((0 0,0 5,5 5,5 0,0 0)),POLYGON((6 6,6 11,11 11,11 6,6 6)),POINT(5 10))
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
#
|
||||||
|
# Bug #13833019 ASSERTION `T1->RESULT_RANGE' FAILED IN GCALC_OPERATION_REDUCER::END_COUPLE
|
||||||
|
#
|
||||||
|
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3));
|
||||||
|
GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((0 0,9 4,3 3,0 0)),((2 2,2 2,8 8,2 3,2 2)))'), 3))
|
||||||
|
POLYGON
|
||||||
|
#
|
||||||
|
# Bug #13832749 HANDLE_FATAL_SIGNAL IN GCALC_FUNCTION::COUNT_INTERNAL
|
||||||
|
#
|
||||||
|
SELECT GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), ((9 9,8 1,1 5,9 9)))'),1));
|
||||||
|
GeometryType(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2), (4 4,4 6,6 6,6 4,4 4)), ((9 9,8 1,1 5,9 9)))'),1))
|
||||||
|
POLYGON
|
||||||
|
#
|
||||||
|
# Bug#13358363 - ASSERTION: N > 0 && N < SINUSES_CALCULATED*2+1 | GET_N_SINCOS/ADD_EDGE_BUFFER
|
||||||
|
#
|
||||||
|
DO ST_BUFFER(ST_GEOMCOLLFROMTEXT('linestring(1 1,2 2)'),'');
|
||||||
|
SELECT ST_WITHIN(
|
||||||
|
LINESTRINGFROMTEXT(' LINESTRING(3 8,9 2,3 8,3 3,7 6,4 7,4 7,8 1) '),
|
||||||
|
ST_BUFFER(MULTIPOLYGONFROMTEXT(' MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5))) '),
|
||||||
|
ST_NUMINTERIORRINGS(POLYGONFROMTEXT('POLYGON((3 5,2 4,2 5,3 5)) '))));
|
||||||
|
ST_WITHIN(
|
||||||
|
LINESTRINGFROMTEXT(' LINESTRING(3 8,9 2,3 8,3 3,7 6,4 7,4 7,8 1) '),
|
||||||
|
ST_BUFFER(MULTIPOLYGONFROMTEXT(' MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5)),((2 2,2 8,8 8,8 2,2 2),(4 4,4 6,6 6,6 4,4 4)),((0 5,3 5,3 2,1 2,1 1,3 1,3 0,0 0,0 3,2 3,2 4,0 4,0 5))) ')
|
||||||
|
0
|
||||||
|
SELECT ST_DIMENSION(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((3 5,2 5,2 4,3 4,3 5)) '),
|
||||||
|
ST_NUMINTERIORRINGS(POLYGONFROMTEXT(' POLYGON((0 0,9 3,4 2,0 0))'))));
|
||||||
|
ST_DIMENSION(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((3 5,2 5,2 4,3 4,3 5)) '),
|
||||||
|
ST_NUMINTERIORRINGS(POLYGONFROMTEXT(' POLYGON((0 0,9 3,4 2,0 0))'))))
|
||||||
|
2
|
||||||
|
SELECT ST_NUMINTERIORRINGS(
|
||||||
|
ST_ENVELOPE(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5))) '),
|
||||||
|
SRID(MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 2,4 2,1 2,2 4,2 2)) ')))));
|
||||||
|
ST_NUMINTERIORRINGS(
|
||||||
|
ST_ENVELOPE(ST_BUFFER(MULTIPOLYGONFROMTEXT('MULTIPOLYGON(((3 5,2 5,2 4,3 4,3 5))) '),
|
||||||
|
SRID(MULTILINESTRINGFROMTEXT('MULTILINESTRING((2 2,4 2,1 2,2 4,2 2)) ')))))
|
||||||
|
0
|
||||||
|
SELECT ASTEXT(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((9 9,5 2,4 5,9 9))'),
|
||||||
|
SRID(GEOMETRYFROMTEXT(' MULTIPOINT(8 4,5 0,7 8,6 9,3 4,7 3,5 5) '))));
|
||||||
|
ASTEXT(ST_BUFFER(POLYGONFROMTEXT(' POLYGON((9 9,5 2,4 5,9 9))'),
|
||||||
|
SRID(GEOMETRYFROMTEXT(' MULTIPOINT(8 4,5 0,7 8,6 9,3 4,7 3,5 5) '))))
|
||||||
|
POLYGON((9 9,5 2,4 5,9 9))
|
File diff suppressed because one or more lines are too long
@ -834,6 +834,17 @@ create table t1 (g geometry not null);
|
|||||||
insert into t1 values(default);
|
insert into t1 values(default);
|
||||||
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
CREATE TABLE t1 (a GEOMETRY);
|
||||||
|
CREATE VIEW v1 AS SELECT GeomFromwkb(ASBINARY(a)) FROM t1;
|
||||||
|
CREATE VIEW v2 AS SELECT a FROM t1;
|
||||||
|
DESCRIBE v1;
|
||||||
|
Field Type Null Key Default Extra
|
||||||
|
GeomFromwkb(ASBINARY(a)) geometry YES NULL
|
||||||
|
DESCRIBE v2;
|
||||||
|
Field Type Null Key Default Extra
|
||||||
|
a geometry YES NULL
|
||||||
|
DROP VIEW v1,v2;
|
||||||
|
DROP TABLE t1;
|
||||||
create table t1 (name VARCHAR(100), square GEOMETRY);
|
create table t1 (name VARCHAR(100), square GEOMETRY);
|
||||||
INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
|
INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))'));
|
||||||
INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
|
INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))'));
|
||||||
|
@ -3536,7 +3536,7 @@ COUNT(DISTINCT a, b) SUM(DISTINCT a)
|
|||||||
0 NULL
|
0 NULL
|
||||||
EXPLAIN SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a;
|
EXPLAIN SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t2 range NULL a 5 NULL 9 Using index for group-by
|
1 SIMPLE t2 index NULL a 15 NULL 16 Using index
|
||||||
SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a;
|
SELECT SUM(DISTINCT a), MAX(b) FROM t2 GROUP BY a;
|
||||||
SUM(DISTINCT a) MAX(b)
|
SUM(DISTINCT a) MAX(b)
|
||||||
1 8
|
1 8
|
||||||
@ -3564,7 +3564,7 @@ SELECT 42 * (a + c + COUNT(DISTINCT c, a, b)) FROM t2 GROUP BY a, b, c;
|
|||||||
168
|
168
|
||||||
EXPLAIN SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
|
EXPLAIN SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t2 range NULL a 5 NULL 9 Using index for group-by
|
1 SIMPLE t2 index NULL a 15 NULL 16 Using index
|
||||||
SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
|
SELECT (SUM(DISTINCT a) + MAX(b)) FROM t2 GROUP BY a;
|
||||||
(SUM(DISTINCT a) + MAX(b))
|
(SUM(DISTINCT a) + MAX(b))
|
||||||
9
|
9
|
||||||
@ -3593,6 +3593,58 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
# End of test#50539.
|
# End of test#50539.
|
||||||
#
|
#
|
||||||
|
# Bug#17217128 - BAD INTERACTION BETWEEN MIN/MAX AND
|
||||||
|
# "HAVING SUM(DISTINCT)": WRONG RESULTS.
|
||||||
|
#
|
||||||
|
CREATE TABLE t (a INT, b INT, KEY(a,b));
|
||||||
|
INSERT INTO t VALUES (1,1), (2,2), (3,3), (4,4), (1,0), (3,2), (4,5);
|
||||||
|
ANALYZE TABLE t;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t analyze status OK
|
||||||
|
SELECT a, SUM(DISTINCT a), MIN(b) FROM t GROUP BY a;
|
||||||
|
a SUM(DISTINCT a) MIN(b)
|
||||||
|
1 1 0
|
||||||
|
2 2 2
|
||||||
|
3 3 2
|
||||||
|
4 4 4
|
||||||
|
EXPLAIN SELECT a, SUM(DISTINCT a), MIN(b) FROM t GROUP BY a;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t index NULL a 10 NULL 7 Using index
|
||||||
|
SELECT a, SUM(DISTINCT a), MAX(b) FROM t GROUP BY a;
|
||||||
|
a SUM(DISTINCT a) MAX(b)
|
||||||
|
1 1 1
|
||||||
|
2 2 2
|
||||||
|
3 3 3
|
||||||
|
4 4 5
|
||||||
|
EXPLAIN SELECT a, SUM(DISTINCT a), MAX(b) FROM t GROUP BY a;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t index NULL a 10 NULL 7 Using index
|
||||||
|
SELECT a, MAX(b) FROM t GROUP BY a HAVING SUM(DISTINCT a);
|
||||||
|
a MAX(b)
|
||||||
|
1 1
|
||||||
|
2 2
|
||||||
|
3 3
|
||||||
|
4 5
|
||||||
|
EXPLAIN SELECT a, MAX(b) FROM t GROUP BY a HAVING SUM(DISTINCT a);
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t index NULL a 10 NULL 7 Using index
|
||||||
|
SELECT SUM(DISTINCT a), MIN(b), MAX(b) FROM t;
|
||||||
|
SUM(DISTINCT a) MIN(b) MAX(b)
|
||||||
|
10 0 5
|
||||||
|
EXPLAIN SELECT SUM(DISTINCT a), MIN(b), MAX(b) FROM t;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t index NULL a 10 NULL 7 Using index
|
||||||
|
SELECT a, SUM(DISTINCT a), MIN(b), MAX(b) FROM t GROUP BY a;
|
||||||
|
a SUM(DISTINCT a) MIN(b) MAX(b)
|
||||||
|
1 1 0 1
|
||||||
|
2 2 2 2
|
||||||
|
3 3 2 3
|
||||||
|
4 4 4 5
|
||||||
|
EXPLAIN SELECT a, SUM(DISTINCT a), MIN(b), MAX(b) FROM t GROUP BY a;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t index NULL a 10 NULL 7 Using index
|
||||||
|
DROP TABLE t;
|
||||||
|
#
|
||||||
# MDEV-4219 A simple select query returns random data (upstream bug#68473)
|
# MDEV-4219 A simple select query returns random data (upstream bug#68473)
|
||||||
#
|
#
|
||||||
drop table if exists faulty;
|
drop table if exists faulty;
|
||||||
|
@ -118,3 +118,171 @@ COUNT(DISTINCT a)
|
|||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
End of 5.5 tests
|
End of 5.5 tests
|
||||||
|
#
|
||||||
|
# Bug#17909656 - WRONG RESULTS FOR A SIMPLE QUERY WITH GROUP BY
|
||||||
|
#
|
||||||
|
CREATE TABLE t0 (
|
||||||
|
i1 INTEGER NOT NULL
|
||||||
|
);
|
||||||
|
INSERT INTO t0 VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),
|
||||||
|
(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),
|
||||||
|
(21),(22),(23),(24),(25),(26),(27),(28),(29),(30);
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
c1 CHAR(1) NOT NULL,
|
||||||
|
i1 INTEGER NOT NULL,
|
||||||
|
i2 INTEGER NOT NULL,
|
||||||
|
UNIQUE KEY k1 (c1,i2)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 SELECT 'A',i1,i1 FROM t0;
|
||||||
|
INSERT INTO t1 SELECT 'B',i1,i1 FROM t0;
|
||||||
|
INSERT INTO t1 SELECT 'C',i1,i1 FROM t0;
|
||||||
|
INSERT INTO t1 SELECT 'D',i1,i1 FROM t0;
|
||||||
|
INSERT INTO t1 SELECT 'E',i1,i1 FROM t0;
|
||||||
|
INSERT INTO t1 SELECT 'F',i1,i1 FROM t0;
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
c1 CHAR(1) NOT NULL,
|
||||||
|
i1 INTEGER NOT NULL,
|
||||||
|
i2 INTEGER NOT NULL,
|
||||||
|
UNIQUE KEY k2 (c1,i1,i2)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t2 SELECT 'A',i1,i1 FROM t0;
|
||||||
|
INSERT INTO t2 SELECT 'B',i1,i1 FROM t0;
|
||||||
|
INSERT INTO t2 SELECT 'C',i1,i1 FROM t0;
|
||||||
|
INSERT INTO t2 SELECT 'D',i1,i1 FROM t0;
|
||||||
|
INSERT INTO t2 SELECT 'E',i1,i1 FROM t0;
|
||||||
|
INSERT INTO t2 SELECT 'F',i1,i1 FROM t0;
|
||||||
|
ANALYZE TABLE t1;
|
||||||
|
ANALYZE TABLE t2;
|
||||||
|
EXPLAIN SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' AND i2 = 17) OR ( c1 = 'F')
|
||||||
|
GROUP BY c1;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range k1 k1 5 NULL 31 Using where; Using index
|
||||||
|
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' AND i2 = 17) OR ( c1 = 'F')
|
||||||
|
GROUP BY c1;
|
||||||
|
c1 max(i2)
|
||||||
|
C 17
|
||||||
|
F 30
|
||||||
|
EXPLAIN SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR ( c1 = 'F' AND i2 = 17))
|
||||||
|
GROUP BY c1;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range k1 k1 5 NULL 31 Using where; Using index
|
||||||
|
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR ( c1 = 'F' AND i2 = 17))
|
||||||
|
GROUP BY c1;
|
||||||
|
c1 max(i2)
|
||||||
|
C 30
|
||||||
|
F 17
|
||||||
|
EXPLAIN SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR c1 = 'F' ) AND ( i2 = 17 )
|
||||||
|
GROUP BY c1;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range k1 k1 5 NULL 2 Using where; Using index
|
||||||
|
SELECT c1, max(i2) FROM t1 WHERE (c1 = 'C' OR c1 = 'F' ) AND ( i2 = 17 )
|
||||||
|
GROUP BY c1;
|
||||||
|
c1 max(i2)
|
||||||
|
C 17
|
||||||
|
F 17
|
||||||
|
EXPLAIN SELECT c1, max(i2) FROM t1
|
||||||
|
WHERE ((c1 = 'C' AND (i2 = 40 OR i2 = 30)) OR ( c1 = 'F' AND (i2 = 40 )))
|
||||||
|
GROUP BY c1;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 range k1 k1 5 NULL 3 Using where; Using index
|
||||||
|
SELECT c1, max(i2) FROM t1
|
||||||
|
WHERE ((c1 = 'C' AND (i2 = 40 OR i2 = 30)) OR ( c1 = 'F' AND (i2 = 40 )))
|
||||||
|
GROUP BY c1;
|
||||||
|
c1 max(i2)
|
||||||
|
C 30
|
||||||
|
EXPLAIN SELECT c1, i1, max(i2) FROM t2
|
||||||
|
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
|
||||||
|
GROUP BY c1,i1;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t2 range k2 k2 5 NULL 59 Using where; Using index
|
||||||
|
SELECT c1, i1, max(i2) FROM t2
|
||||||
|
WHERE (c1 = 'C' OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 )
|
||||||
|
GROUP BY c1,i1;
|
||||||
|
c1 i1 max(i2)
|
||||||
|
C 17 17
|
||||||
|
F 17 17
|
||||||
|
EXPLAIN SELECT c1, i1, max(i2) FROM t2
|
||||||
|
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
|
||||||
|
GROUP BY c1,i1;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t2 range k2 k2 5 NULL 58 Using where; Using index
|
||||||
|
SELECT c1, i1, max(i2) FROM t2
|
||||||
|
WHERE (((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35)) AND ( i2 = 17 ))
|
||||||
|
GROUP BY c1,i1;
|
||||||
|
c1 i1 max(i2)
|
||||||
|
C 17 17
|
||||||
|
F 17 17
|
||||||
|
EXPLAIN SELECT c1, i1, max(i2) FROM t2
|
||||||
|
WHERE ((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35) OR ( i2 = 17 ))
|
||||||
|
GROUP BY c1,i1;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t2 index k2 k2 9 NULL 180 Using where; Using index
|
||||||
|
SELECT c1, i1, max(i2) FROM t2
|
||||||
|
WHERE ((c1 = 'C' AND i1 < 40) OR ( c1 = 'F' AND i1 < 35) OR ( i2 = 17 ))
|
||||||
|
GROUP BY c1,i1;
|
||||||
|
c1 i1 max(i2)
|
||||||
|
A 17 17
|
||||||
|
B 17 17
|
||||||
|
C 1 1
|
||||||
|
C 2 2
|
||||||
|
C 3 3
|
||||||
|
C 4 4
|
||||||
|
C 5 5
|
||||||
|
C 6 6
|
||||||
|
C 7 7
|
||||||
|
C 8 8
|
||||||
|
C 9 9
|
||||||
|
C 10 10
|
||||||
|
C 11 11
|
||||||
|
C 12 12
|
||||||
|
C 13 13
|
||||||
|
C 14 14
|
||||||
|
C 15 15
|
||||||
|
C 16 16
|
||||||
|
C 17 17
|
||||||
|
C 18 18
|
||||||
|
C 19 19
|
||||||
|
C 20 20
|
||||||
|
C 21 21
|
||||||
|
C 22 22
|
||||||
|
C 23 23
|
||||||
|
C 24 24
|
||||||
|
C 25 25
|
||||||
|
C 26 26
|
||||||
|
C 27 27
|
||||||
|
C 28 28
|
||||||
|
C 29 29
|
||||||
|
C 30 30
|
||||||
|
D 17 17
|
||||||
|
E 17 17
|
||||||
|
F 1 1
|
||||||
|
F 2 2
|
||||||
|
F 3 3
|
||||||
|
F 4 4
|
||||||
|
F 5 5
|
||||||
|
F 6 6
|
||||||
|
F 7 7
|
||||||
|
F 8 8
|
||||||
|
F 9 9
|
||||||
|
F 10 10
|
||||||
|
F 11 11
|
||||||
|
F 12 12
|
||||||
|
F 13 13
|
||||||
|
F 14 14
|
||||||
|
F 15 15
|
||||||
|
F 16 16
|
||||||
|
F 17 17
|
||||||
|
F 18 18
|
||||||
|
F 19 19
|
||||||
|
F 20 20
|
||||||
|
F 21 21
|
||||||
|
F 22 22
|
||||||
|
F 23 23
|
||||||
|
F 24 24
|
||||||
|
F 25 25
|
||||||
|
F 26 26
|
||||||
|
F 27 27
|
||||||
|
F 28 28
|
||||||
|
F 29 29
|
||||||
|
F 30 30
|
||||||
|
DROP TABLE t0,t1,t2;
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
have_mysql_upgrade
|
|
||||||
1
|
|
1
mysql-test/r/huge_frm-6224.result
Normal file
1
mysql-test/r/huge_frm-6224.result
Normal file
@ -0,0 +1 @@
|
|||||||
|
ERROR HY000: The definition for table `t1` is too big
|
21
mysql-test/r/innodb_load_xa.result
Normal file
21
mysql-test/r/innodb_load_xa.result
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
install plugin innodb soname 'ha_innodb';
|
||||||
|
Warnings:
|
||||||
|
Warning 1105 Cannot enable tc-log at run-time. XA features of InnoDB are disabled
|
||||||
|
select engine,support,transactions,xa from information_schema.engines where engine='innodb';
|
||||||
|
engine support transactions xa
|
||||||
|
InnoDB YES YES NO
|
||||||
|
create table t1 (a int) engine=innodb;
|
||||||
|
start transaction;
|
||||||
|
insert t1 values (1);
|
||||||
|
insert t1 values (2);
|
||||||
|
commit;
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
mysqld-bin.000001 # Gtid # # GTID #-#-#
|
||||||
|
mysqld-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb
|
||||||
|
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
mysqld-bin.000001 # Query # # use `test`; insert t1 values (1)
|
||||||
|
mysqld-bin.000001 # Query # # use `test`; insert t1 values (2)
|
||||||
|
mysqld-bin.000001 # Query # # COMMIT
|
||||||
|
drop table t1;
|
||||||
|
uninstall plugin innodb;
|
@ -331,13 +331,14 @@ Success: 'update v2 set j= j-10 where j = 3' takes shared row locks on 't1'.
|
|||||||
# 4.1 SELECT/SET with a stored function which does not
|
# 4.1 SELECT/SET with a stored function which does not
|
||||||
# modify data and uses SELECT in its turn.
|
# modify data and uses SELECT in its turn.
|
||||||
#
|
#
|
||||||
# In theory there is no need to take row locks on the table
|
# There is no need to take row locks on the table
|
||||||
# being selected from in SF as the call to such function
|
# being selected from in SF as the call to such function
|
||||||
# won't get into the binary log. In practice, however, we
|
# won't get into the binary log.
|
||||||
# discover that fact too late in the process to be able to
|
#
|
||||||
# affect the decision what locks should be taken.
|
# However in practice innodb takes strong lock on tables
|
||||||
# Hence, strong locks are taken in this case.
|
# being selected from within SF, when SF is called from
|
||||||
Success: 'select f1()' takes shared row locks on 't1'.
|
# non SELECT statements like 'set' statement below.
|
||||||
|
Success: 'select f1()' doesn't take row locks on 't1'.
|
||||||
Success: 'set @a:= f1()' takes shared row locks on 't1'.
|
Success: 'set @a:= f1()' takes shared row locks on 't1'.
|
||||||
#
|
#
|
||||||
# 4.2 INSERT (or other statement which modifies data) with
|
# 4.2 INSERT (or other statement which modifies data) with
|
||||||
@ -364,13 +365,15 @@ Success: 'set @a:= f2()' takes shared row locks on 't1'.
|
|||||||
# modify data and reads a table through subselect
|
# modify data and reads a table through subselect
|
||||||
# in a control construct.
|
# in a control construct.
|
||||||
#
|
#
|
||||||
# Again, in theory a call to this function won't get to the
|
# Call to this function won't get to the
|
||||||
# binary log and thus no locking is needed. But in practice
|
# binary log and thus no locking is needed.
|
||||||
# we don't detect this fact early enough (get_lock_type_for_table())
|
#
|
||||||
# to avoid taking row locks.
|
# However in practice innodb takes strong lock on tables
|
||||||
Success: 'select f3()' takes shared row locks on 't1'.
|
# being selected from within SF, when SF is called from
|
||||||
|
# non SELECT statements like 'set' statement below.
|
||||||
|
Success: 'select f3()' doesn't take row locks on 't1'.
|
||||||
Success: 'set @a:= f3()' takes shared row locks on 't1'.
|
Success: 'set @a:= f3()' takes shared row locks on 't1'.
|
||||||
Success: 'select f4()' takes shared row locks on 't1'.
|
Success: 'select f4()' doesn't take row locks on 't1'.
|
||||||
Success: 'set @a:= f4()' takes shared row locks on 't1'.
|
Success: 'set @a:= f4()' takes shared row locks on 't1'.
|
||||||
#
|
#
|
||||||
# 4.5. INSERT (or other statement which modifies data) with
|
# 4.5. INSERT (or other statement which modifies data) with
|
||||||
@ -398,13 +401,15 @@ Success: 'set @a:= f5()' takes shared row locks on 't1'.
|
|||||||
# doesn't modify data and reads tables through
|
# doesn't modify data and reads tables through
|
||||||
# a view.
|
# a view.
|
||||||
#
|
#
|
||||||
# Once again, in theory, calls to such functions won't
|
# Calls to such functions won't get into
|
||||||
# get into the binary log and thus don't need row
|
# the binary log and thus don't need row locks.
|
||||||
# locks. But in practice this fact is discovered
|
#
|
||||||
# too late to have any effect.
|
# However in practice innodb takes strong lock on tables
|
||||||
Success: 'select f6()' takes shared row locks on 't1'.
|
# being selected from within SF, when SF is called from
|
||||||
|
# non SELECT statements like 'set' statement below.
|
||||||
|
Success: 'select f6()' doesn't take row locks on 't1'.
|
||||||
Success: 'set @a:= f6()' takes shared row locks on 't1'.
|
Success: 'set @a:= f6()' takes shared row locks on 't1'.
|
||||||
Success: 'select f7()' takes shared row locks on 't1'.
|
Success: 'select f7()' doesn't take row locks on 't1'.
|
||||||
Success: 'set @a:= f7()' takes shared row locks on 't1'.
|
Success: 'set @a:= f7()' takes shared row locks on 't1'.
|
||||||
#
|
#
|
||||||
# 4.8 INSERT which uses stored function which
|
# 4.8 INSERT which uses stored function which
|
||||||
@ -431,10 +436,9 @@ Success: 'select f9()' takes shared row locks on 't1'.
|
|||||||
# data and reads a table indirectly, by calling another
|
# data and reads a table indirectly, by calling another
|
||||||
# function.
|
# function.
|
||||||
#
|
#
|
||||||
# In theory, calls to such functions won't get into the binary
|
# Calls to such functions won't get into the binary
|
||||||
# log and thus don't need to acquire row locks. But in practice
|
# log and thus don't need to acquire row locks.
|
||||||
# this fact is discovered too late to have any effect.
|
Success: 'select f10()' doesn't take row locks on 't1'.
|
||||||
Success: 'select f10()' takes shared row locks on 't1'.
|
|
||||||
#
|
#
|
||||||
# 4.11 INSERT which uses a stored function which doesn't modify
|
# 4.11 INSERT which uses a stored function which doesn't modify
|
||||||
# data and reads a table indirectly, by calling another
|
# data and reads a table indirectly, by calling another
|
||||||
@ -494,10 +498,9 @@ Success: 'select f14()' takes shared row locks on 't1'.
|
|||||||
# 5.3 SELECT that calls a function that doesn't modify data and
|
# 5.3 SELECT that calls a function that doesn't modify data and
|
||||||
# uses a CALL statement that reads a table via SELECT.
|
# uses a CALL statement that reads a table via SELECT.
|
||||||
#
|
#
|
||||||
# In theory, calls to such functions won't get into the binary
|
# Calls to such functions won't get into the binary
|
||||||
# log and thus don't need to acquire row locks. But in practice
|
# log and thus don't need to acquire row locks.
|
||||||
# this fact is discovered too late to have any effect.
|
Success: 'select f15()' doesn't take row locks on 't1'.
|
||||||
Success: 'select f15()' takes shared row locks on 't1'.
|
|
||||||
#
|
#
|
||||||
# 5.4 INSERT which calls function which doesn't modify data and
|
# 5.4 INSERT which calls function which doesn't modify data and
|
||||||
# uses CALL statement which reads table through SELECT.
|
# uses CALL statement which reads table through SELECT.
|
||||||
|
@ -86,7 +86,10 @@ SET DEBUG_SYNC= 'now SIGNAL killed';
|
|||||||
# Reaping: OPTIMIZE TABLE t1
|
# Reaping: OPTIMIZE TABLE t1
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||||
|
test.t1 optimize error Query execution was interrupted
|
||||||
test.t1 optimize status Operation failed
|
test.t1 optimize status Operation failed
|
||||||
|
Warnings:
|
||||||
|
Error 1317 Query execution was interrupted
|
||||||
# Connection default
|
# Connection default
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET DEBUG_SYNC= 'RESET';
|
SET DEBUG_SYNC= 'RESET';
|
||||||
|
58
mysql-test/r/ipv4_and_ipv6.result
Normal file
58
mysql-test/r/ipv4_and_ipv6.result
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
=============Test of '::1' ========================================
|
||||||
|
mysqld is alive
|
||||||
|
CREATE USER testuser@'::1' identified by '1234';
|
||||||
|
GRANT ALL ON test.* TO testuser@'::1';
|
||||||
|
SHOW GRANTS FOR testuser@'::1';
|
||||||
|
Grants for testuser@::1
|
||||||
|
GRANT USAGE ON *.* TO 'testuser'@'::1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||||
|
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'::1'
|
||||||
|
SET @nip= inet_aton('::1');
|
||||||
|
SELECT @nip;
|
||||||
|
@nip
|
||||||
|
NULL
|
||||||
|
SELECT inet_ntoa(@nip);
|
||||||
|
inet_ntoa(@nip)
|
||||||
|
NULL
|
||||||
|
SELECT USER();
|
||||||
|
USER()
|
||||||
|
root@localhost
|
||||||
|
SELECT current_user();
|
||||||
|
current_user()
|
||||||
|
root@localhost
|
||||||
|
SHOW PROCESSLIST;
|
||||||
|
REVOKE ALL ON test.* FROM testuser@'::1';
|
||||||
|
RENAME USER testuser@'::1' to testuser1@'::1';
|
||||||
|
SET PASSWORD FOR testuser1@'::1' = PASSWORD ('9876');
|
||||||
|
SELECT USER();
|
||||||
|
USER()
|
||||||
|
root@localhost
|
||||||
|
DROP USER testuser1@'::1';
|
||||||
|
=============Test of '127.0.0.1' (IPv4) ===========================
|
||||||
|
mysqld is alive
|
||||||
|
CREATE USER testuser@'127.0.0.1' identified by '1234';
|
||||||
|
GRANT ALL ON test.* TO testuser@'127.0.0.1';
|
||||||
|
SHOW GRANTS FOR testuser@'127.0.0.1';
|
||||||
|
Grants for testuser@127.0.0.1
|
||||||
|
GRANT USAGE ON *.* TO 'testuser'@'127.0.0.1' IDENTIFIED BY PASSWORD '*A4B6157319038724E3560894F7F932C8886EBFCF'
|
||||||
|
GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'127.0.0.1'
|
||||||
|
SET @nip= inet_aton('127.0.0.1');
|
||||||
|
SELECT @nip;
|
||||||
|
@nip
|
||||||
|
2130706433
|
||||||
|
SELECT inet_ntoa(@nip);
|
||||||
|
inet_ntoa(@nip)
|
||||||
|
127.0.0.1
|
||||||
|
SELECT USER();
|
||||||
|
USER()
|
||||||
|
root@localhost
|
||||||
|
SELECT current_user();
|
||||||
|
current_user()
|
||||||
|
root@localhost
|
||||||
|
SHOW PROCESSLIST;
|
||||||
|
REVOKE ALL ON test.* FROM testuser@'127.0.0.1';
|
||||||
|
RENAME USER testuser@'127.0.0.1' to testuser1@'127.0.0.1';
|
||||||
|
SET PASSWORD FOR testuser1@'127.0.0.1' = PASSWORD ('9876');
|
||||||
|
SELECT USER();
|
||||||
|
USER()
|
||||||
|
root@localhost
|
||||||
|
DROP USER testuser1@'127.0.0.1';
|
@ -2,6 +2,7 @@ drop table if exists t1, t2, t3;
|
|||||||
SET @save_key_buffer_size=@@key_buffer_size;
|
SET @save_key_buffer_size=@@key_buffer_size;
|
||||||
SET @save_key_cache_block_size=@@key_cache_block_size;
|
SET @save_key_cache_block_size=@@key_cache_block_size;
|
||||||
SET @save_key_cache_segments=@@key_cache_segments;
|
SET @save_key_cache_segments=@@key_cache_segments;
|
||||||
|
SET @save_key_cache_file_hash_size=@@key_cache_file_hash_size;
|
||||||
SELECT @@key_buffer_size, @@small.key_buffer_size;
|
SELECT @@key_buffer_size, @@small.key_buffer_size;
|
||||||
@@key_buffer_size @@small.key_buffer_size
|
@@key_buffer_size @@small.key_buffer_size
|
||||||
2097152 131072
|
2097152 131072
|
||||||
@ -84,15 +85,15 @@ select @@key_buffer_size;
|
|||||||
select @@key_cache_block_size;
|
select @@key_cache_block_size;
|
||||||
@@key_cache_block_size
|
@@key_cache_block_size
|
||||||
1024
|
1024
|
||||||
|
select @@key_cache_file_hash_size;
|
||||||
|
@@key_cache_file_hash_size
|
||||||
|
512
|
||||||
set global keycache1.key_buffer_size=1024*1024;
|
set global keycache1.key_buffer_size=1024*1024;
|
||||||
create table t1 (p int primary key, a char(10)) delay_key_write=1;
|
create table t1 (p int primary key, a char(10)) delay_key_write=1;
|
||||||
create table t2 (p int primary key, i int, a char(10), key k1(i), key k2(a));
|
create table t2 (p int primary key, i int, a char(10), key k1(i), key k2(a));
|
||||||
show status like 'key_blocks_used';
|
select @org_key_blocks_unused-unused_blocks as key_blocks_unused, used_blocks as key_blocks_used from information_schema.key_caches where key_cache_name="default";
|
||||||
Variable_name Value
|
key_blocks_unused key_blocks_used
|
||||||
Key_blocks_used 0
|
0 0
|
||||||
show status like 'key_blocks_unused';
|
|
||||||
Variable_name Value
|
|
||||||
Key_blocks_unused KEY_BLOCKS_UNUSED
|
|
||||||
insert into t1 values (1, 'qqqq'), (11, 'yyyy');
|
insert into t1 values (1, 'qqqq'), (11, 'yyyy');
|
||||||
insert into t2 values (1, 1, 'qqqq'), (2, 1, 'pppp'),
|
insert into t2 values (1, 1, 'qqqq'), (2, 1, 'pppp'),
|
||||||
(3, 1, 'yyyy'), (4, 3, 'zzzz');
|
(3, 1, 'yyyy'), (4, 3, 'zzzz');
|
||||||
@ -108,12 +109,9 @@ p i a
|
|||||||
4 3 zzzz
|
4 3 zzzz
|
||||||
update t1 set p=2 where p=1;
|
update t1 set p=2 where p=1;
|
||||||
update t2 set i=2 where i=1;
|
update t2 set i=2 where i=1;
|
||||||
show status like 'key_blocks_used';
|
select @org_key_blocks_unused-unused_blocks as key_blocks_unused, used_blocks as key_blocks_used from information_schema.key_caches where key_cache_name="default";
|
||||||
Variable_name Value
|
key_blocks_unused key_blocks_used
|
||||||
Key_blocks_used 4
|
4 4
|
||||||
show status like 'key_blocks_unused';
|
|
||||||
Variable_name Value
|
|
||||||
Key_blocks_unused KEY_BLOCKS_UNUSED
|
|
||||||
cache index t1 key (`primary`) in keycache1;
|
cache index t1 key (`primary`) in keycache1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 assign_to_keycache status OK
|
test.t1 assign_to_keycache status OK
|
||||||
@ -270,12 +268,9 @@ Table Op Msg_type Msg_text
|
|||||||
test.t1 assign_to_keycache status OK
|
test.t1 assign_to_keycache status OK
|
||||||
test.t2 assign_to_keycache status OK
|
test.t2 assign_to_keycache status OK
|
||||||
drop table t1,t2,t3;
|
drop table t1,t2,t3;
|
||||||
show status like 'key_blocks_used';
|
select @org_key_blocks_unused-unused_blocks as key_blocks_unused, used_blocks as key_blocks_used from information_schema.key_caches where key_cache_name="default";
|
||||||
Variable_name Value
|
key_blocks_unused key_blocks_used
|
||||||
Key_blocks_used 4
|
0 4
|
||||||
show status like 'key_blocks_unused';
|
|
||||||
Variable_name Value
|
|
||||||
Key_blocks_unused KEY_BLOCKS_UNUSED
|
|
||||||
create table t1 (a int primary key);
|
create table t1 (a int primary key);
|
||||||
cache index t1 in keycache2;
|
cache index t1 in keycache2;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
@ -558,6 +553,7 @@ KEY_CACHE_NAME SEGMENTS SEGMENT_NUMBER FULL_SIZE BLOCK_SIZE USED_BLOCKS UNUSED_B
|
|||||||
default 1 NULL 2097152 1024 4 # 0 0 0 0 0
|
default 1 NULL 2097152 1024 4 # 0 0 0 0 0
|
||||||
small NULL NULL 1048576 1024 1 # 0 0 0 0 0
|
small NULL NULL 1048576 1024 1 # 0 0 0 0 0
|
||||||
set global key_buffer_size=32*1024;
|
set global key_buffer_size=32*1024;
|
||||||
|
set global key_cache_file_hash_size=128;
|
||||||
select @@key_buffer_size;
|
select @@key_buffer_size;
|
||||||
@@key_buffer_size
|
@@key_buffer_size
|
||||||
32768
|
32768
|
||||||
@ -833,3 +829,4 @@ set global keycache1.key_buffer_size=0;
|
|||||||
set global keycache2.key_buffer_size=0;
|
set global keycache2.key_buffer_size=0;
|
||||||
set global key_buffer_size=@save_key_buffer_size;
|
set global key_buffer_size=@save_key_buffer_size;
|
||||||
set global key_cache_segments=@save_key_cache_segments;
|
set global key_cache_segments=@save_key_cache_segments;
|
||||||
|
set global key_cache_file_hash_size=@save_key_cache_file_hash_size;
|
||||||
|
@ -27,6 +27,7 @@ drop table if exists t0, t1, t2, t3, t4, t5;
|
|||||||
drop view if exists v1, v2;
|
drop view if exists v1, v2;
|
||||||
drop procedure if exists p1;
|
drop procedure if exists p1;
|
||||||
drop procedure if exists p2;
|
drop procedure if exists p2;
|
||||||
|
drop procedure if exists p3;
|
||||||
drop function if exists f1;
|
drop function if exists f1;
|
||||||
drop function if exists f2;
|
drop function if exists f2;
|
||||||
drop function if exists f3;
|
drop function if exists f3;
|
||||||
@ -42,6 +43,8 @@ drop function if exists f12;
|
|||||||
drop function if exists f13;
|
drop function if exists f13;
|
||||||
drop function if exists f14;
|
drop function if exists f14;
|
||||||
drop function if exists f15;
|
drop function if exists f15;
|
||||||
|
drop function if exists f16;
|
||||||
|
drop function if exists f17;
|
||||||
create table t1 (i int primary key);
|
create table t1 (i int primary key);
|
||||||
insert into t1 values (1), (2), (3), (4), (5);
|
insert into t1 values (1), (2), (3), (4), (5);
|
||||||
create table t2 (j int primary key);
|
create table t2 (j int primary key);
|
||||||
@ -146,6 +149,26 @@ declare k int;
|
|||||||
call p2(k);
|
call p2(k);
|
||||||
return k;
|
return k;
|
||||||
end|
|
end|
|
||||||
|
create function f16() returns int
|
||||||
|
begin
|
||||||
|
create temporary table if not exists temp1 (a int);
|
||||||
|
insert into temp1 select * from t1;
|
||||||
|
drop temporary table temp1;
|
||||||
|
return 1;
|
||||||
|
end|
|
||||||
|
create function f17() returns int
|
||||||
|
begin
|
||||||
|
declare j int;
|
||||||
|
select i from t1 where i = 1 into j;
|
||||||
|
call p3;
|
||||||
|
return 1;
|
||||||
|
end|
|
||||||
|
create procedure p3()
|
||||||
|
begin
|
||||||
|
create temporary table if not exists temp1 (a int);
|
||||||
|
insert into temp1 select * from t1;
|
||||||
|
drop temporary table temp1;
|
||||||
|
end|
|
||||||
create trigger t4_bi before insert on t4 for each row
|
create trigger t4_bi before insert on t4 for each row
|
||||||
begin
|
begin
|
||||||
declare k int;
|
declare k int;
|
||||||
@ -185,6 +208,7 @@ end|
|
|||||||
# once during its execution.
|
# once during its execution.
|
||||||
show create procedure p1;
|
show create procedure p1;
|
||||||
show create procedure p2;
|
show create procedure p2;
|
||||||
|
show create procedure p3;
|
||||||
show create function f1;
|
show create function f1;
|
||||||
show create function f2;
|
show create function f2;
|
||||||
show create function f3;
|
show create function f3;
|
||||||
@ -200,6 +224,8 @@ show create function f12;
|
|||||||
show create function f13;
|
show create function f13;
|
||||||
show create function f14;
|
show create function f14;
|
||||||
show create function f15;
|
show create function f15;
|
||||||
|
show create function f16;
|
||||||
|
show create function f17;
|
||||||
# Switch back to connection 'default'.
|
# Switch back to connection 'default'.
|
||||||
#
|
#
|
||||||
# 1. Statements that read tables and do not use subqueries.
|
# 1. Statements that read tables and do not use subqueries.
|
||||||
@ -359,14 +385,11 @@ Success: 'update v2 set j= j-10 where j = 3' doesn't allow concurrent inserts in
|
|||||||
# 4.1 SELECT/SET with a stored function which does not
|
# 4.1 SELECT/SET with a stored function which does not
|
||||||
# modify data and uses SELECT in its turn.
|
# modify data and uses SELECT in its turn.
|
||||||
#
|
#
|
||||||
# In theory there is no need to take strong locks on the table
|
# There is no need to take strong locks on the table
|
||||||
# being selected from in SF as the call to such function
|
# being selected from in SF as the call to such function
|
||||||
# won't get into the binary log. In practice, however, we
|
# won't get into the binary log.
|
||||||
# discover that fact too late in the process to be able to
|
Success: 'select f1()' allows concurrent inserts into 't1'.
|
||||||
# affect the decision what locks should be taken.
|
Success: 'set @a:= f1()' allows concurrent inserts into 't1'.
|
||||||
# Hence, strong locks are taken in this case.
|
|
||||||
Success: 'select f1()' doesn't allow concurrent inserts into 't1'.
|
|
||||||
Success: 'set @a:= f1()' doesn't allow concurrent inserts into 't1'.
|
|
||||||
#
|
#
|
||||||
# 4.2 INSERT (or other statement which modifies data) with
|
# 4.2 INSERT (or other statement which modifies data) with
|
||||||
# a stored function which does not modify data and uses
|
# a stored function which does not modify data and uses
|
||||||
@ -392,14 +415,12 @@ Success: 'set @a:= f2()' doesn't allow concurrent inserts into 't1'.
|
|||||||
# modify data and reads a table through subselect
|
# modify data and reads a table through subselect
|
||||||
# in a control construct.
|
# in a control construct.
|
||||||
#
|
#
|
||||||
# Again, in theory a call to this function won't get to the
|
# Call to this function won't get to the
|
||||||
# binary log and thus no strong lock is needed. But in practice
|
# binary log and thus no strong lock is needed.
|
||||||
# we don't detect this fact early enough (get_lock_type_for_table())
|
Success: 'select f3()' allows concurrent inserts into 't1'.
|
||||||
# to avoid taking a strong lock.
|
Success: 'set @a:= f3()' allows concurrent inserts into 't1'.
|
||||||
Success: 'select f3()' doesn't allow concurrent inserts into 't1'.
|
Success: 'select f4()' allows concurrent inserts into 't1'.
|
||||||
Success: 'set @a:= f3()' doesn't allow concurrent inserts into 't1'.
|
Success: 'set @a:= f4()' allows concurrent inserts into 't1'.
|
||||||
Success: 'select f4()' doesn't allow concurrent inserts into 't1'.
|
|
||||||
Success: 'set @a:= f4()' doesn't allow concurrent inserts into 't1'.
|
|
||||||
#
|
#
|
||||||
# 4.5. INSERT (or other statement which modifies data) with
|
# 4.5. INSERT (or other statement which modifies data) with
|
||||||
# a stored function which does not modify data and reads
|
# a stored function which does not modify data and reads
|
||||||
@ -426,14 +447,13 @@ Success: 'set @a:= f5()' doesn't allow concurrent inserts into 't1'.
|
|||||||
# doesn't modify data and reads tables through
|
# doesn't modify data and reads tables through
|
||||||
# a view.
|
# a view.
|
||||||
#
|
#
|
||||||
# Once again, in theory, calls to such functions won't
|
# Calls to such functions won't get into
|
||||||
# get into the binary log and thus don't need strong
|
# the binary log and thus don't need strong
|
||||||
# locks. But in practice this fact is discovered
|
# locks.
|
||||||
# too late to have any effect.
|
Success: 'select f6()' allows concurrent inserts into 't1'.
|
||||||
Success: 'select f6()' doesn't allow concurrent inserts into 't1'.
|
Success: 'set @a:= f6()' allows concurrent inserts into 't1'.
|
||||||
Success: 'set @a:= f6()' doesn't allow concurrent inserts into 't1'.
|
Success: 'select f7()' allows concurrent inserts into 't1'.
|
||||||
Success: 'select f7()' doesn't allow concurrent inserts into 't1'.
|
Success: 'set @a:= f7()' allows concurrent inserts into 't1'.
|
||||||
Success: 'set @a:= f7()' doesn't allow concurrent inserts into 't1'.
|
|
||||||
#
|
#
|
||||||
# 4.8 INSERT which uses stored function which
|
# 4.8 INSERT which uses stored function which
|
||||||
# doesn't modify data and reads a table
|
# doesn't modify data and reads a table
|
||||||
@ -459,10 +479,9 @@ Success: 'select f9()' doesn't allow concurrent inserts into 't1'.
|
|||||||
# data and reads a table indirectly, by calling another
|
# data and reads a table indirectly, by calling another
|
||||||
# function.
|
# function.
|
||||||
#
|
#
|
||||||
# In theory, calls to such functions won't get into the binary
|
# Calls to such functions won't get into the binary
|
||||||
# log and thus don't need to acquire strong locks. But in practice
|
# log and thus don't need to acquire strong locks.
|
||||||
# this fact is discovered too late to have any effect.
|
Success: 'select f10()' allows concurrent inserts into 't1'.
|
||||||
Success: 'select f10()' doesn't allow concurrent inserts into 't1'.
|
|
||||||
#
|
#
|
||||||
# 4.11 INSERT which uses a stored function which doesn't modify
|
# 4.11 INSERT which uses a stored function which doesn't modify
|
||||||
# data and reads a table indirectly, by calling another
|
# data and reads a table indirectly, by calling another
|
||||||
@ -501,6 +520,26 @@ Success: 'select f12((select i+10 from t1 where i=1))' allows concurrent inserts
|
|||||||
# uses. Therefore it should take strong locks on the data it reads.
|
# uses. Therefore it should take strong locks on the data it reads.
|
||||||
Success: 'insert into t2 values (f13((select i+10 from t1 where i=1)))' doesn't allow concurrent inserts into 't1'.
|
Success: 'insert into t2 values (f13((select i+10 from t1 where i=1)))' doesn't allow concurrent inserts into 't1'.
|
||||||
#
|
#
|
||||||
|
# 4.15 SELECT/SET with a stored function which
|
||||||
|
# inserts data into a temporary table using
|
||||||
|
# SELECT on t1.
|
||||||
|
#
|
||||||
|
# Since this statement is written to the binary log it should
|
||||||
|
# be serialized with concurrent statements affecting the data it
|
||||||
|
# uses. Therefore it should take strong locks on the data it reads.
|
||||||
|
Success: 'select f16()' doesn't allow concurrent inserts into 't1'.
|
||||||
|
Success: 'set @a:= f16()' doesn't allow concurrent inserts into 't1'.
|
||||||
|
#
|
||||||
|
# 4.16 SELECT/SET with a stored function which call procedure
|
||||||
|
# which inserts data into a temporary table using
|
||||||
|
# SELECT on t1.
|
||||||
|
#
|
||||||
|
# Since this statement is written to the binary log it should
|
||||||
|
# be serialized with concurrent statements affecting the data it
|
||||||
|
# uses. Therefore it should take strong locks on the data it reads.
|
||||||
|
Success: 'select f17()' doesn't allow concurrent inserts into 't1'.
|
||||||
|
Success: 'set @a:= f17()' doesn't allow concurrent inserts into 't1'.
|
||||||
|
#
|
||||||
# 5. Statements that read tables through stored procedures.
|
# 5. Statements that read tables through stored procedures.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@ -522,10 +561,9 @@ Success: 'select f14()' doesn't allow concurrent inserts into 't1'.
|
|||||||
# 5.3 SELECT that calls a function that doesn't modify data and
|
# 5.3 SELECT that calls a function that doesn't modify data and
|
||||||
# uses a CALL statement that reads a table via SELECT.
|
# uses a CALL statement that reads a table via SELECT.
|
||||||
#
|
#
|
||||||
# In theory, calls to such functions won't get into the binary
|
# Calls to such functions won't get into the binary
|
||||||
# log and thus don't need to acquire strong locks. But in practice
|
# log and thus don't need to acquire strong locks.
|
||||||
# this fact is discovered too late to have any effect.
|
Success: 'select f15()' allows concurrent inserts into 't1'.
|
||||||
Success: 'select f15()' doesn't allow concurrent inserts into 't1'.
|
|
||||||
#
|
#
|
||||||
# 5.4 INSERT which calls function which doesn't modify data and
|
# 5.4 INSERT which calls function which doesn't modify data and
|
||||||
# uses CALL statement which reads table through SELECT.
|
# uses CALL statement which reads table through SELECT.
|
||||||
@ -585,9 +623,12 @@ drop function f12;
|
|||||||
drop function f13;
|
drop function f13;
|
||||||
drop function f14;
|
drop function f14;
|
||||||
drop function f15;
|
drop function f15;
|
||||||
|
drop function f16;
|
||||||
|
drop function f17;
|
||||||
drop view v1, v2;
|
drop view v1, v2;
|
||||||
drop procedure p1;
|
drop procedure p1;
|
||||||
drop procedure p2;
|
drop procedure p2;
|
||||||
|
drop procedure p3;
|
||||||
drop table t1, t2, t3, t4, t5;
|
drop table t1, t2, t3, t4, t5;
|
||||||
set @@global.concurrent_insert= @old_concurrent_insert;
|
set @@global.concurrent_insert= @old_concurrent_insert;
|
||||||
#
|
#
|
||||||
|
@ -11,13 +11,8 @@ Table Op Msg_type Msg_text
|
|||||||
test.bug49823 repair status OK
|
test.bug49823 repair status OK
|
||||||
RENAME TABLE general_log TO renamed_general_log;
|
RENAME TABLE general_log TO renamed_general_log;
|
||||||
RENAME TABLE test.bug49823 TO general_log;
|
RENAME TABLE test.bug49823 TO general_log;
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -48,9 +43,15 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
DROP TABLE general_log;
|
DROP TABLE general_log;
|
||||||
RENAME TABLE renamed_general_log TO general_log;
|
RENAME TABLE renamed_general_log TO general_log;
|
||||||
|
@ -755,6 +755,7 @@ Variable_name Value
|
|||||||
# Status of "equivalent" SELECT query execution:
|
# Status of "equivalent" SELECT query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd_next 11
|
Handler_read_rnd_next 11
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -1231,6 +1232,7 @@ Variable_name Value
|
|||||||
# Status of "equivalent" SELECT query execution:
|
# Status of "equivalent" SELECT query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -1275,6 +1277,7 @@ Variable_name Value
|
|||||||
# Status of "equivalent" SELECT query execution:
|
# Status of "equivalent" SELECT query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -1361,6 +1364,7 @@ Variable_name Value
|
|||||||
# Status of "equivalent" SELECT query execution:
|
# Status of "equivalent" SELECT query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -1407,6 +1411,7 @@ Variable_name Value
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd 1
|
Handler_read_rnd 1
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -1540,6 +1545,7 @@ Variable_name Value
|
|||||||
# Status of "equivalent" SELECT query execution:
|
# Status of "equivalent" SELECT query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -1668,6 +1674,7 @@ Variable_name Value
|
|||||||
# Status of "equivalent" SELECT query execution:
|
# Status of "equivalent" SELECT query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -1675,6 +1682,7 @@ Variable_name Value
|
|||||||
Handler_read_rnd 5
|
Handler_read_rnd 5
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
Handler_update 5
|
Handler_update 5
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
|
|
||||||
@ -1712,6 +1720,7 @@ Variable_name Value
|
|||||||
# Status of "equivalent" SELECT query execution:
|
# Status of "equivalent" SELECT query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -1719,6 +1728,7 @@ Variable_name Value
|
|||||||
Handler_read_rnd 1
|
Handler_read_rnd 1
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
Handler_update 1
|
Handler_update 1
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
|
|
||||||
@ -1799,12 +1809,14 @@ Variable_name Value
|
|||||||
# Status of "equivalent" SELECT query execution:
|
# Status of "equivalent" SELECT query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd 1
|
Handler_read_rnd 1
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
|
|
||||||
@ -1844,12 +1856,14 @@ Variable_name Value
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd 1
|
Handler_read_rnd 1
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd 1
|
Handler_read_rnd 1
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
|
|
||||||
@ -1977,6 +1991,7 @@ Variable_name Value
|
|||||||
# Status of "equivalent" SELECT query execution:
|
# Status of "equivalent" SELECT query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -1984,6 +1999,7 @@ Variable_name Value
|
|||||||
Handler_read_rnd 5
|
Handler_read_rnd 5
|
||||||
Handler_read_rnd_next 27
|
Handler_read_rnd_next 27
|
||||||
Handler_update 4
|
Handler_update 4
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
|
|
||||||
@ -2067,6 +2083,7 @@ Variable_name Value
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_key 1
|
Handler_read_key 1
|
||||||
Handler_read_next 2
|
Handler_read_next 2
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 1
|
Sort_range 1
|
||||||
Sort_rows 2
|
Sort_rows 2
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -2075,6 +2092,7 @@ Handler_read_key 1
|
|||||||
Handler_read_next 2
|
Handler_read_next 2
|
||||||
Handler_read_rnd 2
|
Handler_read_rnd 2
|
||||||
Handler_update 2
|
Handler_update 2
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 1
|
Sort_range 1
|
||||||
Sort_rows 2
|
Sort_rows 2
|
||||||
|
|
||||||
@ -2105,6 +2123,7 @@ Variable_name Value
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_key 1
|
Handler_read_key 1
|
||||||
Handler_read_next 2
|
Handler_read_next 2
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 1
|
Sort_range 1
|
||||||
Sort_rows 2
|
Sort_rows 2
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -2625,6 +2644,7 @@ Variable_name Value
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_key 3
|
Handler_read_key 3
|
||||||
Handler_read_rnd_next 10
|
Handler_read_rnd_next 10
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 3
|
Sort_rows 3
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
@ -2632,6 +2652,7 @@ Variable_name Value
|
|||||||
Handler_read_key 3
|
Handler_read_key 3
|
||||||
Handler_read_rnd_next 8
|
Handler_read_rnd_next 8
|
||||||
Handler_update 1
|
Handler_update 1
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 3
|
Sort_rows 3
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
|
|
||||||
@ -2674,12 +2695,14 @@ Variable_name Value
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_key 3
|
Handler_read_key 3
|
||||||
Handler_read_rnd_next 10
|
Handler_read_rnd_next 10
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 3
|
Sort_rows 3
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_key 3
|
Handler_read_key 3
|
||||||
Handler_read_rnd_next 10
|
Handler_read_rnd_next 10
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 3
|
Sort_rows 3
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
|
|
||||||
@ -2724,12 +2747,14 @@ Variable_name Value
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_key 3
|
Handler_read_key 3
|
||||||
Handler_read_rnd_next 10
|
Handler_read_rnd_next 10
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 3
|
Sort_rows 3
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
# Status of testing query execution:
|
# Status of testing query execution:
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_key 3
|
Handler_read_key 3
|
||||||
Handler_read_rnd_next 10
|
Handler_read_rnd_next 10
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_rows 3
|
Sort_rows 3
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
|
|
||||||
|
4
mysql-test/r/mysql_client_test_comp.result
Normal file
4
mysql-test/r/mysql_client_test_comp.result
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
SET @old_slow_query_log= @@global.slow_query_log;
|
||||||
|
call mtr.add_suppression(" Error reading file './client_test_db/test_frm_bug.frm'");
|
||||||
|
ok
|
||||||
|
SET @@global.slow_query_log= @old_slow_query_log;
|
@ -1,11 +1,6 @@
|
|||||||
Run mysql_upgrade once
|
Run mysql_upgrade once
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -35,20 +30,21 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
Run it again - should say already completed
|
Run it again - should say already completed
|
||||||
This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
|
This installation of MySQL is already upgraded to VERSION, use --force if you still need to run mysql_upgrade
|
||||||
Force should run it regardless of wether it's been run before
|
Force should run it regardless of wether it's been run before
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -78,20 +74,21 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
|
CREATE USER mysqltest1@'%' IDENTIFIED by 'sakila';
|
||||||
GRANT ALL ON *.* TO mysqltest1@'%';
|
GRANT ALL ON *.* TO mysqltest1@'%';
|
||||||
Run mysql_upgrade with password protected account
|
Run mysql_upgrade with password protected account
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -121,9 +118,15 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
DROP USER mysqltest1@'%';
|
DROP USER mysqltest1@'%';
|
||||||
Version check failed. Got the following error when calling the 'mysql' command line client
|
Version check failed. Got the following error when calling the 'mysql' command line client
|
||||||
@ -133,13 +136,8 @@ Run mysql_upgrade with a non existing server socket
|
|||||||
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
|
mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect
|
||||||
FATAL ERROR: Upgrade failed
|
FATAL ERROR: Upgrade failed
|
||||||
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
|
set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE';
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -169,9 +167,15 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
set GLOBAL sql_mode=default;
|
set GLOBAL sql_mode=default;
|
||||||
#
|
#
|
||||||
@ -182,13 +186,8 @@ CREATE PROCEDURE testproc() BEGIN END;
|
|||||||
UPDATE mysql.proc SET character_set_client = NULL WHERE name LIKE 'testproc';
|
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 collation_connection = NULL WHERE name LIKE 'testproc';
|
||||||
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
|
UPDATE mysql.proc SET db_collation = NULL WHERE name LIKE 'testproc';
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -218,9 +217,15 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
CALL testproc();
|
CALL testproc();
|
||||||
DROP PROCEDURE testproc;
|
DROP PROCEDURE testproc;
|
||||||
@ -234,13 +239,8 @@ WARNING: NULL values of the 'db_collation' column ('mysql.proc' table) have been
|
|||||||
GRANT USAGE ON *.* TO 'user3'@'%';
|
GRANT USAGE ON *.* TO 'user3'@'%';
|
||||||
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
|
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%';
|
||||||
Run mysql_upgrade with all privileges on a user
|
Run mysql_upgrade with all privileges on a user
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -270,9 +270,15 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
SHOW GRANTS FOR 'user3'@'%';
|
SHOW GRANTS FOR 'user3'@'%';
|
||||||
Grants for user3@%
|
Grants for user3@%
|
||||||
@ -280,22 +286,9 @@ GRANT USAGE ON *.* TO 'user3'@'%'
|
|||||||
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
|
GRANT ALL PRIVILEGES ON `roelt`.`test2` TO 'user3'@'%'
|
||||||
DROP USER 'user3'@'%';
|
DROP USER 'user3'@'%';
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
The --upgrade-system-tables option was used, databases won't be touched.
|
The --upgrade-system-tables option was used, user tables won't be touched.
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
OK
|
|
||||||
#
|
|
||||||
# Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
|
|
||||||
# SKIP-WRITE-BINLOG
|
|
||||||
#
|
|
||||||
# Droping the previously created mysql_upgrade_info file..
|
|
||||||
# Running mysql_upgrade with --skip-write-binlog..
|
|
||||||
Phase 1/3: Fixing table and database names
|
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -325,9 +318,53 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
OK
|
||||||
|
#
|
||||||
|
# Bug#11827359 60223: MYSQL_UPGRADE PROBLEM WITH OPTION
|
||||||
|
# SKIP-WRITE-BINLOG
|
||||||
|
#
|
||||||
|
# Droping the previously created mysql_upgrade_info file..
|
||||||
|
# Running mysql_upgrade with --skip-write-binlog..
|
||||||
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
|
Processing databases
|
||||||
|
mysql
|
||||||
|
mysql.column_stats OK
|
||||||
|
mysql.columns_priv OK
|
||||||
|
mysql.db OK
|
||||||
|
mysql.event OK
|
||||||
|
mysql.func OK
|
||||||
|
mysql.gtid_slave_pos OK
|
||||||
|
mysql.help_category OK
|
||||||
|
mysql.help_keyword OK
|
||||||
|
mysql.help_relation OK
|
||||||
|
mysql.help_topic OK
|
||||||
|
mysql.host OK
|
||||||
|
mysql.index_stats OK
|
||||||
|
mysql.innodb_index_stats OK
|
||||||
|
mysql.innodb_table_stats OK
|
||||||
|
mysql.plugin OK
|
||||||
|
mysql.proc OK
|
||||||
|
mysql.procs_priv OK
|
||||||
|
mysql.proxies_priv OK
|
||||||
|
mysql.roles_mapping OK
|
||||||
|
mysql.servers OK
|
||||||
|
mysql.table_stats 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
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
#
|
#
|
||||||
# MDEV-4332 Increase username length from 16 characters
|
# MDEV-4332 Increase username length from 16 characters
|
||||||
@ -341,13 +378,8 @@ GRANT INSERT ON mysql.user TO very_long_user_name_number_2;
|
|||||||
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_1;
|
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_1;
|
||||||
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_2;
|
GRANT UPDATE (User) ON mysql.db TO very_long_user_name_number_2;
|
||||||
CREATE PROCEDURE test.pr() BEGIN END;
|
CREATE PROCEDURE test.pr() BEGIN END;
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -377,9 +409,15 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr';
|
SELECT definer FROM mysql.proc WHERE db = 'test' AND name = 'pr';
|
||||||
definer
|
definer
|
||||||
|
@ -1,3 +1,45 @@
|
|||||||
The --upgrade-system-tables option was used, databases won't be touched.
|
The --upgrade-system-tables option was used, user tables won't be touched.
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
|
Processing databases
|
||||||
|
mysql
|
||||||
|
mysql.column_stats OK
|
||||||
|
mysql.columns_priv OK
|
||||||
|
mysql.db OK
|
||||||
|
mysql.event OK
|
||||||
|
mysql.func OK
|
||||||
|
mysql.gtid_slave_pos OK
|
||||||
|
mysql.help_category OK
|
||||||
|
mysql.help_keyword OK
|
||||||
|
mysql.help_relation OK
|
||||||
|
mysql.help_topic OK
|
||||||
|
mysql.host OK
|
||||||
|
mysql.index_stats OK
|
||||||
|
mysql.innodb_index_stats
|
||||||
|
Error : Unknown storage engine 'InnoDB'
|
||||||
|
error : Corrupt
|
||||||
|
mysql.innodb_table_stats
|
||||||
|
Error : Unknown storage engine 'InnoDB'
|
||||||
|
error : Corrupt
|
||||||
|
mysql.plugin OK
|
||||||
|
mysql.proc OK
|
||||||
|
mysql.procs_priv OK
|
||||||
|
mysql.proxies_priv OK
|
||||||
|
mysql.roles_mapping OK
|
||||||
|
mysql.servers OK
|
||||||
|
mysql.table_stats 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
|
||||||
|
|
||||||
|
Repairing tables
|
||||||
|
mysql.innodb_index_stats
|
||||||
|
Error : Unknown storage engine 'InnoDB'
|
||||||
|
error : Corrupt
|
||||||
|
mysql.innodb_table_stats
|
||||||
|
Error : Unknown storage engine 'InnoDB'
|
||||||
|
error : Corrupt
|
||||||
OK
|
OK
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
#
|
#
|
||||||
# Bug#55672 mysql_upgrade dies with internal error
|
# Bug#55672 mysql_upgrade dies with internal error
|
||||||
#
|
#
|
||||||
Phase 1/3: Fixing table and database names
|
Phase 1/3: Running 'mysql_fix_privilege_tables'...
|
||||||
Phase 2/3: Checking and upgrading tables
|
|
||||||
Processing databases
|
Processing databases
|
||||||
information_schema
|
|
||||||
mtr
|
|
||||||
mtr.global_suppressions OK
|
|
||||||
mtr.test_suppressions OK
|
|
||||||
mysql
|
mysql
|
||||||
mysql.column_stats OK
|
mysql.column_stats OK
|
||||||
mysql.columns_priv OK
|
mysql.columns_priv OK
|
||||||
@ -37,7 +32,13 @@ mysql.time_zone_name OK
|
|||||||
mysql.time_zone_transition OK
|
mysql.time_zone_transition OK
|
||||||
mysql.time_zone_transition_type OK
|
mysql.time_zone_transition_type OK
|
||||||
mysql.user OK
|
mysql.user OK
|
||||||
|
Phase 2/3: Fixing table and database names
|
||||||
|
Phase 3/3: Checking and upgrading tables
|
||||||
|
Processing databases
|
||||||
|
information_schema
|
||||||
|
mtr
|
||||||
|
mtr.global_suppressions OK
|
||||||
|
mtr.test_suppressions OK
|
||||||
performance_schema
|
performance_schema
|
||||||
test
|
test
|
||||||
Phase 3/3: Running 'mysql_fix_privilege_tables'...
|
|
||||||
OK
|
OK
|
||||||
|
@ -281,6 +281,11 @@ The following options may be given as the first argument:
|
|||||||
The default size of key cache blocks
|
The default size of key cache blocks
|
||||||
--key-cache-division-limit=#
|
--key-cache-division-limit=#
|
||||||
The minimum percentage of warm blocks in key cache
|
The minimum percentage of warm blocks in key cache
|
||||||
|
--key-cache-file-hash-size=#
|
||||||
|
Number of hash buckets for open and changed files. If
|
||||||
|
you have a lot of MyISAM files open you should increase
|
||||||
|
this for faster flush of changes. A good value is
|
||||||
|
probably 1/10 of number of possible open MyISAM files.
|
||||||
--key-cache-segments=#
|
--key-cache-segments=#
|
||||||
The number of segments in a key cache
|
The number of segments in a key cache
|
||||||
-L, --language=name Client error messages in given language. May be given as
|
-L, --language=name Client error messages in given language. May be given as
|
||||||
@ -1009,8 +1014,8 @@ The following options may be given as the first argument:
|
|||||||
created to handle remaining clients.
|
created to handle remaining clients.
|
||||||
--thread-stack=# The stack size for each thread
|
--thread-stack=# The stack size for each thread
|
||||||
--time-format=name The TIME format (ignored)
|
--time-format=name The TIME format (ignored)
|
||||||
--timed-mutexes Specify whether to time mutexes (only InnoDB mutexes are
|
--timed-mutexes Specify whether to time mutexes. Deprecated, has no
|
||||||
currently supported)
|
effect.
|
||||||
--tmp-table-size=# If an internal in-memory temporary table exceeds this
|
--tmp-table-size=# If an internal in-memory temporary table exceeds this
|
||||||
size, MySQL will automatically convert it to an on-disk
|
size, MySQL will automatically convert it to an on-disk
|
||||||
MyISAM or Aria table
|
MyISAM or Aria table
|
||||||
@ -1211,6 +1216,7 @@ key-buffer-size 134217728
|
|||||||
key-cache-age-threshold 300
|
key-cache-age-threshold 300
|
||||||
key-cache-block-size 1024
|
key-cache-block-size 1024
|
||||||
key-cache-division-limit 100
|
key-cache-division-limit 100
|
||||||
|
key-cache-file-hash-size 512
|
||||||
key-cache-segments 0
|
key-cache-segments 0
|
||||||
large-pages FALSE
|
large-pages FALSE
|
||||||
lc-messages en_US
|
lc-messages en_US
|
||||||
|
@ -680,6 +680,9 @@ txt
|
|||||||
b is b and more is more
|
b is b and more is more
|
||||||
txt
|
txt
|
||||||
a is a and less is more
|
a is a and less is more
|
||||||
|
sflfdt 'ABCDfF bbddff h' bs txt;
|
||||||
|
txt
|
||||||
|
ABCDfF bbddff h
|
||||||
create table t2 ( a char(10));
|
create table t2 ( a char(10));
|
||||||
garbage;
|
garbage;
|
||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'garbage' at line 1
|
||||||
|
13
mysql-test/r/order_by_innodb.result
Normal file
13
mysql-test/r/order_by_innodb.result
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
drop table if exists t0,t1,t2,t3;
|
||||||
|
#
|
||||||
|
# MDEV-6434: Wrong result (extra rows) with ORDER BY, multiple-column index, InnoDB
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT, b INT, c INT, d TEXT, KEY idx(a,b,c)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 (a,c) VALUES
|
||||||
|
(8, 9),(8, 10),(13, 15),(16, 17),(16, 18),(16, 19),(20, 21),
|
||||||
|
(20, 22),(20, 24),(20, 25),(20, 26),(20, 27),(20, 28);
|
||||||
|
SELECT * FROM t1 WHERE a = 8 AND (b = 1 OR b IS NULL) ORDER BY c;
|
||||||
|
a b c d
|
||||||
|
8 NULL 9 NULL
|
||||||
|
8 NULL 10 NULL
|
||||||
|
DROP TABLE t1;
|
@ -45,6 +45,7 @@ FLUSH STATUS;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -153,6 +154,7 @@ f0 f1 f2
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 100
|
Sort_rows 100
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
|
@ -2562,6 +2562,50 @@ id id2 dob address city hours_worked_per_week weeks_worked_last_year
|
|||||||
16 16 1949-11-07 address16 city16 40 52
|
16 16 1949-11-07 address16 city16 40 52
|
||||||
50 50 1923-09-08 address50 city50 40 52
|
50 50 1923-09-08 address50 city50 40 52
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-6322: The PARTITION engine can return wrong query results
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
CustomerID varchar(5) DEFAULT NULL,
|
||||||
|
CompanyName varchar(40) DEFAULT NULL,
|
||||||
|
ContactName varchar(30) DEFAULT NULL,
|
||||||
|
ContactTitle varchar(30) DEFAULT NULL,
|
||||||
|
Address varchar(60) DEFAULT NULL,
|
||||||
|
City varchar(15) DEFAULT NULL,
|
||||||
|
Region varchar(15) DEFAULT NULL,
|
||||||
|
PostalCode varchar(10) DEFAULT NULL,
|
||||||
|
Country varchar(15) NOT NULL,
|
||||||
|
Phone varchar(24) DEFAULT NULL,
|
||||||
|
Fax varchar(24) DEFAULT NULL
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
PARTITION BY LIST COLUMNS(Country)
|
||||||
|
(PARTITION p1 VALUES IN ('Germany','Austria','Switzerland','Poland'),
|
||||||
|
PARTITION p2 VALUES IN ('USA','Canada','Mexico'),
|
||||||
|
PARTITION p3 VALUES IN ('Spain','Portugal','Italy'),
|
||||||
|
PARTITION p4 VALUES IN ('UK','Ireland'),
|
||||||
|
PARTITION p5 VALUES IN ('France','Belgium'),
|
||||||
|
PARTITION p6 VALUES IN ('Sweden','Finland','Denmark','Norway'),
|
||||||
|
PARTITION p7 VALUES IN ('Venezuela','Argentina','Brazil')
|
||||||
|
);
|
||||||
|
INSERT INTO t1 (CustomerID, City, Country) VALUES
|
||||||
|
('ANATR','México D.F','Mexico'),
|
||||||
|
('ANTON','México D.F','Mexico'),
|
||||||
|
('BOTTM','Tsawassen','Canada'),
|
||||||
|
('CENTC','México D.F','Mexico'),
|
||||||
|
('GREAL','Eugene','USA'),
|
||||||
|
('HUNGC','Elgin','USA'),
|
||||||
|
('LAUGB','Vancouver','Canada'),
|
||||||
|
('LAZYK','Walla Walla','USA'),
|
||||||
|
('LETSS','San Francisco','USA'),
|
||||||
|
('LONEP','Portland','USA');
|
||||||
|
SELECT * FROM t1 WHERE Country = 'USA';
|
||||||
|
CustomerID CompanyName ContactName ContactTitle Address City Region PostalCode Country Phone Fax
|
||||||
|
GREAL NULL NULL NULL NULL Eugene NULL NULL USA NULL NULL
|
||||||
|
HUNGC NULL NULL NULL NULL Elgin NULL NULL USA NULL NULL
|
||||||
|
LAZYK NULL NULL NULL NULL Walla Walla NULL NULL USA NULL NULL
|
||||||
|
LETSS NULL NULL NULL NULL San Francisco NULL NULL USA NULL NULL
|
||||||
|
LONEP NULL NULL NULL NULL Portland NULL NULL USA NULL NULL
|
||||||
|
DROP TABLE t1;
|
||||||
CREATE TABLE t1 ( d DATE NOT NULL)
|
CREATE TABLE t1 ( d DATE NOT NULL)
|
||||||
PARTITION BY RANGE( YEAR(d) ) (
|
PARTITION BY RANGE( YEAR(d) ) (
|
||||||
PARTITION p0 VALUES LESS THAN (1960),
|
PARTITION p0 VALUES LESS THAN (1960),
|
||||||
|
@ -694,6 +694,34 @@ count(*)
|
|||||||
drop table t3;
|
drop table t3;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
#
|
#
|
||||||
|
# MySQL Bug#71095: Wrong results with PARTITION BY LIST COLUMNS()
|
||||||
|
#
|
||||||
|
create table t1(c1 int, c2 int, c3 int, c4 int,
|
||||||
|
primary key(c1,c2)) engine=InnoDB
|
||||||
|
partition by list columns(c2)
|
||||||
|
(partition p1 values in (1,2) engine=InnoDB,
|
||||||
|
partition p2 values in (3,4) engine=InnoDB);
|
||||||
|
insert into t1 values (1,1,1,1),(2,3,1,1);
|
||||||
|
select * from t1 where c1=2 and c2=3;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
2 3 1 1
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MySQL Bug#72803: Wrong "Impossible where" with LIST partitioning
|
||||||
|
# also MDEV-6240: Wrong "Impossible where" with LIST partitioning
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 ( d DATE) ENGINE = InnoDB
|
||||||
|
PARTITION BY LIST COLUMNS (d)
|
||||||
|
(
|
||||||
|
PARTITION p0 VALUES IN ('1990-01-01','1991-01-01'),
|
||||||
|
PARTITION p1 VALUES IN ('1981-01-01')
|
||||||
|
);
|
||||||
|
INSERT INTO t1 (d) VALUES ('1991-01-01');
|
||||||
|
SELECT * FROM t1 WHERE d = '1991-01-01';
|
||||||
|
d
|
||||||
|
1991-01-01
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# MDEV-5963: InnoDB: Assertion failure in file row0sel.cc line 2503,
|
# MDEV-5963: InnoDB: Assertion failure in file row0sel.cc line 2503,
|
||||||
# Failing assertion: 0 with "key ptr now exceeds key end by 762 bytes"
|
# Failing assertion: 0 with "key ptr now exceeds key end by 762 bytes"
|
||||||
# (independent testcase for Oracle Bug#13947868)
|
# (independent testcase for Oracle Bug#13947868)
|
||||||
|
@ -3302,6 +3302,120 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
|||||||
1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 100 Using where
|
1 SIMPLE t1 p0,p1,p2 ALL NULL NULL NULL NULL 100 Using where
|
||||||
drop table t0, t1;
|
drop table t0, t1;
|
||||||
#
|
#
|
||||||
|
# Bug#71095: Wrong results with PARTITION BY LIST COLUMNS()
|
||||||
|
#
|
||||||
|
CREATE TABLE t1
|
||||||
|
(c1 int,
|
||||||
|
c2 int,
|
||||||
|
c3 int,
|
||||||
|
c4 int,
|
||||||
|
PRIMARY KEY (c1,c2))
|
||||||
|
PARTITION BY LIST COLUMNS (c2)
|
||||||
|
(PARTITION p1 VALUES IN (1,2),
|
||||||
|
PARTITION p2 VALUES IN (3,4));
|
||||||
|
INSERT INTO t1 VALUES (1, 1, 1, 1), (2, 3, 1, 1);
|
||||||
|
INSERT INTO t1 VALUES (1, 2, 1, 1), (2, 4, 1, 1);
|
||||||
|
SELECT * FROM t1 WHERE c1 = 1 AND c2 < 1;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 1;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
1 1 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 1 AND c2 = 1;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
1 1 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 1 AND c2 >= 1;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
1 1 1 1
|
||||||
|
1 2 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 1 AND c2 > 1;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
1 2 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 1 AND c2 < 3;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
1 1 1 1
|
||||||
|
1 2 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 3;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
1 1 1 1
|
||||||
|
1 2 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 3;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
2 3 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 2 AND c2 = 3;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
2 3 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 3;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
2 3 1 1
|
||||||
|
2 4 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 2 AND c2 > 3;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
2 4 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 2 AND c2 < 4;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
2 3 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 4;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
2 3 1 1
|
||||||
|
2 4 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 2 AND c2 = 4;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
2 4 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 4;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
2 4 1 1
|
||||||
|
SELECT * FROM t1 WHERE c1 = 2 AND c2 > 4;
|
||||||
|
c1 c2 c3 c4
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 < 1;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 1;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p1 range PRIMARY PRIMARY 8 NULL 1 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 = 1;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p1 const PRIMARY PRIMARY 8 const,const 1
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 >= 1;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 > 1;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 < 3;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p1 range PRIMARY PRIMARY 8 NULL 1 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 1 AND c2 <= 3;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 3;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 = 3;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p2 const PRIMARY PRIMARY 8 const,const 1
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 3;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p2 range PRIMARY PRIMARY 8 NULL 1 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 > 3;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p2 range PRIMARY PRIMARY 8 NULL 1 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 < 4;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 <= 4;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p1,p2 range PRIMARY PRIMARY 8 NULL 2 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 = 4;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p2 const PRIMARY PRIMARY 8 const,const 1
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 >= 4;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 p2 range PRIMARY PRIMARY 8 NULL 1 Using where
|
||||||
|
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE c1 = 2 AND c2 > 4;
|
||||||
|
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# MDEV-6239: Partition pruning is not working as expected in an inner query
|
# MDEV-6239: Partition pruning is not working as expected in an inner query
|
||||||
#
|
#
|
||||||
create table t1
|
create table t1
|
||||||
|
@ -8,3 +8,6 @@ PLUGIN_TYPE STORAGE ENGINE
|
|||||||
PLUGIN_LIBRARY NULL
|
PLUGIN_LIBRARY NULL
|
||||||
PLUGIN_LIBRARY_VERSION NULL
|
PLUGIN_LIBRARY_VERSION NULL
|
||||||
LOAD_OPTION ON
|
LOAD_OPTION ON
|
||||||
|
#
|
||||||
|
# MDEV-6351 --plugin=force has no effect for built-in plugins
|
||||||
|
#
|
||||||
|
@ -4,18 +4,59 @@ include/master-slave.inc
|
|||||||
# New --dump-slave, --apply-slave-statements functionality
|
# New --dump-slave, --apply-slave-statements functionality
|
||||||
#
|
#
|
||||||
use test;
|
use test;
|
||||||
|
-- SET GLOBAL gtid_slave_pos='';
|
||||||
CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
||||||
STOP ALL SLAVES;
|
STOP ALL SLAVES;
|
||||||
|
-- SET GLOBAL gtid_slave_pos='';
|
||||||
CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
||||||
START ALL SLAVES;
|
START ALL SLAVES;
|
||||||
STOP ALL SLAVES;
|
STOP ALL SLAVES;
|
||||||
|
-- SET GLOBAL gtid_slave_pos='';
|
||||||
CHANGE MASTER '' TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
CHANGE MASTER '' TO MASTER_HOST='127.0.0.1', MASTER_PORT=MASTER_MYPORT, MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
||||||
START ALL SLAVES;
|
START ALL SLAVES;
|
||||||
start slave;
|
start slave;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1254 Slave is already running
|
Note 1254 Slave is already running
|
||||||
|
-- SET GLOBAL gtid_slave_pos='';
|
||||||
CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
||||||
start slave;
|
start slave;
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1254 Slave is already running
|
Note 1254 Slave is already running
|
||||||
|
*** Test mysqldump --dump-slave GTID functionality.
|
||||||
|
SET gtid_seq_no = 1000;
|
||||||
|
CREATE TABLE t1 (a INT PRIMARY KEY);
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t2 (a INT PRIMARY KEY);
|
||||||
|
DROP TABLE t2;
|
||||||
|
|
||||||
|
1. --dump-slave=1
|
||||||
|
|
||||||
|
SET GLOBAL gtid_slave_pos='0-1-1001';
|
||||||
|
CHANGE MASTER '' TO MASTER_USE_GTID=slave_pos;
|
||||||
|
-- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
||||||
|
|
||||||
|
2. --dump-slave=2
|
||||||
|
|
||||||
|
-- SET GLOBAL gtid_slave_pos='0-1-1001';
|
||||||
|
-- CHANGE MASTER '' TO MASTER_USE_GTID=slave_pos;
|
||||||
|
-- CHANGE MASTER '' TO MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
||||||
|
*** Test mysqldump --master-data GTID functionality.
|
||||||
|
|
||||||
|
1. --master-data=1
|
||||||
|
|
||||||
|
-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
||||||
|
CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
|
||||||
|
SET GLOBAL gtid_slave_pos='0-2-1003';
|
||||||
|
|
||||||
|
2. --master-data=2
|
||||||
|
|
||||||
|
-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
||||||
|
-- CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
|
||||||
|
-- SET GLOBAL gtid_slave_pos='0-2-1003';
|
||||||
|
|
||||||
|
3. --master-data --single-transaction
|
||||||
|
|
||||||
|
-- CHANGE MASTER TO MASTER_LOG_FILE='slave-bin.000001', MASTER_LOG_POS=BINLOG_START;
|
||||||
|
CHANGE MASTER TO MASTER_USE_GTID=slave_pos;
|
||||||
|
SET GLOBAL gtid_slave_pos='0-2-1003';
|
||||||
include/rpl_end.inc
|
include/rpl_end.inc
|
||||||
|
@ -18,6 +18,7 @@ NULL 15
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -36,6 +37,7 @@ DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -71,6 +73,7 @@ NULL 15
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -89,6 +92,7 @@ DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 8
|
Sort_rows 8
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -121,6 +125,7 @@ a b c d
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -139,6 +144,7 @@ DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -175,6 +181,7 @@ a b c d
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -193,6 +200,7 @@ DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -223,6 +231,7 @@ a b c d
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -241,6 +250,7 @@ DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -269,6 +279,7 @@ a b c d
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -287,6 +298,7 @@ DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -318,6 +330,7 @@ NULL 13 13
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 1
|
Sort_range 1
|
||||||
Sort_rows 4
|
Sort_rows 4
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -341,6 +354,7 @@ DELETE FROM t2 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 1
|
Sort_range 1
|
||||||
Sort_rows 4
|
Sort_rows 4
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -378,6 +392,7 @@ NULL 14
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -396,6 +411,7 @@ DELETE FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -431,6 +447,7 @@ a b c
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -449,6 +466,7 @@ DELETE FROM t2 ORDER BY a, b DESC LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 16
|
Sort_rows 16
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -493,6 +511,7 @@ a b c
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -517,6 +536,7 @@ a b c
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -535,6 +555,7 @@ DELETE FROM t2 ORDER BY a DESC, b DESC LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -571,6 +592,7 @@ NULL 15
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -589,6 +611,7 @@ UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -629,6 +652,7 @@ NULL 15
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -647,6 +671,7 @@ UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -684,6 +709,7 @@ a b c d
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -702,6 +728,7 @@ UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -738,6 +765,7 @@ a b c d
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -756,6 +784,7 @@ UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -786,6 +815,7 @@ a b c d
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -804,6 +834,7 @@ UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -833,6 +864,7 @@ a b c d
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -851,6 +883,7 @@ UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 1
|
Sort_rows 1
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -883,6 +916,7 @@ NULL 13 13
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 1
|
Sort_range 1
|
||||||
Sort_rows 4
|
Sort_rows 4
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -906,6 +940,7 @@ UPDATE t2 SET i = 123 WHERE key1 < 13 or key2 < 14 ORDER BY key1;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 1
|
Sort_range 1
|
||||||
Sort_rows 4
|
Sort_rows 4
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -947,6 +982,7 @@ NULL 14
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -965,6 +1001,7 @@ UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i DESC LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -1005,6 +1042,7 @@ a b c
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -1023,6 +1061,7 @@ UPDATE t2 SET c = 10 ORDER BY a, b DESC LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 1
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 5
|
Sort_rows 5
|
||||||
Sort_scan 1
|
Sort_scan 1
|
||||||
@ -1061,6 +1100,7 @@ a b c
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -1085,6 +1125,7 @@ a b c
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
@ -1103,6 +1144,7 @@ UPDATE t2 SET c = 10 ORDER BY a DESC, b DESC LIMIT 5;
|
|||||||
SHOW SESSION STATUS LIKE 'Sort%';
|
SHOW SESSION STATUS LIKE 'Sort%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Sort_merge_passes 0
|
Sort_merge_passes 0
|
||||||
|
Sort_priority_queue_sorts 0
|
||||||
Sort_range 0
|
Sort_range 0
|
||||||
Sort_rows 0
|
Sort_rows 0
|
||||||
Sort_scan 0
|
Sort_scan 0
|
||||||
|
10
mysql-test/r/stat_tables-enospc.result
Normal file
10
mysql-test/r/stat_tables-enospc.result
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
call mtr.add_suppression("No space left on device");
|
||||||
|
create table t1 (a varchar(255), b varchar(255), c varchar(255));
|
||||||
|
set use_stat_tables=PREFERABLY, optimizer_use_condition_selectivity=3;
|
||||||
|
set debug_dbug='+d,simulate_file_write_error';
|
||||||
|
analyze table t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze Error Error writing file 'tmp-file' (Errcode: 28 "No space left on device")
|
||||||
|
test.t1 analyze status Operation failed
|
||||||
|
set debug_dbug='';
|
||||||
|
drop table t1;
|
@ -2108,6 +2108,43 @@ EXECUTE stmt;
|
|||||||
a
|
a
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
DROP VIEW v2;
|
DROP VIEW v2;
|
||||||
|
#
|
||||||
|
# MDEV-6289 : Unexpected results when querying information_schema
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
id int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
db varchar(254) NOT NULL DEFAULT '',
|
||||||
|
PRIMARY KEY (id),
|
||||||
|
UNIQUE KEY db (db)
|
||||||
|
) DEFAULT CHARSET=utf8;
|
||||||
|
INSERT INTO t1 (db) VALUES ('mysqltest1'),('mysqltest2'),('mysqltest3'),('mysqltest4');
|
||||||
|
drop database if exists mysqltest1;
|
||||||
|
drop database if exists mysqltest2;
|
||||||
|
drop database if exists mysqltest3;
|
||||||
|
drop database if exists mysqltest4;
|
||||||
|
create database mysqltest1;
|
||||||
|
create database mysqltest2;
|
||||||
|
create database mysqltest3;
|
||||||
|
create database mysqltest4;
|
||||||
|
SELECT db FROM t1 WHERE db IN (SELECT SCHEMA_NAME FROM information_schema.schemata) ORDER BY db DESC;
|
||||||
|
db
|
||||||
|
mysqltest4
|
||||||
|
mysqltest3
|
||||||
|
mysqltest2
|
||||||
|
mysqltest1
|
||||||
|
EXPLAIN EXTENDED
|
||||||
|
SELECT db FROM t1 WHERE db IN (SELECT SCHEMA_NAME FROM information_schema.schemata) ORDER BY db DESC;
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||||
|
1 PRIMARY t1 eq_ref db db 764 information_schema.schemata.SCHEMA_NAME 1 100.00 Using where; Using index
|
||||||
|
2 MATERIALIZED schemata ALL NULL NULL NULL NULL NULL NULL
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`db` AS `db` from `test`.`t1` semi join (`information_schema`.`schemata`) where (`test`.`t1`.`db` = `information_schema`.`schemata`.`SCHEMA_NAME`) order by `test`.`t1`.`db` desc
|
||||||
|
drop table t1;
|
||||||
|
drop database mysqltest1;
|
||||||
|
drop database mysqltest2;
|
||||||
|
drop database mysqltest3;
|
||||||
|
drop database mysqltest4;
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
set @subselect_mat_test_optimizer_switch_value=null;
|
set @subselect_mat_test_optimizer_switch_value=null;
|
||||||
set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off';
|
set @@optimizer_switch='materialization=on,in_to_exists=off,semijoin=off';
|
||||||
|
@ -2148,4 +2148,41 @@ EXECUTE stmt;
|
|||||||
a
|
a
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
DROP VIEW v2;
|
DROP VIEW v2;
|
||||||
|
#
|
||||||
|
# MDEV-6289 : Unexpected results when querying information_schema
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
id int(11) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
db varchar(254) NOT NULL DEFAULT '',
|
||||||
|
PRIMARY KEY (id),
|
||||||
|
UNIQUE KEY db (db)
|
||||||
|
) DEFAULT CHARSET=utf8;
|
||||||
|
INSERT INTO t1 (db) VALUES ('mysqltest1'),('mysqltest2'),('mysqltest3'),('mysqltest4');
|
||||||
|
drop database if exists mysqltest1;
|
||||||
|
drop database if exists mysqltest2;
|
||||||
|
drop database if exists mysqltest3;
|
||||||
|
drop database if exists mysqltest4;
|
||||||
|
create database mysqltest1;
|
||||||
|
create database mysqltest2;
|
||||||
|
create database mysqltest3;
|
||||||
|
create database mysqltest4;
|
||||||
|
SELECT db FROM t1 WHERE db IN (SELECT SCHEMA_NAME FROM information_schema.schemata) ORDER BY db DESC;
|
||||||
|
db
|
||||||
|
mysqltest4
|
||||||
|
mysqltest3
|
||||||
|
mysqltest2
|
||||||
|
mysqltest1
|
||||||
|
EXPLAIN EXTENDED
|
||||||
|
SELECT db FROM t1 WHERE db IN (SELECT SCHEMA_NAME FROM information_schema.schemata) ORDER BY db DESC;
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 2 100.00 Using temporary; Using filesort
|
||||||
|
1 PRIMARY t1 eq_ref db db 764 information_schema.schemata.SCHEMA_NAME 1 100.00 Using where; Using index
|
||||||
|
2 MATERIALIZED schemata ALL NULL NULL NULL NULL NULL NULL
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select `test`.`t1`.`db` AS `db` from `test`.`t1` semi join (`information_schema`.`schemata`) where (`test`.`t1`.`db` = `information_schema`.`schemata`.`SCHEMA_NAME`) order by `test`.`t1`.`db` desc
|
||||||
|
drop table t1;
|
||||||
|
drop database mysqltest1;
|
||||||
|
drop database mysqltest2;
|
||||||
|
drop database mysqltest3;
|
||||||
|
drop database mysqltest4;
|
||||||
# End of 5.5 tests
|
# End of 5.5 tests
|
||||||
|
37
mysql-test/r/table_options-5867.result
Normal file
37
mysql-test/r/table_options-5867.result
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
install soname 'ha_example';
|
||||||
|
set sql_mode='ignore_bad_table_options';
|
||||||
|
create table t1 (
|
||||||
|
a int complex='c,f,f,f' invalid=3
|
||||||
|
) engine=example ull=10000 str='dskj' one_or_two='one' yesno=0
|
||||||
|
foobar=barfoo;
|
||||||
|
Warnings:
|
||||||
|
Warning 1911 Unknown option 'invalid'
|
||||||
|
Warning 1911 Unknown option 'foobar'
|
||||||
|
create table t2 (a int, key (a) some_option=2014);
|
||||||
|
Warnings:
|
||||||
|
Warning 1911 Unknown option 'some_option'
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` int(11) DEFAULT NULL `complex`='c,f,f,f' `invalid`=3
|
||||||
|
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=10000 `str`='dskj' `one_or_two`='one' `yesno`=0 `foobar`=barfoo `VAROPT`='5'
|
||||||
|
show create table t2;
|
||||||
|
Table Create Table
|
||||||
|
t2 CREATE TABLE `t2` (
|
||||||
|
`a` int(11) DEFAULT NULL,
|
||||||
|
KEY `a` (`a`) `some_option`=2014
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
set sql_mode='';
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` int(11) DEFAULT NULL `complex`='c,f,f,f' /* `invalid`=3 */
|
||||||
|
) ENGINE=EXAMPLE DEFAULT CHARSET=latin1 `ull`=10000 `str`='dskj' `one_or_two`='one' `yesno`=0 /* `foobar`=barfoo */ `VAROPT`='5'
|
||||||
|
show create table t2;
|
||||||
|
Table Create Table
|
||||||
|
t2 CREATE TABLE `t2` (
|
||||||
|
`a` int(11) DEFAULT NULL,
|
||||||
|
KEY `a` (`a`) /* `some_option`=2014 */
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
drop table t1, t2;
|
||||||
|
uninstall soname 'ha_example';
|
@ -722,7 +722,12 @@ DROP TABLE t1;
|
|||||||
CREATE TABLE IF NOT EXISTS t1 (
|
CREATE TABLE IF NOT EXISTS t1 (
|
||||||
f1 bit(2) NOT NULL default b''
|
f1 bit(2) NOT NULL default b''
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
|
||||||
ERROR 42000: Invalid default value for 'f1'
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`f1` bit(2) NOT NULL DEFAULT b'0'
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci
|
||||||
|
DROP TABLE t1;
|
||||||
create table t1bit7 (a1 bit(7) not null) engine=MyISAM;
|
create table t1bit7 (a1 bit(7) not null) engine=MyISAM;
|
||||||
create table t2bit7 (b1 bit(7)) engine=MyISAM;
|
create table t2bit7 (b1 bit(7)) engine=MyISAM;
|
||||||
insert into t1bit7 values (b'1100000');
|
insert into t1bit7 values (b'1100000');
|
||||||
|
@ -413,3 +413,12 @@ a
|
|||||||
`
|
`
|
||||||
drop table t1;
|
drop table t1;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
|
create table t1(f1 bit(2) not null default b'10',f2 bit(14) not null default b'11110000111100');
|
||||||
|
insert into t1 (f1) values (default);
|
||||||
|
insert into t1 values (b'',b''),('','');
|
||||||
|
select hex(f1), hex(f2) from t1;
|
||||||
|
hex(f1) hex(f2)
|
||||||
|
2 3C3C
|
||||||
|
0 0
|
||||||
|
0 0
|
||||||
|
drop table t1;
|
||||||
|
@ -810,10 +810,10 @@ c1
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS '%';
|
SELECT 1 % .123456789123456789123456789123456789123456789123456789123456789123456789123456789 AS '%';
|
||||||
%
|
%
|
||||||
0.012345687012345687012345687012345687012345687012345687012345687012345687000000000
|
0.012345687012345687012345687012
|
||||||
SELECT MOD(1, .123456789123456789123456789123456789123456789123456789123456789123456789123456789) AS 'MOD()';
|
SELECT MOD(1, .123456789123456789123456789123456789123456789123456789123456789123456789123456789) AS 'MOD()';
|
||||||
MOD()
|
MOD()
|
||||||
0.012345687012345687012345687012345687012345687012345687012345687012345687000000000
|
0.012345687012345687012345687012
|
||||||
create table t1 (f1 decimal(6,6),f2 decimal(6,6) zerofill);
|
create table t1 (f1 decimal(6,6),f2 decimal(6,6) zerofill);
|
||||||
insert into t1 values (-0.123456,0.123456);
|
insert into t1 values (-0.123456,0.123456);
|
||||||
select group_concat(f1),group_concat(f2) from t1;
|
select group_concat(f1),group_concat(f2) from t1;
|
||||||
|
@ -703,7 +703,7 @@ select .7777777777777777777777777777777777777 *
|
|||||||
777777777777777777.777777777777777777700000000000
|
777777777777777777.777777777777777777700000000000
|
||||||
select .7777777777777777777777777777777777777 - 0.1;
|
select .7777777777777777777777777777777777777 - 0.1;
|
||||||
.7777777777777777777777777777777777777 - 0.1
|
.7777777777777777777777777777777777777 - 0.1
|
||||||
0.6777777777777777777777777777777777777
|
0.677777777777777777777777777778
|
||||||
select .343434343434343434 + .343434343434343434;
|
select .343434343434343434 + .343434343434343434;
|
||||||
.343434343434343434 + .343434343434343434
|
.343434343434343434 + .343434343434343434
|
||||||
0.686868686868686868
|
0.686868686868686868
|
||||||
@ -1840,7 +1840,7 @@ Warnings:
|
|||||||
Note 1265 Data truncated for column 'c1' at row 4
|
Note 1265 Data truncated for column 'c1' at row 4
|
||||||
DESC t2;
|
DESC t2;
|
||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
c1 decimal(32,30) YES NULL
|
c1 decimal(33,30) YES NULL
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
CREATE TABLE t1 (a DECIMAL(30,30));
|
CREATE TABLE t1 (a DECIMAL(30,30));
|
||||||
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
|
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
|
||||||
@ -1851,7 +1851,7 @@ Note 1265 Data truncated for column 'c1' at row 2
|
|||||||
Note 1265 Data truncated for column 'c1' at row 3
|
Note 1265 Data truncated for column 'c1' at row 3
|
||||||
DESC t2;
|
DESC t2;
|
||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
c1 decimal(34,0) YES NULL
|
c1 decimal(33,30) YES NULL
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
CREATE TABLE t1 (a DECIMAL(30,30));
|
CREATE TABLE t1 (a DECIMAL(30,30));
|
||||||
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
|
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
|
||||||
|
@ -1876,6 +1876,40 @@ SELECT(SELECT 1 AS a FROM dual ORDER BY a DESC LIMIT 1) AS dev;
|
|||||||
dev
|
dev
|
||||||
1
|
1
|
||||||
#
|
#
|
||||||
|
# Bug #17059925 : UNIONS COMPUTES ROWS_EXAMINED INCORRECTLY
|
||||||
|
#
|
||||||
|
SET @old_slow_query_log= @@global.slow_query_log;
|
||||||
|
SET @old_log_output= @@global.log_output;
|
||||||
|
SET @old_long_query_time= @@long_query_time;
|
||||||
|
SET GLOBAL log_output= "TABLE";
|
||||||
|
SET GLOBAL slow_query_log= ON;
|
||||||
|
SET SESSION long_query_time= 0;
|
||||||
|
CREATE TABLE t17059925 (a INT);
|
||||||
|
CREATE TABLE t2 (b INT);
|
||||||
|
CREATE TABLE t3 (c INT);
|
||||||
|
INSERT INTO t17059925 VALUES (1), (2), (3);
|
||||||
|
INSERT INTO t2 VALUES (4), (5), (6);
|
||||||
|
INSERT INTO t3 VALUES (7), (8), (9);
|
||||||
|
TRUNCATE table mysql.slow_log;
|
||||||
|
SELECT * FROM t17059925 UNION SELECT * FROM t2 UNION SELECT * FROM t3;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
SELECT sql_text, rows_examined FROM mysql.slow_log WHERE sql_text LIKE '%SELECT%t17059925%';
|
||||||
|
sql_text rows_examined
|
||||||
|
SELECT * FROM t17059925 UNION SELECT * FROM t2 UNION SELECT * FROM t3 18
|
||||||
|
DROP TABLE t17059925, t2, t3;
|
||||||
|
SET @@long_query_time= @old_long_query_time;
|
||||||
|
SET @@global.log_output= @old_log_output;
|
||||||
|
SET @@global.slow_query_log= @old_slow_query_log;
|
||||||
|
#
|
||||||
# lp:1010729: Unexpected syntax error from UNION
|
# lp:1010729: Unexpected syntax error from UNION
|
||||||
# (bug #54382) with single-table join nest
|
# (bug #54382) with single-table join nest
|
||||||
#
|
#
|
||||||
|
@ -189,6 +189,8 @@ select @@concurrent_insert;
|
|||||||
@@concurrent_insert
|
@@concurrent_insert
|
||||||
AUTO
|
AUTO
|
||||||
set global timed_mutexes=ON;
|
set global timed_mutexes=ON;
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||||
show variables like 'timed_mutexes';
|
show variables like 'timed_mutexes';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
timed_mutexes ON
|
timed_mutexes ON
|
||||||
@ -196,6 +198,8 @@ select * from information_schema.session_variables where variable_name like 'tim
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
TIMED_MUTEXES ON
|
TIMED_MUTEXES ON
|
||||||
set global timed_mutexes=0;
|
set global timed_mutexes=0;
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@timed_mutexes' is deprecated and will be removed in a future release.
|
||||||
show variables like 'timed_mutexes';
|
show variables like 'timed_mutexes';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
timed_mutexes OFF
|
timed_mutexes OFF
|
||||||
|
@ -4789,6 +4789,45 @@ DROP DATABASE IF EXISTS nodb;
|
|||||||
CREATE VIEW nodb.a AS SELECT 1;
|
CREATE VIEW nodb.a AS SELECT 1;
|
||||||
ERROR 42000: Unknown database 'nodb'
|
ERROR 42000: Unknown database 'nodb'
|
||||||
#
|
#
|
||||||
|
# BUG#14117018 - MYSQL SERVER CREATES INVALID VIEW DEFINITION
|
||||||
|
# BUG#18405221 - SHOW CREATE VIEW OUTPUT INCORRECT
|
||||||
|
#
|
||||||
|
CREATE VIEW v1 AS (SELECT '' FROM DUAL);
|
||||||
|
CREATE VIEW v2 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL
|
||||||
|
(SELECT '' FROM DUAL);
|
||||||
|
CREATE VIEW v3 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL
|
||||||
|
(SELECT '' FROM DUAL) UNION ALL
|
||||||
|
(SELECT '' FROM DUAL);
|
||||||
|
CREATE VIEW v4 AS (SELECT 'BUG#14117018' AS col1 FROM DUAL) UNION ALL
|
||||||
|
(SELECT '' AS col2 FROM DUAL) UNION ALL
|
||||||
|
(SELECT '' FROM DUAL);
|
||||||
|
CREATE VIEW v5 AS (SELECT 'buggy' AS col1, 'fix' as col2 FROM DUAL) UNION ALL
|
||||||
|
(SELECT 'buggy' as a, 'fix' as a FROM DUAL);
|
||||||
|
# Name for the column in select1 is set properly with or
|
||||||
|
# without this fix.
|
||||||
|
SHOW CREATE VIEW v1;
|
||||||
|
View Create View character_set_client collation_connection
|
||||||
|
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select '' AS `Name_exp_1`) latin1 latin1_swedish_ci
|
||||||
|
# Name for the column in select2 is set with this fix.
|
||||||
|
# Without this fix, name would not have set for the
|
||||||
|
# columns in select2.
|
||||||
|
SHOW CREATE VIEW v2;
|
||||||
|
View Create View character_set_client collation_connection
|
||||||
|
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS (select 'BUG#14117018' AS `col1`) union all (select '' AS `Name_exp_1`) latin1 latin1_swedish_ci
|
||||||
|
# Name for the field item in select2 & select3 is set with this fix.
|
||||||
|
# Without this fix, name would not have set for the
|
||||||
|
# columns in select2 & select3.
|
||||||
|
SHOW CREATE VIEW v3;
|
||||||
|
View Create View character_set_client collation_connection
|
||||||
|
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS (select 'BUG#14117018' AS `col1`) union all (select '' AS `Name_exp_1`) union all (select '' AS `Name_exp_1`) latin1 latin1_swedish_ci
|
||||||
|
# Name for the field item in select3 is set with this fix.
|
||||||
|
# Without this fix, name would not have set for the
|
||||||
|
# columns in select3.
|
||||||
|
SHOW CREATE VIEW v4;
|
||||||
|
View Create View character_set_client collation_connection
|
||||||
|
v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS (select 'BUG#14117018' AS `col1`) union all (select '' AS `col2`) union all (select '' AS `Name_exp_1`) latin1 latin1_swedish_ci
|
||||||
|
DROP VIEW v1, v2, v3, v4, v5;
|
||||||
|
#
|
||||||
# lp:833600 Wrong result with view + outer join + uncorrelated subquery (non-semijoin)
|
# lp:833600 Wrong result with view + outer join + uncorrelated subquery (non-semijoin)
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 ( a int, b int );
|
CREATE TABLE t1 ( a int, b int );
|
||||||
@ -5300,6 +5339,61 @@ NULL 8
|
|||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1,t2,t3;
|
drop table t1,t2,t3;
|
||||||
SET optimizer_switch=@save_optimizer_switch_MDEV_3874;
|
SET optimizer_switch=@save_optimizer_switch_MDEV_3874;
|
||||||
|
CREATE TABLE `t1` (
|
||||||
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`f0` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`f1` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `id` (`id`)
|
||||||
|
);
|
||||||
|
CREATE TABLE `t2` (
|
||||||
|
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`f02` bigint(20) unsigned NOT NULL DEFAULT '0',
|
||||||
|
`f03` int(11) unsigned NOT NULL DEFAULT '0',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
UNIQUE KEY `id` (`id`)
|
||||||
|
);
|
||||||
|
CREATE ALGORITHM=UNDEFINED SQL SECURITY DEFINER VIEW `v1` AS
|
||||||
|
SELECT
|
||||||
|
`t1`.`f0` AS `f0`,
|
||||||
|
`t1`.`f1` AS `f1`,
|
||||||
|
`t2`.`f02` AS `f02`,
|
||||||
|
`t2`.`f03` AS `f03`
|
||||||
|
FROM
|
||||||
|
(`t1` LEFT JOIN `t2` ON((`t1`.`id` = `t2`.`f02`)));
|
||||||
|
CREATE FUNCTION `f1`(
|
||||||
|
p0 BIGINT(20) UNSIGNED
|
||||||
|
)
|
||||||
|
RETURNS bigint(20) unsigned
|
||||||
|
DETERMINISTIC
|
||||||
|
CONTAINS SQL
|
||||||
|
SQL SECURITY DEFINER
|
||||||
|
COMMENT ''
|
||||||
|
BEGIN
|
||||||
|
DECLARE k0 INTEGER UNSIGNED DEFAULT 0;
|
||||||
|
DECLARE lResult INTEGER UNSIGNED DEFAULT 0;
|
||||||
|
SET k0 = 0;
|
||||||
|
WHILE k0 < 1 DO
|
||||||
|
SELECT COUNT(*) as `f00` INTO lResult FROM `v1` WHERE `v1`.`f0` = p0; -- BUG
|
||||||
|
SET k0 = k0 + 1;
|
||||||
|
END WHILE;
|
||||||
|
RETURN(k0);
|
||||||
|
END|
|
||||||
|
SELECT `f1`(1);
|
||||||
|
`f1`(1)
|
||||||
|
1
|
||||||
|
SELECT `f1`(1);
|
||||||
|
`f1`(1)
|
||||||
|
1
|
||||||
|
SELECT `f1`(1);
|
||||||
|
`f1`(1)
|
||||||
|
1
|
||||||
|
SELECT `f1`(1);
|
||||||
|
`f1`(1)
|
||||||
|
1
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
DROP VIEW v1;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# -- End of 5.5 tests.
|
# -- End of 5.5 tests.
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
0
mysql-test/std_data/checkDBI_DBD-mysql.pl
Normal file → Executable file
0
mysql-test/std_data/checkDBI_DBD-mysql.pl
Normal file → Executable file
BIN
mysql-test/std_data/mdev6020-mysql-bin.000001
Normal file
BIN
mysql-test/std_data/mdev6020-mysql-bin.000001
Normal file
Binary file not shown.
6
mysql-test/std_data/new-format-relay-log-win.info
Normal file
6
mysql-test/std_data/new-format-relay-log-win.info
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
5
|
||||||
|
.\slave-relay-bin.000001
|
||||||
|
4
|
||||||
|
|
||||||
|
0
|
||||||
|
0
|
6
mysql-test/std_data/new-format-relay-log.info
Normal file
6
mysql-test/std_data/new-format-relay-log.info
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
5
|
||||||
|
./slave-relay-bin.000001
|
||||||
|
4
|
||||||
|
|
||||||
|
0
|
||||||
|
0
|
4
mysql-test/std_data/old-format-relay-log-win.info
Normal file
4
mysql-test/std_data/old-format-relay-log-win.info
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
.\slave-relay-bin.000001
|
||||||
|
4
|
||||||
|
|
||||||
|
0
|
4
mysql-test/std_data/old-format-relay-log.info
Normal file
4
mysql-test/std_data/old-format-relay-log.info
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
./slave-relay-bin.000001
|
||||||
|
4
|
||||||
|
|
||||||
|
0
|
@ -127,3 +127,29 @@ select count(*) from t1;
|
|||||||
count(*)
|
count(*)
|
||||||
100
|
100
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
#BUG 18618561: FAILED ALTER TABLE ENGINE CHANGE WITH PARTITIONS
|
||||||
|
# CORRUPTS FRM
|
||||||
|
CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= MYISAM PARTITION BY HASH(fld1)
|
||||||
|
PARTITIONS 5;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`fld1` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`fld1`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
/*!50100 PARTITION BY HASH (fld1)
|
||||||
|
PARTITIONS 5 */
|
||||||
|
ALTER TABLE t1 ENGINE= ARCHIVE;
|
||||||
|
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 140 "Wrong create options")
|
||||||
|
#After the patch, the ENGINE is correctly displayed as MyISAM
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`fld1` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`fld1`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||||
|
/*!50100 PARTITION BY HASH (fld1)
|
||||||
|
PARTITIONS 5 */
|
||||||
|
#Cleanup.
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -129,3 +129,21 @@ show create table t1;
|
|||||||
select count(*) from t1;
|
select count(*) from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo #BUG 18618561: FAILED ALTER TABLE ENGINE CHANGE WITH PARTITIONS
|
||||||
|
--echo # CORRUPTS FRM
|
||||||
|
|
||||||
|
CREATE TABLE t1 (fld1 INT PRIMARY KEY) ENGINE= MYISAM PARTITION BY HASH(fld1)
|
||||||
|
PARTITIONS 5;
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
|
||||||
|
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
|
||||||
|
--error ER_CANT_CREATE_TABLE
|
||||||
|
ALTER TABLE t1 ENGINE= ARCHIVE;
|
||||||
|
|
||||||
|
--echo #After the patch, the ENGINE is correctly displayed as MyISAM
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
|
||||||
|
--echo #Cleanup.
|
||||||
|
DROP TABLE t1;
|
||||||
|
@ -353,6 +353,10 @@ drop function bug27563;
|
|||||||
# common cleanup
|
# common cleanup
|
||||||
#
|
#
|
||||||
|
|
||||||
|
connection default;
|
||||||
|
disconnect con1;
|
||||||
|
disconnect con2;
|
||||||
|
|
||||||
drop table t1,t2,t3;
|
drop table t1,t2,t3;
|
||||||
|
|
||||||
--echo end of the tests
|
--echo end of the tests
|
||||||
|
@ -5035,9 +5035,9 @@ CAST(0.2359591234567e6 AS TIME)
|
|||||||
23:59:59
|
23:59:59
|
||||||
SELECT CAST(0.2359591234567e+30 AS TIME);
|
SELECT CAST(0.2359591234567e+30 AS TIME);
|
||||||
CAST(0.2359591234567e+30 AS TIME)
|
CAST(0.2359591234567e+30 AS TIME)
|
||||||
NULL
|
838:59:59
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Incorrect datetime value: '2.359591234567e29'
|
Warning 1292 Truncated incorrect time value: '2.359591234567e29'
|
||||||
select cast('100:55:50' as time) < cast('24:00:00' as time);
|
select cast('100:55:50' as time) < cast('24:00:00' as time);
|
||||||
cast('100:55:50' as time) < cast('24:00:00' as time)
|
cast('100:55:50' as time) < cast('24:00:00' as time)
|
||||||
0
|
0
|
||||||
|
2
mysql-test/suite/engines/iuds/suite.opt
Normal file
2
mysql-test/suite/engines/iuds/suite.opt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
--timezone=GMT-3
|
||||||
|
|
@ -0,0 +1,147 @@
|
|||||||
|
--echo #
|
||||||
|
--echo # Testing robustness against random compression failures
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--source include/not_embedded.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
# record the file format in order to restore in the end.
|
||||||
|
--let $file_format_save = `SELECT @@innodb_file_format`
|
||||||
|
--let $file_format_max_save = `SELECT @@innodb_file_format_max`
|
||||||
|
--let $simulate_comp_failures_save = `SELECT @@innodb_simulate_comp_failures`
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
SET GLOBAL INNODB_FILE_FORMAT='Barracuda';
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
# since this test generates lot of errors in log, suppress checking errors
|
||||||
|
call mtr.add_suppression(".*");
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
# create the table with compressed pages of size 8K.
|
||||||
|
CREATE TABLE t1(id INT AUTO_INCREMENT PRIMARY KEY, msg VARCHAR(255), KEY msg_i(msg)) ENGINE=INNODB ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8;
|
||||||
|
|
||||||
|
# percentage of compressions that will be forced to fail
|
||||||
|
SET GLOBAL innodb_simulate_comp_failures = 25;
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
--disable_result_log
|
||||||
|
|
||||||
|
let $num_inserts_ind = $num_inserts;
|
||||||
|
while ($num_inserts_ind)
|
||||||
|
{
|
||||||
|
let $repeat = `select floor(rand() * 10)`;
|
||||||
|
eval
|
||||||
|
INSERT INTO t1(id, msg)
|
||||||
|
VALUES ($num_inserts_ind, REPEAT('abcdefghijklmnopqrstuvwxyz', $repeat));
|
||||||
|
dec $num_inserts_ind;
|
||||||
|
}
|
||||||
|
|
||||||
|
--enable_query_log
|
||||||
|
--enable_result_log
|
||||||
|
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
--disable_result_log
|
||||||
|
|
||||||
|
# do random ops, making sure that some pages will get fragmented and reorganized.
|
||||||
|
let $num_ops_ind = $num_ops;
|
||||||
|
|
||||||
|
while($num_ops_ind)
|
||||||
|
{
|
||||||
|
let $idx = `select floor(rand()*$num_inserts)`;
|
||||||
|
let $insert_or_update = `select floor(rand()*3)`;
|
||||||
|
|
||||||
|
let $repeat = `select floor(rand() * 9) + 1`;
|
||||||
|
|
||||||
|
let $msg = query_get_value(`select repeat('abcdefghijklmnopqrstuvwxyz', $repeat) as x`, x, 1);
|
||||||
|
|
||||||
|
let $single_or_multi = `select floor(rand()*10)`;
|
||||||
|
|
||||||
|
if ($insert_or_update)
|
||||||
|
{
|
||||||
|
let $cnt = query_get_value(SELECT COUNT(*) cnt FROM t1 WHERE id=$idx, cnt, 1);
|
||||||
|
|
||||||
|
if ($cnt)
|
||||||
|
{
|
||||||
|
let $update = `select floor(rand()*2)`;
|
||||||
|
|
||||||
|
if ($update)
|
||||||
|
{
|
||||||
|
if ($single_or_multi)
|
||||||
|
{
|
||||||
|
eval UPDATE t1 SET msg=\"$msg\" WHERE id=$idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$single_or_multi)
|
||||||
|
{
|
||||||
|
eval UPDATE t1 SET msg=\"$msg\" WHERE id >= $idx - 100 AND id <= $idx + 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$update)
|
||||||
|
{
|
||||||
|
if ($single_or_multi)
|
||||||
|
{
|
||||||
|
eval INSERT INTO t1(msg, id) VALUES (\"$msg\", $idx) ON DUPLICATE KEY UPDATE msg=VALUES(msg), id = VALUES(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$single_or_multi)
|
||||||
|
{
|
||||||
|
let $diff = 200;
|
||||||
|
|
||||||
|
while ($diff)
|
||||||
|
{
|
||||||
|
eval INSERT INTO t1(msg, id) VALUES (\"$msg\", $idx + 100 - $diff) ON DUPLICATE KEY UPDATE msg=VALUES(msg), id=VALUES(id);
|
||||||
|
|
||||||
|
dec $diff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$cnt)
|
||||||
|
{
|
||||||
|
let $null_msg = `select floor(rand()*2)`;
|
||||||
|
|
||||||
|
if ($null_msg)
|
||||||
|
{
|
||||||
|
eval INSERT INTO t1(id,msg) VALUES ($idx, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$null_msg)
|
||||||
|
{
|
||||||
|
eval INSERT INTO t1(id, msg) VALUES ($idx, \"$msg\");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$insert_or_update)
|
||||||
|
{
|
||||||
|
if ($single_or_multi)
|
||||||
|
{
|
||||||
|
eval DELETE from t1 WHERE id=$idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$single_or_multi)
|
||||||
|
{
|
||||||
|
eval DELETE from t1 WHERE id >= $idx - 100 AND id <= $idx + 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dec $num_ops_ind;
|
||||||
|
}
|
||||||
|
|
||||||
|
# final cleanup
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
# restore innodb_file_format and innodb_file_format_max
|
||||||
|
eval SET GLOBAL innodb_file_format = \"$file_format_save\";
|
||||||
|
eval SET GLOBAL innodb_file_format_max = \"$file_format_max_save\";
|
||||||
|
eval SET GLOBAL innodb_simulate_comp_failures = $simulate_comp_failures_save;
|
||||||
|
|
||||||
|
--enable_query_log
|
15
mysql-test/suite/innodb/r/blob_unique2pk.result
Normal file
15
mysql-test/suite/innodb/r/blob_unique2pk.result
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
create table t1 (f1 tinyblob not null) engine=innodb;
|
||||||
|
alter table t1 add unique index (f1(255));
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (f1 tinyblob not null) engine=innodb;
|
||||||
|
alter table t1 add unique index (f1(356));
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`f1` tinyblob NOT NULL,
|
||||||
|
UNIQUE KEY `f1` (`f1`(255))
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (f1 point not null) engine=innodb;
|
||||||
|
alter table t1 add unique index (f1);
|
||||||
|
drop table t1;
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user