Merge branch '10.9' into 10.10

This commit is contained in:
Oleksandr Byelkin 2022-08-09 09:47:16 +02:00
commit 4c18f68d59
585 changed files with 10999 additions and 4575 deletions
client
cmake
extra
include
libmariadb
man
mysql-test

View file

@ -148,6 +148,7 @@ static ulonglong opt_system= 0ULL;
static my_bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0,
select_field_names_inited= 0;
static ulong opt_max_allowed_packet, opt_net_buffer_length;
static double opt_max_statement_time= 0.0;
static MYSQL mysql_connection,*mysql=0;
static DYNAMIC_STRING insert_pat, select_field_names;
static char *opt_password=0,*current_user=0,
@ -164,6 +165,7 @@ static my_bool server_supports_switching_charsets= TRUE;
static ulong opt_compatible_mode= 0;
#define MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL 1
#define MYSQL_OPT_MASTER_DATA_COMMENTED_SQL 2
#define MYSQL_OPT_MAX_STATEMENT_TIME 0
#define MYSQL_OPT_SLAVE_DATA_EFFECTIVE_SQL 1
#define MYSQL_OPT_SLAVE_DATA_COMMENTED_SQL 2
static uint opt_mysql_port= 0, opt_master_data;
@ -475,6 +477,10 @@ static struct my_option my_long_options[] =
&opt_max_allowed_packet, &opt_max_allowed_packet, 0,
GET_ULONG, REQUIRED_ARG, 24*1024*1024, 4096,
(longlong) 2L*1024L*1024L*1024L, MALLOC_OVERHEAD, 1024, 0},
{"max-statement-time", MYSQL_OPT_MAX_STATEMENT_TIME,
"Max statement execution time. If unset, overrides server default with 0.",
&opt_max_statement_time, &opt_max_statement_time, 0, GET_DOUBLE,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"net_buffer_length", OPT_NET_BUFFER_LENGTH,
"The buffer size for TCP/IP and socket communication.",
&opt_net_buffer_length, &opt_net_buffer_length, 0,
@ -3219,9 +3225,8 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
if (strcmp(field->name, "View") == 0)
{
char *scv_buff= NULL;
my_ulonglong n_cols;
verbose_msg("-- It's a view, create dummy table for view\n");
verbose_msg("-- It's a view, create dummy view for view\n");
/* save "show create" statement for later */
if ((row= mysql_fetch_row(result)) && (scv_buff=row[1]))
@ -3230,9 +3235,9 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
mysql_free_result(result);
/*
Create a table with the same name as the view and with columns of
Create a view with the same name as the view and with columns of
the same name in order to satisfy views that depend on this view.
The table will be removed when the actual view is created.
The view will be removed when the actual view is created.
The properties of each column, are not preserved in this temporary
table, because they are not necessary.
@ -3264,23 +3269,9 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
else
my_free(scv_buff);
n_cols= mysql_num_rows(result);
if (0 != n_cols)
if (mysql_num_rows(result) != 0)
{
/*
The actual formula is based on the column names and how the .FRM
files are stored and is too volatile to be repeated here.
Thus we simply warn the user if the columns exceed a limit we
know works most of the time.
*/
if (n_cols >= 1000)
fprintf(stderr,
"-- Warning: Creating a stand-in table for view %s may"
" fail when replaying the dump file produced because "
"of the number of columns exceeding 1000. Exercise "
"caution when replaying the produced dump file.\n",
table);
if (opt_drop)
{
/*
@ -3296,7 +3287,7 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
fprintf(sql_file,
"SET @saved_cs_client = @@character_set_client;\n"
"SET character_set_client = utf8;\n"
"/*!50001 CREATE TABLE %s (\n",
"/*!50001 CREATE VIEW %s AS SELECT\n",
result_table);
/*
@ -3308,28 +3299,21 @@ static uint get_table_structure(const char *table, const char *db, char *table_t
row= mysql_fetch_row(result);
/*
The actual column type doesn't matter anyway, since the table will
The actual column value doesn't matter anyway, since the view will
be dropped at run time.
We do tinyint to avoid hitting the row size limit.
*/
fprintf(sql_file, " %s tinyint NOT NULL",
fprintf(sql_file, " 1 AS %s",
quote_name(row[0], name_buff, 0));
while((row= mysql_fetch_row(result)))
{
/* col name, col type */
fprintf(sql_file, ",\n %s tinyint NOT NULL",
fprintf(sql_file, ",\n 1 AS %s",
quote_name(row[0], name_buff, 0));
}
/*
Stand-in tables are always MyISAM tables as the default
engine might have a column-limit that's lower than the
number of columns in the view, and MyISAM support is
guaranteed to be in the server anyway.
*/
fprintf(sql_file,
"\n) ENGINE=MyISAM */;\n"
" */;\n"
"SET character_set_client = @saved_cs_client;\n");
check_io(sql_file);
@ -6852,15 +6836,8 @@ static my_bool get_view_structure(char *table, char* db)
"\n--\n-- Final view structure for view %s\n--\n\n",
fix_for_comment(result_table));
/* Table might not exist if this view was dumped with --tab. */
fprintf(sql_file, "/*!50001 DROP TABLE IF EXISTS %s*/;\n", opt_quoted_table);
if (opt_drop)
{
fprintf(sql_file, "/*!50001 DROP VIEW IF EXISTS %s*/;\n",
opt_quoted_table);
check_io(sql_file);
}
/* View might not exist if this view was dumped with --tab. */
fprintf(sql_file, "/*!50001 DROP VIEW IF EXISTS %s*/;\n", opt_quoted_table);
my_snprintf(query, sizeof(query),
"SELECT CHECK_OPTION, DEFINER, SECURITY_TYPE, "
@ -7032,6 +7009,7 @@ static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size)
int main(int argc, char **argv)
{
char query[48];
char bin_log_name[FN_REFLEN];
int exit_code;
int consistent_binlog_pos= 0;
@ -7073,6 +7051,13 @@ int main(int argc, char **argv)
if (!path)
write_header(md_result_file, *argv);
/* Set MAX_STATEMENT_TIME to 0 unless set in client */
my_snprintf(query, sizeof(query), "/*!100100 SET @@MAX_STATEMENT_TIME=%f */", opt_max_statement_time);
mysql_query(mysql, query);
/* Set server side timeout between client commands to server compiled-in default */
mysql_query(mysql, "/*!100100 SET WAIT_TIMEOUT=DEFAULT */");
/* Check if the server support multi source */
if (mysql_get_server_version(mysql) >= 100000)
{

View file

@ -574,13 +574,15 @@ static void safe_exit(int error, MYSQL *mysql)
if (mysql)
mysql_close(mysql);
mysql_library_end();
free_defaults(argv_to_free);
my_free(opt_password);
if (error)
sf_leaking_memory= 1; /* dirty exit, some threads are still running */
else
{
mysql_library_end();
free_defaults(argv_to_free);
my_free(opt_password);
my_end(my_end_arg); /* clean exit */
}
exit(error);
}

View file

@ -271,7 +271,7 @@ ELSEIF(RPM MATCHES "fedora" OR RPM MATCHES "(rhel|centos)7")
ALTERNATIVE_NAME("server" "mariadb-server")
ALTERNATIVE_NAME("server" "mysql-compat-server")
ALTERNATIVE_NAME("test" "mariadb-test")
ELSEIF(RPM MATCHES "(rhel|centos)8")
ELSEIF(RPM MATCHES "(rhel|centos|rocky)[89]")
SET(epoch 3:)
ALTERNATIVE_NAME("backup" "mariadb-backup")
ALTERNATIVE_NAME("client" "mariadb")

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 (!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++) {
@ -1878,14 +1847,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",
@ -1947,10 +1908,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()),
@ -1970,19 +1931,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

@ -81,6 +81,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;
@ -1389,29 +1390,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}
};
@ -1421,36 +1420,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 */
@ -1460,88 +1444,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);
}
@ -1550,11 +1479,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;
@ -1562,13 +1488,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},
@ -1586,106 +1508,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
@ -2011,6 +1866,7 @@ backup_cleanup()
{
free(mysql_slave_position);
free(mysql_binlog_position);
free(buffer_pool_filename);
if (mysql_connection) {
mysql_close(mysql_connection);

View file

@ -24,6 +24,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;
@ -57,7 +58,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

@ -186,14 +186,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

@ -242,8 +242,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: */
@ -338,7 +337,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;
@ -1064,8 +1062,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[]= {
@ -1462,17 +1459,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
@ -6274,44 +6260,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()
{
@ -6377,15 +6325,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);
@ -6778,8 +6721,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;
@ -164,7 +163,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 */

@ -1 +1 @@
Subproject commit e6c07a296d2996e8d5c3cc615dfc50013bbcc794
Subproject commit 57aac1c50b45275c7a99eca32ad985998b292dc8

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);

@ -1 +1 @@
Subproject commit 485a3ad68c93fd43acde8a0fe39a348292f1cf2d
Subproject commit a6665e65c05c00f9df983a0f788a643ca7bc084c

View file

@ -1377,6 +1377,21 @@ Sets the maximum packet length to send to or receive from server\&.
.sp -1
.IP \(bu 2.3
.\}
.\" mysqldump: max-statement-time option
.\" max-statement-time option: mysqldump
\fB\-\-max\-statement\-time=\fR\fB\fIseconds\fR\fR
.sp
Sets the maximum time any statement can run before being timed out by the server. (Default value is 0 (no limit))\&
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" mysqldump: net-buffer-length option
.\" net-buffer-length option: mysqldump
\fB\-\-net\-buffer\-length=\fR\fB\fIlength\fR\fR
@ -2637,6 +2652,21 @@ The maximum size of the buffer for client/server communication\&. The maximum is
.sp -1
.IP \(bu 2.3
.\}
max_statement_time
.sp
A query that has taken more than max_statement_time seconds will be aborted and the backup will
fail\&. The argument will be treated as a decimal value with microsecond precision\&. A value
of 0 (default) means no timeout\&. The maximum timeout is 31536000 seconds\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
net_buffer_length
.sp
The initial size of the buffer for client/server communication\&. When creating multiple\-row

View file

@ -33,3 +33,4 @@ disable-force-if-open
[ENV]
MASTER_MYPORT= @mysqld.1.port
MASTER_MYSOCK= @mysqld.1.socket
OPENSSL_ENABLE_SHA1_SIGNATURES= 1

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

@ -6,7 +6,7 @@
# ==== Usage ====
#
# [--let $master_use_gtid_option= NO]
# --source include/rpl_reset_slave.inc
# --source include/reset_slave.inc
#
# Parameters:
# $master_use_gtid_option

View file

@ -1,5 +1,9 @@
--echo # Start of type_store_assignment_incompatible.inc
--disable_abort_on_error
SET @sql_mode_save= @@sql_mode;
SET @source_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='source'
AND TABLE_NAME='t1'
@ -10,8 +14,15 @@ SET @target_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
AND TABLE_NAME='t1'
AND TABLE_SCHEMA='test');
# 'IGNORE' -> ' IGNORE'
SET @ignore= CASE WHEN @ignore IS NULL OR @ignore = '' THEN ''
WHEN @ignore NOT LIKE ' %' THEN CONCAT(' ',@ignore)
ELSE @ignore
END;
let $source_type= `(SELECT @source_type)`;
let $target_type= `(SELECT @target_type)`;
let $ignore=`(SELECT @ignore)`;
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 ADD id INT NOT NULL PRIMARY KEY FIRST;
@ -23,8 +34,7 @@ SHOW CREATE TABLE t2;
#
CREATE TABLE t3 LIKE t2;
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
INSERT INTO t3 VALUES
eval INSERT$ignore INTO t3 VALUES
(1,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
@ -52,8 +62,7 @@ EXECUTE IMMEDIATE
IF(@source_type='geometry','AsText(source)','source'), ' AS source ',
' FROM t3');
--error 0,ER_CANT_CREATE_GEOMETRY_OBJECT
INSERT INTO t3 VALUES
eval INSERT$ignore INTO t3 VALUES
(1,
(SELECT target FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1)),
@ -64,8 +73,7 @@ SELECT * FROM v3;
TRUNCATE TABLE t3;
SET sql_mode=STRICT_ALL_TABLES;
--error ER_TRUNCATED_WRONG_VALUE, ER_TRUNCATED_WRONG_VALUE_FOR_FIELD, WARN_DATA_TRUNCATED, ER_CANT_CREATE_GEOMETRY_OBJECT
INSERT INTO t3 VALUES
eval INSERT$ignore INTO t3 VALUES
(1,
(SELECT target FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1)),
@ -74,7 +82,7 @@ INSERT INTO t3 VALUES
(SELECT source FROM t2 ORDER BY id LIMIT 1));
SELECT * FROM v3;
TRUNCATE TABLE t3;
SET sql_mode=DEFAULT;
SET sql_mode=@sql_mode_save;
DROP TABLE t3;
DROP VIEW v3;
@ -83,55 +91,46 @@ DROP VIEW v3;
#
CREATE TABLE t3 LIKE t2;
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
INSERT INTO t3 SELECT id,source,source FROM t2;
eval INSERT$ignore INTO t3 SELECT id,source,source FROM t2;
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
INSERT INTO t3 (id,target,source) SELECT id,source,source FROM t2;
eval INSERT$ignore INTO t3 (id,target,source) SELECT id,source,source FROM t2;
#
# INSERT .. VALUES .. ON DUPLICATE KEY UPDATE target=source
#
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
INSERT INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
eval INSERT$ignore INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
INSERT INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
eval INSERT$ignore INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
#
# INSERT .. SELECT .. ON DUPLICATE KEY UPDATE target=source
#
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
INSERT INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
eval INSERT$ignore INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
INSERT INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
eval INSERT$ignore INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
#
# UPDATE
#
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
UPDATE t3 SET target=source;
eval UPDATE$ignore t3 SET target=source;
#
# UPDATE, multi-table
#
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
UPDATE t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
eval UPDATE$ignore t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
#
# ALTER
#
SET @alter=CONCAT('ALTER TABLE t3 MODIFY target ', @source_type);
SET @alter=CONCAT('ALTER', @ignore, ' TABLE t3 MODIFY target ', @source_type);
SELECT @alter;
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
EXECUTE IMMEDIATE @alter;
@ -154,7 +153,6 @@ BEGIN
END;
$$
DELIMITER ;$$
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1;
DROP PROCEDURE p1;
@ -163,12 +161,10 @@ DROP PROCEDURE p1;
#
--eval CREATE FUNCTION f1(a $target_type) RETURNS INT RETURN NULL;
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT f1((SELECT source FROM t1 ORDER BY source LIMIT 1));
DROP FUNCTION f1;
--eval CREATE PROCEDURE p1(a $target_type) BEGIN END;
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1((SELECT source FROM t1 ORDER BY source LIMIT 1));
DROP PROCEDURE p1;
@ -190,7 +186,6 @@ BEGIN
END;
$$
DELIMITER ;$$
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p2();
SHOW WARNINGS;
DROP PROCEDURE p2;
@ -209,7 +204,6 @@ BEGIN
END;
$$
DELIMITER ;$$
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
SELECT f1();
DROP FUNCTION f1;
@ -227,7 +221,6 @@ BEGIN
END;
$$
DELIMITER ;$$
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
@ -249,10 +242,11 @@ BEGIN
END;
$$
DELIMITER ;$$
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
CALL p1();
DROP PROCEDURE p1;
DROP TABLE t2;
--enable_abort_on_error
--echo # End of type_store_assignment_incompatible.inc

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

@ -2524,5 +2524,30 @@ DROP TABLE t2;
DROP VIEW v1;
DROP TABLE t1;
#
# MDEV-23809: Server crash in JOIN_CACHE::free or ...
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT DISTINCT CASE CONVERT(EXPORT_SET(0, COLLATION(BENCHMARK(1, BIT_OR(0))),0),TIME) WHEN a THEN 1 END AS f FROM t1;
f
NULL
Warnings:
Warning 1292 Truncated incorrect time value: '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0'
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(8) NULL, b BIGINT);
INSERT INTO t1 (a,b) VALUES (NULL,NULL),('foo',NULL);
SELECT DISTINCT STRCMP((b > COLLATION(STDDEV_SAMP(15750))), a) AS f FROM t1;
f
NULL
DROP TABLE t1;
CREATE TABLE t1 (a BIGINT) AS SELECT 1 AS v3 UNION SELECT FALSE ;
SELECT DISTINCT a IN ( COLLATION (AVG ('x'))) FROM t1 ;
a IN ( COLLATION (AVG ('x')))
NULL
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'x'
DROP TABLE t1;
#
# End of 10.3 tests
#

View file

@ -1763,6 +1763,25 @@ DROP TABLE t2;
DROP VIEW v1;
DROP TABLE t1;
--echo #
--echo # MDEV-23809: Server crash in JOIN_CACHE::free or ...
--echo #
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT DISTINCT CASE CONVERT(EXPORT_SET(0, COLLATION(BENCHMARK(1, BIT_OR(0))),0),TIME) WHEN a THEN 1 END AS f FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(8) NULL, b BIGINT);
INSERT INTO t1 (a,b) VALUES (NULL,NULL),('foo',NULL);
SELECT DISTINCT STRCMP((b > COLLATION(STDDEV_SAMP(15750))), a) AS f FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (a BIGINT) AS SELECT 1 AS v3 UNION SELECT FALSE ;
SELECT DISTINCT a IN ( COLLATION (AVG ('x'))) FROM t1 ;
DROP TABLE t1;
--echo #
--echo # End of 10.3 tests
--echo #

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

@ -1152,11 +1152,11 @@ SELECT @var62, @var63;
@var62 @var63
1 NULL
INSERT INTO t1 SELECT id2, val2, p2 from t2;
ERROR HY000: Illegal parameter data types double and point for operation 'SET'
ERROR HY000: Cannot cast 'point' as 'double' in assignment of `test`.`t1`.`d1`
GET DIAGNOSTICS CONDITION 1 @var64= ROW_NUMBER;
GET DIAGNOSTICS CONDITION 2 @var65= ROW_NUMBER;
Warnings:
Error 4078 Illegal parameter data types double and point for operation 'SET'
Error 4078 Cannot cast 'point' as 'double' in assignment of `test`.`t1`.`d1`
Error 1758 Invalid condition number
SELECT @var64, @var65;
@var64 @var65
@ -1396,11 +1396,11 @@ SELECT @var103, @var104;
@var103 @var104
1 NULL
INSERT INTO t1 SELECT id2, val2, p2 from t2;
ERROR HY000: Illegal parameter data types double and point for operation 'SET'
ERROR HY000: Cannot cast 'point' as 'double' in assignment of `test`.`t1`.`d1`
GET DIAGNOSTICS CONDITION 1 @var105= ROW_NUMBER;
GET DIAGNOSTICS CONDITION 2 @var106= ROW_NUMBER;
Warnings:
Error 4078 Illegal parameter data types double and point for operation 'SET'
Error 4078 Cannot cast 'point' as 'double' in assignment of `test`.`t1`.`d1`
Error 1758 Invalid condition number
SELECT @var105, @var106;
@var105 @var106

View file

@ -688,9 +688,9 @@ object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
drop table t1;
create table t1 (fl geometry not null);
insert into t1 values (1);
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values (1.11);
ERROR HY000: Illegal parameter data types geometry and decimal for operation 'SET'
ERROR HY000: Cannot cast 'decimal' as 'geometry' in assignment of `test`.`t1`.`fl`
insert into t1 values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (pointfromtext('point(1,1)'));

View file

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

View file

@ -954,3 +954,92 @@ ERROR 23000: Duplicate entry '-128' for key 'a'
DROP TABLE t1, t2;
DROP PROCEDURE p1;
# End of 10.2 test
#
# MDEV-28617: INSERT ... SELECT with redundant IN subquery in GROUP BY
# list that uses mergeable derived table containing
# reference to target table
#
create table t1 (a int);
create table t2 (b int);
create table t3 (c int);
insert into t1 values (3), (1);
insert into t2 values (3), (2);
insert into t3 values (4), (2);
insert into t1
select b from t2
where b in (select c from t3
group by (select * from (select a from t1) dt where a = 1));
select * from t1;
a
3
1
2
delete from t1;
insert into t1 values (3), (1);
insert into t1
select b from t2
where b >= any (select c from t3
group by (select * from (select a from t1) dt where a = 1));
select * from t1;
a
3
1
3
2
delete from t1;
insert into t1 values (3), (1);
insert into t1
select b from t2
where b <= all (select c from t3
group by (select * from (select a from t1) dt where a = 1));
select * from t1;
a
3
1
2
delete from t1;
insert into t1 values (3), (1);
insert into t1
select b from t2
where exists (select c from t3
group by (select * from (select a from t1) dt where a = 1));
select * from t1;
a
3
1
3
2
delete from t1;
insert into t1 values (3), (1);
prepare stmt from "
insert into t1
select b from t2
where b in (select c from t3
group by (select * from (select a from t1) dt where a = 1));
";
execute stmt;
select * from t1;
a
3
1
2
delete from t1;
insert into t1 values (3), (1);
execute stmt;
select * from t1;
a
3
1
2
delete from t1;
insert into t1 values (3), (1);
delete from t1
where exists (select b from t2
where b in (select c from t3
group by (select * from (select a from t1) dt
where a = 1)));
select * from t1;
a
deallocate prepare stmt;
drop table t1,t2,t3;
# End of 10.3 test

View file

@ -514,3 +514,85 @@ DROP TABLE t1, t2;
DROP PROCEDURE p1;
--echo # End of 10.2 test
--echo #
--echo # MDEV-28617: INSERT ... SELECT with redundant IN subquery in GROUP BY
--echo # list that uses mergeable derived table containing
--echo # reference to target table
--echo #
create table t1 (a int);
create table t2 (b int);
create table t3 (c int);
insert into t1 values (3), (1);
insert into t2 values (3), (2);
insert into t3 values (4), (2);
insert into t1
select b from t2
where b in (select c from t3
group by (select * from (select a from t1) dt where a = 1));
select * from t1;
delete from t1;
insert into t1 values (3), (1);
insert into t1
select b from t2
where b >= any (select c from t3
group by (select * from (select a from t1) dt where a = 1));
select * from t1;
delete from t1;
insert into t1 values (3), (1);
insert into t1
select b from t2
where b <= all (select c from t3
group by (select * from (select a from t1) dt where a = 1));
select * from t1;
delete from t1;
insert into t1 values (3), (1);
insert into t1
select b from t2
where exists (select c from t3
group by (select * from (select a from t1) dt where a = 1));
select * from t1;
delete from t1;
insert into t1 values (3), (1);
prepare stmt from "
insert into t1
select b from t2
where b in (select c from t3
group by (select * from (select a from t1) dt where a = 1));
";
execute stmt;
select * from t1;
delete from t1;
insert into t1 values (3), (1);
execute stmt;
select * from t1;
delete from t1;
insert into t1 values (3), (1);
delete from t1
where exists (select b from t2
where b in (select c from t3
group by (select * from (select a from t1) dt
where a = 1)));
select * from t1;
deallocate prepare stmt;
drop table t1,t2,t3;
--echo # End of 10.3 test

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

@ -32,9 +32,8 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER
USE `mysqltest2`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v2` (
`a` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin1 */;
@ -42,39 +41,34 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest3` /*!40100 DEFAULT CHARACTER
USE `mysqltest3`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v3` (
`a` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v3` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v3i` (
`a` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v3i` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v3is` (
`schema_name` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v3is` AS SELECT
1 AS `schema_name` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v3nt` (
`1` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v3nt` AS SELECT
1 AS `1` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v3ps` (
`user` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v3ps` AS SELECT
1 AS `user` */;
SET character_set_client = @saved_cs_client;
USE `mysqltest1`;
USE `mysqltest2`;
/*!50001 DROP TABLE IF EXISTS `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@ -89,7 +83,7 @@ USE `mysqltest2`;
/*!50001 SET collation_connection = @saved_col_connection */;
USE `mysqltest3`;
/*!50001 DROP TABLE IF EXISTS `v3`*/;
/*!50001 DROP VIEW IF EXISTS `v3`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@ -102,7 +96,7 @@ USE `mysqltest3`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP TABLE IF EXISTS `v3i`*/;
/*!50001 DROP VIEW IF EXISTS `v3i`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@ -115,7 +109,7 @@ USE `mysqltest3`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP TABLE IF EXISTS `v3is`*/;
/*!50001 DROP VIEW IF EXISTS `v3is`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@ -128,7 +122,7 @@ USE `mysqltest3`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP TABLE IF EXISTS `v3nt`*/;
/*!50001 DROP VIEW IF EXISTS `v3nt`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@ -141,7 +135,7 @@ USE `mysqltest3`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP TABLE IF EXISTS `v3ps`*/;
/*!50001 DROP VIEW IF EXISTS `v3ps`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@ -243,11 +237,10 @@ disconnect con1;
connection default;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v1` (
`id` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `id` */;
SET character_set_client = @saved_cs_client;
/*!50001 DROP TABLE IF EXISTS `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;

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

@ -7,9 +7,9 @@ CREATE TABLE time_zone_leap_second LIKE mysql.time_zone_leap_second;
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
#
# Verbose run
set @wsrep_is_on=(select sum(SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone'", 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_name_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone_name'", 'do 0');
@ -56,9 +56,9 @@ execute immediate if(@wsrep_cannot_replicate_tz, concat('ALTER TABLE time_zone_t
# MDEV-28263: mariadb-tzinfo-to-sql improve wsrep and binlog cases
#
# Run on zoneinfo directory
set @wsrep_is_on=(select sum(SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone'", 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_name_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone_name'", 'do 0');
@ -116,9 +116,9 @@ COUNT(*)
#
# Run on zoneinfo directory --skip-write-binlog
#
set @wsrep_is_on=(select sum(SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0');
SET @save_sql_log_bin=@@SQL_LOG_BIN;
SET SESSION SQL_LOG_BIN=0;
@ -188,9 +188,9 @@ TRUNCATE TABLE time_zone_leap_second;
#
# Testing with explicit timezonefile
#
set @wsrep_is_on=(select sum(SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone'", 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_name_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone_name'", 'do 0');
@ -252,9 +252,9 @@ TRUNCATE TABLE time_zone_leap_second;
#
# Testing with explicit timezonefile --skip-write-binlog
#
set @wsrep_is_on=(select sum(SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0');
SET @save_sql_log_bin=@@SQL_LOG_BIN;
SET SESSION SQL_LOG_BIN=0;
@ -310,9 +310,9 @@ TRUNCATE TABLE time_zone_leap_second;
#
# Testing --leap
#
set @wsrep_is_on=(select sum(SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone'", 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_name_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone_name'", 'do 0');
@ -373,9 +373,9 @@ TRUNCATE TABLE time_zone_leap_second;
#
# Testing --skip-write-binlog --leap
#
set @wsrep_is_on=(select sum(SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0');
SET @save_sql_log_bin=@@SQL_LOG_BIN;
SET SESSION SQL_LOG_BIN=0;
@ -425,9 +425,9 @@ COM_TRUNCATE 1
#
# Testing --skip-write-binlog
#
set @wsrep_is_on=(select sum(SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0');
SET @save_sql_log_bin=@@SQL_LOG_BIN;
SET SESSION SQL_LOG_BIN=0;
@ -447,9 +447,9 @@ UNLOCK TABLES;
COMMIT;
SET SESSION SQL_LOG_BIN=@save_sql_log_bin;
execute immediate if(@wsrep_is_on, 'SET SESSION WSREP_ON=@save_wsrep_on', 'do 0');
set @wsrep_is_on=(select sum(SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
execute immediate if(@wsrep_is_on, 'SET @save_wsrep_on=@@WSREP_ON, WSREP_ON=OFF', 'do 0');
SET @save_sql_log_bin=@@SQL_LOG_BIN;
SET SESSION SQL_LOG_BIN=0;
@ -471,9 +471,9 @@ execute immediate if(@wsrep_is_on, 'SET SESSION WSREP_ON=@save_wsrep_on', 'do 0'
#
# MDEV-6236 - [PATCH] mysql_tzinfo_to_sql may produce invalid SQL
#
set @wsrep_is_on=(select sum(SESSION_VALUE='ON') from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
set @wsrep_is_on=(select coalesce(sum(SESSION_VALUE='ON'), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_on');
SELECT concat('%', GROUP_CONCAT(OPTION), '%') INTO @replicate_opt FROM (SELECT DISTINCT concat('REPLICATE_', UPPER(ENGINE)) AS OPTION FROM information_schema.TABLES WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME IN ('time_zone', 'time_zone_name', 'time_zone_transition', 'time_zone_transition_type', 'time_zone_leap_second') AND ENGINE in ('MyISAM', 'Aria')) AS o ORDER BY OPTION DESC;
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select sum(GLOBAL_VALUE NOT LIKE @replicate_opt) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
set @wsrep_cannot_replicate_tz=@wsrep_is_on AND (select coalesce(sum(GLOBAL_VALUE NOT LIKE @replicate_opt), 0) from information_schema.SYSTEM_VARIABLES WHERE VARIABLE_NAME='wsrep_mode');
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone'", 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, 'ALTER TABLE time_zone ENGINE=InnoDB', 'do 0');
execute immediate if(@wsrep_cannot_replicate_tz, "select ENGINE into @time_zone_name_engine from information_schema.TABLES where TABLE_SCHEMA=DATABASE() and TABLE_NAME='time_zone_name'", 'do 0');

View file

@ -3,8 +3,6 @@
--source include/not_windows.inc
--source include/no_protocol.inc
let $is_embedded=`select version() like '%embedded%'`;
CREATE TABLE time_zone LIKE mysql.time_zone;
CREATE TABLE time_zone_name LIKE mysql.time_zone_name;
CREATE TABLE time_zone_transition LIKE mysql.time_zone_transition;
@ -63,9 +61,6 @@ SELECT COUNT(*) FROM time_zone_transition;
SELECT COUNT(*) FROM time_zone_transition_type;
SELECT COUNT(*) FROM time_zone_leap_second;
if ($is_embedded) {
--replace_column 1 0 2 0
}
SELECT @wsrep_is_on, @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@SQL_LOG_BIN;
SELECT g.VARIABLE_NAME, g.VARIABLE_VALUE - b.VARIABLE_VALUE AS diff
FROM information_schema.global_status g
@ -100,9 +95,6 @@ SELECT COUNT(*) FROM time_zone_transition;
SELECT COUNT(*) FROM time_zone_transition_type;
SELECT COUNT(*) FROM time_zone_leap_second;
if ($is_embedded) {
--replace_column 1 0 2 0
}
SELECT @wsrep_is_on, @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@SQL_LOG_BIN;
SELECT g.VARIABLE_NAME, g.VARIABLE_VALUE - b.VARIABLE_VALUE AS diff
FROM information_schema.global_status g
@ -135,9 +127,6 @@ SELECT COUNT(*) FROM time_zone_transition;
SELECT COUNT(*) FROM time_zone_transition_type;
SELECT COUNT(*) FROM time_zone_leap_second;
if ($is_embedded) {
--replace_column 1 0 2 0
}
SELECT @wsrep_is_on, @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@SQL_LOG_BIN;
SELECT g.VARIABLE_NAME, g.VARIABLE_VALUE - b.VARIABLE_VALUE AS diff
FROM information_schema.global_status g
@ -170,9 +159,6 @@ SELECT COUNT(*) FROM time_zone_transition;
SELECT COUNT(*) FROM time_zone_transition_type;
SELECT COUNT(*) FROM time_zone_leap_second;
if ($is_embedded) {
--replace_column 1 0 2 0
}
SELECT @wsrep_is_on, @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@SQL_LOG_BIN;
SELECT g.VARIABLE_NAME, g.VARIABLE_VALUE - b.VARIABLE_VALUE AS diff
FROM information_schema.global_status g
@ -205,9 +191,6 @@ SELECT COUNT(*) FROM time_zone_transition;
SELECT COUNT(*) FROM time_zone_transition_type;
SELECT COUNT(*) FROM time_zone_leap_second;
if ($is_embedded) {
--replace_column 1 0 2 0
}
SELECT @wsrep_is_on, @wsrep_cannot_replicate_tz, @save_wsrep_on, @save_sql_log_bin, @@SQL_LOG_BIN;
SELECT g.VARIABLE_NAME, g.VARIABLE_VALUE - b.VARIABLE_VALUE AS diff
FROM information_schema.global_status g

View file

@ -2172,6 +2172,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

@ -472,6 +472,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

@ -509,6 +509,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
@ -529,6 +530,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

@ -53,11 +53,10 @@ raboof` int(11) DEFAULT NULL
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v1
1v` (
`foobar
raboof` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v1
1v` AS SELECT
1 AS `foobar
raboof` */;
SET character_set_client = @saved_cs_client;
--
@ -95,7 +94,7 @@ USE `mysqltest1
-- 1v`
--
/*!50001 DROP TABLE IF EXISTS `v1
/*!50001 DROP VIEW IF EXISTS `v1
1v`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;

View file

@ -0,0 +1,72 @@
#
# MDEV-18702 mysqldump should use max_statement_time=0 and/or allow setting one
#
CREATE DATABASE test1;
USE test1;
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (0);
LOCK TABLE t1 WRITE;
timeout without t1 contents expected
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
SET @save_max_statement_time=@@max_statement_time;
SET GLOBAL max_statement_time=0.1;
UNLOCK TABLES;;
This would be a race condition otherwise, but default max_statement_time=0 makes it succeed
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
INSERT INTO `t1` VALUES
(0);
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
SET GLOBAL max_statement_time=@save_max_statement_time;
DROP DATABASE test1;
#
# End of 10.3 test
#

View file

@ -0,0 +1,26 @@
--source include/not_embedded.inc
--echo #
--echo # MDEV-18702 mysqldump should use max_statement_time=0 and/or allow setting one
--echo #
CREATE DATABASE test1;
USE test1;
CREATE TABLE t1 (i INT);
INSERT INTO t1 VALUES (0);
LOCK TABLE t1 WRITE;
--echo timeout without t1 contents expected
--error 2
--exec $MYSQL_DUMP --max-statement-time=1 --skip-lock-tables --skip-comments test1 t1
SET @save_max_statement_time=@@max_statement_time;
SET GLOBAL max_statement_time=0.1;
--send UNLOCK TABLES;
--echo This would be a race condition otherwise, but default max_statement_time=0 makes it succeed
--exec $MYSQL_DUMP --skip-lock-tables --skip-comments test1 t1
--reap
SET GLOBAL max_statement_time=@save_max_statement_time;
DROP DATABASE test1;
--echo #
--echo # End of 10.3 test
--echo #

View file

@ -2138,11 +2138,9 @@ DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v2` (
`a` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
/*!50001 DROP TABLE IF EXISTS `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -2232,11 +2230,9 @@ DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v1` (
`a` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
/*!50001 DROP TABLE IF EXISTS `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -2311,11 +2307,9 @@ DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v2` (
`a` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
/*!50001 DROP TABLE IF EXISTS `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -2429,31 +2423,27 @@ DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v1` (
`a` tinyint NOT NULL,
`b` tinyint NOT NULL,
`c` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `a`,
1 AS `b`,
1 AS `c` */;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v2` (
`a` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `a` */;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v3`;
/*!50001 DROP VIEW IF EXISTS `v3`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v3` (
`a` tinyint NOT NULL,
`b` tinyint NOT NULL,
`c` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v3` AS SELECT
1 AS `a`,
1 AS `b`,
1 AS `c` */;
SET character_set_client = @saved_cs_client;
/*!50001 DROP TABLE IF EXISTS `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -2467,7 +2457,6 @@ SET character_set_client = @saved_cs_client;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP TABLE IF EXISTS `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -2481,7 +2470,6 @@ SET character_set_client = @saved_cs_client;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP TABLE IF EXISTS `v3`*/;
/*!50001 DROP VIEW IF EXISTS `v3`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -3214,35 +3202,31 @@ DROP TABLE IF EXISTS `v0`;
/*!50001 DROP VIEW IF EXISTS `v0`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v0` (
`a` tinyint NOT NULL,
`b` tinyint NOT NULL,
`c` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v0` AS SELECT
1 AS `a`,
1 AS `b`,
1 AS `c` */;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v1` (
`a` tinyint NOT NULL,
`b` tinyint NOT NULL,
`c` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `a`,
1 AS `b`,
1 AS `c` */;
SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v2` (
`a` tinyint NOT NULL,
`b` tinyint NOT NULL,
`c` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `a`,
1 AS `b`,
1 AS `c` */;
SET character_set_client = @saved_cs_client;
USE `test`;
/*!50001 DROP TABLE IF EXISTS `v0`*/;
/*!50001 DROP VIEW IF EXISTS `v0`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -3256,7 +3240,6 @@ USE `test`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP TABLE IF EXISTS `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -3270,7 +3253,6 @@ USE `test`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
/*!50001 DROP TABLE IF EXISTS `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -3509,7 +3491,7 @@ insert into t values(5, 51);
create view v1 as select qty, price, qty*price as value from t;
create view v2 as select qty from v1;
mysqldump {
/*!50001 DROP TABLE IF EXISTS `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@ -3524,7 +3506,7 @@ mysqldump {
/*!50001 SET collation_connection = @saved_col_connection */;
} mysqldump {
/*!50001 DROP TABLE IF EXISTS `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@ -3621,13 +3603,11 @@ DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v1` (
`id` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `id` */;
SET character_set_client = @saved_cs_client;
USE `mysqldump_test_db`;
/*!50001 DROP TABLE IF EXISTS `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -3681,15 +3661,14 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_views` /*!40100 DEFAULT CHAR
USE `mysqldump_views`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `nasishnasifu` (
`id` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `nasishnasifu` AS SELECT
1 AS `id` */;
SET character_set_client = @saved_cs_client;
USE `mysqldump_tables`;
USE `mysqldump_views`;
/*!50001 DROP TABLE IF EXISTS `nasishnasifu`*/;
/*!50001 DROP VIEW IF EXISTS `nasishnasifu`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@ -4091,11 +4070,9 @@ DROP TABLE IF EXISTS `v2`;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v2` (
`c` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v2` AS SELECT
1 AS `c` */;
SET character_set_client = @saved_cs_client;
/*!50001 DROP TABLE IF EXISTS `v2`*/;
/*!50001 DROP VIEW IF EXISTS `v2`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -4521,13 +4498,11 @@ DROP TABLE IF EXISTS `v1`;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `v1` (
`id` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `v1` AS SELECT
1 AS `id` */;
SET character_set_client = @saved_cs_client;
USE `mysqldump_test_db`;
/*!50001 DROP TABLE IF EXISTS `v1`*/;
/*!50001 DROP VIEW IF EXISTS `v1`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
@ -5617,9 +5592,8 @@ CREATE TABLE `nonunique_table_name` (
/*!40101 SET character_set_client = @saved_cs_client */;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `nonunique_table_view_name` (
`1` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `nonunique_table_view_name` AS SELECT
1 AS `1` */;
SET character_set_client = @saved_cs_client;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db2` /*!40100 DEFAULT CHARACTER SET utf8mb3 */;
@ -5646,7 +5620,7 @@ INSERT INTO `nonunique_table_view_name` VALUES
(4);
USE `db1`;
/*!50001 DROP TABLE IF EXISTS `nonunique_table_view_name`*/;
/*!50001 DROP VIEW IF EXISTS `nonunique_table_view_name`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@ -5734,15 +5708,14 @@ INSERT INTO `nonunique_table_name` VALUES
(6);
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
/*!50001 CREATE TABLE `nonunique_table_view_name` (
`1` tinyint NOT NULL
) ENGINE=MyISAM */;
/*!50001 CREATE VIEW `nonunique_table_view_name` AS SELECT
1 AS `1` */;
SET character_set_client = @saved_cs_client;
USE `db2`;
USE `db1`;
/*!50001 DROP TABLE IF EXISTS `nonunique_table_view_name`*/;
/*!50001 DROP VIEW IF EXISTS `nonunique_table_view_name`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;

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
@ -185,7 +185,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;
@ -202,4 +202,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-verify-server-cert --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

@ -246,264 +246,258 @@ PREPARE stmt_1 FROM "HELP `UPDATE`";
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 ...]
[LIMIT row_count]
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.
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.
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.
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.
-----------
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.
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.
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.
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.
PARTITION
---------
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
From MariaDB 10.3.2, UPDATE statements may have 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.
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 ...]
[LIMIT row_count]
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.
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.
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.
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.
-----------
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.
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.
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.
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.
PARTITION
---------
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
From MariaDB 10.3.2, UPDATE statements may have 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

@ -107,25 +107,31 @@ DROP TABLE t1;
HELP `ALTER SERVER`;
name description example
ALTER SERVER Syntax
------
------
ALTER SERVER server_name
OPTIONS (option [, option] ...)
OPTIONS (option [, option] ...)
Description
-----------
Alters the server information for server_name, adjusting the
specified
options as per the CREATE SERVER command. The corresponding
fields in the mysql.servers table are updated accordingly.
This statement requires the SUPER privilege.
-----------
Alters the server information for server_name, adjusting the specified options
as per the CREATE SERVER command. The corresponding fields in the
mysql.servers table are updated accordingly. This statement requires the SUPER
privilege or, from MariaDB 10.5.2, the FEDERATED ADMIN privilege.
ALTER SERVER is not written to the binary log, irrespective of the binary log
format being used. From MariaDB 10.1.13, Galera replicates the CREATE SERVER,
ALTER SERVER and DROP SERVER statements.
Examples
--------
--------
ALTER SERVER s OPTIONS (USER 'sally');
URL: https://mariadb.com/kb/en/library/alter-server/
URL: mariadb.com/kb/en/alter-server/
# Test case 11: Check that the statements CREATE/ALTER/DROP PROCEDURE
# are supported by prepared statements
CREATE PROCEDURE p1() SET @a=1;

View file

@ -248,3 +248,12 @@ WHERE
(help_topic_id < '2' OR help_topic_id != 8 OR help_topic_id < 1) AND
help_keyword_id = help_topic_id;
help_topic_id help_keyword_id
#
# MDEV-29242: Assertion `computed_weight == weight' failed SEL_ARG::verify_weight
#
CREATE TABLE t1 (id INT, KEY (id));
INSERT INTO t1 VALUES (1),(5);
SELECT id FROM t1 WHERE id IS NULL OR id NOT BETWEEN 1 AND 4;
id
5
DROP TABLE t1;

View file

@ -150,3 +150,12 @@ FROM mysql.help_relation
WHERE
(help_topic_id < '2' OR help_topic_id != 8 OR help_topic_id < 1) AND
help_keyword_id = help_topic_id;
--echo #
--echo # MDEV-29242: Assertion `computed_weight == weight' failed SEL_ARG::verify_weight
--echo #
CREATE TABLE t1 (id INT, KEY (id));
INSERT INTO t1 VALUES (1),(5);
SELECT id FROM t1 WHERE id IS NULL OR id NOT BETWEEN 1 AND 4;
DROP TABLE t1;

View file

@ -20,7 +20,7 @@ RETURN a;
END;
$$
SELECT f1(ROW(10,20));
ERROR HY000: Illegal parameter data types int and row for operation 'SET'
ERROR HY000: Cannot cast 'row' as 'int' in assignment of `f1(ROW(10,20))`
DROP FUNCTION f1;
#
# ROW as an SP parameter
@ -236,7 +236,7 @@ SELECT f1(a);
END;
$$
CALL p1();
ERROR HY000: Illegal parameter data types int and row for operation 'SET'
ERROR HY000: Cannot cast 'row' as 'int' in assignment of `a`
DROP PROCEDURE p1;
DROP FUNCTION f1;
#
@ -286,7 +286,7 @@ RETURN rec;
END;
$$
SELECT f1(10);
ERROR HY000: Illegal parameter data types int and row for operation 'SET'
ERROR HY000: Cannot cast 'row' as 'int' in assignment of `f1(10)`
DROP FUNCTION f1;
#
# Using the entire ROW in SELECT..CREATE

View file

@ -1026,11 +1026,11 @@ BEGIN
SELECT arg;
END|
CALL p1((1, 2));
ERROR HY000: Illegal parameter data types tinyint and row for operation 'SET'
ERROR 21000: Operand should contain 1 column(s)
CALL p1((SELECT * FROM t1 LIMIT 1));
ERROR HY000: Illegal parameter data types tinyint and row for operation 'SET'
ERROR 21000: Operand should contain 1 column(s)
CALL p1((SELECT col1, col2 FROM t1 LIMIT 1));
ERROR HY000: Illegal parameter data types tinyint and row for operation 'SET'
ERROR 21000: Operand should contain 1 column(s)
DROP PROCEDURE p1;
DROP TABLE t1;

View file

@ -1221,13 +1221,13 @@ BEGIN
END|
delimiter ;|
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
--error ER_OPERAND_COLUMNS
CALL p1((1, 2));
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
--error ER_OPERAND_COLUMNS
CALL p1((SELECT * FROM t1 LIMIT 1));
--error ER_ILLEGAL_PARAMETER_DATA_TYPES2_FOR_OPERATION
--error ER_OPERAND_COLUMNS
CALL p1((SELECT col1, col2 FROM t1 LIMIT 1));
#

View file

@ -255,7 +255,7 @@ return i+1|
call sub1("sub1a", (select 7))|
call sub1("sub1b", (select max(i) from t2))|
call sub1("sub1c", (select i,d from t2 limit 1))|
ERROR HY000: Illegal parameter data types int and row for operation 'SET'
ERROR HY000: Cannot cast 'row' as 'int' in assignment of `x`
call sub1("sub1d", (select 1 from (select 1) a))|
call sub2("sub2")|
select * from t1 order by id|

View file

@ -9,9 +9,9 @@ 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
#
# MDEV-27105 --ssl option set as default for mariadb CLI
#

View file

@ -12,7 +12,7 @@ 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
#
# MDEV-27105 --ssl option set as default for mariadb CLI
#

View file

@ -21,7 +21,7 @@ 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
--echo #

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

@ -18,3 +18,13 @@ LENGTH(CONCAT_WS(d, ' '))
1
1
DROP TABLE t1;
#
# MDEV-28315 ASAN stack-buffer-overflow in String::copy_aligned
#
CREATE TABLE t1 (a VARBINARY(128)) CHARACTER SET utf32;
INSERT INTO t1 VALUES ('South Carolina, Vermont, New Jersey, New Mexico, Wisconsin, Missouri, Delaware');
CREATE TABLE t2 (b SET('South Carolina', 'Vermont', 'Texas', 'New Mexico', 'Wisconsin', 'Missouri', 'Delaware', 'Wyoming', 'New Jersey', 'Maryland', 'Illinois', 'New York')) CHARACTER SET utf32;
INSERT INTO t2 SELECT * FROM t1;
ERROR 01000: Data truncated for column 'b' at row 1
DROP TABLE t1;
DROP TABLE t2;

View file

@ -24,3 +24,15 @@ CREATE TABLE t1 (d DATE);
INSERT INTO t1 VALUES ('1920-03-02'),('2020-12-01');
SELECT LENGTH(CONCAT_WS(d, ' ')) FROM t1;
DROP TABLE t1;
--echo #
--echo # MDEV-28315 ASAN stack-buffer-overflow in String::copy_aligned
--echo #
CREATE TABLE t1 (a VARBINARY(128)) CHARACTER SET utf32;
INSERT INTO t1 VALUES ('South Carolina, Vermont, New Jersey, New Mexico, Wisconsin, Missouri, Delaware');
CREATE TABLE t2 (b SET('South Carolina', 'Vermont', 'Texas', 'New Mexico', 'Wisconsin', 'Missouri', 'Delaware', 'Wyoming', 'New Jersey', 'Maryland', 'Illinois', 'New York')) CHARACTER SET utf32;
--error WARN_DATA_TRUNCATED
INSERT INTO t2 SELECT * FROM t1;
DROP TABLE t1;
DROP TABLE t2;

View file

@ -6,6 +6,7 @@
#
CREATE TABLE t1 (target GEOMETRY DEFAULT POINT(1,1), source INT DEFAULT 0);
# Start of type_store_assignment_incompatible.inc
SET @sql_mode_save= @@sql_mode;
SET @source_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='source'
AND TABLE_NAME='t1'
@ -14,6 +15,10 @@ SET @target_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='target'
AND TABLE_NAME='t1'
AND TABLE_SCHEMA='test');
SET @ignore= CASE WHEN @ignore IS NULL OR @ignore = '' THEN ''
WHEN @ignore NOT LIKE ' %' THEN CONCAT(' ',@ignore)
ELSE @ignore
END;
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 ADD id INT NOT NULL PRIMARY KEY FIRST;
INSERT INTO t2 VALUES (1,DEFAULT,DEFAULT);
@ -30,7 +35,7 @@ INSERT INTO t3 VALUES
(1,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
DROP TABLE t3;
SET sql_mode='';
CREATE TABLE t3 LIKE t2;
@ -47,6 +52,7 @@ INSERT INTO t3 VALUES
(2,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
SELECT * FROM v3;
id target source
1 POINT(1 1) 0
@ -59,37 +65,37 @@ INSERT INTO t3 VALUES
(2,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
Got one of the listed errors
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
SELECT * FROM v3;
id target source
1 POINT(1 1) 0
TRUNCATE TABLE t3;
SET sql_mode=DEFAULT;
SET sql_mode=@sql_mode_save;
DROP TABLE t3;
DROP VIEW v3;
CREATE TABLE t3 LIKE t2;
INSERT INTO t3 SELECT id,source,source FROM t2;
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) SELECT id,source,source FROM t2;
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
INSERT INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
INSERT INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
UPDATE t3 SET target=source;
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
UPDATE t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
SET @alter=CONCAT('ALTER TABLE t3 MODIFY target ', @source_type);
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
SET @alter=CONCAT('ALTER', @ignore, ' TABLE t3 MODIFY target ', @source_type);
SELECT @alter;
@alter
ALTER TABLE t3 MODIFY target int(11)
EXECUTE IMMEDIATE @alter;
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
DROP TABLE t3;
DROP TABLE t2;
CREATE PROCEDURE p1()
@ -100,15 +106,15 @@ SET dst=src;
END;
$$
CALL p1;
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `dst`
DROP PROCEDURE p1;
CREATE FUNCTION f1(a geometry) RETURNS INT RETURN NULL;;
SELECT f1((SELECT source FROM t1 ORDER BY source LIMIT 1));
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `a`
DROP FUNCTION f1;
CREATE PROCEDURE p1(a geometry) BEGIN END;;
CALL p1((SELECT source FROM t1 ORDER BY source LIMIT 1));
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `a`
DROP PROCEDURE p1;
CREATE PROCEDURE p1(OUT dst geometry)
BEGIN
@ -123,10 +129,10 @@ CALL p1(dst);
END;
$$
CALL p2();
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `dst`
SHOW WARNINGS;
Level Code Message
Error 4078 Illegal parameter data types geometry and int for operation 'SET'
Error 4078 Cannot cast 'int' as 'geometry' in assignment of `dst`
Note 4094 At line 4 in test.p1
Note 4094 At line 4 in test.p2
DROP PROCEDURE p2;
@ -138,7 +144,7 @@ RETURN rc;
END;
$$
SELECT f1();
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `f1()`
DROP FUNCTION f1;
CREATE PROCEDURE p1()
BEGIN
@ -149,7 +155,7 @@ CLOSE cur1;
END;
$$
CALL p1();
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `t`
DROP PROCEDURE p1;
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES ();
@ -163,13 +169,14 @@ CLOSE cur2;
END;
$$
CALL p1();
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `dst`
DROP PROCEDURE p1;
DROP TABLE t2;
# End of type_store_assignment_incompatible.inc
DROP TABLE t1;
CREATE TABLE t1 (target INT DEFAULT 0, source GEOMETRY DEFAULT POINT(1,1));
# Start of type_store_assignment_incompatible.inc
SET @sql_mode_save= @@sql_mode;
SET @source_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='source'
AND TABLE_NAME='t1'
@ -178,6 +185,10 @@ SET @target_type= (SELECT COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME='target'
AND TABLE_NAME='t1'
AND TABLE_SCHEMA='test');
SET @ignore= CASE WHEN @ignore IS NULL OR @ignore = '' THEN ''
WHEN @ignore NOT LIKE ' %' THEN CONCAT(' ',@ignore)
ELSE @ignore
END;
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 ADD id INT NOT NULL PRIMARY KEY FIRST;
INSERT INTO t2 VALUES (1,DEFAULT,DEFAULT);
@ -194,7 +205,7 @@ INSERT INTO t3 VALUES
(1,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
DROP TABLE t3;
SET sql_mode='';
CREATE TABLE t3 LIKE t2;
@ -226,37 +237,37 @@ INSERT INTO t3 VALUES
(2,
(SELECT source FROM t2 ORDER BY id LIMIT 1),
(SELECT source FROM t2 ORDER BY id LIMIT 1));
Got one of the listed errors
ERROR 22007: Incorrect integer value: '\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\xF0?\x00\x00\x00\x00\x00\x00\xF0?' for column `test`.`t3`.`target` at row 2
SELECT * FROM v3;
id target source
1 0 POINT(1 1)
TRUNCATE TABLE t3;
SET sql_mode=DEFAULT;
SET sql_mode=@sql_mode_save;
DROP TABLE t3;
DROP VIEW v3;
CREATE TABLE t3 LIKE t2;
INSERT INTO t3 SELECT id,source,source FROM t2;
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) SELECT id,source,source FROM t2;
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
INSERT INTO t3 VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) VALUES (1,DEFAULT,DEFAULT) ON DUPLICATE KEY UPDATE target=source;
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
INSERT INTO t3 SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
INSERT INTO t3 (id,target,source) SELECT 1,DEFAULT(t2.target),DEFAULT(t2.source) FROM t2 ON DUPLICATE KEY UPDATE t3.target=t2.source;
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
UPDATE t3 SET target=source;
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
UPDATE t2, t3 SET t3.target=t2.source WHERE t2.id=t3.id;
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
SET @alter=CONCAT('ALTER TABLE t3 MODIFY target ', @source_type);
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `test`.`t3`.`target`
SET @alter=CONCAT('ALTER', @ignore, ' TABLE t3 MODIFY target ', @source_type);
SELECT @alter;
@alter
ALTER TABLE t3 MODIFY target geometry
EXECUTE IMMEDIATE @alter;
ERROR HY000: Illegal parameter data types geometry and int for operation 'SET'
ERROR HY000: Cannot cast 'int' as 'geometry' in assignment of `test`.`t3`.`target`
DROP TABLE t3;
DROP TABLE t2;
CREATE PROCEDURE p1()
@ -267,15 +278,15 @@ SET dst=src;
END;
$$
CALL p1;
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `dst`
DROP PROCEDURE p1;
CREATE FUNCTION f1(a int(11)) RETURNS INT RETURN NULL;;
SELECT f1((SELECT source FROM t1 ORDER BY source LIMIT 1));
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `a`
DROP FUNCTION f1;
CREATE PROCEDURE p1(a int(11)) BEGIN END;;
CALL p1((SELECT source FROM t1 ORDER BY source LIMIT 1));
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `a`
DROP PROCEDURE p1;
CREATE PROCEDURE p1(OUT dst int(11))
BEGIN
@ -290,10 +301,10 @@ CALL p1(dst);
END;
$$
CALL p2();
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `dst`
SHOW WARNINGS;
Level Code Message
Error 4078 Illegal parameter data types int and geometry for operation 'SET'
Error 4078 Cannot cast 'geometry' as 'int' in assignment of `dst`
Note 4094 At line 4 in test.p1
Note 4094 At line 4 in test.p2
DROP PROCEDURE p2;
@ -305,7 +316,7 @@ RETURN rc;
END;
$$
SELECT f1();
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `f1()`
DROP FUNCTION f1;
CREATE PROCEDURE p1()
BEGIN
@ -316,7 +327,7 @@ CLOSE cur1;
END;
$$
CALL p1();
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `t`
DROP PROCEDURE p1;
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES ();
@ -330,7 +341,7 @@ CLOSE cur2;
END;
$$
CALL p1();
ERROR HY000: Illegal parameter data types int and geometry for operation 'SET'
ERROR HY000: Cannot cast 'geometry' as 'int' in assignment of `dst`
DROP PROCEDURE p1;
DROP TABLE t2;
# End of type_store_assignment_incompatible.inc

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.

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