Merge branch '10.4' into 10.5
This commit is contained in:
commit
af143474d8
@ -577,6 +577,7 @@ datafile_read(datafile_cur_t *cursor)
|
|||||||
Check to see if a file exists.
|
Check to see if a file exists.
|
||||||
Takes name of the file to check.
|
Takes name of the file to check.
|
||||||
@return true if file exists. */
|
@return true if file exists. */
|
||||||
|
static
|
||||||
bool
|
bool
|
||||||
file_exists(const char *filename)
|
file_exists(const char *filename)
|
||||||
{
|
{
|
||||||
@ -1538,14 +1539,14 @@ bool backup_start(CorruptedPages &corrupted_pages)
|
|||||||
if (!write_galera_info(mysql_connection)) {
|
if (!write_galera_info(mysql_connection)) {
|
||||||
return(false);
|
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) {
|
lock_binlog_maybe(mysql_connection);
|
||||||
if (!write_current_binlog_file(mysql_connection, with_binlogs)) {
|
write_binlog_info(mysql_connection);
|
||||||
return(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (have_flush_engine_logs && !opt_no_lock) {
|
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 *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() */
|
/** Finish after backup_start() and backup_release() */
|
||||||
bool backup_finish()
|
bool backup_finish()
|
||||||
{
|
{
|
||||||
/* Copy buffer pool dump or LRU dump */
|
/* 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)) {
|
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, default_buffer_pool_file, 0);
|
||||||
copy_file(ds_data, buffer_pool_filename, dst_name, 0);
|
|
||||||
}
|
}
|
||||||
if (file_exists("ib_lru_dump")) {
|
if (file_exists("ib_lru_dump")) {
|
||||||
copy_file(ds_data, "ib_lru_dump", "ib_lru_dump", 0);
|
copy_file(ds_data, "ib_lru_dump", "ib_lru_dump", 0);
|
||||||
@ -1657,6 +1638,7 @@ ibx_copy_incremental_over_full()
|
|||||||
char path[FN_REFLEN];
|
char path[FN_REFLEN];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
DBUG_ASSERT(!opt_galera_info);
|
||||||
datadir_node_init(&node);
|
datadir_node_init(&node);
|
||||||
|
|
||||||
/* If we were applying an incremental change set, we need to make
|
/* 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)))
|
if (!(ret = backup_files_from_datadir(xtrabackup_incremental_dir)))
|
||||||
goto cleanup;
|
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 */
|
/* copy supplementary files */
|
||||||
|
|
||||||
for (i = 0; sup_files[i]; i++) {
|
for (i = 0; sup_files[i]; i++) {
|
||||||
@ -1937,14 +1906,6 @@ copy_back()
|
|||||||
|
|
||||||
datadir_node_init(&node);
|
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)) {
|
while (datadir_iter_next(it, &node)) {
|
||||||
const char *ext_list[] = {"backup-my.cnf",
|
const char *ext_list[] = {"backup-my.cnf",
|
||||||
"xtrabackup_binary", "xtrabackup_binlog_info",
|
"xtrabackup_binary", "xtrabackup_binlog_info",
|
||||||
@ -2008,7 +1969,7 @@ copy_back()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* skip buffer pool dump */
|
/* skip buffer pool dump */
|
||||||
if (!strcmp(filename, src_buffer_pool)) {
|
if (!strcmp(filename, default_buffer_pool_file)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2034,19 +1995,11 @@ copy_back()
|
|||||||
|
|
||||||
/* copy buffer pool dump */
|
/* copy buffer pool dump */
|
||||||
|
|
||||||
if (file_exists(src_buffer_pool)) {
|
if (file_exists(default_buffer_pool_file) &&
|
||||||
char dst_dir[FN_REFLEN];
|
innobase_buffer_pool_filename) {
|
||||||
while (IS_TRAILING_SLASH(buffer_pool_filename, dir_length)) {
|
copy_or_move_file(default_buffer_pool_file,
|
||||||
dir_length--;
|
innobase_buffer_pool_filename,
|
||||||
}
|
mysql_data_home, 0);
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rocksdb_copy_back();
|
rocksdb_copy_back();
|
||||||
|
@ -32,13 +32,6 @@ copy_file(ds_ctxt_t *datasink,
|
|||||||
const char *dst_file_path,
|
const char *dst_file_path,
|
||||||
uint thread_n);
|
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 */
|
/** Start --backup */
|
||||||
bool backup_start(CorruptedPages &corrupted_pages);
|
bool backup_start(CorruptedPages &corrupted_pages);
|
||||||
/** Release resources after backup_start() */
|
/** Release resources after backup_start() */
|
||||||
|
@ -83,6 +83,7 @@ os_event_t kill_query_thread_stop;
|
|||||||
bool sql_thread_started = false;
|
bool sql_thread_started = false;
|
||||||
char *mysql_slave_position = NULL;
|
char *mysql_slave_position = NULL;
|
||||||
char *mysql_binlog_position = NULL;
|
char *mysql_binlog_position = NULL;
|
||||||
|
char *buffer_pool_filename = NULL;
|
||||||
|
|
||||||
/* History on server */
|
/* History on server */
|
||||||
time_t history_start_time;
|
time_t history_start_time;
|
||||||
@ -1453,29 +1454,27 @@ cleanup:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static
|
|
||||||
bool
|
|
||||||
write_binlog_info(MYSQL *connection, char *log_bin_dir,
|
|
||||||
MYSQL_RES *mysql_result, my_ulonglong n_rows,
|
|
||||||
my_ulonglong start);
|
|
||||||
|
|
||||||
/*********************************************************************//**
|
/*********************************************************************//**
|
||||||
Flush and copy the current binary log file into the backup,
|
Flush and copy the current binary log file into the backup,
|
||||||
if GTID is enabled */
|
if GTID is enabled */
|
||||||
bool
|
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 *executed_gtid_set = NULL;
|
||||||
char *gtid_binlog_state = NULL;
|
char *gtid_binlog_state = NULL;
|
||||||
|
char *log_bin_file = NULL;
|
||||||
char *log_bin_dir = NULL;
|
char *log_bin_dir = NULL;
|
||||||
bool gtid_exists;
|
bool gtid_exists;
|
||||||
bool result = true;
|
bool result = true;
|
||||||
|
char filepath[FN_REFLEN];
|
||||||
|
|
||||||
mysql_variable log_bin_var[] = {
|
mysql_variable status[] = {
|
||||||
{"@@GLOBAL.log_bin", &log_bin},
|
{"Executed_Gtid_Set", &executed_gtid_set},
|
||||||
|
{NULL, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
|
mysql_variable status_after_flush[] = {
|
||||||
|
{"File", &log_bin_file},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1485,36 +1484,21 @@ write_current_binlog_file(MYSQL *connection, bool write_binlogs)
|
|||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
mysql_variable status[] = {
|
|
||||||
{"File", &filename},
|
|
||||||
{"Position", &position},
|
|
||||||
{"Executed_Gtid_Set", &executed_gtid_set},
|
|
||||||
{NULL, NULL}
|
|
||||||
};
|
|
||||||
|
|
||||||
read_mysql_variables(connection, "SELECT @@GLOBAL.log_bin", log_bin_var, false);
|
|
||||||
|
|
||||||
/* Do not create xtrabackup_binlog_info if binary log is disabled: */
|
|
||||||
if (strncmp(log_bin, "1", 2) != 0) {
|
|
||||||
goto binlog_disabled;
|
|
||||||
}
|
|
||||||
|
|
||||||
lock_binlog_maybe(connection);
|
|
||||||
|
|
||||||
read_mysql_variables(connection, "SHOW MASTER STATUS", status, false);
|
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);
|
read_mysql_variables(connection, "SHOW VARIABLES", vars, true);
|
||||||
|
|
||||||
gtid_exists = (executed_gtid_set && *executed_gtid_set)
|
gtid_exists = (executed_gtid_set && *executed_gtid_set)
|
||||||
|| (gtid_binlog_state && *gtid_binlog_state);
|
|| (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 (opt_log_bin != NULL && strchr(opt_log_bin, FN_LIBCHAR)) {
|
||||||
/* If log_bin is set, it has priority */
|
/* 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);
|
log_bin_dir = strdup(opt_log_bin);
|
||||||
} else if (log_bin_dir == NULL) {
|
} else if (log_bin_dir == NULL) {
|
||||||
/* Default location is MySQL datadir */
|
/* Default location is MySQL datadir */
|
||||||
log_bin_dir = static_cast<char*>(malloc(3));
|
log_bin_dir = strdup("./");
|
||||||
ut_a(log_bin_dir);
|
|
||||||
log_bin_dir[0] = '.';
|
|
||||||
log_bin_dir[1] = FN_LIBCHAR;
|
|
||||||
log_bin_dir[2] = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t log_bin_dir_length;
|
|
||||||
|
|
||||||
dirname_part(log_bin_dir, log_bin_dir, &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 */
|
/* strip final slash if it is not the only path component */
|
||||||
while (IS_TRAILING_SLASH(log_bin_dir, log_bin_dir_length)) {
|
if (log_bin_dir_length > 1 &&
|
||||||
log_bin_dir_length--;
|
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) {
|
if (log_bin_dir == NULL || log_bin_file == NULL) {
|
||||||
msg("Failed to locate binary log files");
|
msg("Failed to get master binlog coordinates from "
|
||||||
|
"SHOW MASTER STATUS");
|
||||||
result = false;
|
result = false;
|
||||||
goto cleanup;
|
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",
|
snprintf(filepath, sizeof(filepath), "%s%c%s",
|
||||||
log_bin_dir, FN_LIBCHAR, binlog_name);
|
log_bin_dir, FN_LIBCHAR, log_bin_file);
|
||||||
if (file_exists(filepath)) {
|
result = copy_file(ds_data, filepath, log_bin_file, 0);
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
free_mysql_variables(vars);
|
free_mysql_variables(status_after_flush);
|
||||||
|
|
||||||
no_replication:
|
|
||||||
free_mysql_variables(status);
|
free_mysql_variables(status);
|
||||||
|
free_mysql_variables(vars);
|
||||||
binlog_disabled:
|
|
||||||
free_mysql_variables(log_bin_var);
|
|
||||||
|
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
@ -1614,11 +1543,8 @@ binlog_disabled:
|
|||||||
/*********************************************************************//**
|
/*********************************************************************//**
|
||||||
Retrieves MySQL binlog position and
|
Retrieves MySQL binlog position and
|
||||||
saves it in a file. It also prints it to stdout. */
|
saves it in a file. It also prints it to stdout. */
|
||||||
static
|
|
||||||
bool
|
bool
|
||||||
write_binlog_info(MYSQL *connection, char *log_bin_dir,
|
write_binlog_info(MYSQL *connection)
|
||||||
MYSQL_RES *mysql_result, my_ulonglong n_rows,
|
|
||||||
my_ulonglong start)
|
|
||||||
{
|
{
|
||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
char *position = NULL;
|
char *position = NULL;
|
||||||
@ -1626,13 +1552,9 @@ write_binlog_info(MYSQL *connection, char *log_bin_dir,
|
|||||||
char *gtid_current_pos = NULL;
|
char *gtid_current_pos = NULL;
|
||||||
char *gtid_executed = NULL;
|
char *gtid_executed = NULL;
|
||||||
char *gtid = NULL;
|
char *gtid = NULL;
|
||||||
char *buffer;
|
bool result;
|
||||||
char *buf;
|
|
||||||
size_t total;
|
|
||||||
bool result = true;
|
|
||||||
bool mysql_gtid;
|
bool mysql_gtid;
|
||||||
bool mariadb_gtid;
|
bool mariadb_gtid;
|
||||||
bool with_gtid;
|
|
||||||
|
|
||||||
mysql_variable status[] = {
|
mysql_variable status[] = {
|
||||||
{"File", &filename},
|
{"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 MASTER STATUS", status, false);
|
||||||
read_mysql_variables(connection, "SHOW VARIABLES", vars, true);
|
read_mysql_variables(connection, "SHOW VARIABLES", vars, true);
|
||||||
|
|
||||||
mysql_gtid = gtid_mode && (strcmp(gtid_mode, "ON") == 0);
|
if (filename == NULL || position == NULL) {
|
||||||
mariadb_gtid = gtid_current_pos && *gtid_current_pos;
|
/* Do not create xtrabackup_binlog_info if binary
|
||||||
|
log is disabled */
|
||||||
|
result = true;
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
gtid = (gtid_executed && *gtid_executed) ? gtid_executed : gtid_current_pos;
|
mysql_gtid = ((gtid_mode != NULL) && (strcmp(gtid_mode, "ON") == 0));
|
||||||
|
mariadb_gtid = (gtid_current_pos != NULL);
|
||||||
|
|
||||||
with_gtid = mariadb_gtid || mysql_gtid;
|
gtid = (gtid_executed != NULL ? gtid_executed : gtid_current_pos);
|
||||||
if (with_gtid) {
|
|
||||||
|
if (mariadb_gtid || mysql_gtid) {
|
||||||
ut_a(asprintf(&mysql_binlog_position,
|
ut_a(asprintf(&mysql_binlog_position,
|
||||||
"filename '%s', position '%s', "
|
"filename '%s', position '%s', "
|
||||||
"GTID of the last change '%s'",
|
"GTID of the last change '%s'",
|
||||||
filename, position, gtid) != -1);
|
filename, position, gtid) != -1);
|
||||||
|
result = backup_file_printf(XTRABACKUP_BINLOG_INFO,
|
||||||
|
"%s\t%s\t%s\n", filename, position,
|
||||||
|
gtid);
|
||||||
} else {
|
} else {
|
||||||
ut_a(asprintf(&mysql_binlog_position,
|
ut_a(asprintf(&mysql_binlog_position,
|
||||||
"filename '%s', position '%s'",
|
"filename '%s', position '%s'",
|
||||||
filename, position) != -1);
|
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:
|
cleanup:
|
||||||
free_mysql_variables(vars);
|
|
||||||
free_mysql_variables(status);
|
free_mysql_variables(status);
|
||||||
|
free_mysql_variables(vars);
|
||||||
|
|
||||||
return(result);
|
return(result);
|
||||||
|
|
||||||
buffer_overflow:
|
|
||||||
msg("Internal error: buffer overflow in the write_binlog_info()");
|
|
||||||
result = false;
|
|
||||||
goto cleanup2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct escape_and_quote
|
struct escape_and_quote
|
||||||
@ -2075,6 +1930,7 @@ backup_cleanup()
|
|||||||
{
|
{
|
||||||
free(mysql_slave_position);
|
free(mysql_slave_position);
|
||||||
free(mysql_binlog_position);
|
free(mysql_binlog_position);
|
||||||
|
free(buffer_pool_filename);
|
||||||
|
|
||||||
if (mysql_connection) {
|
if (mysql_connection) {
|
||||||
mysql_close(mysql_connection);
|
mysql_close(mysql_connection);
|
||||||
|
@ -28,6 +28,7 @@ extern time_t history_lock_time;
|
|||||||
extern bool sql_thread_started;
|
extern bool sql_thread_started;
|
||||||
extern char *mysql_slave_position;
|
extern char *mysql_slave_position;
|
||||||
extern char *mysql_binlog_position;
|
extern char *mysql_binlog_position;
|
||||||
|
extern char *buffer_pool_filename;
|
||||||
|
|
||||||
/** connection to mysql server */
|
/** connection to mysql server */
|
||||||
extern MYSQL *mysql_connection;
|
extern MYSQL *mysql_connection;
|
||||||
@ -61,7 +62,10 @@ void
|
|||||||
unlock_all(MYSQL *connection);
|
unlock_all(MYSQL *connection);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
write_current_binlog_file(MYSQL *connection, bool write_binlogs);
|
write_current_binlog_file(MYSQL *connection);
|
||||||
|
|
||||||
|
bool
|
||||||
|
write_binlog_info(MYSQL *connection);
|
||||||
|
|
||||||
bool
|
bool
|
||||||
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history,
|
write_xtrabackup_info(MYSQL *connection, const char * filename, bool history,
|
||||||
|
@ -187,14 +187,4 @@ xb_read_full(File fd, uchar *buf, size_t len)
|
|||||||
return tlen;
|
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
|
#endif
|
||||||
|
@ -249,7 +249,6 @@ ulong innobase_write_io_threads = 4;
|
|||||||
|
|
||||||
longlong innobase_page_size = (1LL << 14); /* 16KB */
|
longlong innobase_page_size = (1LL << 14); /* 16KB */
|
||||||
char* innobase_buffer_pool_filename = NULL;
|
char* innobase_buffer_pool_filename = NULL;
|
||||||
char *buffer_pool_filename = NULL;
|
|
||||||
|
|
||||||
/* The default values for the following char* start-up parameters
|
/* The default values for the following char* start-up parameters
|
||||||
are determined in innobase_init below: */
|
are determined in innobase_init below: */
|
||||||
@ -344,7 +343,6 @@ uint opt_lock_wait_timeout = 0;
|
|||||||
uint opt_lock_wait_threshold = 0;
|
uint opt_lock_wait_threshold = 0;
|
||||||
uint opt_debug_sleep_before_unlock = 0;
|
uint opt_debug_sleep_before_unlock = 0;
|
||||||
uint opt_safe_slave_backup_timeout = 0;
|
uint opt_safe_slave_backup_timeout = 0;
|
||||||
uint opt_max_binlogs = UINT_MAX;
|
|
||||||
|
|
||||||
const char *opt_history = NULL;
|
const char *opt_history = NULL;
|
||||||
|
|
||||||
@ -1020,8 +1018,7 @@ enum options_xtrabackup
|
|||||||
OPT_XTRA_CHECK_PRIVILEGES,
|
OPT_XTRA_CHECK_PRIVILEGES,
|
||||||
OPT_XTRA_MYSQLD_ARGS,
|
OPT_XTRA_MYSQLD_ARGS,
|
||||||
OPT_XB_IGNORE_INNODB_PAGE_CORRUPTION,
|
OPT_XB_IGNORE_INNODB_PAGE_CORRUPTION,
|
||||||
OPT_INNODB_FORCE_RECOVERY,
|
OPT_INNODB_FORCE_RECOVERY
|
||||||
OPT_MAX_BINLOGS
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct my_option xb_client_options[]= {
|
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,
|
&opt_log_innodb_page_corruption, &opt_log_innodb_page_corruption, 0,
|
||||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 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
|
#define MYSQL_CLIENT
|
||||||
#include "sslopt-longopts.h"
|
#include "sslopt-longopts.h"
|
||||||
#undef MYSQL_CLIENT
|
#undef MYSQL_CLIENT
|
||||||
@ -6247,44 +6233,6 @@ static bool check_all_privileges()
|
|||||||
return true;
|
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
|
bool
|
||||||
xb_init()
|
xb_init()
|
||||||
{
|
{
|
||||||
@ -6350,15 +6298,10 @@ xb_init()
|
|||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
xb_init_buffer_pool(buffer_pool_filename);
|
|
||||||
|
|
||||||
if (opt_check_privileges && !check_all_privileges()) {
|
if (opt_check_privileges && !check_all_privileges()) {
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
history_start_time = time(NULL);
|
history_start_time = time(NULL);
|
||||||
} else {
|
|
||||||
xb_init_buffer_pool(innobase_buffer_pool_filename);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return(true);
|
return(true);
|
||||||
@ -6746,8 +6689,6 @@ int main(int argc, char **argv)
|
|||||||
free_error_messages();
|
free_error_messages();
|
||||||
mysql_mutex_destroy(&LOCK_error_log);
|
mysql_mutex_destroy(&LOCK_error_log);
|
||||||
|
|
||||||
free(buffer_pool_filename);
|
|
||||||
|
|
||||||
if (status == EXIT_SUCCESS) {
|
if (status == EXIT_SUCCESS) {
|
||||||
msg("completed OK!");
|
msg("completed OK!");
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,6 @@ extern char *xtrabackup_incremental_dir;
|
|||||||
extern char *xtrabackup_incremental_basedir;
|
extern char *xtrabackup_incremental_basedir;
|
||||||
extern char *innobase_data_home_dir;
|
extern char *innobase_data_home_dir;
|
||||||
extern char *innobase_buffer_pool_filename;
|
extern char *innobase_buffer_pool_filename;
|
||||||
extern char *buffer_pool_filename;
|
|
||||||
extern char *xb_plugin_dir;
|
extern char *xb_plugin_dir;
|
||||||
extern char *xb_rocksdb_datadir;
|
extern char *xb_rocksdb_datadir;
|
||||||
extern my_bool xb_backup_rocksdb;
|
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_lock_wait_threshold;
|
||||||
extern uint opt_debug_sleep_before_unlock;
|
extern uint opt_debug_sleep_before_unlock;
|
||||||
extern uint opt_safe_slave_backup_timeout;
|
extern uint opt_safe_slave_backup_timeout;
|
||||||
extern uint opt_max_binlogs;
|
|
||||||
|
|
||||||
extern const char *opt_history;
|
extern const char *opt_history;
|
||||||
|
|
||||||
|
@ -136,7 +136,8 @@ IF(WOLFSSL_FASTMATH)
|
|||||||
PROPERTIES COMPILE_FLAGS ${TFM_COMPILE_FLAGS})
|
PROPERTIES COMPILE_FLAGS ${TFM_COMPILE_FLAGS})
|
||||||
ENDIF()
|
ENDIF()
|
||||||
ELSE()
|
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()
|
ENDIF()
|
||||||
|
|
||||||
IF(WOLFSSL_X86_64_BUILD)
|
IF(WOLFSSL_X86_64_BUILD)
|
||||||
|
@ -47,6 +47,7 @@
|
|||||||
WolfSSL will use more stack space with it, with fastmath
|
WolfSSL will use more stack space with it, with fastmath
|
||||||
*/
|
*/
|
||||||
#cmakedefine FP_MAX_BITS 16384
|
#cmakedefine FP_MAX_BITS 16384
|
||||||
|
#define RSA_MAX_SIZE 8192
|
||||||
#cmakedefine WOLFSSL_AESNI
|
#cmakedefine WOLFSSL_AESNI
|
||||||
#cmakedefine USE_FAST_MATH
|
#cmakedefine USE_FAST_MATH
|
||||||
#cmakedefine TFM_TIMING_RESISTANT
|
#cmakedefine TFM_TIMING_RESISTANT
|
||||||
@ -55,5 +56,6 @@
|
|||||||
#cmakedefine USE_INTEL_SPEEDUP
|
#cmakedefine USE_INTEL_SPEEDUP
|
||||||
#cmakedefine USE_FAST_MATH
|
#cmakedefine USE_FAST_MATH
|
||||||
#cmakedefine WOLFSSL_X86_64_BUILD
|
#cmakedefine WOLFSSL_X86_64_BUILD
|
||||||
|
#cmakedefine WOLFSSL_SP_MATH_ALL
|
||||||
|
|
||||||
#endif /* WOLFSSL_USER_SETTINGS_H */
|
#endif /* WOLFSSL_USER_SETTINGS_H */
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit e6c07a296d2996e8d5c3cc615dfc50013bbcc794
|
Subproject commit 57aac1c50b45275c7a99eca32ad985998b292dc8
|
@ -1 +1 @@
|
|||||||
Subproject commit d12fd88b6c0fafbf25f59e7fecd639cb2b38f157
|
Subproject commit 7fdb3eab66384a355475704332d11cc1ab82499a
|
@ -9,7 +9,7 @@ let $counter= 600;
|
|||||||
let $mysql_errno= 0;
|
let $mysql_errno= 0;
|
||||||
while (!$mysql_errno)
|
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;
|
show status;
|
||||||
|
|
||||||
dec $counter;
|
dec $counter;
|
||||||
|
@ -1005,6 +1005,17 @@ JSON_VALID('{"admin\\"": null}') {"admin\"": null}
|
|||||||
1 {"\"admin": null}
|
1 {"\"admin": null}
|
||||||
1 {"\"": 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
|
# End of 10.3 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -613,6 +613,20 @@ SELECT JSON_VALID('{"admin\\"": null}'), '{"admin\\"": null}'
|
|||||||
UNION
|
UNION
|
||||||
SELECT JSON_VALID('{"\\"": null}'), '{"\\"": 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 #
|
||||||
--echo # End of 10.3 tests
|
--echo # End of 10.3 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -57,7 +57,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
|
|||||||
SET DEBUG_SYNC = 'RESET';
|
SET DEBUG_SYNC = 'RESET';
|
||||||
|
|
||||||
connection con1;
|
connection con1;
|
||||||
--error 1053,2006,2013
|
--error 1053,2006,2013,5014
|
||||||
SELECT 1;
|
SELECT 1;
|
||||||
|
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
@ -96,7 +96,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
|
|||||||
SET DEBUG_SYNC = 'RESET';
|
SET DEBUG_SYNC = 'RESET';
|
||||||
|
|
||||||
connection con1;
|
connection con1;
|
||||||
--error 1053,2006,2013
|
--error 1053,2006,2013,5014
|
||||||
SELECT 1;
|
SELECT 1;
|
||||||
enable_reconnect;
|
enable_reconnect;
|
||||||
SELECT 1;
|
SELECT 1;
|
||||||
@ -143,7 +143,7 @@ KILL @id;
|
|||||||
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
|
SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
|
||||||
|
|
||||||
connection con1;
|
connection con1;
|
||||||
--error 1317,1053,2006,2013
|
--error 1317,1053,2006,2013,5014
|
||||||
reap;
|
reap;
|
||||||
SELECT 1;
|
SELECT 1;
|
||||||
|
|
||||||
@ -288,7 +288,7 @@ SET DEBUG_SYNC= 'now WAIT_FOR con1_end';
|
|||||||
connection con1;
|
connection con1;
|
||||||
--echo # ER_SERVER_SHUTDOWN, CR_SERVER_GONE_ERROR, CR_SERVER_LOST,
|
--echo # ER_SERVER_SHUTDOWN, CR_SERVER_GONE_ERROR, CR_SERVER_LOST,
|
||||||
--echo # depending on the timing of close of the connection socket
|
--echo # depending on the timing of close of the connection socket
|
||||||
--error 1053,2006,2013
|
--error 1053,2006,2013,5014
|
||||||
SELECT 1;
|
SELECT 1;
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
SELECT 1;
|
SELECT 1;
|
||||||
@ -521,10 +521,10 @@ drop user test@localhost;
|
|||||||
drop user test2@localhost;
|
drop user test2@localhost;
|
||||||
|
|
||||||
connection con3;
|
connection con3;
|
||||||
--error 2013,2006
|
--error 2013,2006,5014
|
||||||
select 1;
|
select 1;
|
||||||
connection con4;
|
connection con4;
|
||||||
--error 2013,2006
|
--error 2013,2006,5014
|
||||||
select 1;
|
select 1;
|
||||||
connection default;
|
connection default;
|
||||||
|
|
||||||
|
@ -316,6 +316,25 @@ update t1,t2 set v1 = v2 , v5 = 0;
|
|||||||
ERROR 23000: Duplicate entry '-128' for key 'v1'
|
ERROR 23000: Duplicate entry '-128' for key 'v1'
|
||||||
drop table t1, t2;
|
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
|
# End of 10.4 tests
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -397,6 +397,33 @@ update t1 set v2 = 1, v3 = -128;
|
|||||||
update t1,t2 set v1 = v2 , v5 = 0;
|
update t1,t2 set v1 = v2 , v5 = 0;
|
||||||
drop table t1, t2;
|
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 #
|
||||||
--echo # End of 10.4 tests
|
--echo # End of 10.4 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -947,6 +947,44 @@ disconnect con1;
|
|||||||
connection default;
|
connection default;
|
||||||
drop table mysql.global_priv;
|
drop table mysql.global_priv;
|
||||||
rename table mysql.global_priv_bak to 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
|
# End of 10.4 tests
|
||||||
#
|
#
|
||||||
# Check that mysql_upgrade can be run on mysqldump
|
# Check that mysql_upgrade can be run on mysqldump
|
||||||
|
@ -471,6 +471,47 @@ drop table mysql.global_priv;
|
|||||||
rename table mysql.global_priv_bak to mysql.global_priv;
|
rename table mysql.global_priv_bak to mysql.global_priv;
|
||||||
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
|
--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
|
--echo # End of 10.4 tests
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -47,11 +47,11 @@ disconnect con3;
|
|||||||
disconnect con4;
|
disconnect con4;
|
||||||
drop user ssl_user1@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
|
drop user ssl_user1@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
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 SSL connection error: xxxx
|
mysqltest: Could not open connection 'default': 2026 TLS/SSL 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 SSL connection error: xxxx
|
mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
|
||||||
mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
|
mysqltest: Could not open connection 'default': 2026 TLS/SSL error: xxxx
|
||||||
have_ssl
|
have_ssl
|
||||||
1
|
1
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
@ -179,7 +179,7 @@ UNLOCK TABLES;
|
|||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!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;
|
DROP TABLE t1;
|
||||||
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
|
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
@ -196,4 +196,4 @@ End of 5.1 tests
|
|||||||
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
|
||||||
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
|
||||||
DELIMITER /*!*/;
|
DELIMITER /*!*/;
|
||||||
ERROR: Failed on connect: SSL connection error
|
ERROR: Failed on connect: TLS/SSL error
|
@ -70,7 +70,7 @@ drop table t1;
|
|||||||
#
|
#
|
||||||
--exec echo "this query should not execute;" > $MYSQLTEST_VARDIR/tmp/test.sql
|
--exec echo "this query should not execute;" > $MYSQLTEST_VARDIR/tmp/test.sql
|
||||||
# Handle that openssl gives different error messages from YaSSL.
|
# 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
|
--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
|
--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
|
--echo
|
||||||
@ -79,7 +79,7 @@ drop table t1;
|
|||||||
# Test that we can't open connection to server if we are using
|
# Test that we can't open connection to server if we are using
|
||||||
# a blank ca
|
# 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
|
--error 1
|
||||||
--exec $MYSQL_TEST --ssl-ca= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
--exec $MYSQL_TEST --ssl-ca= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||||
--echo
|
--echo
|
||||||
@ -88,7 +88,7 @@ drop table t1;
|
|||||||
# Test that we can't open connection to server if we are using
|
# Test that we can't open connection to server if we are using
|
||||||
# a nonexistent ca file
|
# 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
|
--error 1
|
||||||
--exec $MYSQL_TEST --ssl-ca=nonexisting_file.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
--exec $MYSQL_TEST --ssl-ca=nonexisting_file.pem --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||||
--echo
|
--echo
|
||||||
@ -97,7 +97,7 @@ drop table t1;
|
|||||||
# Test that we can't open connection to server if we are using
|
# Test that we can't open connection to server if we are using
|
||||||
# a blank client-key
|
# 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
|
--error 1
|
||||||
--exec $MYSQL_TEST --ssl-key= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
--exec $MYSQL_TEST --ssl-key= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||||
--echo
|
--echo
|
||||||
@ -106,7 +106,7 @@ drop table t1;
|
|||||||
# Test that we can't open connection to server if we are using
|
# Test that we can't open connection to server if we are using
|
||||||
# a blank client-cert
|
# 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
|
--error 1
|
||||||
--exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
--exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||||
--echo
|
--echo
|
||||||
@ -175,7 +175,7 @@ INSERT INTO t1 VALUES (1), (2);
|
|||||||
|
|
||||||
# With wrong parameters
|
# With wrong parameters
|
||||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR mysqldump.exe mysqldump
|
--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
|
--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
|
--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
|
--echo
|
||||||
@ -201,7 +201,7 @@ set global sql_mode=default;
|
|||||||
# MDEV-9605 mysqlbinlog does not accept ssl-ca option as expected.
|
# 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
|
--error 1
|
||||||
--exec $MYSQL_BINLOG --read-from-remote-server --ssl-ca --user=root --host=localhost nobinlog.111111 2>&1
|
--exec $MYSQL_BINLOG --read-from-remote-server --ssl-ca --user=root --host=localhost nobinlog.111111 2>&1
|
||||||
|
|
||||||
|
@ -3,14 +3,14 @@ grant select on test.* to ssl_sslv3@localhost require cipher "AES128-SHA";
|
|||||||
create user ssl_tls12@localhost;
|
create user ssl_tls12@localhost;
|
||||||
grant select on test.* to ssl_tls12@localhost require cipher "AES128-SHA256";
|
grant select on test.* to ssl_tls12@localhost require cipher "AES128-SHA256";
|
||||||
TLS1.2 ciphers: user is ok with any cipher
|
TLS1.2 ciphers: user is ok with any cipher
|
||||||
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
|
ERROR 2026 (HY000): TLS/SSL 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
|
||||||
TLS1.2 ciphers: user requires SSLv3 cipher AES128-SHA
|
TLS1.2 ciphers: user requires SSLv3 cipher AES128-SHA
|
||||||
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
|
ERROR 2026 (HY000): TLS/SSL 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
|
||||||
TLS1.2 ciphers: user requires TLSv1.2 cipher AES128-SHA256
|
TLS1.2 ciphers: user requires TLSv1.2 cipher AES128-SHA256
|
||||||
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
|
ERROR 2026 (HY000): TLS/SSL 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
|
||||||
SSLv3 ciphers: user is ok with any cipher
|
SSLv3 ciphers: user is ok with any cipher
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Ssl_cipher AES256-SHA
|
Ssl_cipher AES256-SHA
|
||||||
|
@ -15,13 +15,13 @@ Variable_name Value
|
|||||||
Ssl_cipher AES128-SHA256
|
Ssl_cipher AES128-SHA256
|
||||||
ERROR 1045 (28000): Access denied for user 'ssl_tls12'@'localhost' (using password: NO)
|
ERROR 1045 (28000): Access denied for user 'ssl_tls12'@'localhost' (using password: NO)
|
||||||
SSLv3 ciphers: user is ok with any cipher
|
SSLv3 ciphers: user is ok with any cipher
|
||||||
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
|
ERROR 2026 (HY000): TLS/SSL 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
|
||||||
SSLv3 ciphers: user requires SSLv3 cipher AES128-SHA
|
SSLv3 ciphers: user requires SSLv3 cipher AES128-SHA
|
||||||
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
|
ERROR 2026 (HY000): TLS/SSL 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
|
||||||
SSLv3 ciphers: user requires TLSv1.2 cipher AES128-SHA256
|
SSLv3 ciphers: user requires TLSv1.2 cipher AES128-SHA256
|
||||||
ERROR 2026 (HY000): SSL connection error: sslv3 alert handshake failure
|
ERROR 2026 (HY000): TLS/SSL 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
|
||||||
drop user ssl_sslv3@localhost;
|
drop user ssl_sslv3@localhost;
|
||||||
drop user ssl_tls12@localhost;
|
drop user ssl_tls12@localhost;
|
||||||
|
@ -9,7 +9,7 @@ mysql --ssl -e "call test.have_ssl()"
|
|||||||
have_ssl
|
have_ssl
|
||||||
no
|
no
|
||||||
mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
|
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()"
|
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;
|
drop procedure have_ssl;
|
||||||
|
@ -12,5 +12,5 @@ mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
|
|||||||
have_ssl
|
have_ssl
|
||||||
yes
|
yes
|
||||||
mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
|
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;
|
drop procedure have_ssl;
|
||||||
|
@ -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
|
--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()"
|
--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
|
--exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
|
||||||
drop procedure have_ssl;
|
drop procedure have_ssl;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BE FOUND
|
# Bug#21920657: SSL-CA FAILS SILENTLY IF THE PATH CANNOT BE FOUND
|
||||||
#
|
#
|
||||||
# try to connect with wrong '--ssl-ca' path : should fail
|
# 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
|
# try to connect with correct '--ssl-ca' path : should connect
|
||||||
have_ssl
|
have_ssl
|
||||||
1
|
1
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
--echo # try to connect with wrong '--ssl-ca' path : should fail
|
--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
|
--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
|
--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
|
--echo
|
||||||
|
@ -44,7 +44,7 @@ Ssl_cipher AES128-SHA
|
|||||||
SHOW STATUS LIKE 'Ssl_cipher';
|
SHOW STATUS LIKE 'Ssl_cipher';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Ssl_cipher AES128-SHA
|
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
|
Ssl_cipher AES256-SHA
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
Ssl_cipher AES128-SHA
|
Ssl_cipher AES128-SHA
|
||||||
|
@ -54,7 +54,7 @@ EOF
|
|||||||
# Test to connect using a specifi cipher
|
# Test to connect using a specifi cipher
|
||||||
--exec $MYSQL_TEST --ssl-cipher=AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
--exec $MYSQL_TEST --ssl-cipher=AES128-SHA < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||||
# Test to connect using an unknown cipher
|
# 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
|
--error 1
|
||||||
--exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
--exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1
|
||||||
--remove_file $MYSQLTEST_VARDIR/tmp/test.sql
|
--remove_file $MYSQLTEST_VARDIR/tmp/test.sql
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
Ssl_version TLS_VERSION
|
Ssl_version TLS_VERSION
|
||||||
# try logging in with a certificate in the server's --ssl-crl : should fail
|
# 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
|
||||||
|
@ -8,6 +8,6 @@
|
|||||||
|
|
||||||
--echo # try logging in with a certificate in the server's --ssl-crl : should fail
|
--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
|
# 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
|
--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
|
--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
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# Test clients with and without CRL lists
|
# Test clients with and without CRL lists
|
||||||
############ Test mysql ##############
|
############ Test mysql ##############
|
||||||
# Test mysql connecting to a server with a certificate revoked by -crl
|
# 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
|
# 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 ##############
|
||||||
# Test mysqladmin connecting to a server with a certificate revoked by -crl
|
# Test mysqladmin connecting to a server with a certificate revoked by -crl
|
||||||
mysqladmin: connect to server at 'localhost' failed
|
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
|
# Test mysqladmin connecting to a server with a certificate revoked by -crlpath
|
||||||
mysqladmin: connect to server at 'localhost' failed
|
mysqladmin: connect to server at 'localhost' failed
|
||||||
error: 'SSL connection error: certificate revoked'
|
error: 'TLS/SSL error: certificate revoked'
|
||||||
|
@ -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;
|
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
|
--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
|
--error 1
|
||||||
--exec $MYSQLADMIN $ssl_crl $admin_suffix 2>&1
|
--exec $MYSQLADMIN $ssl_crl $admin_suffix 2>&1
|
||||||
|
|
||||||
--echo # Test mysqladmin connecting to a server with a certificate revoked by -crlpath
|
--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
|
--error 1
|
||||||
--exec $MYSQLADMIN $ssl_crlpath $admin_suffix 2>&1
|
--exec $MYSQLADMIN $ssl_crlpath $admin_suffix 2>&1
|
||||||
|
@ -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
|
||||||
|
@ -61,7 +61,7 @@ connection default;
|
|||||||
# When the connection is closed in this way, the error code should
|
# When the connection is closed in this way, the error code should
|
||||||
# be consistent see Bug#2845 for an explanation
|
# be consistent see Bug#2845 for an explanation
|
||||||
# depending on platform/client, either errno 2006 or 2013 can occur below
|
# depending on platform/client, either errno 2006 or 2013 can occur below
|
||||||
--error 2006,2013
|
--error 2006,2013,5014
|
||||||
SELECT 2;
|
SELECT 2;
|
||||||
--echo --enable_reconnect;
|
--echo --enable_reconnect;
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
@ -113,7 +113,7 @@ connection con1;
|
|||||||
# When the connection is closed in this way, the error code should
|
# When the connection is closed in this way, the error code should
|
||||||
# be consistent see Bug#2845 for an explanation
|
# be consistent see Bug#2845 for an explanation
|
||||||
# depending on platform/client, either errno 2006 or 2013 can occur below
|
# depending on platform/client, either errno 2006 or 2013 can occur below
|
||||||
--error 2006,2013
|
--error 2006,2013,5014
|
||||||
SELECT 2;
|
SELECT 2;
|
||||||
--echo --enable_reconnect;
|
--echo --enable_reconnect;
|
||||||
--enable_reconnect
|
--enable_reconnect
|
||||||
|
BIN
mysql-test/std_data/mdev-28727-pet4.frm
Normal file
BIN
mysql-test/std_data/mdev-28727-pet4.frm
Normal file
Binary file not shown.
@ -59,28 +59,7 @@ COUNT(*) = 2
|
|||||||
1
|
1
|
||||||
include/show_binlog_events.inc
|
include/show_binlog_events.inc
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
hostname1-bin.000001 # Gtid # # GTID #-#-#
|
hostname1-bin.000002 # Binlog_checkpoint # # hostname1-bin.000002
|
||||||
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
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
#cleanup
|
#cleanup
|
||||||
|
@ -59,28 +59,7 @@ COUNT(*) = 2
|
|||||||
1
|
1
|
||||||
include/show_binlog_events.inc
|
include/show_binlog_events.inc
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
hostname1-bin.000001 # Gtid # # GTID #-#-#
|
hostname1-bin.000002 # Binlog_checkpoint # # hostname1-bin.000002
|
||||||
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
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
#cleanup
|
#cleanup
|
||||||
|
@ -34,7 +34,6 @@ ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
|||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
--let $MASTER_MYPORT=$NODE_MYPORT_2
|
|
||||||
--source include/show_binlog_events.inc
|
--source include/show_binlog_events.inc
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -74,7 +74,6 @@ let $restart_noprint=2;
|
|||||||
|
|
||||||
--connection node_2
|
--connection node_2
|
||||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
--let $MASTER_MYPORT=$NODE_MYPORT_2
|
|
||||||
--source include/show_binlog_events.inc
|
--source include/show_binlog_events.inc
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Test that INFORMATION_SCHEMA.TABLES.UPDATE_TIME is filled
|
# Test that INFORMATION_SCHEMA.TABLES.UPDATE_TIME is filled
|
||||||
# correctly for InnoDB tables.
|
# 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';
|
SELECT update_time FROM information_schema.tables WHERE table_name = 't';
|
||||||
update_time
|
update_time
|
||||||
NULL
|
NULL
|
||||||
@ -19,24 +19,9 @@ SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
|
|||||||
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
|
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
|
||||||
COUNT(*)
|
COUNT(*)
|
||||||
1
|
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
|
# Test the behavior after restart with a prepared XA transaction
|
||||||
XA START 'xatrx';
|
XA START 'xatrx';
|
||||||
INSERT INTO t VALUES (5);
|
DELETE FROM t;
|
||||||
XA END 'xatrx';
|
XA END 'xatrx';
|
||||||
XA PREPARE 'xatrx';
|
XA PREPARE 'xatrx';
|
||||||
CONNECT con1,localhost,root,,;
|
CONNECT con1,localhost,root,,;
|
||||||
|
@ -5,14 +5,10 @@
|
|||||||
-- echo #
|
-- echo #
|
||||||
|
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
-- source include/have_innodb_max_16k.inc
|
|
||||||
# restart does not work with embedded
|
# restart does not work with embedded
|
||||||
-- source include/not_embedded.inc
|
-- 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';
|
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'
|
SELECT COUNT(*) FROM information_schema.tables WHERE table_name = 't'
|
||||||
AND TIMESTAMPDIFF(SECOND, update_time, NOW()) < 120;
|
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
|
-- echo # Test the behavior after restart with a prepared XA transaction
|
||||||
|
|
||||||
XA START 'xatrx';
|
XA START 'xatrx';
|
||||||
INSERT INTO t VALUES (5);
|
DELETE FROM t;
|
||||||
XA END 'xatrx';
|
XA END 'xatrx';
|
||||||
XA PREPARE 'xatrx';
|
XA PREPARE 'xatrx';
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ simple_password_check
|
|||||||
#
|
#
|
||||||
CREATE USER user1@localhost IDENTIFIED BY 'BsG9#9.cem#!85';
|
CREATE USER user1@localhost IDENTIFIED BY 'BsG9#9.cem#!85';
|
||||||
CREATE USER user2@localhost IDENTIFIED BY 'bsg9#d.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;
|
DROP USER user1@localhost;
|
||||||
include/show_binlog_events.inc
|
include/show_binlog_events.inc
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
@ -14,29 +14,29 @@ LOAD_OPTION ON
|
|||||||
PLUGIN_MATURITY Stable
|
PLUGIN_MATURITY Stable
|
||||||
PLUGIN_AUTH_VERSION 1.0
|
PLUGIN_AUTH_VERSION 1.0
|
||||||
grant select on *.* to foocar identified by 'foocar';
|
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;
|
show warnings;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
Warning 1819 cracklib: it is based on your username
|
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';
|
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;
|
show warnings;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
Warning 1819 cracklib: it is based on your username
|
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';
|
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;
|
show warnings;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
Warning 1819 cracklib: it does not contain enough DIFFERENT characters
|
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';
|
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;
|
show warnings;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
Warning 1819 cracklib: it is based on a dictionary word
|
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';
|
grant select on *.* to foobar identified by 'q$%^&*rty';
|
||||||
drop user foobar;
|
drop user foobar;
|
||||||
#
|
#
|
||||||
@ -44,7 +44,7 @@ drop user foobar;
|
|||||||
# when using cracklib plugin
|
# when using cracklib plugin
|
||||||
#
|
#
|
||||||
create user 'newuser'@'localhost';
|
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;
|
uninstall plugin cracklib_password_check;
|
||||||
create user foo1 identified by 'pwd';
|
create user foo1 identified by 'pwd';
|
||||||
drop user foo1;
|
drop user foo1;
|
||||||
|
@ -75,13 +75,37 @@ READ_ONLY NO
|
|||||||
COMMAND_LINE_ARGUMENT REQUIRED
|
COMMAND_LINE_ARGUMENT REQUIRED
|
||||||
GLOBAL_VALUE_PATH NULL
|
GLOBAL_VALUE_PATH NULL
|
||||||
create user foo1 identified by 'pwd';
|
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;
|
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';
|
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!';
|
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!';
|
grant select on *.* to `BarFoo1!` identified by 'FooBar1!';
|
||||||
drop user `BarFoo1!`;
|
drop user `BarFoo1!`;
|
||||||
create user foo1 identified by 'aA.12345';
|
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!';
|
create user foo1 identified by '123:qwe:ASD!';
|
||||||
drop user foo1;
|
drop user foo1;
|
||||||
create user foo1 identified by '-23:qwe:ASD!';
|
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!';
|
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!';
|
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';
|
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!';
|
create user foo1 identified by '123:qwe:ASD!';
|
||||||
set password for foo1 = password('qwe:-23: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!');
|
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!');
|
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');
|
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!');
|
set password for foo1 = password('qwe:123:ASD!');
|
||||||
select @@strict_password_validation;
|
select @@strict_password_validation;
|
||||||
@@strict_password_validation
|
@@strict_password_validation
|
||||||
1
|
1
|
||||||
set password for foo1 = '';
|
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 = '2222222222222222';
|
||||||
ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
|
ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
|
||||||
set password for foo1 = '11111111111111111111111111111111111111111';
|
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';
|
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
|
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 '';
|
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 '';
|
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;
|
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';
|
update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'xxx') where user='foo1';
|
||||||
set global strict_password_validation=0;
|
set global strict_password_validation=0;
|
||||||
set password for foo1 = '';
|
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 = '2222222222222222';
|
||||||
set password for foo1 = '11111111111111111111111111111111111111111';
|
set password for foo1 = '11111111111111111111111111111111111111111';
|
||||||
create user foo2 identified by password '11111111111111111111111111111111111111111';
|
create user foo2 identified by password '11111111111111111111111111111111111111111';
|
||||||
|
@ -5,16 +5,18 @@ install soname "cracklib_password_check";
|
|||||||
grant select on *.* to foobar identified by 'q$%^&*R1234ty';
|
grant select on *.* to foobar identified by 'q$%^&*R1234ty';
|
||||||
drop user foobar;
|
drop user foobar;
|
||||||
grant select on *.* to Fff_fff1 identified by '1fff_ffF';
|
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;
|
show warnings;
|
||||||
Level Code Message
|
Level Code Message
|
||||||
Warning 1819 cracklib: it does not contain enough DIFFERENT characters
|
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';
|
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;
|
show warnings;
|
||||||
Level Code Message
|
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;
|
uninstall plugin simple_password_check;
|
||||||
grant select on *.* to foobar identified by 'q-%^&*rty';
|
grant select on *.* to foobar identified by 'q-%^&*rty';
|
||||||
drop user foobar;
|
drop user foobar;
|
||||||
|
@ -15,16 +15,20 @@ select * from information_schema.system_variables where variable_name like 'simp
|
|||||||
|
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
create user foo1 identified by 'pwd';
|
create user foo1 identified by 'pwd';
|
||||||
|
show warnings;
|
||||||
|
|
||||||
# Create user with no password.
|
# Create user with no password.
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
create user foo1;
|
create user foo1;
|
||||||
|
show warnings;
|
||||||
|
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
grant select on *.* to foo1 identified by 'pwd';
|
grant select on *.* to foo1 identified by 'pwd';
|
||||||
|
show warnings;
|
||||||
|
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
grant select on *.* to `FooBar1!` identified by 'FooBar1!';
|
grant select on *.* to `FooBar1!` identified by 'FooBar1!';
|
||||||
|
show warnings;
|
||||||
|
|
||||||
grant select on *.* to `BarFoo1!` identified by 'FooBar1!';
|
grant select on *.* to `BarFoo1!` identified by 'FooBar1!';
|
||||||
drop user `BarFoo1!`;
|
drop user `BarFoo1!`;
|
||||||
@ -43,25 +47,32 @@ drop user foo1;
|
|||||||
|
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
create user foo1 identified by '-23:qwe:ASD!';
|
create user foo1 identified by '-23:qwe:ASD!';
|
||||||
|
show warnings;
|
||||||
|
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
create user foo1 identified by '123:4we:ASD!';
|
create user foo1 identified by '123:4we:ASD!';
|
||||||
|
show warnings;
|
||||||
|
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
create user foo1 identified by '123:qwe:4SD!';
|
create user foo1 identified by '123:qwe:4SD!';
|
||||||
|
show warnings;
|
||||||
|
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
create user foo1 identified by '123:qwe:ASD4';
|
create user foo1 identified by '123:qwe:ASD4';
|
||||||
|
show warnings;
|
||||||
|
|
||||||
create user foo1 identified by '123:qwe:ASD!';
|
create user foo1 identified by '123:qwe:ASD!';
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
set password for foo1 = password('qwe:-23:ASD!');
|
set password for foo1 = password('qwe:-23:ASD!');
|
||||||
|
show warnings;
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
set password for foo1 = old_password('4we:123:ASD!');
|
set password for foo1 = old_password('4we:123:ASD!');
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
set password for foo1 = password('qwe:123:4SD!');
|
set password for foo1 = password('qwe:123:4SD!');
|
||||||
|
show warnings;
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
set password for foo1 = old_password('qwe:123:ASD4');
|
set password for foo1 = old_password('qwe:123:ASD4');
|
||||||
|
show warnings;
|
||||||
set password for foo1 = password('qwe:123:ASD!');
|
set password for foo1 = password('qwe:123:ASD!');
|
||||||
|
|
||||||
# now, strict_password_validation
|
# now, strict_password_validation
|
||||||
@ -69,6 +80,7 @@ select @@strict_password_validation;
|
|||||||
|
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
set password for foo1 = '';
|
set password for foo1 = '';
|
||||||
|
show warnings;
|
||||||
--error ER_OPTION_PREVENTS_STATEMENT
|
--error ER_OPTION_PREVENTS_STATEMENT
|
||||||
set password for foo1 = '2222222222222222';
|
set password for foo1 = '2222222222222222';
|
||||||
--error ER_OPTION_PREVENTS_STATEMENT
|
--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';
|
grant select on *.* to foo2 identified with mysql_old_password using '2222222222222222';
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
create user foo2 identified with mysql_native_password using '';
|
create user foo2 identified with mysql_native_password using '';
|
||||||
|
show warnings;
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
grant select on *.* to foo2 identified with mysql_old_password using '';
|
grant select on *.* to foo2 identified with mysql_old_password using '';
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
@ -95,6 +108,7 @@ set global strict_password_validation=0;
|
|||||||
|
|
||||||
--error ER_NOT_VALID_PASSWORD
|
--error ER_NOT_VALID_PASSWORD
|
||||||
set password for foo1 = '';
|
set password for foo1 = '';
|
||||||
|
show warnings;
|
||||||
set password for foo1 = '2222222222222222';
|
set password for foo1 = '2222222222222222';
|
||||||
set password for foo1 = '11111111111111111111111111111111111111111';
|
set password for foo1 = '11111111111111111111111111111111111111111';
|
||||||
create user foo2 identified by password '11111111111111111111111111111111111111111';
|
create user foo2 identified by password '11111111111111111111111111111111111111111';
|
||||||
|
@ -25,3 +25,12 @@ newhost test_user_rm test_role1 N
|
|||||||
delete from mysql.roles_mapping;
|
delete from mysql.roles_mapping;
|
||||||
delete from mysql.user where user like 'test%';
|
delete from mysql.user where user like 'test%';
|
||||||
flush privileges;
|
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;
|
||||||
|
@ -36,3 +36,13 @@ delete from mysql.roles_mapping;
|
|||||||
delete from mysql.user where user like 'test%';
|
delete from mysql.user where user like 'test%';
|
||||||
flush privileges;
|
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;
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ COMMIT;
|
|||||||
|
|
||||||
--echo ## Inserting rows should give error here because connection should ##
|
--echo ## Inserting rows should give error here because connection should ##
|
||||||
--echo ## disconnect after using COMMIT ##
|
--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');
|
INSERT INTO t1 VALUES(4,'Record_4');
|
||||||
|
|
||||||
connection test_con2;
|
connection test_con2;
|
||||||
@ -160,7 +160,7 @@ INSERT INTO t1 VALUES(12,'Record_12');
|
|||||||
ROLLBACK;
|
ROLLBACK;
|
||||||
|
|
||||||
--echo ## Expect a failure due to COMMIT/ROLLBACK AND RELEASE behavior ##
|
--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');
|
INSERT INTO t1 VALUES(4,'Record_4');
|
||||||
|
|
||||||
connection default;
|
connection default;
|
||||||
|
@ -550,3 +550,19 @@ drop table t1;
|
|||||||
#
|
#
|
||||||
# End of 10.2 tests
|
# 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
|
||||||
|
#
|
||||||
|
@ -514,3 +514,17 @@ drop table t1;
|
|||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.2 tests
|
--echo # End of 10.2 tests
|
||||||
--echo #
|
--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 #
|
||||||
|
@ -29,7 +29,13 @@ static int validate(const MYSQL_CONST_LEX_STRING *username,
|
|||||||
const char *ptr= password->str, *end= ptr + length;
|
const char *ptr= password->str, *end= ptr + length;
|
||||||
|
|
||||||
if (strncmp(password->str, username->str, length) == 0)
|
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;
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* everything non-ascii is the "other" character and is good for the password */
|
/* everything non-ascii is the "other" character and is good for the password */
|
||||||
for(; ptr < end; ptr++)
|
for(; ptr < end; ptr++)
|
||||||
@ -43,6 +49,28 @@ static int validate(const MYSQL_CONST_LEX_STRING *username,
|
|||||||
else
|
else
|
||||||
others++;
|
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 */
|
/* remember TRUE means the password failed the validation */
|
||||||
return length < min_length ||
|
return length < min_length ||
|
||||||
uppers < min_letters ||
|
uppers < min_letters ||
|
||||||
|
@ -71,7 +71,7 @@ then
|
|||||||
# (b) Cluster state ID & wsrep_gtid_domain_id to be written to the file, OR
|
# (b) Cluster state ID & wsrep_gtid_domain_id to be written to the file, OR
|
||||||
# (c) ERROR file, in case flush tables operation failed.
|
# (c) ERROR file, in case flush tables operation failed.
|
||||||
|
|
||||||
while [ ! -r "$FLUSHED" ] && \
|
while [ ! -r "$FLUSHED" ] || \
|
||||||
! grep -q -F ':' -- "$FLUSHED"
|
! grep -q -F ':' -- "$FLUSHED"
|
||||||
do
|
do
|
||||||
# Check whether ERROR file exists.
|
# Check whether ERROR file exists.
|
||||||
|
@ -104,6 +104,7 @@ WSREP_SST_OPT_HOST_UNESCAPED=""
|
|||||||
INNODB_DATA_HOME_DIR=$(trim_dir "${INNODB_DATA_HOME_DIR:-}")
|
INNODB_DATA_HOME_DIR=$(trim_dir "${INNODB_DATA_HOME_DIR:-}")
|
||||||
INNODB_LOG_GROUP_HOME=$(trim_dir "${INNODB_LOG_GROUP_HOME:-}")
|
INNODB_LOG_GROUP_HOME=$(trim_dir "${INNODB_LOG_GROUP_HOME:-}")
|
||||||
INNODB_UNDO_DIR=$(trim_dir "${INNODB_UNDO_DIR:-}")
|
INNODB_UNDO_DIR=$(trim_dir "${INNODB_UNDO_DIR:-}")
|
||||||
|
INNODB_BUFFER_POOL=""
|
||||||
INNODB_FORCE_RECOVERY=""
|
INNODB_FORCE_RECOVERY=""
|
||||||
INNOEXTRA=""
|
INNOEXTRA=""
|
||||||
|
|
||||||
@ -212,6 +213,10 @@ case "$1" in
|
|||||||
readonly INNODB_UNDO_DIR=$(trim_dir "$2")
|
readonly INNODB_UNDO_DIR=$(trim_dir "$2")
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
'--innodb-buffer-pool-filename')
|
||||||
|
readonly INNODB_BUFFER_POOL=$(trim_string "$2")
|
||||||
|
shift
|
||||||
|
;;
|
||||||
'--defaults-file')
|
'--defaults-file')
|
||||||
readonly WSREP_SST_OPT_DEFAULT="$1=$2"
|
readonly WSREP_SST_OPT_DEFAULT="$1=$2"
|
||||||
readonly WSREP_SST_OPT_DEFAULTS="$1='$2'"
|
readonly WSREP_SST_OPT_DEFAULTS="$1='$2'"
|
||||||
@ -471,6 +476,12 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
skip_mysqld_arg=1
|
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')
|
'--innodb-force-recovery')
|
||||||
if [ -n "$value" -a "$value" != "0" ]; then
|
if [ -n "$value" -a "$value" != "0" ]; then
|
||||||
INNODB_FORCE_RECOVERY=$(trim_string "$value")
|
INNODB_FORCE_RECOVERY=$(trim_string "$value")
|
||||||
@ -552,6 +563,10 @@ if [ -n "${MYSQLD_OPT_INNODB_UNDO_DIR:-}" -a \
|
|||||||
-z "$INNODB_UNDO_DIR" ]; then
|
-z "$INNODB_UNDO_DIR" ]; then
|
||||||
readonly INNODB_UNDO_DIR="$MYSQLD_OPT_INNODB_UNDO_DIR"
|
readonly INNODB_UNDO_DIR="$MYSQLD_OPT_INNODB_UNDO_DIR"
|
||||||
fi
|
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 \
|
if [ -n "${MYSQLD_OPT_LOG_BIN:-}" -a \
|
||||||
-z "$WSREP_SST_OPT_BINLOG" ]; then
|
-z "$WSREP_SST_OPT_BINLOG" ]; then
|
||||||
readonly WSREP_SST_OPT_BINLOG="$MYSQLD_OPT_LOG_BIN"
|
readonly WSREP_SST_OPT_BINLOG="$MYSQLD_OPT_LOG_BIN"
|
||||||
@ -602,6 +617,9 @@ fi
|
|||||||
if [ -n "$INNODB_UNDO_DIR" ]; then
|
if [ -n "$INNODB_UNDO_DIR" ]; then
|
||||||
INNOEXTRA="$INNOEXTRA --innodb-undo-directory='$INNODB_UNDO_DIR'"
|
INNOEXTRA="$INNOEXTRA --innodb-undo-directory='$INNODB_UNDO_DIR'"
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$INNODB_BUFFER_POOL" ]; then
|
||||||
|
INNOEXTRA="$INNOEXTRA --innodb-buffer-pool-filename='$INNODB_BUFFER_POOL'"
|
||||||
|
fi
|
||||||
if [ -n "$WSREP_SST_OPT_BINLOG" ]; then
|
if [ -n "$WSREP_SST_OPT_BINLOG" ]; then
|
||||||
INNOEXTRA="$INNOEXTRA --log-bin='$WSREP_SST_OPT_BINLOG'"
|
INNOEXTRA="$INNOEXTRA --log-bin='$WSREP_SST_OPT_BINLOG'"
|
||||||
if [ -n "$WSREP_SST_OPT_BINLOG_INDEX" ]; then
|
if [ -n "$WSREP_SST_OPT_BINLOG_INDEX" ]; then
|
||||||
|
@ -664,6 +664,9 @@ cleanup_at_exit()
|
|||||||
local estatus=$?
|
local estatus=$?
|
||||||
if [ $estatus -ne 0 ]; then
|
if [ $estatus -ne 0 ]; then
|
||||||
wsrep_log_error "Cleanup after exit with status: $estatus"
|
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
|
fi
|
||||||
|
|
||||||
[ "$(pwd)" != "$OLD_PWD" ] && cd "$OLD_PWD"
|
[ "$(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 "$@"
|
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()
|
wsrep_log_info()
|
||||||
{
|
{
|
||||||
logger -p daemon.info -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE "$@"
|
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"
|
recovery=" --innodb-force-recovery=$INNODB_FORCE_RECOVERY"
|
||||||
fi
|
fi
|
||||||
INNOAPPLY="$BACKUP_BIN --prepare$disver$recovery${iapts:+ }$iapts$INNOEXTRA --target-dir='$DATA' --datadir='$DATA'$mysqld_args $INNOAPPLY"
|
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"
|
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"
|
iopts="--parallel=$backup_threads${iopts:+ }$iopts"
|
||||||
fi
|
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
|
setup_commands
|
||||||
|
|
||||||
set +e
|
set +e
|
||||||
|
@ -38,6 +38,9 @@ cleanup_joiner()
|
|||||||
local estatus=$?
|
local estatus=$?
|
||||||
if [ $estatus -ne 0 ]; then
|
if [ $estatus -ne 0 ]; then
|
||||||
wsrep_log_error "Cleanup after exit with status: $estatus"
|
wsrep_log_error "Cleanup after exit with status: $estatus"
|
||||||
|
elif [ -z "${coords:-}" ]; then
|
||||||
|
estatus=32
|
||||||
|
wsrep_log_error "Failed to get current position"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
local failure=0
|
local failure=0
|
||||||
@ -408,7 +411,7 @@ EOF
|
|||||||
# (b) Cluster state ID & wsrep_gtid_domain_id to be written to the file, OR
|
# (b) Cluster state ID & wsrep_gtid_domain_id to be written to the file, OR
|
||||||
# (c) ERROR file, in case flush tables operation failed.
|
# (c) ERROR file, in case flush tables operation failed.
|
||||||
|
|
||||||
while [ ! -r "$FLUSHED" ] && \
|
while [ ! -r "$FLUSHED" ] || \
|
||||||
! grep -q -F ':' -- "$FLUSHED"
|
! grep -q -F ':' -- "$FLUSHED"
|
||||||
do
|
do
|
||||||
# Check whether ERROR file exists.
|
# Check whether ERROR file exists.
|
||||||
@ -433,8 +436,8 @@ EOF
|
|||||||
# Let's check the existence of the file with the index:
|
# Let's check the existence of the file with the index:
|
||||||
if [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ]; then
|
if [ -f "$WSREP_SST_OPT_BINLOG_INDEX" ]; then
|
||||||
# Let's read the binlog index:
|
# Let's read the binlog index:
|
||||||
max_binlogs=$(parse_cnf "$encgroups" 'sst-max-binlogs')
|
max_binlogs=$(parse_cnf "$encgroups" 'sst-max-binlogs' 1)
|
||||||
if [ -n "$max_binlogs" ]; then
|
if [ $max_binlogs -ge 0 ]; then
|
||||||
binlog_files=""
|
binlog_files=""
|
||||||
if [ $max_binlogs -gt 0 ]; then
|
if [ $max_binlogs -gt 0 ]; then
|
||||||
binlog_files=$(tail -n $max_binlogs \
|
binlog_files=$(tail -n $max_binlogs \
|
||||||
|
@ -4608,17 +4608,32 @@ int handler::ha_check(THD *thd, HA_CHECK_OPT *check_opt)
|
|||||||
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
|
DBUG_ASSERT(table_share->tmp_table != NO_TMP_TABLE ||
|
||||||
m_lock_type != F_UNLCK);
|
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))
|
(check_opt->sql_flags & TT_FOR_UPGRADE))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (table->s->mysql_version < MYSQL_VERSION_ID)
|
if (v < MYSQL_VERSION_ID)
|
||||||
{
|
{
|
||||||
if (unlikely((error= check_old_types())))
|
if (unlikely((error= check_old_types())))
|
||||||
return error;
|
return error;
|
||||||
error= ha_check_for_upgrade(check_opt);
|
error= ha_check_for_upgrade(check_opt);
|
||||||
if (unlikely(error && (error != HA_ADMIN_NEEDS_CHECK)))
|
if (unlikely(error && (error != HA_ADMIN_NEEDS_CHECK)))
|
||||||
return error;
|
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)))
|
if (unlikely(!error && (check_opt->sql_flags & TT_FOR_UPGRADE)))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -7182,6 +7197,17 @@ int handler::ha_write_row(const uchar *buf)
|
|||||||
if ((error= ha_check_overlaps(NULL, buf)))
|
if ((error= ha_check_overlaps(NULL, buf)))
|
||||||
DBUG_RETURN(error);
|
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)
|
if (table->s->long_unique_table && this == table->file)
|
||||||
{
|
{
|
||||||
DBUG_ASSERT(inited == NONE || lookup_handler != this);
|
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;
|
uint saved_status= table->status;
|
||||||
error= ha_check_overlaps(old_data, new_data);
|
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)
|
if (!error && table->s->long_unique_table && this == table->file)
|
||||||
error= check_duplicate_long_entries_update(new_data);
|
error= check_duplicate_long_entries_update(new_data);
|
||||||
table->status= saved_status;
|
table->status= saved_status;
|
||||||
|
@ -789,7 +789,9 @@ int Arg_comparator::compare_e_string()
|
|||||||
{
|
{
|
||||||
String *res1,*res2;
|
String *res1,*res2;
|
||||||
res1= (*a)->val_str(&value1);
|
res1= (*a)->val_str(&value1);
|
||||||
|
DBUG_ASSERT((res1 == NULL) == (*a)->null_value);
|
||||||
res2= (*b)->val_str(&value2);
|
res2= (*b)->val_str(&value2);
|
||||||
|
DBUG_ASSERT((res2 == NULL) == (*b)->null_value);
|
||||||
if (!res1 || !res2)
|
if (!res1 || !res2)
|
||||||
return MY_TEST(res1 == res2);
|
return MY_TEST(res1 == res2);
|
||||||
return MY_TEST(sortcmp(res1, res2, compare_collation()) == 0);
|
return MY_TEST(sortcmp(res1, res2, compare_collation()) == 0);
|
||||||
|
@ -1975,8 +1975,7 @@ public:
|
|||||||
void cleanup() { first_eval= TRUE; Item_real_func::cleanup(); }
|
void cleanup() { first_eval= TRUE; Item_real_func::cleanup(); }
|
||||||
bool check_vcol_func_processor(void *arg)
|
bool check_vcol_func_processor(void *arg)
|
||||||
{
|
{
|
||||||
return mark_unsupported_function(func_name(), "()", arg,
|
return mark_unsupported_function(func_name(), "()", arg, VCOL_SESSION_FUNC);
|
||||||
VCOL_NON_DETERMINISTIC);
|
|
||||||
}
|
}
|
||||||
Item *get_copy(THD *thd)
|
Item *get_copy(THD *thd)
|
||||||
{ return get_item_copy<Item_func_rand>(thd, this); }
|
{ return get_item_copy<Item_func_rand>(thd, this); }
|
||||||
|
@ -150,10 +150,12 @@ int json_path_parts_compare(
|
|||||||
{
|
{
|
||||||
int res, res2;
|
int res, res2;
|
||||||
|
|
||||||
|
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
|
||||||
|
{
|
||||||
long arbitrary_var;
|
long arbitrary_var;
|
||||||
long stack_used_up= (available_stack_size(current_thd->thread_stack, &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);
|
||||||
{ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);});
|
});
|
||||||
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
|
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@ -1096,13 +1098,15 @@ my_decimal *Item_func_json_extract::val_decimal(my_decimal *to)
|
|||||||
case JSON_VALUE_OBJECT:
|
case JSON_VALUE_OBJECT:
|
||||||
case JSON_VALUE_ARRAY:
|
case JSON_VALUE_ARRAY:
|
||||||
case JSON_VALUE_FALSE:
|
case JSON_VALUE_FALSE:
|
||||||
case JSON_VALUE_NULL:
|
|
||||||
case JSON_VALUE_UNINITALIZED:
|
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);
|
int2my_decimal(E_DEC_FATAL_ERROR, 0, false/*unsigned_flag*/, to);
|
||||||
return 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;
|
json_engine_t loc_js;
|
||||||
bool set_js;
|
bool set_js;
|
||||||
|
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
|
||||||
|
{
|
||||||
long arbitrary_var;
|
long arbitrary_var;
|
||||||
long stack_used_up= (available_stack_size(current_thd->thread_stack, &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);
|
||||||
{ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);});
|
});
|
||||||
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
|
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@ -2106,10 +2112,12 @@ err_return:
|
|||||||
static int do_merge(String *str, json_engine_t *je1, json_engine_t *je2)
|
static int do_merge(String *str, json_engine_t *je1, json_engine_t *je2)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
|
||||||
|
{
|
||||||
long arbitrary_var;
|
long arbitrary_var;
|
||||||
long stack_used_up= (available_stack_size(current_thd->thread_stack, &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);
|
||||||
{ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);});
|
});
|
||||||
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
|
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@ -2444,11 +2452,13 @@ 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,
|
static int do_merge_patch(String *str, json_engine_t *je1, json_engine_t *je2,
|
||||||
bool *empty_result)
|
bool *empty_result)
|
||||||
|
{
|
||||||
|
DBUG_EXECUTE_IF("json_check_min_stack_requirement",
|
||||||
{
|
{
|
||||||
long arbitrary_var;
|
long arbitrary_var;
|
||||||
long stack_used_up= (available_stack_size(current_thd->thread_stack, &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);
|
||||||
{ALLOCATE_MEM_ON_STACK(my_thread_stack_size-stack_used_up-STACK_MIN_SIZE);});
|
});
|
||||||
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
|
if (check_stack_overrun(current_thd, STACK_MIN_SIZE , NULL))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
@ -7727,8 +7727,8 @@ ER_INVALID_YEAR_COLUMN_LENGTH
|
|||||||
rus "Тип YEAR(%lu) более не поддерживается, вместо него будет создана колонка с типом YEAR(4)"
|
rus "Тип YEAR(%lu) более не поддерживается, вместо него будет создана колонка с типом YEAR(4)"
|
||||||
|
|
||||||
ER_NOT_VALID_PASSWORD
|
ER_NOT_VALID_PASSWORD
|
||||||
chi "您的密码不满足当前的政策要求"
|
eng "Your password does not satisfy the current policy requirements (%s)"
|
||||||
eng "Your password does not satisfy the current policy requirements"
|
ukr "Ваш пароль не відповідає поточним правилам (%s)"
|
||||||
|
|
||||||
ER_MUST_CHANGE_PASSWORD
|
ER_MUST_CHANGE_PASSWORD
|
||||||
bgn "Трябва първо да си смените паролата със SET PASSWORD за да можете да изпълните тази команда"
|
bgn "Трябва първо да си смените паролата със SET PASSWORD за да можете да изпълните тази команда"
|
||||||
|
@ -2175,7 +2175,12 @@ static my_bool do_validate(THD *, plugin_ref plugin, void *arg)
|
|||||||
struct validation_data *data= (struct validation_data *)arg;
|
struct validation_data *data= (struct validation_data *)arg;
|
||||||
struct st_mariadb_password_validation *handler=
|
struct st_mariadb_password_validation *handler=
|
||||||
(st_mariadb_password_validation *)plugin_decl(plugin)->info;
|
(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,
|
if (plugin_foreach(NULL, do_validate,
|
||||||
MariaDB_PASSWORD_VALIDATION_PLUGIN, &data))
|
MariaDB_PASSWORD_VALIDATION_PLUGIN, &data))
|
||||||
{
|
{
|
||||||
my_error(ER_NOT_VALID_PASSWORD, MYF(0));
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -10746,11 +10750,9 @@ static int handle_grant_data(THD *thd, Grant_tables& tables, bool drop,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Handle roles_mapping table. */
|
/* 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(),
|
||||||
if ((found= handle_grant_table(thd, tables.roles_mapping_table(),
|
ROLES_MAPPING_TABLE, drop, user_from, user_to)) < 0)
|
||||||
ROLES_MAPPING_TABLE, drop,
|
|
||||||
user_from, user_to)) < 0)
|
|
||||||
{
|
{
|
||||||
/* Handle of table failed, don't touch the in-memory array. */
|
/* Handle of table failed, don't touch the in-memory array. */
|
||||||
result= -1;
|
result= -1;
|
||||||
@ -10764,7 +10766,6 @@ static int handle_grant_data(THD *thd, Grant_tables& tables, bool drop,
|
|||||||
if (search_only)
|
if (search_only)
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Handle user table. */
|
/* Handle user table. */
|
||||||
if ((found= handle_grant_table(thd, tables.user_table(), USER_TABLE,
|
if ((found= handle_grant_table(thd, tables.user_table(), USER_TABLE,
|
||||||
|
@ -2528,7 +2528,7 @@ static bool plugin_dl_foreach_internal(THD *thd, st_plugin_dl *plugin_dl,
|
|||||||
tmp.plugin_dl= plugin_dl;
|
tmp.plugin_dl= plugin_dl;
|
||||||
|
|
||||||
mysql_mutex_lock(&LOCK_plugin);
|
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)
|
plugin->plugin == plug)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -379,7 +379,7 @@ IF(CONNECT_WITH_REST)
|
|||||||
# add_definitions(-DREST_SOURCE)
|
# add_definitions(-DREST_SOURCE)
|
||||||
## ENDIF()
|
## ENDIF()
|
||||||
## ELSE(NOT cpprestsdk_FOUND)
|
## ELSE(NOT cpprestsdk_FOUND)
|
||||||
## MESSAGE(STATUS "=====> cpprestsdk package not found")
|
# MESSAGE(STATUS "=====> cpprestsdk package not found")
|
||||||
# ENDIF (cpprestsdk_FOUND)
|
# ENDIF (cpprestsdk_FOUND)
|
||||||
ENDIF(CONNECT_WITH_REST)
|
ENDIF(CONNECT_WITH_REST)
|
||||||
ADD_FEATURE_INFO(CONNECT_REST CONNECT_WITH_REST "Support for REST API in the CONNECT storage engine")
|
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()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
IF(WIN32)
|
IF(MSVC)
|
||||||
IF (libmongoc-1.0_FOUND)
|
IF (libmongoc-1.0_FOUND)
|
||||||
SET_TARGET_PROPERTIES(connect PROPERTIES LINK_FLAGS
|
SET_TARGET_PROPERTIES(connect PROPERTIES LINK_FLAGS
|
||||||
"/DELAYLOAD:libbson-1.0.dll /DELAYLOAD:libmongoc-1.0.dll")
|
"/DELAYLOAD:libbson-1.0.dll /DELAYLOAD:libmongoc-1.0.dll")
|
||||||
ENDIF(libmongoc-1.0_FOUND)
|
ENDIF()
|
||||||
|
# Temporarily disable "conversion from size_t .." warnings
|
||||||
# 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 .."
|
|
||||||
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267")
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267")
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4996")
|
||||||
string(REPLACE "/permissive-" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
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()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND)
|
IF(CONNECT_WITH_JDBC AND JAVA_FOUND AND JNI_FOUND)
|
||||||
# TODO: Find how to compile and install the java wrapper classes
|
# TODO: Find how to compile and install the java wrapper classes
|
||||||
# Find required libraries and include directories
|
# Find required libraries and include directories
|
||||||
|
@ -266,7 +266,7 @@ bool Force_Bson(void);
|
|||||||
size_t GetWorkSize(void);
|
size_t GetWorkSize(void);
|
||||||
void SetWorkSize(size_t);
|
void SetWorkSize(size_t);
|
||||||
extern "C" const char *msglang(void);
|
extern "C" const char *msglang(void);
|
||||||
|
static char *strz(PGLOBAL g, LEX_CSTRING &ls);
|
||||||
static void PopUser(PCONNECT xp);
|
static void PopUser(PCONNECT xp);
|
||||||
static PCONNECT GetUser(THD *thd, PCONNECT xp);
|
static PCONNECT GetUser(THD *thd, PCONNECT xp);
|
||||||
static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp);
|
static PGLOBAL GetPlug(THD *thd, PCONNECT& lxp);
|
||||||
@ -5972,7 +5972,7 @@ static int connect_assisted_discovery(handlerton *, THD* thd,
|
|||||||
#if defined(REST_SUPPORT)
|
#if defined(REST_SUPPORT)
|
||||||
case TAB_REST:
|
case TAB_REST:
|
||||||
if (!topt->http)
|
if (!topt->http)
|
||||||
strcpy(g->Message, "Missing REST HTTP option");
|
sprintf(g->Message, "Missing %s HTTP address", topt->type);
|
||||||
else
|
else
|
||||||
ok= true;
|
ok= true;
|
||||||
|
|
||||||
|
@ -1829,7 +1829,7 @@ static PCSZ MakeKey(PGLOBAL g, UDF_ARGS *args, int i)
|
|||||||
|
|
||||||
} // endif s
|
} // endif s
|
||||||
|
|
||||||
return (char*) s;
|
return s;
|
||||||
} // endif count
|
} // endif count
|
||||||
|
|
||||||
return (PCSZ) "Key";
|
return (PCSZ) "Key";
|
||||||
|
@ -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 (
|
CREATE TABLE t2 (
|
||||||
command varchar(128) not null,
|
command varchar(128) not null,
|
||||||
number int(5) not null flag=1,
|
number int(5) not null flag=1,
|
||||||
|
@ -771,7 +771,7 @@ void WMICOL::ReadColumn(PGLOBAL g)
|
|||||||
break;
|
break;
|
||||||
case VT_I4:
|
case VT_I4:
|
||||||
case VT_UI4:
|
case VT_UI4:
|
||||||
Value->SetValue(Prop.lVal);
|
Value->SetValue((long long)Prop.lVal);
|
||||||
break;
|
break;
|
||||||
case VT_I2:
|
case VT_I2:
|
||||||
case VT_UI2:
|
case VT_UI2:
|
||||||
|
@ -948,6 +948,7 @@ in the event that you want all of the memory to be dumped
|
|||||||
to a core file.
|
to a core file.
|
||||||
|
|
||||||
Returns number of errors found in madvise calls. */
|
Returns number of errors found in madvise calls. */
|
||||||
|
MY_ATTRIBUTE((used))
|
||||||
int
|
int
|
||||||
buf_madvise_do_dump()
|
buf_madvise_do_dump()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user