summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--extra/mariabackup/backup_copy.cc83
-rw-r--r--extra/mariabackup/backup_copy.h7
-rw-r--r--extra/mariabackup/backup_mysql.cc248
-rw-r--r--extra/mariabackup/backup_mysql.h6
-rw-r--r--extra/mariabackup/common.h10
-rw-r--r--extra/mariabackup/xtrabackup.cc63
-rw-r--r--extra/mariabackup/xtrabackup.h2
-rw-r--r--extra/wolfssl/CMakeLists.txt3
-rw-r--r--extra/wolfssl/user_settings.h.in2
m---------extra/wolfssl/wolfssl0
m---------libmariadb0
-rw-r--r--mysql-test/include/wait_until_disconnected.inc2
-rw-r--r--mysql-test/main/func_json.result11
-rw-r--r--mysql-test/main/func_json.test14
-rw-r--r--mysql-test/main/kill.test12
-rw-r--r--mysql-test/main/long_unique_bugs.result19
-rw-r--r--mysql-test/main/long_unique_bugs.test27
-rw-r--r--mysql-test/main/mysql_upgrade.result38
-rw-r--r--mysql-test/main/mysql_upgrade.test41
-rw-r--r--mysql-test/main/openssl_1.result14
-rw-r--r--mysql-test/main/openssl_1.test14
-rw-r--r--mysql-test/main/openssl_6975,tlsv10.result12
-rw-r--r--mysql-test/main/openssl_6975,tlsv12.result12
-rw-r--r--mysql-test/main/ssl_7937,nossl.result4
-rw-r--r--mysql-test/main/ssl_7937.result2
-rw-r--r--mysql-test/main/ssl_7937.test2
-rw-r--r--mysql-test/main/ssl_ca.result2
-rw-r--r--mysql-test/main/ssl_ca.test2
-rw-r--r--mysql-test/main/ssl_cipher.result2
-rw-r--r--mysql-test/main/ssl_cipher.test2
-rw-r--r--mysql-test/main/ssl_crl.result2
-rw-r--r--mysql-test/main/ssl_crl.test2
-rw-r--r--mysql-test/main/ssl_crl_clients.result8
-rw-r--r--mysql-test/main/ssl_crl_clients.test4
-rw-r--r--mysql-test/main/ssl_system_ca,bad.result2
-rw-r--r--mysql-test/main/wait_timeout.test4
-rw-r--r--mysql-test/std_data/mdev-28727-pet4.frmbin0 -> 934 bytes
-rw-r--r--mysql-test/suite/galera/r/galera_log_bin_ext.result23
-rw-r--r--mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result23
-rw-r--r--mysql-test/suite/galera/t/galera_log_bin.inc1
-rw-r--r--mysql-test/suite/galera/t/galera_log_bin_sst.inc1
-rw-r--r--mysql-test/suite/innodb/r/update_time.result19
-rw-r--r--mysql-test/suite/innodb/t/update_time.test27
-rw-r--r--mysql-test/suite/plugins/r/binlog-simple_plugin_check.result2
-rw-r--r--mysql-test/suite/plugins/r/cracklib_password_check.result18
-rw-r--r--mysql-test/suite/plugins/r/simple_password_check.result103
-rw-r--r--mysql-test/suite/plugins/r/two_password_validations.result10
-rw-r--r--mysql-test/suite/plugins/t/simple_password_check.test14
-rw-r--r--mysql-test/suite/roles/rename_user.result9
-rw-r--r--mysql-test/suite/roles/rename_user.test10
-rw-r--r--mysql-test/suite/sys_vars/t/completion_type_func.test4
-rw-r--r--mysql-test/suite/vcol/r/vcol_misc.result16
-rw-r--r--mysql-test/suite/vcol/t/vcol_misc.test14
-rw-r--r--plugin/simple_password_check/simple_password_check.c28
-rw-r--r--scripts/wsrep_sst_backup.sh2
-rw-r--r--scripts/wsrep_sst_common.sh18
-rw-r--r--scripts/wsrep_sst_mariabackup.sh15
-rw-r--r--scripts/wsrep_sst_rsync.sh9
-rw-r--r--sql/handler.cc37
-rw-r--r--sql/item_cmpfunc.cc2
-rw-r--r--sql/item_func.h3
-rw-r--r--sql/item_jsonfunc.cc42
-rw-r--r--sql/share/errmsg-utf8.txt4
-rw-r--r--sql/sql_acl.cc39
-rw-r--r--sql/sql_plugin.cc2
-rw-r--r--storage/connect/CMakeLists.txt50
-rw-r--r--storage/connect/connect.h2
-rw-r--r--storage/connect/ha_connect.cc58
-rw-r--r--storage/connect/ha_connect.h2
-rw-r--r--storage/connect/jsonudf.cpp4
-rw-r--r--storage/connect/mysql-test/connect/r/jdbc_postgresql.result2
-rw-r--r--storage/connect/tabwmi.cpp2
-rw-r--r--storage/innobase/buf/buf0buf.cc1
73 files changed, 663 insertions, 631 deletions
diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc
index 7724bf63e6c..b6990213952 100644
--- a/extra/mariabackup/backup_copy.cc
+++ b/extra/mariabackup/backup_copy.cc
@@ -577,6 +577,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)
{
@@ -1538,14 +1539,14 @@ bool backup_start(CorruptedPages &corrupted_pages)
if (!write_galera_info(mysql_connection)) {
return(false);
}
+ // copied from xtrabackup. what is it needed for here?
+ write_current_binlog_file(mysql_connection);
}
- bool with_binlogs = opt_binlog_info == BINLOG_INFO_ON;
+ if (opt_binlog_info == BINLOG_INFO_ON) {
- if (with_binlogs || opt_galera_info) {
- if (!write_current_binlog_file(mysql_connection, with_binlogs)) {
- return(false);
- }
+ lock_binlog_maybe(mysql_connection);
+ write_binlog_info(mysql_connection);
}
if (have_flush_engine_logs && !opt_no_lock) {
@@ -1581,33 +1582,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);
@@ -1657,6 +1638,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
@@ -1693,19 +1675,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++) {
@@ -1937,14 +1906,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",
@@ -2007,10 +1968,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 */
is_ibdata_file = false;
@@ -2034,19 +1995,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();
diff --git a/extra/mariabackup/backup_copy.h b/extra/mariabackup/backup_copy.h
index 858182001ce..62b2b1bc232 100644
--- a/extra/mariabackup/backup_copy.h
+++ b/extra/mariabackup/backup_copy.h
@@ -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() */
diff --git a/extra/mariabackup/backup_mysql.cc b/extra/mariabackup/backup_mysql.cc
index 7e60944b326..7a629e7265c 100644
--- a/extra/mariabackup/backup_mysql.cc
+++ b/extra/mariabackup/backup_mysql.cc
@@ -83,6 +83,7 @@ os_event_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;
@@ -1453,68 +1454,51 @@ 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 vars[] = {
- {"gtid_binlog_state", &gtid_binlog_state},
- {"log_bin_basename", &log_bin_dir},
+ mysql_variable status_after_flush[] = {
+ {"File", &log_bin_file},
{NULL, NULL}
};
- mysql_variable status[] = {
- {"File", &filename},
- {"Position", &position},
- {"Executed_Gtid_Set", &executed_gtid_set},
+ mysql_variable vars[] = {
+ {"gtid_binlog_state", &gtid_binlog_state},
+ {"log_bin_basename", &log_bin_dir},
{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 */
@@ -1524,88 +1508,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);
}
@@ -1614,11 +1543,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;
@@ -1626,13 +1552,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},
@@ -1650,106 +1572,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;
+ }
+
+ mysql_gtid = ((gtid_mode != NULL) && (strcmp(gtid_mode, "ON") == 0));
+ mariadb_gtid = (gtid_current_pos != NULL);
- gtid = (gtid_executed && *gtid_executed) ? gtid_executed : gtid_current_pos;
+ gtid = (gtid_executed != NULL ? gtid_executed : gtid_current_pos);
- with_gtid = mariadb_gtid || mysql_gtid;
- if (with_gtid) {
+ 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
@@ -2075,6 +1930,7 @@ backup_cleanup()
{
free(mysql_slave_position);
free(mysql_binlog_position);
+ free(buffer_pool_filename);
if (mysql_connection) {
mysql_close(mysql_connection);
diff --git a/extra/mariabackup/backup_mysql.h b/extra/mariabackup/backup_mysql.h
index 5e78281e1cb..b61fa2362c6 100644
--- a/extra/mariabackup/backup_mysql.h
+++ b/extra/mariabackup/backup_mysql.h
@@ -28,6 +28,7 @@ extern time_t history_lock_time;
extern bool sql_thread_started;
extern char *mysql_slave_position;
extern char *mysql_binlog_position;
+extern char *buffer_pool_filename;
/** connection to mysql server */
extern MYSQL *mysql_connection;
@@ -61,7 +62,10 @@ void
unlock_all(MYSQL *connection);
bool
-write_current_binlog_file(MYSQL *connection, bool write_binlogs);
+write_current_binlog_file(MYSQL *connection);
+
+bool
+write_binlog_info(MYSQL *connection);
bool
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history,
diff --git a/extra/mariabackup/common.h b/extra/mariabackup/common.h
index beb49524608..1973512ad82 100644
--- a/extra/mariabackup/common.h
+++ b/extra/mariabackup/common.h
@@ -187,14 +187,4 @@ xb_read_full(File fd, uchar *buf, size_t len)
return tlen;
}
-#ifdef _WIN32
-#define IS_TRAILING_SLASH(name, length) \
- ((length) > 1 && \
- (name[(length) - 1] == '/' || \
- name[(length) - 1] == '\\'))
-#else
-#define IS_TRAILING_SLASH(name, length) \
- ((length) > 1 && name[(length) - 1] == FN_LIBCHAR)
-#endif
-
#endif
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc
index 37c80baf32f..da2ae65447b 100644
--- a/extra/mariabackup/xtrabackup.cc
+++ b/extra/mariabackup/xtrabackup.cc
@@ -248,8 +248,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: */
@@ -344,7 +343,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;
@@ -1020,8 +1018,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[]= {
@@ -1418,17 +1415,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
@@ -6247,44 +6233,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()
{
@@ -6350,15 +6298,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);
@@ -6746,8 +6689,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!");
}
diff --git a/extra/mariabackup/xtrabackup.h b/extra/mariabackup/xtrabackup.h
index a43bca5891c..0d1d3eb5a6b 100644
--- a/extra/mariabackup/xtrabackup.h
+++ b/extra/mariabackup/xtrabackup.h
@@ -71,7 +71,6 @@ extern char *xtrabackup_incremental_dir;
extern char *xtrabackup_incremental_basedir;
extern char *innobase_data_home_dir;
extern char *innobase_buffer_pool_filename;
-extern char *buffer_pool_filename;
extern char *xb_plugin_dir;
extern char *xb_rocksdb_datadir;
extern my_bool xb_backup_rocksdb;
@@ -167,7 +166,6 @@ extern uint opt_lock_wait_timeout;
extern uint opt_lock_wait_threshold;
extern uint opt_debug_sleep_before_unlock;
extern uint opt_safe_slave_backup_timeout;
-extern uint opt_max_binlogs;
extern const char *opt_history;
diff --git a/extra/wolfssl/CMakeLists.txt b/extra/wolfssl/CMakeLists.txt
index 3faddbf49a2..35c3b735bdd 100644
--- a/extra/wolfssl/CMakeLists.txt
+++ b/extra/wolfssl/CMakeLists.txt
@@ -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)
diff --git a/extra/wolfssl/user_settings.h.in b/extra/wolfssl/user_settings.h.in
index bbe8c820019..2355fd1691c 100644
--- a/extra/wolfssl/user_settings.h.in
+++ b/extra/wolfssl/user_settings.h.in
@@ -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 */
diff --git a/extra/wolfssl/wolfssl b/extra/wolfssl/wolfssl
-Subproject e6c07a296d2996e8d5c3cc615dfc50013bbcc79
+Subproject 57aac1c50b45275c7a99eca32ad985998b292dc
diff --git a/libmariadb b/libmariadb
-Subproject d12fd88b6c0fafbf25f59e7fecd639cb2b38f15
+Subproject 7fdb3eab66384a355475704332d11cc1ab82499
diff --git a/mysql-test/include/wait_until_disconnected.inc b/mysql-test/include/wait_until_disconnected.inc
index 93ada7f11ce..3854369bb60 100644
--- a/mysql-test/include/wait_until_disconnected.inc
+++ b/mysql-test/include/wait_until_disconnected.inc
@@ -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;
diff --git a/mysql-test/main/func_json.result b/mysql-test/main/func_json.result
index 83e6bde8e5b..d072b9f59ad 100644
--- a/mysql-test/main/func_json.result
+++ b/mysql-test/main/func_json.result
@@ -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
#
#
diff --git a/mysql-test/main/func_json.test b/mysql-test/main/func_json.test
index 91e283829df..db474e38a2c 100644
--- a/mysql-test/main/func_json.test
+++ b/mysql-test/main/func_json.test
@@ -614,6 +614,20 @@ SELECT JSON_VALID('{"admin\\"": null}'), '{"admin\\"": null}'
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 #
diff --git a/mysql-test/main/kill.test b/mysql-test/main/kill.test
index c7f6d1e098f..7dc57158825 100644
--- a/mysql-test/main/kill.test
+++ b/mysql-test/main/kill.test
@@ -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;
diff --git a/mysql-test/main/long_unique_bugs.result b/mysql-test/main/long_unique_bugs.result
index 709ed929fba..232cb0a38c0 100644
--- a/mysql-test/main/long_unique_bugs.result
+++ b/mysql-test/main/long_unique_bugs.result
@@ -316,6 +316,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
#
#
diff --git a/mysql-test/main/long_unique_bugs.test b/mysql-test/main/long_unique_bugs.test
index c5eb208d810..e313d1d434e 100644
--- a/mysql-test/main/long_unique_bugs.test
+++ b/mysql-test/main/long_unique_bugs.test
@@ -398,6 +398,33 @@ 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 #
diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result
index 5fe4ccd2c1f..9bc0c06aa10 100644
--- a/mysql-test/main/mysql_upgrade.result
+++ b/mysql-test/main/mysql_upgrade.result
@@ -947,6 +947,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
diff --git a/mysql-test/main/mysql_upgrade.test b/mysql-test/main/mysql_upgrade.test
index a743cf481ea..017a7cc742f 100644
--- a/mysql-test/main/mysql_upgrade.test
+++ b/mysql-test/main/mysql_upgrade.test
@@ -471,6 +471,47 @@ drop table mysql.global_priv;
rename table mysql.global_priv_bak to mysql.global_priv;
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+--echo #
+--echo # MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade
+--echo #
+create or replace table pet4 (
+ build_time double(18, 7) default null,
+ key idx1 (build_time)
+) engine innodb;
+
+--remove_file $MYSQLD_DATADIR/test/pet4.frm
+--copy_file std_data/mdev-28727-pet4.frm $MYSQLD_DATADIR/test/pet4.frm
+
+check table pet4;
+check table pet4 for upgrade;
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table pet4 add i1 int, algorithm=nocopy;
+
+--echo # Running mysqlcheck
+--exec $MYSQL_CHECK --auto-repair --databases test 2>&1
+check table pet4;
+alter table pet4 add i1 int, algorithm=nocopy;
+
+create or replace table pet4 (
+ build_time double(18, 7) default null,
+ key idx1 (build_time)
+) engine innodb;
+
+--remove_file $MYSQLD_DATADIR/test/pet4.frm
+--copy_file std_data/mdev-28727-pet4.frm $MYSQLD_DATADIR/test/pet4.frm
+
+--error ER_ALTER_OPERATION_NOT_SUPPORTED
+alter table pet4 add i1 int, algorithm=nocopy;
+
+--echo # Running mysql_upgrade
+--exec $MYSQL_UPGRADE --silent 2>&1
+file_exists $MYSQLD_DATADIR/mysql_upgrade_info;
+check table pet4;
+alter table pet4 add i1 int, algorithm=nocopy;
+
+--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
+drop table pet4;
+
--echo # End of 10.4 tests
#
diff --git a/mysql-test/main/openssl_1.result b/mysql-test/main/openssl_1.result
index 96b1895d57b..a9c092948be 100644
--- a/mysql-test/main/openssl_1.result
+++ b/mysql-test/main/openssl_1.result
@@ -47,11 +47,11 @@ disconnect con3;
disconnect con4;
drop user ssl_user1@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
drop table t1;
-mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
-mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
-mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
-mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
-mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
+mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
+mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
+mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
+mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
+mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
have_ssl
1
End of 5.0 tests
@@ -179,7 +179,7 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-mysqldump: Got error: 2026: "SSL connection error: xxxx
+mysqldump: Got error: 2026: "TLS/SSL error: xxxx
DROP TABLE t1;
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
FLUSH PRIVILEGES;
@@ -196,4 +196,4 @@ End of 5.1 tests
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
-ERROR: Failed on connect: SSL connection error \ No newline at end of file
+ERROR: Failed on connect: TLS/SSL error \ No newline at end of file
diff --git a/mysql-test/main/openssl_1.test b/mysql-test/main/openssl_1.test
index fff65624b12..968f6e13473 100644
--- a/mysql-test/main/openssl_1.test
+++ b/mysql-test/main/openssl_1.test
@@ -70,7 +70,7 @@ drop table t1;
#
--exec echo "this query should not execute;" > $MYSQLTEST_VARDIR/tmp/test.sql
# Handle that openssl gives different error messages from YaSSL.
---replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
+--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-ca=$MYSQL_TEST_DIR/std_data/untrusted-cacert.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--echo
@@ -79,7 +79,7 @@ drop table t1;
# Test that we can't open connection to server if we are using
# a blank ca
#
---replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
+--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-ca= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--echo
@@ -88,7 +88,7 @@ drop table t1;
# Test that we can't open connection to server if we are using
# a nonexistent ca file
#
---replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
+--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-ca=nonexisting_file.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--echo
@@ -97,7 +97,7 @@ drop table t1;
# Test that we can't open connection to server if we are using
# a blank client-key
#
---replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
+--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-key= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--echo
@@ -106,7 +106,7 @@ drop table t1;
# Test that we can't open connection to server if we are using
# a blank client-cert
#
---replace_regex /2026 SSL connection error.*/2026 SSL connection error: xxxx/
+--replace_regex /2026 TLS\/SSL error.*/2026 TLS\/SSL error: xxxx/
--error 1
--exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
--echo
@@ -175,7 +175,7 @@ INSERT INTO t1 VALUES (1), (2);
# With wrong parameters
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR mysqldump.exe mysqldump
---replace_regex /SSL connection error.*/SSL connection error: xxxx/
+--replace_regex /TLS\/SSL error.*/TLS\/SSL error: xxxx/
--error 2
--exec $MYSQL_DUMP --default-character-set=utf8mb4 --skip-create-options --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1
--echo
@@ -201,7 +201,7 @@ set global sql_mode=default;
# MDEV-9605 mysqlbinlog does not accept ssl-ca option as expected.
#
---replace_regex /SSL connection error:.*/SSL connection error/
+--replace_regex /TLS\/SSL error:.*/TLS\/SSL error/
--error 1
--exec $MYSQL_BINLOG --read-from-remote-server --ssl-ca --user=root --host=localhost nobinlog.111111 2>&1
diff --git a/mysql-test/main/openssl_6975,tlsv10.result b/mysql-test/main/openssl_6975,tlsv10.result
index b76a91bd134..f848b9a2ccc 100644
--- a/mysql-test/main/openssl_6975,tlsv10.result
+++ b/mysql-test/main/openssl_6975,tlsv10.result
@@ -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
diff --git a/mysql-test/main/openssl_6975,tlsv12.result b/mysql-test/main/openssl_6975,tlsv12.result
index c16e503c339..7bc92aec74f 100644
--- a/mysql-test/main/openssl_6975,tlsv12.result
+++ b/mysql-test/main/openssl_6975,tlsv12.result
@@ -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;
diff --git a/mysql-test/main/ssl_7937,nossl.result b/mysql-test/main/ssl_7937,nossl.result
index 72693233bc8..7ce4a754bf8 100644
--- a/mysql-test/main/ssl_7937,nossl.result
+++ b/mysql-test/main/ssl_7937,nossl.result
@@ -9,7 +9,7 @@ mysql --ssl -e "call test.have_ssl()"
have_ssl
no
mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
-ERROR 2026 (HY000): SSL connection error: SSL is required, but the server does not support it
+ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support it
mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
-ERROR 2026 (HY000): SSL connection error: SSL is required, but the server does not support it
+ERROR 2026 (HY000): TLS/SSL error: SSL is required, but the server does not support it
drop procedure have_ssl;
diff --git a/mysql-test/main/ssl_7937.result b/mysql-test/main/ssl_7937.result
index a94ca3b3529..86180af3692 100644
--- a/mysql-test/main/ssl_7937.result
+++ b/mysql-test/main/ssl_7937.result
@@ -12,5 +12,5 @@ mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
have_ssl
yes
mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
-ERROR 2026 (HY000): SSL connection error: Failed to verify the server certificate
+ERROR 2026 (HY000): TLS/SSL error: Failed to verify the server certificate
drop procedure have_ssl;
diff --git a/mysql-test/main/ssl_7937.test b/mysql-test/main/ssl_7937.test
index 59c13107e01..58583a32ae3 100644
--- a/mysql-test/main/ssl_7937.test
+++ b/mysql-test/main/ssl_7937.test
@@ -21,6 +21,6 @@ create procedure have_ssl()
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
--echo mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
---replace_regex /SSL connection error.*certificate[^\n]*/SSL connection error: Failed to verify the server certificate/
+--replace_regex /TLS\/SSL error.*certificate[^\n]*/TLS\/SSL error: Failed to verify the server certificate/
--exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
drop procedure have_ssl;
diff --git a/mysql-test/main/ssl_ca.result b/mysql-test/main/ssl_ca.result
index afffe4e4dff..85683a0ba90 100644
--- a/mysql-test/main/ssl_ca.result
+++ b/mysql-test/main/ssl_ca.result
@@ -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
diff --git a/mysql-test/main/ssl_ca.test b/mysql-test/main/ssl_ca.test
index 106da140130..b66afc22188 100644
--- a/mysql-test/main/ssl_ca.test
+++ b/mysql-test/main/ssl_ca.test
@@ -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
diff --git a/mysql-test/main/ssl_cipher.result b/mysql-test/main/ssl_cipher.result
index 66d817b7b41..42f37f488e7 100644
--- a/mysql-test/main/ssl_cipher.result
+++ b/mysql-test/main/ssl_cipher.result
@@ -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
diff --git a/mysql-test/main/ssl_cipher.test b/mysql-test/main/ssl_cipher.test
index d4cdcffb276..4671b085ce7 100644
--- a/mysql-test/main/ssl_cipher.test
+++ b/mysql-test/main/ssl_cipher.test
@@ -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
diff --git a/mysql-test/main/ssl_crl.result b/mysql-test/main/ssl_crl.result
index 598774bd772..d5603254ea5 100644
--- a/mysql-test/main/ssl_crl.result
+++ b/mysql-test/main/ssl_crl.result
@@ -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
diff --git a/mysql-test/main/ssl_crl.test b/mysql-test/main/ssl_crl.test
index e79f8ff32c2..7ed5c210215 100644
--- a/mysql-test/main/ssl_crl.test
+++ b/mysql-test/main/ssl_crl.test
@@ -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 MySQL server at '.*', system error: [0-9]+/ERROR 2026 (HY000): SSL connection error: sslv3 alert certificate revoked/
+--replace_regex /ERROR 2013 \(HY000\): Lost connection to MySQL 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
diff --git a/mysql-test/main/ssl_crl_clients.result b/mysql-test/main/ssl_crl_clients.result
index 0d8ed9a4158..44ba101c892 100644
--- a/mysql-test/main/ssl_crl_clients.result
+++ b/mysql-test/main/ssl_crl_clients.result
@@ -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'
diff --git a/mysql-test/main/ssl_crl_clients.test b/mysql-test/main/ssl_crl_clients.test
index f1dc4909cc6..0023dee03ac 100644
--- a/mysql-test/main/ssl_crl_clients.test
+++ b/mysql-test/main/ssl_crl_clients.test
@@ -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
diff --git a/mysql-test/main/ssl_system_ca,bad.result b/mysql-test/main/ssl_system_ca,bad.result
index b9c6d3e29d8..1799e9f5e32 100644
--- a/mysql-test/main/ssl_system_ca,bad.result
+++ b/mysql-test/main/ssl_system_ca,bad.result
@@ -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
diff --git a/mysql-test/main/wait_timeout.test b/mysql-test/main/wait_timeout.test
index 84841aabb8b..f7289ceed1f 100644
--- a/mysql-test/main/wait_timeout.test
+++ b/mysql-test/main/wait_timeout.test
@@ -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
diff --git a/mysql-test/std_data/mdev-28727-pet4.frm b/mysql-test/std_data/mdev-28727-pet4.frm
new file mode 100644
index 00000000000..3ff86d1dca1
--- /dev/null
+++ b/mysql-test/std_data/mdev-28727-pet4.frm
Binary files differ
diff --git a/mysql-test/suite/galera/r/galera_log_bin_ext.result b/mysql-test/suite/galera/r/galera_log_bin_ext.result
index f0914954e0a..b110cb4dba3 100644
--- a/mysql-test/suite/galera/r/galera_log_bin_ext.result
+++ b/mysql-test/suite/galera/r/galera_log_bin_ext.result
@@ -59,28 +59,7 @@ COUNT(*) = 2
1
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
-hostname1-bin.000001 # Gtid # # GTID #-#-#
-hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
-hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
-hostname1-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
-hostname1-bin.000001 # Table_map # # table_id: # (test.t1)
-hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-hostname1-bin.000001 # Xid # # COMMIT /* XID */
-hostname1-bin.000001 # Gtid # # GTID #-#-#
-hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
-hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
-hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
-hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
-hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-hostname1-bin.000001 # Xid # # COMMIT /* XID */
-hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
-hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
-hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
-hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-hostname1-bin.000001 # Xid # # COMMIT /* XID */
-hostname1-bin.000001 # Gtid # # GTID #-#-#
-hostname1-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
-hostname1-bin.000001 # Rotate # # hostname1-bin.000002;pos=4
+hostname1-bin.000002 # Binlog_checkpoint # # hostname1-bin.000002
DROP TABLE t1;
DROP TABLE t2;
#cleanup
diff --git a/mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result b/mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result
index f0914954e0a..b110cb4dba3 100644
--- a/mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result
+++ b/mysql-test/suite/galera/r/galera_log_bin_ext_mariabackup.result
@@ -59,28 +59,7 @@ COUNT(*) = 2
1
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
-hostname1-bin.000001 # Gtid # # GTID #-#-#
-hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=InnoDB
-hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
-hostname1-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES (1)
-hostname1-bin.000001 # Table_map # # table_id: # (test.t1)
-hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-hostname1-bin.000001 # Xid # # COMMIT /* XID */
-hostname1-bin.000001 # Gtid # # GTID #-#-#
-hostname1-bin.000001 # Query # # use `test`; CREATE TABLE t2 (id INT) ENGINE=InnoDB
-hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
-hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
-hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
-hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-hostname1-bin.000001 # Xid # # COMMIT /* XID */
-hostname1-bin.000001 # Gtid # # BEGIN GTID #-#-#
-hostname1-bin.000001 # Annotate_rows # # INSERT INTO t2 VALUES (1)
-hostname1-bin.000001 # Table_map # # table_id: # (test.t2)
-hostname1-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
-hostname1-bin.000001 # Xid # # COMMIT /* XID */
-hostname1-bin.000001 # Gtid # # GTID #-#-#
-hostname1-bin.000001 # Query # # use `test`; ALTER TABLE t1 ADD COLUMN f2 INTEGER
-hostname1-bin.000001 # Rotate # # hostname1-bin.000002;pos=4
+hostname1-bin.000002 # Binlog_checkpoint # # hostname1-bin.000002
DROP TABLE t1;
DROP TABLE t2;
#cleanup
diff --git a/mysql-test/suite/galera/t/galera_log_bin.inc b/mysql-test/suite/galera/t/galera_log_bin.inc
index c86de528a08..4c245846752 100644
--- a/mysql-test/suite/galera/t/galera_log_bin.inc
+++ b/mysql-test/suite/galera/t/galera_log_bin.inc
@@ -34,7 +34,6 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER;
--connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
---let $MASTER_MYPORT=$NODE_MYPORT_2
--source include/show_binlog_events.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/galera/t/galera_log_bin_sst.inc b/mysql-test/suite/galera/t/galera_log_bin_sst.inc
index a5336f4e3ac..3d20add6d9e 100644
--- a/mysql-test/suite/galera/t/galera_log_bin_sst.inc
+++ b/mysql-test/suite/galera/t/galera_log_bin_sst.inc
@@ -74,7 +74,6 @@ let $restart_noprint=2;
--connection node_2
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
---let $MASTER_MYPORT=$NODE_MYPORT_2
--source include/show_binlog_events.inc
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/update_time.result b/mysql-test/suite/innodb/r/update_time.result
index 534914e0216..50f4f88155f 100644
--- a/mysql-test/suite/innodb/r/update_time.result
+++ b/mysql-test/suite/innodb/r/update_time.result
@@ -2,7 +2,7 @@
# Test that INFORMATION_SCHEMA.TABLES.UPDATE_TIME is filled
# correctly for InnoDB tables.
#
-CREATE TABLE t (a INT) ENGINE=INNODB;
+CREATE TABLE t (a INT) ENGINE=INNODB STATS_PERSISTENT=0;
SELECT update_time FROM information_schema.tables WHERE table_name = 't';
update_time
NULL
@@ -19,24 +19,9 @@ SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
COUNT(*)
1
-CREATE TEMPORARY TABLE big (a TEXT) ENGINE=INNODB;
-SELECT COUNT(*) FROM information_schema.innodb_buffer_page
-WHERE table_name = '`test`.`t`';
-COUNT(*)
-1
-INSERT INTO big SELECT REPEAT('a', 1024) FROM seq_1_to_10240;
-SELECT COUNT(*) FROM information_schema.innodb_buffer_page
-WHERE table_name = '`test`.`t`';
-COUNT(*)
-0
-SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
-AND update_time IS NOT NULL;
-COUNT(*)
-1
-DROP TEMPORARY TABLE big;
# Test the behavior after restart with a prepared XA transaction
XA START 'xatrx';
-INSERT INTO t VALUES (5);
+DELETE FROM t;
XA END 'xatrx';
XA PREPARE 'xatrx';
CONNECT con1,localhost,root,,;
diff --git a/mysql-test/suite/innodb/t/update_time.test b/mysql-test/suite/innodb/t/update_time.test
index fd1e082f5f2..ce8418904c9 100644
--- a/mysql-test/suite/innodb/t/update_time.test
+++ b/mysql-test/suite/innodb/t/update_time.test
@@ -5,14 +5,10 @@
-- echo #
-- source include/have_innodb.inc
--- source include/have_innodb_max_16k.inc
# restart does not work with embedded
-- source include/not_embedded.inc
-# This test is slow on buildbot.
---source include/big_test.inc
---source include/have_sequence.inc
-CREATE TABLE t (a INT) ENGINE=INNODB;
+CREATE TABLE t (a INT) ENGINE=INNODB STATS_PERSISTENT=0;
SELECT update_time FROM information_schema.tables WHERE table_name = 't';
@@ -28,29 +24,10 @@ AND update_time IS NOT NULL;
SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
-CREATE TEMPORARY TABLE big (a TEXT) ENGINE=INNODB;
-
-SELECT COUNT(*) FROM information_schema.innodb_buffer_page
-WHERE table_name = '`test`.`t`';
-
-# evict table 't' by inserting as much data as the BP size itself
-INSERT INTO big SELECT REPEAT('a', 1024) FROM seq_1_to_10240;
-
-# confirm that all pages for table 't' have been evicted
-SELECT COUNT(*) FROM information_schema.innodb_buffer_page
-WHERE table_name = '`test`.`t`';
-
-# The result from this query will change once update_time becomes persistent
-# (WL#6917).
-SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
-AND update_time IS NOT NULL;
-
-DROP TEMPORARY TABLE big;
-
-- echo # Test the behavior after restart with a prepared XA transaction
XA START 'xatrx';
-INSERT INTO t VALUES (5);
+DELETE FROM t;
XA END 'xatrx';
XA PREPARE 'xatrx';
diff --git a/mysql-test/suite/plugins/r/binlog-simple_plugin_check.result b/mysql-test/suite/plugins/r/binlog-simple_plugin_check.result
index 6c960ee325c..1cba628db07 100644
--- a/mysql-test/suite/plugins/r/binlog-simple_plugin_check.result
+++ b/mysql-test/suite/plugins/r/binlog-simple_plugin_check.result
@@ -8,7 +8,7 @@ simple_password_check
#
CREATE USER user1@localhost IDENTIFIED BY 'BsG9#9.cem#!85';
CREATE USER user2@localhost IDENTIFIED BY 'bsg9#d.cem#!85';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
DROP USER user1@localhost;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
diff --git a/mysql-test/suite/plugins/r/cracklib_password_check.result b/mysql-test/suite/plugins/r/cracklib_password_check.result
index 1194e6eef5a..218d12fb884 100644
--- a/mysql-test/suite/plugins/r/cracklib_password_check.result
+++ b/mysql-test/suite/plugins/r/cracklib_password_check.result
@@ -14,29 +14,29 @@ LOAD_OPTION ON
PLUGIN_MATURITY Stable
PLUGIN_AUTH_VERSION 1.0
grant select on *.* to foocar identified by 'foocar';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
show warnings;
Level Code Message
Warning 1819 cracklib: it is based on your username
-Error 1819 Your password does not satisfy the current policy requirements
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
grant select on *.* to foocar identified by 'racoof';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
show warnings;
Level Code Message
Warning 1819 cracklib: it is based on your username
-Error 1819 Your password does not satisfy the current policy requirements
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
grant select on *.* to foo@barbar identified by 'barbar';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
show warnings;
Level Code Message
Warning 1819 cracklib: it does not contain enough DIFFERENT characters
-Error 1819 Your password does not satisfy the current policy requirements
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
grant select on *.* to foobar identified by 'qwerty';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
show warnings;
Level Code Message
Warning 1819 cracklib: it is based on a dictionary word
-Error 1819 Your password does not satisfy the current policy requirements
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
grant select on *.* to foobar identified by 'q$%^&*rty';
drop user foobar;
#
@@ -44,7 +44,7 @@ drop user foobar;
# when using cracklib plugin
#
create user 'newuser'@'localhost';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
uninstall plugin cracklib_password_check;
create user foo1 identified by 'pwd';
drop user foo1;
diff --git a/mysql-test/suite/plugins/r/simple_password_check.result b/mysql-test/suite/plugins/r/simple_password_check.result
index b3712ee22d2..ab6988ed002 100644
--- a/mysql-test/suite/plugins/r/simple_password_check.result
+++ b/mysql-test/suite/plugins/r/simple_password_check.result
@@ -75,13 +75,37 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
GLOBAL_VALUE_PATH NULL
create user foo1 identified by 'pwd';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Too short password (< 8)
+Warning 1819 simple_password_check: Not enough upper case letters (< 1)
+Warning 1819 simple_password_check: Not enough digits (< 1)
+Warning 1819 simple_password_check: Not enough special characters (< 1)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
create user foo1;
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: The password equal to the user name
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
grant select on *.* to foo1 identified by 'pwd';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Too short password (< 8)
+Warning 1819 simple_password_check: Not enough upper case letters (< 1)
+Warning 1819 simple_password_check: Not enough digits (< 1)
+Warning 1819 simple_password_check: Not enough special characters (< 1)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
grant select on *.* to `FooBar1!` identified by 'FooBar1!';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: The password equal to the user name
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
grant select on *.* to `BarFoo1!` identified by 'FooBar1!';
drop user `BarFoo1!`;
create user foo1 identified by 'aA.12345';
@@ -103,28 +127,64 @@ simple_password_check_other_characters 3
create user foo1 identified by '123:qwe:ASD!';
drop user foo1;
create user foo1 identified by '-23:qwe:ASD!';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough digits (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
create user foo1 identified by '123:4we:ASD!';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough lower case letters (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
create user foo1 identified by '123:qwe:4SD!';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough upper case letters (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
create user foo1 identified by '123:qwe:ASD4';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough special characters (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
create user foo1 identified by '123:qwe:ASD!';
set password for foo1 = password('qwe:-23:ASD!');
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough digits (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
set password for foo1 = old_password('4we:123:ASD!');
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
set password for foo1 = password('qwe:123:4SD!');
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough upper case letters (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
set password for foo1 = old_password('qwe:123:ASD4');
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough special characters (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
set password for foo1 = password('qwe:123:ASD!');
select @@strict_password_validation;
@@strict_password_validation
1
set password for foo1 = '';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: The password equal to the user name
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
set password for foo1 = '2222222222222222';
ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
set password for foo1 = '11111111111111111111111111111111111111111';
@@ -138,15 +198,24 @@ ERROR HY000: The MariaDB server is running with the --strict-password-validation
grant select on *.* to foo2 identified with mysql_old_password using '2222222222222222';
ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
create user foo2 identified with mysql_native_password using '';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: The password equal to the user name
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo2'@'%'
grant select on *.* to foo2 identified with mysql_old_password using '';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
grant select on *.* to foo2 identified with mysql_old_password;
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'xxx') where user='foo1';
set global strict_password_validation=0;
set password for foo1 = '';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: The password equal to the user name
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
set password for foo1 = '2222222222222222';
set password for foo1 = '11111111111111111111111111111111111111111';
create user foo2 identified by password '11111111111111111111111111111111111111111';
diff --git a/mysql-test/suite/plugins/r/two_password_validations.result b/mysql-test/suite/plugins/r/two_password_validations.result
index dc6bab3c2d5..4bd674baebb 100644
--- a/mysql-test/suite/plugins/r/two_password_validations.result
+++ b/mysql-test/suite/plugins/r/two_password_validations.result
@@ -5,16 +5,18 @@ install soname "cracklib_password_check";
grant select on *.* to foobar identified by 'q$%^&*R1234ty';
drop user foobar;
grant select on *.* to Fff_fff1 identified by '1fff_ffF';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
show warnings;
Level Code Message
Warning 1819 cracklib: it does not contain enough DIFFERENT characters
-Error 1819 Your password does not satisfy the current policy requirements
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
grant select on *.* to foobar identified by 'q-%^&*rty';
-ERROR HY000: Your password does not satisfy the current policy requirements
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
show warnings;
Level Code Message
-Error 1819 Your password does not satisfy the current policy requirements
+Warning 1819 simple_password_check: Not enough upper case letters (< 1)
+Warning 1819 simple_password_check: Not enough digits (< 1)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
uninstall plugin simple_password_check;
grant select on *.* to foobar identified by 'q-%^&*rty';
drop user foobar;
diff --git a/mysql-test/suite/plugins/t/simple_password_check.test b/mysql-test/suite/plugins/t/simple_password_check.test
index dfb078df638..3ce2d86cd68 100644
--- a/mysql-test/suite/plugins/t/simple_password_check.test
+++ b/mysql-test/suite/plugins/t/simple_password_check.test
@@ -15,16 +15,20 @@ select * from information_schema.system_variables where variable_name like 'simp
--error ER_NOT_VALID_PASSWORD
create user foo1 identified by 'pwd';
+show warnings;
# Create user with no password.
--error ER_NOT_VALID_PASSWORD
create user foo1;
+show warnings;
--error ER_NOT_VALID_PASSWORD
grant select on *.* to foo1 identified by 'pwd';
+show warnings;
--error ER_NOT_VALID_PASSWORD
grant select on *.* to `FooBar1!` identified by 'FooBar1!';
+show warnings;
grant select on *.* to `BarFoo1!` identified by 'FooBar1!';
drop user `BarFoo1!`;
@@ -43,25 +47,32 @@ drop user foo1;
--error ER_NOT_VALID_PASSWORD
create user foo1 identified by '-23:qwe:ASD!';
+show warnings;
--error ER_NOT_VALID_PASSWORD
create user foo1 identified by '123:4we:ASD!';
+show warnings;
--error ER_NOT_VALID_PASSWORD
create user foo1 identified by '123:qwe:4SD!';
+show warnings;
--error ER_NOT_VALID_PASSWORD
create user foo1 identified by '123:qwe:ASD4';
+show warnings;
create user foo1 identified by '123:qwe:ASD!';
--error ER_NOT_VALID_PASSWORD
set password for foo1 = password('qwe:-23:ASD!');
+show warnings;
--error ER_NOT_VALID_PASSWORD
set password for foo1 = old_password('4we:123:ASD!');
--error ER_NOT_VALID_PASSWORD
set password for foo1 = password('qwe:123:4SD!');
+show warnings;
--error ER_NOT_VALID_PASSWORD
set password for foo1 = old_password('qwe:123:ASD4');
+show warnings;
set password for foo1 = password('qwe:123:ASD!');
# now, strict_password_validation
@@ -69,6 +80,7 @@ select @@strict_password_validation;
--error ER_NOT_VALID_PASSWORD
set password for foo1 = '';
+show warnings;
--error ER_OPTION_PREVENTS_STATEMENT
set password for foo1 = '2222222222222222';
--error ER_OPTION_PREVENTS_STATEMENT
@@ -83,6 +95,7 @@ create user foo2 identified with mysql_native_password using '111111111111111111
grant select on *.* to foo2 identified with mysql_old_password using '2222222222222222';
--error ER_NOT_VALID_PASSWORD
create user foo2 identified with mysql_native_password using '';
+show warnings;
--error ER_NOT_VALID_PASSWORD
grant select on *.* to foo2 identified with mysql_old_password using '';
--error ER_NOT_VALID_PASSWORD
@@ -95,6 +108,7 @@ set global strict_password_validation=0;
--error ER_NOT_VALID_PASSWORD
set password for foo1 = '';
+show warnings;
set password for foo1 = '2222222222222222';
set password for foo1 = '11111111111111111111111111111111111111111';
create user foo2 identified by password '11111111111111111111111111111111111111111';
diff --git a/mysql-test/suite/roles/rename_user.result b/mysql-test/suite/roles/rename_user.result
index 9550e15953a..367f6e4b0fe 100644
--- a/mysql-test/suite/roles/rename_user.result
+++ b/mysql-test/suite/roles/rename_user.result
@@ -25,3 +25,12 @@ newhost test_user_rm test_role1 N
delete from mysql.roles_mapping;
delete from mysql.user where user like 'test%';
flush privileges;
+#
+# MDEV-29131 Assertion `status == 0' failed when renaming user after deleting table roles_mapping
+#
+create role r;
+rename table mysql.roles_mapping to test.t1;
+rename user current_user to a@a;
+rename user a@a to root@localhost;
+rename table test.t1 to mysql.roles_mapping;
+drop role r;
diff --git a/mysql-test/suite/roles/rename_user.test b/mysql-test/suite/roles/rename_user.test
index 45429b76666..8c899352847 100644
--- a/mysql-test/suite/roles/rename_user.test
+++ b/mysql-test/suite/roles/rename_user.test
@@ -36,3 +36,13 @@ delete from mysql.roles_mapping;
delete from mysql.user where user like 'test%';
flush privileges;
+--echo #
+--echo # MDEV-29131 Assertion `status == 0' failed when renaming user after deleting table roles_mapping
+--echo #
+create role r;
+rename table mysql.roles_mapping to test.t1;
+rename user current_user to a@a;
+rename user a@a to root@localhost;
+rename table test.t1 to mysql.roles_mapping;
+drop role r;
+
diff --git a/mysql-test/suite/sys_vars/t/completion_type_func.test b/mysql-test/suite/sys_vars/t/completion_type_func.test
index 2411cacf8bb..5c343cee9ab 100644
--- a/mysql-test/suite/sys_vars/t/completion_type_func.test
+++ b/mysql-test/suite/sys_vars/t/completion_type_func.test
@@ -146,7 +146,7 @@ COMMIT;
--echo ## Inserting rows should give error here because connection should ##
--echo ## disconnect after using COMMIT ##
---Error 2006,2013,ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED
+--Error 2006,2013,ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED,5014
INSERT INTO t1 VALUES(4,'Record_4');
connection test_con2;
@@ -160,7 +160,7 @@ INSERT INTO t1 VALUES(12,'Record_12');
ROLLBACK;
--echo ## Expect a failure due to COMMIT/ROLLBACK AND RELEASE behavior ##
---Error 2006,2013,ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED
+--Error 2006,2013,ER_QUERY_INTERRUPTED,ER_CONNECTION_KILLED,5014
INSERT INTO t1 VALUES(4,'Record_4');
connection default;
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result
index 4ec57413a15..a09939c8cc2 100644
--- a/mysql-test/suite/vcol/r/vcol_misc.result
+++ b/mysql-test/suite/vcol/r/vcol_misc.result
@@ -550,3 +550,19 @@ drop table t1;
#
# End of 10.2 tests
#
+#
+# RAND is session func
+#
+create table t1 (a int, b float default rand(1));
+insert into t1 (a) values (1);
+insert into t1 (a) values (2);
+insert into t1 (a) values (3);
+select * from t1;
+a b
+1 0.405404
+2 0.405404
+3 0.405404
+drop table t1;
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test
index 3062e5a685d..c3f36d93316 100644
--- a/mysql-test/suite/vcol/t/vcol_misc.test
+++ b/mysql-test/suite/vcol/t/vcol_misc.test
@@ -514,3 +514,17 @@ drop table t1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # RAND is session func
+--echo #
+create table t1 (a int, b float default rand(1));
+insert into t1 (a) values (1);
+insert into t1 (a) values (2);
+insert into t1 (a) values (3);
+select * from t1;
+drop table t1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/plugin/simple_password_check/simple_password_check.c b/plugin/simple_password_check/simple_password_check.c
index 65d017e24a1..1762690f2c5 100644
--- a/plugin/simple_password_check/simple_password_check.c
+++ b/plugin/simple_password_check/simple_password_check.c
@@ -29,7 +29,13 @@ static int validate(const MYSQL_CONST_LEX_STRING *username,
const char *ptr= password->str, *end= ptr + length;
if (strncmp(password->str, username->str, length) == 0)
+ {
+ // warning used to do not change error code
+ my_printf_error(ER_NOT_VALID_PASSWORD,
+ "simple_password_check: The password equal to the user name",
+ ME_WARNING);
return 1;
+ }
/* everything non-ascii is the "other" character and is good for the password */
for(; ptr < end; ptr++)
@@ -43,6 +49,28 @@ static int validate(const MYSQL_CONST_LEX_STRING *username,
else
others++;
}
+
+ // warnings used to do not change error code
+ if (length < min_length)
+ my_printf_error(ER_NOT_VALID_PASSWORD,
+ "simple_password_check: Too short password (< %u)",
+ ME_WARNING, min_length);
+ if (uppers < min_letters)
+ my_printf_error(ER_NOT_VALID_PASSWORD,
+ "simple_password_check: Not enough upper case "
+ "letters (< %u)",ME_WARNING, min_letters);
+ if (lowers < min_letters)
+ my_printf_error(ER_NOT_VALID_PASSWORD,
+ "simple_password_check: Not enough lower case "
+ "letters (< %u)",ME_WARNING, min_letters);
+ if (digits < min_digits)
+ my_printf_error(ER_NOT_VALID_PASSWORD,
+ "simple_password_check: Not enough digits (< %u)",
+ ME_WARNING, min_digits);
+ if (others < min_others)
+ my_printf_error(ER_NOT_VALID_PASSWORD,
+ "simple_password_check: Not enough special "
+ "characters (< %u)",ME_WARNING, min_others);
/* remember TRUE means the password failed the validation */
return length < min_length ||
uppers < min_letters ||
diff --git a/scripts/wsrep_sst_backup.sh b/scripts/wsrep_sst_backup.sh
index 4f98ad41dd5..6f8c658135a 100644
--- a/scripts/wsrep_sst_backup.sh
+++ b/scripts/wsrep_sst_backup.sh
@@ -71,7 +71,7 @@ then
# (b) Cluster state ID & wsrep_gtid_domain_id to be written to the file, OR
# (c) ERROR file, in case flush tables operation failed.
- while [ ! -r "$FLUSHED" ] && \
+ while [ ! -r "$FLUSHED" ] || \
! grep -q -F ':' -- "$FLUSHED"
do
# Check whether ERROR file exists.
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh
index 44c6a7b4476..6a94cb0f706 100644
--- a/scripts/wsrep_sst_common.sh
+++ b/scripts/wsrep_sst_common.sh
@@ -104,6 +104,7 @@ WSREP_SST_OPT_HOST_UNESCAPED=""
INNODB_DATA_HOME_DIR=$(trim_dir "${INNODB_DATA_HOME_DIR:-}")
INNODB_LOG_GROUP_HOME=$(trim_dir "${INNODB_LOG_GROUP_HOME:-}")
INNODB_UNDO_DIR=$(trim_dir "${INNODB_UNDO_DIR:-}")
+INNODB_BUFFER_POOL=""
INNODB_FORCE_RECOVERY=""
INNOEXTRA=""
@@ -212,6 +213,10 @@ case "$1" in
readonly INNODB_UNDO_DIR=$(trim_dir "$2")
shift
;;
+ '--innodb-buffer-pool-filename')
+ readonly INNODB_BUFFER_POOL=$(trim_string "$2")
+ shift
+ ;;
'--defaults-file')
readonly WSREP_SST_OPT_DEFAULT="$1=$2"
readonly WSREP_SST_OPT_DEFAULTS="$1='$2'"
@@ -471,6 +476,12 @@ case "$1" in
fi
skip_mysqld_arg=1
;;
+ '--innodb-buffer-pool-filename')
+ if [ -z "$INNODB_BUFFER_POOL" ]; then
+ MYSQLD_OPT_INNODB_BUFFER_POOL=$(trim_string "$value")
+ fi
+ skip_mysqld_arg=1
+ ;;
'--innodb-force-recovery')
if [ -n "$value" -a "$value" != "0" ]; then
INNODB_FORCE_RECOVERY=$(trim_string "$value")
@@ -552,6 +563,10 @@ if [ -n "${MYSQLD_OPT_INNODB_UNDO_DIR:-}" -a \
-z "$INNODB_UNDO_DIR" ]; then
readonly INNODB_UNDO_DIR="$MYSQLD_OPT_INNODB_UNDO_DIR"
fi
+if [ -n "${MYSQLD_OPT_INNODB_BUFFER_POOL:-}" -a \
+ -z "$INNODB_BUFFER_POOL" ]; then
+ readonly INNODB_BUFFER_POOL="$MYSQLD_OPT_INNODB_BUFFER_POOL"
+fi
if [ -n "${MYSQLD_OPT_LOG_BIN:-}" -a \
-z "$WSREP_SST_OPT_BINLOG" ]; then
readonly WSREP_SST_OPT_BINLOG="$MYSQLD_OPT_LOG_BIN"
@@ -602,6 +617,9 @@ fi
if [ -n "$INNODB_UNDO_DIR" ]; then
INNOEXTRA="$INNOEXTRA --innodb-undo-directory='$INNODB_UNDO_DIR'"
fi
+if [ -n "$INNODB_BUFFER_POOL" ]; then
+ INNOEXTRA="$INNOEXTRA --innodb-buffer-pool-filename='$INNODB_BUFFER_POOL'"
+fi
if [ -n "$WSREP_SST_OPT_BINLOG" ]; then
INNOEXTRA="$INNOEXTRA --log-bin='$WSREP_SST_OPT_BINLOG'"
if [ -n "$WSREP_SST_OPT_BINLOG_INDEX" ]; then
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
index 5521dd51098..63ef8be8690 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -664,6 +664,9 @@ cleanup_at_exit()
local estatus=$?
if [ $estatus -ne 0 ]; then
wsrep_log_error "Cleanup after exit with status: $estatus"
+ elif [ -z "${coords:-}" -a "$WSREP_SST_OPT_ROLE" = 'joiner' ]; then
+ estatus=32
+ wsrep_log_error "Failed to get current position"
fi
[ "$(pwd)" != "$OLD_PWD" ] && cd "$OLD_PWD"
@@ -934,6 +937,11 @@ if [ $ssyslog -eq 1 ]; then
logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@"
}
+ wsrep_log_warning()
+ {
+ logger -p daemon.warning -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@"
+ }
+
wsrep_log_info()
{
logger -p daemon.info -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@"
@@ -1015,7 +1023,7 @@ setup_commands()
recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY"
fi
INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY"
- INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts$INNOEXTRA --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE"
+ INNOMOVE="$BACKUP_BIN$WSREP_SST_OPT_CONF --move-back$disver${impts:+ }$impts$INNOEXTRA --galera-info --force-non-empty-directories --target-dir='$DATA' --datadir='${TDATA:-$DATA}' $INNOMOVE"
INNOBACKUP="$BACKUP_BIN$WSREP_SST_OPT_CONF --backup$disver${iopts:+ }$iopts$tmpopts$INNOEXTRA --galera-info --stream=$sfmt --target-dir='$itmpdir' --datadir='$DATA'$mysqld_args $INNOBACKUP"
}
@@ -1153,11 +1161,6 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
iopts="--parallel=$backup_threads${iopts:+ }$iopts"
fi
- max_binlogs=$(parse_cnf "$encgroups" 'sst-max-binlogs')
- if [ -n "$max_binlogs" ]; then
- iopts="--sst-max-binlogs=$max_binlogs${iopts:+ }$iopts"
- fi
-
setup_commands
set +e
diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh
index 7096bb4b330..ddf41559c29 100644
--- a/scripts/wsrep_sst_rsync.sh
+++ b/scripts/wsrep_sst_rsync.sh
@@ -38,6 +38,9 @@ cleanup_joiner()
local estatus=$?
if [ $estatus -ne 0 ]; then
wsrep_log_error "Cleanup after exit with status: $estatus"
+ elif [ -z "${coords:-}" ]; then
+ estatus=32
+ wsrep_log_error "Failed to get current position"
fi
local failure=0
@@ -408,7 +411,7 @@ EOF
# (b) Cluster state ID & wsrep_gtid_domain_id to be written to the file, OR
# (c) ERROR file, in case flush tables operation failed.
- while [ ! -r "$FLUSHED" ] && \
+ while [ ! -r "$FLUSHED" ] || \
! grep -q -F ':' -- "$FLUSHED"
do
# Check whether ERROR file exists.
@@ -433,8 +436,8 @@ EOF
# Let's check the existence of the file with the index:
if [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ]; then
# Let's read the binlog index:
- max_binlogs=$(parse_cnf "$encgroups" 'sst-max-binlogs')
- if [ -n "$max_binlogs" ]; then
+ max_binlogs=$(parse_cnf "$encgroups" 'sst-max-binlogs' 1)
+ if [ $max_binlogs -ge 0 ]; then
binlog_files=""
if [ $max_binlogs -gt 0 ]; then
binlog_files=$(tail -n $max_binlogs \
diff --git a/sql/handler.cc b/sql/handler.cc
index fe3d3918636..0d5609f753a 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -4608,17 +4608,32 @@ int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt)
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
m_lock_type != F_UNLCK);
- if ((table->s->mysql_version >= MYSQL_VERSION_ID) &&
+ const ulong v= table->s->mysql_version;
+
+ if ((v >= MYSQL_VERSION_ID) &&
(check_opt->sql_flags & TT_FOR_UPGRADE))
return 0;
- if (table->s->mysql_version < MYSQL_VERSION_ID)
+ if (v < MYSQL_VERSION_ID)
{
if (unlikely((error= check_old_types())))
return error;
error= ha_check_for_upgrade(check_opt);
if (unlikely(error && (error != HA_ADMIN_NEEDS_CHECK)))
return error;
+ if (table->s->table_category == TABLE_CATEGORY_USER &&
+ (v < 100142 ||
+ (v >= 100200 && v < 100228) ||
+ (v >= 100300 && v < 100319) ||
+ (v >= 100400 && v < 100409)))
+ {
+ for (const KEY *key= table->key_info,
+ *end= table->key_info + table->s->keys; key < end; key++)
+ {
+ if (key->flags & HA_BINARY_PACK_KEY && key->flags & HA_VAR_LENGTH_KEY)
+ return HA_ADMIN_NEEDS_UPGRADE;
+ }
+ }
if (unlikely(!error && (check_opt->sql_flags & TT_FOR_UPGRADE)))
return 0;
}
@@ -7182,6 +7197,17 @@ int handler::ha_write_row(const uchar *buf)
if ((error= ha_check_overlaps(NULL, buf)))
DBUG_RETURN(error);
+ /*
+ NOTE: this != table->file is true in 3 cases:
+
+ 1. under copy_partitions() (REORGANIZE PARTITION): that does not
+ require long unique check as it does not introduce new rows or new index.
+ 2. under partition's ha_write_row() (INSERT): check_duplicate_long_entries()
+ was already done by ha_partition::ha_write_row(), no need to check it
+ again for each single partition.
+ 3. under ha_mroonga::wrapper_write_row()
+ */
+
if (table->s->long_unique_table && this == table->file)
{
DBUG_ASSERT(inited == NONE || lookup_handler != this);
@@ -7235,6 +7261,13 @@ int handler::ha_update_row(const uchar *old_data, const uchar *new_data)
uint saved_status= table->status;
error= ha_check_overlaps(old_data, new_data);
+ /*
+ NOTE: this != table->file is true under partition's ha_update_row():
+ check_duplicate_long_entries_update() was already done by
+ ha_partition::ha_update_row(), no need to check it again for each single
+ partition. Same applies to ha_mroonga wrapper.
+ */
+
if (!error && table->s->long_unique_table && this == table->file)
error= check_duplicate_long_entries_update(new_data);
table->status= saved_status;
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index f49d17a6ded..8461de9cd36 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -789,7 +789,9 @@ int Arg_comparator::compare_e_string()
{
String *res1,*res2;
res1= (*a)->val_str(&value1);
+ DBUG_ASSERT((res1 == NULL) == (*a)->null_value);
res2= (*b)->val_str(&value2);
+ DBUG_ASSERT((res2 == NULL) == (*b)->null_value);
if (!res1 || !res2)
return MY_TEST(res1 == res2);
return MY_TEST(sortcmp(res1, res2, compare_collation()) == 0);
diff --git a/sql/item_func.h b/sql/item_func.h
index a7dbb9ab4bc..8d2a230321e 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -1975,8 +1975,7 @@ public:
void cleanup() { first_eval= TRUE; Item_real_func::cleanup(); }
bool check_vcol_func_processor(void *arg)
{
- return mark_unsupported_function(func_name(), "()", arg,
- VCOL_NON_DETERMINISTIC);
+ return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
}
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_rand>(thd, this); }
diff --git a/sql/item_jsonfunc.cc b/sql/item_jsonfunc.cc
index 7aa9f2917ea..2fd2f459d0b 100644
--- a/sql/item_jsonfunc.cc
+++ b/sql/item_jsonfunc.cc
@@ -150,10 +150,12 @@ int json_path_parts_compare(
{
int res, res2;
- long arbitrary_var;
- long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
- {ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);});
+ {
+ long arbitrary_var;
+ long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
+ ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);
+ });
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
return 1;
@@ -1096,13 +1098,15 @@ my_decimal *Item_func_json_extract::val_decimal(my_decimal *to)
case JSON_VALUE_OBJECT:
case JSON_VALUE_ARRAY:
case JSON_VALUE_FALSE:
- case JSON_VALUE_NULL:
case JSON_VALUE_UNINITALIZED:
- break;
+ // TODO: fix: NULL should be NULL
+ case JSON_VALUE_NULL:
+ int2my_decimal(E_DEC_FATAL_ERROR, 0, false/*unsigned_flag*/, to);
+ return to;
};
}
- int2my_decimal(E_DEC_FATAL_ERROR, 0, false/*unsigned_flag*/, to);
- return to;
+ DBUG_ASSERT(null_value);
+ return 0;
}
@@ -1140,10 +1144,12 @@ static int check_contains(json_engine_t *js, json_engine_t *value)
{
json_engine_t loc_js;
bool set_js;
- long arbitrary_var;
- long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
- {ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);});
+ {
+ long arbitrary_var;
+ long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
+ ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);
+ });
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
return 1;
@@ -2106,10 +2112,12 @@ err_return:
static int do_merge(String *str, json_engine_t *je1, json_engine_t *je2)
{
- long arbitrary_var;
- long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
- {ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);});
+ {
+ long arbitrary_var;
+ long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
+ ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);
+ });
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
return 1;
@@ -2445,10 +2453,12 @@ static int copy_value_patch(String *str, json_engine_t *je)
static int do_merge_patch(String *str, json_engine_t *je1, json_engine_t *je2,
bool *empty_result)
{
- long arbitrary_var;
- long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
- {ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);});
+ {
+ long arbitrary_var;
+ long stack_used_up= (available_stack_size(current_thd->thread_stack, &arbitrary_var));
+ ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);
+ });
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
return 1;
diff --git a/sql/share/errmsg-utf8.txt b/sql/share/errmsg-utf8.txt
index 07f00a9fa81..718a69e2cc2 100644
--- a/sql/share/errmsg-utf8.txt
+++ b/sql/share/errmsg-utf8.txt
@@ -7727,8 +7727,8 @@ ER_INVALID_YEAR_COLUMN_LENGTH
rus "Тип YEAR(%lu) более не поддерживается, вместо него будет создана колонка с типом YEAR(4)"
ER_NOT_VALID_PASSWORD
- chi "您的密码不满足当前的政策要求"
- eng "Your password does not satisfy the current policy requirements"
+ eng "Your password does not satisfy the current policy requirements (%s)"
+ ukr "Ваш пароль не відповідає поточним правилам (%s)"
ER_MUST_CHANGE_PASSWORD
bgn "Трябва първо да си смените паролата със SET PASSWORD за да можете да изпълните тази команда"
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index c4e66cf5d73..74241e7d9c2 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -2175,7 +2175,12 @@ static my_bool do_validate(THD *, plugin_ref plugin, void *arg)
struct validation_data *data= (struct validation_data *)arg;
struct st_mariadb_password_validation *handler=
(st_mariadb_password_validation *)plugin_decl(plugin)->info;
- return handler->validate_password(data->user, data->password);
+ if (handler->validate_password(data->user, data->password))
+ {
+ my_error(ER_NOT_VALID_PASSWORD, MYF(0), plugin_ref_to_int(plugin)->name.str);
+ return true;
+ }
+ return false;
}
@@ -2189,7 +2194,6 @@ static bool validate_password(THD *thd, const LEX_CSTRING &user,
if (plugin_foreach(NULL, do_validate,
MariaDB_PASSWORD_VALIDATION_PLUGIN, &data))
{
- my_error(ER_NOT_VALID_PASSWORD, MYF(0));
return true;
}
}
@@ -10746,24 +10750,21 @@ static int handle_grant_data(THD *thd, Grant_tables& tables, bool drop,
}
/* Handle roles_mapping table. */
- if (tables.roles_mapping_table().table_exists())
+ if (tables.roles_mapping_table().table_exists() &&
+ (found= handle_grant_table(thd, tables.roles_mapping_table(),
+ ROLES_MAPPING_TABLE, drop, user_from, user_to)) < 0)
{
- if ((found= handle_grant_table(thd, tables.roles_mapping_table(),
- ROLES_MAPPING_TABLE, drop,
- user_from, user_to)) < 0)
- {
- /* Handle of table failed, don't touch the in-memory array. */
- result= -1;
- }
- else
- {
- /* Handle acl_roles_mappings array */
- if ((handle_grant_struct(ROLES_MAPPINGS_HASH, drop, user_from, user_to) || found)
- && ! result)
- result= 1; /* At least one record/element found */
- if (search_only)
- goto end;
- }
+ /* Handle of table failed, don't touch the in-memory array. */
+ result= -1;
+ }
+ else
+ {
+ /* Handle acl_roles_mappings array */
+ if ((handle_grant_struct(ROLES_MAPPINGS_HASH, drop, user_from, user_to) || found)
+ && ! result)
+ result= 1; /* At least one record/element found */
+ if (search_only)
+ goto end;
}
/* Handle user table. */
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index ee94f2d7d07..db081c5c559 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -2528,7 +2528,7 @@ static bool plugin_dl_foreach_internal(THD *thd, st_plugin_dl *plugin_dl,
tmp.plugin_dl= plugin_dl;
mysql_mutex_lock(&LOCK_plugin);
- if ((plugin= plugin_find_internal(&tmp.name, MYSQL_ANY_PLUGIN)) &&
+ if ((plugin= plugin_find_internal(&tmp.name, plug->type)) &&
plugin->plugin == plug)
{
diff --git a/storage/connect/CMakeLists.txt b/storage/connect/CMakeLists.txt
index c5e54daf093..088ecfbf3b2 100644
--- a/storage/connect/CMakeLists.txt
+++ b/storage/connect/CMakeLists.txt
@@ -361,26 +361,26 @@ IF(CONNECT_WITH_REST)
# MESSAGE(STATUS "=====> REST support is ON")
SET(CONNECT_SOURCES ${CONNECT_SOURCES} tabrest.cpp tabrest.h)
add_definitions(-DREST_SUPPORT)
-# FIND_PACKAGE(cpprestsdk QUIET)
-# IF (cpprestsdk_FOUND)
+# FIND_PACKAGE(cpprestsdk QUIET)
+# IF (cpprestsdk_FOUND)
# IF(UNIX)
-## INCLUDE_DIRECTORIES(${CPPRESTSDK_INCLUDE_DIR})
-## If needed edit next line to set the path to libcpprest.so
-# SET(REST_LIBRARY -lcpprest)
-# MESSAGE (STATUS ${REST_LIBRARY})
+## INCLUDE_DIRECTORIES(${CPPRESTSDK_INCLUDE_DIR})
+## If needed edit next line to set the path to libcpprest.so
+# SET(REST_LIBRARY -lcpprest)
+# MESSAGE (STATUS ${REST_LIBRARY})
# ELSE(NOT UNIX)
-## Next line sets debug compile mode matching cpprest_2_10d.dll
-## when it was binary installed (can be change later in Visual Studio)
-## Comment it out if not needed depending on your cpprestsdk installation.
+## Next line sets debug compile mode matching cpprest_2_10d.dll
+## when it was binary installed (can be change later in Visual Studio)
+## Comment it out if not needed depending on your cpprestsdk installation.
# SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
# ENDIF(UNIX)
-## IF(REST_LIBRARY) why this? how about Windows
-# SET(CONNECT_SOURCES ${CONNECT_SOURCES} restget.cpp)
-# add_definitions(-DREST_SOURCE)
-## ENDIF()
-##ELSE(NOT cpprestsdk_FOUND)
-## MESSAGE(STATUS "=====> cpprestsdk package not found")
-# ENDIF (cpprestsdk_FOUND)
+## IF(REST_LIBRARY) why this? how about Windows
+# SET(CONNECT_SOURCES ${CONNECT_SOURCES} restget.cpp)
+# add_definitions(-DREST_SOURCE)
+## ENDIF()
+## ELSE(NOT cpprestsdk_FOUND)
+# MESSAGE(STATUS "=====> cpprestsdk package not found")
+# ENDIF (cpprestsdk_FOUND)
ENDIF(CONNECT_WITH_REST)
ADD_FEATURE_INFO(CONNECT_REST CONNECT_WITH_REST "Support for REST API in the CONNECT storage engine")
@@ -423,28 +423,22 @@ IF(MSVC AND (CMAKE_CXX_FLAGS MATCHES "/MP"))
ENDIF()
ENDIF()
-IF(WIN32)
+IF(MSVC)
IF (libmongoc-1.0_FOUND)
SET_TARGET_PROPERTIES(connect PROPERTIES LINK_FLAGS
"/DELAYLOAD:libbson-1.0.dll /DELAYLOAD:libmongoc-1.0.dll")
- ENDIF(libmongoc-1.0_FOUND)
-
-# Install some extra files that belong to connect engine
-
- INSTALL(FILES "$<TARGET_FILE_DIR:connect>/ha_connect.lib"
- DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
-ENDIF(WIN32)
-
-IF(MSVC)
- # Temporarily disable "conversion from size_t .."
+ ENDIF()
+ # Temporarily disable "conversion from size_t .." warnings
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267")
- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267")
ENDIF()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996")
string(REPLACE "/permissive-" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+ INSTALL(FILES "$<TARGET_FILE_DIR:connect>/ha_connect.lib"
+ DESTINATION ${INSTALL_PLUGINDIR} COMPONENT connect-engine)
ENDIF()
+
IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND)
# TODO: Find how to compile and install the java wrapper classes
# Find required libraries and include directories
diff --git a/storage/connect/connect.h b/storage/connect/connect.h
index d1fc2ea592f..af1b9ba726e 100644
--- a/storage/connect/connect.h
+++ b/storage/connect/connect.h
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
/**************** Cnt H Declares Source Code File (.H) *****************/
/* Name: CONNECT.H Version 2.4 */
diff --git a/storage/connect/ha_connect.cc b/storage/connect/ha_connect.cc
index c245f952848..1064b14113f 100644
--- a/storage/connect/ha_connect.cc
+++ b/storage/connect/ha_connect.cc
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
/**
@file ha_connect.cc
@@ -266,7 +266,7 @@ bool Force_Bson(void);
size_t GetWorkSize(void);
void SetWorkSize(size_t);
extern "C" const char *msglang(void);
-
+static char *strz(PGLOBAL g, LEX_CSTRING &ls);
static void PopUser(PCONNECT xp);
static PCONNECT GetUser(THD *thd, PCONNECT xp);
static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp);
@@ -1301,10 +1301,10 @@ PCSZ GetStringTableOption(PGLOBAL g, PTOS options, PCSZ opname, PCSZ sdef)
opval= options->filter;
else if (!stricmp(opname, "Data_charset"))
opval= options->data_charset;
- else if (!stricmp(opname, "Http") || !stricmp(opname, "URL"))
- opval= options->http;
- else if (!stricmp(opname, "Uri"))
- opval= options->uri;
+ else if (!stricmp(opname, "Http") || !stricmp(opname, "URL"))
+ opval= options->http;
+ else if (!stricmp(opname, "Uri"))
+ opval= options->uri;
if (!opval && options->oplist)
opval= GetListOption(g, opname, options->oplist);
@@ -5656,7 +5656,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
String sql(buf, sizeof(buf), system_charset_info);
sql.copy(STRING_WITH_LEN("CREATE TABLE whatever ("), system_charset_info);
- user= host= pwd= tbl= src= col= ocl= pic= fcl= skc= rnk= zfn= NULL;
+ user= host= pwd= tbl= src= col= ocl= pic= fcl= skc= rnk= zfn= NULL;
dsn= url= NULL;
// Get the useful create options
@@ -5708,7 +5708,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
#if defined(ZIP_SUPPORT)
zfn= GetListOption(g, "Zipfile", topt->oplist, NULL);
#endif // ZIP_SUPPORT
- } else {
+ } else {
host= "localhost";
user= ((ttp == TAB_ODBC || ttp == TAB_JDBC) ? NULL : "root");
} // endif option_list
@@ -5845,17 +5845,17 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
PJDBCDEF jdef= new(g) JDBCDEF();
jdef->SetName(create_info->alias.str);
- sjp = (PJPARM)PlugSubAlloc(g, NULL, sizeof(JDBCPARM));
- sjp->Driver = driver;
- // sjp->Properties = prop;
- sjp->Fsize = 0;
- sjp->Scrollable = false;
-
- if ((rc = jdef->ParseURL(g, url, false)) == RC_OK) {
- sjp->Url = url;
- sjp->User = (char*)user;
- sjp->Pwd = (char*)pwd;
- ok = true;
+ sjp= (PJPARM)PlugSubAlloc(g, NULL, sizeof(JDBCPARM));
+ sjp->Driver= driver;
+ // sjp->Properties= prop;
+ sjp->Fsize= 0;
+ sjp->Scrollable= false;
+
+ if ((rc= jdef->ParseURL(g, url, false)) == RC_OK) {
+ sjp->Url= url;
+ sjp->User= (char*)user;
+ sjp->Pwd= (char*)pwd;
+ ok= true;
} else if (rc == RC_NF) {
if (jdef->GetTabname())
tab= (char*)jdef->GetTabname();
@@ -5970,11 +5970,11 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
break;
#endif // JAVA_SUPPORT
#if defined(REST_SUPPORT)
- case TAB_REST:
- if (!topt->http)
- strcpy(g->Message, "Missing REST HTTP option");
- else
- ok = true;
+ case TAB_REST:
+ if (!topt->http)
+ sprintf(g->Message, "Missing %s HTTP address", topt->type);
+ else
+ ok= true;
break;
#endif // REST_SUPPORT
@@ -6138,11 +6138,11 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
break;
#endif // LIBXML2_SUPPORT || DOMDOC_SUPPORT
#if defined(REST_SUPPORT)
- case TAB_REST:
- qrp = RESTColumns(g, topt, tab, (char *)db, fnc == FNC_COL);
- break;
+ case TAB_REST:
+ qrp= RESTColumns(g, topt, tab, (char *)db, fnc == FNC_COL);
+ break;
#endif // REST_SUPPORT
- case TAB_OEM:
+ case TAB_OEM:
qrp= OEMColumns(g, topt, tab, (char*)db, fnc == FNC_COL);
break;
default:
@@ -6459,7 +6459,7 @@ int ha_connect::create(const char *name, TABLE *table_arg,
TABTYPE type;
TABLE *st= table; // Probably unuseful
THD *thd= ha_thd();
- LEX_CSTRING cnc = table_arg->s->connect_string;
+ LEX_CSTRING cnc= table_arg->s->connect_string;
#if defined(WITH_PARTITION_STORAGE_ENGINE)
partition_info *part_info= table_arg->part_info;
#else // !WITH_PARTITION_STORAGE_ENGINE
diff --git a/storage/connect/ha_connect.h b/storage/connect/ha_connect.h
index d1aca22b01f..090f8343e1e 100644
--- a/storage/connect/ha_connect.h
+++ b/storage/connect/ha_connect.h
@@ -11,7 +11,7 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */
/** @file ha_connect.h
Author Olivier Bertrand
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index b61840a334d..1ae722a2fc5 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -1815,7 +1815,7 @@ static PCSZ MakeKey(PGLOBAL g, UDF_ARGS *args, int i)
} // endif *s
if (n < 1)
- return (PCSZ) "Key";
+ return (PCSZ) "Key";
if (!b) {
if ((p = (PSZ)PlgDBSubAlloc(g, NULL, n + 1))) {
@@ -1829,7 +1829,7 @@ static PCSZ MakeKey(PGLOBAL g, UDF_ARGS *args, int i)
} // endif s
- return (char*) s;
+ return s;
} // endif count
return (PCSZ) "Key";
diff --git a/storage/connect/mysql-test/connect/r/jdbc_postgresql.result b/storage/connect/mysql-test/connect/r/jdbc_postgresql.result
index 07cc3c465ea..bec1dc8725b 100644
--- a/storage/connect/mysql-test/connect/r/jdbc_postgresql.result
+++ b/storage/connect/mysql-test/connect/r/jdbc_postgresql.result
@@ -1,4 +1,4 @@
-SET GLOBAL connect_class_path='C:/MariaDB-10.2/MariaDB/storage/connect/mysql-test/connect/std_data/JavaWrappers.jar;C:/Jconnectors/postgresql-42.2.1.jar';
+SET GLOBAL connect_class_path='C:/MariaDB-10.0/MariaDB/storage/connect/mysql-test/connect/std_data/JavaWrappers.jar;C:/Jconnectors/postgresql-42.2.1.jar';
CREATE TABLE t2 (
command varchar(128) not null,
number int(5) not null flag=1,
diff --git a/storage/connect/tabwmi.cpp b/storage/connect/tabwmi.cpp
index 113f006b5a1..f90ff98ca35 100644
--- a/storage/connect/tabwmi.cpp
+++ b/storage/connect/tabwmi.cpp
@@ -771,7 +771,7 @@ void WMICOL::ReadColumn(PGLOBAL g)
break;
case VT_I4:
case VT_UI4:
- Value->SetValue(Prop.lVal);
+ Value->SetValue((long long)Prop.lVal);
break;
case VT_I2:
case VT_UI2:
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 035b43fad4c..0a13448b9ee 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -948,6 +948,7 @@ in the event that you want all of the memory to be dumped
to a core file.
Returns number of errors found in madvise calls. */
+MY_ATTRIBUTE((used))
int
buf_madvise_do_dump()
{