mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge 11.3 into 11.4
This commit is contained in:
@ -126,8 +126,10 @@ get_make_parallel_flag
|
|||||||
# SSL library to use.--with-ssl will select our bundled yaSSL
|
# SSL library to use.--with-ssl will select our bundled yaSSL
|
||||||
# implementation of SSL. --with-ssl=yes will first try system library
|
# implementation of SSL. --with-ssl=yes will first try system library
|
||||||
# then the bundled one --with-ssl=system will use the system library.
|
# then the bundled one --with-ssl=system will use the system library.
|
||||||
# We use bundled by default as this is guaranteed to work with Galera
|
# We normally use bundled by default as this is guaranteed to work with Galera
|
||||||
SSL_LIBRARY=--with-ssl=bundled
|
# However as bundled gives problem on SuSE with tls_version1.test, system
|
||||||
|
# is used
|
||||||
|
SSL_LIBRARY=--with-ssl=system
|
||||||
|
|
||||||
if [ "x$warning_mode" = "xpedantic" ]; then
|
if [ "x$warning_mode" = "xpedantic" ]; then
|
||||||
warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
|
warnings="-W -Wall -ansi -pedantic -Wno-long-long -Wno-unused -D_POSIX_SOURCE"
|
||||||
|
@ -195,6 +195,15 @@ ENDIF()
|
|||||||
|
|
||||||
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
|
OPTION(NOT_FOR_DISTRIBUTION "Allow linking with GPLv2-incompatible system libraries. Only set it you never plan to distribute the resulting binaries" OFF)
|
||||||
|
|
||||||
|
#
|
||||||
|
# Enable protection of statement's memory root after first SP/PS execution.
|
||||||
|
# Can be switched on only for debug build.
|
||||||
|
#
|
||||||
|
OPTION(WITH_PROTECT_STATEMENT_MEMROOT "Enable protection of statement's memory root after first SP/PS execution. Turned into account only for debug build" OFF)
|
||||||
|
IF (CMAKE_BUILD_TYPE MATCHES "Debug" AND WITH_PROTECT_STATEMENT_MEMROOT)
|
||||||
|
ADD_DEFINITIONS(-DPROTECT_STATEMENT_MEMROOT)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
INCLUDE(check_compiler_flag)
|
INCLUDE(check_compiler_flag)
|
||||||
INCLUDE(check_linker_flag)
|
INCLUDE(check_linker_flag)
|
||||||
|
|
||||||
|
@ -1640,7 +1640,7 @@ static struct my_option my_options[] =
|
|||||||
"given sequence numbers are printed.",
|
"given sequence numbers are printed.",
|
||||||
&stop_pos_str, &stop_pos_str, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
|
&stop_pos_str, &stop_pos_str, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0,
|
||||||
0, 0},
|
0, 0},
|
||||||
{"table", 'T', "List entries for just this table (local log only).",
|
{"table", 'T', "List entries for just this table (affects only row events).",
|
||||||
&table, &table, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
&table, &table, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"to-last-log", 't', "Requires -R. Will not stop at the end of the \
|
{"to-last-log", 't', "Requires -R. Will not stop at the end of the \
|
||||||
|
@ -1038,35 +1038,38 @@ exit_func:
|
|||||||
static int do_stmt_prepare(struct st_connection *cn, const char *q, int q_len)
|
static int do_stmt_prepare(struct st_connection *cn, const char *q, int q_len)
|
||||||
{
|
{
|
||||||
/* The cn->stmt is already set. */
|
/* The cn->stmt is already set. */
|
||||||
|
DBUG_ENTER("do_stmt_prepare");
|
||||||
if (!cn->has_thread)
|
if (!cn->has_thread)
|
||||||
return mysql_stmt_prepare(cn->stmt, q, q_len);
|
DBUG_RETURN(mysql_stmt_prepare(cn->stmt, q, q_len));
|
||||||
cn->cur_query= q;
|
cn->cur_query= q;
|
||||||
cn->cur_query_len= q_len;
|
cn->cur_query_len= q_len;
|
||||||
signal_connection_thd(cn, EMB_PREPARE_STMT);
|
signal_connection_thd(cn, EMB_PREPARE_STMT);
|
||||||
wait_query_thread_done(cn);
|
wait_query_thread_done(cn);
|
||||||
return cn->result;
|
DBUG_RETURN(cn->result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int do_stmt_execute(struct st_connection *cn)
|
static int do_stmt_execute(struct st_connection *cn)
|
||||||
{
|
{
|
||||||
|
DBUG_ENTER("do_stmt_execute");
|
||||||
/* The cn->stmt is already set. */
|
/* The cn->stmt is already set. */
|
||||||
if (!cn->has_thread)
|
if (!cn->has_thread)
|
||||||
return mysql_stmt_execute(cn->stmt);
|
DBUG_RETURN(mysql_stmt_execute(cn->stmt));
|
||||||
signal_connection_thd(cn, EMB_EXECUTE_STMT);
|
signal_connection_thd(cn, EMB_EXECUTE_STMT);
|
||||||
wait_query_thread_done(cn);
|
wait_query_thread_done(cn);
|
||||||
return cn->result;
|
DBUG_RETURN(cn->result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int do_stmt_close(struct st_connection *cn)
|
static int do_stmt_close(struct st_connection *cn)
|
||||||
{
|
{
|
||||||
|
DBUG_ENTER("do_stmt_close");
|
||||||
/* The cn->stmt is already set. */
|
/* The cn->stmt is already set. */
|
||||||
if (!cn->has_thread)
|
if (!cn->has_thread)
|
||||||
return mysql_stmt_close(cn->stmt);
|
DBUG_RETURN(mysql_stmt_close(cn->stmt));
|
||||||
signal_connection_thd(cn, EMB_CLOSE_STMT);
|
signal_connection_thd(cn, EMB_CLOSE_STMT);
|
||||||
wait_query_thread_done(cn);
|
wait_query_thread_done(cn);
|
||||||
return cn->result;
|
DBUG_RETURN(cn->result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -7995,6 +7998,7 @@ int append_warnings(DYNAMIC_STRING *ds, MYSQL* mysql)
|
|||||||
|
|
||||||
if (!(count= mysql_warning_count(mysql)))
|
if (!(count= mysql_warning_count(mysql)))
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
DBUG_PRINT("info", ("Warnings: %ud", count));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
If one day we will support execution of multi-statements
|
If one day we will support execution of multi-statements
|
||||||
@ -8450,6 +8454,7 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||||||
char *query, size_t query_len, DYNAMIC_STRING *ds,
|
char *query, size_t query_len, DYNAMIC_STRING *ds,
|
||||||
DYNAMIC_STRING *ds_warnings)
|
DYNAMIC_STRING *ds_warnings)
|
||||||
{
|
{
|
||||||
|
my_bool ignore_second_execution= 0;
|
||||||
MYSQL_RES *res= NULL; /* Note that here 'res' is meta data result set */
|
MYSQL_RES *res= NULL; /* Note that here 'res' is meta data result set */
|
||||||
MYSQL *mysql= cn->mysql;
|
MYSQL *mysql= cn->mysql;
|
||||||
MYSQL_STMT *stmt;
|
MYSQL_STMT *stmt;
|
||||||
@ -8457,6 +8462,9 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||||||
DYNAMIC_STRING ds_execute_warnings;
|
DYNAMIC_STRING ds_execute_warnings;
|
||||||
DBUG_ENTER("run_query_stmt");
|
DBUG_ENTER("run_query_stmt");
|
||||||
DBUG_PRINT("query", ("'%-.60s'", query));
|
DBUG_PRINT("query", ("'%-.60s'", query));
|
||||||
|
DBUG_PRINT("info",
|
||||||
|
("disable_warnings: %d prepare_warnings_enabled: %d",
|
||||||
|
(int) disable_warnings, (int) prepare_warnings_enabled));
|
||||||
|
|
||||||
if (!mysql)
|
if (!mysql)
|
||||||
{
|
{
|
||||||
@ -8527,12 +8535,18 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||||||
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
|
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
We cannot run query twice if we get prepare warnings as these will otherwise be
|
||||||
|
disabled
|
||||||
|
*/
|
||||||
|
ignore_second_execution= (prepare_warnings_enabled &&
|
||||||
|
mysql_warning_count(mysql) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Execute the query
|
Execute the query
|
||||||
*/
|
*/
|
||||||
if (do_stmt_execute(cn))
|
if (!ignore_second_execution && do_stmt_execute(cn))
|
||||||
{
|
{
|
||||||
handle_error(command, mysql_stmt_errno(stmt),
|
handle_error(command, mysql_stmt_errno(stmt),
|
||||||
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
|
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
|
||||||
@ -8607,7 +8621,10 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
|
|||||||
that warnings from both the prepare and execute phase are shown.
|
that warnings from both the prepare and execute phase are shown.
|
||||||
*/
|
*/
|
||||||
if (!disable_warnings && !prepare_warnings_enabled)
|
if (!disable_warnings && !prepare_warnings_enabled)
|
||||||
|
{
|
||||||
|
DBUG_PRINT("info", ("warnings disabled"));
|
||||||
dynstr_set(&ds_prepare_warnings, NULL);
|
dynstr_set(&ds_prepare_warnings, NULL);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -8710,7 +8727,9 @@ end:
|
|||||||
error - function will not return
|
error - function will not return
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void run_prepare_stmt(struct st_connection *cn, struct st_command *command, const char *query, size_t query_len, DYNAMIC_STRING *ds, DYNAMIC_STRING *ds_warnings)
|
void run_prepare_stmt(struct st_connection *cn, struct st_command *command,
|
||||||
|
const char *query, size_t query_len, DYNAMIC_STRING *ds,
|
||||||
|
DYNAMIC_STRING *ds_warnings)
|
||||||
{
|
{
|
||||||
|
|
||||||
MYSQL *mysql= cn->mysql;
|
MYSQL *mysql= cn->mysql;
|
||||||
@ -8871,9 +8890,8 @@ void run_bind_stmt(struct st_connection *cn, struct st_command *command,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void run_execute_stmt(struct st_connection *cn, struct st_command *command,
|
void run_execute_stmt(struct st_connection *cn, struct st_command *command,
|
||||||
const char *query, size_t query_len, DYNAMIC_STRING *ds,
|
const char *query, size_t query_len, DYNAMIC_STRING *ds,
|
||||||
DYNAMIC_STRING *ds_warnings
|
DYNAMIC_STRING *ds_warnings)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
MYSQL_RES *res= NULL; /* Note that here 'res' is meta data result set */
|
MYSQL_RES *res= NULL; /* Note that here 'res' is meta data result set */
|
||||||
MYSQL *mysql= cn->mysql;
|
MYSQL *mysql= cn->mysql;
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright (c) 2009 Sun Microsystems, Inc.
|
|
||||||
Use is subject to license terms.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA */
|
|
||||||
|
|
||||||
/* Check stack direction (0-down, 1-up) */
|
|
||||||
int f(int *a)
|
|
||||||
{
|
|
||||||
int b;
|
|
||||||
return(&b > a)?1:0;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
Prevent compiler optimizations by calling function
|
|
||||||
through pointer.
|
|
||||||
*/
|
|
||||||
volatile int (*ptr_f)(int *) = f;
|
|
||||||
int main()
|
|
||||||
{
|
|
||||||
int a;
|
|
||||||
return ptr_f(&a);
|
|
||||||
}
|
|
@ -672,25 +672,11 @@ int main()
|
|||||||
}
|
}
|
||||||
" HAVE_PTHREAD_YIELD_ZERO_ARG)
|
" HAVE_PTHREAD_YIELD_ZERO_ARG)
|
||||||
|
|
||||||
IF(NOT STACK_DIRECTION)
|
IF(STACK_DIRECTION)
|
||||||
IF(CMAKE_CROSSCOMPILING AND NOT DEFINED CMAKE_CROSSCOMPILING_EMULATOR)
|
ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "^(parisc|hppa)")
|
||||||
MESSAGE(FATAL_ERROR
|
SET(STACK_DIRECTION 1 CACHE INTERNAL "Stack grows direction")
|
||||||
"STACK_DIRECTION is not defined. Please specify -DSTACK_DIRECTION=1 "
|
ELSE()
|
||||||
"or -DSTACK_DIRECTION=-1 when calling cmake.")
|
SET(STACK_DIRECTION -1 CACHE INTERNAL "Stack grows direction")
|
||||||
ELSE()
|
|
||||||
TRY_RUN(STACKDIR_RUN_RESULT STACKDIR_COMPILE_RESULT
|
|
||||||
${CMAKE_BINARY_DIR}
|
|
||||||
${CMAKE_SOURCE_DIR}/cmake/stack_direction.c
|
|
||||||
)
|
|
||||||
# Test program returns 0 (down) or 1 (up).
|
|
||||||
# Convert to -1 or 1
|
|
||||||
IF(STACKDIR_RUN_RESULT EQUAL 0)
|
|
||||||
SET(STACK_DIRECTION -1 CACHE INTERNAL "Stack grows direction")
|
|
||||||
ELSE()
|
|
||||||
SET(STACK_DIRECTION 1 CACHE INTERNAL "Stack grows direction")
|
|
||||||
ENDIF()
|
|
||||||
MESSAGE(STATUS "Checking stack direction : ${STACK_DIRECTION}")
|
|
||||||
ENDIF()
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -84,10 +84,10 @@ expire_logs_days = 10
|
|||||||
# * Character sets
|
# * Character sets
|
||||||
#
|
#
|
||||||
|
|
||||||
# MySQL/MariaDB default is Latin1, but in Debian we rather default to the full
|
# MariaDB default is Latin1, but in Debian we rather default to the full
|
||||||
# utf8 4-byte character set. See also client.cnf
|
# utf8 4-byte character set. See also client.cnf
|
||||||
character-set-server = utf8mb4
|
character-set-server = utf8mb4
|
||||||
collation-server = utf8mb4_general_ci
|
character-set-collations = utf8mb4=uca1400_ai_ci
|
||||||
|
|
||||||
#
|
#
|
||||||
# * InnoDB
|
# * InnoDB
|
||||||
|
10
debian/rules
vendored
10
debian/rules
vendored
@ -51,16 +51,6 @@ ifeq (32,$(DEB_HOST_ARCH_BITS))
|
|||||||
CMAKEFLAGS += -DPLUGIN_ROCKSDB=NO
|
CMAKEFLAGS += -DPLUGIN_ROCKSDB=NO
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Cross building requires stack direction instruction
|
|
||||||
ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
|
|
||||||
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),alpha amd64 arm arm64 i386 ia64 m68k mips64el mipsel powerpc ppc64 ppc64el riscv64 s390x sh4 sparc64))
|
|
||||||
CMAKEFLAGS += -DSTACK_DIRECTION=-1
|
|
||||||
endif
|
|
||||||
ifneq (,$(filter $(DEB_HOST_ARCH_CPU),hppa))
|
|
||||||
CMAKEFLAGS += -DSTACK_DIRECTION=1
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Only attempt to build with PMEM on archs that have package libpmem-dev available
|
# Only attempt to build with PMEM on archs that have package libpmem-dev available
|
||||||
# See https://packages.debian.org/search?searchon=names&keywords=libpmem-dev
|
# See https://packages.debian.org/search?searchon=names&keywords=libpmem-dev
|
||||||
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 ppc64el riscv64))
|
ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 ppc64el riscv64))
|
||||||
|
@ -2298,7 +2298,7 @@ ds_ctxt_t::make_hardlink(const char *from_path, const char *to_path)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
strncpy(to_path_full, to_path, sizeof(to_path_full));
|
strmake(to_path_full, to_path, sizeof(to_path_full)-1);
|
||||||
}
|
}
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
return CreateHardLink(to_path_full, from_path, NULL);
|
return CreateHardLink(to_path_full, from_path, NULL);
|
||||||
|
@ -80,6 +80,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
|
|||||||
#include <srv0start.h>
|
#include <srv0start.h>
|
||||||
#include "trx0sys.h"
|
#include "trx0sys.h"
|
||||||
#include <buf0dblwr.h>
|
#include <buf0dblwr.h>
|
||||||
|
#include <buf0flu.h>
|
||||||
#include "ha_innodb.h"
|
#include "ha_innodb.h"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -2385,10 +2386,15 @@ static bool innodb_init()
|
|||||||
buf_flush_sync();
|
buf_flush_sync();
|
||||||
recv_sys.debug_free();
|
recv_sys.debug_free();
|
||||||
ut_ad(!os_aio_pending_reads());
|
ut_ad(!os_aio_pending_reads());
|
||||||
ut_ad(!os_aio_pending_writes());
|
|
||||||
ut_d(mysql_mutex_lock(&buf_pool.flush_list_mutex));
|
ut_d(mysql_mutex_lock(&buf_pool.flush_list_mutex));
|
||||||
ut_ad(!buf_pool.get_oldest_modification(0));
|
ut_ad(!buf_pool.get_oldest_modification(0));
|
||||||
ut_d(mysql_mutex_unlock(&buf_pool.flush_list_mutex));
|
ut_d(mysql_mutex_unlock(&buf_pool.flush_list_mutex));
|
||||||
|
/* os_aio_pending_writes() may hold here if some write_io_callback()
|
||||||
|
did not release the slot yet. However, the page write itself must
|
||||||
|
have completed, because the buf_pool.flush_list is empty. In debug
|
||||||
|
builds, we wait for this to happen, hoping to get a hung process if
|
||||||
|
this assumption does not hold. */
|
||||||
|
ut_d(os_aio_wait_until_no_pending_writes(false));
|
||||||
log_sys.close_file();
|
log_sys.close_file();
|
||||||
|
|
||||||
if (xtrabackup_incremental)
|
if (xtrabackup_incremental)
|
||||||
@ -4693,7 +4699,9 @@ fail:
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_sys.create();
|
if (!log_sys.create()) {
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
/* get current checkpoint_lsn */
|
/* get current checkpoint_lsn */
|
||||||
{
|
{
|
||||||
mysql_mutex_lock(&recv_sys.mutex);
|
mysql_mutex_lock(&recv_sys.mutex);
|
||||||
@ -6057,7 +6065,9 @@ error:
|
|||||||
}
|
}
|
||||||
|
|
||||||
recv_sys.create();
|
recv_sys.create();
|
||||||
log_sys.create();
|
if (!log_sys.create()) {
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
recv_sys.recovery_on = true;
|
recv_sys.recovery_on = true;
|
||||||
|
|
||||||
xb_fil_io_init();
|
xb_fil_io_init();
|
||||||
|
@ -102,6 +102,9 @@ ${WOLFCRYPT_SRCDIR}/rsa.c
|
|||||||
${WOLFCRYPT_SRCDIR}/sha.c
|
${WOLFCRYPT_SRCDIR}/sha.c
|
||||||
${WOLFCRYPT_SRCDIR}/sha256.c
|
${WOLFCRYPT_SRCDIR}/sha256.c
|
||||||
${WOLFCRYPT_SRCDIR}/sha512.c
|
${WOLFCRYPT_SRCDIR}/sha512.c
|
||||||
|
${WOLFCRYPT_SRCDIR}/poly1305.c
|
||||||
|
${WOLFCRYPT_SRCDIR}/chacha.c
|
||||||
|
${WOLFCRYPT_SRCDIR}/chacha20_poly1305.c
|
||||||
${WOLFCRYPT_SRCDIR}/wc_port.c
|
${WOLFCRYPT_SRCDIR}/wc_port.c
|
||||||
${WOLFCRYPT_SRCDIR}/wc_encrypt.c
|
${WOLFCRYPT_SRCDIR}/wc_encrypt.c
|
||||||
${WOLFCRYPT_SRCDIR}/hash.c
|
${WOLFCRYPT_SRCDIR}/hash.c
|
||||||
@ -159,6 +162,8 @@ IF(WOLFSSL_X86_64_BUILD)
|
|||||||
LIST(APPEND WOLFCRYPT_SOURCES
|
LIST(APPEND WOLFCRYPT_SOURCES
|
||||||
${WOLFCRYPT_SRCDIR}/aes_asm.S
|
${WOLFCRYPT_SRCDIR}/aes_asm.S
|
||||||
${WOLFCRYPT_SRCDIR}/aes_gcm_asm.S
|
${WOLFCRYPT_SRCDIR}/aes_gcm_asm.S
|
||||||
|
${WOLFCRYPT_SRCDIR}/chacha_asm.S
|
||||||
|
${WOLFCRYPT_SRCDIR}/poly1305_asm.S
|
||||||
${WOLFCRYPT_SRCDIR}/sha512_asm.S
|
${WOLFCRYPT_SRCDIR}/sha512_asm.S
|
||||||
${WOLFCRYPT_SRCDIR}/sha256_asm.S)
|
${WOLFCRYPT_SRCDIR}/sha256_asm.S)
|
||||||
ADD_DEFINITIONS(-maes -msse4.2 -mpclmul)
|
ADD_DEFINITIONS(-maes -msse4.2 -mpclmul)
|
||||||
|
@ -19,11 +19,15 @@
|
|||||||
#define HAVE_TLS_EXTENSIONS
|
#define HAVE_TLS_EXTENSIONS
|
||||||
#define HAVE_AES_ECB
|
#define HAVE_AES_ECB
|
||||||
#define HAVE_AESGCM
|
#define HAVE_AESGCM
|
||||||
|
#define HAVE_CHACHA
|
||||||
|
#define HAVE_POLY1305
|
||||||
#define WOLFSSL_AES_COUNTER
|
#define WOLFSSL_AES_COUNTER
|
||||||
#define NO_WOLFSSL_STUB
|
#define NO_WOLFSSL_STUB
|
||||||
#define OPENSSL_ALL
|
#define OPENSSL_ALL
|
||||||
#define WOLFSSL_ALLOW_TLSV10
|
#define WOLFSSL_ALLOW_TLSV10
|
||||||
#define NO_OLD_TIMEVAL_NAME
|
#define NO_OLD_TIMEVAL_NAME
|
||||||
|
#define HAVE_SECURE_RENEGOTIATION
|
||||||
|
#define HAVE_EXTENDED_MASTER
|
||||||
|
|
||||||
/* TLSv1.3 definitions (all needed to build) */
|
/* TLSv1.3 definitions (all needed to build) */
|
||||||
#define WOLFSSL_TLS13
|
#define WOLFSSL_TLS13
|
||||||
|
@ -1021,6 +1021,12 @@ struct charset_info_st
|
|||||||
return (coll->strnncollsp)(this, (uchar *) a, alen, (uchar *) b, blen);
|
return (coll->strnncollsp)(this, (uchar *) a, alen, (uchar *) b, blen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int strnncollsp(const LEX_CSTRING &a, const LEX_CSTRING &b) const
|
||||||
|
{
|
||||||
|
return (coll->strnncollsp)(this, (uchar *) a.str, a.length,
|
||||||
|
(uchar *) b.str, b.length);
|
||||||
|
}
|
||||||
|
|
||||||
size_t strnxfrm(char *dst, size_t dstlen, uint nweights,
|
size_t strnxfrm(char *dst, size_t dstlen, uint nweights,
|
||||||
const char *src, size_t srclen, uint flags) const
|
const char *src, size_t srclen, uint flags) const
|
||||||
{
|
{
|
||||||
|
@ -53,6 +53,10 @@ typedef struct st_mem_root
|
|||||||
unsigned short first_block_usage;
|
unsigned short first_block_usage;
|
||||||
unsigned short flags;
|
unsigned short flags;
|
||||||
|
|
||||||
|
#ifdef PROTECT_STATEMENT_MEMROOT
|
||||||
|
int read_only;
|
||||||
|
#endif
|
||||||
|
|
||||||
void (*error_handler)(void);
|
void (*error_handler)(void);
|
||||||
|
|
||||||
PSI_memory_key psi_key;
|
PSI_memory_key psi_key;
|
||||||
|
@ -161,6 +161,7 @@ extern my_thread_id (*sf_malloc_dbug_id)(void);
|
|||||||
|
|
||||||
typedef void (*MALLOC_SIZE_CB) (long long size, my_bool is_thread_specific);
|
typedef void (*MALLOC_SIZE_CB) (long long size, my_bool is_thread_specific);
|
||||||
extern void set_malloc_size_cb(MALLOC_SIZE_CB func);
|
extern void set_malloc_size_cb(MALLOC_SIZE_CB func);
|
||||||
|
extern MALLOC_SIZE_CB update_malloc_size;
|
||||||
|
|
||||||
/* defines when allocating data */
|
/* defines when allocating data */
|
||||||
extern void *my_malloc(PSI_memory_key key, size_t size, myf MyFlags);
|
extern void *my_malloc(PSI_memory_key key, size_t size, myf MyFlags);
|
||||||
@ -900,6 +901,8 @@ extern void free_root(MEM_ROOT *root, myf MyFLAGS);
|
|||||||
extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
|
extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
|
||||||
extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
|
extern void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size,
|
||||||
size_t prealloc_size);
|
size_t prealloc_size);
|
||||||
|
extern USED_MEM *get_last_memroot_block(MEM_ROOT* root);
|
||||||
|
extern void free_all_new_blocks(MEM_ROOT *root, USED_MEM *last_block);
|
||||||
extern void protect_root(MEM_ROOT *root, int prot);
|
extern void protect_root(MEM_ROOT *root, int prot);
|
||||||
extern char *strdup_root(MEM_ROOT *root,const char *str);
|
extern char *strdup_root(MEM_ROOT *root,const char *str);
|
||||||
static inline char *safe_strdup_root(MEM_ROOT *root, const char *str)
|
static inline char *safe_strdup_root(MEM_ROOT *root, const char *str)
|
||||||
@ -908,6 +911,7 @@ static inline char *safe_strdup_root(MEM_ROOT *root, const char *str)
|
|||||||
}
|
}
|
||||||
extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
|
extern char *strmake_root(MEM_ROOT *root,const char *str,size_t len);
|
||||||
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
|
extern void *memdup_root(MEM_ROOT *root,const void *str, size_t len);
|
||||||
|
|
||||||
extern LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str);
|
extern LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str);
|
||||||
|
|
||||||
static inline LEX_STRING lex_string_strmake_root(MEM_ROOT *mem_root,
|
static inline LEX_STRING lex_string_strmake_root(MEM_ROOT *mem_root,
|
||||||
|
@ -141,7 +141,6 @@ typedef unsigned long long my_ulonglong;
|
|||||||
#define ER_WRONG_FK_OPTION_FOR_VIRTUAL_COLUMN ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN
|
#define ER_WRONG_FK_OPTION_FOR_VIRTUAL_COLUMN ER_WRONG_FK_OPTION_FOR_GENERATED_COLUMN
|
||||||
#define ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN
|
#define ER_UNSUPPORTED_ACTION_ON_VIRTUAL_COLUMN ER_UNSUPPORTED_ACTION_ON_GENERATED_COLUMN
|
||||||
#define ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS ER_UNSUPPORTED_ENGINE_FOR_GENERATED_COLUMNS
|
#define ER_UNSUPPORTED_ENGINE_FOR_VIRTUAL_COLUMNS ER_UNSUPPORTED_ENGINE_FOR_GENERATED_COLUMNS
|
||||||
#define ER_QUERY_EXCEEDED_ROWS_EXAMINED_LIMIT ER_QUERY_RESULT_INCOMPLETE
|
|
||||||
#define ER_KEY_COLUMN_DOES_NOT_EXITS ER_KEY_COLUMN_DOES_NOT_EXIST
|
#define ER_KEY_COLUMN_DOES_NOT_EXITS ER_KEY_COLUMN_DOES_NOT_EXIST
|
||||||
#define ER_DROP_PARTITION_NON_EXISTENT ER_PARTITION_DOES_NOT_EXIST
|
#define ER_DROP_PARTITION_NON_EXISTENT ER_PARTITION_DOES_NOT_EXIST
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ extern "C" {
|
|||||||
/* The max key length of all supported algorithms */
|
/* The max key length of all supported algorithms */
|
||||||
#define MY_AES_MAX_KEY_LENGTH 32
|
#define MY_AES_MAX_KEY_LENGTH 32
|
||||||
|
|
||||||
#define MY_AES_CTX_SIZE 672
|
#define MY_AES_CTX_SIZE 1040
|
||||||
|
|
||||||
enum my_aes_mode {
|
enum my_aes_mode {
|
||||||
MY_AES_ECB, MY_AES_CBC
|
MY_AES_ECB, MY_AES_CBC
|
||||||
|
@ -1057,7 +1057,7 @@ class Client_field_extension: public Sql_alloc,
|
|||||||
public:
|
public:
|
||||||
Client_field_extension()
|
Client_field_extension()
|
||||||
{
|
{
|
||||||
memset(this, 0, sizeof(*this));
|
memset((void*) this, 0, sizeof(*this));
|
||||||
}
|
}
|
||||||
void copy_extended_metadata(MEM_ROOT *memroot,
|
void copy_extended_metadata(MEM_ROOT *memroot,
|
||||||
const Send_field_extended_metadata &src)
|
const Send_field_extended_metadata &src)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# will be skipped unless innodb is enabled
|
# will be skipped unless innodb is enabled
|
||||||
#
|
#
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like "MSAN%"`)
|
if (`select count(*) from information_schema.system_variables where variable_name='have_sanitizer' and global_value like 'MSAN%'`)
|
||||||
{
|
{
|
||||||
SET STATEMENT sql_log_bin=0 FOR
|
SET STATEMENT sql_log_bin=0 FOR
|
||||||
call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations");
|
call mtr.add_suppression("InnoDB: Trying to delete tablespace.*pending operations");
|
||||||
|
1
mysql-test/include/have_innodb_16k.opt
Normal file
1
mysql-test/include/have_innodb_16k.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--innodb-page-size=16k
|
1
mysql-test/include/have_innodb_32k.opt
Normal file
1
mysql-test/include/have_innodb_32k.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--innodb-page-size=32k
|
1
mysql-test/include/have_innodb_4k.opt
Normal file
1
mysql-test/include/have_innodb_4k.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--innodb-page-size=4k
|
1
mysql-test/include/have_innodb_64k.opt
Normal file
1
mysql-test/include/have_innodb_64k.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--innodb-page-size=64k
|
1
mysql-test/include/have_innodb_8k.opt
Normal file
1
mysql-test/include/have_innodb_8k.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--innodb-page-size=8k
|
9
mysql-test/include/have_normal_bzip.inc
Normal file
9
mysql-test/include/have_normal_bzip.inc
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
--source include/have_compress.inc
|
||||||
|
|
||||||
|
# Test that the system is using the default/standard bzip library.
|
||||||
|
# If not, we have to skip the test as the compression lengths displayed
|
||||||
|
# in the test will not match the results from used compression library.
|
||||||
|
|
||||||
|
if (`select length(COMPRESS(space(5000))) != 33`) {
|
||||||
|
skip Test skipped as standard bzip is needed;
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
if (`select convert(@@version_compile_os using latin1) LIKE 'Linux' = 0`)
|
if (`select @@version_compile_os not LIKE 'Linux%'`)
|
||||||
{
|
{
|
||||||
skip Need Linux;
|
skip Need Linux;
|
||||||
}
|
}
|
||||||
|
@ -5,15 +5,15 @@
|
|||||||
# need to change topology after they have sourced include/rpl_init.inc
|
# need to change topology after they have sourced include/rpl_init.inc
|
||||||
#
|
#
|
||||||
# This file sets up variables needed by include/rpl_sync.inc and many
|
# This file sets up variables needed by include/rpl_sync.inc and many
|
||||||
# other replication scripts in the include/ directory. It also issues
|
# other replication scripts in the include/ directory. It also issues
|
||||||
# CHANGE MASTER on all servers where the configuration changes from
|
# CHANGE MASTER on all servers where the configuration changes from
|
||||||
# what it was before. It does not issue START SLAVE (use
|
# what it was before. It does not issue START SLAVE (use
|
||||||
# include/rpl_start_slaves.inc for that).
|
# include/rpl_start_slaves.inc for that).
|
||||||
#
|
#
|
||||||
# Note: it is not currently possible to change the number of servers
|
# Note: it is not currently possible to change the number of servers
|
||||||
# after the rpl_init.inc, without first calling rpl_end.inc. So the
|
# after the rpl_init.inc, without first calling rpl_end.inc. So the
|
||||||
# test has to set $rpl_server_count to the total number of servers
|
# test has to set $rpl_server_count to the total number of servers
|
||||||
# that the test uses, before it sources include/rpl_init.inc. After
|
# that the test uses, before it sources include/rpl_init.inc. After
|
||||||
# that, $rpl_server_count must not change until after next time the
|
# that, $rpl_server_count must not change until after next time the
|
||||||
# test sources include/rpl_end.inc.
|
# test sources include/rpl_end.inc.
|
||||||
#
|
#
|
||||||
@ -37,7 +37,7 @@
|
|||||||
# By default, CHANGE MASTER is executed with MASTER_LOG_FILE set
|
# By default, CHANGE MASTER is executed with MASTER_LOG_FILE set
|
||||||
# to the name of the last binlog file on the master (retrieved by
|
# to the name of the last binlog file on the master (retrieved by
|
||||||
# executing SHOW MASTER STATUS). This variable can be set to
|
# executing SHOW MASTER STATUS). This variable can be set to
|
||||||
# specify another filename. This variable should be a
|
# specify another filename. This variable should be a
|
||||||
# comma-separated list of the following form:
|
# comma-separated list of the following form:
|
||||||
#
|
#
|
||||||
# SERVER_NUMBER_1:FILE_NAME_1,SERVER_NUMBER_2:FILE_NAME_2,...
|
# SERVER_NUMBER_1:FILE_NAME_1,SERVER_NUMBER_2:FILE_NAME_2,...
|
||||||
@ -45,7 +45,7 @@
|
|||||||
# Before CHANGE MASTER is executed on server N, this script checks
|
# Before CHANGE MASTER is executed on server N, this script checks
|
||||||
# if $rpl_master_log_file contains the text N:FILE_NAME. If it
|
# if $rpl_master_log_file contains the text N:FILE_NAME. If it
|
||||||
# does, then MASTER_LOG_FILE is set to FILE_NAME. Otherwise,
|
# does, then MASTER_LOG_FILE is set to FILE_NAME. Otherwise,
|
||||||
# MASTER_LOG_FILE is set to the last binlog on the master. For
|
# MASTER_LOG_FILE is set to the last binlog on the master. For
|
||||||
# example, to specify that server_1 should start replicate from
|
# example, to specify that server_1 should start replicate from
|
||||||
# master-bin.000007 and server_5 should start replicate from
|
# master-bin.000007 and server_5 should start replicate from
|
||||||
# master-bin.012345, do:
|
# master-bin.012345, do:
|
||||||
@ -53,9 +53,9 @@
|
|||||||
#
|
#
|
||||||
# $rpl_master_log_pos
|
# $rpl_master_log_pos
|
||||||
# By default, CHANGE MASTER is executed without specifying the
|
# By default, CHANGE MASTER is executed without specifying the
|
||||||
# MASTER_LOG_POS parameter. This variable can be set to set a
|
# MASTER_LOG_POS parameter. This variable can be set to set a
|
||||||
# specific position. It has the same form as $rpl_master_log_file
|
# specific position. It has the same form as $rpl_master_log_file
|
||||||
# (see above). For example, to specify that server_3 should start
|
# (see above). For example, to specify that server_3 should start
|
||||||
# replicate from position 4711 of its master, do:
|
# replicate from position 4711 of its master, do:
|
||||||
# --let $rpl_master_log_pos= 3:4711
|
# --let $rpl_master_log_pos= 3:4711
|
||||||
#
|
#
|
||||||
@ -72,7 +72,7 @@
|
|||||||
# include/rpl_stop_slaves.inc
|
# include/rpl_stop_slaves.inc
|
||||||
# include/rpl_end.inc
|
# include/rpl_end.inc
|
||||||
#
|
#
|
||||||
# $rpl_server_count_length:
|
# $rpl_server_count_length
|
||||||
# Set to LENGTH($rpl_server_count). So if $rpl_server_count < 10,
|
# Set to LENGTH($rpl_server_count). So if $rpl_server_count < 10,
|
||||||
# then $rpl_server_count_length = 1; if 10 <= $rpl_server_count <
|
# then $rpl_server_count_length = 1; if 10 <= $rpl_server_count <
|
||||||
# 100, then $rpl_server_count_length = 2, etc.
|
# 100, then $rpl_server_count_length = 2, etc.
|
||||||
@ -83,12 +83,12 @@
|
|||||||
# server N is a slave, then the N'th number is the master of server
|
# server N is a slave, then the N'th number is the master of server
|
||||||
# N. If server N is not a slave, then the N'th number is just spaces
|
# N. If server N is not a slave, then the N'th number is just spaces
|
||||||
# (so in fact it is not a number). For example, if $rpl_topology is
|
# (so in fact it is not a number). For example, if $rpl_topology is
|
||||||
# '1->2,2->3,3->1,2->4,5->6', then $rpl_master_list is '3122 6'.
|
# '1->2,2->3,3->1,2->4,5->6', then $rpl_master_list is '3122 5'.
|
||||||
#
|
#
|
||||||
# $rpl_sync_chain_dirty
|
# $rpl_sync_chain_dirty
|
||||||
# This variable is set to 1. This tells include/rpl_sync.inc to
|
# This variable is set to 1. This tells include/rpl_sync.inc to
|
||||||
# compute a new value for $rpl_sync_chain next time that
|
# compute a new value for $rpl_sync_chain next time that
|
||||||
# include/rpl_sync.inc is sourced. See
|
# include/rpl_sync.inc is sourced. See
|
||||||
# include/rpl_generate_sync_chain.inc and include/rpl_sync.inc for
|
# include/rpl_generate_sync_chain.inc and include/rpl_sync.inc for
|
||||||
# details.
|
# details.
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ if ($rpl_master_list == '')
|
|||||||
if ($rpl_debug)
|
if ($rpl_debug)
|
||||||
{
|
{
|
||||||
--echo \$rpl_server_count='$rpl_server_count'
|
--echo \$rpl_server_count='$rpl_server_count'
|
||||||
--echo \$rpl_server_count_length='$rpl_server_count_length'
|
--echo old \$rpl_server_count_length='$rpl_server_count_length'
|
||||||
--echo new \$rpl_topology='$_rpl_topology'
|
--echo new \$rpl_topology='$_rpl_topology'
|
||||||
--echo old \$rpl_master_list='$rpl_master_list'
|
--echo old \$rpl_master_list='$rpl_master_list'
|
||||||
--echo old \$rpl_sync_chain='$rpl_sync_chain'
|
--echo old \$rpl_sync_chain='$rpl_sync_chain'
|
||||||
@ -210,6 +210,10 @@ if (!$rpl_skip_change_master)
|
|||||||
--let $rpl_connection_name= server_$_rpl_master
|
--let $rpl_connection_name= server_$_rpl_master
|
||||||
--source include/rpl_connection.inc
|
--source include/rpl_connection.inc
|
||||||
--let $_rpl_master_log_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
--let $_rpl_master_log_file= query_get_value(SHOW MASTER STATUS, File, 1)
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo "\$rpl_master_log_file parameter not set for the master: $_rpl_master, use the latest binlog file by executing SHOW MASTER STATUS."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
# Change connection.
|
# Change connection.
|
||||||
--let $rpl_connection_name= server_$_rpl_server
|
--let $rpl_connection_name= server_$_rpl_server
|
||||||
@ -224,6 +228,10 @@ if (!$rpl_skip_change_master)
|
|||||||
if (!$_rpl_master_log_pos_index)
|
if (!$_rpl_master_log_pos_index)
|
||||||
{
|
{
|
||||||
--let $_rpl_master_log_pos=
|
--let $_rpl_master_log_pos=
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo "\$rpl_master_log_pos parameter not set for the master: $_rpl_master. Set log position to empty."
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($rpl_master_log_file)
|
if ($rpl_master_log_file)
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# This script is normally used internally by rpl_init.inc and
|
# This script is normally used internally by rpl_init.inc and
|
||||||
# master-slave.inc, but it can also be used in test cases that need to
|
# master-slave.inc, but it can also be used in test cases that need to
|
||||||
# create more connections or re-create connections after disconnect.
|
# create more connections or re-create connections after disconnect.
|
||||||
#
|
# Default ports SERVER_MYPORT_[1,2] are set by rpl_init.inc.
|
||||||
#
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
#
|
#
|
||||||
|
@ -103,11 +103,9 @@ while ($_rpl_server)
|
|||||||
|
|
||||||
--connection default
|
--connection default
|
||||||
--let $_rpl_server= $rpl_server_count
|
--let $_rpl_server= $rpl_server_count
|
||||||
--let $_rpl_one= _1
|
|
||||||
while ($_rpl_server)
|
while ($_rpl_server)
|
||||||
{
|
{
|
||||||
--disconnect server_$_rpl_server
|
--disconnect server_$_rpl_server
|
||||||
--disconnect server_$_rpl_server$_rpl_one
|
|
||||||
--dec $_rpl_server
|
--dec $_rpl_server
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# ==== Purpose ====
|
# ==== Purpose ====
|
||||||
#
|
#
|
||||||
# Execute a .inc file once for each server that was configured as a
|
# Execute a .inc file once for each server that was configured as a
|
||||||
# slave by rpl_init.inc
|
# slave by rpl_init.inc, for example start_slave.inc or stop_slave.inc file.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
@ -14,6 +14,20 @@
|
|||||||
# $rpl_source_file
|
# $rpl_source_file
|
||||||
# The file that will be sourced.
|
# The file that will be sourced.
|
||||||
#
|
#
|
||||||
|
# $rpl_server_count
|
||||||
|
# The number of servers to configure. If this is not set, the largest
|
||||||
|
# number in $rpl_topology will be used.
|
||||||
|
# This parameter is obtained from rpl_init.inc.
|
||||||
|
#
|
||||||
|
# $rpl_master_list
|
||||||
|
# This parameter is calculated from within rpl_init.inc.
|
||||||
|
#
|
||||||
|
# $rpl_server_count_length
|
||||||
|
# Set to LENGTH($rpl_server_count). So if $rpl_server_count < 10,
|
||||||
|
# then $rpl_server_count_length = 1; if 10 <= $rpl_server_count <
|
||||||
|
# 100, then $rpl_server_count_length = 2, etc.
|
||||||
|
# This parameter is calculated from within rpl_change_topology.inc.
|
||||||
|
#
|
||||||
# $rpl_debug
|
# $rpl_debug
|
||||||
# See include/rpl_init.inc
|
# See include/rpl_init.inc
|
||||||
|
|
||||||
|
@ -3,18 +3,16 @@
|
|||||||
# Set up replication on several servers in a specified topology.
|
# Set up replication on several servers in a specified topology.
|
||||||
#
|
#
|
||||||
# By default, this script does the following:
|
# By default, this script does the following:
|
||||||
# - Creates the connections server_1, server_2, ..., server_N, as
|
# - Creates the connections server_1, server_2, ..., server_N.
|
||||||
# well as extra connections server_1_1, server_2_1, ...,
|
|
||||||
# server_N_1. server_I and server_I_1 are connections to the same
|
|
||||||
# server.
|
|
||||||
# - Verifies that @@server_id of all servers are different.
|
|
||||||
# - Calls RESET MASTER, RESET SLAVE, USE test, CHANGE MASTER, START SLAVE.
|
# - Calls RESET MASTER, RESET SLAVE, USE test, CHANGE MASTER, START SLAVE.
|
||||||
# - Sets the connection to server_1 before exiting.
|
# - Sets the connection to server_1 before exiting.
|
||||||
|
# With $rpl_check_server_ids parameter, the script does the following:
|
||||||
|
# - Verifies that @@server_id of all servers are different.
|
||||||
#
|
#
|
||||||
# ==== Usage ====
|
# ==== Usage ====
|
||||||
#
|
#
|
||||||
# 1. If you are going to use more than two servers, create
|
# 1. If you are going to use more than two servers, create
|
||||||
# rpl_test.cfg with the following contents:
|
# rpl_test.cnf with the following contents:
|
||||||
#
|
#
|
||||||
# !include ../my.cnf
|
# !include ../my.cnf
|
||||||
# [mysqld.1]
|
# [mysqld.1]
|
||||||
@ -34,8 +32,9 @@
|
|||||||
#
|
#
|
||||||
# (It is allowed, but not required, to configure SERVER_MYPORT_1
|
# (It is allowed, but not required, to configure SERVER_MYPORT_1
|
||||||
# and SERVER_MYPORT_2 too. If these variables are not set, the
|
# and SERVER_MYPORT_2 too. If these variables are not set, the
|
||||||
# variables MASTER_MYPORT and SLAVE_MYPORT, configured in the
|
# variables MASTER_MYPORT and SLAVE_MYPORT are used instead.
|
||||||
# default my.cnf used by the rpl suite, are used instead.)
|
# These variables are configured in the rpl_1slave_base.cnf,
|
||||||
|
# that is used in the default my.cnf, which is used by the rpl suite.)
|
||||||
#
|
#
|
||||||
# 2. Execute the following near the top of the test:
|
# 2. Execute the following near the top of the test:
|
||||||
#
|
#
|
||||||
@ -147,18 +146,15 @@ if (!$rpl_debug)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Create two connections to each server; reset master/slave, select
|
# Create connection to the server; reset master/slave, select
|
||||||
# database, set autoinc variables.
|
# database, set autoinc variables.
|
||||||
--let $_rpl_server= $rpl_server_count
|
--let $_rpl_server= $rpl_server_count
|
||||||
--let $_rpl_one= _1
|
|
||||||
while ($_rpl_server)
|
while ($_rpl_server)
|
||||||
{
|
{
|
||||||
# Connect.
|
# Connect.
|
||||||
--let $rpl_server_number= $_rpl_server
|
--let $rpl_server_number= $_rpl_server
|
||||||
--let $rpl_connection_name= server_$_rpl_server
|
--let $rpl_connection_name= server_$_rpl_server
|
||||||
--source include/rpl_connect.inc
|
--source include/rpl_connect.inc
|
||||||
--let $rpl_connection_name= server_$_rpl_server$_rpl_one
|
|
||||||
--source include/rpl_connect.inc
|
|
||||||
|
|
||||||
# Configure server.
|
# Configure server.
|
||||||
--let $rpl_connection_name= server_$_rpl_server
|
--let $rpl_connection_name= server_$_rpl_server
|
||||||
@ -203,7 +199,7 @@ if ($rpl_check_server_ids)
|
|||||||
while ($_rpl_server2)
|
while ($_rpl_server2)
|
||||||
{
|
{
|
||||||
--let $assert_text= Servers $_rpl_server and $_rpl_server2 should have different @@server_id
|
--let $assert_text= Servers $_rpl_server and $_rpl_server2 should have different @@server_id
|
||||||
--let $assert_condition= [$_rpl_server:SELECT @@server_id AS i, i, 1] != [$_rpl_server2:SELECT @@server_id AS i, i, 1]
|
--let $assert_cond= [SELECT @@server_id AS i, i, 1] != $_rpl_server
|
||||||
|
|
||||||
--source include/assert.inc
|
--source include/assert.inc
|
||||||
--dec $_rpl_server2
|
--dec $_rpl_server2
|
||||||
@ -212,18 +208,30 @@ if ($rpl_check_server_ids)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# $rpl_master_list must be set so that include/rpl_change_topology.inc
|
if ($rpl_debug)
|
||||||
# knows which servers are initialized and not.
|
{
|
||||||
|
--echo ---- Check the topology and call CHANGE MASTER ----
|
||||||
|
}
|
||||||
|
|
||||||
|
# $rpl_master_list must be set so that include/rpl_change_topology.inc and later
|
||||||
|
# include/rpl_for_each_slave.inc knows which servers are initialized and not.
|
||||||
--let $rpl_master_list= `SELECT REPEAT('x', $rpl_server_count * LENGTH($rpl_server_count))`
|
--let $rpl_master_list= `SELECT REPEAT('x', $rpl_server_count * LENGTH($rpl_server_count))`
|
||||||
--source include/rpl_change_topology.inc
|
--source include/rpl_change_topology.inc
|
||||||
|
|
||||||
|
|
||||||
if (!$rpl_skip_start_slave)
|
if (!$rpl_skip_start_slave)
|
||||||
{
|
{
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo ---- Start slaves ----
|
||||||
|
}
|
||||||
--source include/rpl_start_slaves.inc
|
--source include/rpl_start_slaves.inc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($rpl_debug)
|
||||||
|
{
|
||||||
|
--echo ---- Set connection to the server_1 ----
|
||||||
|
}
|
||||||
--let $rpl_connection_name= server_1
|
--let $rpl_connection_name= server_1
|
||||||
--source include/rpl_connection.inc
|
--source include/rpl_connection.inc
|
||||||
|
|
||||||
|
@ -72,11 +72,6 @@ if (!$_rpl_server_number)
|
|||||||
--source include/rpl_connection.inc
|
--source include/rpl_connection.inc
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
|
|
||||||
--let $_rpl_one= _1
|
|
||||||
--let $rpl_connection_name= server_$rpl_server_number$_rpl_one
|
|
||||||
--source include/rpl_connection.inc
|
|
||||||
--enable_reconnect
|
|
||||||
|
|
||||||
if ($rpl_debug)
|
if ($rpl_debug)
|
||||||
{
|
{
|
||||||
--echo ---- Wait for reconnect and disable reconnect on all connections ----
|
--echo ---- Wait for reconnect and disable reconnect on all connections ----
|
||||||
@ -122,11 +117,5 @@ if (!$_rpl_server_number)
|
|||||||
--source include/wait_until_connected_again.inc
|
--source include/wait_until_connected_again.inc
|
||||||
--disable_reconnect
|
--disable_reconnect
|
||||||
|
|
||||||
--let $rpl_connection_name= server_$rpl_server_number$_rpl_one
|
|
||||||
--source include/rpl_connection.inc
|
|
||||||
--source include/wait_until_connected_again.inc
|
|
||||||
--disable_reconnect
|
|
||||||
|
|
||||||
|
|
||||||
--let $include_filename= rpl_reconnect.inc
|
--let $include_filename= rpl_reconnect.inc
|
||||||
--source include/end_include_file.inc
|
--source include/end_include_file.inc
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#
|
#
|
||||||
# $slave_timeout
|
# $slave_timeout
|
||||||
# Set the timeout when waiting for slave threads to stop and
|
# Set the timeout when waiting for slave threads to stop and
|
||||||
# start, respectively. See include/wait_for_slave_param.inc
|
# start, respectively. See include/wait_for_slave_param.inc
|
||||||
|
|
||||||
|
|
||||||
--let $include_filename= rpl_start_slaves.inc
|
--let $include_filename= rpl_start_slaves.inc
|
||||||
|
@ -14,13 +14,14 @@
|
|||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $slave_timeout
|
# $slave_timeout
|
||||||
# See include/wait_for_slave_param.inc
|
# Timeout used when waiting for the slave IO thread to start.
|
||||||
|
# See include/wait_for_slave_param.inc.
|
||||||
#
|
#
|
||||||
# $rpl_allow_error
|
# $rpl_allow_error
|
||||||
# By default, this file fails if there is an error in the IO
|
# By default, this file fails if there is an error in the IO
|
||||||
# thread. However, the IO thread can recover and reconnect after
|
# thread. However, the IO thread can recover and reconnect after
|
||||||
# certain errors. If such an error is expected, can set
|
# certain errors. If such an error is expected, can set
|
||||||
# $rpl_allow_error=1. This will prevent this file from failing if
|
# $rpl_allow_error=1. This will prevent this file from failing if
|
||||||
# there is an error in the IO thread.
|
# there is an error in the IO thread.
|
||||||
#
|
#
|
||||||
# $rpl_debug
|
# $rpl_debug
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $slave_timeout
|
# $slave_timeout
|
||||||
|
# Timeout used when waiting for the slave SQL thread to start.
|
||||||
# See include/wait_for_slave_param.inc
|
# See include/wait_for_slave_param.inc
|
||||||
#
|
#
|
||||||
# $rpl_debug
|
# $rpl_debug
|
||||||
@ -25,7 +26,7 @@ let $slave_param= Slave_SQL_Running;
|
|||||||
let $slave_param_value= Yes;
|
let $slave_param_value= Yes;
|
||||||
|
|
||||||
# Unfortunately, the slave sql thread sets Slave_SQL_Running=Yes
|
# Unfortunately, the slave sql thread sets Slave_SQL_Running=Yes
|
||||||
# *before* it clears Last_SQL_Errno. So we have to allow errors in
|
# *before* it clears Last_SQL_Errno. So we have to allow errors in
|
||||||
# the SQL thread here.
|
# the SQL thread here.
|
||||||
|
|
||||||
#--let $slave_error_param= Last_SQL_Errno
|
#--let $slave_error_param= Last_SQL_Errno
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#
|
#
|
||||||
# Parameters:
|
# Parameters:
|
||||||
# $slave_timeout
|
# $slave_timeout
|
||||||
|
# Timeout used when waiting for the slave threads to start.
|
||||||
# See include/wait_for_slave_param.inc
|
# See include/wait_for_slave_param.inc
|
||||||
#
|
#
|
||||||
# $rpl_debug
|
# $rpl_debug
|
||||||
|
@ -94,7 +94,7 @@ py
|
|||||||
import subprocess,shlex,time
|
import subprocess,shlex,time
|
||||||
valg=subprocess.Popen(shlex.split("""valgrind --tool=memcheck --show-reachable=yes --leak-check=yes --num-callers=16 --quiet --suppressions=valgrind.supp --vgdb-error=0 {exe} {args} --loose-wait-for-pos-timeout=1500"""))
|
valg=subprocess.Popen(shlex.split("""valgrind --tool=memcheck --show-reachable=yes --leak-check=yes --num-callers=16 --quiet --suppressions=valgrind.supp --vgdb-error=0 {exe} {args} --loose-wait-for-pos-timeout=1500"""))
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
gdb.execute("target remote | /usr/lib64/valgrind/../../bin/vgdb --pid=" + str(valg.pid))
|
gdb.execute("target remote | vgdb --pid=" + str(valg.pid))
|
||||||
EEE
|
EEE
|
||||||
pre => sub {
|
pre => sub {
|
||||||
my $debug_libraries_path= "/usr/lib/debug";
|
my $debug_libraries_path= "/usr/lib/debug";
|
||||||
|
@ -20,9 +20,10 @@ package My::Platform;
|
|||||||
use strict;
|
use strict;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use File::Path;
|
use File::Path;
|
||||||
|
use Carp;
|
||||||
|
|
||||||
use base qw(Exporter);
|
use base qw(Exporter);
|
||||||
our @EXPORT= qw(IS_CYGWIN IS_WINDOWS IS_WIN32PERL IS_AIX
|
our @EXPORT= qw(IS_CYGWIN IS_MSYS IS_WINDOWS IS_WIN32PERL IS_AIX
|
||||||
native_path posix_path mixed_path
|
native_path posix_path mixed_path
|
||||||
check_socket_path_length process_alive open_for_append);
|
check_socket_path_length process_alive open_for_append);
|
||||||
|
|
||||||
@ -33,9 +34,15 @@ BEGIN {
|
|||||||
die "Could not execute 'cygpath': $!";
|
die "Could not execute 'cygpath': $!";
|
||||||
}
|
}
|
||||||
eval 'sub IS_CYGWIN { 1 }';
|
eval 'sub IS_CYGWIN { 1 }';
|
||||||
|
eval 'sub IS_MSYS { 0 }';
|
||||||
|
}
|
||||||
|
elsif ($^O eq "msys") {
|
||||||
|
eval 'sub IS_CYGWIN { 1 }';
|
||||||
|
eval 'sub IS_MSYS { 1 }';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
eval 'sub IS_CYGWIN { 0 }';
|
eval 'sub IS_CYGWIN { 0 }';
|
||||||
|
eval 'sub IS_MSYS { 0 }';
|
||||||
}
|
}
|
||||||
if ($^O eq "MSWin32") {
|
if ($^O eq "MSWin32") {
|
||||||
eval 'sub IS_WIN32PERL { 1 }';
|
eval 'sub IS_WIN32PERL { 1 }';
|
||||||
@ -95,8 +102,13 @@ sub mixed_path {
|
|||||||
|
|
||||||
sub native_path {
|
sub native_path {
|
||||||
my ($path)= @_;
|
my ($path)= @_;
|
||||||
$path=~ s/\//\\/g
|
if (IS_CYGWIN) {
|
||||||
if (IS_CYGWIN or IS_WIN32PERL);
|
# \\\\ protects against 2 expansions (just for the case)
|
||||||
|
$path=~ s/\/+|\\+/\\\\\\\\/g;
|
||||||
|
}
|
||||||
|
elsif (IS_WINDOWS) {
|
||||||
|
$path=~ s/\/+/\\/g;
|
||||||
|
}
|
||||||
return $path;
|
return $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -219,4 +231,69 @@ sub open_for_append
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub check_cygwin_subshell
|
||||||
|
{
|
||||||
|
# Only pipe (or sh-expansion) is fed to /bin/sh
|
||||||
|
my $out= `echo %comspec%|cat`;
|
||||||
|
return ($out =~ /\bcmd.exe\b/) ? 0 : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub install_shell_wrapper()
|
||||||
|
{
|
||||||
|
system("rm -f /bin/sh.exe") and die $!;
|
||||||
|
my $wrapper= <<'EOF';
|
||||||
|
#!/bin/bash
|
||||||
|
if [[ -n "$MTR_PERL" && "$1" = "-c" ]]; then
|
||||||
|
shift
|
||||||
|
exec $(cygpath -m "$COMSPEC") /C "$@"
|
||||||
|
fi
|
||||||
|
exec /bin/bash "$@"
|
||||||
|
EOF
|
||||||
|
open(OUT, '>', "/bin/sh") or die "/bin/sh: $!\n";
|
||||||
|
print OUT $wrapper;
|
||||||
|
close(OUT);
|
||||||
|
system("chmod +x /bin/sh") and die $!;
|
||||||
|
print "Cygwin subshell wrapper /bin/sh was installed, please restart MTR!\n";
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub uninstall_shell_wrapper()
|
||||||
|
{
|
||||||
|
system("rm -f /bin/sh") and die $!;
|
||||||
|
system("cp /bin/bash.exe /bin/sh.exe") and die $!;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub cygwin_subshell_fix
|
||||||
|
{
|
||||||
|
my ($opt_name, $opt_value)= @_;
|
||||||
|
if ($opt_name ne "cygwin-subshell-fix") {
|
||||||
|
confess "Wrong option name: ${opt_name}";
|
||||||
|
}
|
||||||
|
if ($opt_value eq "do") {
|
||||||
|
if (check_cygwin_subshell()) {
|
||||||
|
install_shell_wrapper();
|
||||||
|
} else {
|
||||||
|
print "Cygwin subshell fix was already installed, skipping...\n";
|
||||||
|
}
|
||||||
|
} elsif ($opt_value eq "remove") {
|
||||||
|
if (check_cygwin_subshell()) {
|
||||||
|
print "Cygwin subshell fix was already uninstalled, skipping...\n";
|
||||||
|
} else {
|
||||||
|
uninstall_shell_wrapper();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
die "Wrong --cygwin-subshell-fix value: ${opt_value} (expected do/remove)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sub options
|
||||||
|
{
|
||||||
|
if (IS_CYGWIN) {
|
||||||
|
return ('cygwin-subshell-fix=s' => \&cygwin_subshell_fix);
|
||||||
|
} else {
|
||||||
|
return ();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -102,7 +102,7 @@ else
|
|||||||
|
|
||||||
# Find the safe process binary or script
|
# Find the safe process binary or script
|
||||||
sub find_bin {
|
sub find_bin {
|
||||||
if (IS_WIN32PERL or IS_CYGWIN)
|
if (IS_WINDOWS)
|
||||||
{
|
{
|
||||||
# Use my_safe_process.exe
|
# Use my_safe_process.exe
|
||||||
my $exe= my_find_bin($bindir, ["lib/My/SafeProcess", "My/SafeProcess"],
|
my $exe= my_find_bin($bindir, ["lib/My/SafeProcess", "My/SafeProcess"],
|
||||||
|
@ -111,7 +111,7 @@ sub read_test {
|
|||||||
$serialized =~ s/\\([0-9a-fA-F]{2})/chr(hex($1))/eg;
|
$serialized =~ s/\\([0-9a-fA-F]{2})/chr(hex($1))/eg;
|
||||||
my $test= Storable::thaw($serialized);
|
my $test= Storable::thaw($serialized);
|
||||||
use Data::Dumper;
|
use Data::Dumper;
|
||||||
die "wrong class (hack attempt?): ".ref($test)."\n".Dumper(\$test, $serialized)
|
confess "Not My::Test: ". ref($test). "\n". Dumper(\$test, $serialized)
|
||||||
unless ref($test) eq 'My::Test';
|
unless ref($test) eq 'My::Test';
|
||||||
resfile_from_test($test) if $::opt_resfile;
|
resfile_from_test($test) if $::opt_resfile;
|
||||||
return $test;
|
return $test;
|
||||||
|
@ -48,6 +48,7 @@ our $timestamp= 0;
|
|||||||
our $timediff= 0;
|
our $timediff= 0;
|
||||||
our $name;
|
our $name;
|
||||||
our $verbose;
|
our $verbose;
|
||||||
|
# TODO: no option for that? Why is it different from $verbose?
|
||||||
our $verbose_restart= 0;
|
our $verbose_restart= 0;
|
||||||
our $timer= 1;
|
our $timer= 1;
|
||||||
our $tests_total;
|
our $tests_total;
|
||||||
|
@ -3068,6 +3068,40 @@ drop table t1;
|
|||||||
# End of 10.5 tests
|
# End of 10.5 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
# MDEV-32449 Server crashes in Alter_info::add_stat_drop_index upon CREATE TABLE
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
`altcol1` blob DEFAULT '',
|
||||||
|
KEY `altcol1` (`altcol1`(2300))
|
||||||
|
) ROW_FORMAT=PAGE, ENGINE=Aria;
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY h (`altcol1`) REFERENCES t1 (`altcol1`) ON UPDATE SET DEFAULT, ALGORITHM=COPY;
|
||||||
|
Warnings:
|
||||||
|
Note 1071 Specified key was too long; max key length is 2300 bytes
|
||||||
|
create or replace table t2 like t1;
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`altcol1` blob DEFAULT '',
|
||||||
|
KEY `altcol1` (`altcol1`(2300)),
|
||||||
|
KEY `h` (`altcol1`(2300))
|
||||||
|
) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1 ROW_FORMAT=PAGE
|
||||||
|
show create table t2;
|
||||||
|
Table Create Table
|
||||||
|
t2 CREATE TABLE `t2` (
|
||||||
|
`altcol1` blob DEFAULT '',
|
||||||
|
KEY `altcol1` (`altcol1`(2300))
|
||||||
|
) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1 ROW_FORMAT=PAGE
|
||||||
|
drop table t1,t2;
|
||||||
|
# Another test for MDEV-32449
|
||||||
|
CREATE TABLE t1 (a POINT, b POINT, KEY(a)) ENGINE=Aria;
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t (b);
|
||||||
|
CREATE TEMPORARY TABLE t2 LIKE t1;
|
||||||
|
DROP TEMPORARY TABLE t2;
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of 10.6 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-26767 Server crashes when rename table and alter storage engine
|
# MDEV-26767 Server crashes when rename table and alter storage engine
|
||||||
#
|
#
|
||||||
alter table txxx engine=innodb, rename to tyyy;
|
alter table txxx engine=innodb, rename to tyyy;
|
||||||
|
@ -2375,6 +2375,32 @@ drop table t1;
|
|||||||
--echo # End of 10.5 tests
|
--echo # End of 10.5 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-32449 Server crashes in Alter_info::add_stat_drop_index upon CREATE TABLE
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
`altcol1` blob DEFAULT '',
|
||||||
|
KEY `altcol1` (`altcol1`(2300))
|
||||||
|
) ROW_FORMAT=PAGE, ENGINE=Aria;
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY h (`altcol1`) REFERENCES t1 (`altcol1`) ON UPDATE SET DEFAULT, ALGORITHM=COPY;
|
||||||
|
create or replace table t2 like t1;
|
||||||
|
show create table t1;
|
||||||
|
show create table t2;
|
||||||
|
drop table t1,t2;
|
||||||
|
|
||||||
|
--echo # Another test for MDEV-32449
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a POINT, b POINT, KEY(a)) ENGINE=Aria;
|
||||||
|
ALTER TABLE t1 ADD FOREIGN KEY (a) REFERENCES t (b);
|
||||||
|
CREATE TEMPORARY TABLE t2 LIKE t1;
|
||||||
|
DROP TEMPORARY TABLE t2;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.6 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-26767 Server crashes when rename table and alter storage engine
|
--echo # MDEV-26767 Server crashes when rename table and alter storage engine
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -71,3 +71,351 @@ optimize table t1 extended;
|
|||||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'extended' at line 1
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'extended' at line 1
|
||||||
drop table t1;
|
drop table t1;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
|
#
|
||||||
|
# Test analyze of text column (not yet supported)
|
||||||
|
#
|
||||||
|
set optimizer_use_condition_selectivity=4;
|
||||||
|
set histogram_type='single_prec_hb';
|
||||||
|
set histogram_size=255;
|
||||||
|
create table t1 (a int not null, t tinytext, tx text);
|
||||||
|
insert into t1 select seq+1, repeat('X',seq*5), repeat('X',seq*10) from seq_0_to_50;
|
||||||
|
insert into t1 select seq+100, repeat('X',5), "" from seq_1_to_10;
|
||||||
|
analyze table t1;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze Warning Engine-independent statistics are not collected for column 't'
|
||||||
|
test.t1 analyze Warning Engine-independent statistics are not collected for column 'tx'
|
||||||
|
test.t1 analyze status OK
|
||||||
|
explain select count(*) from t1 where t='XXXXXX';
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 61 Using where
|
||||||
|
select column_name, min_value, max_value, hist_size from mysql.column_stats where table_name='t1';
|
||||||
|
column_name min_value max_value hist_size
|
||||||
|
a 1 110 255
|
||||||
|
drop table t1;
|
||||||
|
set use_stat_tables=default;
|
||||||
|
set histogram_type=default;
|
||||||
|
set histogram_size=default;
|
||||||
|
#
|
||||||
|
# MDEV-31957 Concurrent ALTER and ANALYZE collecting statistics can
|
||||||
|
# result in stale statistical data
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT, b VARCHAR(128));
|
||||||
|
INSERT INTO t1 SELECT seq, CONCAT('s',seq) FROM seq_1_to_100;
|
||||||
|
connect con1,localhost,root,,;
|
||||||
|
ALTER TABLE t1 MODIFY b BLOB;
|
||||||
|
connection default;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
connection con1;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
connection default;
|
||||||
|
disconnect con1;
|
||||||
|
select db_name,table_name,column_name from mysql.column_stats;
|
||||||
|
db_name table_name column_name
|
||||||
|
test t1 a
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# Testing swapping columns
|
||||||
|
#
|
||||||
|
create or replace table t1 (a int primary key, b varchar(100), c varchar(100), d varchar(100)) engine=innodb;
|
||||||
|
insert into t1 select seq, repeat('b',seq),repeat('c',mod(seq,5)), repeat('d',mod(seq,10)) from seq_1_to_100;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status OK
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 b 50.5000
|
||||||
|
test t1 c 2.0000
|
||||||
|
test t1 d 4.5000
|
||||||
|
alter table t1 change b c varchar(200), change c b varchar(200);
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 b 2.0000
|
||||||
|
test t1 c 50.5000
|
||||||
|
test t1 d 4.5000
|
||||||
|
alter table t1 change b c varchar(200), change c d varchar(200), change d b varchar(200) ;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 b 4.5000
|
||||||
|
test t1 c 2.0000
|
||||||
|
test t1 d 50.5000
|
||||||
|
alter table t1 change b c varchar(200), change c d varchar(200), change d e varchar(200) ;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 c 4.5000
|
||||||
|
test t1 d 2.0000
|
||||||
|
test t1 e 50.5000
|
||||||
|
alter table t1 change e d varchar(200), drop column d;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 c 4.5000
|
||||||
|
test t1 d 50.5000
|
||||||
|
# Test having non existing column in column_stats
|
||||||
|
insert into mysql.column_stats (db_name,table_name,column_name) values ("test","t1","b");
|
||||||
|
alter table t1 change c d varchar(200), change d b varchar(200);
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 b 50.5000
|
||||||
|
test t1 d 4.5000
|
||||||
|
# Test having a conflicting temporary name
|
||||||
|
insert into mysql.column_stats (db_name,table_name,column_name) values ("test","t1",concat("#sql_tmp_name#1",char(0)));
|
||||||
|
alter table t1 change d b varchar(200), change b d varchar(200);
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 b 4.5000
|
||||||
|
test t1 d 50.5000
|
||||||
|
drop table t1;
|
||||||
|
truncate table mysql.column_stats;
|
||||||
|
create or replace table t1 (a int primary key, b varchar(100), c varchar(100), d varchar(100)) engine=myisam;
|
||||||
|
insert into t1 select seq, repeat('b',seq),repeat('c',mod(seq,5)), repeat('d',mod(seq,10)) from seq_1_to_100;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status OK
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 b 50.5000
|
||||||
|
test t1 c 2.0000
|
||||||
|
test t1 d 4.5000
|
||||||
|
alter table t1 change b c varchar(200), change c b varchar(200);
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 d 4.5000
|
||||||
|
analyze table t1 persistent for columns(b,c) indexes all;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status Table is already up to date
|
||||||
|
alter table t1 change b c varchar(200), change c d varchar(200), change d b varchar(200) ;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 b 50.5000
|
||||||
|
test t1 c 2.0000
|
||||||
|
analyze table t1 persistent for columns(d) indexes all;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status Table is already up to date
|
||||||
|
alter table t1 change b c varchar(200), change c d varchar(200), change d e varchar(200) ;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 c 50.5000
|
||||||
|
test t1 d 2.0000
|
||||||
|
test t1 e 50.5000
|
||||||
|
alter table t1 change e d varchar(200), drop column d;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
db_name table_name column_name avg_length
|
||||||
|
test t1 a 4.0000
|
||||||
|
test t1 c 50.5000
|
||||||
|
test t1 d 50.5000
|
||||||
|
drop table t1;
|
||||||
|
truncate table mysql.column_stats;
|
||||||
|
create table t1 (a int, b blob, unique(b)) engine= innodb;
|
||||||
|
analyze table t1 persistent for all;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze Warning Engine-independent statistics are not collected for column 'b'
|
||||||
|
test.t1 analyze status OK
|
||||||
|
select column_name from mysql.column_stats where table_name = 't1';
|
||||||
|
column_name
|
||||||
|
a
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (a int, b blob, c int generated always as (length(b)) virtual) engine= innodb;
|
||||||
|
analyze table t1 persistent for all;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze Warning Engine-independent statistics are not collected for column 'b'
|
||||||
|
test.t1 analyze status OK
|
||||||
|
select column_name from mysql.column_stats where table_name = 't1';
|
||||||
|
column_name
|
||||||
|
a
|
||||||
|
c
|
||||||
|
drop table t1;
|
||||||
|
CREATE or replace TABLE t1 (a INT, b CHAR(8));
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status Table is already up to date
|
||||||
|
ALTER TABLE t1 CHANGE b c INT, ORDER BY b;
|
||||||
|
SELECT db_name, table_name, column_name FROM mysql.column_stats where table_name = 't1';
|
||||||
|
db_name table_name column_name
|
||||||
|
test t1 a
|
||||||
|
test t1 c
|
||||||
|
drop table t1;
|
||||||
|
CREATE or replace TABLE t1 (a INT, b CHAR(8));
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status Table is already up to date
|
||||||
|
ALTER TABLE t1 RENAME COLUMN b to c, ALGORITHM=COPY;
|
||||||
|
SELECT db_name, table_name, column_name FROM mysql.column_stats where table_name = 't1';
|
||||||
|
db_name table_name column_name
|
||||||
|
test t1 a
|
||||||
|
test t1 c
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# Testing swapping indexes
|
||||||
|
#
|
||||||
|
create or replace table t1 (a int primary key, b varchar(100), c varchar(100), d varchar(100), index (b), index(c), index(d,b)) engine=innodb;
|
||||||
|
insert into t1 select seq, repeat('b',seq),repeat('c',mod(seq,5)), repeat('d',mod(seq,10)) from seq_1_to_100;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status OK
|
||||||
|
select * from mysql.index_stats order by index_name, prefix_arity;
|
||||||
|
db_name table_name index_name prefix_arity avg_frequency
|
||||||
|
test t1 PRIMARY 1 1.0000
|
||||||
|
test t1 b 1 1.0000
|
||||||
|
test t1 b 2 1.0000
|
||||||
|
test t1 c 1 20.0000
|
||||||
|
test t1 c 2 1.0000
|
||||||
|
test t1 d 1 10.0000
|
||||||
|
test t1 d 2 1.0000
|
||||||
|
test t1 d 3 1.0000
|
||||||
|
alter table t1 rename index b to c, rename index c to d, rename index d to b;
|
||||||
|
select * from mysql.index_stats order by index_name;
|
||||||
|
db_name table_name index_name prefix_arity avg_frequency
|
||||||
|
test t1 PRIMARY 1 1.0000
|
||||||
|
test t1 b 1 10.0000
|
||||||
|
test t1 b 2 1.0000
|
||||||
|
test t1 b 3 1.0000
|
||||||
|
test t1 c 1 1.0000
|
||||||
|
test t1 c 2 1.0000
|
||||||
|
test t1 d 1 20.0000
|
||||||
|
test t1 d 2 1.0000
|
||||||
|
alter table t1 rename index b to c, rename index c to d, rename index d to e;
|
||||||
|
select * from mysql.index_stats order by index_name, prefix_arity;
|
||||||
|
db_name table_name index_name prefix_arity avg_frequency
|
||||||
|
test t1 PRIMARY 1 1.0000
|
||||||
|
test t1 c 1 10.0000
|
||||||
|
test t1 c 2 1.0000
|
||||||
|
test t1 c 3 1.0000
|
||||||
|
test t1 d 1 1.0000
|
||||||
|
test t1 d 2 1.0000
|
||||||
|
test t1 e 1 20.0000
|
||||||
|
test t1 e 2 1.0000
|
||||||
|
alter table t1 rename index e to b;
|
||||||
|
alter table t1 change b c varchar(200), change c d varchar(200), change d e varchar(200) ;
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` int(11) NOT NULL,
|
||||||
|
`c` varchar(200) DEFAULT NULL,
|
||||||
|
`d` varchar(200) DEFAULT NULL,
|
||||||
|
`e` varchar(200) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`a`),
|
||||||
|
KEY `d` (`c`),
|
||||||
|
KEY `b` (`d`),
|
||||||
|
KEY `c` (`e`,`c`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
|
select * from mysql.index_stats order by index_name, prefix_arity;
|
||||||
|
db_name table_name index_name prefix_arity avg_frequency
|
||||||
|
test t1 PRIMARY 1 1.0000
|
||||||
|
test t1 b 1 20.0000
|
||||||
|
test t1 b 2 1.0000
|
||||||
|
test t1 c 1 10.0000
|
||||||
|
test t1 c 2 1.0000
|
||||||
|
test t1 c 3 1.0000
|
||||||
|
test t1 d 1 1.0000
|
||||||
|
test t1 d 2 1.0000
|
||||||
|
# Test having a conflicting temporary name
|
||||||
|
insert into mysql.index_stats (db_name,table_name,index_name,prefix_arity) values ("test","t1",concat("#sql_tmp_name#1",char(0)),1);
|
||||||
|
alter table t1 rename index c to d, rename index d to c;
|
||||||
|
select * from mysql.index_stats order by index_name, prefix_arity;
|
||||||
|
db_name table_name index_name prefix_arity avg_frequency
|
||||||
|
test t1 PRIMARY 1 1.0000
|
||||||
|
test t1 b 1 20.0000
|
||||||
|
test t1 b 2 1.0000
|
||||||
|
test t1 c 1 1.0000
|
||||||
|
test t1 c 2 1.0000
|
||||||
|
test t1 d 1 10.0000
|
||||||
|
test t1 d 2 1.0000
|
||||||
|
test t1 d 3 1.0000
|
||||||
|
drop table t1;
|
||||||
|
select * from mysql.index_stats order by index_name, prefix_arity;
|
||||||
|
db_name table_name index_name prefix_arity avg_frequency
|
||||||
|
#
|
||||||
|
# Test of adding key that replaces foreign key
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (aaaa INT, b INT, KEY(b), FOREIGN KEY(aaaa) REFERENCES t1(b)) ENGINE=InnoDB;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status OK
|
||||||
|
SELECT index_name FROM mysql.index_stats WHERE table_name = 't1' order by index_name;
|
||||||
|
index_name
|
||||||
|
aaaa
|
||||||
|
b
|
||||||
|
ALTER TABLE t1 ADD KEY idx(aaaa);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`aaaa` int(11) DEFAULT NULL,
|
||||||
|
`b` int(11) DEFAULT NULL,
|
||||||
|
KEY `b` (`b`),
|
||||||
|
KEY `idx` (`aaaa`),
|
||||||
|
CONSTRAINT `t1_ibfk_1` FOREIGN KEY (`aaaa`) REFERENCES `t1` (`b`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
|
SELECT index_name FROM mysql.index_stats WHERE table_name = 't1' order by index_name;
|
||||||
|
index_name
|
||||||
|
b
|
||||||
|
truncate table mysql.index_stats;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status OK
|
||||||
|
SELECT index_name FROM mysql.index_stats WHERE table_name = 't1' order by index_name;
|
||||||
|
index_name
|
||||||
|
b
|
||||||
|
idx
|
||||||
|
ALTER TABLE t1 DROP KEY idx;
|
||||||
|
ERROR HY000: Cannot drop index 'idx': needed in a foreign key constraint
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Check index rename where name is not changed
|
||||||
|
#
|
||||||
|
create or replace table t1 (a int primary key, b int, c int, key b (b,c));
|
||||||
|
show create table t1;
|
||||||
|
Table Create Table
|
||||||
|
t1 CREATE TABLE `t1` (
|
||||||
|
`a` int(11) NOT NULL,
|
||||||
|
`b` int(11) DEFAULT NULL,
|
||||||
|
`c` int(11) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`a`),
|
||||||
|
KEY `b` (`b`,`c`)
|
||||||
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
|
analyze table t1 persistent for all;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 analyze status Engine-independent statistics collected
|
||||||
|
test.t1 analyze status Table is already up to date
|
||||||
|
select * from mysql.index_stats where table_name= "t1";
|
||||||
|
db_name table_name index_name prefix_arity avg_frequency
|
||||||
|
test t1 PRIMARY 1 1.0000
|
||||||
|
test t1 b 1 NULL
|
||||||
|
test t1 b 2 NULL
|
||||||
|
alter ignore table t1 rename key `b` to b, LOCK=shared;
|
||||||
|
select * from mysql.index_stats where table_name= "t1";
|
||||||
|
db_name table_name index_name prefix_arity avg_frequency
|
||||||
|
test t1 PRIMARY 1 1.0000
|
||||||
|
test t1 b 1 NULL
|
||||||
|
test t1 b 2 NULL
|
||||||
|
alter ignore table t1 rename key `b` to `B`, LOCK=shared;
|
||||||
|
select * from mysql.index_stats where table_name= "t1";
|
||||||
|
db_name table_name index_name prefix_arity avg_frequency
|
||||||
|
test t1 PRIMARY 1 1.0000
|
||||||
|
test t1 B 1 NULL
|
||||||
|
test t1 B 2 NULL
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# End of 10.6 tests
|
||||||
|
#
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
--source include/have_sequence.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
#
|
#
|
||||||
# Bug #10901 Analyze Table on new table destroys table
|
# Bug #10901 Analyze Table on new table destroys table
|
||||||
# This is minimal test case to get error
|
# This is minimal test case to get error
|
||||||
@ -87,3 +90,185 @@ optimize table t1 extended;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
--echo End of 5.0 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Test analyze of text column (not yet supported)
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
set optimizer_use_condition_selectivity=4;
|
||||||
|
set histogram_type='single_prec_hb';
|
||||||
|
set histogram_size=255;
|
||||||
|
|
||||||
|
create table t1 (a int not null, t tinytext, tx text);
|
||||||
|
insert into t1 select seq+1, repeat('X',seq*5), repeat('X',seq*10) from seq_0_to_50;
|
||||||
|
insert into t1 select seq+100, repeat('X',5), "" from seq_1_to_10;
|
||||||
|
analyze table t1;
|
||||||
|
explain select count(*) from t1 where t='XXXXXX';
|
||||||
|
select column_name, min_value, max_value, hist_size from mysql.column_stats where table_name='t1';
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
set use_stat_tables=default;
|
||||||
|
set histogram_type=default;
|
||||||
|
set histogram_size=default;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-31957 Concurrent ALTER and ANALYZE collecting statistics can
|
||||||
|
--echo # result in stale statistical data
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a INT, b VARCHAR(128));
|
||||||
|
INSERT INTO t1 SELECT seq, CONCAT('s',seq) FROM seq_1_to_100;
|
||||||
|
|
||||||
|
# We have to disable query log as the ANALYZE TABLE can be run in different
|
||||||
|
# order. The important thing is what is finally in column_stats
|
||||||
|
--disable_result_log
|
||||||
|
--connect (con1,localhost,root,,)
|
||||||
|
--send ALTER TABLE t1 MODIFY b BLOB
|
||||||
|
|
||||||
|
--connection default
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
|
||||||
|
--connection con1
|
||||||
|
--reap
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
--connection default
|
||||||
|
--disconnect con1
|
||||||
|
--enable_result_log
|
||||||
|
select db_name,table_name,column_name from mysql.column_stats;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Testing swapping columns
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create or replace table t1 (a int primary key, b varchar(100), c varchar(100), d varchar(100)) engine=innodb;
|
||||||
|
insert into t1 select seq, repeat('b',seq),repeat('c',mod(seq,5)), repeat('d',mod(seq,10)) from seq_1_to_100;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
alter table t1 change b c varchar(200), change c b varchar(200);
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
alter table t1 change b c varchar(200), change c d varchar(200), change d b varchar(200) ;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
alter table t1 change b c varchar(200), change c d varchar(200), change d e varchar(200) ;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
alter table t1 change e d varchar(200), drop column d;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
|
||||||
|
--echo # Test having non existing column in column_stats
|
||||||
|
|
||||||
|
insert into mysql.column_stats (db_name,table_name,column_name) values ("test","t1","b");
|
||||||
|
alter table t1 change c d varchar(200), change d b varchar(200);
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
|
||||||
|
--echo # Test having a conflicting temporary name
|
||||||
|
insert into mysql.column_stats (db_name,table_name,column_name) values ("test","t1",concat("#sql_tmp_name#1",char(0)));
|
||||||
|
alter table t1 change d b varchar(200), change b d varchar(200);
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
truncate table mysql.column_stats;
|
||||||
|
|
||||||
|
create or replace table t1 (a int primary key, b varchar(100), c varchar(100), d varchar(100)) engine=myisam;
|
||||||
|
insert into t1 select seq, repeat('b',seq),repeat('c',mod(seq,5)), repeat('d',mod(seq,10)) from seq_1_to_100;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
alter table t1 change b c varchar(200), change c b varchar(200);
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
analyze table t1 persistent for columns(b,c) indexes all;
|
||||||
|
alter table t1 change b c varchar(200), change c d varchar(200), change d b varchar(200) ;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
analyze table t1 persistent for columns(d) indexes all;
|
||||||
|
alter table t1 change b c varchar(200), change c d varchar(200), change d e varchar(200) ;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
alter table t1 change e d varchar(200), drop column d;
|
||||||
|
select db_name,table_name,column_name,avg_length from mysql.column_stats order by column_name;
|
||||||
|
drop table t1;
|
||||||
|
truncate table mysql.column_stats;
|
||||||
|
|
||||||
|
create table t1 (a int, b blob, unique(b)) engine= innodb;
|
||||||
|
analyze table t1 persistent for all;
|
||||||
|
select column_name from mysql.column_stats where table_name = 't1';
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
create table t1 (a int, b blob, c int generated always as (length(b)) virtual) engine= innodb;
|
||||||
|
analyze table t1 persistent for all;
|
||||||
|
select column_name from mysql.column_stats where table_name = 't1';
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
CREATE or replace TABLE t1 (a INT, b CHAR(8));
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
ALTER TABLE t1 CHANGE b c INT, ORDER BY b;
|
||||||
|
SELECT db_name, table_name, column_name FROM mysql.column_stats where table_name = 't1';
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
CREATE or replace TABLE t1 (a INT, b CHAR(8));
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
ALTER TABLE t1 RENAME COLUMN b to c, ALGORITHM=COPY;
|
||||||
|
SELECT db_name, table_name, column_name FROM mysql.column_stats where table_name = 't1';
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Testing swapping indexes
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create or replace table t1 (a int primary key, b varchar(100), c varchar(100), d varchar(100), index (b), index(c), index(d,b)) engine=innodb;
|
||||||
|
insert into t1 select seq, repeat('b',seq),repeat('c',mod(seq,5)), repeat('d',mod(seq,10)) from seq_1_to_100;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
select * from mysql.index_stats order by index_name, prefix_arity;
|
||||||
|
alter table t1 rename index b to c, rename index c to d, rename index d to b;
|
||||||
|
select * from mysql.index_stats order by index_name;
|
||||||
|
|
||||||
|
alter table t1 rename index b to c, rename index c to d, rename index d to e;
|
||||||
|
select * from mysql.index_stats order by index_name, prefix_arity;
|
||||||
|
alter table t1 rename index e to b;
|
||||||
|
alter table t1 change b c varchar(200), change c d varchar(200), change d e varchar(200) ;
|
||||||
|
show create table t1;
|
||||||
|
select * from mysql.index_stats order by index_name, prefix_arity;
|
||||||
|
|
||||||
|
--echo # Test having a conflicting temporary name
|
||||||
|
insert into mysql.index_stats (db_name,table_name,index_name,prefix_arity) values ("test","t1",concat("#sql_tmp_name#1",char(0)),1);
|
||||||
|
alter table t1 rename index c to d, rename index d to c;
|
||||||
|
select * from mysql.index_stats order by index_name, prefix_arity;
|
||||||
|
drop table t1;
|
||||||
|
select * from mysql.index_stats order by index_name, prefix_arity;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Test of adding key that replaces foreign key
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (aaaa INT, b INT, KEY(b), FOREIGN KEY(aaaa) REFERENCES t1(b)) ENGINE=InnoDB;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
|
||||||
|
SELECT index_name FROM mysql.index_stats WHERE table_name = 't1' order by index_name;
|
||||||
|
|
||||||
|
ALTER TABLE t1 ADD KEY idx(aaaa);
|
||||||
|
SHOW CREATE TABLE t1;
|
||||||
|
|
||||||
|
SELECT index_name FROM mysql.index_stats WHERE table_name = 't1' order by index_name;
|
||||||
|
|
||||||
|
truncate table mysql.index_stats;
|
||||||
|
ANALYZE TABLE t1 PERSISTENT FOR ALL;
|
||||||
|
SELECT index_name FROM mysql.index_stats WHERE table_name = 't1' order by index_name;
|
||||||
|
|
||||||
|
--error ER_DROP_INDEX_FK
|
||||||
|
ALTER TABLE t1 DROP KEY idx;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Check index rename where name is not changed
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create or replace table t1 (a int primary key, b int, c int, key b (b,c));
|
||||||
|
show create table t1;
|
||||||
|
analyze table t1 persistent for all;
|
||||||
|
select * from mysql.index_stats where table_name= "t1";
|
||||||
|
alter ignore table t1 rename key `b` to b, LOCK=shared;
|
||||||
|
select * from mysql.index_stats where table_name= "t1";
|
||||||
|
alter ignore table t1 rename key `b` to `B`, LOCK=shared;
|
||||||
|
select * from mysql.index_stats where table_name= "t1";
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.6 tests
|
||||||
|
--echo #
|
||||||
|
@ -512,7 +512,7 @@ drop table t1;
|
|||||||
# MDEV-18689: parenthesis around table names and derived tables
|
# MDEV-18689: parenthesis around table names and derived tables
|
||||||
#
|
#
|
||||||
select * from ( mysql.db );
|
select * from ( mysql.db );
|
||||||
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv
|
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv Show_create_routine_priv
|
||||||
create table t1 (a int);
|
create table t1 (a int);
|
||||||
insert into t1 values (7), (2), (7);
|
insert into t1 values (7), (2), (7);
|
||||||
select * from (t1);
|
select * from (t1);
|
||||||
|
@ -70,7 +70,8 @@ TRUNCATE TABLE t1;
|
|||||||
SET column_compression_zlib_level= 1;
|
SET column_compression_zlib_level= 1;
|
||||||
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
||||||
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
|
SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_compressions', 'Column_decompressions');
|
||||||
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
# This is is using < as DATA_LENGTH produces different results on s390x-ubuntu-2004
|
||||||
|
SELECT DATA_LENGTH < 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
|
|
||||||
SET column_compression_zlib_level= 9;
|
SET column_compression_zlib_level= 9;
|
||||||
|
@ -133,9 +133,9 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_c
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
COLUMN_COMPRESSIONS 3
|
COLUMN_COMPRESSIONS 3
|
||||||
COLUMN_DECOMPRESSIONS 12
|
COLUMN_DECOMPRESSIONS 12
|
||||||
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
SELECT DATA_LENGTH < 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
||||||
DATA_LENGTH
|
DATA_LENGTH < 100
|
||||||
40
|
1
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
SET column_compression_zlib_level= 9;
|
SET column_compression_zlib_level= 9;
|
||||||
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
||||||
@ -348,9 +348,9 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_c
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
COLUMN_COMPRESSIONS 3
|
COLUMN_COMPRESSIONS 3
|
||||||
COLUMN_DECOMPRESSIONS 12
|
COLUMN_DECOMPRESSIONS 12
|
||||||
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
SELECT DATA_LENGTH < 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
||||||
DATA_LENGTH
|
DATA_LENGTH < 100
|
||||||
40
|
1
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
SET column_compression_zlib_level= 9;
|
SET column_compression_zlib_level= 9;
|
||||||
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
||||||
@ -563,9 +563,9 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_c
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
COLUMN_COMPRESSIONS 3
|
COLUMN_COMPRESSIONS 3
|
||||||
COLUMN_DECOMPRESSIONS 12
|
COLUMN_DECOMPRESSIONS 12
|
||||||
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
SELECT DATA_LENGTH < 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
||||||
DATA_LENGTH
|
DATA_LENGTH < 100
|
||||||
40
|
1
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
SET column_compression_zlib_level= 9;
|
SET column_compression_zlib_level= 9;
|
||||||
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
||||||
@ -778,9 +778,9 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_c
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
COLUMN_COMPRESSIONS 3
|
COLUMN_COMPRESSIONS 3
|
||||||
COLUMN_DECOMPRESSIONS 12
|
COLUMN_DECOMPRESSIONS 12
|
||||||
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
SELECT DATA_LENGTH < 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
||||||
DATA_LENGTH
|
DATA_LENGTH < 100
|
||||||
40
|
1
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
SET column_compression_zlib_level= 9;
|
SET column_compression_zlib_level= 9;
|
||||||
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
||||||
@ -993,9 +993,9 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_c
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
COLUMN_COMPRESSIONS 3
|
COLUMN_COMPRESSIONS 3
|
||||||
COLUMN_DECOMPRESSIONS 12
|
COLUMN_DECOMPRESSIONS 12
|
||||||
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
SELECT DATA_LENGTH < 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
||||||
DATA_LENGTH
|
DATA_LENGTH < 100
|
||||||
60
|
1
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
SET column_compression_zlib_level= 9;
|
SET column_compression_zlib_level= 9;
|
||||||
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
||||||
@ -1209,9 +1209,9 @@ SELECT * FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME IN('Column_c
|
|||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
COLUMN_COMPRESSIONS 3
|
COLUMN_COMPRESSIONS 3
|
||||||
COLUMN_DECOMPRESSIONS 12
|
COLUMN_DECOMPRESSIONS 12
|
||||||
SELECT DATA_LENGTH FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
SELECT DATA_LENGTH < 100 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1';
|
||||||
DATA_LENGTH
|
DATA_LENGTH < 100
|
||||||
36
|
1
|
||||||
TRUNCATE TABLE t1;
|
TRUNCATE TABLE t1;
|
||||||
SET column_compression_zlib_level= 9;
|
SET column_compression_zlib_level= 9;
|
||||||
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
INSERT INTO t1 VALUES(REPEAT('ab', 1000));
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/have_csv.inc
|
--source include/have_csv.inc
|
||||||
|
--source include/have_normal_bzip.inc
|
||||||
|
|
||||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
|
--source include/have_normal_bzip.inc
|
||||||
|
|
||||||
--let $engine_type= myisam
|
--let $engine_type= myisam
|
||||||
--let $engine_type2= innodb
|
--let $engine_type2= innodb
|
||||||
|
@ -4,6 +4,8 @@ insert into t1 values ('000000000001'),('000000000002');
|
|||||||
explain select * from t1 where id=000000000001;
|
explain select * from t1 where id=000000000001;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 index PRIMARY PRIMARY 12 NULL 2 Using where; Using index
|
1 SIMPLE t1 index PRIMARY PRIMARY 12 NULL 2 Using where; Using index
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `PRIMARY` part[0] for lookup: `test`.`t1`.`id` of type `char` = "1" of type `bigint`
|
||||||
select * from t1 where id=000000000001;
|
select * from t1 where id=000000000001;
|
||||||
id
|
id
|
||||||
000000000001
|
000000000001
|
||||||
|
@ -104,12 +104,12 @@ update mysql.user set plugin="", authentication_string="", password=old_password
|
|||||||
flush privileges;
|
flush privileges;
|
||||||
show grants for test@localhost;
|
show grants for test@localhost;
|
||||||
Grants for test@localhost
|
Grants for test@localhost
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `test`@`localhost` IDENTIFIED BY PASSWORD '2f27438961437573'
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test`@`localhost` IDENTIFIED BY PASSWORD '2f27438961437573'
|
||||||
update mysql.user set plugin='mysql_old_password' where user='test';
|
update mysql.user set plugin='mysql_old_password' where user='test';
|
||||||
flush privileges;
|
flush privileges;
|
||||||
show grants for test@localhost;
|
show grants for test@localhost;
|
||||||
Grants for test@localhost
|
Grants for test@localhost
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `test`@`localhost` IDENTIFIED BY PASSWORD '2f27438961437573'
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `test`@`localhost` IDENTIFIED BY PASSWORD '2f27438961437573'
|
||||||
connect con10,localhost,test,gambling2,;
|
connect con10,localhost,test,gambling2,;
|
||||||
connect con5,localhost,test,gambling2,mysql;
|
connect con5,localhost,test,gambling2,mysql;
|
||||||
set password="";
|
set password="";
|
||||||
|
@ -1083,12 +1083,13 @@ t1 CREATE TABLE `t1` (
|
|||||||
`STAGE` tinyint(2) NOT NULL,
|
`STAGE` tinyint(2) NOT NULL,
|
||||||
`MAX_STAGE` tinyint(2) NOT NULL,
|
`MAX_STAGE` tinyint(2) NOT NULL,
|
||||||
`PROGRESS` decimal(7,3) NOT NULL,
|
`PROGRESS` decimal(7,3) NOT NULL,
|
||||||
`MEMORY_USED` bigint(7) NOT NULL,
|
`MEMORY_USED` bigint(10) NOT NULL,
|
||||||
`MAX_MEMORY_USED` bigint(7) NOT NULL,
|
`MAX_MEMORY_USED` bigint(10) NOT NULL,
|
||||||
`EXAMINED_ROWS` int(7) NOT NULL,
|
`EXAMINED_ROWS` bigint(10) NOT NULL,
|
||||||
`QUERY_ID` bigint(4) NOT NULL,
|
`SENT_ROWS` bigint(10) NOT NULL,
|
||||||
|
`QUERY_ID` bigint(10) NOT NULL,
|
||||||
`INFO_BINARY` blob,
|
`INFO_BINARY` blob,
|
||||||
`TID` bigint(4) NOT NULL
|
`TID` bigint(10) NOT NULL
|
||||||
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
|
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create temporary table t1 like information_schema.processlist;
|
create temporary table t1 like information_schema.processlist;
|
||||||
@ -1107,12 +1108,13 @@ t1 CREATE TEMPORARY TABLE `t1` (
|
|||||||
`STAGE` tinyint(2) NOT NULL,
|
`STAGE` tinyint(2) NOT NULL,
|
||||||
`MAX_STAGE` tinyint(2) NOT NULL,
|
`MAX_STAGE` tinyint(2) NOT NULL,
|
||||||
`PROGRESS` decimal(7,3) NOT NULL,
|
`PROGRESS` decimal(7,3) NOT NULL,
|
||||||
`MEMORY_USED` bigint(7) NOT NULL,
|
`MEMORY_USED` bigint(10) NOT NULL,
|
||||||
`MAX_MEMORY_USED` bigint(7) NOT NULL,
|
`MAX_MEMORY_USED` bigint(10) NOT NULL,
|
||||||
`EXAMINED_ROWS` int(7) NOT NULL,
|
`EXAMINED_ROWS` bigint(10) NOT NULL,
|
||||||
`QUERY_ID` bigint(4) NOT NULL,
|
`SENT_ROWS` bigint(10) NOT NULL,
|
||||||
|
`QUERY_ID` bigint(10) NOT NULL,
|
||||||
`INFO_BINARY` blob,
|
`INFO_BINARY` blob,
|
||||||
`TID` bigint(4) NOT NULL
|
`TID` bigint(10) NOT NULL
|
||||||
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
|
) DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci
|
||||||
drop table t1;
|
drop table t1;
|
||||||
create table t1 like information_schema.character_sets;
|
create table t1 like information_schema.character_sets;
|
||||||
|
@ -606,6 +606,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||||||
EXPLAIN SELECT * FROM t1 WHERE s2='a' COLLATE latin1_german1_ci;
|
EXPLAIN SELECT * FROM t1 WHERE s2='a' COLLATE latin1_german1_ci;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
|
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `s2` part[0] for lookup: `test`.`t1`.`s2` of collation `latin1_swedish_ci` = "'a' collate latin1_german1_ci" of collation `latin1_german1_ci`
|
||||||
EXPLAIN SELECT * FROM t1 WHERE s1 BETWEEN 'a' AND 'b' COLLATE latin1_german1_ci;
|
EXPLAIN SELECT * FROM t1 WHERE s1 BETWEEN 'a' AND 'b' COLLATE latin1_german1_ci;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 range s1 s1 11 NULL 2 Using index condition
|
1 SIMPLE t1 range s1 s1 11 NULL 2 Using index condition
|
||||||
|
@ -555,3 +555,76 @@ time_format('01 02:02:02', '%T')
|
|||||||
select time_format('2001-01-01 02:02:02', '%T');
|
select time_format('2001-01-01 02:02:02', '%T');
|
||||||
time_format('2001-01-01 02:02:02', '%T')
|
time_format('2001-01-01 02:02:02', '%T')
|
||||||
02:02:02
|
02:02:02
|
||||||
|
#
|
||||||
|
# End of 10.2 test
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-31684 Add timezone information to DATE_FORMAT
|
||||||
|
#
|
||||||
|
SET @old_timezone= @@time_zone;
|
||||||
|
# Using named timezones
|
||||||
|
SET TIME_ZONE='Japan';
|
||||||
|
SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
current_timezone
|
||||||
|
+0900 JST
|
||||||
|
SET @@time_zone='Europe/Moscow';
|
||||||
|
SELECT DATE_FORMAT('1965-02-17 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
current_timezone
|
||||||
|
+0300 MSK
|
||||||
|
SELECT DATE_FORMAT('1965-12-31 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
current_timezone
|
||||||
|
+0300 MSK
|
||||||
|
SELECT DATE_FORMAT('1985-06-01', '%z %Z');
|
||||||
|
DATE_FORMAT('1985-06-01', '%z %Z')
|
||||||
|
+0400 MSD
|
||||||
|
# Using positive and negative offset
|
||||||
|
SET TIME_ZONE= '-05:30';
|
||||||
|
SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
current_timezone
|
||||||
|
-0530 -05:30
|
||||||
|
SET TIME_ZONE= '+04:30';
|
||||||
|
SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
current_timezone
|
||||||
|
+0430 +04:30
|
||||||
|
# Using UTC
|
||||||
|
SET TIME_ZONE='UTC';
|
||||||
|
SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
current_timezone
|
||||||
|
+0000 UTC
|
||||||
|
SET @@time_zone= @old_timezone;
|
||||||
|
# More timezone test:
|
||||||
|
#
|
||||||
|
# Check for time zone with leap seconds
|
||||||
|
#
|
||||||
|
set time_zone='Europe/Moscow';
|
||||||
|
SELECT DATE_FORMAT('2023-03-01 01:30:00', '%z %Z');
|
||||||
|
DATE_FORMAT('2023-03-01 01:30:00', '%z %Z')
|
||||||
|
+0300 MSK
|
||||||
|
SELECT DATE_FORMAT('2023-04-01 01:30:00', '%z %Z');
|
||||||
|
DATE_FORMAT('2023-04-01 01:30:00', '%z %Z')
|
||||||
|
+0400 MSD
|
||||||
|
set time_zone='leap/Europe/Moscow';
|
||||||
|
SELECT DATE_FORMAT('2023-03-01 01:30:00', '%z %Z');
|
||||||
|
DATE_FORMAT('2023-03-01 01:30:00', '%z %Z')
|
||||||
|
+0300 MSK
|
||||||
|
SELECT DATE_FORMAT('2023-04-01 01:30:00', '%z %Z');
|
||||||
|
DATE_FORMAT('2023-04-01 01:30:00', '%z %Z')
|
||||||
|
+0400 MSD
|
||||||
|
#
|
||||||
|
# Values around and in spring time-gap
|
||||||
|
#
|
||||||
|
set time_zone='MET';
|
||||||
|
# Normal value with DST
|
||||||
|
SELECT DATE_FORMAT('2003-03-30 01:59:59', '%z %Z');
|
||||||
|
DATE_FORMAT('2003-03-30 01:59:59', '%z %Z')
|
||||||
|
+0100 MET
|
||||||
|
# Values around and in spring time-gap
|
||||||
|
SELECT DATE_FORMAT('2023-03-26 01:59:59', '%z %Z');
|
||||||
|
DATE_FORMAT('2023-03-26 01:59:59', '%z %Z')
|
||||||
|
+0100 MET
|
||||||
|
SELECT DATE_FORMAT('2023-03-26 03:00:00', '%z %Z');
|
||||||
|
DATE_FORMAT('2023-03-26 03:00:00', '%z %Z')
|
||||||
|
+0200 MEST
|
||||||
|
#
|
||||||
|
# End of 11.3 test
|
||||||
|
#
|
||||||
|
@ -256,3 +256,72 @@ select time_format('2001-01-01 02:02:02', '%d %T');
|
|||||||
select time_format('01 02:02:02', '%d %T');
|
select time_format('01 02:02:02', '%d %T');
|
||||||
select time_format('01 02:02:02', '%T');
|
select time_format('01 02:02:02', '%T');
|
||||||
select time_format('2001-01-01 02:02:02', '%T');
|
select time_format('2001-01-01 02:02:02', '%T');
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.2 test
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-31684 Add timezone information to DATE_FORMAT
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET @old_timezone= @@time_zone;
|
||||||
|
|
||||||
|
|
||||||
|
--echo # Using named timezones
|
||||||
|
|
||||||
|
SET TIME_ZONE='Japan';
|
||||||
|
SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
|
||||||
|
SET @@time_zone='Europe/Moscow';
|
||||||
|
SELECT DATE_FORMAT('1965-02-17 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
SELECT DATE_FORMAT('1965-12-31 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
SELECT DATE_FORMAT('1985-06-01', '%z %Z');
|
||||||
|
|
||||||
|
--echo # Using positive and negative offset
|
||||||
|
|
||||||
|
SET TIME_ZONE= '-05:30';
|
||||||
|
SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
|
||||||
|
SET TIME_ZONE= '+04:30';
|
||||||
|
SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
|
||||||
|
|
||||||
|
--echo # Using UTC
|
||||||
|
|
||||||
|
SET TIME_ZONE='UTC';
|
||||||
|
SELECT DATE_FORMAT('2009-10-04 22:23:00', '%z %Z') AS current_timezone;
|
||||||
|
|
||||||
|
SET @@time_zone= @old_timezone;
|
||||||
|
|
||||||
|
--echo # More timezone test:
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Check for time zone with leap seconds
|
||||||
|
--echo #
|
||||||
|
set time_zone='Europe/Moscow';
|
||||||
|
|
||||||
|
SELECT DATE_FORMAT('2023-03-01 01:30:00', '%z %Z');
|
||||||
|
SELECT DATE_FORMAT('2023-04-01 01:30:00', '%z %Z');
|
||||||
|
|
||||||
|
set time_zone='leap/Europe/Moscow';
|
||||||
|
SELECT DATE_FORMAT('2023-03-01 01:30:00', '%z %Z');
|
||||||
|
SELECT DATE_FORMAT('2023-04-01 01:30:00', '%z %Z');
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Values around and in spring time-gap
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
set time_zone='MET';
|
||||||
|
|
||||||
|
--echo # Normal value with DST
|
||||||
|
SELECT DATE_FORMAT('2003-03-30 01:59:59', '%z %Z');
|
||||||
|
|
||||||
|
--echo # Values around and in spring time-gap
|
||||||
|
SELECT DATE_FORMAT('2023-03-26 01:59:59', '%z %Z');
|
||||||
|
SELECT DATE_FORMAT('2023-03-26 03:00:00', '%z %Z');
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 11.3 test
|
||||||
|
--echo #
|
||||||
|
@ -355,97 +355,6 @@ ERROR 42S01: Table 't1' already exists
|
|||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# Bug#54332 Deadlock with two connections doing LOCK TABLE+INSERT DELAYED
|
|
||||||
#
|
|
||||||
# This test is not supposed to work under --ps-protocol since
|
|
||||||
# INSERT DELAYED doesn't work under LOCK TABLES with this protocol.
|
|
||||||
DROP TABLE IF EXISTS t1, t2;
|
|
||||||
CREATE TABLE t1 (a INT);
|
|
||||||
CREATE TABLE t2 (a INT);
|
|
||||||
CREATE TABLE t3 (a INT);
|
|
||||||
# Test 1: Using LOCK TABLE
|
|
||||||
connect con1, localhost, root;
|
|
||||||
LOCK TABLE t1 WRITE;
|
|
||||||
connection default;
|
|
||||||
LOCK TABLE t2 WRITE;
|
|
||||||
# Sending:
|
|
||||||
INSERT DELAYED INTO t1 VALUES (1);
|
|
||||||
connection con1;
|
|
||||||
# Wait until INSERT DELAYED is blocked on table 't1'.
|
|
||||||
INSERT DELAYED INTO t2 VALUES (1);
|
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
|
||||||
UNLOCK TABLES;
|
|
||||||
connection default;
|
|
||||||
# Reaping: INSERT DELAYED INTO t1 VALUES (1)
|
|
||||||
UNLOCK TABLES;
|
|
||||||
# Test 2: Using ALTER TABLE
|
|
||||||
START TRANSACTION;
|
|
||||||
SELECT * FROM t1 WHERE a=0;
|
|
||||||
a
|
|
||||||
connection con1;
|
|
||||||
# Sending:
|
|
||||||
ALTER TABLE t1 MODIFY a INT UNSIGNED, LOCK=SHARED;;
|
|
||||||
connection default;
|
|
||||||
# Wait until ALTER TABLE is blocked on table 't1'.
|
|
||||||
INSERT DELAYED INTO t1 VALUES (3);
|
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
|
||||||
COMMIT;
|
|
||||||
connection con1;
|
|
||||||
# Reaping: ALTER TABLE t1 COMMENT 'test'
|
|
||||||
# Test 3: Using RENAME TABLE
|
|
||||||
connection default;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t2 VALUES (1);
|
|
||||||
connection con1;
|
|
||||||
# Sending:
|
|
||||||
RENAME TABLE t1 to t5, t2 to t4;
|
|
||||||
connection default;
|
|
||||||
# Wait until RENAME TABLE is blocked on table 't1'.
|
|
||||||
INSERT DELAYED INTO t1 VALUES (4);
|
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
|
||||||
COMMIT;
|
|
||||||
connection con1;
|
|
||||||
# Reaping: RENAME TABLE t1 to t5, t2 to t4
|
|
||||||
connection default;
|
|
||||||
# Reverting the renames
|
|
||||||
RENAME TABLE t5 to t1, t4 to t2;
|
|
||||||
# Test 4: Two INSERT DELAYED on the same table
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t2 VALUES (1);
|
|
||||||
connect con2, localhost, root;
|
|
||||||
LOCK TABLE t1 WRITE, t2 WRITE;
|
|
||||||
connection con1;
|
|
||||||
# Wait until LOCK TABLE is blocked on table 't2'.
|
|
||||||
INSERT DELAYED INTO t1 VALUES (5);
|
|
||||||
connection default;
|
|
||||||
# Wait until INSERT DELAYED is blocked on table 't1'.
|
|
||||||
INSERT DELAYED INTO t1 VALUES (6);
|
|
||||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
|
||||||
COMMIT;
|
|
||||||
connection con2;
|
|
||||||
# Reaping: LOCK TABLE t1 WRITE, t2 WRITE
|
|
||||||
UNLOCK TABLES;
|
|
||||||
connection con1;
|
|
||||||
# Reaping: INSERT DELAYED INTO t1 VALUES (5)
|
|
||||||
connection default;
|
|
||||||
# Test 5: LOCK TABLES + INSERT DELAYED in one connection.
|
|
||||||
# This test has triggered some asserts in metadata locking
|
|
||||||
# subsystem at some point in time..
|
|
||||||
LOCK TABLE t1 WRITE;
|
|
||||||
INSERT DELAYED INTO t2 VALUES (7);
|
|
||||||
UNLOCK TABLES;
|
|
||||||
SET AUTOCOMMIT= 0;
|
|
||||||
LOCK TABLE t1 WRITE;
|
|
||||||
INSERT DELAYED INTO t2 VALUES (8);
|
|
||||||
UNLOCK TABLES;
|
|
||||||
SET AUTOCOMMIT= 1;
|
|
||||||
connection con2;
|
|
||||||
disconnect con2;
|
|
||||||
connection con1;
|
|
||||||
disconnect con1;
|
|
||||||
connection default;
|
|
||||||
DROP TABLE t1, t2, t3;
|
|
||||||
#
|
|
||||||
# Test for bug #56251 "Deadlock with INSERT DELAYED and MERGE tables".
|
# Test for bug #56251 "Deadlock with INSERT DELAYED and MERGE tables".
|
||||||
#
|
#
|
||||||
connect con1,localhost,root,,;
|
connect con1,localhost,root,,;
|
||||||
|
@ -408,6 +408,9 @@ DROP TABLE t2;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
|
# The following test is disabled as it fails randomly
|
||||||
|
if (0)
|
||||||
|
{
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug#54332 Deadlock with two connections doing LOCK TABLE+INSERT DELAYED
|
--echo # Bug#54332 Deadlock with two connections doing LOCK TABLE+INSERT DELAYED
|
||||||
--echo #
|
--echo #
|
||||||
@ -566,6 +569,7 @@ connection default;
|
|||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
--enable_ps_protocol
|
--enable_ps_protocol
|
||||||
--enable_view_protocol
|
--enable_view_protocol
|
||||||
|
}
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Test for bug #56251 "Deadlock with INSERT DELAYED and MERGE tables".
|
--echo # Test for bug #56251 "Deadlock with INSERT DELAYED and MERGE tables".
|
||||||
|
@ -211,3 +211,19 @@ id
|
|||||||
3
|
3
|
||||||
set sql_mode=@sql_mode_save;
|
set sql_mode=@sql_mode_save;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-3953 Add columns for ROWS_EXAMINED, ROWS_SENT, and ROWS_READ to I_S and
|
||||||
|
# processlist
|
||||||
|
#
|
||||||
|
create table t1 (a int primary key, b int);
|
||||||
|
insert into t1 select seq,seq+1 from seq_1_to_10;
|
||||||
|
flush status;
|
||||||
|
delete from t1 where a between 1 and 3 returning a,b;
|
||||||
|
a b
|
||||||
|
1 2
|
||||||
|
2 3
|
||||||
|
3 4
|
||||||
|
show status like "Rows_sent";
|
||||||
|
Variable_name Value
|
||||||
|
Rows_sent 3
|
||||||
|
drop table t1;
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
--source include/have_sequence.inc
|
||||||
#
|
#
|
||||||
# Tests for DELETE FROM <table> ... RETURNING <expr>,...
|
# Tests for DELETE FROM <table> ... RETURNING <expr>,...
|
||||||
#
|
#
|
||||||
@ -170,3 +171,15 @@ DELETE FROM t1 WHERE id > 2 RETURNING *;
|
|||||||
set sql_mode=@sql_mode_save;
|
set sql_mode=@sql_mode_save;
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-3953 Add columns for ROWS_EXAMINED, ROWS_SENT, and ROWS_READ to I_S and
|
||||||
|
--echo # processlist
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create table t1 (a int primary key, b int);
|
||||||
|
insert into t1 select seq,seq+1 from seq_1_to_10;
|
||||||
|
flush status;
|
||||||
|
delete from t1 where a between 1 and 3 returning a,b;
|
||||||
|
show status like "Rows_sent";
|
||||||
|
drop table t1;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
-- source include/have_compress.inc
|
-- source include/have_compress.inc
|
||||||
|
-- source include/have_normal_bzip.inc
|
||||||
#
|
#
|
||||||
# Test for compress and uncompress functions:
|
# Test for compress and uncompress functions:
|
||||||
#
|
#
|
||||||
|
@ -912,7 +912,8 @@ a IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED))
|
|||||||
Warnings:
|
Warnings:
|
||||||
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
|
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
|
||||||
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
|
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
|
||||||
Note 1105 DBUG: types_compatible=no bisect=no
|
Note 1105 DBUG: found a mix of UINT and SINT
|
||||||
|
Note 1105 DBUG: types_compatible=yes bisect=yes
|
||||||
SELECT a IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL) FROM t1;
|
SELECT a IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL) FROM t1;
|
||||||
a IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL)
|
a IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL)
|
||||||
Warnings:
|
Warnings:
|
||||||
@ -950,7 +951,8 @@ a NOT IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED))
|
|||||||
Warnings:
|
Warnings:
|
||||||
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
|
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
|
||||||
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
|
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
|
||||||
Note 1105 DBUG: types_compatible=no bisect=no
|
Note 1105 DBUG: found a mix of UINT and SINT
|
||||||
|
Note 1105 DBUG: types_compatible=yes bisect=yes
|
||||||
SELECT a NOT IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL) FROM t1;
|
SELECT a NOT IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL) FROM t1;
|
||||||
a NOT IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL)
|
a NOT IN (CAST(1 AS SIGNED), CAST(1 AS UNSIGNED),NULL)
|
||||||
Warnings:
|
Warnings:
|
||||||
@ -1624,7 +1626,8 @@ a b
|
|||||||
Warnings:
|
Warnings:
|
||||||
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
|
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
|
||||||
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
|
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
|
||||||
Note 1105 DBUG: types_compatible=no bisect=no
|
Note 1105 DBUG: found a mix of UINT and SINT
|
||||||
|
Note 1105 DBUG: types_compatible=yes bisect=no
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
#
|
#
|
||||||
# MDEV-11554 Wrong result for CASE on a mixture of signed and unsigned expressions
|
# MDEV-11554 Wrong result for CASE on a mixture of signed and unsigned expressions
|
||||||
|
@ -935,6 +935,43 @@ Warning 1292 Truncated incorrect DECIMAL value: '0x'
|
|||||||
# End of 10.4 tests
|
# End of 10.4 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
# Start of 10.5 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-31303: Key not used
|
||||||
|
#
|
||||||
|
CREATE TABLE `a` (
|
||||||
|
`id` bigint AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
`c1` bigint unsigned,
|
||||||
|
KEY (`c1`)
|
||||||
|
);
|
||||||
|
INSERT INTO `a` VALUES (1,9223382399205928659),(2,9223384207280813348),
|
||||||
|
(3,9223385953115437234),(4,9223387250780556749),(5,9223387354282558788),
|
||||||
|
(6,9223387603870501596),(7,9223389270813433667),(8,9223389903231468827),
|
||||||
|
(9,9223390280789586779),(10,9223391591398222899),(11,9223391875473564350),
|
||||||
|
(12,9223393152250049433),(13,9223393939696790223),(14,9223394417225350415),
|
||||||
|
(15,9223397646397141015),(16,9223398025879291243),(17,9223399038671098072),
|
||||||
|
(18,9223399534968874556),(19,9223400449518009285),(20,9223400860292643549),
|
||||||
|
(21,9223400940692256924),(22,9223401073791948119),(23,9223402820804649616),
|
||||||
|
(24,9223403470951992681),(25,9223405581879567267),(26,9223405754978563829),
|
||||||
|
(27,9223405972966828221), (28, 9223372036854775808), (29, 9223372036854775807) ;
|
||||||
|
explain SELECT c1 FROM a WHERE c1 IN ( 1, 9223372036854775807 );
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE a range c1 c1 9 NULL 2 Using where; Using index
|
||||||
|
explain SELECT c1 FROM a WHERE c1 IN ( 1, 9223372036854775808 );
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE a range c1 c1 9 NULL 2 Using where; Using index
|
||||||
|
SELECT c1 FROM a WHERE c1 IN ( 1, 9223372036854775807 );
|
||||||
|
c1
|
||||||
|
9223372036854775807
|
||||||
|
SELECT c1 FROM a WHERE c1 IN ( 1, 9223372036854775808 );
|
||||||
|
c1
|
||||||
|
9223372036854775808
|
||||||
|
drop table `a`;
|
||||||
|
#
|
||||||
|
# End of 10.5 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
# MDEV-29662 same values in `IN` set vs equal comparison produces
|
# MDEV-29662 same values in `IN` set vs equal comparison produces
|
||||||
# the different performance
|
# the different performance
|
||||||
#
|
#
|
||||||
|
@ -712,6 +712,40 @@ SELECT ('0x',1) IN ((0,1),(1,1));
|
|||||||
--echo # End of 10.4 tests
|
--echo # End of 10.4 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Start of 10.5 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-31303: Key not used
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE `a` (
|
||||||
|
`id` bigint AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
`c1` bigint unsigned,
|
||||||
|
KEY (`c1`)
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO `a` VALUES (1,9223382399205928659),(2,9223384207280813348),
|
||||||
|
(3,9223385953115437234),(4,9223387250780556749),(5,9223387354282558788),
|
||||||
|
(6,9223387603870501596),(7,9223389270813433667),(8,9223389903231468827),
|
||||||
|
(9,9223390280789586779),(10,9223391591398222899),(11,9223391875473564350),
|
||||||
|
(12,9223393152250049433),(13,9223393939696790223),(14,9223394417225350415),
|
||||||
|
(15,9223397646397141015),(16,9223398025879291243),(17,9223399038671098072),
|
||||||
|
(18,9223399534968874556),(19,9223400449518009285),(20,9223400860292643549),
|
||||||
|
(21,9223400940692256924),(22,9223401073791948119),(23,9223402820804649616),
|
||||||
|
(24,9223403470951992681),(25,9223405581879567267),(26,9223405754978563829),
|
||||||
|
(27,9223405972966828221), (28, 9223372036854775808), (29, 9223372036854775807) ;
|
||||||
|
|
||||||
|
explain SELECT c1 FROM a WHERE c1 IN ( 1, 9223372036854775807 );
|
||||||
|
explain SELECT c1 FROM a WHERE c1 IN ( 1, 9223372036854775808 );
|
||||||
|
SELECT c1 FROM a WHERE c1 IN ( 1, 9223372036854775807 );
|
||||||
|
SELECT c1 FROM a WHERE c1 IN ( 1, 9223372036854775808 );
|
||||||
|
drop table `a`;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.5 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-29662 same values in `IN` set vs equal comparison produces
|
--echo # MDEV-29662 same values in `IN` set vs equal comparison produces
|
||||||
--echo # the different performance
|
--echo # the different performance
|
||||||
@ -845,4 +879,3 @@ drop table t1;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.6 tests
|
--echo # End of 10.6 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
@ -225,7 +225,7 @@ revoke LOCK TABLES, ALTER on mysqltest.* from mysqltest_1@localhost;
|
|||||||
show grants for mysqltest_1@localhost;
|
show grants for mysqltest_1@localhost;
|
||||||
Grants for mysqltest_1@localhost
|
Grants for mysqltest_1@localhost
|
||||||
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
|
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
|
||||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY ON `mysqltest`.* TO `mysqltest_1`@`localhost` WITH GRANT OPTION
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, CREATE TEMPORARY TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER, DELETE HISTORY, SHOW CREATE ROUTINE ON `mysqltest`.* TO `mysqltest_1`@`localhost` WITH GRANT OPTION
|
||||||
revoke all privileges on mysqltest.* from mysqltest_1@localhost;
|
revoke all privileges on mysqltest.* from mysqltest_1@localhost;
|
||||||
delete from mysql.user where user='mysqltest_1';
|
delete from mysql.user where user='mysqltest_1';
|
||||||
flush privileges;
|
flush privileges;
|
||||||
@ -639,6 +639,7 @@ Federated admin Server To execute the CREATE SERVER, ALTER SERVER, DROP SERVER s
|
|||||||
Connection admin Server To bypass connection limits and kill other users' connections
|
Connection admin Server To bypass connection limits and kill other users' connections
|
||||||
Read_only admin Server To perform write operations even if @@read_only=ON
|
Read_only admin Server To perform write operations even if @@read_only=ON
|
||||||
Usage Server Admin No privileges - allow connect only
|
Usage Server Admin No privileges - allow connect only
|
||||||
|
Show Create Routine Databases,Functions,Procedures To allow SHOW CREATE PROCEDURE/FUNCTION/PACKAGE
|
||||||
connect root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
|
connect root,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK;
|
||||||
connection root;
|
connection root;
|
||||||
create database mysqltest;
|
create database mysqltest;
|
||||||
@ -776,7 +777,7 @@ flush privileges;
|
|||||||
use test;
|
use test;
|
||||||
set @user123="non-existent";
|
set @user123="non-existent";
|
||||||
select * from mysql.db where user=@user123;
|
select * from mysql.db where user=@user123;
|
||||||
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv
|
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv Show_create_routine_priv
|
||||||
set names koi8r;
|
set names koi8r;
|
||||||
create database <20><>;
|
create database <20><>;
|
||||||
grant select on <20><>.* to root@localhost;
|
grant select on <20><>.* to root@localhost;
|
||||||
@ -2841,11 +2842,11 @@ CREATE USER ten2;
|
|||||||
GRANT ALL ON *.* TO ten2;
|
GRANT ALL ON *.* TO ten2;
|
||||||
SHOW GRANTS FOR ten2;
|
SHOW GRANTS FOR ten2;
|
||||||
Grants for ten2@%
|
Grants for ten2@%
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `ten2`@`%`
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `ten2`@`%`
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
SHOW GRANTS FOR ten2;
|
SHOW GRANTS FOR ten2;
|
||||||
Grants for ten2@%
|
Grants for ten2@%
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `ten2`@`%`
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `ten2`@`%`
|
||||||
DROP USER ten2;
|
DROP USER ten2;
|
||||||
# switching back from mysql.user to mysql.global_priv
|
# switching back from mysql.user to mysql.global_priv
|
||||||
#
|
#
|
||||||
|
@ -6,7 +6,7 @@ connect con1,localhost,user1,,;
|
|||||||
connection con1;
|
connection con1;
|
||||||
SHOW GRANTS;
|
SHOW GRANTS;
|
||||||
Grants for user1@localhost
|
Grants for user1@localhost
|
||||||
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY ON *.* TO `user1`@`localhost`
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SHOW CREATE ROUTINE ON *.* TO `user1`@`localhost`
|
||||||
#
|
#
|
||||||
# Verify that having REPLICATION SLAVE ADMIN doesn't allow SHOW SLAVE STATUS
|
# Verify that having REPLICATION SLAVE ADMIN doesn't allow SHOW SLAVE STATUS
|
||||||
# Expected error: Access denied; you need (at least one of) the SLAVE MONITOR privilege(s) for this operation
|
# Expected error: Access denied; you need (at least one of) the SLAVE MONITOR privilege(s) for this operation
|
||||||
@ -46,13 +46,13 @@ insert mysql.global_priv values ('bar', 'foo7', '{"access":274877906943,"version
|
|||||||
flush privileges;
|
flush privileges;
|
||||||
show grants for foo7@bar;
|
show grants for foo7@bar;
|
||||||
Grants for foo7@bar
|
Grants for foo7@bar
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `foo7`@`bar` WITH GRANT OPTION
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `foo7`@`bar` WITH GRANT OPTION
|
||||||
show grants for foo8@bar;
|
show grants for foo8@bar;
|
||||||
Grants for foo8@bar
|
Grants for foo8@bar
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `foo8`@`bar` WITH GRANT OPTION
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `foo8`@`bar` WITH GRANT OPTION
|
||||||
show grants for foo9@bar;
|
show grants for foo9@bar;
|
||||||
Grants for foo9@bar
|
Grants for foo9@bar
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `foo9`@`bar` WITH GRANT OPTION
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `foo9`@`bar` WITH GRANT OPTION
|
||||||
drop user foo7@bar, foo8@bar, foo9@bar;
|
drop user foo7@bar, foo8@bar, foo9@bar;
|
||||||
#
|
#
|
||||||
# End of 10.5 tests
|
# End of 10.5 tests
|
||||||
|
@ -906,5 +906,54 @@ SELECT * FROM t HAVING f = 'foo';
|
|||||||
f
|
f
|
||||||
DROP TABLE t;
|
DROP TABLE t;
|
||||||
#
|
#
|
||||||
|
# MDEV-29731 Crash when HAVING in a correlated subquery references
|
||||||
|
# columns in the outer query
|
||||||
|
#
|
||||||
|
CREATE TABLE t (a INT, b INT);
|
||||||
|
SELECT 1 FROM t
|
||||||
|
WHERE b = (SELECT 1 FROM t GROUP BY a HAVING b = a+1);
|
||||||
|
1
|
||||||
|
DROP TABLE t;
|
||||||
|
CREATE TABLE t (a INT, b INT, c INT);
|
||||||
|
SELECT 1 FROM t
|
||||||
|
WHERE (b,c) = (SELECT 1,1 FROM t GROUP BY a HAVING b = a+1 and c = a-1);
|
||||||
|
1
|
||||||
|
DROP TABLE t;
|
||||||
|
CREATE TABLE t (a TEXT, b INT UNIQUE);
|
||||||
|
SELECT 1 FROM t
|
||||||
|
WHERE b IN (SELECT 1 FROM t
|
||||||
|
GROUP BY '', a
|
||||||
|
HAVING (CASE b WHEN 1 +'' THEN 3 ELSE a END)
|
||||||
|
ORDER BY b)
|
||||||
|
GROUP BY b HAVING b = 1;
|
||||||
|
1
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect DOUBLE value: ''
|
||||||
|
DROP TABLE t;
|
||||||
|
CREATE TABLE t (a INT, b CHAR KEY UNIQUE);
|
||||||
|
CREATE VIEW v AS SELECT * FROM t WHERE a LIKE '' GROUP BY b HAVING a > a;
|
||||||
|
SELECT * FROM v AS v1 NATURAL JOIN v AS v5 NATURAL JOIN v
|
||||||
|
WHERE a LIKE '' AND b IN (SELECT a FROM t
|
||||||
|
WHERE a LIKE ''
|
||||||
|
GROUP BY a
|
||||||
|
HAVING b LIKE (b < +1 OR a > 1) >= b);
|
||||||
|
a b
|
||||||
|
DROP VIEW v;
|
||||||
|
DROP TABLE t;
|
||||||
|
EXECUTE IMMEDIATE 'SELECT LEAD(c) OVER (ORDER BY c)
|
||||||
|
FROM (SELECT 0 AS c) AS a NATURAL JOIN (SELECT 0 AS c) AS b;';
|
||||||
|
LEAD(c) OVER (ORDER BY c)
|
||||||
|
NULL
|
||||||
|
CREATE TABLE t (a INT);
|
||||||
|
UPDATE t SET a = ''
|
||||||
|
WHERE 1 IN (SELECT * FROM
|
||||||
|
(SELECT * FROM
|
||||||
|
(SELECT * FROM t AS v5 NATURAL JOIN t AS v4 NATURAL JOIN t) AS v3
|
||||||
|
NATURAL JOIN t
|
||||||
|
GROUP BY a) AS v2
|
||||||
|
WHERE (0, a) IN ((0,-1),(+1,0))
|
||||||
|
ORDER BY 1+AVG(a) OVER (ORDER BY a)) ORDER BY a;
|
||||||
|
DROP TABLE t;
|
||||||
|
#
|
||||||
# End of 10.4 tests
|
# End of 10.4 tests
|
||||||
#
|
#
|
||||||
|
@ -950,8 +950,53 @@ DROP TABLE t1,t2;
|
|||||||
CREATE TABLE t (f VARCHAR(512));
|
CREATE TABLE t (f VARCHAR(512));
|
||||||
INSERT INTO t VALUES ('a'),('b');
|
INSERT INTO t VALUES ('a'),('b');
|
||||||
SELECT * FROM t HAVING f = 'foo';
|
SELECT * FROM t HAVING f = 'foo';
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
# Cleanup
|
--echo #
|
||||||
|
--echo # MDEV-29731 Crash when HAVING in a correlated subquery references
|
||||||
|
--echo # columns in the outer query
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t (a INT, b INT);
|
||||||
|
SELECT 1 FROM t
|
||||||
|
WHERE b = (SELECT 1 FROM t GROUP BY a HAVING b = a+1);
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
CREATE TABLE t (a INT, b INT, c INT);
|
||||||
|
SELECT 1 FROM t
|
||||||
|
WHERE (b,c) = (SELECT 1,1 FROM t GROUP BY a HAVING b = a+1 and c = a-1);
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
CREATE TABLE t (a TEXT, b INT UNIQUE);
|
||||||
|
SELECT 1 FROM t
|
||||||
|
WHERE b IN (SELECT 1 FROM t
|
||||||
|
GROUP BY '', a
|
||||||
|
HAVING (CASE b WHEN 1 +'' THEN 3 ELSE a END)
|
||||||
|
ORDER BY b)
|
||||||
|
GROUP BY b HAVING b = 1;
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
CREATE TABLE t (a INT, b CHAR KEY UNIQUE);
|
||||||
|
CREATE VIEW v AS SELECT * FROM t WHERE a LIKE '' GROUP BY b HAVING a > a;
|
||||||
|
SELECT * FROM v AS v1 NATURAL JOIN v AS v5 NATURAL JOIN v
|
||||||
|
WHERE a LIKE '' AND b IN (SELECT a FROM t
|
||||||
|
WHERE a LIKE ''
|
||||||
|
GROUP BY a
|
||||||
|
HAVING b LIKE (b < +1 OR a > 1) >= b);
|
||||||
|
DROP VIEW v;
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
EXECUTE IMMEDIATE 'SELECT LEAD(c) OVER (ORDER BY c)
|
||||||
|
FROM (SELECT 0 AS c) AS a NATURAL JOIN (SELECT 0 AS c) AS b;';
|
||||||
|
|
||||||
|
CREATE TABLE t (a INT);
|
||||||
|
UPDATE t SET a = ''
|
||||||
|
WHERE 1 IN (SELECT * FROM
|
||||||
|
(SELECT * FROM
|
||||||
|
(SELECT * FROM t AS v5 NATURAL JOIN t AS v4 NATURAL JOIN t) AS v3
|
||||||
|
NATURAL JOIN t
|
||||||
|
GROUP BY a) AS v2
|
||||||
|
WHERE (0, a) IN ((0,-1),(+1,0))
|
||||||
|
ORDER BY 1+AVG(a) OVER (ORDER BY a)) ORDER BY a;
|
||||||
DROP TABLE t;
|
DROP TABLE t;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -389,21 +389,32 @@ connect user2,localhost,mysqltest_1,,;
|
|||||||
connection user2;
|
connection user2;
|
||||||
select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES WHERE ROUTINE_SCHEMA <> 'sys';
|
select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES WHERE ROUTINE_SCHEMA <> 'sys';
|
||||||
ROUTINE_NAME ROUTINE_DEFINITION
|
ROUTINE_NAME ROUTINE_DEFINITION
|
||||||
sel2 NULL
|
sel2 begin
|
||||||
sub1 NULL
|
select * from t1;
|
||||||
|
select * from t2;
|
||||||
|
end
|
||||||
|
sub1 return i+1
|
||||||
create function sub2(i int) returns int
|
create function sub2(i int) returns int
|
||||||
return i+1;
|
return i+1;
|
||||||
select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES WHERE ROUTINE_SCHEMA <> 'sys';
|
select ROUTINE_NAME, ROUTINE_DEFINITION from information_schema.ROUTINES WHERE ROUTINE_SCHEMA <> 'sys';
|
||||||
ROUTINE_NAME ROUTINE_DEFINITION
|
ROUTINE_NAME ROUTINE_DEFINITION
|
||||||
sel2 NULL
|
sel2 begin
|
||||||
sub1 NULL
|
select * from t1;
|
||||||
|
select * from t2;
|
||||||
|
end
|
||||||
|
sub1 return i+1
|
||||||
sub2 return i+1
|
sub2 return i+1
|
||||||
show create procedure sel2;
|
show create procedure sel2;
|
||||||
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
|
||||||
sel2 NULL latin1 latin1_swedish_ci latin1_swedish_ci
|
sel2 CREATE DEFINER=`root`@`localhost` PROCEDURE `sel2`()
|
||||||
|
begin
|
||||||
|
select * from t1;
|
||||||
|
select * from t2;
|
||||||
|
end latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
show create function sub1;
|
show create function sub1;
|
||||||
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
||||||
sub1 NULL latin1 latin1_swedish_ci latin1_swedish_ci
|
sub1 CREATE DEFINER=`root`@`localhost` FUNCTION `sub1`(i int) RETURNS int(11)
|
||||||
|
return i+1 latin1 latin1_swedish_ci latin1_swedish_ci
|
||||||
show create function sub2;
|
show create function sub2;
|
||||||
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
Function sql_mode Create Function character_set_client collation_connection Database Collation
|
||||||
sub2 CREATE DEFINER=`mysqltest_1`@`localhost` FUNCTION `sub2`(i int) RETURNS int(11)
|
sub2 CREATE DEFINER=`mysqltest_1`@`localhost` FUNCTION `sub2`(i int) RETURNS int(11)
|
||||||
@ -501,6 +512,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
|
|||||||
'mysqltest_1'@'localhost' def test EVENT YES
|
'mysqltest_1'@'localhost' def test EVENT YES
|
||||||
'mysqltest_1'@'localhost' def test TRIGGER YES
|
'mysqltest_1'@'localhost' def test TRIGGER YES
|
||||||
'mysqltest_1'@'localhost' def test DELETE HISTORY YES
|
'mysqltest_1'@'localhost' def test DELETE HISTORY YES
|
||||||
|
'mysqltest_1'@'localhost' def test SHOW CREATE ROUTINE YES
|
||||||
select * from information_schema.TABLE_PRIVILEGES where grantee like '%mysqltest_1%';
|
select * from information_schema.TABLE_PRIVILEGES where grantee like '%mysqltest_1%';
|
||||||
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
|
||||||
'mysqltest_1'@'localhost' def test t1 SELECT NO
|
'mysqltest_1'@'localhost' def test t1 SELECT NO
|
||||||
|
@ -683,3 +683,23 @@ INSERT t WITH cte AS (SELECT 1) SELECT * FROM cte RETURNING *;
|
|||||||
a
|
a
|
||||||
1
|
1
|
||||||
DROP TABLE t;
|
DROP TABLE t;
|
||||||
|
#
|
||||||
|
# MDEV-3953 Add columns for ROWS_EXAMINED, ROWS_SENT, and ROWS_READ to I_S and
|
||||||
|
# processlist
|
||||||
|
#
|
||||||
|
create table t1 (a int primary key, b int);
|
||||||
|
flush status;
|
||||||
|
insert into t1 values (1,2),(2,4) returning a,b;
|
||||||
|
a b
|
||||||
|
1 2
|
||||||
|
2 4
|
||||||
|
insert into t1 select seq,seq from seq_10_to_13 returning a,b;
|
||||||
|
a b
|
||||||
|
10 10
|
||||||
|
11 11
|
||||||
|
12 12
|
||||||
|
13 13
|
||||||
|
show status like "Rows_sent";
|
||||||
|
Variable_name Value
|
||||||
|
Rows_sent 6
|
||||||
|
drop table t1;
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
--source include/have_sequence.inc
|
||||||
|
|
||||||
--echo # Test for INSERT...RETURNING
|
--echo # Test for INSERT...RETURNING
|
||||||
|
|
||||||
CREATE TABLE t1(id1 INT PRIMARY KEY AUTO_INCREMENT, val1 VARCHAR(1));
|
CREATE TABLE t1(id1 INT PRIMARY KEY AUTO_INCREMENT, val1 VARCHAR(1));
|
||||||
@ -396,3 +398,15 @@ CREATE TABLE t (a INT);
|
|||||||
INSERT t WITH cte AS (SELECT 1) SELECT * FROM cte RETURNING *;
|
INSERT t WITH cte AS (SELECT 1) SELECT * FROM cte RETURNING *;
|
||||||
|
|
||||||
DROP TABLE t;
|
DROP TABLE t;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-3953 Add columns for ROWS_EXAMINED, ROWS_SENT, and ROWS_READ to I_S and
|
||||||
|
--echo # processlist
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create table t1 (a int primary key, b int);
|
||||||
|
flush status;
|
||||||
|
insert into t1 values (1,2),(2,4) returning a,b;
|
||||||
|
insert into t1 select seq,seq from seq_10_to_13 returning a,b;
|
||||||
|
show status like "Rows_sent";
|
||||||
|
drop table t1;
|
||||||
|
@ -1804,7 +1804,7 @@ sum(t3.b)
|
|||||||
show status like "handler_read%";
|
show status like "handler_read%";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_first 0
|
Handler_read_first 0
|
||||||
Handler_read_key 13
|
Handler_read_key 4
|
||||||
Handler_read_last 0
|
Handler_read_last 0
|
||||||
Handler_read_next 5
|
Handler_read_next 5
|
||||||
Handler_read_prev 0
|
Handler_read_prev 0
|
||||||
@ -1819,7 +1819,7 @@ sum(t3.b)
|
|||||||
show status like "handler_read%";
|
show status like "handler_read%";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_first 0
|
Handler_read_first 0
|
||||||
Handler_read_key 7
|
Handler_read_key 4
|
||||||
Handler_read_last 0
|
Handler_read_last 0
|
||||||
Handler_read_next 5
|
Handler_read_next 5
|
||||||
Handler_read_prev 0
|
Handler_read_prev 0
|
||||||
|
@ -1811,7 +1811,7 @@ sum(t3.b)
|
|||||||
show status like "handler_read%";
|
show status like "handler_read%";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_first 0
|
Handler_read_first 0
|
||||||
Handler_read_key 13
|
Handler_read_key 4
|
||||||
Handler_read_last 0
|
Handler_read_last 0
|
||||||
Handler_read_next 5
|
Handler_read_next 5
|
||||||
Handler_read_prev 0
|
Handler_read_prev 0
|
||||||
@ -1826,7 +1826,7 @@ sum(t3.b)
|
|||||||
show status like "handler_read%";
|
show status like "handler_read%";
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Handler_read_first 0
|
Handler_read_first 0
|
||||||
Handler_read_key 7
|
Handler_read_key 4
|
||||||
Handler_read_last 0
|
Handler_read_last 0
|
||||||
Handler_read_next 5
|
Handler_read_next 5
|
||||||
Handler_read_prev 0
|
Handler_read_prev 0
|
||||||
|
@ -13,6 +13,7 @@ Variable_name Value
|
|||||||
log_slow_admin_statements ON
|
log_slow_admin_statements ON
|
||||||
log_slow_disabled_statements sp
|
log_slow_disabled_statements sp
|
||||||
log_slow_filter admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
|
log_slow_filter admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
|
||||||
|
log_slow_max_warnings 10
|
||||||
log_slow_min_examined_row_limit 0
|
log_slow_min_examined_row_limit 0
|
||||||
log_slow_query ON
|
log_slow_query ON
|
||||||
log_slow_query_file $PATH/mysqld-slow.log
|
log_slow_query_file $PATH/mysqld-slow.log
|
||||||
@ -56,15 +57,15 @@ start_time timestamp(6) NO current_timestamp(6) on update current_timestamp(6)
|
|||||||
user_host mediumtext NO NULL
|
user_host mediumtext NO NULL
|
||||||
query_time time(6) NO NULL
|
query_time time(6) NO NULL
|
||||||
lock_time time(6) NO NULL
|
lock_time time(6) NO NULL
|
||||||
rows_sent int(11) NO NULL
|
rows_sent bigint(20) unsigned NO NULL
|
||||||
rows_examined int(11) NO NULL
|
rows_examined bigint(20) unsigned NO NULL
|
||||||
db varchar(512) NO NULL
|
db varchar(512) NO NULL
|
||||||
last_insert_id int(11) NO NULL
|
last_insert_id int(11) NO NULL
|
||||||
insert_id int(11) NO NULL
|
insert_id int(11) NO NULL
|
||||||
server_id int(10) unsigned NO NULL
|
server_id int(10) unsigned NO NULL
|
||||||
sql_text mediumtext NO NULL
|
sql_text mediumtext NO NULL
|
||||||
thread_id bigint(21) unsigned NO NULL
|
thread_id bigint(21) unsigned NO NULL
|
||||||
rows_affected int(11) NO NULL
|
rows_affected bigint(20) unsigned NO NULL
|
||||||
flush slow logs;
|
flush slow logs;
|
||||||
set long_query_time=0.1;
|
set long_query_time=0.1;
|
||||||
set log_slow_filter='';
|
set log_slow_filter='';
|
||||||
@ -137,3 +138,54 @@ drop table t;
|
|||||||
#
|
#
|
||||||
# End of 10.3 tests
|
# End of 10.3 tests
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
# MDEV-31742: incorrect examined rows in case of stored function usage
|
||||||
|
#
|
||||||
|
CREATE TABLE `tab_MDEV_30820` (
|
||||||
|
`ID` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`NAME_F` varchar(50) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`ID`)
|
||||||
|
);
|
||||||
|
CREATE TABLE `tab2` (
|
||||||
|
`ID` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`TAB1_ID` int(11) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
);
|
||||||
|
CREATE FUNCTION `get_zero`() RETURNS int(11)
|
||||||
|
BEGIN
|
||||||
|
RETURN(0) ;
|
||||||
|
END
|
||||||
|
//
|
||||||
|
for i in 1..100 do insert into tab_MDEV_30820 values (i,'qwerty'); end for ; //
|
||||||
|
for i in 1..1000 do insert into tab2 values (i,i+300); end for ; //
|
||||||
|
SET @old_slow_query_log= @@global.slow_query_log;
|
||||||
|
SET @old_log_output= @@global.log_output;
|
||||||
|
SET @old_long_query_time= @@long_query_time;
|
||||||
|
SET GLOBAL log_output= "TABLE";
|
||||||
|
SET GLOBAL slow_query_log= ON;
|
||||||
|
SET SESSION slow_query_log=ON;
|
||||||
|
SET SESSION long_query_time= 0;
|
||||||
|
SELECT 0 as zero, (SELECT ID FROM tab2 where tab2.TAB1_ID =
|
||||||
|
tab_MDEV_30820.ID ORDER BY 1 LIMIT 1 ) AS F1 FROM tab_MDEV_30820 ORDER BY 2 DESC LIMIT 2;
|
||||||
|
zero F1
|
||||||
|
0 NULL
|
||||||
|
0 NULL
|
||||||
|
SELECT get_zero() as zero, (SELECT ID FROM tab2 where tab2.TAB1_ID =
|
||||||
|
tab_MDEV_30820.ID ORDER BY 1 LIMIT 1) AS F1 FROM tab_MDEV_30820 ORDER BY 2 DESC LIMIT 2;
|
||||||
|
zero F1
|
||||||
|
0 NULL
|
||||||
|
0 NULL
|
||||||
|
# should be the same rows_examined
|
||||||
|
SELECT rows_examined FROM mysql.slow_log WHERE sql_text LIKE '%SELECT%tab_MDEV_30820%';
|
||||||
|
rows_examined
|
||||||
|
100202
|
||||||
|
100202
|
||||||
|
SET @@long_query_time= @old_long_query_time;
|
||||||
|
SET @@global.log_output= @old_log_output;
|
||||||
|
SET @@global.slow_query_log= @old_slow_query_log;
|
||||||
|
SET SESSION slow_query_log=default;
|
||||||
|
drop table tab_MDEV_30820, tab2;
|
||||||
|
drop function get_zero;
|
||||||
|
#
|
||||||
|
# End of 10.4 tests
|
||||||
|
#
|
||||||
|
@ -122,3 +122,70 @@ drop table t;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.3 tests
|
--echo # End of 10.3 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-31742: incorrect examined rows in case of stored function usage
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE `tab_MDEV_30820` (
|
||||||
|
`ID` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`NAME_F` varchar(50) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`ID`)
|
||||||
|
);
|
||||||
|
|
||||||
|
CREATE TABLE `tab2` (
|
||||||
|
`ID` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`TAB1_ID` int(11) DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
);
|
||||||
|
|
||||||
|
--disable_ps2_protocol
|
||||||
|
--disable_view_protocol
|
||||||
|
|
||||||
|
--delimiter //
|
||||||
|
CREATE FUNCTION `get_zero`() RETURNS int(11)
|
||||||
|
BEGIN
|
||||||
|
RETURN(0) ;
|
||||||
|
END
|
||||||
|
//
|
||||||
|
|
||||||
|
for i in 1..100 do insert into tab_MDEV_30820 values (i,'qwerty'); end for ; //
|
||||||
|
for i in 1..1000 do insert into tab2 values (i,i+300); end for ; //
|
||||||
|
|
||||||
|
--delimiter ;
|
||||||
|
|
||||||
|
SET @old_slow_query_log= @@global.slow_query_log;
|
||||||
|
SET @old_log_output= @@global.log_output;
|
||||||
|
SET @old_long_query_time= @@long_query_time;
|
||||||
|
SET GLOBAL log_output= "TABLE";
|
||||||
|
SET GLOBAL slow_query_log= ON;
|
||||||
|
|
||||||
|
SET SESSION slow_query_log=ON;
|
||||||
|
SET SESSION long_query_time= 0;
|
||||||
|
|
||||||
|
SELECT 0 as zero, (SELECT ID FROM tab2 where tab2.TAB1_ID =
|
||||||
|
tab_MDEV_30820.ID ORDER BY 1 LIMIT 1 ) AS F1 FROM tab_MDEV_30820 ORDER BY 2 DESC LIMIT 2;
|
||||||
|
|
||||||
|
SELECT get_zero() as zero, (SELECT ID FROM tab2 where tab2.TAB1_ID =
|
||||||
|
tab_MDEV_30820.ID ORDER BY 1 LIMIT 1) AS F1 FROM tab_MDEV_30820 ORDER BY 2 DESC LIMIT 2;
|
||||||
|
|
||||||
|
--echo # should be the same rows_examined
|
||||||
|
SELECT rows_examined FROM mysql.slow_log WHERE sql_text LIKE '%SELECT%tab_MDEV_30820%';
|
||||||
|
|
||||||
|
## Reset to initial values
|
||||||
|
SET @@long_query_time= @old_long_query_time;
|
||||||
|
SET @@global.log_output= @old_log_output;
|
||||||
|
SET @@global.slow_query_log= @old_slow_query_log;
|
||||||
|
SET SESSION slow_query_log=default;
|
||||||
|
|
||||||
|
drop table tab_MDEV_30820, tab2;
|
||||||
|
drop function get_zero;
|
||||||
|
|
||||||
|
--enable_view_protocol
|
||||||
|
--enable_ps2_protocol
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.4 tests
|
||||||
|
--echo #
|
||||||
|
@ -230,6 +230,91 @@ sql_text
|
|||||||
[slow] DEALLOCATE PREPARE stmt
|
[slow] DEALLOCATE PREPARE stmt
|
||||||
[slow] DROP SEQUENCE s4
|
[slow] DROP SEQUENCE s4
|
||||||
#
|
#
|
||||||
|
# Start of 10.6 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-32203 Raise notes when an index cannot be used on data type
|
||||||
|
# mismatch
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a VARCHAR(10), KEY(a));
|
||||||
|
insert into t1 select seq from seq_0_to_31;
|
||||||
|
SET note_verbosity=all;
|
||||||
|
SET log_slow_verbosity=all;
|
||||||
|
SET global log_output='FILE';
|
||||||
|
set @org_slow_query_log_file=@@global.slow_query_log_file;
|
||||||
|
set global slow_query_log_file='MYSQLTEST_VARDIR/tmp/log_slow_debug-1.log';
|
||||||
|
FLUSH SLOW LOGS;
|
||||||
|
SELECT * FROM t1 WHERE a=10;
|
||||||
|
a
|
||||||
|
10
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[0] for lookup: `test`.`t1`.`a` of type `varchar` = "10" of type `int`
|
||||||
|
EXPLAIN SELECT * FROM t1 WHERE a=10;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 index a a 13 NULL 32 Using where; Using index
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[0] for lookup: `test`.`t1`.`a` of type `varchar` = "10" of type `int`
|
||||||
|
FOUND 2 /# Warnings/ in log_slow_debug-1.log
|
||||||
|
FOUND 1 /# Note.*Cannot use key.*varchar.*10.*int/ in log_slow_debug-1.log
|
||||||
|
set global slow_query_log_file='MYSQLTEST_VARDIR/tmp/log_slow_debug-2.log';
|
||||||
|
SET note_verbosity="explain";
|
||||||
|
FLUSH SLOW LOGS;
|
||||||
|
EXPLAIN SELECT * FROM t1 WHERE a=10;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 index a a 13 NULL 32 Using where; Using index
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[0] for lookup: `test`.`t1`.`a` of type `varchar` = "10" of type `int`
|
||||||
|
FOUND 1 /# Warnings/ in log_slow_debug-2.log
|
||||||
|
FOUND 1 /# Note.*Cannot use key.*varchar.*10.*int/ in log_slow_debug-2.log
|
||||||
|
set global slow_query_log_file='MYSQLTEST_VARDIR/tmp/log_slow_debug-3.log';
|
||||||
|
SET log_slow_verbosity=replace(@@log_slow_verbosity, "warnings", "");
|
||||||
|
SET log_slow_verbosity=replace(@@log_slow_verbosity, "full", "");
|
||||||
|
SET note_verbosity=all;
|
||||||
|
FLUSH SLOW LOGS;
|
||||||
|
SELECT * FROM t1 WHERE a=10;
|
||||||
|
a
|
||||||
|
10
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[0] for lookup: `test`.`t1`.`a` of type `varchar` = "10" of type `int`
|
||||||
|
EXPLAIN SELECT * FROM t1 WHERE a=10;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 index a a 13 NULL 32 Using where; Using index
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[0] for lookup: `test`.`t1`.`a` of type `varchar` = "10" of type `int`
|
||||||
|
NOT FOUND /# Warnings/ in log_slow_debug-3.log
|
||||||
|
NOT FOUND /# Note.*Cannot use key.*varchar.*10.*int/ in log_slow_debug-3.log
|
||||||
|
set @@global.slow_query_log_file= @org_slow_query_log_file;
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# MDEV-30820: slow log Rows_examined out of range
|
||||||
|
#
|
||||||
|
CREATE TABLE `tab_MDEV_30820` (
|
||||||
|
`ID` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`A` int(11),
|
||||||
|
PRIMARY KEY(ID)
|
||||||
|
);
|
||||||
|
insert into tab_MDEV_30820 values (null, 0),(null, 0);
|
||||||
|
SET @old_slow_query_log= @@global.slow_query_log;
|
||||||
|
SET @old_log_output= @@global.log_output;
|
||||||
|
SET @old_long_query_time= @@long_query_time;
|
||||||
|
SET @old_dbug= @@GLOBAL.debug_dbug;
|
||||||
|
SET GLOBAL log_output= "TABLE";
|
||||||
|
SET GLOBAL slow_query_log= ON;
|
||||||
|
SET SESSION long_query_time= 0;
|
||||||
|
SET GLOBAL debug_dbug="+d,debug_huge_number_of_examined_rows";
|
||||||
|
SELECT * FROM tab_MDEV_30820 ORDER BY 1;
|
||||||
|
ID A
|
||||||
|
1 0
|
||||||
|
2 0
|
||||||
|
SET GLOBAL debug_dbug=@old_dbug;
|
||||||
|
SET @@long_query_time= @old_long_query_time;
|
||||||
|
SET @@global.log_output= @old_log_output;
|
||||||
|
SET @@global.slow_query_log= @old_slow_query_log;
|
||||||
|
drop table tab_MDEV_30820;
|
||||||
|
#
|
||||||
|
# End of 10.4 test
|
||||||
|
#
|
||||||
|
#
|
||||||
# Clean up
|
# Clean up
|
||||||
#
|
#
|
||||||
SET SESSION debug_dbug=@saved_dbug;
|
SET SESSION debug_dbug=@saved_dbug;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
-- source include/have_debug.inc
|
-- source include/have_debug.inc
|
||||||
|
-- source include/have_sequence.inc
|
||||||
|
|
||||||
SET @org_slow_query_log= @@global.slow_query_log;
|
SET @org_slow_query_log= @@global.slow_query_log;
|
||||||
SET @org_log_output= @@global.log_output;
|
SET @org_log_output= @@global.log_output;
|
||||||
@ -82,6 +83,108 @@ TRUNCATE TABLE mysql.slow_log;
|
|||||||
--source include/log_slow_debug_common.inc
|
--source include/log_slow_debug_common.inc
|
||||||
CALL show_slow_log();
|
CALL show_slow_log();
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Start of 10.6 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-32203 Raise notes when an index cannot be used on data type
|
||||||
|
--echo # mismatch
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a VARCHAR(10), KEY(a));
|
||||||
|
insert into t1 select seq from seq_0_to_31;
|
||||||
|
|
||||||
|
SET note_verbosity=all;
|
||||||
|
SET log_slow_verbosity=all;
|
||||||
|
SET global log_output='FILE';
|
||||||
|
set @org_slow_query_log_file=@@global.slow_query_log_file;
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
eval set global slow_query_log_file='$MYSQLTEST_VARDIR/tmp/log_slow_debug-1.log';
|
||||||
|
FLUSH SLOW LOGS;
|
||||||
|
--disable_ps_protocol
|
||||||
|
SELECT * FROM t1 WHERE a=10;
|
||||||
|
EXPLAIN SELECT * FROM t1 WHERE a=10;
|
||||||
|
--enable_ps_protocol
|
||||||
|
|
||||||
|
--let SEARCH_FILE = `SELECT @@slow_query_log_file`
|
||||||
|
--let SEARCH_PATTERN=# Warnings
|
||||||
|
--source include/search_pattern_in_file.inc
|
||||||
|
--let SEARCH_PATTERN= # Note.*Cannot use key.*varchar.*10.*int
|
||||||
|
--source include/search_pattern_in_file.inc
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
eval set global slow_query_log_file='$MYSQLTEST_VARDIR/tmp/log_slow_debug-2.log';
|
||||||
|
SET note_verbosity="explain";
|
||||||
|
FLUSH SLOW LOGS;
|
||||||
|
EXPLAIN SELECT * FROM t1 WHERE a=10;
|
||||||
|
|
||||||
|
--let SEARCH_FILE = `SELECT @@slow_query_log_file`
|
||||||
|
--let SEARCH_PATTERN=# Warnings
|
||||||
|
--source include/search_pattern_in_file.inc
|
||||||
|
--let SEARCH_PATTERN= # Note.*Cannot use key.*varchar.*10.*int
|
||||||
|
--source include/search_pattern_in_file.inc
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
eval set global slow_query_log_file='$MYSQLTEST_VARDIR/tmp/log_slow_debug-3.log';
|
||||||
|
SET log_slow_verbosity=replace(@@log_slow_verbosity, "warnings", "");
|
||||||
|
SET log_slow_verbosity=replace(@@log_slow_verbosity, "full", "");
|
||||||
|
SET note_verbosity=all;
|
||||||
|
FLUSH SLOW LOGS;
|
||||||
|
SELECT * FROM t1 WHERE a=10;
|
||||||
|
EXPLAIN SELECT * FROM t1 WHERE a=10;
|
||||||
|
|
||||||
|
--let SEARCH_FILE = `SELECT @@slow_query_log_file`
|
||||||
|
--let SEARCH_PATTERN=# Warnings
|
||||||
|
--source include/search_pattern_in_file.inc
|
||||||
|
--let SEARCH_PATTERN= # Note.*Cannot use key.*varchar.*10.*int
|
||||||
|
--source include/search_pattern_in_file.inc
|
||||||
|
|
||||||
|
set @@global.slow_query_log_file= @org_slow_query_log_file;
|
||||||
|
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/log_slow_debug-1.log
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/log_slow_debug-2.log
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/log_slow_debug-3.log
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-30820: slow log Rows_examined out of range
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE `tab_MDEV_30820` (
|
||||||
|
`ID` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`A` int(11),
|
||||||
|
PRIMARY KEY(ID)
|
||||||
|
);
|
||||||
|
|
||||||
|
insert into tab_MDEV_30820 values (null, 0),(null, 0);
|
||||||
|
|
||||||
|
SET @old_slow_query_log= @@global.slow_query_log;
|
||||||
|
SET @old_log_output= @@global.log_output;
|
||||||
|
SET @old_long_query_time= @@long_query_time;
|
||||||
|
SET @old_dbug= @@GLOBAL.debug_dbug;
|
||||||
|
SET GLOBAL log_output= "TABLE";
|
||||||
|
|
||||||
|
SET GLOBAL slow_query_log= ON;
|
||||||
|
SET SESSION long_query_time= 0;
|
||||||
|
|
||||||
|
SET GLOBAL debug_dbug="+d,debug_huge_number_of_examined_rows";
|
||||||
|
SELECT * FROM tab_MDEV_30820 ORDER BY 1;
|
||||||
|
SET GLOBAL debug_dbug=@old_dbug;
|
||||||
|
|
||||||
|
|
||||||
|
## Reset to initial values
|
||||||
|
SET @@long_query_time= @old_long_query_time;
|
||||||
|
SET @@global.log_output= @old_log_output;
|
||||||
|
SET @@global.slow_query_log= @old_slow_query_log;
|
||||||
|
|
||||||
|
drop table tab_MDEV_30820;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.4 test
|
||||||
|
--echo #
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Clean up
|
--echo # Clean up
|
||||||
|
@ -73,15 +73,15 @@ slow_log CREATE TABLE `slow_log` (
|
|||||||
`user_host` mediumtext NOT NULL,
|
`user_host` mediumtext NOT NULL,
|
||||||
`query_time` time(6) NOT NULL,
|
`query_time` time(6) NOT NULL,
|
||||||
`lock_time` time(6) NOT NULL,
|
`lock_time` time(6) NOT NULL,
|
||||||
`rows_sent` int(11) NOT NULL,
|
`rows_sent` bigint(20) unsigned NOT NULL,
|
||||||
`rows_examined` int(11) NOT NULL,
|
`rows_examined` bigint(20) unsigned NOT NULL,
|
||||||
`db` varchar(512) NOT NULL,
|
`db` varchar(512) NOT NULL,
|
||||||
`last_insert_id` int(11) NOT NULL,
|
`last_insert_id` int(11) NOT NULL,
|
||||||
`insert_id` int(11) NOT NULL,
|
`insert_id` int(11) NOT NULL,
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
`sql_text` mediumtext NOT NULL,
|
`sql_text` mediumtext NOT NULL,
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
`rows_affected` int(11) NOT NULL
|
`rows_affected` bigint(20) unsigned NOT NULL
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log'
|
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log'
|
||||||
show fields from mysql.slow_log;
|
show fields from mysql.slow_log;
|
||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
@ -89,15 +89,15 @@ start_time timestamp(6) NO current_timestamp(6) on update current_timestamp(6)
|
|||||||
user_host mediumtext NO NULL
|
user_host mediumtext NO NULL
|
||||||
query_time time(6) NO NULL
|
query_time time(6) NO NULL
|
||||||
lock_time time(6) NO NULL
|
lock_time time(6) NO NULL
|
||||||
rows_sent int(11) NO NULL
|
rows_sent bigint(20) unsigned NO NULL
|
||||||
rows_examined int(11) NO NULL
|
rows_examined bigint(20) unsigned NO NULL
|
||||||
db varchar(512) NO NULL
|
db varchar(512) NO NULL
|
||||||
last_insert_id int(11) NO NULL
|
last_insert_id int(11) NO NULL
|
||||||
insert_id int(11) NO NULL
|
insert_id int(11) NO NULL
|
||||||
server_id int(10) unsigned NO NULL
|
server_id int(10) unsigned NO NULL
|
||||||
sql_text mediumtext NO NULL
|
sql_text mediumtext NO NULL
|
||||||
thread_id bigint(21) unsigned NO NULL
|
thread_id bigint(21) unsigned NO NULL
|
||||||
rows_affected int(11) NO NULL
|
rows_affected bigint(20) unsigned NO NULL
|
||||||
flush logs;
|
flush logs;
|
||||||
flush tables;
|
flush tables;
|
||||||
SET GLOBAL GENERAL_LOG=ON;
|
SET GLOBAL GENERAL_LOG=ON;
|
||||||
@ -180,15 +180,15 @@ slow_log CREATE TABLE `slow_log` (
|
|||||||
`user_host` mediumtext NOT NULL,
|
`user_host` mediumtext NOT NULL,
|
||||||
`query_time` time(6) NOT NULL,
|
`query_time` time(6) NOT NULL,
|
||||||
`lock_time` time(6) NOT NULL,
|
`lock_time` time(6) NOT NULL,
|
||||||
`rows_sent` int(11) NOT NULL,
|
`rows_sent` bigint(20) unsigned NOT NULL,
|
||||||
`rows_examined` int(11) NOT NULL,
|
`rows_examined` bigint(20) unsigned NOT NULL,
|
||||||
`db` varchar(512) NOT NULL,
|
`db` varchar(512) NOT NULL,
|
||||||
`last_insert_id` int(11) NOT NULL,
|
`last_insert_id` int(11) NOT NULL,
|
||||||
`insert_id` int(11) NOT NULL,
|
`insert_id` int(11) NOT NULL,
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
`sql_text` mediumtext NOT NULL,
|
`sql_text` mediumtext NOT NULL,
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
`rows_affected` int(11) NOT NULL
|
`rows_affected` bigint(20) unsigned NOT NULL
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log'
|
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log'
|
||||||
alter table mysql.general_log engine=myisam;
|
alter table mysql.general_log engine=myisam;
|
||||||
alter table mysql.slow_log engine=myisam;
|
alter table mysql.slow_log engine=myisam;
|
||||||
@ -209,15 +209,15 @@ slow_log CREATE TABLE `slow_log` (
|
|||||||
`user_host` mediumtext NOT NULL,
|
`user_host` mediumtext NOT NULL,
|
||||||
`query_time` time(6) NOT NULL,
|
`query_time` time(6) NOT NULL,
|
||||||
`lock_time` time(6) NOT NULL,
|
`lock_time` time(6) NOT NULL,
|
||||||
`rows_sent` int(11) NOT NULL,
|
`rows_sent` bigint(20) unsigned NOT NULL,
|
||||||
`rows_examined` int(11) NOT NULL,
|
`rows_examined` bigint(20) unsigned NOT NULL,
|
||||||
`db` varchar(512) NOT NULL,
|
`db` varchar(512) NOT NULL,
|
||||||
`last_insert_id` int(11) NOT NULL,
|
`last_insert_id` int(11) NOT NULL,
|
||||||
`insert_id` int(11) NOT NULL,
|
`insert_id` int(11) NOT NULL,
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
`sql_text` mediumtext NOT NULL,
|
`sql_text` mediumtext NOT NULL,
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
`rows_affected` int(11) NOT NULL
|
`rows_affected` bigint(20) unsigned NOT NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log'
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log'
|
||||||
set global general_log='ON';
|
set global general_log='ON';
|
||||||
set global slow_query_log='ON';
|
set global slow_query_log='ON';
|
||||||
@ -287,15 +287,15 @@ ON UPDATE CURRENT_TIMESTAMP,
|
|||||||
`user_host` mediumtext NOT NULL,
|
`user_host` mediumtext NOT NULL,
|
||||||
`query_time` time(6) NOT NULL,
|
`query_time` time(6) NOT NULL,
|
||||||
`lock_time` time(6) NOT NULL,
|
`lock_time` time(6) NOT NULL,
|
||||||
`rows_sent` int(11) NOT NULL,
|
`rows_sent` bigint(20) unsigned NOT NULL,
|
||||||
`rows_examined` int(11) NOT NULL,
|
`rows_examined` bigint(20) unsigned NOT NULL,
|
||||||
`db` varchar(512) NOT NULL,
|
`db` varchar(512) NOT NULL,
|
||||||
`last_insert_id` int(11) NOT NULL,
|
`last_insert_id` int(11) NOT NULL,
|
||||||
`insert_id` int(11) NOT NULL,
|
`insert_id` int(11) NOT NULL,
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
`sql_text` mediumtext NOT NULL,
|
`sql_text` mediumtext NOT NULL,
|
||||||
`thread_id` BIGINT(21) UNSIGNED NOT NULL,
|
`thread_id` BIGINT(21) UNSIGNED NOT NULL,
|
||||||
`rows_affected` int(11) NOT NULL
|
`rows_affected` bigint(20) unsigned NOT NULL
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
||||||
set global general_log='ON';
|
set global general_log='ON';
|
||||||
set global slow_query_log='ON';
|
set global slow_query_log='ON';
|
||||||
@ -580,15 +580,15 @@ CREATE TABLE `db_17876.slow_log_data` (
|
|||||||
`user_host` mediumtext ,
|
`user_host` mediumtext ,
|
||||||
`query_time` time(6) ,
|
`query_time` time(6) ,
|
||||||
`lock_time` time(6) ,
|
`lock_time` time(6) ,
|
||||||
`rows_sent` int(11) ,
|
`rows_sent` bigint(20) unsigned,
|
||||||
`rows_examined` int(11) ,
|
`rows_examined` bigint(20) unsigned,
|
||||||
`db` varchar(512) default NULL,
|
`db` varchar(512) default NULL,
|
||||||
`last_insert_id` int(11) default NULL,
|
`last_insert_id` int(11) default NULL,
|
||||||
`insert_id` int(11) default NULL,
|
`insert_id` int(11) default NULL,
|
||||||
`server_id` int(11) default NULL,
|
`server_id` int(11) default NULL,
|
||||||
`sql_text` mediumtext,
|
`sql_text` mediumtext,
|
||||||
`thread_id` bigint(21) unsigned default NULL,
|
`thread_id` bigint(21) unsigned default NULL,
|
||||||
`rows_affected` int(11) default NULL
|
`rows_affected` bigint(20) unsigned default NULL
|
||||||
);
|
);
|
||||||
CREATE TABLE `db_17876.general_log_data` (
|
CREATE TABLE `db_17876.general_log_data` (
|
||||||
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
`event_time` timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
@ -307,15 +307,15 @@ CREATE TABLE `slow_log` (
|
|||||||
`user_host` mediumtext NOT NULL,
|
`user_host` mediumtext NOT NULL,
|
||||||
`query_time` time(6) NOT NULL,
|
`query_time` time(6) NOT NULL,
|
||||||
`lock_time` time(6) NOT NULL,
|
`lock_time` time(6) NOT NULL,
|
||||||
`rows_sent` int(11) NOT NULL,
|
`rows_sent` bigint(20) unsigned NOT NULL,
|
||||||
`rows_examined` int(11) NOT NULL,
|
`rows_examined` bigint(20) unsigned NOT NULL,
|
||||||
`db` varchar(512) NOT NULL,
|
`db` varchar(512) NOT NULL,
|
||||||
`last_insert_id` int(11) NOT NULL,
|
`last_insert_id` int(11) NOT NULL,
|
||||||
`insert_id` int(11) NOT NULL,
|
`insert_id` int(11) NOT NULL,
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
`sql_text` mediumtext NOT NULL,
|
`sql_text` mediumtext NOT NULL,
|
||||||
`thread_id` BIGINT(21) UNSIGNED NOT NULL,
|
`thread_id` BIGINT(21) UNSIGNED NOT NULL,
|
||||||
`rows_affected` int(11) NOT NULL
|
`rows_affected` bigint(20) unsigned NOT NULL
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
) ENGINE=CSV DEFAULT CHARSET=utf8 COMMENT='Slow log';
|
||||||
|
|
||||||
set global general_log='ON';
|
set global general_log='ON';
|
||||||
@ -743,15 +743,15 @@ CREATE TABLE `db_17876.slow_log_data` (
|
|||||||
`user_host` mediumtext ,
|
`user_host` mediumtext ,
|
||||||
`query_time` time(6) ,
|
`query_time` time(6) ,
|
||||||
`lock_time` time(6) ,
|
`lock_time` time(6) ,
|
||||||
`rows_sent` int(11) ,
|
`rows_sent` bigint(20) unsigned,
|
||||||
`rows_examined` int(11) ,
|
`rows_examined` bigint(20) unsigned,
|
||||||
`db` varchar(512) default NULL,
|
`db` varchar(512) default NULL,
|
||||||
`last_insert_id` int(11) default NULL,
|
`last_insert_id` int(11) default NULL,
|
||||||
`insert_id` int(11) default NULL,
|
`insert_id` int(11) default NULL,
|
||||||
`server_id` int(11) default NULL,
|
`server_id` int(11) default NULL,
|
||||||
`sql_text` mediumtext,
|
`sql_text` mediumtext,
|
||||||
`thread_id` bigint(21) unsigned default NULL,
|
`thread_id` bigint(21) unsigned default NULL,
|
||||||
`rows_affected` int(11) default NULL
|
`rows_affected` bigint(20) unsigned default NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
CREATE TABLE `db_17876.general_log_data` (
|
CREATE TABLE `db_17876.general_log_data` (
|
||||||
|
@ -457,6 +457,41 @@ create table t1 (f text not null, unique (f));
|
|||||||
insert into t1 (f) select 'f';
|
insert into t1 (f) select 'f';
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
#
|
||||||
|
# MDEV-32012 hash unique corrupts index on virtual blobs
|
||||||
|
#
|
||||||
|
create table t1 (
|
||||||
|
f1 varchar(25),
|
||||||
|
v1 mediumtext generated always as (concat('f1:', f1)) virtual,
|
||||||
|
unique key (f1) using hash,
|
||||||
|
key (v1(1000))
|
||||||
|
);
|
||||||
|
flush status;
|
||||||
|
insert ignore t1 (f1) values (9599),(94410);
|
||||||
|
show status like 'handler_read_next';
|
||||||
|
Variable_name Value
|
||||||
|
Handler_read_next 1
|
||||||
|
# the above MUST BE =1
|
||||||
|
check table t1 extended;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
|
update t1 set f1=100 where f1=9599;
|
||||||
|
update t1 set f1=9599 where f1=100;
|
||||||
|
check table t1 extended;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-32015 insert into an empty table fails with hash unique
|
||||||
|
#
|
||||||
|
create table t1 (f1 varchar(25), unique (f1) using hash);
|
||||||
|
insert ignore t1 (f1) values ('new york'),('virginia'),('spouse'),(null),('zqekmqpwutxnzddrbjycyo'),('nebraska'),('illinois'),('qe'),('ekmqpwut'),('arizona'),('arizona');
|
||||||
|
Warnings:
|
||||||
|
Warning 1062 Duplicate entry 'arizona' for key 'f1'
|
||||||
|
check table t1 extended;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t1 check status OK
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
# End of 10.4 tests
|
# End of 10.4 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -456,6 +456,38 @@ create table t1 (f text not null, unique (f));
|
|||||||
insert into t1 (f) select 'f';
|
insert into t1 (f) select 'f';
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-32012 hash unique corrupts index on virtual blobs
|
||||||
|
--echo #
|
||||||
|
create table t1 (
|
||||||
|
f1 varchar(25),
|
||||||
|
v1 mediumtext generated always as (concat('f1:', f1)) virtual,
|
||||||
|
unique key (f1) using hash,
|
||||||
|
key (v1(1000))
|
||||||
|
);
|
||||||
|
flush status;
|
||||||
|
insert ignore t1 (f1) values (9599),(94410);
|
||||||
|
# handler_read_next must be 1 below, meaning there was a hash collision above.
|
||||||
|
# if a change in the hash function causes these values not to collide anymore,
|
||||||
|
# the test must be adjusted to use some other values that collide.
|
||||||
|
# to find a collision add an assert into check_duplicate_long_entry_key()
|
||||||
|
# and run, like, insert...select * seq_from_1_to_1000000000
|
||||||
|
show status like 'handler_read_next';
|
||||||
|
--echo # the above MUST BE =1
|
||||||
|
check table t1 extended;
|
||||||
|
update t1 set f1=100 where f1=9599;
|
||||||
|
update t1 set f1=9599 where f1=100;
|
||||||
|
check table t1 extended;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-32015 insert into an empty table fails with hash unique
|
||||||
|
--echo #
|
||||||
|
create table t1 (f1 varchar(25), unique (f1) using hash);
|
||||||
|
insert ignore t1 (f1) values ('new york'),('virginia'),('spouse'),(null),('zqekmqpwutxnzddrbjycyo'),('nebraska'),('illinois'),('qe'),('ekmqpwut'),('arizona'),('arizona');
|
||||||
|
check table t1 extended;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.4 tests
|
--echo # End of 10.4 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
#
|
||||||
|
# MDEV-22722 Assertion "inited==NONE" failed in handler::ha_index_init on the slave during UPDATE
|
||||||
|
#
|
||||||
include/master-slave.inc
|
include/master-slave.inc
|
||||||
[connection master]
|
[connection master]
|
||||||
create table t1 (i1 int, a1 text, unique key i1 (a1)) engine=myisam;
|
create table t1 (i1 int, a1 text, unique key i1 (a1)) engine=myisam;
|
||||||
@ -6,7 +9,21 @@ insert into t1 values (2,2);
|
|||||||
update t1 set a1 = 'd' limit 1;
|
update t1 set a1 = 'd' limit 1;
|
||||||
update t1 set a1 = 'd2' where i1= 2;
|
update t1 set a1 = 'd2' where i1= 2;
|
||||||
connection slave;
|
connection slave;
|
||||||
connection slave;
|
|
||||||
connection master;
|
connection master;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
#
|
||||||
|
# MDEV-32093 long uniques break old->new replication
|
||||||
|
#
|
||||||
|
connection slave;
|
||||||
|
create table t1 (id int not null, b1 varchar(255) not null, b2 varchar(2550) not null, unique (id), unique key (b1,b2) using hash) default charset utf8mb3;
|
||||||
|
set global slave_exec_mode=idempotent;
|
||||||
|
binlog 'aRf2ZA8BAAAA/AAAAAABAAAAAAQAMTAuNS4xNS1NYXJpYURCLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpF/ZkEzgNAAgAEgAEBAQEEgAA5AAEGggAAAAICAgCAAAACgoKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEEwQADQgICAoKCgFRmTlk';
|
||||||
|
binlog 'bBf2ZBMBAAAANAAAAJgHAAAAAHEAAAAAAAEABHRlc3QAAnQxAAQDDw8IBP0C4h0AeqMD4A==bBf2ZBcBAAAANAAAAMwHAAAAAHEAAAAAAAEABP/wj6QAAAEAYgEAZa6/VU0JAAAANteqUw==';
|
||||||
|
binlog 'bBf2ZBMBAAAANAAAAJgHAAAAAHEAAAAAAAEABHRlc3QAAnQxAAQDDw8IBP0C4h0AeqMD4A==bBf2ZBcBAAAANAAAAMwHAAAAAHEAAAAAAAEABP/wj6QAAAEAYgEAZa6/VU0JAAAANteqUw==';
|
||||||
|
binlog 'bBf2ZBMBAAAANAAAAHUkAAAAAHEAAAAAAAEABHRlc3QAAnQxAAQDDw8IBP0C4h0AaTGFIg==bBf2ZBgBAAAASAAAAL0kAAAAAHEAAAAAAAEABP//8I+kAAABAGIBAGWuv1VNCQAAAPBuWwAAAQBiAQBlrr9VTQkAAADxS9Lu';
|
||||||
|
drop table t1;
|
||||||
|
set global slave_exec_mode=default;
|
||||||
|
#
|
||||||
|
# End of 10.4 tests
|
||||||
|
#
|
||||||
include/rpl_end.inc
|
include/rpl_end.inc
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
# Long unique bugs related to master slave replication
|
# Long unique bugs related to master slave replication
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
--echo #
|
||||||
# MDEV-22722 Assertion "inited==NONE" failed in handler::ha_index_init on the slave during UPDATE
|
--echo # MDEV-22722 Assertion "inited==NONE" failed in handler::ha_index_init on the slave during UPDATE
|
||||||
#
|
--echo #
|
||||||
|
|
||||||
--source include/have_binlog_format_row.inc
|
--source include/have_binlog_format_row.inc
|
||||||
--source include/master-slave.inc
|
--source include/master-slave.inc
|
||||||
@ -16,9 +16,34 @@ update t1 set a1 = 'd' limit 1;
|
|||||||
update t1 set a1 = 'd2' where i1= 2;
|
update t1 set a1 = 'd2' where i1= 2;
|
||||||
|
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
connection slave;
|
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-32093 long uniques break old->new replication
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
# this is techically a bug in replication, but it needs an old master
|
||||||
|
# so we'll run it as a non-replicated test with BINLOG command
|
||||||
|
sync_slave_with_master;
|
||||||
|
create table t1 (id int not null, b1 varchar(255) not null, b2 varchar(2550) not null, unique (id), unique key (b1,b2) using hash) default charset utf8mb3;
|
||||||
|
set global slave_exec_mode=idempotent;
|
||||||
|
|
||||||
|
# Format_description_log_event, MariaDB-10.5.15
|
||||||
|
binlog 'aRf2ZA8BAAAA/AAAAAABAAAAAAQAMTAuNS4xNS1NYXJpYURCLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABpF/ZkEzgNAAgAEgAEBAQEEgAA5AAEGggAAAAICAgCAAAACgoKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEEwQADQgICAoKCgFRmTlk';
|
||||||
|
|
||||||
|
### INSERT t1 VALUES (42127, 'b', 'e', 39952170926)
|
||||||
|
binlog 'bBf2ZBMBAAAANAAAAJgHAAAAAHEAAAAAAAEABHRlc3QAAnQxAAQDDw8IBP0C4h0AeqMD4A==bBf2ZBcBAAAANAAAAMwHAAAAAHEAAAAAAAEABP/wj6QAAAEAYgEAZa6/VU0JAAAANteqUw==';
|
||||||
|
binlog 'bBf2ZBMBAAAANAAAAJgHAAAAAHEAAAAAAAEABHRlc3QAAnQxAAQDDw8IBP0C4h0AeqMD4A==bBf2ZBcBAAAANAAAAMwHAAAAAHEAAAAAAAEABP/wj6QAAAEAYgEAZa6/VU0JAAAANteqUw==';
|
||||||
|
|
||||||
|
### UPDATE t1 WHERE (42127, 'b', 'e', 39952170926) SET (23406, 'b', 'e', 39952170926)
|
||||||
|
binlog 'bBf2ZBMBAAAANAAAAHUkAAAAAHEAAAAAAAEABHRlc3QAAnQxAAQDDw8IBP0C4h0AaTGFIg==bBf2ZBgBAAAASAAAAL0kAAAAAHEAAAAAAAEABP//8I+kAAABAGIBAGWuv1VNCQAAAPBuWwAAAQBiAQBlrr9VTQkAAADxS9Lu';
|
||||||
|
|
||||||
|
drop table t1;
|
||||||
|
set global slave_exec_mode=default;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.4 tests
|
||||||
|
--echo #
|
||||||
--source include/rpl_end.inc
|
--source include/rpl_end.inc
|
||||||
|
@ -7,8 +7,8 @@ Grants for mysqltest_1@localhost
|
|||||||
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
|
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
|
||||||
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_1`@`localhost`
|
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_1`@`localhost`
|
||||||
select * from db where user = 'mysqltest_1';
|
select * from db where user = 'mysqltest_1';
|
||||||
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv
|
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv Show_create_routine_priv
|
||||||
localhost mysqltest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y
|
localhost mysqltest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y
|
||||||
update db set db = 'MYSQLtest' where db = 'mysqltest' and user = 'mysqltest_1' and host = 'localhost';
|
update db set db = 'MYSQLtest' where db = 'mysqltest' and user = 'mysqltest_1' and host = 'localhost';
|
||||||
flush privileges;
|
flush privileges;
|
||||||
show grants for mysqltest_1@localhost;
|
show grants for mysqltest_1@localhost;
|
||||||
@ -16,8 +16,8 @@ Grants for mysqltest_1@localhost
|
|||||||
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
|
GRANT USAGE ON *.* TO `mysqltest_1`@`localhost`
|
||||||
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_1`@`localhost`
|
GRANT ALL PRIVILEGES ON `mysqltest`.* TO `mysqltest_1`@`localhost`
|
||||||
select * from db where user = 'mysqltest_1';
|
select * from db where user = 'mysqltest_1';
|
||||||
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv
|
Host Db User Select_priv Insert_priv Update_priv Delete_priv Create_priv Drop_priv Grant_priv References_priv Index_priv Alter_priv Create_tmp_table_priv Lock_tables_priv Create_view_priv Show_view_priv Create_routine_priv Alter_routine_priv Execute_priv Event_priv Trigger_priv Delete_history_priv Show_create_routine_priv
|
||||||
localhost MYSQLtest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y
|
localhost MYSQLtest mysqltest_1 Y Y Y Y Y Y N Y Y Y Y Y Y Y Y Y Y Y Y Y Y
|
||||||
delete from db where db = 'MYSQLtest' and user = 'mysqltest_1' and host = 'localhost';
|
delete from db where db = 'MYSQLtest' and user = 'mysqltest_1' and host = 'localhost';
|
||||||
flush privileges;
|
flush privileges;
|
||||||
drop user mysqltest_1@localhost;
|
drop user mysqltest_1@localhost;
|
||||||
|
@ -30,6 +30,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||||||
EXPLAIN SELECT * FROM t1 WHERE s2='a' COLLATE latin1_german1_ci;
|
EXPLAIN SELECT * FROM t1 WHERE s2='a' COLLATE latin1_german1_ci;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
|
1 SIMPLE t1 ALL s2 NULL NULL NULL 10 Using where
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `s2` part[0] for lookup: `test`.`t1`.`s2` of collation `latin1_swedish_ci` = "'a' collate latin1_german1_ci" of collation `latin1_german1_ci`
|
||||||
EXPLAIN SELECT * FROM t1 WHERE s1 BETWEEN 'a' AND 'b' COLLATE latin1_german1_ci;
|
EXPLAIN SELECT * FROM t1 WHERE s1 BETWEEN 'a' AND 'b' COLLATE latin1_german1_ci;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 range s1 s1 11 NULL 2 Using index condition; Rowid-ordered scan
|
1 SIMPLE t1 range s1 s1 11 NULL 2 Using index condition; Rowid-ordered scan
|
||||||
|
@ -1384,12 +1384,17 @@ INSERT INTO t1 (i) VALUES (10),(11),(12),(13),(14),(15),(16),(17),(18),(19),
|
|||||||
EXPLAIN DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
EXPLAIN DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t1`.`i` of type `char` >= "10" of type `int`
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t1`.`i` of type `char` <= "18" of type `int`
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
EXPLAIN EXTENDED DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
EXPLAIN EXTENDED DELETE FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
||||||
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 SIMPLE t1 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t1 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t1`.`i` of type `char` >= "10" of type `int`
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t1`.`i` of type `char` <= "18" of type `int`
|
||||||
Note 1003 delete from `test`.`t1` using dual where `test`.`t1`.`i` > 10 and `test`.`t1`.`i` <= 18 order by `test`.`t1`.`i` limit 5
|
Note 1003 delete from `test`.`t1` using dual where `test`.`t1`.`i` > 10 and `test`.`t1`.`i` <= 18 order by `test`.`t1`.`i` limit 5
|
||||||
# Status of EXPLAIN EXTENDED query
|
# Status of EXPLAIN EXTENDED query
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -1400,6 +1405,8 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
|||||||
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 SIMPLE t1 ALL i NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t1 ALL i NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t1`.`i` of type `char` >= "10" of type `int`
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t1`.`i` of type `char` <= "18" of type `int`
|
||||||
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where `test`.`t1`.`i` > 10 and `test`.`t1`.`i` <= 18 order by `test`.`t1`.`i` limit 5
|
Note 1003 select `test`.`t1`.`a` AS `a`,`test`.`t1`.`i` AS `i` from `test`.`t1` where `test`.`t1`.`i` > 10 and `test`.`t1`.`i` <= 18 order by `test`.`t1`.`i` limit 5
|
||||||
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -1530,12 +1537,15 @@ INSERT INTO t2 SELECT i, i, i, i FROM t1;
|
|||||||
EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
||||||
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 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
Note 1003 delete from `test`.`t2` using dual where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
Note 1003 delete from `test`.`t2` using dual where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
||||||
# Status of EXPLAIN EXTENDED query
|
# Status of EXPLAIN EXTENDED query
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -1546,6 +1556,7 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
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 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
||||||
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -1582,12 +1593,15 @@ INSERT INTO t2 SELECT i, i, i, i FROM t1;
|
|||||||
EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
EXPLAIN DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
EXPLAIN EXTENDED DELETE FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
||||||
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 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
Note 1003 delete from `test`.`t2` using dual where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
Note 1003 delete from `test`.`t2` using dual where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
||||||
# Status of EXPLAIN EXTENDED query
|
# Status of EXPLAIN EXTENDED query
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -1598,6 +1612,7 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
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 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
||||||
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -1876,12 +1891,17 @@ INSERT INTO t2 (i) SELECT i FROM t1;
|
|||||||
EXPLAIN UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
EXPLAIN UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t2`.`i` of type `char` >= "10" of type `int`
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t2`.`i` of type `char` <= "18" of type `int`
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
EXPLAIN EXTENDED UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
EXPLAIN EXTENDED UPDATE t2 SET a = 10 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT 5;
|
||||||
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 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t2`.`i` of type `char` >= "10" of type `int`
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t2`.`i` of type `char` <= "18" of type `int`
|
||||||
Note 1003 update `test`.`t2` set `test`.`t2`.`a` = 10 where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` limit 5
|
Note 1003 update `test`.`t2` set `test`.`t2`.`a` = 10 where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` limit 5
|
||||||
# Status of EXPLAIN EXTENDED query
|
# Status of EXPLAIN EXTENDED query
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -1892,6 +1912,8 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE i > 10 AND i <= 18 ORDER BY i LIMIT
|
|||||||
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 SIMPLE t2 ALL i NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t2 ALL i NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t2`.`i` of type `char` >= "10" of type `int`
|
||||||
|
Note 1105 Cannot use key `i` part[0] for lookup: `test`.`t2`.`i` of type `char` <= "18" of type `int`
|
||||||
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` limit 5
|
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`i` AS `i` from `test`.`t2` where `test`.`t2`.`i` > 10 and `test`.`t2`.`i` <= 18 order by `test`.`t2`.`i` limit 5
|
||||||
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -2025,12 +2047,15 @@ INSERT INTO t2 SELECT i, i, i, i FROM t1;
|
|||||||
EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
EXPLAIN EXTENDED UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
EXPLAIN EXTENDED UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
||||||
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 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
Note 1003 update `test`.`t2` set `test`.`t2`.`d` = 10 where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
Note 1003 update `test`.`t2` set `test`.`t2`.`d` = 10 where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
||||||
# Status of EXPLAIN EXTENDED query
|
# Status of EXPLAIN EXTENDED query
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -2041,6 +2066,7 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
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 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
||||||
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -2077,12 +2103,15 @@ INSERT INTO t2 SELECT i, i, i, i FROM t1;
|
|||||||
EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
EXPLAIN UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 Using where; Using filesort
|
||||||
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
FLUSH STATUS;
|
FLUSH STATUS;
|
||||||
FLUSH TABLES;
|
FLUSH TABLES;
|
||||||
EXPLAIN EXTENDED UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
EXPLAIN EXTENDED UPDATE t2 SET d = 10 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
||||||
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 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
Note 1003 update `test`.`t2` set `test`.`t2`.`d` = 10 where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
Note 1003 update `test`.`t2` set `test`.`t2`.`d` = 10 where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
||||||
# Status of EXPLAIN EXTENDED query
|
# Status of EXPLAIN EXTENDED query
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
@ -2093,6 +2122,7 @@ EXPLAIN EXTENDED SELECT * FROM t2 WHERE b = 10 ORDER BY a, c LIMIT 5;
|
|||||||
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 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
1 SIMPLE t2 ALL NULL NULL NULL NULL 26 100.00 Using where; Using filesort
|
||||||
Warnings:
|
Warnings:
|
||||||
|
Note 1105 Cannot use key `a` part[1] for lookup: `test`.`t2`.`b` of type `char` = "10" of type `int`
|
||||||
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
Note 1003 select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2` where `test`.`t2`.`b` = 10 order by `test`.`t2`.`a`,`test`.`t2`.`c` limit 5
|
||||||
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
# Status of EXPLAIN EXTENDED "equivalent" SELECT query execution
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
|
@ -46,7 +46,7 @@ rmdir $ddir;
|
|||||||
|
|
||||||
# MDEV-28471 - mysql_install_db.exe fails with --innodb-page-size=64K
|
# MDEV-28471 - mysql_install_db.exe fails with --innodb-page-size=64K
|
||||||
--disable_result_log
|
--disable_result_log
|
||||||
exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R --innodb-page-size=64K --verbose
|
exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --password=foo -R --innodb-page-size=64K --verbose;
|
||||||
--enable_result_log
|
--enable_result_log
|
||||||
rmdir $ddir;
|
rmdir $ddir;
|
||||||
|
|
||||||
|
@ -1895,7 +1895,7 @@ SET DEFAULT ROLE aRole;
|
|||||||
SHOW GRANTS;
|
SHOW GRANTS;
|
||||||
Grants for root@localhost
|
Grants for root@localhost
|
||||||
GRANT `aRole` TO `root`@`localhost` WITH ADMIN OPTION
|
GRANT `aRole` TO `root`@`localhost` WITH ADMIN OPTION
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `root`@`localhost` WITH GRANT OPTION
|
||||||
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
|
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
|
||||||
GRANT USAGE ON *.* TO `aRole`
|
GRANT USAGE ON *.* TO `aRole`
|
||||||
SET DEFAULT ROLE `aRole` FOR `root`@`localhost`
|
SET DEFAULT ROLE `aRole` FOR `root`@`localhost`
|
||||||
@ -1903,7 +1903,7 @@ SET DEFAULT ROLE NONE;
|
|||||||
SHOW GRANTS;
|
SHOW GRANTS;
|
||||||
Grants for root@localhost
|
Grants for root@localhost
|
||||||
GRANT `aRole` TO `root`@`localhost` WITH ADMIN OPTION
|
GRANT `aRole` TO `root`@`localhost` WITH ADMIN OPTION
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `root`@`localhost` WITH GRANT OPTION
|
||||||
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
|
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION
|
||||||
GRANT USAGE ON *.* TO `aRole`
|
GRANT USAGE ON *.* TO `aRole`
|
||||||
DROP ROLE `aRole`;
|
DROP ROLE `aRole`;
|
||||||
|
@ -8,7 +8,7 @@ CREATE USER user_all@localhost;
|
|||||||
GRANT ALL PRIVILEGES ON *.* TO user_all@localhost WITH GRANT OPTION;
|
GRANT ALL PRIVILEGES ON *.* TO user_all@localhost WITH GRANT OPTION;
|
||||||
SHOW GRANTS FOR user_all@localhost;
|
SHOW GRANTS FOR user_all@localhost;
|
||||||
Grants for user_all@localhost
|
Grants for user_all@localhost
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `user_all`@`localhost` WITH GRANT OPTION
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `user_all`@`localhost` WITH GRANT OPTION
|
||||||
CREATE USER user_super@localhost;
|
CREATE USER user_super@localhost;
|
||||||
GRANT SUPER ON *.* TO user_super@localhost;
|
GRANT SUPER ON *.* TO user_super@localhost;
|
||||||
SHOW GRANTS FOR user_super@localhost;
|
SHOW GRANTS FOR user_super@localhost;
|
||||||
@ -56,7 +56,7 @@ FLUSH PRIVILEGES;
|
|||||||
#
|
#
|
||||||
SHOW GRANTS FOR user_all@localhost;
|
SHOW GRANTS FOR user_all@localhost;
|
||||||
Grants for user_all@localhost
|
Grants for user_all@localhost
|
||||||
GRANT ALL PRIVILEGES ON *.* TO `user_all`@`localhost` WITH GRANT OPTION
|
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, BINLOG MONITOR, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE, DELETE HISTORY, SET USER, FEDERATED ADMIN, CONNECTION ADMIN, READ_ONLY ADMIN, REPLICATION SLAVE ADMIN, REPLICATION MASTER ADMIN, BINLOG ADMIN, BINLOG REPLAY, SLAVE MONITOR ON *.* TO `user_all`@`localhost` WITH GRANT OPTION
|
||||||
#
|
#
|
||||||
# Should automatically get all new 10.5.2 priveleges that were splitted from SUPER
|
# Should automatically get all new 10.5.2 priveleges that were splitted from SUPER
|
||||||
#
|
#
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
--source include/have_log_bin.inc
|
--source include/have_log_bin.inc
|
||||||
--source include/have_binlog_format_row.inc
|
--source include/have_binlog_format_row.inc
|
||||||
|
--source include/have_normal_bzip.inc
|
||||||
|
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
--source include/have_log_bin.inc
|
--source include/have_log_bin.inc
|
||||||
--source include/have_binlog_format_statement.inc
|
--source include/have_binlog_format_statement.inc
|
||||||
|
--source include/have_normal_bzip.inc
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
# mysqlbinlog: compressed query event
|
# mysqlbinlog: compressed query event
|
||||||
|
@ -225,6 +225,7 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
Default flags for the regex library. Any combination of:
|
Default flags for the regex library. Any combination of:
|
||||||
DOTALL, DUPNAMES, EXTENDED, EXTENDED_MORE, EXTRA,
|
DOTALL, DUPNAMES, EXTENDED, EXTENDED_MORE, EXTRA,
|
||||||
MULTILINE, UNGREEDY
|
MULTILINE, UNGREEDY
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--default-storage-engine=name
|
--default-storage-engine=name
|
||||||
The default storage engine for new tables
|
The default storage engine for new tables
|
||||||
--default-time-zone=name
|
--default-time-zone=name
|
||||||
@ -500,12 +501,14 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
--log-disabled-statements=name
|
--log-disabled-statements=name
|
||||||
Don't log certain types of statements to general log. Any
|
Don't log certain types of statements to general log. Any
|
||||||
combination of: slave, sp
|
combination of: slave, sp
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--log-error[=name] Log errors to file (instead of stdout). If file name is
|
--log-error[=name] Log errors to file (instead of stdout). If file name is
|
||||||
not specified then 'datadir'/'log-basename'.err or the
|
not specified then 'datadir'/'log-basename'.err or the
|
||||||
'pid-file' path with extension .err is used
|
'pid-file' path with extension .err is used
|
||||||
--log-isam[=name] Log all MyISAM changes to file.
|
--log-isam[=name] Log all MyISAM changes to file.
|
||||||
--log-output=name How logs should be written. Any combination of: NONE,
|
--log-output=name How logs should be written. Any combination of: NONE,
|
||||||
FILE, TABLE
|
FILE, TABLE
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--log-queries-not-using-indexes
|
--log-queries-not-using-indexes
|
||||||
Log queries that are executed without benefit of any
|
Log queries that are executed without benefit of any
|
||||||
index to the slow log if it is open. Same as
|
index to the slow log if it is open. Same as
|
||||||
@ -524,15 +527,20 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
--log-slow-disabled-statements=name
|
--log-slow-disabled-statements=name
|
||||||
Don't log certain types of statements to slow log. Any
|
Don't log certain types of statements to slow log. Any
|
||||||
combination of: admin, call, slave, sp
|
combination of: admin, call, slave, sp
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--log-slow-filter=name
|
--log-slow-filter=name
|
||||||
Log only certain types of queries to the slow log. If
|
Log only certain types of queries to the slow log. If
|
||||||
variable empty alll kind of queries are logged. All
|
variable empty all kind of queries are logged. All types
|
||||||
types are bound by slow_query_time, except
|
are bound by slow_query_time, except 'not_using_index'
|
||||||
'not_using_index' which is always logged if enabled. Any
|
which is always logged if enabled. Any combination of:
|
||||||
combination of: admin, filesort, filesort_on_disk,
|
admin, filesort, filesort_on_disk,
|
||||||
filesort_priority_queue, full_join, full_scan,
|
filesort_priority_queue, full_join, full_scan,
|
||||||
not_using_index, query_cache, query_cache_miss, tmp_table,
|
not_using_index, query_cache, query_cache_miss, tmp_table,
|
||||||
tmp_table_on_disk
|
tmp_table_on_disk
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
|
--log-slow-max-warnings=#
|
||||||
|
Max numbers of warnings printed to slow query log per
|
||||||
|
statement
|
||||||
--log-slow-min-examined-row-limit=#
|
--log-slow-min-examined-row-limit=#
|
||||||
Don't write queries to slow log that examine fewer rows
|
Don't write queries to slow log that examine fewer rows
|
||||||
than that
|
than that
|
||||||
@ -560,7 +568,8 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
(Defaults to on; use --skip-log-slow-slave-statements to disable.)
|
(Defaults to on; use --skip-log-slow-slave-statements to disable.)
|
||||||
--log-slow-verbosity=name
|
--log-slow-verbosity=name
|
||||||
Verbosity level for the slow log. Any combination of:
|
Verbosity level for the slow log. Any combination of:
|
||||||
innodb, query_plan, explain, engine, full
|
innodb, query_plan, explain, engine, warnings, full
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--log-tc=name Path to transaction coordinator log (used for
|
--log-tc=name Path to transaction coordinator log (used for
|
||||||
transactions that affect more than one storage engine,
|
transactions that affect more than one storage engine,
|
||||||
when binary log is disabled).
|
when binary log is disabled).
|
||||||
@ -677,6 +686,7 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
Specifies how corrupted tables should be automatically
|
Specifies how corrupted tables should be automatically
|
||||||
repaired. Any combination of: DEFAULT, BACKUP, FORCE,
|
repaired. Any combination of: DEFAULT, BACKUP, FORCE,
|
||||||
QUICK, BACKUP_ALL, OFF
|
QUICK, BACKUP_ALL, OFF
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--myisam-repair-threads=#
|
--myisam-repair-threads=#
|
||||||
If larger than 1, when repairing a MyISAM table all
|
If larger than 1, when repairing a MyISAM table all
|
||||||
indexes will be created in parallel, with one thread per
|
indexes will be created in parallel, with one thread per
|
||||||
@ -705,6 +715,11 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
--net-write-timeout=#
|
--net-write-timeout=#
|
||||||
Number of seconds to wait for a block to be written to a
|
Number of seconds to wait for a block to be written to a
|
||||||
connection before aborting the write
|
connection before aborting the write
|
||||||
|
--note-verbosity=name
|
||||||
|
Verbosity level for note-warnings given to the user. See
|
||||||
|
also @@sql_notes.. Any combination of: basic,
|
||||||
|
unusable_keys, explain
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--old Use compatible behavior from previous MariaDB version.
|
--old Use compatible behavior from previous MariaDB version.
|
||||||
See also --old-mode
|
See also --old-mode
|
||||||
--old-mode=name Used to emulate old behavior from earlier MariaDB or
|
--old-mode=name Used to emulate old behavior from earlier MariaDB or
|
||||||
@ -713,6 +728,7 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
ZERO_DATE_TIME_CAST, UTF8_IS_UTF8MB3,
|
ZERO_DATE_TIME_CAST, UTF8_IS_UTF8MB3,
|
||||||
IGNORE_INDEX_ONLY_FOR_JOIN, COMPAT_5_1_CHECKSUM,
|
IGNORE_INDEX_ONLY_FOR_JOIN, COMPAT_5_1_CHECKSUM,
|
||||||
LOCK_ALTER_TABLE_COPY
|
LOCK_ALTER_TABLE_COPY
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--old-passwords Use old password encryption method (needed for 4.0 and
|
--old-passwords Use old password encryption method (needed for 4.0 and
|
||||||
older clients)
|
older clients)
|
||||||
--old-style-user-limits
|
--old-style-user-limits
|
||||||
@ -755,6 +771,10 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
--optimizer-max-sel-arg-weight=#
|
--optimizer-max-sel-arg-weight=#
|
||||||
The maximum weight of the SEL_ARG graph. Set to 0 for no
|
The maximum weight of the SEL_ARG graph. Set to 0 for no
|
||||||
limit
|
limit
|
||||||
|
--optimizer-max-sel-args=#
|
||||||
|
The maximum number of SEL_ARG objects created when
|
||||||
|
optimizing a range. If more objects would be needed, the
|
||||||
|
range will not be used by the optimizer.
|
||||||
--optimizer-prune-level=#
|
--optimizer-prune-level=#
|
||||||
Controls the heuristic(s) applied during query
|
Controls the heuristic(s) applied during query
|
||||||
optimization to prune less-promising partial plans from
|
optimization to prune less-promising partial plans from
|
||||||
@ -1070,6 +1090,8 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
--read-rnd-buffer-size=#
|
--read-rnd-buffer-size=#
|
||||||
When reading rows in sorted order after a sort, the rows
|
When reading rows in sorted order after a sort, the rows
|
||||||
are read through this buffer to avoid a disk seeks
|
are read through this buffer to avoid a disk seeks
|
||||||
|
--redirect-url=name URL of another server to redirect clients to. Empty
|
||||||
|
string means no redirection
|
||||||
--relay-log=name The location and name to use for relay logs.
|
--relay-log=name The location and name to use for relay logs.
|
||||||
--relay-log-index=name
|
--relay-log-index=name
|
||||||
The location and name to use for the file that keeps a
|
The location and name to use for the file that keeps a
|
||||||
@ -1363,6 +1385,7 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
variable is empty, no conversions are allowed and it is
|
variable is empty, no conversions are allowed and it is
|
||||||
expected that the types match exactly. Any combination
|
expected that the types match exactly. Any combination
|
||||||
of: ALL_LOSSY, ALL_NON_LOSSY
|
of: ALL_LOSSY, ALL_NON_LOSSY
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--slow-launch-time=#
|
--slow-launch-time=#
|
||||||
If creating the thread takes longer than this value (in
|
If creating the thread takes longer than this value (in
|
||||||
seconds), the Slow_launch_threads counter will be
|
seconds), the Slow_launch_threads counter will be
|
||||||
@ -1393,6 +1416,7 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH,
|
NO_ENGINE_SUBSTITUTION, PAD_CHAR_TO_FULL_LENGTH,
|
||||||
EMPTY_STRING_IS_NULL, SIMULTANEOUS_ASSIGNMENT,
|
EMPTY_STRING_IS_NULL, SIMULTANEOUS_ASSIGNMENT,
|
||||||
TIME_ROUND_FRACTIONAL
|
TIME_ROUND_FRACTIONAL
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--sql-safe-updates If set to 1, UPDATEs and DELETEs need either a key in the
|
--sql-safe-updates If set to 1, UPDATEs and DELETEs need either a key in the
|
||||||
WHERE clause, or a LIMIT clause, or else they will
|
WHERE clause, or a LIMIT clause, or else they will
|
||||||
aborted. Prevents the common mistake of accidentally
|
aborted. Prevents the common mistake of accidentally
|
||||||
@ -1502,6 +1526,7 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
--thread-stack=# The stack size for each thread
|
--thread-stack=# The stack size for each thread
|
||||||
--tls-version=name TLS protocol version for secure connections.. Any
|
--tls-version=name TLS protocol version for secure connections.. Any
|
||||||
combination of: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3
|
combination of: TLSv1.0, TLSv1.1, TLSv1.2, TLSv1.3
|
||||||
|
Use 'ALL' to set all combinations.
|
||||||
--tmp-disk-table-size=#
|
--tmp-disk-table-size=#
|
||||||
Max size for data for an internal temporary on-disk
|
Max size for data for an internal temporary on-disk
|
||||||
MyISAM or Aria table.
|
MyISAM or Aria table.
|
||||||
@ -1684,6 +1709,7 @@ log-slave-updates FALSE
|
|||||||
log-slow-admin-statements TRUE
|
log-slow-admin-statements TRUE
|
||||||
log-slow-disabled-statements sp
|
log-slow-disabled-statements sp
|
||||||
log-slow-filter admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
|
log-slow-filter admin,filesort,filesort_on_disk,filesort_priority_queue,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
|
||||||
|
log-slow-max-warnings 10
|
||||||
log-slow-min-examined-row-limit 0
|
log-slow-min-examined-row-limit 0
|
||||||
log-slow-query FALSE
|
log-slow-query FALSE
|
||||||
log-slow-query-time 10
|
log-slow-query-time 10
|
||||||
@ -1740,6 +1766,7 @@ net-buffer-length 16384
|
|||||||
net-read-timeout 30
|
net-read-timeout 30
|
||||||
net-retry-count 10
|
net-retry-count 10
|
||||||
net-write-timeout 60
|
net-write-timeout 60
|
||||||
|
note-verbosity basic,explain
|
||||||
old FALSE
|
old FALSE
|
||||||
old-mode UTF8_IS_UTF8MB3
|
old-mode UTF8_IS_UTF8MB3
|
||||||
old-passwords FALSE
|
old-passwords FALSE
|
||||||
@ -1753,6 +1780,7 @@ optimizer-key-copy-cost 0.015685
|
|||||||
optimizer-key-lookup-cost 0.435777
|
optimizer-key-lookup-cost 0.435777
|
||||||
optimizer-key-next-find-cost 0.082347
|
optimizer-key-next-find-cost 0.082347
|
||||||
optimizer-max-sel-arg-weight 32000
|
optimizer-max-sel-arg-weight 32000
|
||||||
|
optimizer-max-sel-args 16000
|
||||||
optimizer-prune-level 2
|
optimizer-prune-level 2
|
||||||
optimizer-row-copy-cost 0.060866
|
optimizer-row-copy-cost 0.060866
|
||||||
optimizer-row-lookup-cost 0.130839
|
optimizer-row-lookup-cost 0.130839
|
||||||
@ -1845,6 +1873,7 @@ read-binlog-speed-limit 0
|
|||||||
read-buffer-size 131072
|
read-buffer-size 131072
|
||||||
read-only FALSE
|
read-only FALSE
|
||||||
read-rnd-buffer-size 262144
|
read-rnd-buffer-size 262144
|
||||||
|
redirect-url
|
||||||
relay-log (No default value)
|
relay-log (No default value)
|
||||||
relay-log-index (No default value)
|
relay-log-index (No default value)
|
||||||
relay-log-info-file relay-log.info
|
relay-log-info-file relay-log.info
|
||||||
@ -1876,7 +1905,7 @@ secure-timestamp NO
|
|||||||
server-id 1
|
server-id 1
|
||||||
session-track-schema TRUE
|
session-track-schema TRUE
|
||||||
session-track-state-change FALSE
|
session-track-state-change FALSE
|
||||||
session-track-system-variables autocommit,character_set_client,character_set_connection,character_set_results,time_zone
|
session-track-system-variables autocommit,character_set_client,character_set_connection,character_set_results,redirect_url,time_zone
|
||||||
session-track-transaction-info OFF
|
session-track-transaction-info OFF
|
||||||
show-slave-auth-info FALSE
|
show-slave-auth-info FALSE
|
||||||
silent-startup FALSE
|
silent-startup FALSE
|
||||||
|
@ -3,24 +3,24 @@
|
|||||||
@@ -449,9 +449,9 @@
|
@@ -449,9 +449,9 @@
|
||||||
Table Checksum
|
Table Checksum
|
||||||
mysql.roles_mapping 2510045525
|
mysql.roles_mapping 2510045525
|
||||||
mysql.time_zone_transition 3895294076
|
mysql.time_zone_transition 3719776009
|
||||||
-mysql.plugin 1587119305
|
-mysql.plugin 1587119305
|
||||||
+mysql.plugin 2184891911
|
+mysql.plugin 2184891911
|
||||||
mysql.servers 2079085450
|
mysql.servers 2079085450
|
||||||
-mysql.func 3241572444
|
-mysql.func 3241572444
|
||||||
+mysql.func 310494789
|
+mysql.func 310494789
|
||||||
mysql.innodb_table_stats 347867921
|
mysql.innodb_table_stats 1285726777
|
||||||
mysql.table_stats 664320059
|
mysql.table_stats 2836905944
|
||||||
# Opps....
|
# Opps....
|
||||||
@@ -484,9 +484,9 @@
|
@@ -484,9 +484,9 @@
|
||||||
Table Checksum
|
Table Checksum
|
||||||
mysql.roles_mapping 2510045525
|
mysql.roles_mapping 2510045525
|
||||||
mysql.time_zone_transition 3895294076
|
mysql.time_zone_transition 3719776009
|
||||||
-mysql.plugin 1587119305
|
-mysql.plugin 1587119305
|
||||||
+mysql.plugin 2184891911
|
+mysql.plugin 2184891911
|
||||||
mysql.servers 2079085450
|
mysql.servers 2079085450
|
||||||
-mysql.func 3241572444
|
-mysql.func 3241572444
|
||||||
+mysql.func 310494789
|
+mysql.func 310494789
|
||||||
mysql.innodb_table_stats 347867921
|
mysql.innodb_table_stats 1285726777
|
||||||
mysql.table_stats 664320059
|
mysql.table_stats 2836905944
|
||||||
DROP FUNCTION IF EXISTS metaphon;
|
DROP FUNCTION IF EXISTS metaphon;
|
||||||
|
@ -96,29 +96,29 @@ USE mysql;
|
|||||||
LOCK TABLES `column_stats` WRITE;
|
LOCK TABLES `column_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
|
||||||
REPLACE INTO `column_stats` VALUES
|
REPLACE INTO `column_stats` VALUES
|
||||||
('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,4,'JSON_HB','{\"target_histogram_size\": 254, \"collected_at\": \"2022-01-07 07:07:00\", \"collected_by\": \"version\", \"histogram_hb\": [{\"start\": \"1\", \"size\": 0.340966921, \"ndv\": 1}, {\"start\": \"3\", \"size\": 0.328244275, \"ndv\": 1}, {\"start\": \"4\", \"size\": 0.328244275, \"ndv\": 1}, {\"start\": \"5\", \"end\": \"5\", \"size\": 0.002544529, \"ndv\": 1}]}');
|
('mysql','tz','Time_zone_id','1','6',0.0000,4.0000,78.8000,4,'JSON_HB','{\"target_histogram_size\": 254, \"collected_at\": \"2022-01-07 07:07:00\", \"collected_by\": \"version\", \"histogram_hb\": [{\"start\": \"1\", \"size\": 0.340101523, \"ndv\": 1}, {\"start\": \"3\", \"size\": 0.327411168, \"ndv\": 1}, {\"start\": \"4\", \"size\": 0.327411168, \"ndv\": 1}, {\"start\": \"5\", \"end\": \"6\", \"size\": 0.005076142, \"ndv\": 2}]}');
|
||||||
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
LOCK TABLES `index_stats` WRITE;
|
LOCK TABLES `index_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
|
||||||
REPLACE INTO `index_stats` VALUES
|
REPLACE INTO `index_stats` VALUES
|
||||||
('mysql','tz','PRIMARY',1,98.2500);
|
('mysql','tz','PRIMARY',1,78.8000);
|
||||||
/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
LOCK TABLES `table_stats` WRITE;
|
LOCK TABLES `table_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
|
||||||
REPLACE INTO `table_stats` VALUES
|
REPLACE INTO `table_stats` VALUES
|
||||||
('mysql','tz',393);
|
('mysql','tz',394);
|
||||||
/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
LOCK TABLES `innodb_index_stats` WRITE;
|
LOCK TABLES `innodb_index_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
|
||||||
REPLACE INTO `innodb_index_stats` VALUES
|
REPLACE INTO `innodb_index_stats` VALUES
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',5,1,'Time_zone_id'),
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',394,1,'Time_zone_id,Transition_time'),
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
|
||||||
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
|
||||||
@ -127,7 +127,7 @@ UNLOCK TABLES;
|
|||||||
LOCK TABLES `innodb_table_stats` WRITE;
|
LOCK TABLES `innodb_table_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
|
||||||
REPLACE INTO `innodb_table_stats` VALUES
|
REPLACE INTO `innodb_table_stats` VALUES
|
||||||
('mysql','tz','2019-12-31 21:00:00',393,1,0);
|
('mysql','tz','2019-12-31 21:00:00',394,1,0);
|
||||||
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
@ -140,7 +140,8 @@ REPLACE INTO `time_zone` VALUES
|
|||||||
(2,'N'),
|
(2,'N'),
|
||||||
(3,'N'),
|
(3,'N'),
|
||||||
(4,'Y'),
|
(4,'Y'),
|
||||||
(5,'N');
|
(5,'N'),
|
||||||
|
(6,'Y');
|
||||||
/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
@ -148,6 +149,7 @@ LOCK TABLES `time_zone_name` WRITE;
|
|||||||
/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
|
||||||
REPLACE INTO `time_zone_name` VALUES
|
REPLACE INTO `time_zone_name` VALUES
|
||||||
('Europe/Moscow',3),
|
('Europe/Moscow',3),
|
||||||
|
('India/Kolkata',6),
|
||||||
('Japan',5),
|
('Japan',5),
|
||||||
('leap/Europe/Moscow',4),
|
('leap/Europe/Moscow',4),
|
||||||
('MET',1),
|
('MET',1),
|
||||||
@ -159,6 +161,7 @@ UNLOCK TABLES;
|
|||||||
LOCK TABLES `time_zone_leap_second` WRITE;
|
LOCK TABLES `time_zone_leap_second` WRITE;
|
||||||
/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
|
||||||
REPLACE INTO `time_zone_leap_second` VALUES
|
REPLACE INTO `time_zone_leap_second` VALUES
|
||||||
|
(174834660,1),
|
||||||
(78796800,1),
|
(78796800,1),
|
||||||
(94694401,2),
|
(94694401,2),
|
||||||
(126230402,3),
|
(126230402,3),
|
||||||
@ -579,7 +582,8 @@ REPLACE INTO `time_zone_transition` VALUES
|
|||||||
(4,2108588422,8),
|
(4,2108588422,8),
|
||||||
(4,2121894022,9),
|
(4,2121894022,9),
|
||||||
(4,2140038022,8),
|
(4,2140038022,8),
|
||||||
(5,-1009875600,1);
|
(5,-1009875600,1),
|
||||||
|
(6,174834660,1);
|
||||||
/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
@ -616,7 +620,8 @@ REPLACE INTO `time_zone_transition_type` VALUES
|
|||||||
(4,10,10800,1,'EEST'),
|
(4,10,10800,1,'EEST'),
|
||||||
(4,11,7200,0,'EET'),
|
(4,11,7200,0,'EET'),
|
||||||
(5,0,32400,0,'CJT'),
|
(5,0,32400,0,'CJT'),
|
||||||
(5,1,32400,0,'JST');
|
(5,1,32400,0,'JST'),
|
||||||
|
(6,1,19800,0,'IST');
|
||||||
/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
@ -710,29 +715,29 @@ USE mysql;
|
|||||||
LOCK TABLES `column_stats` WRITE;
|
LOCK TABLES `column_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
|
||||||
REPLACE INTO `column_stats` VALUES
|
REPLACE INTO `column_stats` VALUES
|
||||||
('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,4,'JSON_HB','{\"target_histogram_size\": 254, \"collected_at\": \"2022-01-07 07:07:00\", \"collected_by\": \"version\", \"histogram_hb\": [{\"start\": \"1\", \"size\": 0.340966921, \"ndv\": 1}, {\"start\": \"3\", \"size\": 0.328244275, \"ndv\": 1}, {\"start\": \"4\", \"size\": 0.328244275, \"ndv\": 1}, {\"start\": \"5\", \"end\": \"5\", \"size\": 0.002544529, \"ndv\": 1}]}');
|
('mysql','tz','Time_zone_id','1','6',0.0000,4.0000,78.8000,4,'JSON_HB','{\"target_histogram_size\": 254, \"collected_at\": \"2022-01-07 07:07:00\", \"collected_by\": \"version\", \"histogram_hb\": [{\"start\": \"1\", \"size\": 0.340101523, \"ndv\": 1}, {\"start\": \"3\", \"size\": 0.327411168, \"ndv\": 1}, {\"start\": \"4\", \"size\": 0.327411168, \"ndv\": 1}, {\"start\": \"5\", \"end\": \"6\", \"size\": 0.005076142, \"ndv\": 2}]}');
|
||||||
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
LOCK TABLES `index_stats` WRITE;
|
LOCK TABLES `index_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
|
||||||
REPLACE INTO `index_stats` VALUES
|
REPLACE INTO `index_stats` VALUES
|
||||||
('mysql','tz','PRIMARY',1,98.2500);
|
('mysql','tz','PRIMARY',1,78.8000);
|
||||||
/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
LOCK TABLES `table_stats` WRITE;
|
LOCK TABLES `table_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
|
||||||
REPLACE INTO `table_stats` VALUES
|
REPLACE INTO `table_stats` VALUES
|
||||||
('mysql','tz',393);
|
('mysql','tz',394);
|
||||||
/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
LOCK TABLES `innodb_index_stats` WRITE;
|
LOCK TABLES `innodb_index_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
|
||||||
REPLACE INTO `innodb_index_stats` VALUES
|
REPLACE INTO `innodb_index_stats` VALUES
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',5,1,'Time_zone_id'),
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',394,1,'Time_zone_id,Transition_time'),
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
|
||||||
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
|
||||||
@ -741,7 +746,7 @@ UNLOCK TABLES;
|
|||||||
LOCK TABLES `innodb_table_stats` WRITE;
|
LOCK TABLES `innodb_table_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
|
||||||
REPLACE INTO `innodb_table_stats` VALUES
|
REPLACE INTO `innodb_table_stats` VALUES
|
||||||
('mysql','tz','2019-12-31 21:00:00',393,1,0);
|
('mysql','tz','2019-12-31 21:00:00',394,1,0);
|
||||||
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
@ -754,7 +759,8 @@ REPLACE INTO `time_zone` VALUES
|
|||||||
(2,'N'),
|
(2,'N'),
|
||||||
(3,'N'),
|
(3,'N'),
|
||||||
(4,'Y'),
|
(4,'Y'),
|
||||||
(5,'N');
|
(5,'N'),
|
||||||
|
(6,'Y');
|
||||||
/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
@ -762,6 +768,7 @@ LOCK TABLES `time_zone_name` WRITE;
|
|||||||
/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
|
||||||
REPLACE INTO `time_zone_name` VALUES
|
REPLACE INTO `time_zone_name` VALUES
|
||||||
('Europe/Moscow',3),
|
('Europe/Moscow',3),
|
||||||
|
('India/Kolkata',6),
|
||||||
('Japan',5),
|
('Japan',5),
|
||||||
('leap/Europe/Moscow',4),
|
('leap/Europe/Moscow',4),
|
||||||
('MET',1),
|
('MET',1),
|
||||||
@ -773,6 +780,7 @@ UNLOCK TABLES;
|
|||||||
LOCK TABLES `time_zone_leap_second` WRITE;
|
LOCK TABLES `time_zone_leap_second` WRITE;
|
||||||
/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
|
||||||
REPLACE INTO `time_zone_leap_second` VALUES
|
REPLACE INTO `time_zone_leap_second` VALUES
|
||||||
|
(174834660,1),
|
||||||
(78796800,1),
|
(78796800,1),
|
||||||
(94694401,2),
|
(94694401,2),
|
||||||
(126230402,3),
|
(126230402,3),
|
||||||
@ -1193,7 +1201,8 @@ REPLACE INTO `time_zone_transition` VALUES
|
|||||||
(4,2108588422,8),
|
(4,2108588422,8),
|
||||||
(4,2121894022,9),
|
(4,2121894022,9),
|
||||||
(4,2140038022,8),
|
(4,2140038022,8),
|
||||||
(5,-1009875600,1);
|
(5,-1009875600,1),
|
||||||
|
(6,174834660,1);
|
||||||
/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
@ -1230,7 +1239,8 @@ REPLACE INTO `time_zone_transition_type` VALUES
|
|||||||
(4,10,10800,1,'EEST'),
|
(4,10,10800,1,'EEST'),
|
||||||
(4,11,7200,0,'EET'),
|
(4,11,7200,0,'EET'),
|
||||||
(5,0,32400,0,'CJT'),
|
(5,0,32400,0,'CJT'),
|
||||||
(5,1,32400,0,'JST');
|
(5,1,32400,0,'JST'),
|
||||||
|
(6,1,19800,0,'IST');
|
||||||
/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
@ -1301,29 +1311,29 @@ USE mysql;
|
|||||||
LOCK TABLES `column_stats` WRITE;
|
LOCK TABLES `column_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `column_stats` DISABLE KEYS */;
|
||||||
INSERT IGNORE INTO `column_stats` VALUES
|
INSERT IGNORE INTO `column_stats` VALUES
|
||||||
('mysql','tz','Time_zone_id','1','5',0.0000,4.0000,98.2500,4,'JSON_HB','{\"target_histogram_size\": 254, \"collected_at\": \"2022-01-07 07:07:00\", \"collected_by\": \"version\", \"histogram_hb\": [{\"start\": \"1\", \"size\": 0.340966921, \"ndv\": 1}, {\"start\": \"3\", \"size\": 0.328244275, \"ndv\": 1}, {\"start\": \"4\", \"size\": 0.328244275, \"ndv\": 1}, {\"start\": \"5\", \"end\": \"5\", \"size\": 0.002544529, \"ndv\": 1}]}');
|
('mysql','tz','Time_zone_id','1','6',0.0000,4.0000,78.8000,4,'JSON_HB','{\"target_histogram_size\": 254, \"collected_at\": \"2022-01-07 07:07:00\", \"collected_by\": \"version\", \"histogram_hb\": [{\"start\": \"1\", \"size\": 0.340101523, \"ndv\": 1}, {\"start\": \"3\", \"size\": 0.327411168, \"ndv\": 1}, {\"start\": \"4\", \"size\": 0.327411168, \"ndv\": 1}, {\"start\": \"5\", \"end\": \"6\", \"size\": 0.005076142, \"ndv\": 2}]}');
|
||||||
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `column_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
LOCK TABLES `index_stats` WRITE;
|
LOCK TABLES `index_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `index_stats` DISABLE KEYS */;
|
||||||
INSERT IGNORE INTO `index_stats` VALUES
|
INSERT IGNORE INTO `index_stats` VALUES
|
||||||
('mysql','tz','PRIMARY',1,98.2500);
|
('mysql','tz','PRIMARY',1,78.8000);
|
||||||
/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `index_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
LOCK TABLES `table_stats` WRITE;
|
LOCK TABLES `table_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `table_stats` DISABLE KEYS */;
|
||||||
INSERT IGNORE INTO `table_stats` VALUES
|
INSERT IGNORE INTO `table_stats` VALUES
|
||||||
('mysql','tz',393);
|
('mysql','tz',394);
|
||||||
/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `table_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
LOCK TABLES `innodb_index_stats` WRITE;
|
LOCK TABLES `innodb_index_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_index_stats` DISABLE KEYS */;
|
||||||
INSERT IGNORE INTO `innodb_index_stats` VALUES
|
INSERT IGNORE INTO `innodb_index_stats` VALUES
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',4,1,'Time_zone_id'),
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx01',5,1,'Time_zone_id'),
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',393,1,'Time_zone_id,Transition_time'),
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_diff_pfx02',394,1,'Time_zone_id,Transition_time'),
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','n_leaf_pages',1,NULL,'Number of leaf pages in the index'),
|
||||||
('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
|
('mysql','tz','PRIMARY','2019-12-31 21:00:00','size',1,NULL,'Number of pages in the index');
|
||||||
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_index_stats` ENABLE KEYS */;
|
||||||
@ -1332,7 +1342,7 @@ UNLOCK TABLES;
|
|||||||
LOCK TABLES `innodb_table_stats` WRITE;
|
LOCK TABLES `innodb_table_stats` WRITE;
|
||||||
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_table_stats` DISABLE KEYS */;
|
||||||
INSERT IGNORE INTO `innodb_table_stats` VALUES
|
INSERT IGNORE INTO `innodb_table_stats` VALUES
|
||||||
('mysql','tz','2019-12-31 21:00:00',393,1,0);
|
('mysql','tz','2019-12-31 21:00:00',394,1,0);
|
||||||
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `innodb_table_stats` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
@ -1345,7 +1355,8 @@ INSERT IGNORE INTO `time_zone` VALUES
|
|||||||
(2,'N'),
|
(2,'N'),
|
||||||
(3,'N'),
|
(3,'N'),
|
||||||
(4,'Y'),
|
(4,'Y'),
|
||||||
(5,'N');
|
(5,'N'),
|
||||||
|
(6,'Y');
|
||||||
/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
@ -1353,6 +1364,7 @@ LOCK TABLES `time_zone_name` WRITE;
|
|||||||
/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_name` DISABLE KEYS */;
|
||||||
INSERT IGNORE INTO `time_zone_name` VALUES
|
INSERT IGNORE INTO `time_zone_name` VALUES
|
||||||
('Europe/Moscow',3),
|
('Europe/Moscow',3),
|
||||||
|
('India/Kolkata',6),
|
||||||
('Japan',5),
|
('Japan',5),
|
||||||
('leap/Europe/Moscow',4),
|
('leap/Europe/Moscow',4),
|
||||||
('MET',1),
|
('MET',1),
|
||||||
@ -1364,6 +1376,7 @@ UNLOCK TABLES;
|
|||||||
LOCK TABLES `time_zone_leap_second` WRITE;
|
LOCK TABLES `time_zone_leap_second` WRITE;
|
||||||
/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_leap_second` DISABLE KEYS */;
|
||||||
INSERT IGNORE INTO `time_zone_leap_second` VALUES
|
INSERT IGNORE INTO `time_zone_leap_second` VALUES
|
||||||
|
(174834660,1),
|
||||||
(78796800,1),
|
(78796800,1),
|
||||||
(94694401,2),
|
(94694401,2),
|
||||||
(126230402,3),
|
(126230402,3),
|
||||||
@ -1784,7 +1797,8 @@ INSERT IGNORE INTO `time_zone_transition` VALUES
|
|||||||
(4,2108588422,8),
|
(4,2108588422,8),
|
||||||
(4,2121894022,9),
|
(4,2121894022,9),
|
||||||
(4,2140038022,8),
|
(4,2140038022,8),
|
||||||
(5,-1009875600,1);
|
(5,-1009875600,1),
|
||||||
|
(6,174834660,1);
|
||||||
/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_transition` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
@ -1821,7 +1835,8 @@ INSERT IGNORE INTO `time_zone_transition_type` VALUES
|
|||||||
(4,10,10800,1,'EEST'),
|
(4,10,10800,1,'EEST'),
|
||||||
(4,11,7200,0,'EET'),
|
(4,11,7200,0,'EET'),
|
||||||
(5,0,32400,0,'CJT'),
|
(5,0,32400,0,'CJT'),
|
||||||
(5,1,32400,0,'JST');
|
(5,1,32400,0,'JST'),
|
||||||
|
(6,1,19800,0,'IST');
|
||||||
/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `time_zone_transition_type` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
@ -1845,12 +1860,12 @@ CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
|
|||||||
mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
|
mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
|
||||||
Table Checksum
|
Table Checksum
|
||||||
mysql.roles_mapping 2510045525
|
mysql.roles_mapping 2510045525
|
||||||
mysql.time_zone_transition 3895294076
|
mysql.time_zone_transition 3719776009
|
||||||
mysql.plugin 1587119305
|
mysql.plugin 1587119305
|
||||||
mysql.servers 2079085450
|
mysql.servers 2079085450
|
||||||
mysql.func 3241572444
|
mysql.func 3241572444
|
||||||
mysql.innodb_table_stats 347867921
|
mysql.innodb_table_stats 1285726777
|
||||||
mysql.table_stats 664320059
|
mysql.table_stats 2836905944
|
||||||
# Opps....
|
# Opps....
|
||||||
CREATE USER mariadb_test_restore IDENTIFIED BY 'getitback';
|
CREATE USER mariadb_test_restore IDENTIFIED BY 'getitback';
|
||||||
GRANT ALL ON *.* TO mariadb_test_restore WITH GRANT OPTION;
|
GRANT ALL ON *.* TO mariadb_test_restore WITH GRANT OPTION;
|
||||||
@ -1875,17 +1890,17 @@ Host User Priv
|
|||||||
localhost mariadb.sys {"access":0,"version_id":VERSION,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"password_lifetime":-1,"default_role":""}
|
localhost mariadb.sys {"access":0,"version_id":VERSION,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"password_lifetime":-1,"default_role":""}
|
||||||
role_1 {"access":16384,"version_id":VERSION,"is_role":true}
|
role_1 {"access":16384,"version_id":VERSION,"is_role":true}
|
||||||
role_2 {"access":0,"version_id":VERSION,"is_role":true}
|
role_2 {"access":0,"version_id":VERSION,"is_role":true}
|
||||||
localhost root {"access":549755813887,"version_id":VERSION,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":""}
|
localhost root {"access":1099511627775,"version_id":VERSION,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":""}
|
||||||
CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
|
CHECKSUM TABLE mysql.roles_mapping, mysql.time_zone_transition, mysql.plugin,
|
||||||
mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
|
mysql.servers, mysql.func, mysql.innodb_table_stats, mysql.table_stats;
|
||||||
Table Checksum
|
Table Checksum
|
||||||
mysql.roles_mapping 2510045525
|
mysql.roles_mapping 2510045525
|
||||||
mysql.time_zone_transition 3895294076
|
mysql.time_zone_transition 3719776009
|
||||||
mysql.plugin 1587119305
|
mysql.plugin 1587119305
|
||||||
mysql.servers 2079085450
|
mysql.servers 2079085450
|
||||||
mysql.func 3241572444
|
mysql.func 3241572444
|
||||||
mysql.innodb_table_stats 347867921
|
mysql.innodb_table_stats 1285726777
|
||||||
mysql.table_stats 664320059
|
mysql.table_stats 2836905944
|
||||||
DROP FUNCTION IF EXISTS metaphon;
|
DROP FUNCTION IF EXISTS metaphon;
|
||||||
DROP SERVER s1;
|
DROP SERVER s1;
|
||||||
DELETE FROM mysql.column_stats WHERE db_name='mysql' and table_name in ('tz', 'gtid_slave_pos');
|
DELETE FROM mysql.column_stats WHERE db_name='mysql' and table_name in ('tz', 'gtid_slave_pos');
|
||||||
|
@ -3941,6 +3941,8 @@ use test;
|
|||||||
create database mysqldump_test_db;
|
create database mysqldump_test_db;
|
||||||
grant all privileges on mysqldump_test_db.* to user1;
|
grant all privileges on mysqldump_test_db.* to user1;
|
||||||
grant all privileges on mysqldump_test_db.* to user2;
|
grant all privileges on mysqldump_test_db.* to user2;
|
||||||
|
revoke SHOW CREATE ROUTINE on mysqldump_test_db.* from user1;
|
||||||
|
revoke SHOW CREATE ROUTINE on mysqldump_test_db.* from user2;
|
||||||
connect user27293,localhost,user1,,mysqldump_test_db,$MASTER_MYPORT,$MASTER_MYSOCK;
|
connect user27293,localhost,user1,,mysqldump_test_db,$MASTER_MYPORT,$MASTER_MYSOCK;
|
||||||
connection user27293;
|
connection user27293;
|
||||||
create procedure mysqldump_test_db.sp1() select 'hello';
|
create procedure mysqldump_test_db.sp1() select 'hello';
|
||||||
@ -5179,6 +5181,7 @@ END
|
|||||||
# Test to check 'Insufficient privileges' error.
|
# Test to check 'Insufficient privileges' error.
|
||||||
|
|
||||||
GRANT ALL PRIVILEGES ON BUG52792.* TO user1;
|
GRANT ALL PRIVILEGES ON BUG52792.* TO user1;
|
||||||
|
REVOKE SHOW CREATE ROUTINE ON BUG52792.* FROM user1;
|
||||||
connect conn_1, localhost, user1, , BUG52792, $MASTER_MYPORT, $MASTER_MYSOCK;
|
connect conn_1, localhost, user1, , BUG52792, $MASTER_MYPORT, $MASTER_MYSOCK;
|
||||||
connection conn_1;
|
connection conn_1;
|
||||||
# Running 'replace_regex on timestamp'
|
# Running 'replace_regex on timestamp'
|
||||||
@ -5399,15 +5402,15 @@ slow_log CREATE TABLE `slow_log` (
|
|||||||
`user_host` mediumtext NOT NULL,
|
`user_host` mediumtext NOT NULL,
|
||||||
`query_time` time(6) NOT NULL,
|
`query_time` time(6) NOT NULL,
|
||||||
`lock_time` time(6) NOT NULL,
|
`lock_time` time(6) NOT NULL,
|
||||||
`rows_sent` int(11) NOT NULL,
|
`rows_sent` bigint(20) unsigned NOT NULL,
|
||||||
`rows_examined` int(11) NOT NULL,
|
`rows_examined` bigint(20) unsigned NOT NULL,
|
||||||
`db` varchar(512) NOT NULL,
|
`db` varchar(512) NOT NULL,
|
||||||
`last_insert_id` int(11) NOT NULL,
|
`last_insert_id` int(11) NOT NULL,
|
||||||
`insert_id` int(11) NOT NULL,
|
`insert_id` int(11) NOT NULL,
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
`sql_text` mediumtext NOT NULL,
|
`sql_text` mediumtext NOT NULL,
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
`rows_affected` int(11) NOT NULL
|
`rows_affected` bigint(20) unsigned NOT NULL
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log'
|
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log'
|
||||||
SET @@global.log_output= @old_log_output_state;
|
SET @@global.log_output= @old_log_output_state;
|
||||||
SET @@global.slow_query_log= @old_slow_query_log_state;
|
SET @@global.slow_query_log= @old_slow_query_log_state;
|
||||||
@ -5890,15 +5893,15 @@ CREATE TABLE IF NOT EXISTS `slow_log` (
|
|||||||
`user_host` mediumtext NOT NULL,
|
`user_host` mediumtext NOT NULL,
|
||||||
`query_time` time(6) NOT NULL,
|
`query_time` time(6) NOT NULL,
|
||||||
`lock_time` time(6) NOT NULL,
|
`lock_time` time(6) NOT NULL,
|
||||||
`rows_sent` int(11) NOT NULL,
|
`rows_sent` bigint(20) unsigned NOT NULL,
|
||||||
`rows_examined` int(11) NOT NULL,
|
`rows_examined` bigint(20) unsigned NOT NULL,
|
||||||
`db` varchar(512) NOT NULL,
|
`db` varchar(512) NOT NULL,
|
||||||
`last_insert_id` int(11) NOT NULL,
|
`last_insert_id` int(11) NOT NULL,
|
||||||
`insert_id` int(11) NOT NULL,
|
`insert_id` int(11) NOT NULL,
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
`sql_text` mediumtext NOT NULL,
|
`sql_text` mediumtext NOT NULL,
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
`rows_affected` int(11) NOT NULL
|
`rows_affected` bigint(20) unsigned NOT NULL
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log';
|
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log';
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `innodb_index_stats`;
|
DROP TABLE IF EXISTS `innodb_index_stats`;
|
||||||
@ -5985,15 +5988,15 @@ CREATE TABLE IF NOT EXISTS `slow_log` (
|
|||||||
`user_host` mediumtext NOT NULL,
|
`user_host` mediumtext NOT NULL,
|
||||||
`query_time` time(6) NOT NULL,
|
`query_time` time(6) NOT NULL,
|
||||||
`lock_time` time(6) NOT NULL,
|
`lock_time` time(6) NOT NULL,
|
||||||
`rows_sent` int(11) NOT NULL,
|
`rows_sent` bigint(20) unsigned NOT NULL,
|
||||||
`rows_examined` int(11) NOT NULL,
|
`rows_examined` bigint(20) unsigned NOT NULL,
|
||||||
`db` varchar(512) NOT NULL,
|
`db` varchar(512) NOT NULL,
|
||||||
`last_insert_id` int(11) NOT NULL,
|
`last_insert_id` int(11) NOT NULL,
|
||||||
`insert_id` int(11) NOT NULL,
|
`insert_id` int(11) NOT NULL,
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
`sql_text` mediumtext NOT NULL,
|
`sql_text` mediumtext NOT NULL,
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
`rows_affected` int(11) NOT NULL
|
`rows_affected` bigint(20) unsigned NOT NULL
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log';
|
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log';
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `innodb_index_stats`;
|
DROP TABLE IF EXISTS `innodb_index_stats`;
|
||||||
@ -6090,15 +6093,15 @@ CREATE TABLE IF NOT EXISTS `slow_log` (
|
|||||||
`user_host` mediumtext NOT NULL,
|
`user_host` mediumtext NOT NULL,
|
||||||
`query_time` time(6) NOT NULL,
|
`query_time` time(6) NOT NULL,
|
||||||
`lock_time` time(6) NOT NULL,
|
`lock_time` time(6) NOT NULL,
|
||||||
`rows_sent` int(11) NOT NULL,
|
`rows_sent` bigint(20) unsigned NOT NULL,
|
||||||
`rows_examined` int(11) NOT NULL,
|
`rows_examined` bigint(20) unsigned NOT NULL,
|
||||||
`db` varchar(512) NOT NULL,
|
`db` varchar(512) NOT NULL,
|
||||||
`last_insert_id` int(11) NOT NULL,
|
`last_insert_id` int(11) NOT NULL,
|
||||||
`insert_id` int(11) NOT NULL,
|
`insert_id` int(11) NOT NULL,
|
||||||
`server_id` int(10) unsigned NOT NULL,
|
`server_id` int(10) unsigned NOT NULL,
|
||||||
`sql_text` mediumtext NOT NULL,
|
`sql_text` mediumtext NOT NULL,
|
||||||
`thread_id` bigint(21) unsigned NOT NULL,
|
`thread_id` bigint(21) unsigned NOT NULL,
|
||||||
`rows_affected` int(11) NOT NULL
|
`rows_affected` bigint(20) unsigned NOT NULL
|
||||||
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log';
|
) ENGINE=CSV DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci COMMENT='Slow log';
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
DROP TABLE IF EXISTS `innodb_index_stats`;
|
DROP TABLE IF EXISTS `innodb_index_stats`;
|
||||||
@ -6550,15 +6553,15 @@ DROP TABLE IF EXISTS mysql.column_stats;
|
|||||||
<field Field="user_host" Type="mediumtext" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="user_host" Type="mediumtext" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="query_time" Type="time(6)" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="query_time" Type="time(6)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="lock_time" Type="time(6)" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="lock_time" Type="time(6)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="rows_sent" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="rows_sent" Type="bigint(20) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="rows_examined" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="rows_examined" Type="bigint(20) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="db" Type="varchar(512)" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="db" Type="varchar(512)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="last_insert_id" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="last_insert_id" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="insert_id" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="insert_id" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="server_id" Type="int(10) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="server_id" Type="int(10) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="sql_text" Type="mediumtext" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="sql_text" Type="mediumtext" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="thread_id" Type="bigint(21) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="thread_id" Type="bigint(21) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<field Field="rows_affected" Type="int(11)" Null="NO" Key="" Extra="" Comment="" />
|
<field Field="rows_affected" Type="bigint(20) unsigned" Null="NO" Key="" Extra="" Comment="" />
|
||||||
<options Name="slow_log" Engine="CSV" Version="10" Row_format="Dynamic" Rows="2" Avg_row_length="0" Data_length="0" Max_data_length="0" Index_length="0" Data_free="0" Collation="utf8mb3_general_ci" Create_options="" Comment="Slow log" Max_index_length="0" Temporary="N" />
|
<options Name="slow_log" Engine="CSV" Version="10" Row_format="Dynamic" Rows="2" Avg_row_length="0" Data_length="0" Max_data_length="0" Index_length="0" Data_free="0" Collation="utf8mb3_general_ci" Create_options="" Comment="Slow log" Max_index_length="0" Temporary="N" />
|
||||||
</table_structure>
|
</table_structure>
|
||||||
|
|
||||||
|
@ -1602,6 +1602,8 @@ create database mysqldump_test_db;
|
|||||||
|
|
||||||
grant all privileges on mysqldump_test_db.* to user1;
|
grant all privileges on mysqldump_test_db.* to user1;
|
||||||
grant all privileges on mysqldump_test_db.* to user2;
|
grant all privileges on mysqldump_test_db.* to user2;
|
||||||
|
revoke SHOW CREATE ROUTINE on mysqldump_test_db.* from user1;
|
||||||
|
revoke SHOW CREATE ROUTINE on mysqldump_test_db.* from user2;
|
||||||
|
|
||||||
connect (user27293,localhost,user1,,mysqldump_test_db,$MASTER_MYPORT,$MASTER_MYSOCK);
|
connect (user27293,localhost,user1,,mysqldump_test_db,$MASTER_MYPORT,$MASTER_MYSOCK);
|
||||||
connection user27293;
|
connection user27293;
|
||||||
@ -2334,6 +2336,7 @@ CREATE VIEW v2 AS SELECT * FROM t2;
|
|||||||
--echo
|
--echo
|
||||||
|
|
||||||
GRANT ALL PRIVILEGES ON BUG52792.* TO user1;
|
GRANT ALL PRIVILEGES ON BUG52792.* TO user1;
|
||||||
|
REVOKE SHOW CREATE ROUTINE ON BUG52792.* FROM user1;
|
||||||
|
|
||||||
connect (conn_1, localhost, user1, , BUG52792, $MASTER_MYPORT, $MASTER_MYSOCK);
|
connect (conn_1, localhost, user1, , BUG52792, $MASTER_MYPORT, $MASTER_MYSOCK);
|
||||||
connection conn_1;
|
connection conn_1;
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
# an additional util connection and other statistics data
|
# an additional util connection and other statistics data
|
||||||
-- source include/no_view_protocol.inc
|
-- source include/no_view_protocol.inc
|
||||||
|
|
||||||
--source include/one_thread_per_connection.inc
|
|
||||||
#
|
#
|
||||||
# Test the --thread-handler=no-threads option
|
# Test the --thread-handler=no-threads option
|
||||||
#
|
#
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
drop table if exists t1,t2;
|
drop table if exists t1,t2;
|
||||||
|
set @@note_verbosity=replace(@@note_verbosity,"explain","");
|
||||||
create table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
|
create table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
|
||||||
insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6);
|
insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6);
|
||||||
Warnings:
|
Warnings:
|
||||||
@ -475,3 +476,5 @@ INSERT INTO t1 VALUES ('9','k'),(NULL,'r');
|
|||||||
SELECT * FROM t1 WHERE (f3 = 83) OR (f10 = 'z' AND f3 IS NULL);
|
SELECT * FROM t1 WHERE (f3 = 83) OR (f10 = 'z' AND f3 IS NULL);
|
||||||
f3 f10
|
f3 f10
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
## end of 10.6 tests
|
||||||
|
set @@note_verbosity=default;
|
||||||
|
@ -5,6 +5,9 @@
|
|||||||
drop table if exists t1,t2;
|
drop table if exists t1,t2;
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
|
|
||||||
|
# Disable wrong key warnings for this test (to test @@note_verbosity usage)
|
||||||
|
set @@note_verbosity=replace(@@note_verbosity,"explain","");
|
||||||
|
|
||||||
create table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
|
create table t1 (a int, b int not null,unique key (a,b),index(b)) engine=myisam;
|
||||||
insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6);
|
insert ignore into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(null,7),(9,9),(8,8),(7,7),(null,9),(null,9),(6,6);
|
||||||
explain select * from t1 where a is null;
|
explain select * from t1 where a is null;
|
||||||
@ -288,3 +291,6 @@ INSERT INTO t1 VALUES ('9','k'),(NULL,'r');
|
|||||||
SELECT * FROM t1 WHERE (f3 = 83) OR (f10 = 'z' AND f3 IS NULL);
|
SELECT * FROM t1 WHERE (f3 = 83) OR (f10 = 'z' AND f3 IS NULL);
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo ## end of 10.6 tests
|
||||||
|
|
||||||
|
set @@note_verbosity=default;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user