1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge branch '10.5' into bb-10.6-release

This commit is contained in:
Oleksandr Byelkin
2022-08-03 10:47:52 +02:00
449 changed files with 6842 additions and 2256 deletions

View File

@ -113,7 +113,8 @@ MACRO (MYSQL_CHECK_SSL)
)
IF(NOT OPENSSL_ROOT_DIR)
IF(WITH_SSL_PATH)
SET(OPENSSL_ROOT_DIR ${WITH_SSL_PATH})
# workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/22945
SET(OPENSSL_ROOT_DIR ${WITH_SSL_PATH} ${WITH_SSL_PATH}/lib64)
ENDIF()
ENDIF()
FIND_PACKAGE(OpenSSL)

View File

@ -581,6 +581,7 @@ datafile_read(datafile_cur_t *cursor)
Check to see if a file exists.
Takes name of the file to check.
@return true if file exists. */
static
bool
file_exists(const char *filename)
{
@ -1482,14 +1483,14 @@ bool backup_start(CorruptedPages &corrupted_pages)
if (!write_galera_info(mysql_connection)) {
return(false);
}
// copied from xtrabackup. what is it needed for here?
write_current_binlog_file(mysql_connection);
}
bool with_binlogs = opt_binlog_info == BINLOG_INFO_ON;
if (opt_binlog_info == BINLOG_INFO_ON) {
if (with_binlogs || opt_galera_info) {
if (!write_current_binlog_file(mysql_connection, with_binlogs)) {
return(false);
}
lock_binlog_maybe(mysql_connection);
write_binlog_info(mysql_connection);
}
if (have_flush_engine_logs && !opt_no_lock) {
@ -1525,33 +1526,13 @@ void backup_release()
static const char *default_buffer_pool_file = "ib_buffer_pool";
static
const char * get_buffer_pool_filename(size_t *length)
{
/* If mariabackup is run for Galera, then the file
name is changed to the default so that the receiving
node can find this file and rename it according to its
settings, otherwise we keep the original file name: */
size_t dir_length = 0;
const char *dst_name = default_buffer_pool_file;
if (!opt_galera_info) {
dir_length = dirname_length(buffer_pool_filename);
dst_name = buffer_pool_filename + dir_length;
}
if (length) {
*length=dir_length;
}
return dst_name;
}
/** Finish after backup_start() and backup_release() */
bool backup_finish()
{
/* Copy buffer pool dump or LRU dump */
if (!opt_rsync) {
if (!opt_rsync && opt_galera_info) {
if (buffer_pool_filename && file_exists(buffer_pool_filename)) {
const char *dst_name = get_buffer_pool_filename(NULL);
copy_file(ds_data, buffer_pool_filename, dst_name, 0);
copy_file(ds_data, buffer_pool_filename, default_buffer_pool_file, 0);
}
if (file_exists("ib_lru_dump")) {
copy_file(ds_data, "ib_lru_dump", "ib_lru_dump", 0);
@ -1601,6 +1582,7 @@ ibx_copy_incremental_over_full()
char path[FN_REFLEN];
int i;
DBUG_ASSERT(!opt_galera_info);
datadir_node_init(&node);
/* If we were applying an incremental change set, we need to make
@ -1637,19 +1619,6 @@ ibx_copy_incremental_over_full()
if (!(ret = backup_files_from_datadir(xtrabackup_incremental_dir)))
goto cleanup;
/* copy buffer pool dump */
if (innobase_buffer_pool_filename) {
const char *src_name = get_buffer_pool_filename(NULL);
snprintf(path, sizeof(path), "%s/%s",
xtrabackup_incremental_dir,
src_name);
if (file_exists(path)) {
copy_file(ds_data, path, src_name, 0);
}
}
/* copy supplementary files */
for (i = 0; sup_files[i]; i++) {
@ -1893,14 +1862,6 @@ copy_back()
datadir_node_init(&node);
/* If mariabackup is run for Galera, then the file
name is changed to the default so that the receiving
node can find this file and rename it according to its
settings, otherwise we keep the original file name: */
size_t dir_length;
const char *src_buffer_pool;
src_buffer_pool = get_buffer_pool_filename(&dir_length);
while (datadir_iter_next(it, &node)) {
const char *ext_list[] = {"backup-my.cnf",
"xtrabackup_binary", "xtrabackup_binlog_info",
@ -1962,10 +1923,10 @@ copy_back()
continue;
}
/* skip buffer pool dump */
if (!strcmp(filename, src_buffer_pool)) {
continue;
}
/* skip buffer pool dump */
if (!strcmp(filename, default_buffer_pool_file)) {
continue;
}
/* skip innodb data files */
for (Tablespace::const_iterator iter(srv_sys_space.begin()),
@ -1985,19 +1946,11 @@ copy_back()
/* copy buffer pool dump */
if (file_exists(src_buffer_pool)) {
char dst_dir[FN_REFLEN];
while (IS_TRAILING_SLASH(buffer_pool_filename, dir_length)) {
dir_length--;
}
memcpy(dst_dir, buffer_pool_filename, dir_length);
dst_dir[dir_length] = 0;
if (!(ret = copy_or_move_file(src_buffer_pool,
src_buffer_pool,
dst_dir, 1)))
{
goto cleanup;
}
if (file_exists(default_buffer_pool_file) &&
innobase_buffer_pool_filename) {
copy_or_move_file(default_buffer_pool_file,
innobase_buffer_pool_filename,
mysql_data_home, 0);
}
rocksdb_copy_back();

View File

@ -32,13 +32,6 @@ copy_file(ds_ctxt_t *datasink,
const char *dst_file_path,
uint thread_n);
/************************************************************************
Check to see if a file exists.
Takes name of the file to check.
@return true if file exists. */
bool
file_exists(const char *filename);
/** Start --backup */
bool backup_start(CorruptedPages &corrupted_pages);
/** Release resources after backup_start() */

View File

@ -84,6 +84,7 @@ static mysql_cond_t kill_query_thread_stop;
bool sql_thread_started = false;
char *mysql_slave_position = NULL;
char *mysql_binlog_position = NULL;
char *buffer_pool_filename = NULL;
/* History on server */
time_t history_start_time;
@ -1458,29 +1459,27 @@ cleanup:
}
static
bool
write_binlog_info(MYSQL *connection, char *log_bin_dir,
MYSQL_RES *mysql_result, my_ulonglong n_rows,
my_ulonglong start);
/*********************************************************************//**
Flush and copy the current binary log file into the backup,
if GTID is enabled */
bool
write_current_binlog_file(MYSQL *connection, bool write_binlogs)
write_current_binlog_file(MYSQL *connection)
{
char *log_bin = NULL;
char *filename = NULL;
char *position = NULL;
char *executed_gtid_set = NULL;
char *gtid_binlog_state = NULL;
char *log_bin_file = NULL;
char *log_bin_dir = NULL;
bool gtid_exists;
bool result = true;
char filepath[FN_REFLEN];
mysql_variable log_bin_var[] = {
{"@@GLOBAL.log_bin", &log_bin},
mysql_variable status[] = {
{"Executed_Gtid_Set", &executed_gtid_set},
{NULL, NULL}
};
mysql_variable status_after_flush[] = {
{"File", &log_bin_file},
{NULL, NULL}
};
@ -1490,36 +1489,21 @@ write_current_binlog_file(MYSQL *connection, bool write_binlogs)
{NULL, NULL}
};
mysql_variable status[] = {
{"File", &filename},
{"Position", &position},
{"Executed_Gtid_Set", &executed_gtid_set},
{NULL, NULL}
};
read_mysql_variables(connection, "SELECT @@GLOBAL.log_bin", log_bin_var, false);
/* Do not create xtrabackup_binlog_info if binary log is disabled: */
if (strncmp(log_bin, "1", 2) != 0) {
goto binlog_disabled;
}
lock_binlog_maybe(connection);
read_mysql_variables(connection, "SHOW MASTER STATUS", status, false);
/* Do not create xtrabackup_binlog_info if replication
has not started yet: */
if (filename == NULL || position == NULL) {
goto no_replication;
}
read_mysql_variables(connection, "SHOW VARIABLES", vars, true);
gtid_exists = (executed_gtid_set && *executed_gtid_set)
|| (gtid_binlog_state && *gtid_binlog_state);
if (write_binlogs || gtid_exists) {
if (gtid_exists) {
size_t log_bin_dir_length;
lock_binlog_maybe(connection);
xb_mysql_query(connection, "FLUSH BINARY LOGS", false);
read_mysql_variables(connection, "SHOW MASTER STATUS",
status_after_flush, false);
if (opt_log_bin != NULL && strchr(opt_log_bin, FN_LIBCHAR)) {
/* If log_bin is set, it has priority */
@ -1529,88 +1513,33 @@ write_current_binlog_file(MYSQL *connection, bool write_binlogs)
log_bin_dir = strdup(opt_log_bin);
} else if (log_bin_dir == NULL) {
/* Default location is MySQL datadir */
log_bin_dir = static_cast<char*>(malloc(3));
ut_a(log_bin_dir);
log_bin_dir[0] = '.';
log_bin_dir[1] = FN_LIBCHAR;
log_bin_dir[2] = 0;
log_bin_dir = strdup("./");
}
size_t log_bin_dir_length;
dirname_part(log_bin_dir, log_bin_dir, &log_bin_dir_length);
/* strip final slash if it is not the only path component */
while (IS_TRAILING_SLASH(log_bin_dir, log_bin_dir_length)) {
log_bin_dir_length--;
if (log_bin_dir_length > 1 &&
log_bin_dir[log_bin_dir_length - 1] == FN_LIBCHAR) {
log_bin_dir[log_bin_dir_length - 1] = 0;
}
log_bin_dir[log_bin_dir_length] = 0;
if (log_bin_dir == NULL) {
msg("Failed to locate binary log files");
if (log_bin_dir == NULL || log_bin_file == NULL) {
msg("Failed to get master binlog coordinates from "
"SHOW MASTER STATUS");
result = false;
goto cleanup;
}
uint max_binlogs;
max_binlogs = opt_max_binlogs;
if (max_binlogs == 0) {
if (gtid_exists) {
max_binlogs = 1;
} else {
goto cleanup;
}
}
xb_mysql_query(connection, "FLUSH BINARY LOGS", false);
MYSQL_RES *mysql_result;
mysql_result = xb_mysql_query(connection, "SHOW BINARY LOGS", true);
ut_ad(mysql_num_fields(mysql_result) >= 2);
my_ulonglong n_rows;
my_ulonglong start;
n_rows = mysql_num_rows(mysql_result);
start = 0;
if (max_binlogs < n_rows) {
start = n_rows - max_binlogs;
}
if (start) {
mysql_data_seek(mysql_result, start);
}
MYSQL_ROW row;
while ((row = mysql_fetch_row(mysql_result))) {
const char *binlog_name = row[0];
char filepath[FN_REFLEN];
snprintf(filepath, sizeof(filepath), "%s%c%s",
log_bin_dir, FN_LIBCHAR, binlog_name);
if (file_exists(filepath)) {
result = copy_file(ds_data, filepath, binlog_name, 0);
if (!result) break;
}
}
if (result) {
write_binlog_info(connection, log_bin_dir,
mysql_result, n_rows, start);
}
mysql_free_result(mysql_result);
snprintf(filepath, sizeof(filepath), "%s%c%s",
log_bin_dir, FN_LIBCHAR, log_bin_file);
result = copy_file(ds_data, filepath, log_bin_file, 0);
}
cleanup:
free_mysql_variables(vars);
no_replication:
free_mysql_variables(status_after_flush);
free_mysql_variables(status);
binlog_disabled:
free_mysql_variables(log_bin_var);
free_mysql_variables(vars);
return(result);
}
@ -1619,11 +1548,8 @@ binlog_disabled:
/*********************************************************************//**
Retrieves MySQL binlog position and
saves it in a file. It also prints it to stdout. */
static
bool
write_binlog_info(MYSQL *connection, char *log_bin_dir,
MYSQL_RES *mysql_result, my_ulonglong n_rows,
my_ulonglong start)
write_binlog_info(MYSQL *connection)
{
char *filename = NULL;
char *position = NULL;
@ -1631,13 +1557,9 @@ write_binlog_info(MYSQL *connection, char *log_bin_dir,
char *gtid_current_pos = NULL;
char *gtid_executed = NULL;
char *gtid = NULL;
char *buffer;
char *buf;
size_t total;
bool result = true;
bool result;
bool mysql_gtid;
bool mariadb_gtid;
bool with_gtid;
mysql_variable status[] = {
{"File", &filename},
@ -1655,106 +1577,39 @@ write_binlog_info(MYSQL *connection, char *log_bin_dir,
read_mysql_variables(connection, "SHOW MASTER STATUS", status, false);
read_mysql_variables(connection, "SHOW VARIABLES", vars, true);
mysql_gtid = gtid_mode && (strcmp(gtid_mode, "ON") == 0);
mariadb_gtid = gtid_current_pos && *gtid_current_pos;
if (filename == NULL || position == NULL) {
/* Do not create xtrabackup_binlog_info if binary
log is disabled */
result = true;
goto cleanup;
}
gtid = (gtid_executed && *gtid_executed) ? gtid_executed : gtid_current_pos;
mysql_gtid = ((gtid_mode != NULL) && (strcmp(gtid_mode, "ON") == 0));
mariadb_gtid = (gtid_current_pos != NULL);
with_gtid = mariadb_gtid || mysql_gtid;
if (with_gtid) {
gtid = (gtid_executed != NULL ? gtid_executed : gtid_current_pos);
if (mariadb_gtid || mysql_gtid) {
ut_a(asprintf(&mysql_binlog_position,
"filename '%s', position '%s', "
"GTID of the last change '%s'",
filename, position, gtid) != -1);
result = backup_file_printf(XTRABACKUP_BINLOG_INFO,
"%s\t%s\t%s\n", filename, position,
gtid);
} else {
ut_a(asprintf(&mysql_binlog_position,
"filename '%s', position '%s'",
filename, position) != -1);
result = backup_file_printf(XTRABACKUP_BINLOG_INFO,
"%s\t%s\n", filename, position);
}
mysql_data_seek(mysql_result, start);
MYSQL_ROW row;
my_ulonglong current;
total = 1;
current = start;
while ((row = mysql_fetch_row(mysql_result))) {
const char *binlog_name = row[0];
/* The position in the current binlog is taken from
the global variable, but for the previous ones it is
determined by their length: */
const char *binlog_pos =
++current == n_rows ? position : row[1];
total += strlen(binlog_name) + strlen(binlog_pos) + 2;
if (with_gtid && current != n_rows) {
/* Add the "\t[]" length to the buffer size: */
total += 3;
}
}
/* For the last of the binray log files, also add
the length of the GTID (+ one character for '\t'): */
if (with_gtid) {
total += strlen(gtid) + 1;
}
buffer = static_cast<char*>(malloc(total));
if (!buffer) {
msg("Failed to allocate memory for temporary buffer");
result = false;
goto cleanup;
}
mysql_data_seek(mysql_result, start);
buf = buffer;
current = start;
while ((row = mysql_fetch_row(mysql_result))) {
const char *binlog_name = row[0];
char filepath[FN_REFLEN];
snprintf(filepath, sizeof(filepath), "%s%c%s",
log_bin_dir, FN_LIBCHAR, binlog_name);
current++;
if (file_exists(filepath)) {
/* The position in the current binlog is taken from
the global variable, but for the previous ones it is
determined by their length: */
char *binlog_pos =
current == n_rows ? position : row[1];
int bytes;
if (with_gtid) {
bytes = snprintf(buf, total, "%s\t%s\t%s\n",
binlog_name, binlog_pos,
current == n_rows ? gtid : "[]");
} else {
bytes = snprintf(buf, total, "%s\t%s\n",
binlog_name, binlog_pos);
}
if (bytes <= 0) {
goto buffer_overflow;
}
buf += bytes;
total -= bytes;
}
}
if (buf != buffer) {
result = backup_file_printf(XTRABACKUP_BINLOG_INFO, "%s", buffer);
}
cleanup2:
free(buffer);
cleanup:
free_mysql_variables(vars);
free_mysql_variables(status);
free_mysql_variables(vars);
return(result);
buffer_overflow:
msg("Internal error: buffer overflow in the write_binlog_info()");
result = false;
goto cleanup2;
}
struct escape_and_quote
@ -2080,6 +1935,7 @@ backup_cleanup()
{
free(mysql_slave_position);
free(mysql_binlog_position);
free(buffer_pool_filename);
if (mysql_connection) {
mysql_close(mysql_connection);

View File

@ -28,6 +28,7 @@ extern time_t history_lock_time;
extern bool sql_thread_started;
extern char *mysql_slave_position;
extern char *mysql_binlog_position;
extern char *buffer_pool_filename;
/** connection to mysql server */
extern MYSQL *mysql_connection;
@ -61,7 +62,10 @@ void
unlock_all(MYSQL *connection);
bool
write_current_binlog_file(MYSQL *connection, bool write_binlogs);
write_current_binlog_file(MYSQL *connection);
bool
write_binlog_info(MYSQL *connection);
bool
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history,

View File

@ -187,14 +187,4 @@ xb_read_full(File fd, uchar *buf, size_t len)
return tlen;
}
#ifdef _WIN32
#define IS_TRAILING_SLASH(name, length) \
((length) > 1 && \
(name[(length) - 1] == '/' || \
name[(length) - 1] == '\\'))
#else
#define IS_TRAILING_SLASH(name, length) \
((length) > 1 && name[(length) - 1] == FN_LIBCHAR)
#endif
#endif

View File

@ -245,8 +245,7 @@ ulong innobase_read_io_threads = 4;
ulong innobase_write_io_threads = 4;
longlong innobase_page_size = (1LL << 14); /* 16KB */
char *innobase_buffer_pool_filename = NULL;
char *buffer_pool_filename = NULL;
char* innobase_buffer_pool_filename = NULL;
/* The default values for the following char* start-up parameters
are determined in innobase_init below: */
@ -341,7 +340,6 @@ uint opt_lock_wait_timeout = 0;
uint opt_lock_wait_threshold = 0;
uint opt_debug_sleep_before_unlock = 0;
uint opt_safe_slave_backup_timeout = 0;
uint opt_max_binlogs = UINT_MAX;
const char *opt_history = NULL;
@ -1070,8 +1068,7 @@ enum options_xtrabackup
OPT_XTRA_CHECK_PRIVILEGES,
OPT_XTRA_MYSQLD_ARGS,
OPT_XB_IGNORE_INNODB_PAGE_CORRUPTION,
OPT_INNODB_FORCE_RECOVERY,
OPT_MAX_BINLOGS
OPT_INNODB_FORCE_RECOVERY
};
struct my_option xb_client_options[]= {
@ -1468,17 +1465,6 @@ struct my_option xb_client_options[]= {
&opt_log_innodb_page_corruption, &opt_log_innodb_page_corruption, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"sst_max_binlogs", OPT_MAX_BINLOGS,
"Number of recent binary logs to be included in the backup. "
"Setting this parameter to zero normally disables transmission "
"of binary logs to the joiner nodes during SST using Galera. "
"But sometimes a single current binlog can still be transmitted "
"to the joiner even with sst_max_binlogs=0, because it is "
"required for Galera to work properly with GTIDs support.",
(G_PTR *) &opt_max_binlogs,
(G_PTR *) &opt_max_binlogs, 0, GET_UINT, OPT_ARG,
UINT_MAX, 0, UINT_MAX, 0, 1, 0},
#define MYSQL_CLIENT
#include "sslopt-longopts.h"
#undef MYSQL_CLIENT
@ -6310,44 +6296,6 @@ static bool check_all_privileges()
return true;
}
static
void
xb_init_buffer_pool(const char * filename)
{
if (filename &&
#ifdef _WIN32
(filename[0] == '/' ||
filename[0] == '\\' ||
strchr(filename, ':')))
#else
filename[0] == FN_LIBCHAR)
#endif
{
buffer_pool_filename = strdup(filename);
} else {
char filepath[FN_REFLEN];
char *dst_dir =
(innobase_data_home_dir && *innobase_data_home_dir) ?
innobase_data_home_dir : mysql_data_home;
size_t dir_length;
if (dst_dir && *dst_dir) {
dir_length = strlen(dst_dir);
while (IS_TRAILING_SLASH(dst_dir, dir_length)) {
dir_length--;
}
memcpy(filepath, dst_dir, dir_length);
}
else {
filepath[0] = '.';
dir_length = 1;
}
snprintf(filepath + dir_length,
sizeof(filepath) - dir_length, "%c%s", FN_LIBCHAR,
filename ? filename : "ib_buffer_pool");
buffer_pool_filename = strdup(filepath);
}
}
bool
xb_init()
{
@ -6413,15 +6361,10 @@ xb_init()
return(false);
}
xb_init_buffer_pool(buffer_pool_filename);
if (opt_check_privileges && !check_all_privileges()) {
return(false);
}
history_start_time = time(NULL);
} else {
xb_init_buffer_pool(innobase_buffer_pool_filename);
}
return(true);
@ -6809,8 +6752,6 @@ int main(int argc, char **argv)
free_error_messages();
mysql_mutex_destroy(&LOCK_error_log);
free(buffer_pool_filename);
if (status == EXIT_SUCCESS) {
msg("completed OK!");
}

View File

@ -71,7 +71,6 @@ extern char *xtrabackup_incremental_dir;
extern char *xtrabackup_incremental_basedir;
extern char *innobase_data_home_dir;
extern char *innobase_buffer_pool_filename;
extern char *buffer_pool_filename;
extern char *xb_plugin_dir;
extern char *xb_rocksdb_datadir;
extern my_bool xb_backup_rocksdb;
@ -167,7 +166,6 @@ extern uint opt_lock_wait_timeout;
extern uint opt_lock_wait_threshold;
extern uint opt_debug_sleep_before_unlock;
extern uint opt_safe_slave_backup_timeout;
extern uint opt_max_binlogs;
extern const char *opt_history;

View File

@ -136,7 +136,8 @@ IF(WOLFSSL_FASTMATH)
PROPERTIES COMPILE_FLAGS ${TFM_COMPILE_FLAGS})
ENDIF()
ELSE()
SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/integer.c)
SET(WOLFSSL_SP_MATH_ALL 1)
SET(WOLFCRYPT_SOURCES ${WOLFCRYPT_SOURCES} ${WOLFCRYPT_SRCDIR}/sp_int.c)
ENDIF()
IF(WOLFSSL_X86_64_BUILD)

View File

@ -47,6 +47,7 @@
WolfSSL will use more stack space with it, with fastmath
*/
#cmakedefine FP_MAX_BITS 16384
#define RSA_MAX_SIZE 8192
#cmakedefine WOLFSSL_AESNI
#cmakedefine USE_FAST_MATH
#cmakedefine TFM_TIMING_RESISTANT
@ -55,5 +56,6 @@
#cmakedefine USE_INTEL_SPEEDUP
#cmakedefine USE_FAST_MATH
#cmakedefine WOLFSSL_X86_64_BUILD
#cmakedefine WOLFSSL_SP_MATH_ALL
#endif /* WOLFSSL_USER_SETTINGS_H */

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2011, 2021, Oracle and/or its affiliates
/* Copyright (c) 2011, 2022, Oracle and/or its affiliates
Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2012, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2012, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2014, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2014, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
Copyright (c) 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2010, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2010, 2022, Oracle and/or its affiliates.
Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
Copyright (c) 2020, 2021, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
@ -1155,6 +1155,13 @@ static inline void inline_mysql_thread_set_psi_THD(THD *thd)
}
#endif /* __cplusplus */
static inline void mysql_thread_set_peer_port(uint port __attribute__ ((unused))) {
#ifdef HAVE_PSI_THREAD_INTERFACE
struct PSI_thread *psi = PSI_THREAD_CALL(get_thread)();
PSI_THREAD_CALL(set_thread_peer_port)(psi, port);
#endif
}
#endif
#endif /* DISABLE_MYSQL_THREAD_H */

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@ -1692,6 +1692,15 @@ typedef void (*set_thread_info_v1_t)(const char* info, uint info_len);
*/
typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
/**
Assign the remote (peer) port to the instrumented thread.
@param thread pointer to the thread instrumentation
@param port the remote port
*/
typedef void (*set_thread_peer_port_v1_t)(PSI_thread *thread,
unsigned int port);
/** Delete the current thread instrumentation. */
typedef void (*delete_current_thread_v1_t)(void);
@ -2737,6 +2746,8 @@ struct PSI_v1
start_metadata_wait_v1_t start_metadata_wait;
end_metadata_wait_v1_t end_metadata_wait;
set_thread_peer_port_v1_t set_thread_peer_port;
};
/** @} (end of group Group_PSI_v1) */

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2011, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2011, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -459,6 +459,8 @@ typedef void (*set_thread_start_time_v1_t)(time_t start_time);
typedef void (*set_thread_state_v1_t)(const char* state);
typedef void (*set_thread_info_v1_t)(const char* info, uint info_len);
typedef void (*set_thread_v1_t)(struct PSI_thread *thread);
typedef void (*set_thread_peer_port_v1_t)(PSI_thread *thread,
unsigned int port);
typedef void (*delete_current_thread_v1_t)(void);
typedef void (*delete_thread_v1_t)(struct PSI_thread *thread);
typedef struct PSI_file_locker* (*get_thread_file_name_locker_v1_t)
@ -829,6 +831,7 @@ struct PSI_v1
destroy_metadata_lock_v1_t destroy_metadata_lock;
start_metadata_wait_v1_t start_metadata_wait;
end_metadata_wait_v1_t end_metadata_wait;
set_thread_peer_port_v1_t set_thread_peer_port;
};
typedef struct PSI_v1 PSI;
typedef struct PSI_mutex_info_v1 PSI_mutex_info;

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2008, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2008, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,
@ -94,6 +94,12 @@ extern "C" {
*/
#define PSI_FLAG_VOLATILITY_SESSION (1 << 6)
/**
System thread flag.
Indicates that the instrumented object exists on a system thread.
*/
#define PSI_FLAG_THREAD_SYSTEM (1 << 9)
#ifdef HAVE_PSI_INTERFACE
/**

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2013, 2021, Oracle and/or its affiliates.
/* Copyright (c) 2013, 2022, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License, version 2.0,

View File

@ -99,6 +99,8 @@ void pfs_set_thread_info_v1(const char* info, uint info_len);
void pfs_set_thread_v1(PSI_thread* thread);
void pfs_set_thread_peer_port_v1(PSI_thread *thread, uint port);
void pfs_delete_current_thread_v1(void);
void pfs_delete_thread_v1(PSI_thread *thread);

View File

@ -0,0 +1,36 @@
# Skip the test if 'query cache' is disabled.
# Note : There are 2 techniques to disable query cache :
# (1) Set query_cache_type to 0 or OFF
# (2) Set query_cache_size to 0
disable_query_log;
let $do_skip=0;
let $qc_var_1= query_get_value("SELECT COUNT(*) AS var1 FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'have_query_cache' AND variable_value = 'YES'", var1, 1);
if ($qc_var_1 == 1)
{
let $do_skip=1;
}
# Check if 'query_cache_type' is OFF
let $qc_var_2= query_get_value("SELECT COUNT(*) AS var2 FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'query_cache_type' AND VARIABLE_VALUE = 'OFF'", var2, 1);
if ($qc_var_2 == 1)
{
let $do_skip=0;
}
# Check if 'query_cache_size' is 0
let $qc_var_3= query_get_value("SELECT COUNT(*) AS var3 FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'query_cache_size' AND VARIABLE_VALUE = 0", var3, 1);
if ($qc_var_3 == 1)
{
let $do_skip=0;
}
if ($do_skip)
{
skip Query Cache enabled, skipping test;
}
enable_query_log;

View File

@ -9,7 +9,7 @@ let $counter= 600;
let $mysql_errno= 0;
while (!$mysql_errno)
{
--error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2013
--error 0,ER_SERVER_SHUTDOWN,ER_CONNECTION_KILLED,2002,2006,2026,2013,5014
show status;
dec $counter;

View File

@ -1005,6 +1005,17 @@ JSON_VALID('{"admin\\"": null}') {"admin\"": null}
1 {"\"admin": null}
1 {"\"": null}
#
# MDEV-29188: Crash in JSON_EXTRACT
#
CREATE TABLE t1 (j JSON);
INSERT INTO t1 VALUES
('{"ID": "4", "Name": "Betty", "Age": 19}'),
('[10, 20, [30, 40]]');
SELECT * FROM t1 WHERE JSON_EXTRACT(j, '$.Age')=19;
j
{"ID": "4", "Name": "Betty", "Age": 19}
drop table t1;
#
# End of 10.3 tests
#
#

View File

@ -613,6 +613,20 @@ SELECT JSON_VALID('{"admin\\"": null}'), '{"admin\\"": null}'
UNION
SELECT JSON_VALID('{"\\"": null}'), '{"\\"": null}';
--echo #
--echo # MDEV-29188: Crash in JSON_EXTRACT
--echo #
CREATE TABLE t1 (j JSON);
INSERT INTO t1 VALUES
('{"ID": "4", "Name": "Betty", "Age": 19}'),
('[10, 20, [30, 40]]');
SELECT * FROM t1 WHERE JSON_EXTRACT(j, '$.Age')=19;
drop table t1;
--echo #
--echo # End of 10.3 tests
--echo #

View File

@ -1,3 +1,3 @@
select count(*) from t4;
count(*)
193
0

View File

@ -57,7 +57,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
SET DEBUG_SYNC = 'RESET';
connection con1;
--error 1053,2006,2013
--error 1053,2006,2013,5014
SELECT 1;
--enable_reconnect
@ -96,7 +96,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
SET DEBUG_SYNC = 'RESET';
connection con1;
--error 1053,2006,2013
--error 1053,2006,2013,5014
SELECT 1;
enable_reconnect;
SELECT 1;
@ -143,7 +143,7 @@ KILL @id;
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
connection con1;
--error 1317,1053,2006,2013
--error 1317,1053,2006,2013,5014
reap;
SELECT 1;
@ -288,7 +288,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
connection con1;
--echo # ER_SERVER_SHUTDOWN, CR_SERVER_GONE_ERROR, CR_SERVER_LOST,
--echo # depending on the timing of close of the connection socket
--error 1053,2006,2013
--error 1053,2006,2013,5014
SELECT 1;
--enable_reconnect
SELECT 1;
@ -521,10 +521,10 @@ drop user test@localhost;
drop user test2@localhost;
connection con3;
--error 2013,2006
--error 2013,2006,5014
select 1;
connection con4;
--error 2013,2006
--error 2013,2006,5014
select 1;
connection default;

View File

@ -318,6 +318,25 @@ update t1,t2 set v1 = v2 , v5 = 0;
ERROR 23000: Duplicate entry '-128' for key 'v1'
drop table t1, t2;
#
# MDEV-21540 Initialization of already inited long unique index on reorganize partition
#
create table t1 (x int, a blob)
partition by range (x) (
partition p1 values less than (50),
partition pn values less than maxvalue);
insert into t1 values (1, 1), (100, 1);
alter table t1 add unique key (a);
ERROR 23000: Duplicate entry '1' for key 'a'
update t1 set a= x;
alter table t1 add unique key (a);
update t1 set a= 1;
ERROR 23000: Duplicate entry '1' for key 'a'
update t1 set a= x + 1;
alter table t1 reorganize partition p1 into (
partition n0 values less than (10),
partition n1 values less than (50));
drop table t1;
#
# End of 10.4 tests
#
#

View File

@ -397,6 +397,33 @@ update t1 set v2 = 1, v3 = -128;
update t1,t2 set v1 = v2 , v5 = 0;
drop table t1, t2;
--echo #
--echo # MDEV-21540 Initialization of already inited long unique index on reorganize partition
--echo #
create table t1 (x int, a blob)
partition by range (x) (
partition p1 values less than (50),
partition pn values less than maxvalue);
insert into t1 values (1, 1), (100, 1);
# a little bit of additional checks
--error ER_DUP_ENTRY
alter table t1 add unique key (a);
update t1 set a= x;
alter table t1 add unique key (a);
--error ER_DUP_ENTRY
update t1 set a= 1;
update t1 set a= x + 1;
# bug failure
alter table t1 reorganize partition p1 into (
partition n0 values less than (10),
partition n1 values less than (50));
drop table t1;
--echo #
--echo # End of 10.4 tests
--echo #

View File

@ -2171,6 +2171,44 @@ disconnect con1;
connection default;
drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
#
# MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade
#
create or replace table pet4 (
build_time double(18, 7) default null,
key idx1 (build_time)
) engine innodb;
check table pet4;
Table Op Msg_type Msg_text
test.pet4 check error Table rebuild required. Please do "ALTER TABLE `pet4` FORCE" or dump/reload to fix it!
check table pet4 for upgrade;
Table Op Msg_type Msg_text
test.pet4 check error Table rebuild required. Please do "ALTER TABLE `pet4` FORCE" or dump/reload to fix it!
alter table pet4 add i1 int, algorithm=nocopy;
ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
# Running mysqlcheck
test.pet4
error : Table rebuild required. Please do "ALTER TABLE `pet4` FORCE" or dump/reload to fix it!
Repairing tables
check table pet4;
Table Op Msg_type Msg_text
test.pet4 check status OK
alter table pet4 add i1 int, algorithm=nocopy;
create or replace table pet4 (
build_time double(18, 7) default null,
key idx1 (build_time)
) engine innodb;
alter table pet4 add i1 int, algorithm=nocopy;
ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
# Running mysql_upgrade
test.pet4
error : Table rebuild required. Please do "ALTER TABLE `pet4` FORCE" or dump/reload to fix it!
check table pet4;
Table Op Msg_type Msg_text
test.pet4 check status OK
alter table pet4 add i1 int, algorithm=nocopy;
drop table pet4;
# End of 10.4 tests
#
# Check that mysql_upgrade can be run on mysqldump

View File

@ -471,6 +471,47 @@ drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
--echo #
--echo # MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade
--echo #
create or replace table pet4 (
build_time double(18, 7) default null,
key idx1 (build_time)
) engine innodb;
--remove_file $MYSQLD_DATADIR/test/pet4.frm
--copy_file std_data/mdev-28727-pet4.frm $MYSQLD_DATADIR/test/pet4.frm
check table pet4;
check table pet4 for upgrade;
--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter table pet4 add i1 int, algorithm=nocopy;
--echo # Running mysqlcheck
--exec $MYSQL_CHECK --auto-repair --databases test 2>&1
check table pet4;
alter table pet4 add i1 int, algorithm=nocopy;
create or replace table pet4 (
build_time double(18, 7) default null,
key idx1 (build_time)
) engine innodb;
--remove_file $MYSQLD_DATADIR/test/pet4.frm
--copy_file std_data/mdev-28727-pet4.frm $MYSQLD_DATADIR/test/pet4.frm
--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter table pet4 add i1 int, algorithm=nocopy;
--echo # Running mysql_upgrade
--exec $MYSQL_UPGRADE --silent 2>&1
file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
check table pet4;
alter table pet4 add i1 int, algorithm=nocopy;
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
drop table pet4;
--echo # End of 10.4 tests
#

View File

@ -29,7 +29,7 @@ START TRANSACTION
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -60,7 +60,7 @@ START TRANSACTION
use `foo`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -22,7 +22,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -102,7 +102,7 @@ START TRANSACTION
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -138,7 +138,7 @@ START TRANSACTION
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -189,7 +189,7 @@ START TRANSACTION
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -216,7 +216,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -296,7 +296,7 @@ START TRANSACTION
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -332,7 +332,7 @@ START TRANSACTION
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -383,7 +383,7 @@ START TRANSACTION
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -492,7 +492,7 @@ DELIMITER /*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -544,7 +544,7 @@ DELIMITER /*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -724,7 +724,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1253783037/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -778,7 +778,7 @@ DELIMITER /*!*/;
ROLLBACK/*!*/;
SET TIMESTAMP=1253783037/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -813,7 +813,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
SET TIMESTAMP=1266652094/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -855,7 +855,7 @@ ROLLBACK /* added by mysqlbinlog */;
DELIMITER /*!*/;
SET TIMESTAMP=1266652094/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -973,7 +973,7 @@ AAAAAAAAAAAAAAAAAAAgrgJSFzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
# Event: Query thread_id=1 exec_time=0 error_code=0 xid=0
SET TIMESTAMP=1375907364/*!*/;
SET @@session.pseudo_thread_id=1/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1056,7 +1056,7 @@ AAAAAAAAAAAAAAAAAAA/rQJSGzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
# Event: Query thread_id=1 exec_time=1 error_code=0 xid=0
SET TIMESTAMP=1375907141/*!*/;
SET @@session.pseudo_thread_id=1/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1139,7 +1139,7 @@ AAAAAAAAAAAAAAAAAAAnrAJSHzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
# Event: Query thread_id=1 exec_time=0 error_code=0 xid=0
SET TIMESTAMP=1375906879/*!*/;
SET @@session.pseudo_thread_id=1/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1222,7 +1222,7 @@ AAAAAAAAAAAAAAAAAABbsAJSEzgNAAgAEgAEBAQEEgAAUwAEGggAAAAICAgC
# Event: Query thread_id=1 exec_time=0 error_code=0 xid=0
SET TIMESTAMP=1375907933/*!*/;
SET @@session.pseudo_thread_id=1/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -33,7 +33,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -31,7 +31,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -397,7 +397,7 @@ START TRANSACTION
#<date> server id 1 end_log_pos END_LOG_POS CRC32 XXX Query thread_id=TID exec_time=x error_code=0 xid=<xid>
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=TID/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -33,7 +33,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=5/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=#/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -504,6 +504,7 @@ The following specify which files/extra groups are read (specified before remain
administrative statements to the slow log if it is open.
Resets or sets the option 'admin' in
log_slow_disabled_statements
(Defaults to on; use --skip-log-slow-admin-statements to disable.)
--log-slow-disabled-statements=name
Don't log certain types of statements to slow log. Any
combination of: admin, call, slave, sp
@ -524,6 +525,7 @@ The following specify which files/extra groups are read (specified before remain
Log slow statements executed by slave thread to the slow
log if it is open. Resets or sets the option 'slave' in
log_slow_disabled_statements
(Defaults to on; use --skip-log-slow-slave-statements to disable.)
--log-slow-verbosity=name
Verbosity level for the slow log. Any combination of:
innodb, query_plan, explain

View File

@ -47,11 +47,11 @@ disconnect con3;
disconnect con4;
drop user ssl_user1@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
drop table t1;
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
have_ssl
1
End of 5.0 tests
@ -179,7 +179,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
mysqldump: Got error: 2026: "SSL connection error: xxxx
mysqldump: Got error: 2026: "TLS/SSL error: xxxx
DROP TABLE t1;
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
FLUSH PRIVILEGES;
@ -196,4 +196,4 @@ End of 5.1 tests
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
ERROR: Failed on connect: SSL connection error
ERROR: Failed on connect: TLS/SSL error

View File

@ -70,7 +70,7 @@ drop table t1;
#
--exec echo "this query should not execute;" > $MYSQLTEST_VARDIR/tmp/test.sql
# Handle that openssl gives different error messages from YaSSL.
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-ca=$MYSQL_TEST_DIR/std_data/untrusted-cacert.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--echo
@ -79,7 +79,7 @@ drop table t1;
# Test that we can't open connection to server if we are using
# a blank ca
#
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-ca= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--echo
@ -88,7 +88,7 @@ drop table t1;
# Test that we can't open connection to server if we are using
# a nonexistent ca file
#
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-ca=nonexisting_file.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--echo
@ -97,7 +97,7 @@ drop table t1;
# Test that we can't open connection to server if we are using
# a blank client-key
#
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-key= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--echo
@ -106,7 +106,7 @@ drop table t1;
# Test that we can't open connection to server if we are using
# a blank client-cert
#
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--echo
@ -175,7 +175,7 @@ INSERT INTO t1 VALUES (1), (2);
# With wrong parameters
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR mysqldump.exe mysqldump
--replace_regex /SSL connection error.*/SSL connection error: xxxx/
--replace_regex /TLS\/SSL error.*/TLS\/SSL error: xxxx/
--error 2
--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-create-options --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1
--echo
@ -201,7 +201,7 @@ set global sql_mode=default;
# MDEV-9605 mysqlbinlog does not accept ssl-ca option as expected.
#
--replace_regex /SSL connection error:.*/SSL connection error/
--replace_regex /TLS\/SSL error:.*/TLS\/SSL error/
--error 1
--exec $MYSQL_BINLOG --read-from-remote-server --ssl-ca --user=root --host=localhost nobinlog.111111 2>&1

View File

@ -3,14 +3,14 @@ grant select on test.* to ssl_sslv3@localhost require cipher "AES128-SHA";
create user ssl_tls12@localhost;
grant select on test.* to ssl_tls12@localhost require cipher "AES128-SHA256";
TLS1.2 ciphers: user is ok with any cipher
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
TLS1.2 ciphers: user requires SSLv3 cipher AES128-SHA
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
TLS1.2 ciphers: user requires TLSv1.2 cipher AES128-SHA256
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
SSLv3 ciphers: user is ok with any cipher
Variable_name Value
Ssl_cipher AES256-SHA

View File

@ -15,13 +15,13 @@ Variable_name Value
Ssl_cipher AES128-SHA256
ERROR 1045 (28000): Access denied for user 'ssl_tls12'@'localhost' (using password: NO)
SSLv3 ciphers: user is ok with any cipher
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
SSLv3 ciphers: user requires SSLv3 cipher AES128-SHA
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
SSLv3 ciphers: user requires TLSv1.2 cipher AES128-SHA256
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert handshake failure
drop user ssl_sslv3@localhost;
drop user ssl_tls12@localhost;

View File

@ -247,10 +247,12 @@ EXECUTE stmt_1;
name description example
UPDATE Syntax
------
Single-table syntax:
UPDATE [LOW_PRIORITY] [IGNORE] table_reference
[PARTITION (partition_list)]
[FOR PORTION OF period FROM expr1 TO expr2]
SET col1={expr1|DEFAULT} [,col2={expr2|DEFAULT}] ...
[WHERE where_condition]
[ORDER BY ...]
@ -259,119 +261,114 @@ UPDATE [LOW_PRIORITY] [IGNORE] table_reference
Multiple-table syntax:
UPDATE [LOW_PRIORITY] [IGNORE] table_references
SET col1={expr1|DEFAULT} [, col2={expr2|DEFAULT}] ...
[WHERE where_condition]
SET col1={expr1|DEFAULT} [, col2={expr2|DEFAULT}] ...
[WHERE where_condition]
Description
-----------
For the single-table syntax, the UPDATE statement updates
columns of existing rows in the named table with new values.
The
SET clause indicates which columns to modify and the values
they should be given. Each value can be given as an
expression, or the keyword
DEFAULT to set a column explicitly to its default value. The
WHERE clause, if given, specifies the conditions that
identify
which rows to update. With no WHERE clause, all rows are
updated. If the ORDER BY clause is specified, the rows are
updated in the order that is specified. The LIMIT clause
places a limit on the number of rows that can be updated.
The PARTITION clause was introduced in MariaDB 10.0. See
Partition Pruning and Selection for details.
For the single-table syntax, the UPDATE statement updates columns of existing
rows in the named table with new values. The SET clause indicates which
columns to modify and the values they should be given. Each value can be given
as an expression, or the keyword DEFAULT to set a column explicitly to its
default value. The WHERE clause, if given, specifies the conditions that
identify which rows to update. With no WHERE clause, all rows are updated. If
the ORDER BY clause is specified, the rows are updated in the order that is
specified. The LIMIT clause places a limit on the number of rows that can be
updated.
Until MariaDB 10.3.2, for the multiple-table syntax, UPDATE
updates rows in each
table named in table_references that satisfy the conditions.
In this case,
ORDER BY and LIMIT cannot be used. This restriction was
lifted in MariaDB 10.3.2 and both clauses can be used with
multiple-table updates. An UPDATE can also reference tables
which are located in different databases; see Identifier
Qualifiers for the syntax.
Until MariaDB 10.3.2, for the multiple-table syntax, UPDATE updates rows in
each table named in table_references that satisfy the conditions. In this
case, ORDER BY and LIMIT cannot be used. This restriction was lifted in
MariaDB 10.3.2 and both clauses can be used with multiple-table updates. An
UPDATE can also reference tables which are located in different databases; see
Identifier Qualifiers for the syntax.
where_condition is an expression that evaluates to true for
each row to be updated.
where_condition is an expression that evaluates to true for each row to be
updated.
table_references and where_condition are as
specified as described in SELECT.
table_references and where_condition are as specified as described in SELECT.
Assignments are evaluated in left-to-right order, unless the
SIMULTANEOUS_ASSIGNMENT sql_mode (available from MariaDB
10.3.5) is set, in which case the UPDATE statement evaluates
all assignments simultaneously.
For single-table updates, assignments are evaluated in left-to-right order,
while for multi-table updates, there is no guarantee of a particular order. If
the SIMULTANEOUS_ASSIGNMENT sql_mode (available from MariaDB 10.3.5) is set,
UPDATE statements evaluate all assignments simultaneously.
You need the UPDATE privilege only for columns referenced in
an UPDATE that are actually updated. You need only the
SELECT privilege for any columns that are read but
not modified. See GRANT.
You need the UPDATE privilege only for columns referenced in an UPDATE that
are actually updated. You need only the SELECT privilege for any columns that
are read but not modified. See GRANT.
The UPDATE statement supports the following modifiers:
If you use the LOW_PRIORITY keyword, execution of
the UPDATE is delayed until no other clients are reading
from
the table. This affects only storage engines that use only
table-level
locking (MyISAM, MEMORY, MERGE). See HIGH_PRIORITY and
LOW_PRIORITY clauses for details.
If you use the IGNORE keyword, the update statement does
not abort even if errors occur during the update. Rows for
which
duplicate-key conflicts occur are not updated. Rows for
which columns are
updated to values that would cause data conversion errors
are updated to the
* If you use the LOW_PRIORITY keyword, execution of
the UPDATE is delayed until no other clients are reading from
the table. This affects only storage engines that use only table-level
locking (MyISAM, MEMORY, MERGE). See HIGH_PRIORITY and LOW_PRIORITY clauses
for details.
* If you use the IGNORE keyword, the update statement does
not abort even if errors occur during the update. Rows for which
duplicate-key conflicts occur are not updated. Rows for which columns are
updated to values that would cause data conversion errors are updated to the
closest valid values instead.
UPDATE Statements With the Same Source and Target
PARTITION
---------
From MariaDB 10.3.2, UPDATE statements may have the same
source and target.
See Partition Pruning and Selection for details.
FOR PORTION OF
--------------
MariaDB starting with 10.4.3
----------------------------
See Application Time Periods - Updating by Portion.
UPDATE Statements With the Same Source and Target
-------------------------------------------------
MariaDB starting with 10.3.2
----------------------------
From MariaDB 10.3.2, UPDATE statements may have the same source and target.
For example, given the following table:
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT);
INSERT INTO t1 VALUES (10,10), (20,20);
Until MariaDB 10.3.1, the following UPDATE statement would
not work:
Until MariaDB 10.3.1, the following UPDATE statement would not work:
UPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);
ERROR 1093 (HY000): Table 't1' is specified twice,
both as a target for 'UPDATE' and as a separate source
for data
both as a target for 'UPDATE' and as a separate source for data
From MariaDB 10.3.2, the statement executes successfully:
UPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);
SELECT * FROM t1;
+------+------+
| c1 | c2 |
| c1 | c2 |
+------+------+
| 10 | 10 |
| 21 | 20 |
| 10 | 10 |
| 21 | 20 |
+------+------+
Example
-------
Single-table syntax:
UPDATE table_name SET column1 = value1, column2 = value2
WHERE id=100;
UPDATE table_name SET column1 = value1, column2 = value2 WHERE id=100;
Multiple-table syntax:
UPDATE tab1, tab2 SET tab1.column1 = value1, tab1.column2 =
value2 WHERE tab1.id = tab2.id;
UPDATE tab1, tab2 SET tab1.column1 = value1, tab1.column2 = value2 WHERE
tab1.id = tab2.id;
URL: https://mariadb.com/kb/en/library/update/
URL: mariadb.com/kb/en/update/
# Execute the same prepared statement the second time to check that
# no internal structures used for handling the 'HELP' statement
# were damaged.
@ -379,10 +376,12 @@ EXECUTE stmt_1;
name description example
UPDATE Syntax
------
Single-table syntax:
UPDATE [LOW_PRIORITY] [IGNORE] table_reference
[PARTITION (partition_list)]
[FOR PORTION OF period FROM expr1 TO expr2]
SET col1={expr1|DEFAULT} [,col2={expr2|DEFAULT}] ...
[WHERE where_condition]
[ORDER BY ...]
@ -391,119 +390,114 @@ UPDATE [LOW_PRIORITY] [IGNORE] table_reference
Multiple-table syntax:
UPDATE [LOW_PRIORITY] [IGNORE] table_references
SET col1={expr1|DEFAULT} [, col2={expr2|DEFAULT}] ...
[WHERE where_condition]
SET col1={expr1|DEFAULT} [, col2={expr2|DEFAULT}] ...
[WHERE where_condition]
Description
-----------
For the single-table syntax, the UPDATE statement updates
columns of existing rows in the named table with new values.
The
SET clause indicates which columns to modify and the values
they should be given. Each value can be given as an
expression, or the keyword
DEFAULT to set a column explicitly to its default value. The
WHERE clause, if given, specifies the conditions that
identify
which rows to update. With no WHERE clause, all rows are
updated. If the ORDER BY clause is specified, the rows are
updated in the order that is specified. The LIMIT clause
places a limit on the number of rows that can be updated.
The PARTITION clause was introduced in MariaDB 10.0. See
Partition Pruning and Selection for details.
For the single-table syntax, the UPDATE statement updates columns of existing
rows in the named table with new values. The SET clause indicates which
columns to modify and the values they should be given. Each value can be given
as an expression, or the keyword DEFAULT to set a column explicitly to its
default value. The WHERE clause, if given, specifies the conditions that
identify which rows to update. With no WHERE clause, all rows are updated. If
the ORDER BY clause is specified, the rows are updated in the order that is
specified. The LIMIT clause places a limit on the number of rows that can be
updated.
Until MariaDB 10.3.2, for the multiple-table syntax, UPDATE
updates rows in each
table named in table_references that satisfy the conditions.
In this case,
ORDER BY and LIMIT cannot be used. This restriction was
lifted in MariaDB 10.3.2 and both clauses can be used with
multiple-table updates. An UPDATE can also reference tables
which are located in different databases; see Identifier
Qualifiers for the syntax.
Until MariaDB 10.3.2, for the multiple-table syntax, UPDATE updates rows in
each table named in table_references that satisfy the conditions. In this
case, ORDER BY and LIMIT cannot be used. This restriction was lifted in
MariaDB 10.3.2 and both clauses can be used with multiple-table updates. An
UPDATE can also reference tables which are located in different databases; see
Identifier Qualifiers for the syntax.
where_condition is an expression that evaluates to true for
each row to be updated.
where_condition is an expression that evaluates to true for each row to be
updated.
table_references and where_condition are as
specified as described in SELECT.
table_references and where_condition are as specified as described in SELECT.
Assignments are evaluated in left-to-right order, unless the
SIMULTANEOUS_ASSIGNMENT sql_mode (available from MariaDB
10.3.5) is set, in which case the UPDATE statement evaluates
all assignments simultaneously.
For single-table updates, assignments are evaluated in left-to-right order,
while for multi-table updates, there is no guarantee of a particular order. If
the SIMULTANEOUS_ASSIGNMENT sql_mode (available from MariaDB 10.3.5) is set,
UPDATE statements evaluate all assignments simultaneously.
You need the UPDATE privilege only for columns referenced in
an UPDATE that are actually updated. You need only the
SELECT privilege for any columns that are read but
not modified. See GRANT.
You need the UPDATE privilege only for columns referenced in an UPDATE that
are actually updated. You need only the SELECT privilege for any columns that
are read but not modified. See GRANT.
The UPDATE statement supports the following modifiers:
If you use the LOW_PRIORITY keyword, execution of
the UPDATE is delayed until no other clients are reading
from
the table. This affects only storage engines that use only
table-level
locking (MyISAM, MEMORY, MERGE). See HIGH_PRIORITY and
LOW_PRIORITY clauses for details.
If you use the IGNORE keyword, the update statement does
not abort even if errors occur during the update. Rows for
which
duplicate-key conflicts occur are not updated. Rows for
which columns are
updated to values that would cause data conversion errors
are updated to the
* If you use the LOW_PRIORITY keyword, execution of
the UPDATE is delayed until no other clients are reading from
the table. This affects only storage engines that use only table-level
locking (MyISAM, MEMORY, MERGE). See HIGH_PRIORITY and LOW_PRIORITY clauses
for details.
* If you use the IGNORE keyword, the update statement does
not abort even if errors occur during the update. Rows for which
duplicate-key conflicts occur are not updated. Rows for which columns are
updated to values that would cause data conversion errors are updated to the
closest valid values instead.
UPDATE Statements With the Same Source and Target
PARTITION
---------
From MariaDB 10.3.2, UPDATE statements may have the same
source and target.
See Partition Pruning and Selection for details.
FOR PORTION OF
--------------
MariaDB starting with 10.4.3
----------------------------
See Application Time Periods - Updating by Portion.
UPDATE Statements With the Same Source and Target
-------------------------------------------------
MariaDB starting with 10.3.2
----------------------------
From MariaDB 10.3.2, UPDATE statements may have the same source and target.
For example, given the following table:
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT);
INSERT INTO t1 VALUES (10,10), (20,20);
Until MariaDB 10.3.1, the following UPDATE statement would
not work:
Until MariaDB 10.3.1, the following UPDATE statement would not work:
UPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);
ERROR 1093 (HY000): Table 't1' is specified twice,
both as a target for 'UPDATE' and as a separate source
for data
both as a target for 'UPDATE' and as a separate source for data
From MariaDB 10.3.2, the statement executes successfully:
UPDATE t1 SET c1=c1+1 WHERE c2=(SELECT MAX(c2) FROM t1);
SELECT * FROM t1;
+------+------+
| c1 | c2 |
| c1 | c2 |
+------+------+
| 10 | 10 |
| 21 | 20 |
| 10 | 10 |
| 21 | 20 |
+------+------+
Example
-------
Single-table syntax:
UPDATE table_name SET column1 = value1, column2 = value2
WHERE id=100;
UPDATE table_name SET column1 = value1, column2 = value2 WHERE id=100;
Multiple-table syntax:
UPDATE tab1, tab2 SET tab1.column1 = value1, tab1.column2 =
value2 WHERE tab1.id = tab2.id;
UPDATE tab1, tab2 SET tab1.column1 = value1, tab1.column2 = value2 WHERE
tab1.id = tab2.id;
URL: https://mariadb.com/kb/en/library/update/
URL: mariadb.com/kb/en/update/
# Test case 11: Check that the 'CREATE PROCEDURE' statement
# is supported by prepared statements
PREPARE stmt_1 FROM 'CREATE PROCEDURE p1() SET @a=1';

View File

@ -9,7 +9,7 @@ mysql --ssl -e "call test.have_ssl()"
have_ssl
no
mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
ERROR 2026 (HY000): SSL connection error: SSL is required, but the server does not support it
ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support it
mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
ERROR 2026 (HY000): SSL connection error: SSL is required, but the server does not support it
ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support it
drop procedure have_ssl;

View File

@ -12,5 +12,5 @@ mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
have_ssl
yes
mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
ERROR 2026 (HY000): SSL connection error: Failed to verify the server certificate
ERROR 2026 (HY000): TLS/SSL error: Failed to verify the server certificate
drop procedure have_ssl;

View File

@ -21,6 +21,6 @@ create procedure have_ssl()
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
--echo mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
--replace_regex /SSL connection error.*certificate[^\n]*/SSL connection error: Failed to verify the server certificate/
--replace_regex /TLS\/SSL error.*certificate[^\n]*/TLS\/SSL error: Failed to verify the server certificate/
--exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
drop procedure have_ssl;

View File

@ -2,7 +2,7 @@
# Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BE FOUND
#
# try to connect with wrong '--ssl-ca' path : should fail
ERROR 2026 (HY000): SSL connection error: xxxx
ERROR 2026 (HY000): TLS/SSL error: xxxx
# try to connect with correct '--ssl-ca' path : should connect
have_ssl
1

View File

@ -7,7 +7,7 @@
--echo # try to connect with wrong '--ssl-ca' path : should fail
--replace_regex /SSL connection error.*/SSL connection error: xxxx/
--replace_regex /TLS\/SSL error.*/TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/wrong-cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SELECT (VARIABLE_VALUE <> '') AS have_ssl FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher';" 2>&1
--echo

View File

@ -44,7 +44,7 @@ Ssl_cipher AES128-SHA
SHOW STATUS LIKE 'Ssl_cipher';
Variable_name Value
Ssl_cipher AES128-SHA
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxxVariable_name Value
mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxxVariable_name Value
Ssl_cipher AES256-SHA
Variable_name Value
Ssl_cipher AES128-SHA

View File

@ -54,7 +54,7 @@ EOF
# Test to connect using a specifi cipher
--exec $MYSQL_TEST --ssl-cipher=AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
# Test to connect using an unknown cipher
--replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--remove_file $MYSQLTEST_VARDIR/tmp/test.sql

View File

@ -2,4 +2,4 @@
Variable_name Value
Ssl_version TLS_VERSION
# try logging in with a certificate in the server's --ssl-crl : should fail
ERROR 2026 (HY000): SSL connection error: sslv3 alert certificate revoked
ERROR 2026 (HY000): TLS/SSL error: sslv3 alert certificate revoked

View File

@ -8,6 +8,6 @@
--echo # try logging in with a certificate in the server's --ssl-crl : should fail
# OpenSSL 1.1.1a correctly rejects the certificate, but the error message is different
--replace_regex /ERROR 2013 \(HY000\): Lost connection to server at '.*', system error: [0-9]+/ERROR 2026 (HY000): SSL connection error: sslv3 alert certificate revoked/
--replace_regex /ERROR 2013 \(HY000\): Lost connection to server at '.*', system error: [0-9]+/ERROR 2026 (HY000): TLS\/SSL error: sslv3 alert certificate revoked/
--error 1
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1

View File

@ -1,13 +1,13 @@
# Test clients with and without CRL lists
############ Test mysql ##############
# Test mysql connecting to a server with a certificate revoked by -crl
ERROR 2026 (HY000): SSL connection error: certificate revoked
ERROR 2026 (HY000): TLS/SSL error: certificate revoked
# Test mysql connecting to a server with a certificate revoked by -crlpath
ERROR 2026 (HY000): SSL connection error: certificate revoked
ERROR 2026 (HY000): TLS/SSL error: certificate revoked
############ Test mysqladmin ##############
# Test mysqladmin connecting to a server with a certificate revoked by -crl
mysqladmin: connect to server at 'localhost' failed
error: 'SSL connection error: certificate revoked'
error: 'TLS/SSL error: certificate revoked'
# Test mysqladmin connecting to a server with a certificate revoked by -crlpath
mysqladmin: connect to server at 'localhost' failed
error: 'SSL connection error: certificate revoked'
error: 'TLS/SSL error: certificate revoked'

View File

@ -34,11 +34,11 @@ copy_file $MYSQL_TEST_DIR/std_data/server-cert.crl $MYSQL_TMP_DIR/ed1f42db.r0;
let $admin_suffix = --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping;
--echo # Test mysqladmin connecting to a server with a certificate revoked by -crl
--replace_regex /.*mysqladmin.*:/mysqladmin:/ /SSL connection error: .*CRYPT_E_REVOKED./SSL connection error: certificate revoked/
--replace_regex /.*mysqladmin.*:/mysqladmin:/ /TLS\/SSL error: .*CRYPT_E_REVOKED./TLS\/SSL error: certificate revoked/
--error 1
--exec $MYSQLADMIN $ssl_crl $admin_suffix 2>&1
--echo # Test mysqladmin connecting to a server with a certificate revoked by -crlpath
--replace_regex /.*mysqladmin.*:/mysqladmin:/ /SSL connection error: .*CRYPT_E_REVOKED./SSL connection error: certificate revoked/
--replace_regex /.*mysqladmin.*:/mysqladmin:/ /TLS\/SSL error: .*CRYPT_E_REVOKED./TLS\/SSL error: certificate revoked/
--error 1
--exec $MYSQLADMIN $ssl_crlpath $admin_suffix 2>&1

View File

@ -1 +1 @@
ERROR 2026 (HY000): SSL connection error: Validation of SSL server certificate failed
ERROR 2026 (HY000): TLS/SSL error: Validation of SSL server certificate failed

View File

@ -1322,3 +1322,27 @@ SET timestamp=DEFAULT;
#
# End of 10.4 tests
#
#
# MDEV-29225 make explicit_defaults_for_timestamps SESSION variable
#
set explicit_defaults_for_timestamp=OFF;
create table t1 (f1 timestamp, f2 timestamp);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`f2` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
set explicit_defaults_for_timestamp=ON;
create table t1 (f1 timestamp, f2 timestamp);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`f1` timestamp NULL DEFAULT NULL,
`f2` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
#
# End of 10.10 tests
#

View File

@ -874,7 +874,23 @@ SELECT CASE WHEN a THEN DEFAULT(a) END FROM t1;
DROP TABLE t1;
SET timestamp=DEFAULT;
--echo #
--echo # End of 10.4 tests
--echo #
--echo #
--echo # MDEV-29225 make explicit_defaults_for_timestamps SESSION variable
--echo #
set explicit_defaults_for_timestamp=OFF;
create table t1 (f1 timestamp, f2 timestamp);
show create table t1;
drop table t1;
set explicit_defaults_for_timestamp=ON;
create table t1 (f1 timestamp, f2 timestamp);
show create table t1;
drop table t1;
--echo #
--echo # End of 10.10 tests
--echo #

View File

@ -29,7 +29,7 @@ SET @`a b`:=_latin1 X'68656C6C6F' COLLATE `latin1_swedish_ci`/*!*/;
use `test`/*!*/;
SET TIMESTAMP=10000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -61,7 +61,7 @@ connection default;
# When the connection is closed in this way, the error code should
# be consistent see Bug#2845 for an explanation
# depending on platform/client, either errno 2006 or 2013 can occur below
--error 2006,2013
--error 2006,2013,5014
SELECT 2;
--echo --enable_reconnect;
--enable_reconnect
@ -113,7 +113,7 @@ connection con1;
# When the connection is closed in this way, the error code should
# be consistent see Bug#2845 for an explanation
# depending on platform/client, either errno 2006 or 2013 can occur below
--error 2006,2013
--error 2006,2013,5014
SELECT 2;
--echo --enable_reconnect;
--enable_reconnect

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

View File

@ -59,7 +59,7 @@ ROLLBACK/*!*/;
<#>
use `test`/*!*/;
SET TIMESTAMP=1196959712/*!*/;
<#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
<#>SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -25,7 +25,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -97,7 +97,7 @@ SET INSERT_ID=1/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -163,7 +163,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -208,7 +208,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -253,7 +253,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -280,7 +280,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -325,7 +325,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -368,7 +368,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -430,7 +430,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -460,7 +460,7 @@ SET INSERT_ID=1/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -516,7 +516,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -546,7 +546,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -584,7 +584,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -611,7 +611,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -687,7 +687,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -725,7 +725,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -752,7 +752,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -794,7 +794,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -866,7 +866,7 @@ SET INSERT_ID=1/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -931,7 +931,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -976,7 +976,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1020,7 +1020,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1047,7 +1047,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1092,7 +1092,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1134,7 +1134,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1196,7 +1196,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1226,7 +1226,7 @@ SET INSERT_ID=1/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1282,7 +1282,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1311,7 +1311,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1349,7 +1349,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1376,7 +1376,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1450,7 +1450,7 @@ SET INSERT_ID=3/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773144/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1488,7 +1488,7 @@ SET INSERT_ID=6/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773143/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1515,7 +1515,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1557,7 +1557,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1773142/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -376,7 +376,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -5386,7 +5386,7 @@ DELIMITER /*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -2270,7 +2270,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb3 *//*!*/;
@ -5279,7 +5279,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb3 *//*!*/;
@ -5679,7 +5679,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb3 *//*!*/;
@ -6317,7 +6317,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb3 *//*!*/;

View File

@ -2268,7 +2268,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb3 *//*!*/;
@ -5300,7 +5300,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb3 *//*!*/;
@ -5706,7 +5706,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb3 *//*!*/;
@ -6354,7 +6354,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb3 *//*!*/;

View File

@ -146,7 +146,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -116,7 +116,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -354,7 +354,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -513,7 +513,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -739,7 +739,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -977,7 +977,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -1136,7 +1136,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -22,7 +22,7 @@ START TRANSACTION
#Q> insert into t2 values (@v)
SET TIMESTAMP=10000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -92,7 +92,7 @@ DELIMITER /*!*/;
use `test`/*!*/;
SET TIMESTAMP=XXX/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb3 *//*!*/;

View File

@ -50,7 +50,7 @@ use `new_test1`/*!*/;
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -291,7 +291,7 @@ use `new_test1`/*!*/;
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -21,7 +21,7 @@ SET @`v`:=_ucs2 X'006100620063' COLLATE `ucs2_general_ci`/*!*/;
use `test`/*!*/;
SET TIMESTAMP=10000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -94,7 +94,7 @@ DELIMITER /*!*/;
use `test`/*!*/;
SET TIMESTAMP=XXX/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb3 *//*!*/;

View File

@ -60,7 +60,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -422,7 +422,7 @@ COMMIT
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -120,7 +120,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -361,7 +361,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
@ -523,7 +523,7 @@ ROLLBACK/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0 xid=<xid>
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -771,7 +771,7 @@ DELIMITER /*!*/;
ROLLBACK/*!*/;
SET TIMESTAMP=t/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=0/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -18,7 +18,7 @@ ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=<TIMESTAMP>/*!*/;
SET @@session.pseudo_thread_id=<PSEUDO_THREAD_ID>/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;

View File

@ -59,28 +59,7 @@ COUNT(*) = 2
1
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
hostname1-bin.000001 # Gtid # # GTID #-#-#
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
hostname1-bin.000001 # Table_map # # table_id: # (test.t1)
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
hostname1-bin.000001 # Xid # # COMMIT /* XID */
hostname1-bin.000001 # Gtid # # GTID #-#-#
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
hostname1-bin.000001 # Xid # # COMMIT /* XID */
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
hostname1-bin.000001 # Xid # # COMMIT /* XID */
hostname1-bin.000001 # Gtid # # GTID #-#-#
hostname1-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
hostname1-bin.000001 # Rotate # # hostname1-bin.000002;pos=4
hostname1-bin.000002 # Binlog_checkpoint # # hostname1-bin.000002
DROP TABLE t1;
DROP TABLE t2;
#cleanup

View File

@ -59,28 +59,7 @@ COUNT(*) = 2
1
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
hostname1-bin.000001 # Gtid # # GTID #-#-#
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
hostname1-bin.000001 # Table_map # # table_id: # (test.t1)
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
hostname1-bin.000001 # Xid # # COMMIT /* XID */
hostname1-bin.000001 # Gtid # # GTID #-#-#
hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
hostname1-bin.000001 # Xid # # COMMIT /* XID */
hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
hostname1-bin.000001 # Xid # # COMMIT /* XID */
hostname1-bin.000001 # Gtid # # GTID #-#-#
hostname1-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
hostname1-bin.000001 # Rotate # # hostname1-bin.000002;pos=4
hostname1-bin.000002 # Binlog_checkpoint # # hostname1-bin.000002
DROP TABLE t1;
DROP TABLE t2;
#cleanup

View File

@ -34,7 +34,6 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER;
--connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
--let $MASTER_MYPORT=$NODE_MYPORT_2
--source include/show_binlog_events.inc
DROP TABLE t1;

View File

@ -74,7 +74,6 @@ let $restart_noprint=2;
--connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
--let $MASTER_MYPORT=$NODE_MYPORT_2
--source include/show_binlog_events.inc
DROP TABLE t1;

View File

@ -19,24 +19,9 @@ SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
COUNT(*)
1
CREATE TEMPORARY TABLE big (a TEXT) ENGINE=INNODB;
SELECT COUNT(*) FROM information_schema.innodb_buffer_page
WHERE table_name = '`test`.`t`';
COUNT(*)
1
INSERT INTO big SELECT REPEAT('a', 1024) FROM seq_1_to_10240;
SELECT COUNT(*) FROM information_schema.innodb_buffer_page
WHERE table_name = '`test`.`t`';
COUNT(*)
0
SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
AND update_time IS NOT NULL;
COUNT(*)
1
DROP TEMPORARY TABLE big;
# Test the behavior after restart with a prepared XA transaction
XA START 'xatrx';
INSERT INTO t VALUES (5);
DELETE FROM t;
XA END 'xatrx';
XA PREPARE 'xatrx';
CONNECT con1,localhost,root,,;

View File

@ -5,12 +5,8 @@
-- echo #
-- source include/have_innodb.inc
-- source include/have_innodb_max_16k.inc
# restart does not work with embedded
-- source include/not_embedded.inc
# This test is slow on buildbot.
--source include/big_test.inc
--source include/have_sequence.inc
CREATE TABLE t (a INT) ENGINE=INNODB STATS_PERSISTENT=0;
@ -28,29 +24,10 @@ AND update_time IS NOT NULL;
SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
CREATE TEMPORARY TABLE big (a TEXT) ENGINE=INNODB;
SELECT COUNT(*) FROM information_schema.innodb_buffer_page
WHERE table_name = '`test`.`t`';
# evict table 't' by inserting as much data as the BP size itself
INSERT INTO big SELECT REPEAT('a', 1024) FROM seq_1_to_10240;
# confirm that all pages for table 't' have been evicted
SELECT COUNT(*) FROM information_schema.innodb_buffer_page
WHERE table_name = '`test`.`t`';
# The result from this query will change once update_time becomes persistent
# (WL#6917).
SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
AND update_time IS NOT NULL;
DROP TEMPORARY TABLE big;
-- echo # Test the behavior after restart with a prepared XA transaction
XA START 'xatrx';
INSERT INTO t VALUES (5);
DELETE FROM t;
XA END 'xatrx';
XA PREPARE 'xatrx';

View File

@ -53,3 +53,13 @@ show_misc: todo
show_plugin: todo
status_reprepare:why P_S filters out Com_* variables?
processlist: todo
processlist_acl: todo
processlist_port: todo
processlist_no_pfs: todo
ddl_processlist: todo
dml_processlist: todo
processlist_57: todo
processlist_anonymous: todo
processlist_reg_user: todo

View File

@ -0,0 +1,39 @@
# ../include/processlist_load.inc
#
# SUMMARY
#
# Execute PROCESSLIST queries, sorted by user
#
# USAGE
#
# Example: Using processlist_set.inc to set @@global.performance_schema_show_processlist
#
# let $pfs_spl = on/off
# --source ../include/processlist_set.inc
# --source ../include/processlist_load.inc
#
# Columns
# 1 <Id> 2 <User> 3 <Host> 4 <db> 5 <Command> 6 <Time> 7 <State> 8 <Info>
# Sort SHOW PROCESSLIST by User instead of Id because Id is not zero-padded
# Unique usernames give best results
--echo
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_regex /Daemon/<Command>/ /Connect/<Command>/ /Sleep/<Command>/
--sorted_result
SHOW FULL PROCESSLIST;
--echo
--echo # Performance Schema processlist table
--echo
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_regex /Daemon/<Command>/ /Connect/<Command>/ /Sleep/<Command>/
select * from performance_schema.processlist order by user, id;
--echo
--echo # Information Schema processlist table
--echo
--replace_column 1 <Id> 3 <Host> 6 <Time> 7 <State>
--replace_regex /Daemon/<Command>/ /Connect/<Command>/ /Sleep/<Command>/
select * from information_schema.processlist order by user, id;

View File

@ -0,0 +1,17 @@
# ../include/processlist_set.inc
#
# SUMMARY
#
# Set the value of performance_schema_show_proceslist then
# wait for the operation to complete
#
# USAGE
#
# let $pfs_spl = on;
# --source ../include/processlist_set.inc
eval set @@global.performance_schema_show_processlist = $pfs_spl;
let $wait_condition = show variables where variable_name like '%show_processlist%' and value = '$pfs_spl';
--source include/wait_condition.inc

View File

@ -0,0 +1,20 @@
select @@global.performance_schema_show_processlist into @save_processlist;
set @@global.performance_schema_show_processlist = 'on';
alter table performance_schema.processlist
add column foo integer;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
truncate table performance_schema.processlist;
ERROR HY000: Invalid performance_schema usage.
alter table performance_schema.processlist
add index test_index(info);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
create unique index test_index
on performance_schema.processlist(host);
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
drop index `PRIMARY`
on performance_schema.processlist;
ERROR 42000: Access denied for user 'root'@'localhost' to database 'performance_schema'
CREATE TABLE test.create_select
AS SELECT * from performance_schema.processlist;
DROP TABLE test.create_select;
set @@global.performance_schema_show_processlist = @save_processlist;

View File

@ -0,0 +1,24 @@
select @@global.performance_schema_show_processlist into @save_processlist;
set @@global.performance_schema_show_processlist = 'on';
select * from performance_schema.processlist
where user like 'event_scheduler';
select * from performance_schema.processlist
where user = 'FOO';
insert into performance_schema.processlist
values (12, 'foo', 'bar', 'test', null, 1000, 'state', 'info');
ERROR 42000: INSERT command denied to user 'root'@'localhost' for table 'processlist'
update performance_schema.processlist
set id=12, user='foo';
ERROR 42000: UPDATE command denied to user 'root'@'localhost' for table 'processlist'
delete from performance_schema.processlist
where id <> 99;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'processlist'
delete from performance_schema.processlist;
ERROR 42000: DELETE command denied to user 'root'@'localhost' for table 'processlist'
LOCK TABLES performance_schema.processlist READ;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'processlist'
UNLOCK TABLES;
LOCK TABLES performance_schema.processlist WRITE;
ERROR 42000: SELECT, LOCK TABLES command denied to user 'root'@'localhost' for table 'processlist'
UNLOCK TABLES;
set @@global.performance_schema_show_processlist = @save_processlist;

View File

@ -0,0 +1,106 @@
CREATE USER user1@localhost;
CREATE USER user2@localhost;
CREATE USER user3@localhost;
grant ALL on *.* to user1@localhost;
grant ALL on *.* to user2@localhost;
grant ALL on *.* to user3@localhost;
TRUNCATE TABLE performance_schema.accounts;
FLUSH PRIVILEGES;
CREATE TABLE test.t_range(a int, b int, PRIMARY KEY(a));
INSERT INTO test.t_range values (1, 1), (2,2), (3, 3), (4, 4), (5, 5);
INSERT INTO test.t_range values (6, 6), (7,7), (8, 8), (9, 9), (10, 10);
FLUSH STATUS;
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
a b
3 3
4 4
5 5
SELECT * from performance_schema.session_status
WHERE VARIABLE_NAME = 'Select_range';
VARIABLE_NAME VARIABLE_VALUE
Select_range 1
VARIABLE_NAME DELTA
Select_range 1
connect con1, localhost, user1,,;
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
a b
3 3
4 4
5 5
SELECT * from performance_schema.session_status
WHERE VARIABLE_NAME = 'Select_range';
VARIABLE_NAME VARIABLE_VALUE
Select_range 1
VARIABLE_NAME DELTA
Select_range 2
connect con2, localhost, user2,,;
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
a b
3 3
4 4
5 5
SELECT * from test.t_range where (a >= 4) AND (a <= 6);
a b
4 4
5 5
6 6
SELECT * from performance_schema.session_status
WHERE VARIABLE_NAME = 'Select_range';
VARIABLE_NAME VARIABLE_VALUE
Select_range 2
VARIABLE_NAME DELTA
Select_range 4
connect con3, localhost, user3,,;
SELECT * from test.t_range where (a >= 3) AND (a <= 5);
a b
3 3
4 4
5 5
SELECT * from test.t_range where (a >= 4) AND (a <= 6);
a b
4 4
5 5
6 6
SELECT * from test.t_range where (a >= 5) AND (a <= 7);
a b
5 5
6 6
7 7
SELECT * from performance_schema.session_status
WHERE VARIABLE_NAME = 'Select_range';
VARIABLE_NAME VARIABLE_VALUE
Select_range 3
VARIABLE_NAME DELTA
Select_range 7
connection default;
VARIABLE_NAME DELTA
Select_range 7
SELECT `USER`, `HOST`, VARIABLE_NAME, VARIABLE_VALUE
FROM performance_schema.status_by_account WHERE VARIABLE_NAME = 'Select_range'
AND `USER` LIKE 'user%'
ORDER BY `USER`;
USER HOST VARIABLE_NAME VARIABLE_VALUE
user1 localhost Select_range 1
user2 localhost Select_range 2
user3 localhost Select_range 3
disconnect con1;
disconnect con2;
VARIABLE_NAME DELTA
Select_range 7
TRUNCATE TABLE performance_schema.accounts;
VARIABLE_NAME DELTA
Select_range 7
disconnect con3;
VARIABLE_NAME DELTA
Select_range 7
TRUNCATE TABLE performance_schema.accounts;
VARIABLE_NAME DELTA
Select_range 7
DROP TABLE test.t_range;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user1@localhost;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user2@localhost;
REVOKE ALL PRIVILEGES, GRANT OPTION FROM user3@localhost;
DROP USER user1@localhost;
DROP USER user2@localhost;
DROP USER user3@localhost;
FLUSH PRIVILEGES;

View File

@ -0,0 +1,201 @@
##
## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
##
## Test cases:
## 1. Execute the new SHOW [FULL] PROCESSLIST and SELECT on performance_schema.processlist
## 2. Execute the legacy SHOW [FULL] PROCESSLIST and SELECT on information_schema.processlist
## 3. Verify that performance_schema_show_processlist = ON executes the new implementation
## 4. Verify that performance_schema_show_processlist = OFF executes the legacy code path
##
## Results must be manually verified.
### Setup ###
select @@global.performance_schema_show_processlist into @save_processlist;
create user user1@localhost, user2@localhost,
user3@localhost, user4@localhost;
grant ALL on *.* to user1@localhost;
grant ALL on *.* to user2@localhost;
grant ALL on *.* to user3@localhost;
grant ALL on *.* to user4@localhost;
flush privileges;
use test;
create table test.t1 (s1 int, s2 int, s3 int, s4 int);
# Switch to (con0, localhost, root, , )
insert into test.t1 values(1, 1, 1, 1);
insert into test.t1 values(2, 2, 2, 2);
insert into test.t1 values(3, 3, 3, 3);
insert into test.t1 values(4, 4, 4, 4);
# Lock test.t1, insert/update/deletes will block
lock tables t1 read;
# Connect (con1, localhost, user1, , )
insert into test.t1 values (0, 0, 0, 0);
# Connect (con2, localhost, user2, , )
update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999;;
# Connect (con3, localhost, user3, , )
delete from test.t1 where s1 = 3;
# Connect (con4, localhost, user4, , )
insert into test.t1 values (4, 4, 4, 4);
# Connection default
# Wait for queries to appear in the processlist table
### Execute new SHOW [FULL] PROCESSLIST and SELECT on performance_schema.processlist
set @@global.performance_schema_show_processlist = on;
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> root <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
# Performance Schema processlist table
select * from performance_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
# Information Schema processlist table
select * from information_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
### Execute legacy SHOW [FULL] PROCESSLIST and SELECT on information_schema.processlist
set @@global.performance_schema_show_processlist = off;
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> root <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
# Performance Schema processlist table
select * from performance_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
# Information Schema processlist table
select * from information_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> user1 <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user2 <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2, s3 = s3 + 3, s4 = ((s4 + 4) * (s4 + 5)) + 12345 + 67890 + 11111 + 22222 + 33333 + 44444 + 55555 + 99999
<Id> user3 <Host> test Query <Time> <State> delete from test.t1 where s1 = 3
<Id> user4 <Host> test Query <Time> <State> insert into test.t1 values (4, 4, 4, 4)
### Verify feature code path
# Enable SHOW PROCESSLIST via the Performance Schema
set @@global.performance_schema_show_processlist = on;
# Connection default, send SHOW PROCESSLIST
SET DEBUG_SYNC='pfs_show_processlist_performance_schema SIGNAL pfs_processlist_pfs WAIT_FOR continue';
SHOW FULL PROCESSLIST;
# Connection con0
SET DEBUG_SYNC='now WAIT_FOR pfs_processlist_pfs';
SET DEBUG_SYNC='now SIGNAL continue';
# Connection default, reap
Id User Host db Command Time State Info
<Id> event_scheduler <Host> NULL <Command> <Time> <State> <Info>
<Id> root <Host> test <Command> <Time> <State> <Info>
<Id> root <Host> test <Command> <Time> <State> <Info>
<Id> user1 <Host> test <Command> <Time> <State> <Info>
<Id> user2 <Host> test <Command> <Time> <State> <Info>
<Id> user3 <Host> test <Command> <Time> <State> <Info>
<Id> user4 <Host> test <Command> <Time> <State> <Info>
### Verify legacy code path
# Enable the legacy SHOW PROCESSLIST
set @@global.performance_schema_show_processlist = off;
# Connection default, send SHOW PROCESSLIST
SET DEBUG_SYNC='RESET';
SET DEBUG_SYNC='pfs_show_processlist_legacy SIGNAL pfs_processlist_legacy WAIT_FOR continue';
SHOW FULL PROCESSLIST;
# Connection con0
SET DEBUG_SYNC='now WAIT_FOR pfs_processlist_legacy';
SET DEBUG_SYNC='now SIGNAL continue';
# Connection default, reap
Id User Host db Command Time State Info
<Id> event_scheduler <Host> NULL <Command> <Time> <State> <Info>
<Id> root <Host> test <Command> <Time> <State> <Info>
<Id> root <Host> test <Command> <Time> <State> <Info>
<Id> user1 <Host> test <Command> <Time> <State> <Info>
<Id> user2 <Host> test <Command> <Time> <State> <Info>
<Id> user3 <Host> test <Command> <Time> <State> <Info>
<Id> user4 <Host> test <Command> <Time> <State> <Info>
### Clean up ###
# Connection con0, unlock test.t1, disconnect
unlock tables;
# Connection con1, reap, disconnect
# Connection con2, reap, disconnect
# Connection con3, reap, disconnect
# Connection con4, reap, disconnect
# Connection default
drop table test.t1;
drop user user1@localhost;
drop user user2@localhost;
drop user user3@localhost;
drop user user4@localhost;
set @@global.performance_schema_show_processlist = @save_processlist;

View File

@ -0,0 +1,345 @@
call mtr.add_suppression("Optional native table 'performance_schema'.'processlist' has the wrong structure or is missing.");
call mtr.add_suppression("Column count of performance_schema.processlist is wrong. Expected 8, found 2. The table is probably corrupted");
##
## Verify fresh 5.7 instance
##
SELECT @@global.performance_schema_show_processlist;
@@global.performance_schema_show_processlist
0
SHOW CREATE TABLE performance_schema.processlist;
Table Create Table
processlist CREATE TABLE `processlist` (
`ID` bigint(20) unsigned NOT NULL,
`USER` varchar(32) DEFAULT NULL,
`HOST` varchar(66) DEFAULT NULL,
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) DEFAULT NULL,
`TIME` bigint(20) DEFAULT NULL,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
##
## Simulate old 5.7 instance
##
DROP TABLE performance_schema.processlist;
SHOW CREATE TABLE performance_schema.processlist;
ERROR 42S02: Table 'performance_schema.processlist' doesn't exist
##
## Server shutdown
##
##
### Server restart
##
##
## Verify old 5.7 instance
##
SELECT @@global.performance_schema_show_processlist;
@@global.performance_schema_show_processlist
0
SHOW CREATE TABLE performance_schema.processlist;
ERROR 42S02: Table 'performance_schema.processlist' doesn't exist
SELECT * FROM performance_schema.processlist;
ERROR 42S02: Table 'performance_schema.processlist' doesn't exist
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
SET GLOBAL performance_schema_show_processlist = 'ON';
SELECT * FROM performance_schema.processlist;
ERROR 42S02: Table 'performance_schema.processlist' doesn't exist
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
ERROR 42S02: Table 'performance_schema.processlist' doesn't exist
##
## Perform broken upgrade (case 1)
##
CREATE TABLE performance_schema.processlist (a int, b int);
SHOW CREATE TABLE performance_schema.processlist;
Table Create Table
processlist CREATE TABLE `processlist` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8
SET GLOBAL performance_schema_show_processlist = 'OFF';
SELECT * FROM performance_schema.processlist;
a b
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
SET GLOBAL performance_schema_show_processlist = 'ON';
SELECT * FROM performance_schema.processlist;
a b
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
ERROR 42S22: Unknown column 'ID' in 'field list'
##
## Server shutdown
##
##
### Server restart
##
SHOW CREATE TABLE performance_schema.processlist;
Table Create Table
processlist CREATE TABLE `processlist` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8
SET GLOBAL performance_schema_show_processlist = 'OFF';
SELECT * FROM performance_schema.processlist;
a b
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
SET GLOBAL performance_schema_show_processlist = 'ON';
SELECT * FROM performance_schema.processlist;
a b
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
ERROR 42S22: Unknown column 'ID' in 'field list'
##
## Perform broken upgrade (case 2)
##
DROP TABLE performance_schema.processlist;
CREATE TABLE performance_schema.processlist (
`ID` bigint(20) unsigned NOT NULL,
`USER` varchar(32) DEFAULT NULL,
`HOST` varchar(66) DEFAULT NULL,
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) DEFAULT NULL,
`TIME` bigint(20) DEFAULT NULL,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
);
SHOW CREATE TABLE performance_schema.processlist;
Table Create Table
processlist CREATE TABLE `processlist` (
`ID` bigint(20) unsigned NOT NULL,
`USER` varchar(32) DEFAULT NULL,
`HOST` varchar(66) DEFAULT NULL,
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) DEFAULT NULL,
`TIME` bigint(20) DEFAULT NULL,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8
SET GLOBAL performance_schema_show_processlist = 'OFF';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
SET GLOBAL performance_schema_show_processlist = 'ON';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
##
## Server shutdown
##
##
### Server restart
##
SHOW CREATE TABLE performance_schema.processlist;
Table Create Table
processlist CREATE TABLE `processlist` (
`ID` bigint(20) unsigned NOT NULL,
`USER` varchar(32) DEFAULT NULL,
`HOST` varchar(66) DEFAULT NULL,
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) DEFAULT NULL,
`TIME` bigint(20) DEFAULT NULL,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8
SET GLOBAL performance_schema_show_processlist = 'OFF';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
SET GLOBAL performance_schema_show_processlist = 'ON';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
##
## Perform broken upgrade (case 3)
##
DROP TABLE performance_schema.processlist;
CREATE TABLE performance_schema.processlist
LIKE INFORMATION_SCHEMA.PROCESSLIST;
SHOW CREATE TABLE performance_schema.processlist;
Table Create Table
processlist CREATE TABLE `processlist` (
`ID` bigint(21) unsigned NOT NULL DEFAULT '0',
`USER` varchar(32) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
`TIME` int(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8
SET GLOBAL performance_schema_show_processlist = 'OFF';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
SET GLOBAL performance_schema_show_processlist = 'ON';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
##
## Server shutdown
##
##
### Server restart
##
SHOW CREATE TABLE performance_schema.processlist;
Table Create Table
processlist CREATE TABLE `processlist` (
`ID` bigint(21) unsigned NOT NULL DEFAULT '0',
`USER` varchar(32) NOT NULL DEFAULT '',
`HOST` varchar(64) NOT NULL DEFAULT '',
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) NOT NULL DEFAULT '',
`TIME` int(7) NOT NULL DEFAULT '0',
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
) ENGINE=InnoDB DEFAULT CHARSET=utf8
SET GLOBAL performance_schema_show_processlist = 'OFF';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
SET GLOBAL performance_schema_show_processlist = 'ON';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
##
## Perform correct upgrade
##
DROP TABLE performance_schema.processlist;
CREATE TABLE performance_schema.processlist (
`ID` bigint(20) unsigned NOT NULL,
`USER` varchar(32) DEFAULT NULL,
`HOST` varchar(66) DEFAULT NULL,
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) DEFAULT NULL,
`TIME` bigint(20) DEFAULT NULL,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
) ENGINE = 'PERFORMANCE_SCHEMA';
SHOW CREATE TABLE performance_schema.processlist;
Table Create Table
processlist CREATE TABLE `processlist` (
`ID` bigint(20) unsigned NOT NULL,
`USER` varchar(32) DEFAULT NULL,
`HOST` varchar(66) DEFAULT NULL,
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) DEFAULT NULL,
`TIME` bigint(20) DEFAULT NULL,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
SET GLOBAL performance_schema_show_processlist = 'OFF';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] Sending data SELECT * FROM performance_schema.processlist
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
SET GLOBAL performance_schema_show_processlist = 'ON';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] Sending data SELECT * FROM performance_schema.processlist
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] Sending data SHOW PROCESSLIST
##
## Server shutdown
##
##
### Server restart
##
SHOW CREATE TABLE performance_schema.processlist;
Table Create Table
processlist CREATE TABLE `processlist` (
`ID` bigint(20) unsigned NOT NULL,
`USER` varchar(32) DEFAULT NULL,
`HOST` varchar(66) DEFAULT NULL,
`DB` varchar(64) DEFAULT NULL,
`COMMAND` varchar(16) DEFAULT NULL,
`TIME` bigint(20) DEFAULT NULL,
`STATE` varchar(64) DEFAULT NULL,
`INFO` longtext
) ENGINE=PERFORMANCE_SCHEMA DEFAULT CHARSET=utf8
SET GLOBAL performance_schema_show_processlist = 'OFF';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] Sending data SELECT * FROM performance_schema.processlist
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] starting SHOW PROCESSLIST
SET GLOBAL performance_schema_show_processlist = 'ON';
SELECT * FROM performance_schema.processlist;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] Sending data SELECT * FROM performance_schema.processlist
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST;
ID USER HOST DB COMMAND TIME STATE INFO
2 root [HOST:PORT] test Query [TIME] executing SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST
SHOW PROCESSLIST;
Id User Host db Command Time State Info
2 root [HOST:PORT] test Query [TIME] Sending data SHOW PROCESSLIST
SET GLOBAL performance_schema_show_processlist = 'OFF';

View File

@ -0,0 +1,255 @@
##
## Test the Performance Schema-based implementation of SHOW PROCESSLIST.
##
## Verify handling of the SELECT and PROCESS privileges.
##
## Test cases:
## - Execute SHOW PROCESSLIST (new and legacy) with all privileges
## - Execute SELECT on the performance_schema.processlist and information_schema.processlist with all privileges
## - Execute SHOW PROCESSLIST (new and legacy) with no privileges
## - Execute SELECT on the performance_schema.processlist and information_schema.processlist with no privileges
##
## Results must be manually verified.
### Setup ###
select @@global.performance_schema_show_processlist into @save_processlist;
# Control users
create user user_00@localhost, user_01@localhost;
grant ALL on *.* to user_00@localhost;
grant ALL on *.* to user_01@localhost;
# Test users
create user user_all@localhost, user_none@localhost;
grant ALL on *.* to user_all@localhost;
grant USAGE on *.* to user_none@localhost;
flush privileges;
show grants for user_all@localhost;
Grants for user_all@localhost
GRANT ALL PRIVILEGES ON *.* TO 'user_all'@'localhost'
show grants for user_none@localhost;
Grants for user_none@localhost
GRANT USAGE ON *.* TO 'user_none'@'localhost'
use test;
create table test.t1 (s1 int, s2 int, s3 int, s4 int);
# Connect (con_00, localhost, user_00, , )
# Connect (con_01, localhost, user_01, , )
insert into test.t1 values(1, 1, 1, 1);
insert into test.t1 values(2, 2, 2, 2);
insert into test.t1 values(3, 3, 3, 3);
insert into test.t1 values(4, 4, 4, 4);
# Lock test.t1, insert/update/deletes will block
lock tables t1 read;
# Establish 2 connections for user_all
# Connect (con_all_1, localhost, user_all, , )
# Connect (con_all_2, localhost, user_all, , )
insert into test.t1 values (0, 0, 0, 0);
# Establish 4 connections for user_none
# Connect (con_none_1, localhost, user_none, , )
# Connect (con_none_2, localhost, user_none, , )
# Connect (con_none_3, localhost, user_none, , )
# Connect (con_none_4, localhost, user_none, , )
update test.t1 set s1 = s1 + 1, s2 = s2 + 2;;
# Connection con_all_1
# Wait for queries to appear in the processlist table
### Execute SHOW PROCESSLIST with all privileges
### Expect all users
# New SHOW PROCESSLIST
set @@global.performance_schema_show_processlist = on;
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> user_00 <Host> test <Command> <Time> <State> NULL
<Id> user_01 <Host> test <Command> <Time> <State> NULL
<Id> user_all <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
# Performance Schema processlist table
select * from performance_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> user_00 <Host> test <Command> <Time> <State> NULL
<Id> user_01 <Host> test <Command> <Time> <State> NULL
<Id> user_all <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
# Information Schema processlist table
select * from information_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> user_00 <Host> test <Command> <Time> <State> NULL
<Id> user_01 <Host> test <Command> <Time> <State> NULL
<Id> user_all <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
# Legacy SHOW PROCESSLIST
set @@global.performance_schema_show_processlist = off;
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> user_00 <Host> test <Command> <Time> <State> NULL
<Id> user_01 <Host> test <Command> <Time> <State> NULL
<Id> user_all <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
# Performance Schema processlist table
select * from performance_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> user_00 <Host> test <Command> <Time> <State> NULL
<Id> user_01 <Host> test <Command> <Time> <State> NULL
<Id> user_all <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
# Information Schema processlist table
select * from information_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> event_scheduler <Host> NULL <Command> <Time> <State> NULL
<Id> root <Host> test <Command> <Time> <State> NULL
<Id> user_00 <Host> test <Command> <Time> <State> NULL
<Id> user_01 <Host> test <Command> <Time> <State> NULL
<Id> user_all <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
<Id> user_all <Host> test Query <Time> <State> insert into test.t1 values (0, 0, 0, 0)
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
### Execute SHOW PROCESSLIST with no SELECT and no PROCESS privileges
### Expect processes only from user_none
# New SHOW PROCESSLIST
set @@global.performance_schema_show_processlist = on;
# Connection con_none_1
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
# Performance Schema processlist table
select * from performance_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> user_none <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
# Information Schema processlist table
select * from information_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> user_none <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
# Confirm that only processes from user_none are visible
select count(*) as "Expect 0" from performance_schema.processlist
where user not in ('user_none');
Expect 0
0
# Legacy SHOW PROCESSLIST
set @@global.performance_schema_show_processlist = off;
# Connection con_none_1
SHOW FULL PROCESSLIST;
Id User Host db Command Time State Info
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> SHOW FULL PROCESSLIST
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
# Performance Schema processlist table
select * from performance_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> user_none <Host> test Query <Time> <State> select * from performance_schema.processlist order by user, id
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
# Information Schema processlist table
select * from information_schema.processlist order by user, id;
ID USER HOST DB COMMAND TIME STATE INFO
<Id> user_none <Host> test Query <Time> <State> select * from information_schema.processlist order by user, id
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test <Command> <Time> <State> NULL
<Id> user_none <Host> test Query <Time> <State> update test.t1 set s1 = s1 + 1, s2 = s2 + 2
### Clean up ###
# Disconnect con_00
# Connection con_01, unlock test.t1, disconnect
unlock tables;
# Disconnect con_all_1
# Reap con_all_2, disconnect
# Disconnect con_none_1
# Disconnect con_none_2
# Disconnect con_none_3
# Reap con_none_4, disconnect
# Connection default
drop table test.t1;
drop user user_00@localhost;
drop user user_01@localhost;
drop user user_all@localhost;
drop user user_none@localhost;
set @@global.performance_schema_show_processlist = @save_processlist;

Some files were not shown because too many files have changed in this diff Show More