mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Merge branch 'bb-10.1-serg' into 10.1
10.0 merge 10.0-galera merge connect/10.1 merge
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -59,6 +59,9 @@ include/mysql_version.h
|
|||||||
include/mysqld_ername.h
|
include/mysqld_ername.h
|
||||||
include/mysqld_error.h
|
include/mysqld_error.h
|
||||||
include/sql_state.h
|
include/sql_state.h
|
||||||
|
include/probes_mysql.d
|
||||||
|
include/probes_mysql_dtrace.h
|
||||||
|
include/probes_mysql_nodtrace.h
|
||||||
info_macros.cmake
|
info_macros.cmake
|
||||||
libmysql*/libmysql*_exports_file.cc
|
libmysql*/libmysql*_exports_file.cc
|
||||||
libmysql*/merge_archives_mysql*.cmake
|
libmysql*/merge_archives_mysql*.cmake
|
||||||
|
45
CREDITS
45
CREDITS
@@ -1,25 +1,30 @@
|
|||||||
MariaDB is brought to you by the MariaDB foundation, a USA non profit
|
MariaDB is brought to you by the MariaDB Foundation, a non profit
|
||||||
organization.
|
organization registered in the USA.
|
||||||
|
|
||||||
The current main members and sponsors of the MariaDB foundation are:
|
The current main members and sponsors of the MariaDB Foundation are:
|
||||||
|
|
||||||
Automattic http://automattic.com (2014)
|
MariaDB Corporation http://www.mariadb.com (2013 - 2016)
|
||||||
SkySQL Ab http://www.skysql.com (2013, 2014)
|
Booking.com http://www.booking.com (2013 - 2016)
|
||||||
Booking.com http://www.booking.com (2013)
|
Parallels http://www.parallels.com/products/plesk (2013 - 2016)
|
||||||
Parallels http://www.parallels.com/products/plesk (2013)
|
Automattic http://automattic.com (2014 - 2016)
|
||||||
|
Verkkokauppa.com http://verkkokauppa.com (2015 - 2016)
|
||||||
|
Visma http://visma.com/ (2015 - 2016)
|
||||||
|
Webyog http://webyog.com (2015 - 2016)
|
||||||
|
Wikimedia Foundation http://wikimedia.org (2015 - 2016)
|
||||||
|
Acronis http://acronis.com (2016)
|
||||||
|
|
||||||
For a full list of supporters and sponsors see
|
For a full list of supporters and sponsors see
|
||||||
https://mariadb.org/en/supporters/
|
https://mariadb.org/about/supporters/
|
||||||
|
|
||||||
You can also do this by doing SHOW CONTRIBUTORS.
|
You can also do this by running SHOW CONTRIBUTORS.
|
||||||
|
|
||||||
For all corporate memberships and sponsorships please contact the
|
For all corporate memberships and sponsorships please contact the
|
||||||
MariaDB foundation Board via foundation@mariadb.org.
|
MariaDB Foundation Board via foundation@mariadb.org.
|
||||||
|
|
||||||
The MariaDB foundation is responsible for the MariaDB source
|
The MariaDB Foundation is responsible for the MariaDB source
|
||||||
repository, the official MariaDB binaries and http://mariadb.org.
|
repository, the official MariaDB binaries and http://mariadb.org.
|
||||||
|
|
||||||
The MariaDB foundation provides also, among other things, the
|
The MariaDB Foundation also provides, among other things, the
|
||||||
following services to the MariaDB community:
|
following services to the MariaDB community:
|
||||||
|
|
||||||
- Code reviews and applying patches for MariaDB
|
- Code reviews and applying patches for MariaDB
|
||||||
@@ -28,17 +33,19 @@ following services to the MariaDB community:
|
|||||||
- Bug fixing in MariaDB (for bugs that affects a large part of the community)
|
- Bug fixing in MariaDB (for bugs that affects a large part of the community)
|
||||||
- Building the official MariaDB binaries
|
- Building the official MariaDB binaries
|
||||||
- Maintaining http://mariadb.org
|
- Maintaining http://mariadb.org
|
||||||
|
- Documenting MariaDB in the MariaDB Knowledge Base http://mariadb.com/kb
|
||||||
|
|
||||||
To be able to do the above we need help from cooperations and individuals!
|
To be able to do the above we need help from corporations and individuals!
|
||||||
|
|
||||||
You can help support MariaDB by be becoming a MariaDB developer or a
|
You can help support MariaDB by becoming a MariaDB developer or a
|
||||||
member or sponsor of the MariaDB foundation!
|
member or sponsor of the MariaDB Foundation. To donate or sponsor,
|
||||||
|
go to https://mariadb.org/donate/
|
||||||
|
|
||||||
You can get a list of all main authors of MariaDB / MySQL by doing
|
You can get a list of all the main authors of MariaDB / MySQL by running
|
||||||
SHOW AUTHORS;
|
SHOW AUTHORS;
|
||||||
|
|
||||||
You can get a list sponsors and contributors by doing
|
You can get a list sponsors and contributors by running
|
||||||
SHOW CONTRIBUTORS;
|
SHOW CONTRIBUTORS;
|
||||||
|
|
||||||
You can read more about the MariaDB foundation at:
|
You can read more about the MariaDB Foundation at:
|
||||||
https://mariadb.org/en/foundation/
|
https://mariadb.org/about/
|
||||||
|
8
README
8
README
@@ -1,17 +1,17 @@
|
|||||||
MariaDB is designed as a drop-in replacement of MySQL(R) with more
|
MariaDB is designed as a drop-in replacement of MySQL(R) with more
|
||||||
features, new storage engines, fewer bugs, and better performance.
|
features, new storage engines, fewer bugs, and better performance.
|
||||||
|
|
||||||
MariaDB is brought to you by the MariaDB foundation.
|
MariaDB is brought to you by the MariaDB Foundation.
|
||||||
Please read the file CREDITS for details about the MariaDB foundation,
|
Please read the CREDITS file for details about the MariaDB Foundation,
|
||||||
and who is developing MariaDB.
|
and who is developing MariaDB.
|
||||||
|
|
||||||
MariaDB is developed by many of the original developers of MySQL who
|
MariaDB is developed by many of the original developers of MySQL who
|
||||||
now work for MariadB foundation and SkySQL Ab, and by many people in
|
now work for the MariadB Foundation and the MariaDB Corporation, and by many people in
|
||||||
the community.
|
the community.
|
||||||
|
|
||||||
MySQL, which is the base of MariaDB, is a product and trademark of Oracle
|
MySQL, which is the base of MariaDB, is a product and trademark of Oracle
|
||||||
Corporation, Inc. For a list of developers and other contributors,
|
Corporation, Inc. For a list of developers and other contributors,
|
||||||
see the Credits appendix. You can also do 'SHOW authors' to get a
|
see the Credits appendix. You can also run 'SHOW authors' to get a
|
||||||
list of active contributors.
|
list of active contributors.
|
||||||
|
|
||||||
A description of the MariaDB project and a manual can be found at:
|
A description of the MariaDB project and a manual can be found at:
|
||||||
|
1
VERSION
1
VERSION
@@ -1,4 +1,3 @@
|
|||||||
MYSQL_VERSION_MAJOR=10
|
MYSQL_VERSION_MAJOR=10
|
||||||
MYSQL_VERSION_MINOR=1
|
MYSQL_VERSION_MINOR=1
|
||||||
MYSQL_VERSION_PATCH=12
|
MYSQL_VERSION_PATCH=12
|
||||||
MYSQL_VERSION_EXTRA=
|
|
||||||
|
@@ -1344,6 +1344,44 @@ sig_handler mysql_end(int sig)
|
|||||||
exit(status.exit_status);
|
exit(status.exit_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
set connection-specific options and call mysql_real_connect
|
||||||
|
*/
|
||||||
|
static bool do_connect(MYSQL *mysql, const char *host, const char *user,
|
||||||
|
const char *password, const char *database, ulong flags)
|
||||||
|
{
|
||||||
|
if (opt_secure_auth)
|
||||||
|
mysql_options(mysql, MYSQL_SECURE_AUTH, (char *) &opt_secure_auth);
|
||||||
|
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
|
||||||
|
if (opt_use_ssl)
|
||||||
|
{
|
||||||
|
mysql_ssl_set(mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
|
||||||
|
opt_ssl_capath, opt_ssl_cipher);
|
||||||
|
mysql_options(mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
|
||||||
|
mysql_options(mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
|
||||||
|
}
|
||||||
|
mysql_options(mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
||||||
|
(char*)&opt_ssl_verify_server_cert);
|
||||||
|
#endif
|
||||||
|
if (opt_protocol)
|
||||||
|
mysql_options(mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
||||||
|
#ifdef HAVE_SMEM
|
||||||
|
if (shared_memory_base_name)
|
||||||
|
mysql_options(mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
||||||
|
#endif
|
||||||
|
if (opt_plugin_dir && *opt_plugin_dir)
|
||||||
|
mysql_options(mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
||||||
|
|
||||||
|
if (opt_default_auth && *opt_default_auth)
|
||||||
|
mysql_options(mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
|
||||||
|
|
||||||
|
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
|
||||||
|
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
|
||||||
|
"program_name", "mysql");
|
||||||
|
return mysql_real_connect(mysql, host, user, password, database,
|
||||||
|
opt_mysql_port, opt_mysql_unix_port, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This function handles sigint calls
|
This function handles sigint calls
|
||||||
@@ -1365,11 +1403,7 @@ sig_handler handle_sigint(int sig)
|
|||||||
}
|
}
|
||||||
|
|
||||||
kill_mysql= mysql_init(kill_mysql);
|
kill_mysql= mysql_init(kill_mysql);
|
||||||
mysql_options(kill_mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
|
if (!do_connect(kill_mysql,current_host, current_user, opt_password, "", 0))
|
||||||
mysql_options4(kill_mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
|
|
||||||
"program_name", "mysql");
|
|
||||||
if (!mysql_real_connect(kill_mysql,current_host, current_user, opt_password,
|
|
||||||
"", opt_mysql_port, opt_mysql_unix_port,0))
|
|
||||||
{
|
{
|
||||||
tee_fprintf(stdout, "Ctrl-C -- sorry, cannot connect to server to kill query, giving up ...\n");
|
tee_fprintf(stdout, "Ctrl-C -- sorry, cannot connect to server to kill query, giving up ...\n");
|
||||||
goto err;
|
goto err;
|
||||||
@@ -4576,27 +4610,8 @@ sql_real_connect(char *host,char *database,char *user,char *password,
|
|||||||
}
|
}
|
||||||
if (opt_compress)
|
if (opt_compress)
|
||||||
mysql_options(&mysql,MYSQL_OPT_COMPRESS,NullS);
|
mysql_options(&mysql,MYSQL_OPT_COMPRESS,NullS);
|
||||||
if (opt_secure_auth)
|
|
||||||
mysql_options(&mysql, MYSQL_SECURE_AUTH, (char *) &opt_secure_auth);
|
|
||||||
if (using_opt_local_infile)
|
if (using_opt_local_infile)
|
||||||
mysql_options(&mysql,MYSQL_OPT_LOCAL_INFILE, (char*) &opt_local_infile);
|
mysql_options(&mysql,MYSQL_OPT_LOCAL_INFILE, (char*) &opt_local_infile);
|
||||||
#if defined(HAVE_OPENSSL) && !defined(EMBEDDED_LIBRARY)
|
|
||||||
if (opt_use_ssl)
|
|
||||||
{
|
|
||||||
mysql_ssl_set(&mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca,
|
|
||||||
opt_ssl_capath, opt_ssl_cipher);
|
|
||||||
mysql_options(&mysql, MYSQL_OPT_SSL_CRL, opt_ssl_crl);
|
|
||||||
mysql_options(&mysql, MYSQL_OPT_SSL_CRLPATH, opt_ssl_crlpath);
|
|
||||||
}
|
|
||||||
mysql_options(&mysql,MYSQL_OPT_SSL_VERIFY_SERVER_CERT,
|
|
||||||
(char*)&opt_ssl_verify_server_cert);
|
|
||||||
#endif
|
|
||||||
if (opt_protocol)
|
|
||||||
mysql_options(&mysql,MYSQL_OPT_PROTOCOL,(char*)&opt_protocol);
|
|
||||||
#ifdef HAVE_SMEM
|
|
||||||
if (shared_memory_base_name)
|
|
||||||
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
|
||||||
#endif
|
|
||||||
if (safe_updates)
|
if (safe_updates)
|
||||||
{
|
{
|
||||||
char init_command[100];
|
char init_command[100];
|
||||||
@@ -4608,18 +4623,8 @@ sql_real_connect(char *host,char *database,char *user,char *password,
|
|||||||
|
|
||||||
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||||
|
|
||||||
if (opt_plugin_dir && *opt_plugin_dir)
|
if (!do_connect(&mysql, host, user, password, database,
|
||||||
mysql_options(&mysql, MYSQL_PLUGIN_DIR, opt_plugin_dir);
|
connect_flag | CLIENT_MULTI_STATEMENTS))
|
||||||
|
|
||||||
if (opt_default_auth && *opt_default_auth)
|
|
||||||
mysql_options(&mysql, MYSQL_DEFAULT_AUTH, opt_default_auth);
|
|
||||||
|
|
||||||
mysql_options(&mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
|
|
||||||
mysql_options4(&mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
|
|
||||||
"program_name", "mysql");
|
|
||||||
if (!mysql_real_connect(&mysql, host, user, password,
|
|
||||||
database, opt_mysql_port, opt_mysql_unix_port,
|
|
||||||
connect_flag | CLIENT_MULTI_STATEMENTS))
|
|
||||||
{
|
{
|
||||||
if (!silent ||
|
if (!silent ||
|
||||||
(mysql_errno(&mysql) != CR_CONN_HOST_ERROR &&
|
(mysql_errno(&mysql) != CR_CONN_HOST_ERROR &&
|
||||||
|
@@ -184,7 +184,8 @@ static const char *load_default_groups[]=
|
|||||||
static void free_used_memory(void)
|
static void free_used_memory(void)
|
||||||
{
|
{
|
||||||
/* Free memory allocated by 'load_defaults' */
|
/* Free memory allocated by 'load_defaults' */
|
||||||
free_defaults(defaults_argv);
|
if (defaults_argv)
|
||||||
|
free_defaults(defaults_argv);
|
||||||
|
|
||||||
dynstr_free(&ds_args);
|
dynstr_free(&ds_args);
|
||||||
dynstr_free(&conn_args);
|
dynstr_free(&conn_args);
|
||||||
@@ -1110,7 +1111,6 @@ int main(int argc, char **argv)
|
|||||||
if (opt_systables_only && !opt_silent)
|
if (opt_systables_only && !opt_silent)
|
||||||
printf("The --upgrade-system-tables option was used, user tables won't be touched.\n");
|
printf("The --upgrade-system-tables option was used, user tables 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
|
||||||
already has been run for this installation of MySQL
|
already has been run for this installation of MySQL
|
||||||
|
@@ -86,6 +86,9 @@ 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
|
||||||
)
|
)
|
||||||
|
ELSE()
|
||||||
|
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/include/probes_mysql_nodtrace.h.in
|
||||||
|
${CMAKE_BINARY_DIR}/include/probes_mysql_nodtrace.h COPYONLY)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
FUNCTION(DTRACE_INSTRUMENT target)
|
FUNCTION(DTRACE_INSTRUMENT target)
|
||||||
|
@@ -3,20 +3,6 @@ INCLUDE (CheckLibraryExists)
|
|||||||
SET(WITH_JEMALLOC auto CACHE STRING
|
SET(WITH_JEMALLOC auto CACHE STRING
|
||||||
"Build with jemalloc. Possible values are 'yes', 'no', 'static', 'auto'")
|
"Build with jemalloc. Possible values are 'yes', 'no', 'static', 'auto'")
|
||||||
|
|
||||||
MACRO(JEMALLOC_TRY_STATIC)
|
|
||||||
SET(libname jemalloc_pic)
|
|
||||||
SET(CMAKE_REQUIRED_LIBRARIES pthread dl m)
|
|
||||||
SET(what bundled)
|
|
||||||
CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_STATIC_JEMALLOC)
|
|
||||||
SET(CMAKE_REQUIRED_LIBRARIES)
|
|
||||||
ENDMACRO()
|
|
||||||
|
|
||||||
MACRO(JEMALLOC_TRY_DYNAMIC)
|
|
||||||
SET(libname jemalloc)
|
|
||||||
SET(what system)
|
|
||||||
CHECK_LIBRARY_EXISTS(${libname} malloc_stats_print "" HAVE_DYNAMIC_JEMALLOC)
|
|
||||||
ENDMACRO()
|
|
||||||
|
|
||||||
MACRO (CHECK_JEMALLOC)
|
MACRO (CHECK_JEMALLOC)
|
||||||
# compatibility with old WITH_JEMALLOC values
|
# compatibility with old WITH_JEMALLOC values
|
||||||
IF(WITH_JEMALLOC STREQUAL "bundled")
|
IF(WITH_JEMALLOC STREQUAL "bundled")
|
||||||
@@ -26,21 +12,30 @@ MACRO (CHECK_JEMALLOC)
|
|||||||
SET(WITH_JEMALLOC "yes")
|
SET(WITH_JEMALLOC "yes")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF (WITH_JEMALLOC STREQUAL "yes" OR WITH_JEMALLOC STREQUAL "auto")
|
IF(WITH_JEMALLOC STREQUAL "yes" OR WITH_JEMALLOC STREQUAL "auto" OR
|
||||||
JEMALLOC_TRY_DYNAMIC()
|
WITH_JEMALLOC STREQUAL "static")
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
IF (WITH_JEMALLOC STREQUAL "static" OR WITH_JEMALLOC STREQUAL "auto"
|
IF(WITH_JEMALLOC STREQUAL "static")
|
||||||
AND NOT HAVE_DYNAMIC_JEMALLOC)
|
SET(libname jemalloc_pic)
|
||||||
JEMALLOC_TRY_STATIC()
|
SET(CMAKE_REQUIRED_LIBRARIES pthread dl m)
|
||||||
ENDIF()
|
SET(what bundled)
|
||||||
|
ELSE()
|
||||||
|
SET(libname jemalloc c)
|
||||||
|
SET(what system)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF (libname)
|
FOREACH(lib ${libname})
|
||||||
IF (HAVE_DYNAMIC_JEMALLOC OR HAVE_STATIC_JEMALLOC)
|
CHECK_LIBRARY_EXISTS(${lib} malloc_stats_print "" HAVE_JEMALLOC_IN_${lib})
|
||||||
SET(LIBJEMALLOC ${libname})
|
IF (HAVE_JEMALLOC_IN_${lib})
|
||||||
SET(MALLOC_LIBRARY "${what} jemalloc")
|
SET(LIBJEMALLOC ${lib})
|
||||||
ELSEIF (NOT WITH_JEMALLOC STREQUAL "auto")
|
SET(MALLOC_LIBRARY "${what} jemalloc")
|
||||||
MESSAGE(FATAL_ERROR "${libname} is not found")
|
BREAK()
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
SET(CMAKE_REQUIRED_LIBRARIES)
|
||||||
|
|
||||||
|
IF (NOT LIBJEMALLOC AND NOT WITH_JEMALLOC STREQUAL "auto")
|
||||||
|
MESSAGE(FATAL_ERROR "jemalloc is not found")
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ENDMACRO()
|
ENDMACRO()
|
||||||
|
@@ -26,7 +26,7 @@ ENDIF()
|
|||||||
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
|
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ${with_wsrep_default})
|
||||||
|
|
||||||
# Set the patch version
|
# Set the patch version
|
||||||
SET(WSREP_PATCH_VERSION "11")
|
SET(WSREP_PATCH_VERSION "13")
|
||||||
|
|
||||||
# Obtain wsrep API version
|
# Obtain wsrep API version
|
||||||
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
|
FILE(STRINGS "${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h" WSREP_API_VERSION
|
||||||
|
@@ -799,16 +799,36 @@ ENDIF()
|
|||||||
#
|
#
|
||||||
# Test for how the C compiler does inline, if at all
|
# Test for how the C compiler does inline, if at all
|
||||||
#
|
#
|
||||||
|
# SunPro is weird, apparently it only supports inline at -xO3 or -xO4.
|
||||||
|
# And if CMAKE_C_FLAGS has -xO4 but CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} has -xO2
|
||||||
|
# then CHECK_C_SOURCE_COMPILES will succeed but the built will fail.
|
||||||
|
# We must test all flags here.
|
||||||
|
# XXX actually, we can do this for all compilers, not only SunPro
|
||||||
|
IF (CMAKE_CXX_COMPILER_ID MATCHES "SunPro" AND
|
||||||
|
CMAKE_GENERATOR MATCHES "Makefiles")
|
||||||
|
STRING(TOUPPER "CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}" flags)
|
||||||
|
SET(CMAKE_REQUIRED_FLAGS "${${flags}}")
|
||||||
|
ENDIF()
|
||||||
CHECK_C_SOURCE_COMPILES("
|
CHECK_C_SOURCE_COMPILES("
|
||||||
static inline int foo(){return 0;}
|
extern int bar(int x);
|
||||||
|
static inline int foo(){return bar(1);}
|
||||||
int main(int argc, char *argv[]){return 0;}"
|
int main(int argc, char *argv[]){return 0;}"
|
||||||
C_HAS_inline)
|
C_HAS_inline)
|
||||||
IF(NOT C_HAS_inline)
|
IF(NOT C_HAS_inline)
|
||||||
CHECK_C_SOURCE_COMPILES("
|
CHECK_C_SOURCE_COMPILES("
|
||||||
static __inline int foo(){return 0;}
|
extern int bar(int x);
|
||||||
|
static __inline int foo(){return bar(1);}
|
||||||
int main(int argc, char *argv[]){return 0;}"
|
int main(int argc, char *argv[]){return 0;}"
|
||||||
C_HAS___inline)
|
C_HAS___inline)
|
||||||
SET(C_INLINE __inline)
|
IF(C_HAS___inline)
|
||||||
|
SET(C_INLINE __inline)
|
||||||
|
ElSE()
|
||||||
|
SET(C_INLINE)
|
||||||
|
MESSAGE(WARNING "C compiler does not support funcion inlining")
|
||||||
|
IF(NOT NOINLINE)
|
||||||
|
MESSAGE(FATAL_ERROR "Use -DNOINLINE=TRUE to allow compilation without inlining")
|
||||||
|
ENDIF()
|
||||||
|
ENDIF()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
|
IF(NOT CMAKE_CROSSCOMPILING AND NOT MSVC)
|
||||||
|
@@ -12,6 +12,17 @@ before calling SSL_new();
|
|||||||
|
|
||||||
*** end Note ***
|
*** end Note ***
|
||||||
|
|
||||||
|
yaSSL Release notes, version 2.3.9 (12/01/2015)
|
||||||
|
This release of yaSSL fixes two client side Diffie-Hellman problems.
|
||||||
|
yaSSL was only handling the cases of zero or one leading zeros for the key
|
||||||
|
agreement instead of potentially any number. This caused about 1 in 50,000
|
||||||
|
connections to fail when using DHE cipher suites. The second problem was
|
||||||
|
the case where a server would send a public value shorter than the prime
|
||||||
|
value, causing about 1 in 128 client connections to fail, and also
|
||||||
|
caused the yaSSL client to read off the end of memory. All client side
|
||||||
|
DHE cipher suite users should update.
|
||||||
|
Thanks to Adam Langely (agl@imperialviolet.org) for the detailed report!
|
||||||
|
|
||||||
yaSSL Release notes, version 2.3.8 (9/17/2015)
|
yaSSL Release notes, version 2.3.8 (9/17/2015)
|
||||||
This release of yaSSL fixes a high security vulnerability. All users
|
This release of yaSSL fixes a high security vulnerability. All users
|
||||||
SHOULD update. If using yaSSL for TLS on the server side with private
|
SHOULD update. If using yaSSL for TLS on the server side with private
|
||||||
|
@@ -378,6 +378,7 @@ public:
|
|||||||
|
|
||||||
uint get_agreedKeyLength() const;
|
uint get_agreedKeyLength() const;
|
||||||
const byte* get_agreedKey() const;
|
const byte* get_agreedKey() const;
|
||||||
|
uint get_publicKeyLength() const;
|
||||||
const byte* get_publicKey() const;
|
const byte* get_publicKey() const;
|
||||||
void makeAgreement(const byte*, unsigned int);
|
void makeAgreement(const byte*, unsigned int);
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
#include "rsa.h"
|
#include "rsa.h"
|
||||||
|
|
||||||
|
|
||||||
#define YASSL_VERSION "2.3.8"
|
#define YASSL_VERSION "2.3.9"
|
||||||
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
|
@@ -751,9 +751,10 @@ struct DiffieHellman::DHImpl {
|
|||||||
byte* publicKey_;
|
byte* publicKey_;
|
||||||
byte* privateKey_;
|
byte* privateKey_;
|
||||||
byte* agreedKey_;
|
byte* agreedKey_;
|
||||||
|
uint pubKeyLength_;
|
||||||
|
|
||||||
DHImpl(TaoCrypt::RandomNumberGenerator& r) : ranPool_(r), publicKey_(0),
|
DHImpl(TaoCrypt::RandomNumberGenerator& r) : ranPool_(r), publicKey_(0),
|
||||||
privateKey_(0), agreedKey_(0) {}
|
privateKey_(0), agreedKey_(0), pubKeyLength_(0) {}
|
||||||
~DHImpl()
|
~DHImpl()
|
||||||
{
|
{
|
||||||
ysArrayDelete(agreedKey_);
|
ysArrayDelete(agreedKey_);
|
||||||
@@ -762,7 +763,7 @@ struct DiffieHellman::DHImpl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
DHImpl(const DHImpl& that) : dh_(that.dh_), ranPool_(that.ranPool_),
|
DHImpl(const DHImpl& that) : dh_(that.dh_), ranPool_(that.ranPool_),
|
||||||
publicKey_(0), privateKey_(0), agreedKey_(0)
|
publicKey_(0), privateKey_(0), agreedKey_(0), pubKeyLength_(0)
|
||||||
{
|
{
|
||||||
uint length = dh_.GetByteLength();
|
uint length = dh_.GetByteLength();
|
||||||
AllocKeys(length, length, length);
|
AllocKeys(length, length, length);
|
||||||
@@ -810,7 +811,7 @@ DiffieHellman::DiffieHellman(const byte* p, unsigned int pSz, const byte* g,
|
|||||||
using TaoCrypt::Integer;
|
using TaoCrypt::Integer;
|
||||||
|
|
||||||
pimpl_->dh_.Initialize(Integer(p, pSz).Ref(), Integer(g, gSz).Ref());
|
pimpl_->dh_.Initialize(Integer(p, pSz).Ref(), Integer(g, gSz).Ref());
|
||||||
pimpl_->publicKey_ = NEW_YS opaque[pubSz];
|
pimpl_->publicKey_ = NEW_YS opaque[pimpl_->pubKeyLength_ = pubSz];
|
||||||
memcpy(pimpl_->publicKey_, pub, pubSz);
|
memcpy(pimpl_->publicKey_, pub, pubSz);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -869,6 +870,10 @@ const byte* DiffieHellman::get_agreedKey() const
|
|||||||
return pimpl_->agreedKey_;
|
return pimpl_->agreedKey_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint DiffieHellman::get_publicKeyLength() const
|
||||||
|
{
|
||||||
|
return pimpl_->pubKeyLength_;
|
||||||
|
}
|
||||||
|
|
||||||
const byte* DiffieHellman::get_publicKey() const
|
const byte* DiffieHellman::get_publicKey() const
|
||||||
{
|
{
|
||||||
|
@@ -109,15 +109,12 @@ void ClientDiffieHellmanPublic::build(SSL& ssl)
|
|||||||
uint keyLength = dhClient.get_agreedKeyLength(); // pub and agree same
|
uint keyLength = dhClient.get_agreedKeyLength(); // pub and agree same
|
||||||
|
|
||||||
alloc(keyLength, true);
|
alloc(keyLength, true);
|
||||||
dhClient.makeAgreement(dhServer.get_publicKey(), keyLength);
|
dhClient.makeAgreement(dhServer.get_publicKey(),
|
||||||
|
dhServer.get_publicKeyLength());
|
||||||
c16toa(keyLength, Yc_);
|
c16toa(keyLength, Yc_);
|
||||||
memcpy(Yc_ + KEY_OFFSET, dhClient.get_publicKey(), keyLength);
|
memcpy(Yc_ + KEY_OFFSET, dhClient.get_publicKey(), keyLength);
|
||||||
|
|
||||||
// because of encoding first byte might be zero, don't use it for preMaster
|
ssl.set_preMaster(dhClient.get_agreedKey(), keyLength);
|
||||||
if (*dhClient.get_agreedKey() == 0)
|
|
||||||
ssl.set_preMaster(dhClient.get_agreedKey() + 1, keyLength - 1);
|
|
||||||
else
|
|
||||||
ssl.set_preMaster(dhClient.get_agreedKey(), keyLength);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -321,11 +318,7 @@ void ClientDiffieHellmanPublic::read(SSL& ssl, input_buffer& input)
|
|||||||
}
|
}
|
||||||
dh.makeAgreement(Yc_, keyLength);
|
dh.makeAgreement(Yc_, keyLength);
|
||||||
|
|
||||||
// because of encoding, first byte might be 0, don't use for preMaster
|
ssl.set_preMaster(dh.get_agreedKey(), dh.get_agreedKeyLength());
|
||||||
if (*dh.get_agreedKey() == 0)
|
|
||||||
ssl.set_preMaster(dh.get_agreedKey() + 1, dh.get_agreedKeyLength() - 1);
|
|
||||||
else
|
|
||||||
ssl.set_preMaster(dh.get_agreedKey(), dh.get_agreedKeyLength());
|
|
||||||
ssl.makeMasterSecret();
|
ssl.makeMasterSecret();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -807,6 +807,19 @@ void SSL::set_random(const opaque* random, ConnectionEnd sender)
|
|||||||
// store client pre master secret
|
// store client pre master secret
|
||||||
void SSL::set_preMaster(const opaque* pre, uint sz)
|
void SSL::set_preMaster(const opaque* pre, uint sz)
|
||||||
{
|
{
|
||||||
|
uint i(0); // trim leading zeros
|
||||||
|
uint fullSz(sz);
|
||||||
|
|
||||||
|
while (i++ < fullSz && *pre == 0) {
|
||||||
|
sz--;
|
||||||
|
pre++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (sz == 0) {
|
||||||
|
SetError(bad_input);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
secure_.use_connection().AllocPreSecret(sz);
|
secure_.use_connection().AllocPreSecret(sz);
|
||||||
memcpy(secure_.use_connection().pre_master_secret_, pre, sz);
|
memcpy(secure_.use_connection().pre_master_secret_, pre, sz);
|
||||||
}
|
}
|
||||||
@@ -924,6 +937,8 @@ void SSL::order_error()
|
|||||||
// Create and store the master secret see page 32, 6.1
|
// Create and store the master secret see page 32, 6.1
|
||||||
void SSL::makeMasterSecret()
|
void SSL::makeMasterSecret()
|
||||||
{
|
{
|
||||||
|
if (GetError()) return;
|
||||||
|
|
||||||
if (isTLS())
|
if (isTLS())
|
||||||
makeTLSMasterSecret();
|
makeTLSMasterSecret();
|
||||||
else {
|
else {
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
Attention: Please, note, uint3korr reads 4 bytes (not 3)!
|
Attention: Please, note, uint3korr reads 4 bytes (not 3)!
|
||||||
It means, that you have to provide enough allocated space.
|
It means, that you have to provide enough allocated space.
|
||||||
*/
|
*/
|
||||||
#if defined(HAVE_purify) && !defined(_WIN32)
|
#if defined(HAVE_valgrind) && !defined(_WIN32)
|
||||||
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
|
#define uint3korr(A) (uint32) (((uint32) ((uchar) (A)[0])) +\
|
||||||
(((uint32) ((uchar) (A)[1])) << 8) +\
|
(((uint32) ((uchar) (A)[1])) << 8) +\
|
||||||
(((uint32) ((uchar) (A)[2])) << 16))
|
(((uint32) ((uchar) (A)[2])) << 16))
|
||||||
|
@@ -200,20 +200,6 @@
|
|||||||
#define likely(x) __builtin_expect(((x) != 0),1)
|
#define likely(x) __builtin_expect(((x) != 0),1)
|
||||||
#define unlikely(x) __builtin_expect(((x) != 0),0)
|
#define unlikely(x) __builtin_expect(((x) != 0),0)
|
||||||
|
|
||||||
/*
|
|
||||||
now let's figure out if inline functions are supported
|
|
||||||
autoconf defines 'inline' to be empty, if not
|
|
||||||
*/
|
|
||||||
#define inline_test_1(X) X ## 1
|
|
||||||
#define inline_test_2(X) inline_test_1(X)
|
|
||||||
#if inline_test_2(inline) != 1
|
|
||||||
#define HAVE_INLINE
|
|
||||||
#else
|
|
||||||
#error Compiler does not support inline!
|
|
||||||
#endif
|
|
||||||
#undef inline_test_2
|
|
||||||
#undef inline_test_1
|
|
||||||
|
|
||||||
/* Fix problem with S_ISLNK() on Linux */
|
/* Fix problem with S_ISLNK() on Linux */
|
||||||
#if defined(TARGET_OS_LINUX) || defined(__GLIBC__)
|
#if defined(TARGET_OS_LINUX) || defined(__GLIBC__)
|
||||||
#undef _GNU_SOURCE
|
#undef _GNU_SOURCE
|
||||||
@@ -454,7 +440,7 @@ extern "C" int madvise(void *addr, size_t len, int behav);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef STDERR_FILENO
|
#ifndef STDERR_FILENO
|
||||||
#define STDERR_FILENO 2
|
#define STDERR_FILENO fileno(stderr)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SO_EXT
|
#ifndef SO_EXT
|
||||||
@@ -825,6 +811,9 @@ inline unsigned long long my_double2ulonglong(double d)
|
|||||||
#else
|
#else
|
||||||
#define finite(x) (1.0 / fabs(x) > 0.0)
|
#define finite(x) (1.0 / fabs(x) > 0.0)
|
||||||
#endif /* HAVE_FINITE */
|
#endif /* HAVE_FINITE */
|
||||||
|
#elif (__cplusplus >= 201103L)
|
||||||
|
#include <cmath>
|
||||||
|
static inline bool isfinite(double x) { return std::isfinite(x); }
|
||||||
#endif /* isfinite */
|
#endif /* isfinite */
|
||||||
|
|
||||||
#ifndef HAVE_ISNAN
|
#ifndef HAVE_ISNAN
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/* Copyright (c) 2011, 2015, Oracle and/or its affiliates.
|
/* Copyright (c) 2011, 2016, Oracle and/or its affiliates.
|
||||||
Copyright (c) 2011, 2015, MariaDB
|
Copyright (c) 2011, 2016, MariaDB
|
||||||
|
|
||||||
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
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
#ifndef _welcome_copyright_notice_h_
|
#ifndef _welcome_copyright_notice_h_
|
||||||
#define _welcome_copyright_notice_h_
|
#define _welcome_copyright_notice_h_
|
||||||
|
|
||||||
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2015"
|
#define COPYRIGHT_NOTICE_CURRENT_YEAR "2016"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This define specifies copyright notice which is displayed by every MySQL
|
This define specifies copyright notice which is displayed by every MySQL
|
||||||
|
@@ -31,6 +31,14 @@
|
|||||||
if (WSREP_ON && (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER))) \
|
if (WSREP_ON && (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER))) \
|
||||||
wsrep_to_isolation_end(thd);
|
wsrep_to_isolation_end(thd);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Checks if lex->no_write_to_binlog is set for statements that use LOCAL or
|
||||||
|
NO_WRITE_TO_BINLOG.
|
||||||
|
*/
|
||||||
|
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_) \
|
||||||
|
if (WSREP(thd) && !thd->lex->no_write_to_binlog \
|
||||||
|
&& wsrep_to_isolation_begin(thd, db_, table_, table_list_)) goto error;
|
||||||
|
|
||||||
#define WSREP_DEBUG(...) \
|
#define WSREP_DEBUG(...) \
|
||||||
if (wsrep_debug) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
|
if (wsrep_debug) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
|
||||||
#define WSREP_INFO(...) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
|
#define WSREP_INFO(...) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
|
||||||
@@ -46,6 +54,7 @@
|
|||||||
#define WSREP_ERROR(...)
|
#define WSREP_ERROR(...)
|
||||||
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
|
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
|
||||||
#define WSREP_TO_ISOLATION_END
|
#define WSREP_TO_ISOLATION_END
|
||||||
|
#define WSREP_TO_ISOLATION_BEGIN_WRTCHK(db_, table_, table_list_)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* WSERP_INCLUDED */
|
#endif /* WSERP_INCLUDED */
|
||||||
|
1
mysql-test/include/galera_clear_sync_point.inc
Normal file
1
mysql-test/include/galera_clear_sync_point.inc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
SET GLOBAL wsrep_provider_options = 'dbug=';
|
1
mysql-test/include/galera_set_sync_point.inc
Normal file
1
mysql-test/include/galera_set_sync_point.inc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
--eval SET GLOBAL wsrep_provider_options = 'dbug=d,$galera_sync_point'
|
1
mysql-test/include/galera_signal_sync_point.inc
Normal file
1
mysql-test/include/galera_signal_sync_point.inc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
--eval SET GLOBAL wsrep_provider_options = 'signal=$galera_sync_point'
|
6
mysql-test/include/galera_wait_sync_point.inc
Normal file
6
mysql-test/include/galera_wait_sync_point.inc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
--let $wait_timeout = 10
|
||||||
|
--let $wsrep_on_orig = `SELECT @@wsrep_on`
|
||||||
|
SET SESSION wsrep_on = 0;
|
||||||
|
--let $wait_condition = SELECT 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters' AND VARIABLE_VALUE = '$galera_sync_point'
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
--eval SET SESSION wsrep_on = $wsrep_on_orig
|
@@ -40,6 +40,11 @@ BEGIN
|
|||||||
-- except those that was created during bootstrap
|
-- except those that was created during bootstrap
|
||||||
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA;
|
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA;
|
||||||
|
|
||||||
|
-- and the mtr_wsrep_notify schema which is populated by the std_data/wsrep_notify.sh script
|
||||||
|
-- and the suite/galera/t/galera_var_notify_cmd.test
|
||||||
|
-- and the wsrep_schema schema that may be created by Galera
|
||||||
|
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema');
|
||||||
|
|
||||||
-- The test database should not contain any tables
|
-- The test database should not contain any tables
|
||||||
SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES
|
SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES
|
||||||
WHERE table_schema='test';
|
WHERE table_schema='test';
|
||||||
|
@@ -496,6 +496,7 @@ sub process_suite {
|
|||||||
|
|
||||||
# disabled.def
|
# disabled.def
|
||||||
parse_disabled($suite->{dir} .'/disabled.def', $suitename);
|
parse_disabled($suite->{dir} .'/disabled.def', $suitename);
|
||||||
|
parse_disabled($suite->{dir} .'/t/disabled.def', $suitename);
|
||||||
|
|
||||||
# combinations
|
# combinations
|
||||||
if (@::opt_combinations)
|
if (@::opt_combinations)
|
||||||
|
@@ -2,15 +2,9 @@ drop table if exists t1,t2,t3;
|
|||||||
create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
|
create table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
|
||||||
insert into t1 (a) values (1),(2),(3);
|
insert into t1 (a) values (1),(2),(3);
|
||||||
alter online table t1 modify b int default 5;
|
alter online table t1 modify b int default 5;
|
||||||
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
|
||||||
alter online table t1 change b new_name int;
|
alter online table t1 change b new_name int;
|
||||||
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
|
||||||
alter online table t1 modify e enum('a','b','c');
|
alter online table t1 modify e enum('a','b','c');
|
||||||
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
|
||||||
alter online table t1 comment "new comment";
|
alter online table t1 comment "new comment";
|
||||||
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
|
||||||
alter online table t1 rename to t2;
|
|
||||||
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
|
||||||
alter online table t1 algorithm=INPLACE, lock=NONE;
|
alter online table t1 algorithm=INPLACE, lock=NONE;
|
||||||
alter online table t1;
|
alter online table t1;
|
||||||
alter table t1 algorithm=INPLACE;
|
alter table t1 algorithm=INPLACE;
|
||||||
@@ -40,10 +34,13 @@ alter online table t1 add f int;
|
|||||||
ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED.
|
ERROR 0A000: LOCK=NONE is not supported for this operation. Try LOCK=SHARED.
|
||||||
alter online table t1 engine=memory;
|
alter online table t1 engine=memory;
|
||||||
ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED.
|
ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED.
|
||||||
|
alter online table t1 rename to t2;
|
||||||
|
ERROR 0A000: LOCK=NONE/SHARED is not supported for this operation. Try LOCK=EXCLUSIVE.
|
||||||
alter table t1 engine=innodb;
|
alter table t1 engine=innodb;
|
||||||
alter table t1 add index (b);
|
alter table t1 add index (b);
|
||||||
alter online table t1 add index c (c);
|
alter online table t1 add index c (c);
|
||||||
alter online table t1 drop index b;
|
alter online table t1 drop index b;
|
||||||
|
alter online table t1 comment "new comment";
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
|
create temporary table t1 (a int not null primary key, b int, c varchar(80), e enum('a','b'));
|
||||||
insert into t1 (a) values (1),(2),(3);
|
insert into t1 (a) values (1),(2),(3);
|
||||||
|
@@ -1,15 +1,13 @@
|
|||||||
SHOW CONTRIBUTORS;
|
SHOW CONTRIBUTORS;
|
||||||
Name Location Comment
|
Name Location Comment
|
||||||
Booking.com http://www.booking.com Founding member of the MariaDB foundation
|
Booking.com http://www.booking.com Founding member of the MariaDB Foundation
|
||||||
SkySQL Ab http://www.skysql.com Founding member of the MariaDB foundation
|
MariaDB Corporation https://mariadb.com Founding member of the MariaDB Foundation
|
||||||
Auttomatic http://automattic.com Member of the MariaDB foundation
|
Auttomattic http://automattic.com Member of the MariaDB Foundation
|
||||||
Parallels http://www.parallels.com/products/plesk Founding member of the MariaDB foundation
|
Parallels http://www.parallels.com/products/plesk Founding member of the MariaDB Foundation
|
||||||
Verkkokauppa.com Finland Sponsor of the MariaDB foundation
|
Acronis http://www.acronis.com Member of the MariaDB Foundation
|
||||||
Webyog Bangalor Sponsor of the MariaDB foundation
|
Verkkokauppa.com Finland Sponsor of the MariaDB Foundation
|
||||||
Percona USA Sponsor of the MariaDB foundation
|
Webyog Bangalore Sponsor of the MariaDB Foundation
|
||||||
Jelastic.com Russia Sponsor of the MariaDB foundation
|
Wikimedia Foundation USA Sponsor of the MariaDB Foundation
|
||||||
Planetta.net Finland Sponsor of the MariaDB foundation
|
|
||||||
Open query Australia Sponsor of the MariaDB foundation
|
|
||||||
Google USA Sponsoring parallel replication and GTID
|
Google USA Sponsoring parallel replication and GTID
|
||||||
Facebook USA Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc
|
Facebook USA Sponsoring non-blocking API, LIMIT ROWS EXAMINED etc
|
||||||
Ronald Bradford Brisbane, Australia EFF contribution for UC2006 Auction
|
Ronald Bradford Brisbane, Australia EFF contribution for UC2006 Auction
|
||||||
|
@@ -1889,5 +1889,21 @@ Warnings:
|
|||||||
Note 1291 Column 'a' has duplicated value '' in ENUM
|
Note 1291 Column 'a' has duplicated value '' in ENUM
|
||||||
drop table t1;
|
drop table t1;
|
||||||
set @@session.collation_server=default;
|
set @@session.collation_server=default;
|
||||||
|
#
|
||||||
|
# MDEV-7765: Crash (Assertion `!table || (!table->write_set ||
|
||||||
|
# bitmap_is_set(table->write_set, field_index) ||
|
||||||
|
# bitmap_is_set(table->vcol_set, field_index))' fails)
|
||||||
|
# on using function over not created table
|
||||||
|
#
|
||||||
|
CREATE function f1() returns int
|
||||||
|
BEGIN
|
||||||
|
declare n int;
|
||||||
|
set n:= (select count(*) from t1);
|
||||||
|
return n;
|
||||||
|
end|
|
||||||
|
create table t1 as select f1();
|
||||||
|
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||||
|
drop function f1;
|
||||||
|
End of 5.5 tests
|
||||||
create table t1;
|
create table t1;
|
||||||
ERROR 42000: A table must have at least 1 column
|
ERROR 42000: A table must have at least 1 column
|
||||||
|
@@ -116,7 +116,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
||||||
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
||||||
this is a test
|
this is test
|
||||||
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
|
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
|
||||||
insert("aa",100,1,"b") insert("aa",1,3,"b")
|
insert("aa",100,1,"b") insert("aa",1,3,"b")
|
||||||
aa b
|
aa b
|
||||||
@@ -5371,11 +5371,10 @@ SET sql_mode=default;
|
|||||||
SET NAMES utf8;
|
SET NAMES utf8;
|
||||||
CREATE TABLE t1 (a INT);
|
CREATE TABLE t1 (a INT);
|
||||||
INSERT INTO t1 VALUES (0), (0), (1), (0), (0);
|
INSERT INTO t1 VALUES (0), (0), (1), (0), (0);
|
||||||
SELECT COUNT(*) FROM t1, t1 t2
|
SELECT COUNT(*) FROM t1, t1 t2
|
||||||
GROUP BY INSERT('', t2.a, t1.a, (@@global.max_binlog_size));
|
GROUP BY INSERT('', t2.a, t1.a, (@@global.max_binlog_size));
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
20
|
25
|
||||||
5
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# Bug#11764503 (Bug#57341) Query in EXPLAIN EXTENDED shows wrong characters
|
# Bug#11764503 (Bug#57341) Query in EXPLAIN EXTENDED shows wrong characters
|
||||||
|
@@ -116,7 +116,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
||||||
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
||||||
this is a test
|
this is test
|
||||||
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
|
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
|
||||||
insert("aa",100,1,"b") insert("aa",1,3,"b")
|
insert("aa",100,1,"b") insert("aa",1,3,"b")
|
||||||
aa b
|
aa b
|
||||||
|
@@ -116,7 +116,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
||||||
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
||||||
this is a test
|
this is test
|
||||||
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
|
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
|
||||||
insert("aa",100,1,"b") insert("aa",1,3,"b")
|
insert("aa",100,1,"b") insert("aa",1,3,"b")
|
||||||
aa b
|
aa b
|
||||||
|
@@ -116,7 +116,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
||||||
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
||||||
this is a test
|
this is test
|
||||||
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
|
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
|
||||||
insert("aa",100,1,"b") insert("aa",1,3,"b")
|
insert("aa",100,1,"b") insert("aa",1,3,"b")
|
||||||
aa b
|
aa b
|
||||||
|
@@ -116,7 +116,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
||||||
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
||||||
this is a test
|
this is test
|
||||||
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
|
select insert("aa",100,1,"b"),insert("aa",1,3,"b");
|
||||||
insert("aa",100,1,"b") insert("aa",1,3,"b")
|
insert("aa",100,1,"b") insert("aa",1,3,"b")
|
||||||
aa b
|
aa b
|
||||||
|
@@ -603,6 +603,351 @@ select x.id, message from (select id from t1) x left join
|
|||||||
where coalesce(message,0) <> 0;
|
where coalesce(message,0) <> 0;
|
||||||
id message
|
id message
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
#
|
||||||
|
# MDEV-7827: Assertion `!table || (!table->read_set ||
|
||||||
|
# bitmap_is_set(table->read_set, field_index))' failed
|
||||||
|
# in Field_long::val_str on EXPLAIN EXTENDED
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (f1 INT, f2 INT, KEY(f2)) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES (6,9);
|
||||||
|
CREATE TABLE t2 (f3 INT) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t2 VALUES (2),(0);
|
||||||
|
EXPLAIN EXTENDED
|
||||||
|
SELECT f1 FROM ( SELECT * FROM t1 ) AS sq
|
||||||
|
WHERE f1 IN (
|
||||||
|
SELECT f3 FROM t2 WHERE f2 IN (
|
||||||
|
SELECT f3 FROM t2 HAVING f3 >= 8
|
||||||
|
)
|
||||||
|
);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00
|
||||||
|
1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 sq.f2 1 100.00
|
||||||
|
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where; FirstMatch(<subquery4>); Using join buffer (flat, BNL join)
|
||||||
|
4 MATERIALIZED t2 ALL NULL NULL NULL NULL 2 100.00
|
||||||
|
2 DERIVED t1 system NULL NULL NULL NULL 1 100.00
|
||||||
|
Warnings:
|
||||||
|
Note 1276 Field or reference 'sq.f2' of SELECT #3 was resolved in SELECT #1
|
||||||
|
Note 1003 select 6 AS `f1` from <materialize> (select `test`.`t2`.`f3` from `test`.`t2` having (`test`.`t2`.`f3` >= 8)) semi join (`test`.`t2`) where ((`test`.`t2`.`f3` = 6) and (9 = `<subquery4>`.`f3`))
|
||||||
|
DROP TABLE t2,t1;
|
||||||
|
#
|
||||||
|
# MDEV-9462: Out of memory using explain on 2 empty tables
|
||||||
|
#
|
||||||
|
CREATE TABLE `t1` (
|
||||||
|
`REC_GROUP` char(2) DEFAULT NULL,
|
||||||
|
`CLIENT_INFO` text CHARACTER SET utf8,
|
||||||
|
`NAME` text,
|
||||||
|
`PHONE_NUMBER` text,
|
||||||
|
`ATTENTION_NAME` text,
|
||||||
|
`PAYMENT_TERM` text CHARACTER SET utf8,
|
||||||
|
`CREDIT_LIMIT` decimal(12,2) DEFAULT NULL,
|
||||||
|
`LAST_PAY_DATE` text CHARACTER SET utf8,
|
||||||
|
`TOTAL` double DEFAULT NULL,
|
||||||
|
`TOTAL_MCL` double DEFAULT NULL,
|
||||||
|
`TOTAL_MFS` double DEFAULT NULL,
|
||||||
|
`TOTAL_MIS` double DEFAULT NULL,
|
||||||
|
`BEFORE_DUE_7_MCL` double DEFAULT NULL,
|
||||||
|
`BEFORE_DUE_7_MFS` double DEFAULT NULL,
|
||||||
|
`BEFORE_DUE_7_MIS` double DEFAULT NULL,
|
||||||
|
`PER1_MCL` double DEFAULT NULL,
|
||||||
|
`PER1_MFS` double DEFAULT NULL,
|
||||||
|
`PER1_MIS` double DEFAULT NULL,
|
||||||
|
`PER2_MCL` double DEFAULT NULL,
|
||||||
|
`PER2_MFS` double DEFAULT NULL,
|
||||||
|
`PER2_MIS` double DEFAULT NULL,
|
||||||
|
`PER3_MCL` double DEFAULT NULL,
|
||||||
|
`PER3_MFS` double DEFAULT NULL,
|
||||||
|
`PER3_MIS` double DEFAULT NULL,
|
||||||
|
`PER4_MCL` double DEFAULT NULL,
|
||||||
|
`PER4_MFS` double DEFAULT NULL,
|
||||||
|
`PER4_MIS` double DEFAULT NULL,
|
||||||
|
`PER5_MCL` double DEFAULT NULL,
|
||||||
|
`PER5_MFS` double DEFAULT NULL,
|
||||||
|
`PER5_MIS` double DEFAULT NULL,
|
||||||
|
`PER6_MCL` double DEFAULT NULL,
|
||||||
|
`PER6_MFS` double DEFAULT NULL,
|
||||||
|
`PER6_MIS` double DEFAULT NULL,
|
||||||
|
`PER7_MCL` double DEFAULT NULL,
|
||||||
|
`PER7_MFS` double DEFAULT NULL,
|
||||||
|
`PER7_MIS` double DEFAULT NULL,
|
||||||
|
`BEFORE_DUE_7` double DEFAULT NULL,
|
||||||
|
`PER1` double DEFAULT NULL,
|
||||||
|
`PER2` double DEFAULT NULL,
|
||||||
|
`PER3` double DEFAULT NULL,
|
||||||
|
`PER4` double DEFAULT NULL,
|
||||||
|
`PER5` double DEFAULT NULL,
|
||||||
|
`PER6` double DEFAULT NULL,
|
||||||
|
`PER7` double DEFAULT NULL,
|
||||||
|
`REF` varchar(30) DEFAULT NULL,
|
||||||
|
`TYPE` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
|
||||||
|
);
|
||||||
|
CREATE TABLE `t2` (
|
||||||
|
`RECEIVABLE_GROUP` char(2) DEFAULT NULL,
|
||||||
|
`CLIENT_NUMBER` varchar(35) DEFAULT NULL,
|
||||||
|
`CLIENT_NAME` varchar(73) DEFAULT NULL,
|
||||||
|
`PHONE_NUMBER` char(12) DEFAULT NULL,
|
||||||
|
`ATTENTION_NAME` char(26) DEFAULT NULL,
|
||||||
|
`PAYMENT_TERM` varchar(26) CHARACTER SET utf8 DEFAULT NULL,
|
||||||
|
`CREDIT_LIMIT` decimal(12,2) DEFAULT NULL,
|
||||||
|
`LAST_PAY_DATE` varchar(42) CHARACTER SET utf8 DEFAULT NULL,
|
||||||
|
`TOTAL` decimal(12,2) DEFAULT NULL,
|
||||||
|
`BEFORE_DUE_7` decimal(12,2) DEFAULT NULL,
|
||||||
|
`PER1` decimal(12,2) DEFAULT NULL,
|
||||||
|
`PER2` decimal(12,2) DEFAULT NULL,
|
||||||
|
`PER3` decimal(12,2) DEFAULT NULL,
|
||||||
|
`PER4` decimal(12,2) DEFAULT NULL,
|
||||||
|
`PER5` decimal(12,2) DEFAULT NULL,
|
||||||
|
`PER6` decimal(12,2) DEFAULT NULL,
|
||||||
|
`PER7` decimal(12,2) DEFAULT NULL,
|
||||||
|
`DIVISION` varchar(3) CHARACTER SET utf8 NOT NULL,
|
||||||
|
`CLIENT_INFO` varchar(294) CHARACTER SET utf8 DEFAULT NULL,
|
||||||
|
`EXCHANGE_RATE` double NOT NULL,
|
||||||
|
`REF` varchar(30) DEFAULT NULL
|
||||||
|
);
|
||||||
|
explain
|
||||||
|
SELECT A.RECEIVABLE_GROUP,A.CLIENT_INFO,A.CLIENT_NAME,A.PHONE_NUMBER,A.ATTENTION_NAME,A.PAYMENT_TERM,A.CREDIT_LIMIT,A.LAST_PAY_DATE,A.TOTAL,
|
||||||
|
COALESCE(B.TOTAL_MCL,0) AS TOTAL_MCL,
|
||||||
|
COALESCE(C.TOTAL_MFS,0) AS TOTAL_MFS,
|
||||||
|
COALESCE(D.TOTAL_MIS,0) AS TOTAL_MIS,
|
||||||
|
COALESCE(F.BEFORE_DUE_7_MCL,0) AS BEFORE_DUE_7_MCL,
|
||||||
|
COALESCE(G.BEFORE_DUE_7_MFS,0) AS BEFORE_DUE_7_MFS,
|
||||||
|
COALESCE(H.BEFORE_DUE_7_MIS,0) AS BEFORE_DUE_7_MIS,
|
||||||
|
COALESCE(I.PER1_MCL,0) AS PER1_MCL,
|
||||||
|
COALESCE(J.PER1_MFS,0) AS PER1_MFS,
|
||||||
|
COALESCE(K.PER1_MIS,0) AS PER1_MIS,
|
||||||
|
COALESCE(L.PER2_MCL,0) AS PER2_MCL,
|
||||||
|
COALESCE(M.PER2_MFS,0) AS PER2_MFS,
|
||||||
|
COALESCE(N.PER2_MIS,0) AS PER2_MIS,
|
||||||
|
COALESCE(O.PER3_MCL,0) AS PER3_MCL,
|
||||||
|
COALESCE(P.PER3_MFS,0) AS PER3_MFS,
|
||||||
|
COALESCE(R.PER3_MIS,0) AS PER3_MIS,
|
||||||
|
COALESCE(S.PER4_MCL,0) AS PER4_MCL,
|
||||||
|
COALESCE(T.PER4_MFS,0) AS PER4_MFS,
|
||||||
|
COALESCE(U.PER4_MIS,0) AS PER4_MIS,
|
||||||
|
COALESCE(V.PER5_MCL,0) AS PER5_MCL,
|
||||||
|
COALESCE(X.PER5_MFS,0) AS PER5_MFS,
|
||||||
|
COALESCE(Z.PER5_MIS,0) AS PER5_MIS,
|
||||||
|
COALESCE(Q.PER6_MCL,0) AS PER6_MCL,
|
||||||
|
COALESCE(Y.PER6_MFS,0) AS PER6_MFS,
|
||||||
|
COALESCE(W.PER6_MIS,0) AS PER6_MIS,
|
||||||
|
COALESCE(A1.PER7_MCL,0) AS PER7_MCL,
|
||||||
|
COALESCE(B1.PER7_MFS,0) AS PER7_MFS,
|
||||||
|
COALESCE(C1.PER7_MIS,0) AS PER7_MIS,
|
||||||
|
A.BEFORE_DUE_7,A.PER1,A.PER2,A.PER3,A.PER4,A.PER5,A.PER6,A.PER7,
|
||||||
|
CONCAT(A.DIVISION,'-',A.CLIENT_NUMBER) AS REF,"2" AS TYPE FROM
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,
|
||||||
|
GROUP_CONCAT(DISTINCT CLIENT_INFO SEPARATOR '<br>') AS CLIENT_INFO,
|
||||||
|
GROUP_CONCAT(DISTINCT CLIENT_NAME SEPARATOR '<br>') AS CLIENT_NAME,
|
||||||
|
GROUP_CONCAT( DISTINCT `PHONE_NUMBER` SEPARATOR '<br>' ) AS PHONE_NUMBER ,
|
||||||
|
GROUP_CONCAT( DISTINCT `ATTENTION_NAME` SEPARATOR '<br>' ) AS ATTENTION_NAME,
|
||||||
|
GROUP_CONCAT( DISTINCT `PAYMENT_TERM` SEPARATOR '<br>' ) AS PAYMENT_TERM,
|
||||||
|
CREDIT_LIMIT ,
|
||||||
|
GROUP_CONCAT( `LAST_PAY_DATE` SEPARATOR '<br>' ) AS LAST_PAY_DATE,
|
||||||
|
SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL,
|
||||||
|
SUM( `BEFORE_DUE_7`*EXCHANGE_RATE ) AS BEFORE_DUE_7,
|
||||||
|
SUM( `PER1`*EXCHANGE_RATE ) AS PER1,
|
||||||
|
SUM( `PER2`*EXCHANGE_RATE ) AS PER2,
|
||||||
|
SUM( `PER3`*EXCHANGE_RATE ) AS PER3,
|
||||||
|
SUM( `PER4`*EXCHANGE_RATE ) AS PER4,
|
||||||
|
SUM( `PER5`*EXCHANGE_RATE ) AS PER5,
|
||||||
|
SUM( `PER6`*EXCHANGE_RATE ) AS PER6,
|
||||||
|
SUM( `PER7`*EXCHANGE_RATE ) AS PER7
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS A
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL_MCL
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS B ON A.CLIENT_NUMBER=B.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=B.DIVISION AND A.RECEIVABLE_GROUP=B.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=B.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL_MFS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS C ON A.CLIENT_NUMBER=C.CLIENT_NUMBER
|
||||||
|
AND
|
||||||
|
A.DIVISION=C.DIVISION AND A.RECEIVABLE_GROUP=C.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=C.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( `TOTAL`*EXCHANGE_RATE ) AS TOTAL_MIS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS D ON A.CLIENT_NUMBER=D.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=D.DIVISION AND A.RECEIVABLE_GROUP=D.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=D.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( BEFORE_DUE_7*EXCHANGE_RATE ) AS BEFORE_DUE_7_MCL
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS F ON A.CLIENT_NUMBER=F.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=F.DIVISION AND A.RECEIVABLE_GROUP=F.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=F.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( BEFORE_DUE_7*EXCHANGE_RATE ) AS BEFORE_DUE_7_MFS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS G ON A.CLIENT_NUMBER=G.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=G.DIVISION AND A.RECEIVABLE_GROUP=G.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=G.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( BEFORE_DUE_7*EXCHANGE_RATE ) AS BEFORE_DUE_7_MIS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS H ON A.CLIENT_NUMBER=H.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=H.DIVISION AND A.RECEIVABLE_GROUP=H.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=H.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER1*EXCHANGE_RATE ) AS PER1_MCL
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS I ON A.CLIENT_NUMBER=I.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=I.DIVISION AND A.RECEIVABLE_GROUP=I.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=I.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER1*EXCHANGE_RATE ) AS PER1_MFS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS J ON A.CLIENT_NUMBER=J.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=J.DIVISION AND A.RECEIVABLE_GROUP=J.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=J.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER1*EXCHANGE_RATE ) AS PER1_MIS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS K ON A.CLIENT_NUMBER=K.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=K.DIVISION AND A.RECEIVABLE_GROUP=K.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=K.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER2*EXCHANGE_RATE ) AS PER2_MCL
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS L ON A.CLIENT_NUMBER=L.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=L.DIVISION AND A.RECEIVABLE_GROUP=L.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=L.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER2*EXCHANGE_RATE ) AS PER2_MFS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS M ON A.CLIENT_NUMBER=M.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=M.DIVISION AND A.RECEIVABLE_GROUP=M.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=M.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER2*EXCHANGE_RATE ) AS PER2_MIS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS N ON A.CLIENT_NUMBER=N.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=N.DIVISION AND A.RECEIVABLE_GROUP=N.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=N.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER3*EXCHANGE_RATE ) AS PER3_MCL
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS O ON A.CLIENT_NUMBER=O.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=O.DIVISION AND A.RECEIVABLE_GROUP=O.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=O.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER3*EXCHANGE_RATE ) AS PER3_MFS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS P ON A.CLIENT_NUMBER=P.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=P.DIVISION AND A.RECEIVABLE_GROUP=P.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=P.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER3*EXCHANGE_RATE ) AS PER3_MIS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS R ON A.CLIENT_NUMBER=R.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=R.DIVISION AND A.RECEIVABLE_GROUP=R.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=R.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER4*EXCHANGE_RATE ) AS PER4_MCL
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS S ON A.CLIENT_NUMBER=S.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=S.DIVISION AND A.RECEIVABLE_GROUP=S.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=S.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER4*EXCHANGE_RATE ) AS PER4_MFS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS T ON A.CLIENT_NUMBER=T.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=T.DIVISION AND A.RECEIVABLE_GROUP=T.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=T.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER4*EXCHANGE_RATE ) AS PER4_MIS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS U ON A.CLIENT_NUMBER=U.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=U.DIVISION AND A.RECEIVABLE_GROUP=U.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=U.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER5*EXCHANGE_RATE ) AS PER5_MCL
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS V ON A.CLIENT_NUMBER=V.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=V.DIVISION AND A.RECEIVABLE_GROUP=V.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=V.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER5*EXCHANGE_RATE ) AS PER5_MFS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS X ON A.CLIENT_NUMBER=X.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=X.DIVISION AND A.RECEIVABLE_GROUP=X.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=X.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER5*EXCHANGE_RATE ) AS PER5_MIS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS Z ON A.CLIENT_NUMBER=Z.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=Z.DIVISION AND A.RECEIVABLE_GROUP=Z.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=Z.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER6*EXCHANGE_RATE ) AS PER6_MCL
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS Q ON A.CLIENT_NUMBER=Q.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=Q.DIVISION AND A.RECEIVABLE_GROUP=Q.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=Q.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER6*EXCHANGE_RATE ) AS PER6_MFS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS Y ON A.CLIENT_NUMBER=Y.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=Y.DIVISION AND A.RECEIVABLE_GROUP=Y.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=Y.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER6*EXCHANGE_RATE ) AS PER6_MIS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS W ON A.CLIENT_NUMBER=W.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=W.DIVISION AND A.RECEIVABLE_GROUP=W.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=W.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER7*EXCHANGE_RATE ) AS PER7_MCL
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MCL" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS A1 ON A.CLIENT_NUMBER=A1.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=A1.DIVISION AND A.RECEIVABLE_GROUP=A1.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=A1.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER7*EXCHANGE_RATE ) AS PER7_MFS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MFS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS B1 ON A.CLIENT_NUMBER=B1.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=B1.DIVISION AND A.RECEIVABLE_GROUP=B1.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=B1.CREDIT_LIMIT
|
||||||
|
LEFT JOIN
|
||||||
|
(SELECT RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT,SUM( PER7*EXCHANGE_RATE ) AS PER7_MIS
|
||||||
|
FROM `t2`
|
||||||
|
WHERE REF IS NULL AND DIVISION="MIS" GROUP BY RECEIVABLE_GROUP,DIVISION,CLIENT_NUMBER,CREDIT_LIMIT) AS C1 ON A.CLIENT_NUMBER=C1.CLIENT_NUMBER AND
|
||||||
|
A.DIVISION=C1.DIVISION AND A.RECEIVABLE_GROUP=C1.RECEIVABLE_GROUP AND A.CREDIT_LIMIT=C1.CREDIT_LIMIT
|
||||||
|
ORDER BY TOTAL DESC;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 PRIMARY <derived2> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived3> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived4> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived5> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived6> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived7> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived8> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived9> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived10> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived11> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived12> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived13> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived14> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived15> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived16> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived17> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived18> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived19> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived20> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived21> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived22> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived23> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived24> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived25> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived26> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived27> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived28> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
1 PRIMARY <derived29> system NULL NULL NULL NULL 0 const row not found
|
||||||
|
29 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
28 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
27 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
26 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
25 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
24 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
23 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
22 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
21 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
20 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
19 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
18 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
17 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
16 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
15 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
14 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
13 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
12 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
11 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
10 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
9 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
8 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
7 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
6 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
5 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
4 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
3 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
2 DERIVED NULL NULL NULL NULL NULL NULL NULL no matching row in const table
|
||||||
|
DROP TABLES t1,t2;
|
||||||
set optimizer_switch=@save_derived_optimizer_switch;
|
set optimizer_switch=@save_derived_optimizer_switch;
|
||||||
#
|
#
|
||||||
# Start of 10.1 tests
|
# Start of 10.1 tests
|
||||||
|
@@ -204,7 +204,7 @@ CONCAT('"',CONCAT_WS('";"',repeat('a',60),repeat('b',60),repeat('c',60),repeat('
|
|||||||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc";"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
|
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb";"cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc";"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
|
||||||
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
select insert('txs',2,1,'hi'),insert('is ',4,0,'a'),insert('txxxxt',2,4,'es');
|
||||||
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
insert('txs',2,1,'hi') insert('is ',4,0,'a') insert('txxxxt',2,4,'es')
|
||||||
this is a test
|
this is test
|
||||||
select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c');
|
select replace('aaaa','a','b'),replace('aaaa','aa','b'),replace('aaaa','a','bb'),replace('aaaa','','b'),replace('bbbb','a','c');
|
||||||
replace('aaaa','a','b') replace('aaaa','aa','b') replace('aaaa','a','bb') replace('aaaa','','b') replace('bbbb','a','c')
|
replace('aaaa','a','b') replace('aaaa','aa','b') replace('aaaa','a','bb') replace('aaaa','','b') replace('bbbb','a','c')
|
||||||
bbbb bb bbbbbbbb aaaa bbbb
|
bbbb bb bbbbbbbb aaaa bbbb
|
||||||
@@ -2343,7 +2343,7 @@ INSERT('abc', 3, 3, '1234')
|
|||||||
ab1234
|
ab1234
|
||||||
SELECT INSERT('abc', 4, 3, '1234');
|
SELECT INSERT('abc', 4, 3, '1234');
|
||||||
INSERT('abc', 4, 3, '1234')
|
INSERT('abc', 4, 3, '1234')
|
||||||
abc1234
|
abc
|
||||||
SELECT INSERT('abc', 5, 3, '1234');
|
SELECT INSERT('abc', 5, 3, '1234');
|
||||||
INSERT('abc', 5, 3, '1234')
|
INSERT('abc', 5, 3, '1234')
|
||||||
abc
|
abc
|
||||||
@@ -2633,7 +2633,7 @@ CREATE TABLE t1 ( a TEXT );
|
|||||||
SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug58165.txt';;
|
SELECT 'aaaaaaaaaaaaaa' INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug58165.txt';;
|
||||||
SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' );
|
SELECT insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' );
|
||||||
insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' )
|
insert( substring_index( 'a', 'a', 'b' ), 1, 0, 'x' )
|
||||||
x
|
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect INTEGER value: 'b'
|
Warning 1292 Truncated incorrect INTEGER value: 'b'
|
||||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug58165.txt' INTO TABLE t1;;
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug58165.txt' INTO TABLE t1;;
|
||||||
@@ -4579,8 +4579,7 @@ CREATE TABLE t1 (a INT);
|
|||||||
INSERT INTO t1 VALUES (0),(0),(1),(0),(0);
|
INSERT INTO t1 VALUES (0),(0),(1),(0),(0);
|
||||||
SELECT COUNT(*) FROM t1, t1 t2 GROUP BY INSERT('', t2.a, t1.a, @@global.max_binlog_size);
|
SELECT COUNT(*) FROM t1, t1 t2 GROUP BY INSERT('', t2.a, t1.a, @@global.max_binlog_size);
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
20
|
25
|
||||||
5
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# End of 10.1 tests
|
# End of 10.1 tests
|
||||||
|
@@ -1729,6 +1729,45 @@ Warnings:
|
|||||||
Warning 1292 Incorrect datetime value: '1'
|
Warning 1292 Incorrect datetime value: '1'
|
||||||
drop table t1;
|
drop table t1;
|
||||||
SET timestamp=DEFAULT;
|
SET timestamp=DEFAULT;
|
||||||
|
#
|
||||||
|
# Bug #21564557: INCONSISTENT OUTPUT FROM 5.5 AND 5.6
|
||||||
|
# UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%M"
|
||||||
|
#
|
||||||
|
SELECT UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"));
|
||||||
|
UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"))
|
||||||
|
NULL
|
||||||
|
Warnings:
|
||||||
|
Warning 1411 Incorrect datetime value: '201506' for function str_to_date
|
||||||
|
SELECT UNIX_TIMESTAMP('2015-06-00');
|
||||||
|
UNIX_TIMESTAMP('2015-06-00')
|
||||||
|
NULL
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Incorrect datetime value: '2015-06-00'
|
||||||
|
SELECT UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'));
|
||||||
|
UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'))
|
||||||
|
NULL
|
||||||
|
Warnings:
|
||||||
|
Warning 1411 Incorrect datetime value: '0000-00-00 10:30:30' for function str_to_date
|
||||||
|
set sql_mode= 'TRADITIONAL';
|
||||||
|
SELECT @@sql_mode;
|
||||||
|
@@sql_mode
|
||||||
|
STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
|
||||||
|
SELECT UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"));
|
||||||
|
UNIX_TIMESTAMP(STR_TO_DATE('201506', "%Y%m"))
|
||||||
|
NULL
|
||||||
|
Warnings:
|
||||||
|
Warning 1411 Incorrect datetime value: '201506' for function str_to_date
|
||||||
|
SELECT UNIX_TIMESTAMP('2015-06-00');
|
||||||
|
UNIX_TIMESTAMP('2015-06-00')
|
||||||
|
NULL
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Incorrect datetime value: '2015-06-00'
|
||||||
|
SELECT UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'));
|
||||||
|
UNIX_TIMESTAMP(STR_TO_DATE('0000-00-00 10:30:30', '%Y-%m-%d %h:%i:%s'))
|
||||||
|
NULL
|
||||||
|
Warnings:
|
||||||
|
Warning 1411 Incorrect datetime value: '0000-00-00 10:30:30' for function str_to_date
|
||||||
|
set sql_mode= default;
|
||||||
select time('10:10:10') > 10;
|
select time('10:10:10') > 10;
|
||||||
time('10:10:10') > 10
|
time('10:10:10') > 10
|
||||||
1
|
1
|
||||||
|
@@ -35,3 +35,36 @@ c1
|
|||||||
Ann
|
Ann
|
||||||
Alice
|
Alice
|
||||||
DROP TABLE t1, t2, t3, t4, t5;
|
DROP TABLE t1, t2, t3, t4, t5;
|
||||||
|
create table t1 (c1 varchar(100));
|
||||||
|
create table t2 (c1 varchar(100));
|
||||||
|
create view t3 as select * from t1;
|
||||||
|
insert into t1 values ('ann'), ('alice');
|
||||||
|
insert into t2 values ('bob'), ('brian');
|
||||||
|
create temporary table t4 (c1 varchar(100)) engine=MERGE union=(t2, t1);
|
||||||
|
create temporary table t5 (c1 varchar(100)) engine=MERGE union=(t3, t1);
|
||||||
|
select * from t5;
|
||||||
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
|
lock tables t1 read, t2 read, t3 read, t4 read;
|
||||||
|
select * from t5;
|
||||||
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
|
select * from t4;
|
||||||
|
c1
|
||||||
|
bob
|
||||||
|
brian
|
||||||
|
ann
|
||||||
|
alice
|
||||||
|
unlock tables;
|
||||||
|
drop table t2;
|
||||||
|
create view t2 as select * from t1;
|
||||||
|
select * from t4;
|
||||||
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
|
lock tables t1 read, t2 read, t3 read;
|
||||||
|
select * from t4;
|
||||||
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
|
select * from t4;
|
||||||
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
|
select * from t4;
|
||||||
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
|
unlock tables;
|
||||||
|
drop view t2, t3;
|
||||||
|
drop table t1;
|
||||||
|
@@ -319,4 +319,64 @@ master-bin.000001 # Gtid # # GTID #-#-#
|
|||||||
master-bin.000001 # Query # # use `test`; REPAIR VIEW `v4` FROM MYSQL
|
master-bin.000001 # Query # # use `test`; REPAIR VIEW `v4` FROM MYSQL
|
||||||
drop table if exists kv;
|
drop table if exists kv;
|
||||||
drop view v1,v2,v3,v4;
|
drop view v1,v2,v3,v4;
|
||||||
|
rename table mysql.event to mysql.ev_bk;
|
||||||
|
flush tables;
|
||||||
|
The --upgrade-system-tables option was used, user tables won't be touched.
|
||||||
|
MySQL upgrade detected
|
||||||
|
Phase 1/6: Checking and upgrading mysql database
|
||||||
|
Processing databases
|
||||||
|
mysql
|
||||||
|
mysql.column_stats OK
|
||||||
|
mysql.columns_priv OK
|
||||||
|
mysql.db OK
|
||||||
|
mysql.ev_bk 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
|
||||||
|
Phase 2/6: Fixing views from mysql
|
||||||
|
test.v1 OK
|
||||||
|
test.v2 OK
|
||||||
|
test.v3 OK
|
||||||
|
Phase 3/6: Running 'mysql_fix_privilege_tables'
|
||||||
|
Phase 4/6: Fixing table and database names ... Skipped
|
||||||
|
Phase 5/6: Checking and upgrading tables... Skipped
|
||||||
|
Phase 6/6: Running 'FLUSH PRIVILEGES'
|
||||||
|
OK
|
||||||
|
drop table mysql.event;
|
||||||
|
rename table mysql.ev_bk to mysql.event;
|
||||||
|
drop view v1,v2,v3;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
13
mysql-test/r/second_frac-9175.result
Normal file
13
mysql-test/r/second_frac-9175.result
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
|
||||||
|
timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456')
|
||||||
|
31622400123456
|
||||||
|
explain extended select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||||
|
Warnings:
|
||||||
|
Note 1003 select timestampdiff(MICROSECOND,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456') AS `timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456')`
|
||||||
|
create view v1 as select timestampdiff(microsecond,'2000-01-01 00:00:00','2001-01-01 00:00:00.123456');
|
||||||
|
select * from v1;
|
||||||
|
Name_exp_1
|
||||||
|
31622400123456
|
||||||
|
drop view v1;
|
@@ -348,3 +348,18 @@ select found_rows();
|
|||||||
found_rows()
|
found_rows()
|
||||||
75
|
75
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
create table t1(c1 int);
|
||||||
|
insert into t1 values(1),(2),(3),(4),(5);
|
||||||
|
select * from t1 order by c1 limit 2,1;
|
||||||
|
c1
|
||||||
|
3
|
||||||
|
select found_rows();
|
||||||
|
found_rows()
|
||||||
|
3
|
||||||
|
select sql_calc_found_rows * from t1 order by c1 limit 2,1;
|
||||||
|
c1
|
||||||
|
3
|
||||||
|
select found_rows();
|
||||||
|
found_rows()
|
||||||
|
5
|
||||||
|
drop table t1;
|
||||||
|
@@ -4326,57 +4326,57 @@ test.t1 repair status OK
|
|||||||
test.t2 repair status OK
|
test.t2 repair status OK
|
||||||
test.t3 repair status OK
|
test.t3 repair status OK
|
||||||
test.v1 repair Error 'test.v1' is not BASE TABLE
|
test.v1 repair Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 repair error Corrupt
|
test.v1 repair status Operation failed
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 optimize status OK
|
test.t1 optimize status OK
|
||||||
test.t2 optimize status OK
|
test.t2 optimize status OK
|
||||||
test.t3 optimize status OK
|
test.t3 optimize status OK
|
||||||
test.v1 optimize Error 'test.v1' is not BASE TABLE
|
test.v1 optimize Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 optimize error Corrupt
|
test.v1 optimize status Operation failed
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 analyze status Table is already up to date
|
test.t1 analyze status Table is already up to date
|
||||||
test.t2 analyze status Table is already up to date
|
test.t2 analyze status Table is already up to date
|
||||||
test.t3 analyze status Table is already up to date
|
test.t3 analyze status Table is already up to date
|
||||||
test.v1 analyze Error 'test.v1' is not BASE TABLE
|
test.v1 analyze Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 analyze error Corrupt
|
test.v1 analyze status Operation failed
|
||||||
call bug13012()|
|
call bug13012()|
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 repair status OK
|
test.t1 repair status OK
|
||||||
test.t2 repair status OK
|
test.t2 repair status OK
|
||||||
test.t3 repair status OK
|
test.t3 repair status OK
|
||||||
test.v1 repair Error 'test.v1' is not BASE TABLE
|
test.v1 repair Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 repair error Corrupt
|
test.v1 repair status Operation failed
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 optimize status OK
|
test.t1 optimize status OK
|
||||||
test.t2 optimize status OK
|
test.t2 optimize status OK
|
||||||
test.t3 optimize status OK
|
test.t3 optimize status OK
|
||||||
test.v1 optimize Error 'test.v1' is not BASE TABLE
|
test.v1 optimize Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 optimize error Corrupt
|
test.v1 optimize status Operation failed
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 analyze status Table is already up to date
|
test.t1 analyze status Table is already up to date
|
||||||
test.t2 analyze status Table is already up to date
|
test.t2 analyze status Table is already up to date
|
||||||
test.t3 analyze status Table is already up to date
|
test.t3 analyze status Table is already up to date
|
||||||
test.v1 analyze Error 'test.v1' is not BASE TABLE
|
test.v1 analyze Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 analyze error Corrupt
|
test.v1 analyze status Operation failed
|
||||||
call bug13012()|
|
call bug13012()|
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 repair status OK
|
test.t1 repair status OK
|
||||||
test.t2 repair status OK
|
test.t2 repair status OK
|
||||||
test.t3 repair status OK
|
test.t3 repair status OK
|
||||||
test.v1 repair Error 'test.v1' is not BASE TABLE
|
test.v1 repair Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 repair error Corrupt
|
test.v1 repair status Operation failed
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 optimize status OK
|
test.t1 optimize status OK
|
||||||
test.t2 optimize status OK
|
test.t2 optimize status OK
|
||||||
test.t3 optimize status OK
|
test.t3 optimize status OK
|
||||||
test.v1 optimize Error 'test.v1' is not BASE TABLE
|
test.v1 optimize Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 optimize error Corrupt
|
test.v1 optimize status Operation failed
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t1 analyze status Table is already up to date
|
test.t1 analyze status Table is already up to date
|
||||||
test.t2 analyze status Table is already up to date
|
test.t2 analyze status Table is already up to date
|
||||||
test.t3 analyze status Table is already up to date
|
test.t3 analyze status Table is already up to date
|
||||||
test.v1 analyze Error 'test.v1' is not BASE TABLE
|
test.v1 analyze Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 analyze error Corrupt
|
test.v1 analyze status Operation failed
|
||||||
drop procedure bug13012|
|
drop procedure bug13012|
|
||||||
drop view v1|
|
drop view v1|
|
||||||
select * from t1 order by data|
|
select * from t1 order by data|
|
||||||
|
5
mysql-test/r/ssl_cert_verify.result
Normal file
5
mysql-test/r/ssl_cert_verify.result
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#T1: Host name (/CN=localhost/) as OU name in the server certificate, server certificate verification should fail.
|
||||||
|
#T2: Host name (localhost) as common name in the server certificate, server certificate verification should pass.
|
||||||
|
Variable_name Value
|
||||||
|
Ssl_version TLS_VERSION
|
||||||
|
# restart server using restart
|
@@ -7110,6 +7110,20 @@ NULL
|
|||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
drop table t1,t2,t3,t4;
|
drop table t1,t2,t3,t4;
|
||||||
#
|
#
|
||||||
|
# MDEV-7122
|
||||||
|
# Assertion `0' failed in subselect_hash_sj_engine::init
|
||||||
|
#
|
||||||
|
SET SESSION big_tables=1;
|
||||||
|
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
INSERT INTO t1 VALUES(0),(0),(0);
|
||||||
|
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
|
||||||
|
a
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET SESSION big_tables=0;
|
||||||
|
#
|
||||||
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
||||||
# m_lock_type != 2' failed in handler::ha_index_read_map
|
# m_lock_type != 2' failed in handler::ha_index_read_map
|
||||||
#
|
#
|
||||||
|
@@ -349,9 +349,9 @@ WHERE t.a IN (SELECT b FROM t1);
|
|||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 PRIMARY t1 system NULL NULL NULL NULL 1 100.00
|
1 PRIMARY t1 system NULL NULL NULL NULL 1 100.00
|
||||||
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
3 MATERIALIZED t1 system NULL NULL NULL NULL 1 100.00
|
3 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 1 100.00
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t2` where <expr_cache><0>(<in_optimizer>(0,0 in ( <materialize> (select 0 from dual ), <primary_index_lookup>(0 in <temporary table> on distinct_key where ((0 = `<subquery3>`.`b`))))))
|
Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t2` where <expr_cache><0>(<in_optimizer>(0,<exists>(select 0 from dual where (<cache>(0) = 0))))
|
||||||
SELECT * FROM t2 RIGHT JOIN v1 AS t ON t.a != 0
|
SELECT * FROM t2 RIGHT JOIN v1 AS t ON t.a != 0
|
||||||
WHERE t.a IN (SELECT b FROM t1);
|
WHERE t.a IN (SELECT b FROM t1);
|
||||||
a a b
|
a a b
|
||||||
@@ -362,9 +362,9 @@ WHERE t.a IN (SELECT b FROM t1);
|
|||||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
1 PRIMARY t1 system NULL NULL NULL NULL 1 100.00
|
1 PRIMARY t1 system NULL NULL NULL NULL 1 100.00
|
||||||
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
1 PRIMARY t2 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||||
2 MATERIALIZED t1 system NULL NULL NULL NULL 1 100.00
|
2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 1 100.00
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t2` where <expr_cache><0>(<in_optimizer>(0,0 in ( <materialize> (select 0 from dual ), <primary_index_lookup>(0 in <temporary table> on distinct_key where ((0 = `<subquery2>`.`b`))))))
|
Note 1003 select `test`.`t2`.`a` AS `a`,0 AS `a`,0 AS `b` from `test`.`t2` where <expr_cache><0>(<in_optimizer>(0,<exists>(select 0 from dual where (<cache>(0) = 0))))
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
#
|
#
|
||||||
|
@@ -7110,6 +7110,20 @@ NULL
|
|||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
drop table t1,t2,t3,t4;
|
drop table t1,t2,t3,t4;
|
||||||
#
|
#
|
||||||
|
# MDEV-7122
|
||||||
|
# Assertion `0' failed in subselect_hash_sj_engine::init
|
||||||
|
#
|
||||||
|
SET SESSION big_tables=1;
|
||||||
|
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
INSERT INTO t1 VALUES(0),(0),(0);
|
||||||
|
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
|
||||||
|
a
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET SESSION big_tables=0;
|
||||||
|
#
|
||||||
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
||||||
# m_lock_type != 2' failed in handler::ha_index_read_map
|
# m_lock_type != 2' failed in handler::ha_index_read_map
|
||||||
#
|
#
|
||||||
|
@@ -7103,6 +7103,20 @@ NULL
|
|||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
drop table t1,t2,t3,t4;
|
drop table t1,t2,t3,t4;
|
||||||
#
|
#
|
||||||
|
# MDEV-7122
|
||||||
|
# Assertion `0' failed in subselect_hash_sj_engine::init
|
||||||
|
#
|
||||||
|
SET SESSION big_tables=1;
|
||||||
|
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
INSERT INTO t1 VALUES(0),(0),(0);
|
||||||
|
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
|
||||||
|
a
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET SESSION big_tables=0;
|
||||||
|
#
|
||||||
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
||||||
# m_lock_type != 2' failed in handler::ha_index_read_map
|
# m_lock_type != 2' failed in handler::ha_index_read_map
|
||||||
#
|
#
|
||||||
|
@@ -7101,6 +7101,20 @@ NULL
|
|||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
drop table t1,t2,t3,t4;
|
drop table t1,t2,t3,t4;
|
||||||
#
|
#
|
||||||
|
# MDEV-7122
|
||||||
|
# Assertion `0' failed in subselect_hash_sj_engine::init
|
||||||
|
#
|
||||||
|
SET SESSION big_tables=1;
|
||||||
|
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
INSERT INTO t1 VALUES(0),(0),(0);
|
||||||
|
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
|
||||||
|
a
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET SESSION big_tables=0;
|
||||||
|
#
|
||||||
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
||||||
# m_lock_type != 2' failed in handler::ha_index_read_map
|
# m_lock_type != 2' failed in handler::ha_index_read_map
|
||||||
#
|
#
|
||||||
|
@@ -7116,6 +7116,20 @@ NULL
|
|||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
drop table t1,t2,t3,t4;
|
drop table t1,t2,t3,t4;
|
||||||
#
|
#
|
||||||
|
# MDEV-7122
|
||||||
|
# Assertion `0' failed in subselect_hash_sj_engine::init
|
||||||
|
#
|
||||||
|
SET SESSION big_tables=1;
|
||||||
|
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
INSERT INTO t1 VALUES(0),(0),(0);
|
||||||
|
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
|
||||||
|
a
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET SESSION big_tables=0;
|
||||||
|
#
|
||||||
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
||||||
# m_lock_type != 2' failed in handler::ha_index_read_map
|
# m_lock_type != 2' failed in handler::ha_index_read_map
|
||||||
#
|
#
|
||||||
|
@@ -7101,6 +7101,20 @@ NULL
|
|||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
drop table t1,t2,t3,t4;
|
drop table t1,t2,t3,t4;
|
||||||
#
|
#
|
||||||
|
# MDEV-7122
|
||||||
|
# Assertion `0' failed in subselect_hash_sj_engine::init
|
||||||
|
#
|
||||||
|
SET SESSION big_tables=1;
|
||||||
|
CREATE TABLE t1(a char(255) DEFAULT '', KEY(a(10))) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
|
||||||
|
INSERT INTO t1 VALUES(0),(0),(0);
|
||||||
|
SELECT * FROM t1 WHERE a IN(SELECT MIN(a) FROM t1);
|
||||||
|
a
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET SESSION big_tables=0;
|
||||||
|
#
|
||||||
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
# MDEV-7930: Assertion `table_share->tmp_table != NO_TMP_TABLE ||
|
||||||
# m_lock_type != 2' failed in handler::ha_index_read_map
|
# m_lock_type != 2' failed in handler::ha_index_read_map
|
||||||
#
|
#
|
||||||
|
@@ -3003,4 +3003,69 @@ explain
|
|||||||
select 1 from t1 where _cp932 "1" in (select '1' from t1);
|
select 1 from t1 where _cp932 "1" in (select '1' from t1);
|
||||||
ERROR HY000: Illegal mix of collations (cp932_japanese_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation '='
|
ERROR HY000: Illegal mix of collations (cp932_japanese_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation '='
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-7823: Server crashes in next_depth_first_tab on nested IN clauses with SQ inside
|
||||||
|
#
|
||||||
|
set @tmp_mdev7823=@@optimizer_switch;
|
||||||
|
set optimizer_switch=default;
|
||||||
|
CREATE TABLE t1 (f1 INT);
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
CREATE TABLE t2 (f2 INT, KEY(f2));
|
||||||
|
INSERT INTO t2 VALUES (8),(0);
|
||||||
|
CREATE TABLE t3 (f3 INT);
|
||||||
|
INSERT INTO t3 VALUES (1),(2);
|
||||||
|
CREATE TABLE t4 (f4 INT);
|
||||||
|
INSERT INTO t4 VALUES (0),(5);
|
||||||
|
explain
|
||||||
|
SELECT * FROM t1, t2, t3 WHERE f2 IN ( f1 IN ( SELECT f4 FROM t4 ) );
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||||
|
1 PRIMARY t2 ref f2 f2 5 const 0 Using where; Using index
|
||||||
|
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join)
|
||||||
|
2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 2 Using where
|
||||||
|
SELECT * FROM t1, t2, t3 WHERE f2 IN ( f1 IN ( SELECT f4 FROM t4 ) );
|
||||||
|
f1 f2 f3
|
||||||
|
1 0 1
|
||||||
|
1 0 2
|
||||||
|
drop table t1,t2,t3,t4;
|
||||||
|
set optimizer_switch= @tmp_mdev7823;
|
||||||
|
#
|
||||||
|
# MDEV-6859: scalar subqueries in a comparison produced unexpected result
|
||||||
|
#
|
||||||
|
set @tmp_mdev6859=@@optimizer_switch;
|
||||||
|
set optimizer_switch=default;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
project_number varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (project_number)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 (project_number) VALUES ('aaa'),('bbb');
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
id int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
project_number varchar(50) NOT NULL,
|
||||||
|
history_date date NOT NULL,
|
||||||
|
country varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t2 (id, project_number, history_date, country) VALUES
|
||||||
|
(1, 'aaa', '2014-08-09', 'france'),(2, 'aaa', '2014-09-09', 'singapore');
|
||||||
|
CREATE TABLE t3 (
|
||||||
|
region varchar(50) NOT NULL,
|
||||||
|
country varchar(50) NOT NULL
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t3 (region, country) VALUES ('apac', 'singapore'),('eame', 'france');
|
||||||
|
SELECT SQL_NO_CACHE a.project_number
|
||||||
|
FROM t1 a
|
||||||
|
WHERE ( SELECT z.country
|
||||||
|
FROM t2 z
|
||||||
|
WHERE z.project_number = a.project_number AND z.history_date <= '2014-09-01'
|
||||||
|
ORDER BY z.id DESC LIMIT 1
|
||||||
|
) IN (
|
||||||
|
SELECT r.country
|
||||||
|
FROM t3 r
|
||||||
|
WHERE r.region = 'eame'
|
||||||
|
);
|
||||||
|
project_number
|
||||||
|
aaa
|
||||||
|
drop table t1, t2, t3;
|
||||||
|
set optimizer_switch= @tmp_mdev6859;
|
||||||
set optimizer_switch=@subselect_sj_tmp;
|
set optimizer_switch=@subselect_sj_tmp;
|
||||||
|
@@ -3017,6 +3017,71 @@ explain
|
|||||||
select 1 from t1 where _cp932 "1" in (select '1' from t1);
|
select 1 from t1 where _cp932 "1" in (select '1' from t1);
|
||||||
ERROR HY000: Illegal mix of collations (cp932_japanese_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation '='
|
ERROR HY000: Illegal mix of collations (cp932_japanese_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation '='
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-7823: Server crashes in next_depth_first_tab on nested IN clauses with SQ inside
|
||||||
|
#
|
||||||
|
set @tmp_mdev7823=@@optimizer_switch;
|
||||||
|
set optimizer_switch=default;
|
||||||
|
CREATE TABLE t1 (f1 INT);
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
CREATE TABLE t2 (f2 INT, KEY(f2));
|
||||||
|
INSERT INTO t2 VALUES (8),(0);
|
||||||
|
CREATE TABLE t3 (f3 INT);
|
||||||
|
INSERT INTO t3 VALUES (1),(2);
|
||||||
|
CREATE TABLE t4 (f4 INT);
|
||||||
|
INSERT INTO t4 VALUES (0),(5);
|
||||||
|
explain
|
||||||
|
SELECT * FROM t1, t2, t3 WHERE f2 IN ( f1 IN ( SELECT f4 FROM t4 ) );
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 PRIMARY t1 system NULL NULL NULL NULL 1
|
||||||
|
1 PRIMARY t2 ref f2 f2 5 const 0 Using where; Using index
|
||||||
|
1 PRIMARY t3 ALL NULL NULL NULL NULL 2 Using join buffer (flat, BNL join)
|
||||||
|
2 DEPENDENT SUBQUERY t4 ALL NULL NULL NULL NULL 2 Using where
|
||||||
|
SELECT * FROM t1, t2, t3 WHERE f2 IN ( f1 IN ( SELECT f4 FROM t4 ) );
|
||||||
|
f1 f2 f3
|
||||||
|
1 0 1
|
||||||
|
1 0 2
|
||||||
|
drop table t1,t2,t3,t4;
|
||||||
|
set optimizer_switch= @tmp_mdev7823;
|
||||||
|
#
|
||||||
|
# MDEV-6859: scalar subqueries in a comparison produced unexpected result
|
||||||
|
#
|
||||||
|
set @tmp_mdev6859=@@optimizer_switch;
|
||||||
|
set optimizer_switch=default;
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
project_number varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (project_number)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 (project_number) VALUES ('aaa'),('bbb');
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
id int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
project_number varchar(50) NOT NULL,
|
||||||
|
history_date date NOT NULL,
|
||||||
|
country varchar(50) NOT NULL,
|
||||||
|
PRIMARY KEY (id)
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t2 (id, project_number, history_date, country) VALUES
|
||||||
|
(1, 'aaa', '2014-08-09', 'france'),(2, 'aaa', '2014-09-09', 'singapore');
|
||||||
|
CREATE TABLE t3 (
|
||||||
|
region varchar(50) NOT NULL,
|
||||||
|
country varchar(50) NOT NULL
|
||||||
|
) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t3 (region, country) VALUES ('apac', 'singapore'),('eame', 'france');
|
||||||
|
SELECT SQL_NO_CACHE a.project_number
|
||||||
|
FROM t1 a
|
||||||
|
WHERE ( SELECT z.country
|
||||||
|
FROM t2 z
|
||||||
|
WHERE z.project_number = a.project_number AND z.history_date <= '2014-09-01'
|
||||||
|
ORDER BY z.id DESC LIMIT 1
|
||||||
|
) IN (
|
||||||
|
SELECT r.country
|
||||||
|
FROM t3 r
|
||||||
|
WHERE r.region = 'eame'
|
||||||
|
);
|
||||||
|
project_number
|
||||||
|
aaa
|
||||||
|
drop table t1, t2, t3;
|
||||||
|
set optimizer_switch= @tmp_mdev6859;
|
||||||
set optimizer_switch=@subselect_sj_tmp;
|
set optimizer_switch=@subselect_sj_tmp;
|
||||||
#
|
#
|
||||||
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
|
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
|
||||||
|
@@ -439,6 +439,15 @@ select 1 from t1 as t1_0 inner join t1 as t2 on (t1_0.a <=> now()) join t1 on 1;
|
|||||||
1
|
1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-9511 Valgrind warnings 'Invalid read' in Field_newdate::cmp and Field_newdate::val_str
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (f1 DATE, f2 VARCHAR(1));
|
||||||
|
INSERT INTO t1 VALUES ('2003-04-27','a'),('1900-01-01','a');
|
||||||
|
SELECT GROUP_CONCAT(f2, IF(f1, f2, f1), f1 ORDER BY 2,1,3) FROM t1;
|
||||||
|
GROUP_CONCAT(f2, IF(f1, f2, f1), f1 ORDER BY 2,1,3)
|
||||||
|
aa1900-01-01,aa2003-04-27
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
# Start of 10.1 tests
|
# Start of 10.1 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
@@ -511,12 +520,6 @@ Warnings:
|
|||||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = DATE'2001-01-01')
|
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where (`test`.`t1`.`a` = DATE'2001-01-01')
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# End of 10.1 tests
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Start of 10.1 tests
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# MDEV-8699 Wrong result for SELECT..WHERE HEX(date_column)!='323030312D30312D3031' AND date_column='2001-01-01x'
|
# MDEV-8699 Wrong result for SELECT..WHERE HEX(date_column)!='323030312D30312D3031' AND date_column='2001-01-01x'
|
||||||
#
|
#
|
||||||
CREATE TABLE t1 (a DATE);
|
CREATE TABLE t1 (a DATE);
|
||||||
|
@@ -2425,28 +2425,28 @@ CREATE VIEW v1 AS SELECT id FROM t1;
|
|||||||
OPTIMIZE TABLE v1;
|
OPTIMIZE TABLE v1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.v1 optimize Error 'test.v1' is not BASE TABLE
|
test.v1 optimize Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 optimize error Corrupt
|
test.v1 optimize status Operation failed
|
||||||
ANALYZE TABLE v1;
|
ANALYZE TABLE v1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.v1 analyze Error 'test.v1' is not BASE TABLE
|
test.v1 analyze Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 analyze error Corrupt
|
test.v1 analyze status Operation failed
|
||||||
REPAIR TABLE v1;
|
REPAIR TABLE v1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.v1 repair Error 'test.v1' is not BASE TABLE
|
test.v1 repair Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 repair error Corrupt
|
test.v1 repair status Operation failed
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
OPTIMIZE TABLE v1;
|
OPTIMIZE TABLE v1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.v1 optimize Error 'test.v1' is not BASE TABLE
|
test.v1 optimize Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 optimize error Corrupt
|
test.v1 optimize status Operation failed
|
||||||
ANALYZE TABLE v1;
|
ANALYZE TABLE v1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.v1 analyze Error 'test.v1' is not BASE TABLE
|
test.v1 analyze Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 analyze error Corrupt
|
test.v1 analyze status Operation failed
|
||||||
REPAIR TABLE v1;
|
REPAIR TABLE v1;
|
||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.v1 repair Error 'test.v1' is not BASE TABLE
|
test.v1 repair Error 'test.v1' is not BASE TABLE
|
||||||
test.v1 repair error Corrupt
|
test.v1 repair status Operation failed
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
create definer = current_user() sql security invoker view v1 as select 1;
|
create definer = current_user() sql security invoker view v1 as select 1;
|
||||||
show create view v1;
|
show create view v1;
|
||||||
@@ -5540,6 +5540,14 @@ execute stmt;
|
|||||||
deallocate prepare stmt;
|
deallocate prepare stmt;
|
||||||
drop view v1,v2;
|
drop view v1,v2;
|
||||||
drop table `t1`;
|
drop table `t1`;
|
||||||
|
create table t1 (a int, b int);
|
||||||
|
create view v1 as select a+b from t1;
|
||||||
|
alter table v1 check partition p1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.v1 check Error 'test.v1' is not BASE TABLE
|
||||||
|
test.v1 check status Operation failed
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
# -- End of 5.5 tests.
|
# -- End of 5.5 tests.
|
||||||
# -----------------------------------------------------------------
|
# -----------------------------------------------------------------
|
||||||
|
20
mysql-test/std_data/ca-cert-verify.pem
Normal file
20
mysql-test/std_data/ca-cert-verify.pem
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDWzCCAkOgAwIBAgIJAO/QdKLEDQdXMA0GCSqGSIb3DQEBCwUAMEQxCzAJBgNV
|
||||||
|
BAYTAklOMREwDwYDVQQIDAhLYXJuYXRrYTESMBAGA1UEBwwJQmFuZ2Fsb3JlMQ4w
|
||||||
|
DAYDVQQKDAVNeVNRTDAeFw0xNjAxMDUxMDA1MDhaFw0yNTExMTMxMDA1MDhaMEQx
|
||||||
|
CzAJBgNVBAYTAklOMREwDwYDVQQIDAhLYXJuYXRrYTESMBAGA1UEBwwJQmFuZ2Fs
|
||||||
|
b3JlMQ4wDAYDVQQKDAVNeVNRTDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC
|
||||||
|
ggEBAKdOCuS2CzfBTJ2x8SAzY0J7cYJfNJvMDF1cvANnhkIhtnkWt/HZ5DJ9NxeX
|
||||||
|
q5h7FJLAi4gddqdk/tvQJw0V6gZepJr/mKVnMPivF5+oHPc9ZJQMX6B3FBNwWylm
|
||||||
|
ACd5GKx8I/H/MXyuhQTcoV//Ab+2pI8RHeYbBsm3lHH+tX7bRU6mUFjneqMpiCkb
|
||||||
|
JHt6BWZiWR10O6pMuGQ9+dDdsLhEV1fj3CctEPwW6rs4IZzD8xl5n+8cy7qu6eYH
|
||||||
|
Wt/snwsTzkrufeMRqTtqelxON9eoQwYOR1oH3vNEVlcbuoJAvaWOqBROUBdf12SP
|
||||||
|
TYSdP9nlRh7lTKQOywN4kYt6LqUCAwEAAaNQME4wHQYDVR0OBBYEFJ4c9tKaUU0P
|
||||||
|
EjBq5G207jjXI7RAMB8GA1UdIwQYMBaAFJ4c9tKaUU0PEjBq5G207jjXI7RAMAwG
|
||||||
|
A1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBABRnUyj21oFi0SGJg/K5+8Lc
|
||||||
|
4n6OwVU/NgLOysIB0baIP/Rqeaze59xG/v9FPQgBlWcJK3RabOywx5bxAxdcus+1
|
||||||
|
yp5j4h37Qq1/qkgqmevvdSAPa0OBQbLb+58/naV+ywUpCYZ6flLdCMH3fXuDSlSq
|
||||||
|
qrCznextjojtWbnzrBmCmJmXWGd2gSaJDvb90ZZp/Elt3vN1sgjW0M/JEkb4MJ1r
|
||||||
|
6nfD/FHr2lUwBHm2yk7Blovx7x4d/Ip3pglk63cNO/Rn0SBTdoVDS2LB9du3Phq2
|
||||||
|
TZiL3NrRMGUNwmdaavyrJxaPq5D+Sfa4LYP3MMYD4KhLogNzIl299n5joyizlJw=
|
||||||
|
-----END CERTIFICATE-----
|
19
mysql-test/std_data/server-cert-verify-fail.pem
Normal file
19
mysql-test/std_data/server-cert-verify-fail.pem
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDJzCCAg8CAQEwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCSU4xETAPBgNV
|
||||||
|
BAgMCEthcm5hdGthMRIwEAYDVQQHDAlCYW5nYWxvcmUxDjAMBgNVBAoMBU15U1FM
|
||||||
|
MB4XDTE2MDEwNTEwMDgyN1oXDTI1MTExMzEwMDgyN1owbzELMAkGA1UEBhMCSU4x
|
||||||
|
EjAQBgNVBAgMCTpLYXJuYXRrYTETMBEGA1UEBwwKOkJhbmdhbG9yZTEPMA0GA1UE
|
||||||
|
CgwGOk15U1FMMRcwFQYDVQQLDA4vQ049bG9jYWxob3N0LzENMAsGA1UEAwwEZmFp
|
||||||
|
bDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL3wnWuJodzZYq9TAJRm
|
||||||
|
HU7995FA3TEWdUinYTgGP79aTVQ4M9aeINlB6whWXOI8seh9Ja7C6kMzqOgYbgCl
|
||||||
|
WlDPAVJWktFYeWXOLxbpzh1KWkS6jBkWT02t7H7JcYbil7xjlJUxLz4UOOUDUDIP
|
||||||
|
6yqdA9VE3osESttjzj57Zm2xPqzbIHVJfORn7EexH4pryS7439p6i4XtfL31NJ8V
|
||||||
|
07M3j3a8GqbcEqXYvcUCrLnywDQ1igP817b6ta52nbgYWiqdn0mJs535UJ/p/rSl
|
||||||
|
D4Ae/6G3BSEY7whir6xY6vsd4KJ6w+wRCHnY0ky6OdDJVJLH1iqh7si7P3RBGkxw
|
||||||
|
Y7MCAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAggbw1jj2b7H5KDdeGJGIoOGkQAcs
|
||||||
|
GNSJussCfdk7qnzYXKmjyNppC86jjaOrXona5f+SNCuujdu86Tv8V69EH57k4lUc
|
||||||
|
DW7J4AD3vUb/tBzB0tsI/76Z4gm1XoCsnCGGpWd8GQAg/QNn/ZfJB2Vb/9ObN6rH
|
||||||
|
0HV7ouB6OGZSsb71+grKiN6mDyB1lZynCGvqBxOCKFISfcRbCNFHo/pONlHaNGPE
|
||||||
|
vjDH1bPZbEHj8owYgkdcQe0a8EbJYeQfm6fH8V8bmUcG7N60DrCnq4l1qwwVkh1S
|
||||||
|
7RpIDgrWkU+esIIdYZIIbtDxQP1Sm7kUh++7b+bcHnyw3KtDVSCw7MIedA==
|
||||||
|
-----END CERTIFICATE-----
|
19
mysql-test/std_data/server-cert-verify-pass.pem
Normal file
19
mysql-test/std_data/server-cert-verify-pass.pem
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIDEzCCAfsCAQEwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCSU4xETAPBgNV
|
||||||
|
BAgMCEthcm5hdGthMRIwEAYDVQQHDAlCYW5nYWxvcmUxDjAMBgNVBAoMBU15U1FM
|
||||||
|
MB4XDTE2MDEwNTEwMDU1OVoXDTI1MTExMzEwMDU1OVowWzELMAkGA1UEBhMCSU4x
|
||||||
|
EjAQBgNVBAgMCTpLYXJuYXRrYTETMBEGA1UEBwwKOkJhbmdhbG9yZTEPMA0GA1UE
|
||||||
|
CgwGOk15U1FMMRIwEAYDVQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUA
|
||||||
|
A4IBDwAwggEKAoIBAQDAmkbUwDe+nrqL8A8uwlIZk74HHCDjUAWrskKF9leEIQsB
|
||||||
|
5exFZ8JEo1u6mdR4laQWsxizGdTPqIEidkDyyEMh4+joHgyQEPD/G3rFVW8yEFHb
|
||||||
|
42O04O96BEPFXNPDRuX3MxI+lGbYDjxTS/WhVub4/3SqLjC28FJmEUXIHA0/A+c5
|
||||||
|
hlYXK0u+aPAqXxHIjBgB4BxxHXZKqecmvR3LhXoVmhJmndsVfKajB27nDKc8/OTI
|
||||||
|
H2SXb6h3nRPDXRfwB/C5i+004tEsVeIgkYshcCgLSyDdeVieUP2pm3EAmDSjmtLF
|
||||||
|
6CgY/EBSfH+JCKFUk75bA4k8CCGzBfIeOcsKHwgFAgMBAAEwDQYJKoZIhvcNAQEL
|
||||||
|
BQADggEBAInDuHtDkeT6dkWmRJCP56c4xiQqib2QuYUuMSrAhf07xlLHc6iHnD2X
|
||||||
|
hCWCrja6uwF90DnPjeouKMAUe5txq/uKA8/Y/NfXN6nPiAeHLI0qnTv7Mr9TQ8zU
|
||||||
|
DNDwRz6onlI2cS4GhrwAnlpiaxu7AjMUWHtfBFGFrgn3PawjDQpsBZNcxw1QsLc0
|
||||||
|
E0hFrWLOd0vDETEhoRge88N7a0jqK0Rd9cvRWnvjI+IsjQMLZzKufivIHPzI9K+9
|
||||||
|
Wtp8iRHcaBr5DpsBjgsO7dqVRbsNyaWsdHdLt+CQSGXpv7P6fq3K6nJFTBeIgSfS
|
||||||
|
gflrHVKYZRkKDDDpX4yHNdnIqrvy4RU=
|
||||||
|
-----END CERTIFICATE-----
|
27
mysql-test/std_data/server-key-verify-fail.pem
Normal file
27
mysql-test/std_data/server-key-verify-fail.pem
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIEpQIBAAKCAQEAvfCda4mh3Nlir1MAlGYdTv33kUDdMRZ1SKdhOAY/v1pNVDgz
|
||||||
|
1p4g2UHrCFZc4jyx6H0lrsLqQzOo6BhuAKVaUM8BUlaS0Vh5Zc4vFunOHUpaRLqM
|
||||||
|
GRZPTa3sfslxhuKXvGOUlTEvPhQ45QNQMg/rKp0D1UTeiwRK22POPntmbbE+rNsg
|
||||||
|
dUl85GfsR7EfimvJLvjf2nqLhe18vfU0nxXTszePdrwaptwSpdi9xQKsufLANDWK
|
||||||
|
A/zXtvq1rnaduBhaKp2fSYmznflQn+n+tKUPgB7/obcFIRjvCGKvrFjq+x3gonrD
|
||||||
|
7BEIedjSTLo50MlUksfWKqHuyLs/dEEaTHBjswIDAQABAoIBAQCSUyNzDPydXvsf
|
||||||
|
hhoUOParPAvU4tuETYDdD9Vdi7Lgf3jDQOjulbNIq/ec3KuBvrBwIrk9APvn+YxO
|
||||||
|
AUP9S2Vgi5jBDeDdVgNv4n90b3pSJk2UVQJI8V72wN5Ibnf/KeErSKvWo6V5daq/
|
||||||
|
AuZtKsZIdd3WFtA62HuyuBjTGc23Alj1C0EKnN0Rx1uBwDvx/OVQ266Us/x8jJqW
|
||||||
|
ZxIOfcvfNzBQEa5hAzbQCReVaC+rBLRAcMM2yGP7aDa+8cRkwuVlSqpX8CXBdLoU
|
||||||
|
PqmU49etcW72Rb1AFt9WgEu1Oh9UYbHFSB+FEbO8IGcGBsuYHf9zkxQyjpy/iKyT
|
||||||
|
H5dTu7YBAoGBAOWqEGepZVrfB+P6X18n3vbJhgYmF0sa0mCmwkFYgk36yNqsZ8at
|
||||||
|
lQjm5mbn4wjEKHIcQ/T1taq73W471M+PxMnn0WTwoG5jsyarZGgy6/95YXiyZtQe
|
||||||
|
qgA4P3aKkCteRP22DjG7uxmm9Hoqx8Z31vfRTLAHN1IEHPHHkg/J3gPTAoGBANO4
|
||||||
|
aqKeY4vcDvVkvxVbADrw++tZGwA+RuxfO4HKKru59VdA2PsAxhXwb3Dfejwj7hYW
|
||||||
|
yE9edHjGpMr1+dpf8YJYs7qjajHe1HxBOYqQGHycIdw+Gv56R4HpaS9eW3x8l/Pi
|
||||||
|
b4xnAodv2qIriACOe7br+rll4wKX46Wt64zdvpShAoGAT0r3HQM0Vjp4u/J+qRjX
|
||||||
|
9za+yjKuiiS5i9snaG5JlujGHhG2Rrc5pHgsBk17alRnbnZp1BJdZZQ1MFEB+aO2
|
||||||
|
mssp1YLqsRJFEU3NfdhO+MaMq6JUtFnd8fN5ndDbU83ZXgtUPUGGqKWm9OL+VHyd
|
||||||
|
wLQHmSL0q6F16Ngxirf0qjcCgYEAtSmiJVA+gdhk/FmeoBlkEwtNpM50Kjsf2PaM
|
||||||
|
Jrzk4Al5A5Y7lFvPI8q+sOio4XklKsWH1VJPe2EOdZUQnGlocE6SS+u03MN9Mm1l
|
||||||
|
XUl7inTXDGwgEQx0z5b4KE4nHlhGdauWI5+pLFbrz8RL9Z32AkneGnIyU2/AnW46
|
||||||
|
lijQAMECgYEAmgp/88ndIw49RCtMhYhtXQ87AsEAP6kzXQyKppDkn0os+xI5igIL
|
||||||
|
i/UDxB33hx3yjrUZwoGDV9MwlMhZNX5Tf5bwjPmmh1NR6KdEpPt5AkklX4s6uil2
|
||||||
|
Bxl1P5l1jl/PbEYtv5LDZKIPANWRzViMSIWqjUWlbdqE7/vjx+Oo+cc=
|
||||||
|
-----END RSA PRIVATE KEY-----
|
27
mysql-test/std_data/server-key-verify-pass.pem
Normal file
27
mysql-test/std_data/server-key-verify-pass.pem
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
-----BEGIN RSA PRIVATE KEY-----
|
||||||
|
MIIEowIBAAKCAQEAwJpG1MA3vp66i/APLsJSGZO+Bxwg41AFq7JChfZXhCELAeXs
|
||||||
|
RWfCRKNbupnUeJWkFrMYsxnUz6iBInZA8shDIePo6B4MkBDw/xt6xVVvMhBR2+Nj
|
||||||
|
tODvegRDxVzTw0bl9zMSPpRm2A48U0v1oVbm+P90qi4wtvBSZhFFyBwNPwPnOYZW
|
||||||
|
FytLvmjwKl8RyIwYAeAccR12SqnnJr0dy4V6FZoSZp3bFXymowdu5wynPPzkyB9k
|
||||||
|
l2+od50Tw10X8AfwuYvtNOLRLFXiIJGLIXAoC0sg3XlYnlD9qZtxAJg0o5rSxego
|
||||||
|
GPxAUnx/iQihVJO+WwOJPAghswXyHjnLCh8IBQIDAQABAoIBAHPQUSc9LkgBSks7
|
||||||
|
XuXPE28t1+aOk3gcdkx4NGg5aQaal/PcPea+LaL4WAAs4AZidPjxWLjZn43+1SfT
|
||||||
|
09opcbS/Rx3Mc+FtTn0YGQrwBJ0mExMV+K6bU2Ubi2TyHKQfzciHfUEEG5Nve/ba
|
||||||
|
hikuCFVRxuVOQRzABcw6NqvNsmlg892lfw6/+RDwMBcz7ocwzmiOUoIxgjyFo9G4
|
||||||
|
aJvRmHLij5892H6qveik+A/Xr+8leGQHiQET2wW/F9MFP5ypIT7aeE6remeZH7fG
|
||||||
|
f4/Zfei/TE4xK2ElNR/91byzeKIVY4vjtTndAiBuqpfYuICb40MC02LNW5Oe6VN2
|
||||||
|
3mQ6EgECgYEA7O4ndBnbs/00gyTGyNg6I+3wRTibhNH4R8RZFJiLfKRKOlUiLhUo
|
||||||
|
+bQeO4bCQ6YY++TYDvMEXTlA3jow9R9Mj2AWc6bNmQmJd/065QyFHftywT66I+V4
|
||||||
|
rz1ohSJyHXcv4DxqNk3o3Vb4N8GFjZKcodSgTv2Lk+9ipDYFcQiZop0CgYEA0BrF
|
||||||
|
SIyLTnjoVht/7RbIGEqhMQUiz5mx7qQ1TPB+YTG77G2xXJNg5d6S7WT4LN+cqbxN
|
||||||
|
YdndIbW4NdV7bH7FlG9q7jfkuZ+AY2BPU047tcDeyO0HYYEhVY+EyZqHci/26mvt
|
||||||
|
JrawdqS5HQS1y/rKfytm7YBGTvqoNZHvOHc6aokCgYEAxcjlbJkte+pyzMuFmiJP
|
||||||
|
HrFBczeXM+BoJ9j0GCpjvvAS+vEYsGl/pDvFRSHwx7I/hv/5kTkzOnNSAHGJbwbq
|
||||||
|
zYGEHJVxakC43k6pvI2gDnBa0pD/qHmmLnvP5dvkcU6Oy90DOUP+kc9JNJo7V/y8
|
||||||
|
/qdWD7q+qwcaTETAdCSexE0CgYA/DN1Y7bwHOnqqHArWOmDFe1b7EyNI4rgWJYpA
|
||||||
|
lVy09eyJ5XInKj/hZV3+rujCL723b2XCj89/tx7osJWEeaRDJL6xDh4uXzT25uch
|
||||||
|
xkIw/w6Asc/aqtT+p00EB92hqwaUX76qTA+K4r1zHUo3UvSnMu8sZgDnTOpJ0L05
|
||||||
|
zmXUgQKBgDT+IFrAzOty4B0mJncTCC/TulpW704bEZwNJfQSdtiBQr/vqoXygBQc
|
||||||
|
bHfpncpSfhzHB5lhRUv02TqXgl53D70nM7JD5nx98WYTTBxsbvxPlt4gBRZkfgq5
|
||||||
|
tHKclAArc1SbfW5Z8oYyl7h33LQJK116QSyiIIGieH5VXNPwnqUs
|
||||||
|
-----END RSA PRIVATE KEY-----
|
@@ -58,7 +58,7 @@ sub skip_combinations {
|
|||||||
return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp');
|
return 0 unless socket my $sock, PF_INET6, SOCK_STREAM, getprotobyname('tcp');
|
||||||
# eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation
|
# eval{}, if there's no Socket::sockaddr_in6 at all, old Perl installation
|
||||||
eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) };
|
eval { connect $sock, sockaddr_in6(7, Socket::IN6ADDR_LOOPBACK) };
|
||||||
return $! != 101;
|
return $@ eq "";
|
||||||
}
|
}
|
||||||
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();
|
$skip{'include/check_ipv6.inc'} = 'No IPv6' unless ipv6_ok();
|
||||||
|
|
||||||
|
@@ -2164,6 +2164,12 @@ DROP TABLE federated.t1;
|
|||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_MASTER_CONCURRENT_INSERT;
|
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_MASTER_CONCURRENT_INSERT;
|
||||||
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
|
SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
|
||||||
|
#
|
||||||
|
# MDEV-9346 - The federatedx and spider engine make mysqld crash when
|
||||||
|
# they are configured withtout username
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:SLAVE_PORT/federated/t1';
|
||||||
|
ERROR HY000: Can't create federated table. Foreign data src error: database: 'federated' username: '' hostname: '127.0.0.1'
|
||||||
DROP TABLE IF EXISTS federated.t1;
|
DROP TABLE IF EXISTS federated.t1;
|
||||||
DROP DATABASE IF EXISTS federated;
|
DROP DATABASE IF EXISTS federated;
|
||||||
DROP TABLE IF EXISTS federated.t1;
|
DROP TABLE IF EXISTS federated.t1;
|
||||||
|
@@ -2001,4 +2001,13 @@ SET @@GLOBAL.CONCURRENT_INSERT= @OLD_SLAVE_CONCURRENT_INSERT;
|
|||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-9346 - The federatedx and spider engine make mysqld crash when
|
||||||
|
--echo # they are configured withtout username
|
||||||
|
--echo #
|
||||||
|
connection master;
|
||||||
|
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||||
|
--error ER_CANT_CREATE_FEDERATED_TABLE
|
||||||
|
eval CREATE TABLE t1 (a INT) ENGINE=FEDERATED CONNECTION='mysql://@127.0.0.1:$SLAVE_MYPORT/federated/t1';
|
||||||
|
|
||||||
source include/federated_cleanup.inc;
|
source include/federated_cleanup.inc;
|
||||||
|
@@ -27,3 +27,5 @@ galera_ssl_upgrade : TODO: investigate
|
|||||||
mysql-wsrep#90 : TODO: investigate
|
mysql-wsrep#90 : TODO: investigate
|
||||||
galera_flush : mysql-wsrep/issues/229
|
galera_flush : mysql-wsrep/issues/229
|
||||||
galera_transaction_read_only : mysql-wsrep/issues/229
|
galera_transaction_read_only : mysql-wsrep/issues/229
|
||||||
|
galera_gcs_fragment : Incorrect arguments to SET
|
||||||
|
galera_flush_local : Fails sporadically
|
||||||
|
@@ -17,7 +17,7 @@ wsrep-sync-wait=7
|
|||||||
#ist_port=@OPT.port
|
#ist_port=@OPT.port
|
||||||
#sst_port=@OPT.port
|
#sst_port=@OPT.port
|
||||||
wsrep-cluster-address=gcomm://
|
wsrep-cluster-address=gcomm://
|
||||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
|
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;gcache.size=10M'
|
||||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
|||||||
#ist_port=@OPT.port
|
#ist_port=@OPT.port
|
||||||
#sst_port=@OPT.port
|
#sst_port=@OPT.port
|
||||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
|
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;gcache.size=10M'
|
||||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
|
||||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||||
|
|
||||||
|
@@ -24,6 +24,9 @@ f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` FUNCTIO
|
|||||||
MODIFIES SQL DATA
|
MODIFIES SQL DATA
|
||||||
COMMENT 'f1_comment'
|
COMMENT 'f1_comment'
|
||||||
RETURN 'abc' latin1 latin1_swedish_ci latin1_swedish_ci
|
RETURN 'abc' latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
|
SELECT 1 FROM DUAL;
|
||||||
|
1
|
||||||
|
1
|
||||||
SHOW CREATE FUNCTION f1;
|
SHOW CREATE FUNCTION f1;
|
||||||
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
||||||
f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` FUNCTION `f1`(param INTEGER) RETURNS varchar(200) CHARSET latin1
|
f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user1`@`%` FUNCTION `f1`(param INTEGER) RETURNS varchar(200) CHARSET latin1
|
||||||
|
@@ -50,7 +50,7 @@ WSREP_SST_DONOR
|
|||||||
WSREP_SST_DONOR_REJECTS_QUERIES OFF
|
WSREP_SST_DONOR_REJECTS_QUERIES OFF
|
||||||
WSREP_SST_METHOD rsync
|
WSREP_SST_METHOD rsync
|
||||||
WSREP_SYNC_WAIT 7
|
WSREP_SYNC_WAIT 7
|
||||||
<BASE_HOST>; <BASE_PORT>; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; <GCACHE_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; gcache.page_size = 128M; gcache.size = 10M; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; <GCS_RECV_Q_HARD_LIMIT>; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = P30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT30S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2;
|
<BASE_HOST>; <BASE_PORT>; cert.log_conflicts = no; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 0; evs.view_forget_timeout = P1D; <GCACHE_DIR>; gcache.keep_pages_size = 0; gcache.mem_size = 0; <GCACHE_NAME>; gcache.page_size = 128M; gcache.size = 10M; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; <GCS_RECV_Q_HARD_LIMIT>; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; <GMCAST_LISTEN_ADDR>; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; <IST_RECV_ADDR>; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = P30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT90S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 7; socket.checksum = 2;
|
||||||
SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
SELECT COUNT(*) FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||||
WHERE VARIABLE_NAME LIKE 'wsrep_%'
|
WHERE VARIABLE_NAME LIKE 'wsrep_%'
|
||||||
AND VARIABLE_NAME != 'wsrep_debug_sync_waiters';
|
AND VARIABLE_NAME != 'wsrep_debug_sync_waiters';
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
DROP TABLE IF EXISTS t1, t2;
|
||||||
FLUSH DES_KEY_FILE;
|
FLUSH DES_KEY_FILE;
|
||||||
wsrep_last_committed_diff
|
wsrep_last_committed_diff
|
||||||
1
|
1
|
||||||
@@ -26,6 +27,37 @@ CREATE TABLE t2 (f1 INTEGER);
|
|||||||
FLUSH TABLES t2;
|
FLUSH TABLES t2;
|
||||||
wsrep_last_committed_diff
|
wsrep_last_committed_diff
|
||||||
1
|
1
|
||||||
|
FLUSH ERROR LOGS;
|
||||||
|
wsrep_last_committed_diff
|
||||||
|
1
|
||||||
|
FLUSH SLOW LOGS;
|
||||||
|
wsrep_last_committed_diff
|
||||||
|
1
|
||||||
|
FLUSH GENERAL LOGS;
|
||||||
|
wsrep_last_committed_diff
|
||||||
|
1
|
||||||
|
FLUSH ENGINE LOGS;
|
||||||
|
wsrep_last_committed_diff
|
||||||
|
1
|
||||||
|
FLUSH RELAY LOGS;
|
||||||
|
wsrep_last_committed_diff
|
||||||
|
1
|
||||||
|
SET @userstat_old= @@userstat;
|
||||||
|
SET GLOBAL userstat=ON;
|
||||||
|
FLUSH CLIENT_STATISTICS;
|
||||||
|
FLUSH INDEX_STATISTICS;
|
||||||
|
FLUSH TABLE_STATISTICS;
|
||||||
|
FLUSH USER_STATISTICS;
|
||||||
|
wsrep_last_committed_diff
|
||||||
|
1
|
||||||
|
SET @old_thread_statistics= @@global.thread_statistics;
|
||||||
|
SET GLOBAL thread_statistics= ON;
|
||||||
|
FLUSH THREAD_STATISTICS;
|
||||||
|
wsrep_last_committed_diff
|
||||||
|
1
|
||||||
|
FLUSH CHANGED_PAGE_BITMAPS;
|
||||||
|
wsrep_last_committed_diff
|
||||||
|
1
|
||||||
CREATE TABLE t1 (f1 INTEGER);
|
CREATE TABLE t1 (f1 INTEGER);
|
||||||
FLUSH LOGS;
|
FLUSH LOGS;
|
||||||
FLUSH TABLES WITH READ LOCK;
|
FLUSH TABLES WITH READ LOCK;
|
||||||
@@ -52,3 +84,5 @@ wsrep_last_committed_diff
|
|||||||
1
|
1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
SET GLOBAL userstat= @userstat_old;
|
||||||
|
SET GLOBAL thread_statistics= @old_thread_statistics;
|
||||||
|
145
mysql-test/suite/galera/r/galera_flush_local.result
Normal file
145
mysql-test/suite/galera/r/galera_flush_local.result
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
DROP TABLE IF EXISTS t1, t2, x1, x2;
|
||||||
|
CREATE TABLE t1 (f1 INTEGER);
|
||||||
|
CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
|
||||||
|
CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
|
||||||
|
CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
INSERT INTO x1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
INSERT INTO t2 (f2) SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4;
|
||||||
|
INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
FLUSH LOCAL DES_KEY_FILE;
|
||||||
|
FLUSH LOCAL HOSTS;
|
||||||
|
FLUSH LOCAL QUERY CACHE;
|
||||||
|
FLUSH LOCAL STATUS;
|
||||||
|
FLUSH LOCAL PRIVILEGES;
|
||||||
|
FLUSH LOCAL USER_RESOURCES;
|
||||||
|
FLUSH LOCAL TABLES;
|
||||||
|
FLUSH LOCAL TABLES t2;
|
||||||
|
FLUSH LOCAL ERROR LOGS;
|
||||||
|
FLUSH LOCAL SLOW LOGS;
|
||||||
|
FLUSH LOCAL GENERAL LOGS;
|
||||||
|
FLUSH LOCAL ENGINE LOGS;
|
||||||
|
FLUSH LOCAL RELAY LOGS;
|
||||||
|
FLUSH LOCAL CLIENT_STATISTICS;
|
||||||
|
FLUSH LOCAL INDEX_STATISTICS;
|
||||||
|
FLUSH LOCAL TABLE_STATISTICS;
|
||||||
|
FLUSH LOCAL USER_STATISTICS;
|
||||||
|
FLUSH LOCAL LOGS;
|
||||||
|
FLUSH LOCAL BINARY LOGS;
|
||||||
|
FLUSH LOCAL TABLES WITH READ LOCK;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH LOCAL TABLES t1 WITH READ LOCK;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH LOCAL TABLES t1 FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
FLUSH LOCAL TABLES t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
LOCK TABLES t1 READ;
|
||||||
|
FLUSH LOCAL TABLES t1;
|
||||||
|
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH LOCAL TABLES t1;
|
||||||
|
ANALYZE LOCAL TABLE t1, t2;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status OK
|
||||||
|
test.t2 analyze status OK
|
||||||
|
OPTIMIZE LOCAL TABLE t1, t2;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||||
|
test.t1 optimize status OK
|
||||||
|
test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||||
|
test.t2 optimize status OK
|
||||||
|
REPAIR LOCAL TABLE x1, x2;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.x1 repair status OK
|
||||||
|
test.x2 repair status OK
|
||||||
|
wsrep_last_committed_diff
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 10 FROM t1;
|
||||||
|
COUNT(*) = 10
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 10 FROM x1;
|
||||||
|
COUNT(*) = 10
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 10000 FROM t2;
|
||||||
|
COUNT(*) = 10000
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 10 FROM x2;
|
||||||
|
COUNT(*) = 10
|
||||||
|
1
|
||||||
|
DROP TABLE t1, t2, x1, x2;
|
||||||
|
CREATE TABLE t1 (f1 INTEGER);
|
||||||
|
CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
|
||||||
|
CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
|
||||||
|
CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
INSERT INTO x1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
INSERT INTO t2 (f2) SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4;
|
||||||
|
INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
set wsrep_on=0;
|
||||||
|
FLUSH DES_KEY_FILE;
|
||||||
|
FLUSH HOSTS;
|
||||||
|
FLUSH QUERY CACHE;
|
||||||
|
FLUSH STATUS;
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
FLUSH USER_RESOURCES;
|
||||||
|
FLUSH TABLES;
|
||||||
|
FLUSH TABLES t2;
|
||||||
|
FLUSH ERROR LOGS;
|
||||||
|
FLUSH SLOW LOGS;
|
||||||
|
FLUSH GENERAL LOGS;
|
||||||
|
FLUSH ENGINE LOGS;
|
||||||
|
FLUSH RELAY LOGS;
|
||||||
|
FLUSH CLIENT_STATISTICS;
|
||||||
|
FLUSH INDEX_STATISTICS;
|
||||||
|
FLUSH TABLE_STATISTICS;
|
||||||
|
FLUSH USER_STATISTICS;
|
||||||
|
FLUSH LOGS;
|
||||||
|
FLUSH BINARY LOGS;
|
||||||
|
FLUSH TABLES WITH READ LOCK;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES t1 WITH READ LOCK;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES t1 FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
FLUSH TABLES t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
LOCK TABLES t1 READ;
|
||||||
|
FLUSH TABLES t1;
|
||||||
|
ERROR HY000: Table 't1' was locked with a READ lock and can't be updated
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES t1;
|
||||||
|
ANALYZE TABLE t1, t2;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status OK
|
||||||
|
test.t2 analyze status OK
|
||||||
|
OPTIMIZE TABLE t1, t2;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||||
|
test.t1 optimize status OK
|
||||||
|
test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||||
|
test.t2 optimize status OK
|
||||||
|
REPAIR TABLE x1, x2;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.x1 repair status OK
|
||||||
|
test.x2 repair status OK
|
||||||
|
wsrep_last_committed_diff
|
||||||
|
1
|
||||||
|
wsrep_last_committed_diff2
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 10 FROM t1;
|
||||||
|
COUNT(*) = 10
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 10 FROM x1;
|
||||||
|
COUNT(*) = 10
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 10000 FROM t2;
|
||||||
|
COUNT(*) = 10000
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 10 FROM x2;
|
||||||
|
COUNT(*) = 10
|
||||||
|
1
|
||||||
|
set wsrep_on=1;
|
||||||
|
DROP TABLE t1, t2, x1, x2;
|
@@ -2,6 +2,8 @@ CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
|||||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
|
SET SESSION wsrep_on = 0;
|
||||||
|
SET SESSION wsrep_on = 1;
|
||||||
SELECT COUNT(*) = 0 FROM t1;
|
SELECT COUNT(*) = 0 FROM t1;
|
||||||
COUNT(*) = 0
|
COUNT(*) = 0
|
||||||
1
|
1
|
||||||
|
24
mysql-test/suite/galera/r/galera_gcs_fragment.result
Normal file
24
mysql-test/suite/galera/r/galera_gcs_fragment.result
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 TEXT);
|
||||||
|
SET GLOBAL wsrep_cluster_address='';
|
||||||
|
SET SESSION wsrep_sync_wait=0;
|
||||||
|
SET GLOBAL wsrep_provider_options = 'dbug=d,gcs_core_after_frag_send';
|
||||||
|
SET SESSION wsrep_retry_autocommit=0;
|
||||||
|
INSERT INTO t1 VALUES (1, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||||
|
SET SESSION wsrep_on = 0;
|
||||||
|
SET SESSION wsrep_on = 1;
|
||||||
|
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||||
|
SET SESSION wsrep_on = 0;
|
||||||
|
SET SESSION wsrep_on = 1;
|
||||||
|
INSERT INTO t1 VALUES (2, "bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||||
|
SET GLOBAL wsrep_provider_options = 'signal=gcs_core_after_frag_send';
|
||||||
|
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||||
|
INSERT INTO t1 VALUES (3, "cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1 f2
|
||||||
|
2 bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
3 cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
SELECT * FROM t1;
|
||||||
|
f1 f2
|
||||||
|
2 bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
3 cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
||||||
|
DROP TABLE t1;
|
@@ -16,19 +16,19 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||||||
mysqld-bin.000002 # Gtid # # GTID 0-1-1
|
mysqld-bin.000002 # Gtid # # GTID 0-1-1
|
||||||
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
|
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
|
||||||
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-2
|
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-2
|
||||||
mysqld-bin.000002 # Table_map # # table_id: 48 (test.t1)
|
mysqld-bin.000002 # Table_map # # table_id: # (test.t1)
|
||||||
mysqld-bin.000002 # Write_rows_v1 # # table_id: 48 flags: STMT_END_F
|
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
mysqld-bin.000002 # Xid # # COMMIT /* xid=2 */
|
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
|
||||||
mysqld-bin.000002 # Gtid # # GTID 0-1-3
|
mysqld-bin.000002 # Gtid # # GTID 0-1-3
|
||||||
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
|
mysqld-bin.000002 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
|
||||||
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-4
|
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-4
|
||||||
mysqld-bin.000002 # Table_map # # table_id: 49 (test.t2)
|
mysqld-bin.000002 # Table_map # # table_id: # (test.t2)
|
||||||
mysqld-bin.000002 # Write_rows_v1 # # table_id: 49 flags: STMT_END_F
|
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
mysqld-bin.000002 # Xid # # COMMIT /* xid=4 */
|
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
|
||||||
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-5
|
mysqld-bin.000002 # Gtid # # BEGIN GTID 0-1-5
|
||||||
mysqld-bin.000002 # Table_map # # table_id: 49 (test.t2)
|
mysqld-bin.000002 # Table_map # # table_id: # (test.t2)
|
||||||
mysqld-bin.000002 # Write_rows_v1 # # table_id: 49 flags: STMT_END_F
|
mysqld-bin.000002 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
mysqld-bin.000002 # Xid # # COMMIT /* xid=5 */
|
mysqld-bin.000002 # Xid # # COMMIT /* xid=# */
|
||||||
mysqld-bin.000002 # Gtid # # GTID 0-1-6
|
mysqld-bin.000002 # Gtid # # GTID 0-1-6
|
||||||
mysqld-bin.000002 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
|
mysqld-bin.000002 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
|
||||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
@@ -39,20 +39,21 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
|||||||
mysqld-bin.000003 # Gtid # # GTID 0-1-1
|
mysqld-bin.000003 # Gtid # # GTID 0-1-1
|
||||||
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
|
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
|
||||||
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-2
|
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-2
|
||||||
mysqld-bin.000003 # Table_map # # table_id: 30 (test.t1)
|
mysqld-bin.000003 # Table_map # # table_id: # (test.t1)
|
||||||
mysqld-bin.000003 # Write_rows_v1 # # table_id: 30 flags: STMT_END_F
|
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
mysqld-bin.000003 # Xid # # COMMIT /* xid=2 */
|
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
|
||||||
mysqld-bin.000003 # Gtid # # GTID 0-1-3
|
mysqld-bin.000003 # Gtid # # GTID 0-1-3
|
||||||
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
|
mysqld-bin.000003 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
|
||||||
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-4
|
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-4
|
||||||
mysqld-bin.000003 # Table_map # # table_id: 31 (test.t2)
|
mysqld-bin.000003 # Table_map # # table_id: # (test.t2)
|
||||||
mysqld-bin.000003 # Write_rows_v1 # # table_id: 31 flags: STMT_END_F
|
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
mysqld-bin.000003 # Xid # # COMMIT /* xid=4 */
|
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
|
||||||
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-5
|
mysqld-bin.000003 # Gtid # # BEGIN GTID 0-1-5
|
||||||
mysqld-bin.000003 # Table_map # # table_id: 31 (test.t2)
|
mysqld-bin.000003 # Table_map # # table_id: # (test.t2)
|
||||||
mysqld-bin.000003 # Write_rows_v1 # # table_id: 31 flags: STMT_END_F
|
mysqld-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
mysqld-bin.000003 # Xid # # COMMIT /* xid=5 */
|
mysqld-bin.000003 # Xid # # COMMIT /* xid=# */
|
||||||
mysqld-bin.000003 # Gtid # # GTID 0-1-6
|
mysqld-bin.000003 # Gtid # # GTID 0-1-6
|
||||||
mysqld-bin.000003 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
|
mysqld-bin.000003 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
RESET MASTER;
|
||||||
|
38
mysql-test/suite/galera/r/galera_mdl_race.result
Normal file
38
mysql-test/suite/galera/r/galera_mdl_race.result
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
|
||||||
|
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
|
||||||
|
INSERT INTO t1 VALUES (1, 'a');
|
||||||
|
INSERT INTO t1 VALUES (2, 'a');
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
START TRANSACTION;
|
||||||
|
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||||
|
LOCK TABLE t2 WRITE;
|
||||||
|
SET GLOBAL DEBUG = "d,sync.wsrep_before_mdl_wait";
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
|
SELECT * FROM t2;;
|
||||||
|
SET GLOBAL DEBUG = "d,sync.wsrep_after_BF_victim_lock";
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
|
UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
|
||||||
|
SET GLOBAL DEBUG = "";
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
|
||||||
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
|
||||||
|
UNLOCK TABLES;
|
||||||
|
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||||
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
|
||||||
|
COUNT(*) = 1
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
|
||||||
|
COUNT(*) = 1
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
|
||||||
|
COUNT(*) = 1
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
|
||||||
|
COUNT(*) = 1
|
||||||
|
1
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP TABLE t2;
|
||||||
|
SET DEBUG_SYNC = "RESET";
|
@@ -0,0 +1,58 @@
|
|||||||
|
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S";
|
||||||
|
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
||||||
|
SELECT MAX(id) FROM t1;
|
||||||
|
MAX(id)
|
||||||
|
1
|
||||||
|
INSERT INTO t1 VALUES (2);
|
||||||
|
SELECT MAX(id) FROM t1;
|
||||||
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
SET GLOBAL DEBUG = "";
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||||
|
FLUSH QUERY CACHE;
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
||||||
|
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
|
SET DEBUG_SYNC = "RESET";
|
||||||
|
INSERT INTO t1 VALUES (3);
|
||||||
|
SELECT MAX(id) FROM t1;
|
||||||
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
SET GLOBAL DEBUG = "";
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||||
|
INSERT INTO t1 VALUES (4);
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
||||||
|
SELECT MAX(id) FROM t1;
|
||||||
|
MAX(id)
|
||||||
|
4
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
||||||
|
FLUSH STATUS;
|
||||||
|
SELECT MAX(id) FROM t1;
|
||||||
|
MAX(id)
|
||||||
|
4
|
||||||
|
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
|
||||||
|
VARIABLE_VALUE = 1
|
||||||
|
1
|
||||||
|
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
|
INSERT INTO t1 VALUES (5);
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
||||||
|
SELECT MAX(id) FROM t1 ;
|
||||||
|
SET GLOBAL DEBUG = "";
|
||||||
|
Warnings:
|
||||||
|
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||||
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||||
|
MAX(id)
|
||||||
|
5
|
||||||
|
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
|
||||||
|
VARIABLE_VALUE = 1
|
||||||
|
1
|
42
mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
Normal file
42
mysql-test/suite/galera/r/galera_rsu_wsrep_desync.result
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
|
||||||
|
SET GLOBAL wsrep_desync=1;
|
||||||
|
SET wsrep_OSU_method=RSU;
|
||||||
|
SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
|
||||||
|
ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
|
||||||
|
SET GLOBAL wsrep_desync=0;
|
||||||
|
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`f1` int(11) DEFAULT NULL,
|
||||||
|
`f2` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
SHOW VARIABLES LIKE 'wsrep_desync';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_desync OFF
|
||||||
|
SET wsrep_OSU_method=TOI;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
|
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
|
||||||
|
SET GLOBAL wsrep_desync=0;
|
||||||
|
Warnings:
|
||||||
|
Warning 1231 'wsrep_desync' is already OFF.
|
||||||
|
SET wsrep_OSU_method=RSU;
|
||||||
|
SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
|
||||||
|
ALTER TABLE t1 ADD COLUMN f2 INTEGER;;
|
||||||
|
SET GLOBAL wsrep_desync=1;
|
||||||
|
ERROR HY000: Operation 'desync' failed for SET GLOBAL wsrep_desync=1
|
||||||
|
SET GLOBAL wsrep_desync=0;
|
||||||
|
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`f1` int(11) DEFAULT NULL,
|
||||||
|
`f2` int(11) DEFAULT NULL
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||||
|
SET wsrep_OSU_method=TOI;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
|
CALL mtr.add_suppression("Protocol violation");
|
||||||
|
CALL mtr.add_suppression("desync failed");
|
||||||
|
CALL mtr.add_suppression("Protocol violation");
|
@@ -104,3 +104,5 @@ CALL mtr.add_suppression("Can't open and lock privilege tables");
|
|||||||
CALL mtr.add_suppression("Info table is not ready to be used");
|
CALL mtr.add_suppression("Info table is not ready to be used");
|
||||||
CALL mtr.add_suppression("Native table .* has the wrong structure");
|
CALL mtr.add_suppression("Native table .* has the wrong structure");
|
||||||
DROP USER sslsst;
|
DROP USER sslsst;
|
||||||
|
SET GLOBAL general_log = ON;
|
||||||
|
SET GLOBAL slow_query_log = ON;
|
||||||
|
39
mysql-test/suite/galera/r/galera_sync_wait_show.result
Normal file
39
mysql-test/suite/galera/r/galera_sync_wait_show.result
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
SET SESSION wsrep_sync_wait = 1;
|
||||||
|
CREATE DATABASE db1;
|
||||||
|
SHOW CREATE DATABASE db1;
|
||||||
|
Database Create Database
|
||||||
|
db1 CREATE DATABASE `db1` /*!40100 DEFAULT CHARACTER SET latin1 */
|
||||||
|
DROP DATABASE db1;
|
||||||
|
CREATE PROCEDURE p1 () SELECT 1 FROM DUAL;
|
||||||
|
SHOW CREATE PROCEDURE p1;
|
||||||
|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||||
|
p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
|
||||||
|
SELECT 1 FROM DUAL latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
CREATE PROCEDURE p1 () SELECT 1 FROM DUAL;
|
||||||
|
SHOW PROCEDURE CODE p1;
|
||||||
|
Pos Instruction
|
||||||
|
0 stmt 0 "SELECT 1 FROM DUAL"
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123;
|
||||||
|
SHOW CREATE FUNCTION f1;
|
||||||
|
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
||||||
|
f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
|
||||||
|
RETURN 123 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123;
|
||||||
|
SHOW FUNCTION CODE f1;
|
||||||
|
Pos Instruction
|
||||||
|
0 freturn 3 123
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
|
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a';
|
||||||
|
SHOW CREATE TRIGGER tr1;
|
||||||
|
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation
|
||||||
|
tr1 CREATE DEFINER=`root`@`localhost` TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a' latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1;
|
||||||
|
SHOW CREATE EVENT event1;
|
||||||
|
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
|
||||||
|
event1 SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `event1` ON SCHEDULE AT '2038-01-01 23:59:59' ON COMPLETION NOT PRESERVE DISABLE ON SLAVE DO SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
|
DROP EVENT event1;
|
@@ -10,6 +10,8 @@ f1 f2
|
|||||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
|
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_enter_sync';
|
||||||
COMMIT;;
|
COMMIT;;
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
|
SET SESSION wsrep_on = 0;
|
||||||
|
SET SESSION wsrep_on = 1;
|
||||||
UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
|
UPDATE t1 SET f2 = 'c' WHERE f1 = 2;
|
||||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
|
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_enter_sync';
|
||||||
|
18
mysql-test/suite/galera/r/mysql-wsrep#198.result
Normal file
18
mysql-test/suite/galera/r/mysql-wsrep#198.result
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t2 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
LOCK TABLE t2 WRITE;
|
||||||
|
OPTIMIZE TABLE t1,t2;;
|
||||||
|
REPAIR TABLE t1,t2;;
|
||||||
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
|
INSERT INTO t2 VALUES (1);
|
||||||
|
UNLOCK TABLES;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||||
|
test.t1 optimize status OK
|
||||||
|
test.t2 optimize note Table does not support optimize, doing recreate + analyze instead
|
||||||
|
test.t2 optimize status OK
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 repair note The storage engine for the table doesn't support repair
|
||||||
|
test.t2 repair note The storage engine for the table doesn't support repair
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP TABLE t2;
|
4
mysql-test/suite/galera/r/mysql-wsrep#201.result
Normal file
4
mysql-test/suite/galera/r/mysql-wsrep#201.result
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (DEFAULT);
|
||||||
|
SET GLOBAL query_cache_size=1355776;
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
10
mysql-test/suite/galera/r/mysql-wsrep#237.result
Normal file
10
mysql-test/suite/galera/r/mysql-wsrep#237.result
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
CREATE TABLE t (f1 INTEGER PRIMARY KEY) Engine=InnoDB;
|
||||||
|
SET DEBUG_SYNC = 'wsrep_before_replication WAIT_FOR continue';
|
||||||
|
INSERT INTO t values (1);;
|
||||||
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
|
FLUSH TABLES;
|
||||||
|
SELECT SLEEP(1);
|
||||||
|
SLEEP(1)
|
||||||
|
0
|
||||||
|
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||||
|
DROP TABLE t;
|
11
mysql-test/suite/galera/r/mysql-wsrep#247.result
Normal file
11
mysql-test/suite/galera/r/mysql-wsrep#247.result
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
SET GLOBAL wsrep_desync=1;
|
||||||
|
SET wsrep_OSU_method=RSU;
|
||||||
|
CREATE TABLE t1 (i int primary key);
|
||||||
|
SHOW VARIABLES LIKE 'wsrep_desync';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_desync ON
|
||||||
|
SET GLOBAL wsrep_desync=0;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SHOW VARIABLES LIKE 'wsrep_desync';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_desync OFF
|
10
mysql-test/suite/galera/r/mysql-wsrep#31.result
Normal file
10
mysql-test/suite/galera/r/mysql-wsrep#31.result
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES('test');
|
||||||
|
CREATE DATABASE db;
|
||||||
|
Shutting down server 2 ...
|
||||||
|
Recovering server 2 ...
|
||||||
|
Performing --wsrep-recover ...
|
||||||
|
Restarting server ...
|
||||||
|
Using --wsrep-start-position when starting mysqld ...
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP DATABASE db;
|
@@ -26,6 +26,7 @@ SET SESSION wsrep_sync_wait = 0;
|
|||||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
|
--sleep 1
|
||||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
@@ -33,6 +33,8 @@ RETURN 123;
|
|||||||
SHOW CREATE FUNCTION f1;
|
SHOW CREATE FUNCTION f1;
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
|
# Work around codership/mysql-wsrep#228 - SHOW CREATE FUNCTION not covered by wsrep_sync_wait
|
||||||
|
SELECT 1 FROM DUAL;
|
||||||
SHOW CREATE FUNCTION f1;
|
SHOW CREATE FUNCTION f1;
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
@@ -49,9 +51,3 @@ DROP FUNCTION f1;
|
|||||||
DROP FUNCTION f2;
|
DROP FUNCTION f2;
|
||||||
|
|
||||||
DROP USER 'user1';
|
DROP USER 'user1';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -7,6 +7,9 @@
|
|||||||
--source include/have_perfschema.inc
|
--source include/have_perfschema.inc
|
||||||
--source include/have_query_cache.inc
|
--source include/have_query_cache.inc
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1, t2;
|
||||||
|
--enable_warnings
|
||||||
#
|
#
|
||||||
# The following FLUSH statements should be replicated
|
# The following FLUSH statements should be replicated
|
||||||
#
|
#
|
||||||
@@ -101,6 +104,101 @@ FLUSH TABLES t2;
|
|||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--connection node_1
|
||||||
|
FLUSH ERROR LOGS;
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--connection node_1
|
||||||
|
FLUSH SLOW LOGS;
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--connection node_1
|
||||||
|
FLUSH GENERAL LOGS;
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--connection node_1
|
||||||
|
FLUSH ENGINE LOGS;
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--connection node_1
|
||||||
|
FLUSH RELAY LOGS;
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
SET @userstat_old= @@userstat;
|
||||||
|
SET GLOBAL userstat=ON;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--connection node_1
|
||||||
|
FLUSH CLIENT_STATISTICS;
|
||||||
|
FLUSH INDEX_STATISTICS;
|
||||||
|
FLUSH TABLE_STATISTICS;
|
||||||
|
FLUSH USER_STATISTICS;
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 4 AS wsrep_last_committed_diff;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
SET @old_thread_statistics= @@global.thread_statistics;
|
||||||
|
SET GLOBAL thread_statistics= ON;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--connection node_1
|
||||||
|
FLUSH THREAD_STATISTICS;
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--connection node_1
|
||||||
|
FLUSH CHANGED_PAGE_BITMAPS;
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before + 1 AS wsrep_last_committed_diff;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# The following statements should not be replicated: FLUSH LOGS, FLUSH TABLES WITH LOCKS
|
# The following statements should not be replicated: FLUSH LOGS, FLUSH TABLES WITH LOCKS
|
||||||
#
|
#
|
||||||
@@ -171,3 +269,5 @@ FLUSH TABLES t1;
|
|||||||
--connection node_1
|
--connection node_1
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
SET GLOBAL userstat= @userstat_old;
|
||||||
|
SET GLOBAL thread_statistics= @old_thread_statistics;
|
||||||
|
1
mysql-test/suite/galera/t/galera_flush_local.opt
Normal file
1
mysql-test/suite/galera/t/galera_flush_local.opt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
--query_cache_type=1 --query_cache_size=1000000 --userstat=1 --wsrep_replicate_myisam=true
|
142
mysql-test/suite/galera/t/galera_flush_local.test
Normal file
142
mysql-test/suite/galera/t/galera_flush_local.test
Normal file
@@ -0,0 +1,142 @@
|
|||||||
|
#
|
||||||
|
# Test that various FLUSH LOCAL commands are replicated. Whenever possible, check the slave for the effects.
|
||||||
|
# PXC-391
|
||||||
|
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_query_cache.inc
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1, t2, x1, x2;
|
||||||
|
--enable_warnings
|
||||||
|
#
|
||||||
|
# The following FLUSH LOCAL statements should *not* be replicated
|
||||||
|
#
|
||||||
|
--connection node_1
|
||||||
|
CREATE TABLE t1 (f1 INTEGER);
|
||||||
|
CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
|
||||||
|
CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
|
||||||
|
CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
INSERT INTO x1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
INSERT INTO t2 (f2) SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4;
|
||||||
|
INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_before = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--connection node_1
|
||||||
|
FLUSH LOCAL DES_KEY_FILE;
|
||||||
|
FLUSH LOCAL HOSTS;
|
||||||
|
FLUSH LOCAL QUERY CACHE;
|
||||||
|
FLUSH LOCAL STATUS;
|
||||||
|
FLUSH LOCAL PRIVILEGES;
|
||||||
|
FLUSH LOCAL USER_RESOURCES;
|
||||||
|
FLUSH LOCAL TABLES;
|
||||||
|
FLUSH LOCAL TABLES t2;
|
||||||
|
FLUSH LOCAL ERROR LOGS;
|
||||||
|
FLUSH LOCAL SLOW LOGS;
|
||||||
|
FLUSH LOCAL GENERAL LOGS;
|
||||||
|
FLUSH LOCAL ENGINE LOGS;
|
||||||
|
FLUSH LOCAL RELAY LOGS;
|
||||||
|
FLUSH LOCAL CLIENT_STATISTICS;
|
||||||
|
FLUSH LOCAL INDEX_STATISTICS;
|
||||||
|
FLUSH LOCAL TABLE_STATISTICS;
|
||||||
|
FLUSH LOCAL USER_STATISTICS;
|
||||||
|
FLUSH LOCAL LOGS;
|
||||||
|
FLUSH LOCAL BINARY LOGS;
|
||||||
|
FLUSH LOCAL TABLES WITH READ LOCK;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH LOCAL TABLES t1 WITH READ LOCK;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH LOCAL TABLES t1 FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
FLUSH LOCAL TABLES t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
LOCK TABLES t1 READ;
|
||||||
|
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||||
|
FLUSH LOCAL TABLES t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH LOCAL TABLES t1;
|
||||||
|
ANALYZE LOCAL TABLE t1, t2;
|
||||||
|
OPTIMIZE LOCAL TABLE t1, t2;
|
||||||
|
REPAIR LOCAL TABLE x1, x2;
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_after = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT $wsrep_last_committed_after = $wsrep_last_committed_before AS wsrep_last_committed_diff;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
SELECT COUNT(*) = 10 FROM t1;
|
||||||
|
SELECT COUNT(*) = 10 FROM x1;
|
||||||
|
SELECT COUNT(*) = 10000 FROM t2;
|
||||||
|
SELECT COUNT(*) = 10 FROM x2;
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
DROP TABLE t1, t2, x1, x2;
|
||||||
|
CREATE TABLE t1 (f1 INTEGER);
|
||||||
|
CREATE TABLE t2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER);
|
||||||
|
CREATE TABLE x1 (f1 INTEGER) ENGINE=MyISAM;
|
||||||
|
CREATE TABLE x2 (f1 INT PRIMARY KEY AUTO_INCREMENT, f2 INTEGER) ENGINE=MyISAM;
|
||||||
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
INSERT INTO x1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
INSERT INTO t2 (f2) SELECT 1 FROM t1 AS a1, t1 AS a2, t1 AS a3, t1 AS a4;
|
||||||
|
INSERT INTO x2 (f2) VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_before2 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--connection node_1
|
||||||
|
set wsrep_on=0;
|
||||||
|
FLUSH DES_KEY_FILE;
|
||||||
|
FLUSH HOSTS;
|
||||||
|
FLUSH QUERY CACHE;
|
||||||
|
FLUSH STATUS;
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
FLUSH USER_RESOURCES;
|
||||||
|
FLUSH TABLES;
|
||||||
|
FLUSH TABLES t2;
|
||||||
|
FLUSH ERROR LOGS;
|
||||||
|
FLUSH SLOW LOGS;
|
||||||
|
FLUSH GENERAL LOGS;
|
||||||
|
FLUSH ENGINE LOGS;
|
||||||
|
FLUSH RELAY LOGS;
|
||||||
|
FLUSH CLIENT_STATISTICS;
|
||||||
|
FLUSH INDEX_STATISTICS;
|
||||||
|
FLUSH TABLE_STATISTICS;
|
||||||
|
FLUSH USER_STATISTICS;
|
||||||
|
FLUSH LOGS;
|
||||||
|
FLUSH BINARY LOGS;
|
||||||
|
FLUSH TABLES WITH READ LOCK;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES t1 WITH READ LOCK;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES t1 FOR EXPORT;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
FLUSH TABLES t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
LOCK TABLES t1 READ;
|
||||||
|
--error ER_TABLE_NOT_LOCKED_FOR_WRITE
|
||||||
|
FLUSH TABLES t1;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
FLUSH TABLES t1;
|
||||||
|
ANALYZE TABLE t1, t2;
|
||||||
|
OPTIMIZE TABLE t1, t2;
|
||||||
|
REPAIR TABLE x1, x2;
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_last_committed_after2 = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'wsrep_last_committed'`
|
||||||
|
--disable_query_log
|
||||||
|
--eval SELECT $wsrep_last_committed_after2 = $wsrep_last_committed_before2 AS wsrep_last_committed_diff;
|
||||||
|
--eval SELECT $wsrep_last_committed_after2 = $wsrep_last_committed_before + 9 AS wsrep_last_committed_diff2;
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
SELECT COUNT(*) = 10 FROM t1;
|
||||||
|
SELECT COUNT(*) = 10 FROM x1;
|
||||||
|
SELECT COUNT(*) = 10000 FROM t2;
|
||||||
|
SELECT COUNT(*) = 10 FROM x2;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
set wsrep_on=1;
|
||||||
|
DROP TABLE t1, t2, x1, x2;
|
@@ -18,7 +18,9 @@
|
|||||||
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
|
|
||||||
|
--let $galera_sync_point = apply_monitor_slave_enter_sync
|
||||||
|
--source include/galera_set_sync_point.inc
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
INSERT INTO t1 VALUES (1);
|
INSERT INTO t1 VALUES (1);
|
||||||
@@ -27,8 +29,7 @@ INSERT INTO t1 VALUES (1);
|
|||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
|
|
||||||
# Wait until applier has blocked
|
# Wait until applier has blocked
|
||||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_debug_sync_waiters' AND VARIABLE_VALUE = 'apply_monitor_slave_enter_sync'
|
--source include/galera_wait_sync_point.inc
|
||||||
--source include/wait_condition.inc
|
|
||||||
|
|
||||||
SELECT COUNT(*) = 0 FROM t1;
|
SELECT COUNT(*) = 0 FROM t1;
|
||||||
|
|
||||||
@@ -41,8 +42,8 @@ SELECT COUNT(*) = 0 FROM t1;
|
|||||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Init' AND INFO = 'FLUSH TABLES WITH READ LOCK'
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'Init' AND INFO = 'FLUSH TABLES WITH READ LOCK'
|
||||||
--source include/wait_condition.inc
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
--source include/galera_clear_sync_point.inc
|
||||||
SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
|
--source include/galera_signal_sync_point.inc
|
||||||
|
|
||||||
--connection node_2a
|
--connection node_2a
|
||||||
--reap
|
--reap
|
||||||
|
5
mysql-test/suite/galera/t/galera_gcs_fragment.cnf
Normal file
5
mysql-test/suite/galera/t/galera_gcs_fragment.cnf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
!include ../galera_2nodes.cnf
|
||||||
|
[mysqld.1]
|
||||||
|
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcs.max_packet_size=64'
|
||||||
|
[mysqld.2]
|
||||||
|
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcs.max_packet_size=64'
|
66
mysql-test/suite/galera/t/galera_gcs_fragment.test
Normal file
66
mysql-test/suite/galera/t/galera_gcs_fragment.test
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
# Test fragmentation over configuration changes
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
# Prepare table
|
||||||
|
CREATE TABLE t1 (f1 INT PRIMARY KEY, f2 TEXT);
|
||||||
|
|
||||||
|
# Stop node2
|
||||||
|
|
||||||
|
# Disconnect node_2 from group
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_cluster_address_orig = `select @@wsrep_cluster_address`
|
||||||
|
SET GLOBAL wsrep_cluster_address='';
|
||||||
|
|
||||||
|
# Connection for sync points
|
||||||
|
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||||
|
SET SESSION wsrep_sync_wait=0;
|
||||||
|
|
||||||
|
# Set breakpoint in gcs after first fragment send
|
||||||
|
|
||||||
|
--let $galera_sync_point = gcs_core_after_frag_send
|
||||||
|
--source include/galera_set_sync_point.inc
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
SET SESSION wsrep_retry_autocommit=0;
|
||||||
|
--send INSERT INTO t1 VALUES (1, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
|
||||||
|
|
||||||
|
--connection node_1a
|
||||||
|
--source include/galera_wait_sync_point.inc
|
||||||
|
--source include/galera_clear_sync_point.inc
|
||||||
|
|
||||||
|
|
||||||
|
# Restart node_2, wait until it joins the group and then make INSERT
|
||||||
|
--connection node_2
|
||||||
|
--disable_query_log
|
||||||
|
--eval SET GLOBAL wsrep_cluster_address = '$wsrep_cluster_address_orig'
|
||||||
|
--enable_query_log
|
||||||
|
SET SESSION wsrep_on = 0;
|
||||||
|
--source include/galera_wait_ready.inc
|
||||||
|
SET SESSION wsrep_on = 1;
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES (2, "bbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||||
|
|
||||||
|
# Signal node_1 to continue
|
||||||
|
--connection node_1a
|
||||||
|
--source include/galera_signal_sync_point.inc
|
||||||
|
|
||||||
|
# Deadlock error should be returned since write set send was
|
||||||
|
# interrupted by gcs
|
||||||
|
--connection node_1
|
||||||
|
--error ER_LOCK_DEADLOCK
|
||||||
|
--reap
|
||||||
|
|
||||||
|
# Do additional insert to verify that node_1 remain operational
|
||||||
|
INSERT INTO t1 VALUES (3, "cccccaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||||
|
|
||||||
|
|
||||||
|
# Nodes node_1 and node_2 should now contain rows 2 and 3
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
@@ -27,7 +27,9 @@ UPDATE t1 SET f2 = 'c' WHERE f1 > 2;
|
|||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
# Make sure IST will block ...
|
# Make sure IST will block ...
|
||||||
SET GLOBAL wsrep_provider_options = 'dbug=d,recv_IST_after_apply_trx';
|
--let $galera_sync_point = recv_IST_after_apply_trx
|
||||||
|
--source include/galera_set_sync_point.inc
|
||||||
|
|
||||||
SET SESSION wsrep_sync_wait = 0;
|
SET SESSION wsrep_sync_wait = 0;
|
||||||
|
|
||||||
|
|
||||||
|
@@ -23,13 +23,17 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
|||||||
|
|
||||||
FLUSH LOGS;
|
FLUSH LOGS;
|
||||||
--replace_column 2 # 4 # 5 #
|
--replace_column 2 # 4 # 5 #
|
||||||
|
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
|
||||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18;
|
SHOW BINLOG EVENTS IN 'mysqld-bin.000002' LIMIT 4,18;
|
||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
--replace_column 2 # 4 # 5 #
|
--replace_column 2 # 4 # 5 #
|
||||||
|
--replace_regex /table_id: [0-9]+/table_id: #/ /xid=[0-9]+/xid=#/
|
||||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,18;
|
SHOW BINLOG EVENTS IN 'mysqld-bin.000003' LIMIT 3,18;
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
RESET MASTER;
|
||||||
|
79
mysql-test/suite/galera/t/galera_mdl_race.test
Normal file
79
mysql-test/suite/galera/t/galera_mdl_race.test
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
#
|
||||||
|
# This test tests a potential race condition in MDL locking
|
||||||
|
#
|
||||||
|
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_debug_sync.inc
|
||||||
|
|
||||||
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
|
||||||
|
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 CHAR(1));
|
||||||
|
INSERT INTO t1 VALUES (1, 'a');
|
||||||
|
INSERT INTO t1 VALUES (2, 'a');
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
START TRANSACTION;
|
||||||
|
|
||||||
|
UPDATE t1 SET f2 = 'b' WHERE f1 = 1;
|
||||||
|
|
||||||
|
# block access to t2
|
||||||
|
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||||
|
--connection node_1a
|
||||||
|
LOCK TABLE t2 WRITE;
|
||||||
|
|
||||||
|
# Block before MLD lock wait
|
||||||
|
--connection node_1
|
||||||
|
SET GLOBAL DEBUG = "d,sync.wsrep_before_mdl_wait";
|
||||||
|
--send SELECT * FROM t2;
|
||||||
|
|
||||||
|
# Wait for SELECT to be blocked
|
||||||
|
--connection node_1a
|
||||||
|
#--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIS WHERE STATE = 'System lock';
|
||||||
|
#--source include/wait_condition.inc
|
||||||
|
#--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'init' AND INFO = 'COMMIT';
|
||||||
|
#--source include/wait_condition.inc
|
||||||
|
|
||||||
|
# block applier to wait after BF victim is locked
|
||||||
|
SET GLOBAL DEBUG = "d,sync.wsrep_after_BF_victim_lock";
|
||||||
|
|
||||||
|
# Issue a conflicting update on node #2
|
||||||
|
--connection node_2
|
||||||
|
UPDATE t1 SET f2 = 'c' WHERE f1 = 1;
|
||||||
|
|
||||||
|
--sleep 3
|
||||||
|
|
||||||
|
# Unblock the SELECT, to enter wsrep_thd_is_BF
|
||||||
|
--connection node_1a
|
||||||
|
SET GLOBAL DEBUG = "";
|
||||||
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_before_mdl_wait";
|
||||||
|
|
||||||
|
--sleep 3
|
||||||
|
|
||||||
|
# unblock applier to try to BF the SELECT
|
||||||
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_after_BF_victim_lock";
|
||||||
|
|
||||||
|
|
||||||
|
# table lock is not needed anymore
|
||||||
|
--sleep 3
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
# SELECT succeeds
|
||||||
|
--connection node_1
|
||||||
|
|
||||||
|
--error ER_LOCK_DEADLOCK
|
||||||
|
--reap
|
||||||
|
|
||||||
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
|
||||||
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'a';
|
||||||
|
SELECT COUNT(*) = 1 FROM t1 WHERE f2 = 'c';
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
||||||
|
DROP TABLE t2;
|
||||||
|
|
||||||
|
--connection node_1a
|
||||||
|
SET DEBUG_SYNC = "RESET";
|
||||||
|
|
@@ -1,3 +1 @@
|
|||||||
--query_cache_type=1 --query_cache_size=1355776
|
--query_cache_type=1 --query_cache_size=1355776
|
||||||
|
|
||||||
|
|
||||||
|
@@ -0,0 +1 @@
|
|||||||
|
--query_cache_type=1 --query_cache_size=1355776
|
94
mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
Normal file
94
mysql-test/suite/galera/t/galera_query_cache_sync_wait.test
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_debug_sync.inc
|
||||||
|
--source include/have_query_cache.inc
|
||||||
|
|
||||||
|
CREATE TABLE t1 (id INT PRIMARY KEY AUTO_INCREMENT) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
|
||||||
|
SET GLOBAL wsrep_provider_options = "repl.causal_read_timeout=PT1S";
|
||||||
|
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
||||||
|
SELECT MAX(id) FROM t1; # first lookup miss
|
||||||
|
|
||||||
|
#
|
||||||
|
# Query cache hit, wait timeout
|
||||||
|
#
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
INSERT INTO t1 VALUES (2);
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
|
SELECT MAX(id) FROM t1;
|
||||||
|
SET GLOBAL DEBUG = "";
|
||||||
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||||
|
|
||||||
|
FLUSH QUERY CACHE;
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
||||||
|
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||||
|
SET DEBUG_SYNC = "RESET";
|
||||||
|
|
||||||
|
#
|
||||||
|
# Query cache miss, wait timeout
|
||||||
|
#
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
INSERT INTO t1 VALUES (3);
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
|
SELECT MAX(id) FROM t1;
|
||||||
|
SET GLOBAL DEBUG = "";
|
||||||
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||||
|
|
||||||
|
#
|
||||||
|
# Query cache miss
|
||||||
|
#
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
INSERT INTO t1 VALUES (4);
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
||||||
|
SELECT MAX(id) FROM t1;
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Query cache hit
|
||||||
|
#
|
||||||
|
|
||||||
|
FLUSH STATUS;
|
||||||
|
SELECT MAX(id) FROM t1;
|
||||||
|
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
|
||||||
|
SET GLOBAL DEBUG = "d,sync.wsrep_apply_cb";
|
||||||
|
|
||||||
|
#
|
||||||
|
# Query cache invalidated
|
||||||
|
#
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
INSERT INTO t1 VALUES (5);
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SET SESSION wsrep_sync_wait = 7;
|
||||||
|
--send SELECT MAX(id) FROM t1
|
||||||
|
|
||||||
|
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
|
||||||
|
--connection node_2a
|
||||||
|
SET GLOBAL DEBUG = "";
|
||||||
|
SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--reap
|
||||||
|
SELECT VARIABLE_VALUE = 1 FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME = 'Qcache_hits';
|
||||||
|
|
||||||
|
|
||||||
|
--disable_query_log
|
||||||
|
--eval SET GLOBAL wsrep_provider_options = "$wsrep_provider_options_orig"
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--connection node_2a
|
||||||
|
SET DEBUG_SYNC = "RESET";
|
78
mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test
Normal file
78
mysql-test/suite/galera/t/galera_rsu_wsrep_desync.test
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
#
|
||||||
|
# Test manipulating wsrep_desync while an RSU operation is in progress
|
||||||
|
#
|
||||||
|
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_debug_sync.inc
|
||||||
|
|
||||||
|
# First, test wsrep_desync 1 > 0 during DDL
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
|
||||||
|
|
||||||
|
SET GLOBAL wsrep_desync=1;
|
||||||
|
SET wsrep_OSU_method=RSU;
|
||||||
|
|
||||||
|
SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
|
||||||
|
--send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||||
|
|
||||||
|
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||||
|
--connection node_1a
|
||||||
|
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_open_tables'
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
SET GLOBAL wsrep_desync=0;
|
||||||
|
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
--reap
|
||||||
|
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
SHOW VARIABLES LIKE 'wsrep_desync';
|
||||||
|
SET wsrep_OSU_method=TOI;
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
|
|
||||||
|
# Next, test wsrep_desync 0 > 1 during DDL, currently not allowed
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
CREATE TABLE t1 (f1 INTEGER) Engine=InnoDB;
|
||||||
|
|
||||||
|
SET GLOBAL wsrep_desync=0;
|
||||||
|
SET wsrep_OSU_method=RSU;
|
||||||
|
|
||||||
|
SET DEBUG_SYNC = 'alter_table_before_open_tables WAIT_FOR continue';
|
||||||
|
--send ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||||
|
|
||||||
|
--connection node_1a
|
||||||
|
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.PROCESSLIST WHERE STATE = 'debug sync point: alter_table_before_open_tables'
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
# This transition is currently not allowed
|
||||||
|
--error ER_CANNOT_USER
|
||||||
|
SET GLOBAL wsrep_desync=1;
|
||||||
|
SET GLOBAL wsrep_desync=0;
|
||||||
|
|
||||||
|
SET DEBUG_SYNC= 'now SIGNAL continue';
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
--reap
|
||||||
|
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
|
||||||
|
# Restore old state
|
||||||
|
SET wsrep_OSU_method=TOI;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET DEBUG_SYNC= 'RESET';
|
||||||
|
|
||||||
|
CALL mtr.add_suppression("Protocol violation");
|
||||||
|
CALL mtr.add_suppression("desync failed");
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
CALL mtr.add_suppression("Protocol violation");
|
||||||
|
|
||||||
|
|
@@ -20,3 +20,10 @@ SET GLOBAL wsrep_sst_auth = 'sslsst:';
|
|||||||
|
|
||||||
--source suite/galera/include/galera_sst_restore.inc
|
--source suite/galera/include/galera_sst_restore.inc
|
||||||
DROP USER sslsst;
|
DROP USER sslsst;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
# We have to manually restore global_log and slow_query_log due to mysql-wsrep#108
|
||||||
|
# Otherwise MTR's check_testcases complains
|
||||||
|
|
||||||
|
SET GLOBAL general_log = ON;
|
||||||
|
SET GLOBAL slow_query_log = ON;
|
||||||
|
68
mysql-test/suite/galera/t/galera_sync_wait_show.test
Normal file
68
mysql-test/suite/galera/t/galera_sync_wait_show.test
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
#
|
||||||
|
# Test that the various SHOW commands obey wsrep_sync_wait - codership/mysql-wsrep#228
|
||||||
|
#
|
||||||
|
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SET SESSION wsrep_sync_wait = 1;
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
CREATE DATABASE db1;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SHOW CREATE DATABASE db1;
|
||||||
|
DROP DATABASE db1;
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
CREATE PROCEDURE p1 () SELECT 1 FROM DUAL;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SHOW CREATE PROCEDURE p1;
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
CREATE PROCEDURE p1 () SELECT 1 FROM DUAL;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SHOW PROCEDURE CODE p1;
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SHOW CREATE FUNCTION f1;
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
CREATE FUNCTION f1 () RETURNS INTEGER RETURN 123;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SHOW FUNCTION CODE f1;
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||||
|
CREATE TRIGGER tr1 BEFORE INSERT ON t1 FOR EACH ROW SET NEW.f1 = 'a';
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SHOW CREATE TRIGGER tr1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
CREATE EVENT event1 ON SCHEDULE AT '2038-01-01 23:59:59' DO SELECT 1;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
SHOW CREATE EVENT event1;
|
||||||
|
DROP EVENT event1;
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user