mirror of
https://github.com/MariaDB/server.git
synced 2025-11-06 13:10:12 +03:00
Merge 11.4 into 11.8
This commit is contained in:
@@ -31,7 +31,7 @@ path=`dirname $0`
|
|||||||
# the destination
|
# the destination
|
||||||
#
|
#
|
||||||
|
|
||||||
extra_flags="$pentium64_cflags $debug_cflags -fsanitize=undefined -DWITH_UBSAN -Wno-conversion -Wno-uninitialized"
|
extra_flags="$pentium64_cflags $debug_cflags -fsanitize=undefined -DWITH_UBSAN -Wno-conversion -Wno-uninitialized -Wno-unused-parameter"
|
||||||
extra_configs="$pentium_configs $debug_configs -DWITH_UBSAN=ON -DMYSQL_MAINTAINER_MODE=NO --without-spider"
|
extra_configs="$pentium_configs $debug_configs -DWITH_UBSAN=ON -DMYSQL_MAINTAINER_MODE=NO --without-spider"
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
|||||||
@@ -1404,9 +1404,7 @@ int main(int argc,char *argv[])
|
|||||||
if (opt_outfile)
|
if (opt_outfile)
|
||||||
end_tee();
|
end_tee();
|
||||||
mysql_end(0);
|
mysql_end(0);
|
||||||
#ifndef _lint
|
DBUG_RETURN(0);
|
||||||
DBUG_RETURN(0); // Keep compiler happy
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sig_handler mysql_end(int sig)
|
sig_handler mysql_end(int sig)
|
||||||
@@ -2890,7 +2888,9 @@ static void fix_history(String *final_command)
|
|||||||
ptr++;
|
ptr++;
|
||||||
}
|
}
|
||||||
if (total_lines > 1)
|
if (total_lines > 1)
|
||||||
add_history(fixed_buffer.ptr());
|
{
|
||||||
|
add_history(fixed_buffer.c_ptr());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3213,6 +3213,12 @@ static int reconnect(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wvarargs"
|
||||||
|
/* CONC-789 */
|
||||||
|
#endif
|
||||||
|
|
||||||
static void status_info_cb(void *data, enum enum_mariadb_status_info type, ...)
|
static void status_info_cb(void *data, enum enum_mariadb_status_info type, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
@@ -3228,6 +3234,10 @@ static void status_info_cb(void *data, enum enum_mariadb_status_info type, ...)
|
|||||||
}
|
}
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define mysql_optionsv(A,B,C,D) do { } while(0)
|
#define mysql_optionsv(A,B,C,D) do { } while(0)
|
||||||
#endif
|
#endif
|
||||||
@@ -3511,8 +3521,6 @@ static int com_go(String *buffer, char *)
|
|||||||
old_buffer.copy();
|
old_buffer.copy();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove garbage for nicer messages */
|
|
||||||
LINT_INIT_STRUCT(buff[0]);
|
|
||||||
remove_cntrl(*buffer);
|
remove_cntrl(*buffer);
|
||||||
|
|
||||||
if (buffer->is_empty())
|
if (buffer->is_empty())
|
||||||
|
|||||||
@@ -1942,6 +1942,26 @@ static char *cover_definer_clause(const char *stmt_str,
|
|||||||
return query_str;
|
return query_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static const char* build_path_for_table(char *to, const char *dir,
|
||||||
|
const char *table, const char *ext)
|
||||||
|
{
|
||||||
|
char filename[FN_REFLEN], tmp_path[FN_REFLEN];
|
||||||
|
convert_dirname(tmp_path, dir, NULL);
|
||||||
|
my_load_path(tmp_path, tmp_path, NULL);
|
||||||
|
if (check_if_legal_tablename(table))
|
||||||
|
strxnmov(filename, sizeof(filename) - 1, table, "@@@", NULL);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
uint errors, len;
|
||||||
|
len= my_convert(filename, sizeof(filename) - 1, &my_charset_filename,
|
||||||
|
table, (uint32)strlen(table), charset_info, &errors);
|
||||||
|
filename[len]= 0;
|
||||||
|
}
|
||||||
|
return fn_format(to, filename, tmp_path, ext, MYF(MY_UNPACK_FILENAME));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Open a new .sql file to dump the table or view into
|
Open a new .sql file to dump the table or view into
|
||||||
|
|
||||||
@@ -1957,7 +1977,7 @@ static char *cover_definer_clause(const char *stmt_str,
|
|||||||
static FILE* open_sql_file_for_table(const char *db, const char* table, int flags)
|
static FILE* open_sql_file_for_table(const char *db, const char* table, int flags)
|
||||||
{
|
{
|
||||||
FILE* res;
|
FILE* res;
|
||||||
char filename[FN_REFLEN], tmp_path[FN_REFLEN];
|
char filename[FN_REFLEN];
|
||||||
char out_dir_buf[FN_REFLEN];
|
char out_dir_buf[FN_REFLEN];
|
||||||
|
|
||||||
char *out_dir= path;
|
char *out_dir= path;
|
||||||
@@ -1967,8 +1987,7 @@ static FILE* open_sql_file_for_table(const char *db, const char* table, int flag
|
|||||||
my_snprintf(out_dir_buf, sizeof(out_dir_buf), "%s/%s", opt_dir, db);
|
my_snprintf(out_dir_buf, sizeof(out_dir_buf), "%s/%s", opt_dir, db);
|
||||||
}
|
}
|
||||||
|
|
||||||
convert_dirname(tmp_path, out_dir, NullS);
|
res= my_fopen(build_path_for_table(filename, out_dir, table, ".sql"),
|
||||||
res= my_fopen(fn_format(filename, table, tmp_path, ".sql", 4),
|
|
||||||
flags, MYF(MY_WME));
|
flags, MYF(MY_WME));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@@ -4290,7 +4309,7 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
|
|||||||
|
|
||||||
if (multi_file_output)
|
if (multi_file_output)
|
||||||
{
|
{
|
||||||
char filename[FN_REFLEN], tmp_path[FN_REFLEN];
|
char filename[FN_REFLEN];
|
||||||
char out_dir_buf[FN_REFLEN];
|
char out_dir_buf[FN_REFLEN];
|
||||||
char *out_dir= path;
|
char *out_dir= path;
|
||||||
if (!out_dir)
|
if (!out_dir)
|
||||||
@@ -4303,9 +4322,7 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
|
|||||||
Convert the path to native os format
|
Convert the path to native os format
|
||||||
and resolve to the full filepath.
|
and resolve to the full filepath.
|
||||||
*/
|
*/
|
||||||
convert_dirname(tmp_path,out_dir,NullS);
|
build_path_for_table(filename, out_dir, table, ".txt");
|
||||||
my_load_path(tmp_path, tmp_path, NULL);
|
|
||||||
fn_format(filename, table, tmp_path, ".txt", MYF(MY_UNPACK_FILENAME));
|
|
||||||
|
|
||||||
/* Must delete the file that 'INTO OUTFILE' will write to */
|
/* Must delete the file that 'INTO OUTFILE' will write to */
|
||||||
my_delete(filename, MYF(0));
|
my_delete(filename, MYF(0));
|
||||||
@@ -4314,7 +4331,6 @@ static void dump_table(const char *table, const char *db, const uchar *hash_key,
|
|||||||
to_unix_path(filename);
|
to_unix_path(filename);
|
||||||
|
|
||||||
/* now build the query string */
|
/* now build the query string */
|
||||||
|
|
||||||
dynstr_append_checked(&query_string, "SELECT /*!40001 SQL_NO_CACHE */ ");
|
dynstr_append_checked(&query_string, "SELECT /*!40001 SQL_NO_CACHE */ ");
|
||||||
dynstr_append_checked(&query_string, select_field_names.str);
|
dynstr_append_checked(&query_string, select_field_names.str);
|
||||||
dynstr_append_checked(&query_string, " INTO OUTFILE '");
|
dynstr_append_checked(&query_string, " INTO OUTFILE '");
|
||||||
|
|||||||
@@ -667,7 +667,17 @@ int table_load_params::load_data(MYSQL *mysql)
|
|||||||
|
|
||||||
const char *filename= data_file.c_str();
|
const char *filename= data_file.c_str();
|
||||||
|
|
||||||
fn_format(tablename, filename, "", "", 1 | 2); /* removes path & ext. */
|
fn_format(tablename, filename, "", "", MYF(MY_REPLACE_DIR | MY_REPLACE_EXT));
|
||||||
|
if (strchr(tablename, '@'))
|
||||||
|
{
|
||||||
|
uint errors, len;
|
||||||
|
CHARSET_INFO *cs=
|
||||||
|
get_charset_by_csname(default_charset, MY_CS_PRIMARY, MYF(0));
|
||||||
|
len= my_convert(escaped_name, sizeof(escaped_name) - 1, cs, tablename,
|
||||||
|
(uint32)strlen(tablename), &my_charset_filename, &errors);
|
||||||
|
if (!errors)
|
||||||
|
strmake(tablename, escaped_name, len);
|
||||||
|
}
|
||||||
|
|
||||||
const char *db= current_db ? current_db : dbname.c_str();
|
const char *db= current_db ? current_db : dbname.c_str();
|
||||||
std::string full_tablename= quote_identifier(db);
|
std::string full_tablename= quote_identifier(db);
|
||||||
@@ -872,7 +882,7 @@ static MYSQL *db_connect(char *host, char *database,
|
|||||||
if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
|
if (!strcmp(default_charset,MYSQL_AUTODETECT_CHARSET_NAME))
|
||||||
default_charset= (char *)my_default_csname();
|
default_charset= (char *)my_default_csname();
|
||||||
my_set_console_cp(default_charset);
|
my_set_console_cp(default_charset);
|
||||||
mysql_options(mysql, MYSQL_SET_CHARSET_NAME, my_default_csname());
|
mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||||
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
|
mysql_options(mysql, MYSQL_OPT_CONNECT_ATTR_RESET, 0);
|
||||||
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
|
mysql_options4(mysql, MYSQL_OPT_CONNECT_ATTR_ADD,
|
||||||
"program_name", "mysqlimport");
|
"program_name", "mysqlimport");
|
||||||
|
|||||||
@@ -55,6 +55,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <my_stacktrace.h>
|
#include <my_stacktrace.h>
|
||||||
|
#include <my_attribute.h>
|
||||||
|
|
||||||
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
#include <welcome_copyright_notice.h> // ORACLE_WELCOME_COPYRIGHT_NOTICE
|
||||||
|
|
||||||
@@ -78,7 +79,7 @@ static my_bool non_blocking_api_enabled= 0;
|
|||||||
#define MAX_DELIMITER_LENGTH 16
|
#define MAX_DELIMITER_LENGTH 16
|
||||||
#define DEFAULT_MAX_CONN 64
|
#define DEFAULT_MAX_CONN 64
|
||||||
|
|
||||||
#define DIE_BUFF_SIZE 15*1024
|
#define DIE_BUFF_SIZE 64*1024
|
||||||
|
|
||||||
#define RESULT_STRING_INIT_MEM 2048
|
#define RESULT_STRING_INIT_MEM 2048
|
||||||
#define RESULT_STRING_INCREMENT_MEM 2048
|
#define RESULT_STRING_INCREMENT_MEM 2048
|
||||||
@@ -1631,6 +1632,8 @@ static void make_error_message(char *buf, size_t len, const char *fmt, va_list a
|
|||||||
s+= my_snprintf(s, end -s, "\n");
|
s+= my_snprintf(s, end -s, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_CHECK_STACK_FRAME
|
||||||
|
|
||||||
static void die(const char *fmt, ...)
|
static void die(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
char buff[DIE_BUFF_SIZE];
|
char buff[DIE_BUFF_SIZE];
|
||||||
@@ -1642,6 +1645,8 @@ static void die(const char *fmt, ...)
|
|||||||
really_die(buff);
|
really_die(buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_REENABLE_CHECK_STACK_FRAME
|
||||||
|
|
||||||
static void really_die(const char *msg)
|
static void really_die(const char *msg)
|
||||||
{
|
{
|
||||||
static int dying= 0;
|
static int dying= 0;
|
||||||
@@ -1670,6 +1675,8 @@ static void really_die(const char *msg)
|
|||||||
cleanup_and_exit(1, 1);
|
cleanup_and_exit(1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_DISABLE_CHECK_STACK_FRAME
|
||||||
|
|
||||||
void report_or_die(const char *fmt, ...)
|
void report_or_die(const char *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
@@ -1724,6 +1731,7 @@ void abort_not_supported_test(const char *fmt, ...)
|
|||||||
cleanup_and_exit(62, 0);
|
cleanup_and_exit(62, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PRAGMA_REENABLE_CHECK_STACK_FRAME
|
||||||
|
|
||||||
void abort_not_in_this_version()
|
void abort_not_in_this_version()
|
||||||
{
|
{
|
||||||
@@ -5800,8 +5808,12 @@ void do_close_connection(struct st_command *command)
|
|||||||
DBUG_PRINT("info", ("Closing connection %s", con->name));
|
DBUG_PRINT("info", ("Closing connection %s", con->name));
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
if (command->type == Q_DIRTY_CLOSE)
|
if (command->type == Q_DIRTY_CLOSE)
|
||||||
{
|
|
||||||
mariadb_cancel(con->mysql);
|
mariadb_cancel(con->mysql);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
simple_command(con->mysql,COM_QUIT,0,0,0);
|
||||||
|
if (con->util_mysql)
|
||||||
|
simple_command(con->util_mysql,COM_QUIT,0,0,0);
|
||||||
}
|
}
|
||||||
#endif /*!EMBEDDED_LIBRARY*/
|
#endif /*!EMBEDDED_LIBRARY*/
|
||||||
if (con->stmt)
|
if (con->stmt)
|
||||||
|
|||||||
@@ -67,6 +67,14 @@ IF(CMAKE_C_COMPILER_ID STREQUAL "GNU" AND CMAKE_C_COMPILER_VERSION VERSION_LESS
|
|||||||
SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=non-virtual-dtor) # gcc bug 7302
|
SET(MY_ERROR_FLAGS ${MY_ERROR_FLAGS} -Wno-error=non-virtual-dtor) # gcc bug 7302
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
FOREACH(LANG C CXX)
|
||||||
|
IF(CMAKE_${LANG}_COMPILER_ID MATCHES "Clang")
|
||||||
|
MY_CHECK_AND_SET_COMPILER_FLAG(-Werror=uninitialized-explicit-init)
|
||||||
|
MY_CHECK_AND_SET_COMPILER_FLAG(-Werror=uninitialized-const-reference)
|
||||||
|
SET(CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS} -Werror=uninitialized")
|
||||||
|
ENDIF()
|
||||||
|
ENDFOREACH()
|
||||||
|
|
||||||
IF(MYSQL_MAINTAINER_MODE MATCHES "OFF|WARN")
|
IF(MYSQL_MAINTAINER_MODE MATCHES "OFF|WARN")
|
||||||
RETURN()
|
RETURN()
|
||||||
ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO")
|
ELSEIF(MYSQL_MAINTAINER_MODE MATCHES "AUTO")
|
||||||
|
|||||||
1
debian/mariadb-server.install
vendored
1
debian/mariadb-server.install
vendored
@@ -36,6 +36,7 @@ usr/bin/wsrep_sst_mysqldump
|
|||||||
usr/bin/wsrep_sst_rsync
|
usr/bin/wsrep_sst_rsync
|
||||||
usr/bin/wsrep_sst_rsync_wan
|
usr/bin/wsrep_sst_rsync_wan
|
||||||
usr/lib/mysql/plugin/auth_ed25519.so
|
usr/lib/mysql/plugin/auth_ed25519.so
|
||||||
|
usr/lib/mysql/plugin/auth_mysql_sha2.so
|
||||||
usr/lib/mysql/plugin/auth_pam.so
|
usr/lib/mysql/plugin/auth_pam.so
|
||||||
usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool
|
usr/lib/mysql/plugin/auth_pam_tool_dir/auth_pam_tool
|
||||||
usr/lib/mysql/plugin/auth_pam_v1.so
|
usr/lib/mysql/plugin/auth_pam_v1.so
|
||||||
|
|||||||
@@ -399,18 +399,16 @@ bool Table::copy(ds_ctxt_t *ds, bool is_index, unsigned thread_num) {
|
|||||||
|
|
||||||
for (ulonglong block= 0 ; ; block++) {
|
for (ulonglong block= 0 ; ; block++) {
|
||||||
size_t length = m_cap.block_size;
|
size_t length = m_cap.block_size;
|
||||||
if (is_index) {
|
if (is_index)
|
||||||
if ((error= aria_read_index(
|
error= aria_read_index(partition.m_index_file, &m_cap,
|
||||||
partition.m_index_file, &m_cap, block, copy_buffer) ==
|
block, copy_buffer);
|
||||||
HA_ERR_END_OF_FILE))
|
else
|
||||||
|
error= aria_read_data(partition.m_data_file, &m_cap,
|
||||||
|
block, copy_buffer, &length);
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
if (error == HA_ERR_END_OF_FILE)
|
||||||
break;
|
break;
|
||||||
} else {
|
|
||||||
if ((error= aria_read_data(
|
|
||||||
partition.m_data_file, &m_cap, block, copy_buffer, &length) ==
|
|
||||||
HA_ERR_END_OF_FILE))
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (error) {
|
|
||||||
msg(thread_num, "error: aria_read %s failed: %d",
|
msg(thread_num, "error: aria_read %s failed: %d",
|
||||||
is_index ? "index" : "data", error);
|
is_index ? "index" : "data", error);
|
||||||
goto err;
|
goto err;
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ bool have_lock_wait_timeout = false;
|
|||||||
bool have_galera_enabled = false;
|
bool have_galera_enabled = false;
|
||||||
bool have_multi_threaded_slave = false;
|
bool have_multi_threaded_slave = false;
|
||||||
bool have_gtid_slave = false;
|
bool have_gtid_slave = false;
|
||||||
|
bool innobase_data_file_path_allocated= false;
|
||||||
|
|
||||||
/* Kill long selects */
|
/* Kill long selects */
|
||||||
static mysql_mutex_t kill_query_thread_mutex;
|
static mysql_mutex_t kill_query_thread_mutex;
|
||||||
@@ -500,21 +501,19 @@ bool get_mysql_vars(MYSQL *connection)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (innodb_data_file_path_var && *innodb_data_file_path_var)
|
if (innodb_data_file_path_var && *innodb_data_file_path_var)
|
||||||
innobase_data_file_path= my_strdup(PSI_NOT_INSTRUMENTED,
|
innobase_data_file_path= my_once_strdup(innodb_data_file_path_var,
|
||||||
innodb_data_file_path_var, MYF(MY_FAE));
|
MYF(MY_FAE));
|
||||||
|
|
||||||
if (innodb_data_home_dir_var)
|
if (innodb_data_home_dir_var)
|
||||||
innobase_data_home_dir= my_strdup(PSI_NOT_INSTRUMENTED,
|
innobase_data_home_dir= my_once_strdup(innodb_data_home_dir_var,
|
||||||
innodb_data_home_dir_var, MYF(MY_FAE));
|
MYF(MY_FAE));
|
||||||
|
|
||||||
if (innodb_log_group_home_dir_var && *innodb_log_group_home_dir_var)
|
if (innodb_log_group_home_dir_var && *innodb_log_group_home_dir_var)
|
||||||
srv_log_group_home_dir= my_strdup(PSI_NOT_INSTRUMENTED,
|
srv_log_group_home_dir= my_once_strdup(innodb_log_group_home_dir_var,
|
||||||
innodb_log_group_home_dir_var,
|
|
||||||
MYF(MY_FAE));
|
MYF(MY_FAE));
|
||||||
|
|
||||||
if (innodb_undo_directory_var && *innodb_undo_directory_var)
|
if (innodb_undo_directory_var && *innodb_undo_directory_var)
|
||||||
srv_undo_dir= my_strdup(PSI_NOT_INSTRUMENTED, innodb_undo_directory_var,
|
srv_undo_dir= my_once_strdup(innodb_undo_directory_var, MYF(MY_FAE));
|
||||||
MYF(MY_FAE));
|
|
||||||
|
|
||||||
if (innodb_log_file_size_var)
|
if (innodb_log_file_size_var)
|
||||||
{
|
{
|
||||||
@@ -536,10 +535,7 @@ bool get_mysql_vars(MYSQL *connection)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (aria_log_dir_path_var)
|
if (aria_log_dir_path_var)
|
||||||
{
|
aria_log_dir_path= my_once_strdup(aria_log_dir_path_var, MYF(MY_FAE));
|
||||||
aria_log_dir_path= my_strdup(PSI_NOT_INSTRUMENTED,
|
|
||||||
aria_log_dir_path_var, MYF(MY_FAE));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (page_zip_level_var != NULL)
|
if (page_zip_level_var != NULL)
|
||||||
{
|
{
|
||||||
@@ -552,11 +548,11 @@ bool get_mysql_vars(MYSQL *connection)
|
|||||||
xb_load_list_string(ignore_db_dirs, ",", register_ignore_db_dirs_filter);
|
xb_load_list_string(ignore_db_dirs, ",", register_ignore_db_dirs_filter);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
free_mysql_variables(mysql_vars);
|
|
||||||
|
|
||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static
|
static
|
||||||
bool
|
bool
|
||||||
select_incremental_lsn_from_history(lsn_t *incremental_lsn)
|
select_incremental_lsn_from_history(lsn_t *incremental_lsn)
|
||||||
@@ -932,7 +928,7 @@ lock_for_backup_stage_flush(MYSQL *connection) {
|
|||||||
if (opt_kill_long_queries_timeout) {
|
if (opt_kill_long_queries_timeout) {
|
||||||
start_query_killer();
|
start_query_killer();
|
||||||
}
|
}
|
||||||
xb_mysql_query(connection, "BACKUP STAGE FLUSH", true);
|
xb_mysql_query(connection, "BACKUP STAGE FLUSH", false);
|
||||||
if (opt_kill_long_queries_timeout) {
|
if (opt_kill_long_queries_timeout) {
|
||||||
stop_query_killer();
|
stop_query_killer();
|
||||||
}
|
}
|
||||||
@@ -944,7 +940,7 @@ lock_for_backup_stage_block_ddl(MYSQL *connection) {
|
|||||||
if (opt_kill_long_queries_timeout) {
|
if (opt_kill_long_queries_timeout) {
|
||||||
start_query_killer();
|
start_query_killer();
|
||||||
}
|
}
|
||||||
xb_mysql_query(connection, "BACKUP STAGE BLOCK_DDL", true);
|
xb_mysql_query(connection, "BACKUP STAGE BLOCK_DDL", false);
|
||||||
DBUG_MARIABACKUP_EVENT("after_backup_stage_block_ddl", {});
|
DBUG_MARIABACKUP_EVENT("after_backup_stage_block_ddl", {});
|
||||||
if (opt_kill_long_queries_timeout) {
|
if (opt_kill_long_queries_timeout) {
|
||||||
stop_query_killer();
|
stop_query_killer();
|
||||||
@@ -957,7 +953,7 @@ lock_for_backup_stage_commit(MYSQL *connection) {
|
|||||||
if (opt_kill_long_queries_timeout) {
|
if (opt_kill_long_queries_timeout) {
|
||||||
start_query_killer();
|
start_query_killer();
|
||||||
}
|
}
|
||||||
xb_mysql_query(connection, "BACKUP STAGE BLOCK_COMMIT", true);
|
xb_mysql_query(connection, "BACKUP STAGE BLOCK_COMMIT", false);
|
||||||
DBUG_MARIABACKUP_EVENT("after_backup_stage_block_commit", {});
|
DBUG_MARIABACKUP_EVENT("after_backup_stage_block_commit", {});
|
||||||
if (opt_kill_long_queries_timeout) {
|
if (opt_kill_long_queries_timeout) {
|
||||||
stop_query_killer();
|
stop_query_killer();
|
||||||
@@ -968,12 +964,12 @@ lock_for_backup_stage_commit(MYSQL *connection) {
|
|||||||
bool backup_lock(MYSQL *con, const char *table_name) {
|
bool backup_lock(MYSQL *con, const char *table_name) {
|
||||||
static const std::string backup_lock_prefix("BACKUP LOCK ");
|
static const std::string backup_lock_prefix("BACKUP LOCK ");
|
||||||
std::string backup_lock_query = backup_lock_prefix + table_name;
|
std::string backup_lock_query = backup_lock_prefix + table_name;
|
||||||
xb_mysql_query(con, backup_lock_query.c_str(), true);
|
xb_mysql_query(con, backup_lock_query.c_str(), false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool backup_unlock(MYSQL *con) {
|
bool backup_unlock(MYSQL *con) {
|
||||||
xb_mysql_query(con, "BACKUP UNLOCK", true);
|
xb_mysql_query(con, "BACKUP UNLOCK", false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -987,6 +983,8 @@ get_tables_in_use(MYSQL *con) {
|
|||||||
msg("Table %s is in use", tk.c_str());
|
msg("Table %s is in use", tk.c_str());
|
||||||
result.insert(std::move(tk));
|
result.insert(std::move(tk));
|
||||||
}
|
}
|
||||||
|
if (q_res)
|
||||||
|
mysql_free_result(q_res);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2070,6 +2068,7 @@ ulonglong get_current_lsn(MYSQL *connection)
|
|||||||
{
|
{
|
||||||
static const char lsn_prefix[] = "\nLog sequence number ";
|
static const char lsn_prefix[] = "\nLog sequence number ";
|
||||||
ulonglong lsn = 0;
|
ulonglong lsn = 0;
|
||||||
|
msg("Getting InnoDB LSN");
|
||||||
if (MYSQL_RES *res = xb_mysql_query(connection,
|
if (MYSQL_RES *res = xb_mysql_query(connection,
|
||||||
"SHOW ENGINE INNODB STATUS",
|
"SHOW ENGINE INNODB STATUS",
|
||||||
true, false)) {
|
true, false)) {
|
||||||
@@ -2083,5 +2082,10 @@ ulonglong get_current_lsn(MYSQL *connection)
|
|||||||
}
|
}
|
||||||
mysql_free_result(res);
|
mysql_free_result(res);
|
||||||
}
|
}
|
||||||
|
msg("InnoDB LSN: %llu, Flushing Logs", lsn);
|
||||||
|
/* Make sure that current LSN is written and flushed to disk. */
|
||||||
|
xb_mysql_query(connection, "FLUSH NO_WRITE_TO_BINLOG ENGINE LOGS",
|
||||||
|
false, false);
|
||||||
|
msg("Flushed Logs");
|
||||||
return lsn;
|
return lsn;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,5 +97,4 @@ bool
|
|||||||
write_slave_info(ds_ctxt *datasink, MYSQL *connection);
|
write_slave_info(ds_ctxt *datasink, MYSQL *connection);
|
||||||
|
|
||||||
ulonglong get_current_lsn(MYSQL *connection);
|
ulonglong get_current_lsn(MYSQL *connection);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ int sd_notifyf() { return 0; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
int sys_var_init();
|
int sys_var_init();
|
||||||
|
void sys_var_end();
|
||||||
|
|
||||||
extern const char* fts_common_tables[];
|
extern const char* fts_common_tables[];
|
||||||
extern const fts_index_selector_t fts_index_selector[];
|
extern const fts_index_selector_t fts_index_selector[];
|
||||||
@@ -203,6 +204,8 @@ struct xb_filter_entry_t{
|
|||||||
|
|
||||||
/** whether log_copying_thread() is active; protected by recv_sys.mutex */
|
/** whether log_copying_thread() is active; protected by recv_sys.mutex */
|
||||||
static bool log_copying_running;
|
static bool log_copying_running;
|
||||||
|
/** the log parsing function for --backup */
|
||||||
|
static recv_sys_t::parser backup_log_parse;
|
||||||
/** for --backup, target LSN to copy the log to; protected by recv_sys.mutex */
|
/** for --backup, target LSN to copy the log to; protected by recv_sys.mutex */
|
||||||
lsn_t metadata_to_lsn;
|
lsn_t metadata_to_lsn;
|
||||||
|
|
||||||
@@ -395,6 +398,7 @@ char *opt_incremental_history_uuid;
|
|||||||
|
|
||||||
char *opt_user;
|
char *opt_user;
|
||||||
const char *opt_password;
|
const char *opt_password;
|
||||||
|
bool free_opt_password;
|
||||||
char *opt_host;
|
char *opt_host;
|
||||||
char *opt_defaults_group;
|
char *opt_defaults_group;
|
||||||
char *opt_socket;
|
char *opt_socket;
|
||||||
@@ -1960,7 +1964,7 @@ struct my_option xb_server_options[] =
|
|||||||
"Whether ib_logfile0 should be memory-mapped",
|
"Whether ib_logfile0 should be memory-mapped",
|
||||||
(G_PTR*) &log_sys.log_mmap,
|
(G_PTR*) &log_sys.log_mmap,
|
||||||
(G_PTR*) &log_sys.log_mmap, 0, GET_BOOL, NO_ARG,
|
(G_PTR*) &log_sys.log_mmap, 0, GET_BOOL, NO_ARG,
|
||||||
log_sys.log_mmap_default, 0, 0, 0, 0, 0},
|
FALSE, 0, 0, 0, 0, 0},
|
||||||
#if defined __linux__ || defined _WIN32
|
#if defined __linux__ || defined _WIN32
|
||||||
{"innodb_log_file_buffering", OPT_INNODB_LOG_FILE_BUFFERING,
|
{"innodb_log_file_buffering", OPT_INNODB_LOG_FILE_BUFFERING,
|
||||||
"Whether the file system cache for ib_logfile0 is enabled during --backup",
|
"Whether the file system cache for ib_logfile0 is enabled during --backup",
|
||||||
@@ -2099,7 +2103,7 @@ struct my_option xb_server_options[] =
|
|||||||
"(for --backup): Force an InnoDB checkpoint",
|
"(for --backup): Force an InnoDB checkpoint",
|
||||||
(G_PTR*)&innodb_log_checkpoint_now,
|
(G_PTR*)&innodb_log_checkpoint_now,
|
||||||
(G_PTR*)&innodb_log_checkpoint_now,
|
(G_PTR*)&innodb_log_checkpoint_now,
|
||||||
0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
|
0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
|
||||||
{"mysqld-args", OPT_XTRA_MYSQLD_ARGS,
|
{"mysqld-args", OPT_XTRA_MYSQLD_ARGS,
|
||||||
"All arguments that follow this argument are considered as server "
|
"All arguments that follow this argument are considered as server "
|
||||||
@@ -2448,6 +2452,7 @@ xb_get_one_option(const struct my_option *opt,
|
|||||||
|
|
||||||
static bool innodb_init_param()
|
static bool innodb_init_param()
|
||||||
{
|
{
|
||||||
|
static bool mysql_tmpdir_list_set= 0;
|
||||||
if (!ut_is_2pow(log_sys.write_size)) {
|
if (!ut_is_2pow(log_sys.write_size)) {
|
||||||
msg("InnoDB: innodb_log_write_ahead_size=%u"
|
msg("InnoDB: innodb_log_write_ahead_size=%u"
|
||||||
" is not a power of two", log_sys.write_size);
|
" is not a power of two", log_sys.write_size);
|
||||||
@@ -2455,12 +2460,15 @@ static bool innodb_init_param()
|
|||||||
}
|
}
|
||||||
srv_is_being_started = TRUE;
|
srv_is_being_started = TRUE;
|
||||||
/* === some variables from mysqld === */
|
/* === some variables from mysqld === */
|
||||||
|
if (!mysql_tmpdir_list_set)
|
||||||
|
{
|
||||||
|
mysql_tmpdir_list_set= 1;
|
||||||
memset((G_PTR) &mysql_tmpdir_list, 0, sizeof(mysql_tmpdir_list));
|
memset((G_PTR) &mysql_tmpdir_list, 0, sizeof(mysql_tmpdir_list));
|
||||||
|
|
||||||
if (init_tmpdir(&mysql_tmpdir_list, opt_mysql_tmpdir)) {
|
if (init_tmpdir(&mysql_tmpdir_list, opt_mysql_tmpdir)) {
|
||||||
msg("init_tmpdir() failed");
|
msg("init_tmpdir() failed");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
xtrabackup_tmpdir = my_tmpdir(&mysql_tmpdir_list);
|
xtrabackup_tmpdir = my_tmpdir(&mysql_tmpdir_list);
|
||||||
/* dummy for initialize all_charsets[] */
|
/* dummy for initialize all_charsets[] */
|
||||||
get_charset_name(0);
|
get_charset_name(0);
|
||||||
@@ -2628,7 +2636,10 @@ static byte log_hdr_buf[log_t::START_OFFSET + SIZE_OF_FILE_CHECKPOINT];
|
|||||||
static void log_hdr_init()
|
static void log_hdr_init()
|
||||||
{
|
{
|
||||||
memset(log_hdr_buf, 0, sizeof log_hdr_buf);
|
memset(log_hdr_buf, 0, sizeof log_hdr_buf);
|
||||||
mach_write_to_4(LOG_HEADER_FORMAT + log_hdr_buf, log_t::FORMAT_10_8);
|
/* log_t::FORMAT_ENC_10_8 is written to the file as FORMAT_10_8 */
|
||||||
|
mach_write_to_4(LOG_HEADER_FORMAT + log_hdr_buf,
|
||||||
|
log_sys.format == log_t::FORMAT_ENC_11
|
||||||
|
? log_t::FORMAT_ENC_11 : log_t::FORMAT_10_8);
|
||||||
mach_write_to_8(LOG_HEADER_START_LSN + log_hdr_buf,
|
mach_write_to_8(LOG_HEADER_START_LSN + log_hdr_buf,
|
||||||
log_sys.next_checkpoint_lsn);
|
log_sys.next_checkpoint_lsn);
|
||||||
snprintf(reinterpret_cast<char*>(LOG_HEADER_CREATOR + log_hdr_buf),
|
snprintf(reinterpret_cast<char*>(LOG_HEADER_CREATOR + log_hdr_buf),
|
||||||
@@ -3460,17 +3471,11 @@ static bool xtrabackup_copy_mmap_logfile()
|
|||||||
recv_sys.len= size_t(log_sys.file_size);
|
recv_sys.len= size_t(log_sys.file_size);
|
||||||
const size_t seq_offset{log_sys.is_encrypted() ? 8U + 5U : 5U};
|
const size_t seq_offset{log_sys.is_encrypted() ? 8U + 5U : 5U};
|
||||||
const char one{'\1'};
|
const char one{'\1'};
|
||||||
|
|
||||||
for (unsigned retry_count{0};;)
|
|
||||||
{
|
|
||||||
recv_sys_t::parse_mtr_result r;
|
|
||||||
const byte *start= &log_sys.buf[recv_sys.offset];
|
const byte *start= &log_sys.buf[recv_sys.offset];
|
||||||
|
ut_d(recv_sys_t::parse_mtr_result r);
|
||||||
|
|
||||||
if (recv_sys.parse_mmap<recv_sys_t::store::BACKUP>(false) ==
|
if ((ut_d(r=) backup_log_parse(false)) == recv_sys_t::OK)
|
||||||
recv_sys_t::OK)
|
|
||||||
{
|
{
|
||||||
const byte *end;
|
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
/* Set the sequence bit (the backed-up log will not wrap around) */
|
/* Set the sequence bit (the backed-up log will not wrap around) */
|
||||||
@@ -3487,51 +3492,20 @@ static bool xtrabackup_copy_mmap_logfile()
|
|||||||
start = seq + 1;
|
start = seq + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while ((r= recv_sys.parse_mmap<recv_sys_t::store::BACKUP>(false)) ==
|
while ((ut_d(r=) backup_log_parse(false)) == recv_sys_t::OK);
|
||||||
recv_sys_t::OK);
|
|
||||||
|
|
||||||
end= &log_sys.buf[recv_sys.offset];
|
if (xtrabackup_copy_mmap_snippet(dst_log_file, start,
|
||||||
|
&log_sys.buf[recv_sys.offset]))
|
||||||
if (xtrabackup_copy_mmap_snippet(dst_log_file, start, end))
|
|
||||||
{
|
{
|
||||||
write_error:
|
write_error:
|
||||||
msg("Error: write to ib_logfile0 failed");
|
msg("Error: write to ib_logfile0 failed");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
start= end;
|
|
||||||
|
|
||||||
pthread_cond_broadcast(&scanned_lsn_cond);
|
pthread_cond_broadcast(&scanned_lsn_cond);
|
||||||
|
}
|
||||||
|
|
||||||
if (r == recv_sys_t::GOT_EOF)
|
ut_ad(r == recv_sys_t::GOT_EOF);
|
||||||
break;
|
|
||||||
|
|
||||||
retry_count= 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (metadata_to_lsn)
|
|
||||||
{
|
|
||||||
if (metadata_to_lsn <= recv_sys.lsn)
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (xtrabackup_throttle && io_ticket-- < 0)
|
|
||||||
mysql_cond_wait(&wait_throttle, &recv_sys.mutex);
|
|
||||||
|
|
||||||
if (!retry_count++)
|
|
||||||
msg("Retrying read of log at LSN=" LSN_PF, recv_sys.lsn);
|
|
||||||
else if (retry_count == 100)
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
timespec abstime;
|
|
||||||
set_timespec_nsec(abstime, 1000000ULL /* 1 ms */);
|
|
||||||
if (!mysql_cond_timedwait(&log_copying_stop, &recv_sys.mutex,
|
|
||||||
&abstime))
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (verbose)
|
if (verbose)
|
||||||
msg(">> log scanned up to (" LSN_PF ")", recv_sys.lsn);
|
msg(">> log scanned up to (" LSN_PF ")", recv_sys.lsn);
|
||||||
@@ -3539,8 +3513,9 @@ static bool xtrabackup_copy_mmap_logfile()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Copy redo log until the current end of the log is reached
|
/** Copy redo log until the current end of the log is reached
|
||||||
|
@param early_exit parse and copy only logs from first read and return
|
||||||
@return whether the operation failed */
|
@return whether the operation failed */
|
||||||
static bool xtrabackup_copy_logfile()
|
static bool xtrabackup_copy_logfile(bool early_exit)
|
||||||
{
|
{
|
||||||
mysql_mutex_assert_owner(&recv_sys.mutex);
|
mysql_mutex_assert_owner(&recv_sys.mutex);
|
||||||
DBUG_EXECUTE_IF("log_checksum_mismatch", return false;);
|
DBUG_EXECUTE_IF("log_checksum_mismatch", return false;);
|
||||||
@@ -3556,7 +3531,6 @@ static bool xtrabackup_copy_logfile()
|
|||||||
|
|
||||||
recv_sys.offset= size_t(recv_sys.lsn - log_sys.get_first_lsn()) &
|
recv_sys.offset= size_t(recv_sys.lsn - log_sys.get_first_lsn()) &
|
||||||
block_size_1;
|
block_size_1;
|
||||||
recv_sys.len= 0;
|
|
||||||
|
|
||||||
for (unsigned retry_count{0};;)
|
for (unsigned retry_count{0};;)
|
||||||
{
|
{
|
||||||
@@ -3564,12 +3538,12 @@ static bool xtrabackup_copy_logfile()
|
|||||||
size_t start_offset{recv_sys.offset};
|
size_t start_offset{recv_sys.offset};
|
||||||
|
|
||||||
{
|
{
|
||||||
|
recv_sys.len= 0;
|
||||||
{
|
{
|
||||||
auto source_offset=
|
auto source_offset=
|
||||||
log_sys.calc_lsn_offset(recv_sys.lsn + recv_sys.len -
|
log_sys.calc_lsn_offset(recv_sys.lsn - recv_sys.offset);
|
||||||
recv_sys.offset);
|
|
||||||
source_offset&= ~block_size_1;
|
source_offset&= ~block_size_1;
|
||||||
size_t size{log_sys.buf_size - recv_sys.len};
|
size_t size{log_sys.buf_size};
|
||||||
if (UNIV_UNLIKELY(source_offset + size > log_sys.file_size))
|
if (UNIV_UNLIKELY(source_offset + size > log_sys.file_size))
|
||||||
{
|
{
|
||||||
const size_t first{size_t(log_sys.file_size - source_offset)};
|
const size_t first{size_t(log_sys.file_size - source_offset)};
|
||||||
@@ -3591,8 +3565,7 @@ static bool xtrabackup_copy_logfile()
|
|||||||
if (log_sys.buf[recv_sys.offset] <= 1)
|
if (log_sys.buf[recv_sys.offset] <= 1)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (recv_sys.parse_mtr<recv_sys_t::store::BACKUP>(false) ==
|
if (backup_log_parse(false) == recv_sys_t::OK)
|
||||||
recv_sys_t::OK)
|
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
@@ -3602,8 +3575,7 @@ static bool xtrabackup_copy_logfile()
|
|||||||
sequence_offset));
|
sequence_offset));
|
||||||
*seq= 1;
|
*seq= 1;
|
||||||
}
|
}
|
||||||
while ((r= recv_sys.parse_mtr<recv_sys_t::store::BACKUP>(false)) ==
|
while ((r= backup_log_parse(false)) == recv_sys_t::OK);
|
||||||
recv_sys_t::OK);
|
|
||||||
|
|
||||||
if (ds_write(dst_log_file, log_sys.buf + start_offset,
|
if (ds_write(dst_log_file, log_sys.buf + start_offset,
|
||||||
recv_sys.offset - start_offset))
|
recv_sys.offset - start_offset))
|
||||||
@@ -3611,32 +3583,25 @@ static bool xtrabackup_copy_logfile()
|
|||||||
msg("Error: write to ib_logfile0 failed");
|
msg("Error: write to ib_logfile0 failed");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
const auto ofs= recv_sys.offset & ~block_size_1;
|
|
||||||
memmove_aligned<64>(log_sys.buf, log_sys.buf + ofs,
|
|
||||||
recv_sys.len - ofs);
|
|
||||||
recv_sys.len-= ofs;
|
|
||||||
recv_sys.offset&= block_size_1;
|
|
||||||
}
|
|
||||||
|
|
||||||
pthread_cond_broadcast(&scanned_lsn_cond);
|
pthread_cond_broadcast(&scanned_lsn_cond);
|
||||||
|
|
||||||
if (r == recv_sys_t::GOT_EOF)
|
if (r == recv_sys_t::GOT_EOF || early_exit)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
ut_ad(r == recv_sys_t::PREMATURE_EOF);
|
||||||
|
|
||||||
if (recv_sys.offset < log_sys.write_size)
|
if (recv_sys.offset < log_sys.write_size)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (xtrabackup_throttle && io_ticket-- < 0)
|
if (xtrabackup_throttle && io_ticket-- < 0)
|
||||||
mysql_cond_wait(&wait_throttle, &recv_sys.mutex);
|
mysql_cond_wait(&wait_throttle, &recv_sys.mutex);
|
||||||
|
|
||||||
|
recv_sys.offset&= block_size_1;
|
||||||
retry_count= 0;
|
retry_count= 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
recv_sys.len= recv_sys.offset & ~block_size_1;
|
|
||||||
if (retry_count == 100)
|
if (retry_count == 100)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -3716,7 +3681,7 @@ static void log_copying_thread()
|
|||||||
{
|
{
|
||||||
my_thread_init();
|
my_thread_init();
|
||||||
mysql_mutex_lock(&recv_sys.mutex);
|
mysql_mutex_lock(&recv_sys.mutex);
|
||||||
while (!xtrabackup_copy_logfile() &&
|
while (!xtrabackup_copy_logfile(false) &&
|
||||||
(!metadata_last_lsn || metadata_last_lsn > recv_sys.lsn))
|
(!metadata_last_lsn || metadata_last_lsn > recv_sys.lsn))
|
||||||
{
|
{
|
||||||
timespec abstime;
|
timespec abstime;
|
||||||
@@ -4934,7 +4899,7 @@ static bool backup_wait_for_commit_lsn()
|
|||||||
ut_ad(metadata_to_lsn);
|
ut_ad(metadata_to_lsn);
|
||||||
metadata_last_lsn= lsn;
|
metadata_last_lsn= lsn;
|
||||||
|
|
||||||
last_lsn= backup_wait_for_lsn_low(LSN_MAX);
|
last_lsn= backup_wait_for_lsn_low(lsn);
|
||||||
|
|
||||||
metadata_last_lsn= last_lsn;
|
metadata_last_lsn= last_lsn;
|
||||||
stop_backup_threads();
|
stop_backup_threads();
|
||||||
@@ -5490,13 +5455,15 @@ static bool xtrabackup_backup_func()
|
|||||||
}
|
}
|
||||||
msg("cd to %s", mysql_real_data_home);
|
msg("cd to %s", mysql_real_data_home);
|
||||||
encryption_plugin_backup_init(mysql_connection);
|
encryption_plugin_backup_init(mysql_connection);
|
||||||
if (innodb_log_checkpoint_now != false && mysql_send_query(
|
if (innodb_log_checkpoint_now) {
|
||||||
mysql_connection,
|
msg("Initiating checkpoint");
|
||||||
|
if (mysql_send_query(mysql_connection,
|
||||||
C_STRING_WITH_LEN("SET GLOBAL "
|
C_STRING_WITH_LEN("SET GLOBAL "
|
||||||
"innodb_log_checkpoint_now=ON;"))) {
|
"innodb_log_checkpoint_now=ON;"))) {
|
||||||
msg("initiating checkpoint failed");
|
msg("initiating checkpoint failed");
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
msg("open files limit requested %lu, set to %lu",
|
msg("open files limit requested %lu, set to %lu",
|
||||||
xb_open_files_limit,
|
xb_open_files_limit,
|
||||||
@@ -5609,6 +5576,7 @@ fail:
|
|||||||
server does not support this */
|
server does not support this */
|
||||||
if (innodb_log_checkpoint_now != false) {
|
if (innodb_log_checkpoint_now != false) {
|
||||||
mysql_read_query_result(mysql_connection);
|
mysql_read_query_result(mysql_connection);
|
||||||
|
msg("Finished waiting for checkpoint");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!select_history()) {
|
if (!select_history()) {
|
||||||
@@ -5646,9 +5614,10 @@ fail:
|
|||||||
/* copy log file by current position */
|
/* copy log file by current position */
|
||||||
|
|
||||||
mysql_mutex_lock(&recv_sys.mutex);
|
mysql_mutex_lock(&recv_sys.mutex);
|
||||||
|
backup_log_parse = recv_sys.get_backup_parser();
|
||||||
recv_sys.lsn = log_sys.next_checkpoint_lsn;
|
recv_sys.lsn = log_sys.next_checkpoint_lsn;
|
||||||
|
|
||||||
const bool log_copy_failed = xtrabackup_copy_logfile();
|
const bool log_copy_failed = xtrabackup_copy_logfile(true);
|
||||||
|
|
||||||
mysql_mutex_unlock(&recv_sys.mutex);
|
mysql_mutex_unlock(&recv_sys.mutex);
|
||||||
|
|
||||||
@@ -6687,7 +6656,6 @@ void
|
|||||||
innodb_free_param()
|
innodb_free_param()
|
||||||
{
|
{
|
||||||
srv_sys_space.shutdown();
|
srv_sys_space.shutdown();
|
||||||
free_tmpdir(&mysql_tmpdir_list);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -7336,6 +7304,8 @@ order:
|
|||||||
void handle_options(int argc, char **argv, char ***argv_server,
|
void handle_options(int argc, char **argv, char ***argv_server,
|
||||||
char ***argv_client, char ***argv_backup)
|
char ***argv_client, char ***argv_backup)
|
||||||
{
|
{
|
||||||
|
char **save_argv_server, **save_argv_client, **save_argv_backup;
|
||||||
|
|
||||||
/* Setup some variables for Innodb.*/
|
/* Setup some variables for Innodb.*/
|
||||||
srv_operation = SRV_OPERATION_RESTORE;
|
srv_operation = SRV_OPERATION_RESTORE;
|
||||||
|
|
||||||
@@ -7453,6 +7423,7 @@ void handle_options(int argc, char **argv, char ***argv_server,
|
|||||||
|
|
||||||
load_defaults_or_exit(conf_file, &server_default_groups[0],
|
load_defaults_or_exit(conf_file, &server_default_groups[0],
|
||||||
&argc_server, argv_server);
|
&argc_server, argv_server);
|
||||||
|
save_argv_server= *argv_server;
|
||||||
|
|
||||||
int n;
|
int n;
|
||||||
for (n = 0; (*argv_server)[n]; n++) {};
|
for (n = 0; (*argv_server)[n]; n++) {};
|
||||||
@@ -7498,6 +7469,7 @@ void handle_options(int argc, char **argv, char ***argv_server,
|
|||||||
|
|
||||||
load_defaults_or_exit(conf_file, xb_client_default_groups,
|
load_defaults_or_exit(conf_file, xb_client_default_groups,
|
||||||
&argc_client, argv_client);
|
&argc_client, argv_client);
|
||||||
|
save_argv_client= *argv_client;
|
||||||
|
|
||||||
for (n = 0; (*argv_client)[n]; n++) {};
|
for (n = 0; (*argv_client)[n]; n++) {};
|
||||||
argc_client = n;
|
argc_client = n;
|
||||||
@@ -7518,6 +7490,8 @@ void handle_options(int argc, char **argv, char ***argv_server,
|
|||||||
|
|
||||||
load_defaults_or_exit(conf_file, backup_default_groups, &argc_backup,
|
load_defaults_or_exit(conf_file, backup_default_groups, &argc_backup,
|
||||||
argv_backup);
|
argv_backup);
|
||||||
|
save_argv_backup= *argv_backup;
|
||||||
|
|
||||||
for (n= 0; (*argv_backup)[n]; n++)
|
for (n= 0; (*argv_backup)[n]; n++)
|
||||||
{
|
{
|
||||||
};
|
};
|
||||||
@@ -7545,12 +7519,13 @@ void handle_options(int argc, char **argv, char ***argv_server,
|
|||||||
xb_client_options, xb_get_one_option)))
|
xb_client_options, xb_get_one_option)))
|
||||||
exit(ho_error);
|
exit(ho_error);
|
||||||
|
|
||||||
if (opt_password)
|
if (opt_password && strlen(opt_password))
|
||||||
{
|
{
|
||||||
char *argument= (char*) opt_password;
|
char *argument= (char*) opt_password;
|
||||||
char *start= (char*) opt_password;
|
char *start= (char*) opt_password;
|
||||||
opt_password= my_strdup(PSI_NOT_INSTRUMENTED, opt_password,
|
opt_password= my_strdup(PSI_NOT_INSTRUMENTED, opt_password,
|
||||||
MYF(MY_FAE));
|
MYF(MY_FAE));
|
||||||
|
free_opt_password= 1;
|
||||||
while (*argument)
|
while (*argument)
|
||||||
*argument++= 'x'; // Destroy argument
|
*argument++= 'x'; // Destroy argument
|
||||||
if (*start)
|
if (*start)
|
||||||
@@ -7598,6 +7573,14 @@ void handle_options(int argc, char **argv, char ***argv_server,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
Restore load defaults argument to the value after
|
||||||
|
load_defaults_or_exit(). This is needed for caller
|
||||||
|
when calling free_defaults()
|
||||||
|
*/
|
||||||
|
*argv_server= save_argv_server;
|
||||||
|
*argv_client= save_argv_client;
|
||||||
|
*argv_backup= save_argv_backup;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int main_low(char** argv);
|
static int main_low(char** argv);
|
||||||
@@ -7702,10 +7685,21 @@ int main(int argc, char **argv)
|
|||||||
cleanup_errmsgs();
|
cleanup_errmsgs();
|
||||||
free_error_messages();
|
free_error_messages();
|
||||||
mysql_mutex_destroy(&LOCK_error_log);
|
mysql_mutex_destroy(&LOCK_error_log);
|
||||||
|
free_tmpdir(&mysql_tmpdir_list);
|
||||||
|
if (free_opt_password)
|
||||||
|
my_free((char*) opt_password);
|
||||||
|
plugin_shutdown();
|
||||||
|
free_list(opt_plugin_load_list_ptr);
|
||||||
|
mysql_server_end();
|
||||||
|
sys_var_end();
|
||||||
|
|
||||||
if (status == EXIT_SUCCESS) {
|
if (status == EXIT_SUCCESS) {
|
||||||
msg("completed OK!");
|
msg("completed OK!");
|
||||||
}
|
}
|
||||||
|
my_end(MY_CHECK_ERROR);
|
||||||
|
sf_leaking_memory= 0;
|
||||||
|
if (SAFEMALLOC_HAVE_MEMORY_LEAK)
|
||||||
|
status= EXIT_FAILURE;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,12 +80,6 @@ extern const char _dig_vec_lower[];
|
|||||||
|
|
||||||
extern char *strmov_overlapp(char *dest, const char *src);
|
extern char *strmov_overlapp(char *dest, const char *src);
|
||||||
|
|
||||||
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
|
|
||||||
#define LINT_INIT_STRUCT(var) bzero(&var, sizeof(var)) /* No uninitialize-warning */
|
|
||||||
#else
|
|
||||||
#define LINT_INIT_STRUCT(var)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Prototypes for string functions */
|
/* Prototypes for string functions */
|
||||||
|
|
||||||
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
|
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
|
||||||
|
|||||||
@@ -51,6 +51,13 @@
|
|||||||
#define HA_OPEN_FOR_DROP (1U << 13) /* Open part of drop */
|
#define HA_OPEN_FOR_DROP (1U << 13) /* Open part of drop */
|
||||||
#define HA_OPEN_GLOBAL_TMP_TABLE (1U << 14) /* TMP table used by repliction */
|
#define HA_OPEN_GLOBAL_TMP_TABLE (1U << 14) /* TMP table used by repliction */
|
||||||
#define HA_OPEN_SIZE_TRACKING (1U << 15)
|
#define HA_OPEN_SIZE_TRACKING (1U << 15)
|
||||||
|
/*
|
||||||
|
This is to signal that the table will not be cached by the caller
|
||||||
|
and the table should be open in read-only mode if the tool requests
|
||||||
|
that
|
||||||
|
*/
|
||||||
|
#define HA_OPEN_FORCE_MODE (1U << 16) /* Force open mode */
|
||||||
|
#define HA_OPEN_DATA_READONLY (1U << 17) /* Use readonly for data */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Allow opening even if table is incompatible as this is for ALTER TABLE which
|
Allow opening even if table is incompatible as this is for ALTER TABLE which
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#if !defined(DBUG_OFF) && !defined(_lint)
|
#if !defined(DBUG_OFF)
|
||||||
|
|
||||||
struct _db_stack_frame_ {
|
struct _db_stack_frame_ {
|
||||||
const char *func; /* function name of the previous stack frame */
|
const char *func; /* function name of the previous stack frame */
|
||||||
@@ -206,7 +206,7 @@ extern void (*my_dbug_assert_failed)(const char *assert_expr, const char* file,
|
|||||||
#define DBUG_ASSERT(A) do { } while(0)
|
#define DBUG_ASSERT(A) do { } while(0)
|
||||||
#define IF_DBUG_ASSERT(A,B) B
|
#define IF_DBUG_ASSERT(A,B) B
|
||||||
#endif /* DBUG_ASSERT_AS_PRINTF */
|
#endif /* DBUG_ASSERT_AS_PRINTF */
|
||||||
#endif /* !defined(DBUG_OFF) && !defined(_lint) */
|
#endif /* !defined(DBUG_OFF) */
|
||||||
|
|
||||||
#ifdef EXTRA_DEBUG
|
#ifdef EXTRA_DEBUG
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -281,10 +281,6 @@ C_MODE_END
|
|||||||
#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
|
#error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_lint) && !defined(lint)
|
|
||||||
#define lint
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef stdin
|
#ifndef stdin
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -448,22 +444,19 @@ extern "C" int madvise(void *addr, size_t len, int behav);
|
|||||||
/*
|
/*
|
||||||
Suppress uninitialized variable warning without generating code.
|
Suppress uninitialized variable warning without generating code.
|
||||||
*/
|
*/
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__) && !defined(WITH_UBSAN)
|
||||||
/* GCC specific self-initialization which inhibits the warning. */
|
/*
|
||||||
|
GCC specific self-initialization which inhibits the warning.
|
||||||
|
clang and static analysis will complain loudly about this
|
||||||
|
so compile those under WITH_UBSAN.
|
||||||
|
*/
|
||||||
#define UNINIT_VAR(x) x= x
|
#define UNINIT_VAR(x) x= x
|
||||||
#elif defined(_lint) || defined(FORCE_INIT_OF_VARS)
|
#elif defined(FORCE_INIT_OF_VARS)
|
||||||
#define UNINIT_VAR(x) x= 0
|
#define UNINIT_VAR(x) x= 0
|
||||||
#else
|
#else
|
||||||
#define UNINIT_VAR(x) x
|
#define UNINIT_VAR(x) x
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This is only to be used when resetting variables in a class constructor */
|
|
||||||
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
|
|
||||||
#define LINT_INIT(x) x= 0
|
|
||||||
#else
|
|
||||||
#define LINT_INIT(x)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(HAVE_UINT)
|
#if !defined(HAVE_UINT)
|
||||||
#undef HAVE_UINT
|
#undef HAVE_UINT
|
||||||
#define HAVE_UINT
|
#define HAVE_UINT
|
||||||
@@ -505,7 +498,7 @@ C_MODE_END
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* We might be forced to turn debug off, if not turned off already */
|
/* We might be forced to turn debug off, if not turned off already */
|
||||||
#if (defined(FORCE_DBUG_OFF) || defined(_lint)) && !defined(DBUG_OFF)
|
#if defined(FORCE_DBUG_OFF) && !defined(DBUG_OFF)
|
||||||
# define DBUG_OFF
|
# define DBUG_OFF
|
||||||
# ifdef DBUG_ON
|
# ifdef DBUG_ON
|
||||||
# undef DBUG_ON
|
# undef DBUG_ON
|
||||||
@@ -527,7 +520,7 @@ typedef int my_socket; /* File descriptor for sockets */
|
|||||||
#endif
|
#endif
|
||||||
/* Type for functions that handles signals */
|
/* Type for functions that handles signals */
|
||||||
#define sig_handler RETSIGTYPE
|
#define sig_handler RETSIGTYPE
|
||||||
#if defined(__GNUC__) && !defined(_lint)
|
#if defined(__GNUC__)
|
||||||
typedef char pchar; /* Mixed prototypes can take char */
|
typedef char pchar; /* Mixed prototypes can take char */
|
||||||
typedef char puchar; /* Mixed prototypes can take char */
|
typedef char puchar; /* Mixed prototypes can take char */
|
||||||
typedef char pbool; /* Mixed prototypes can take char */
|
typedef char pbool; /* Mixed prototypes can take char */
|
||||||
@@ -1035,7 +1028,7 @@ typedef ulong myf; /* Type of MyFlags in my_funcs */
|
|||||||
#define YESNO(X) ((X) ? "yes" : "no")
|
#define YESNO(X) ((X) ? "yes" : "no")
|
||||||
|
|
||||||
#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
|
#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
|
||||||
#define MY_HOW_OFTEN_TO_WRITE 10000 /* How often we want info on screen */
|
#define MY_HOW_OFTEN_TO_WRITE 100000 /* How often we want info on screen */
|
||||||
|
|
||||||
#include <my_byteorder.h>
|
#include <my_byteorder.h>
|
||||||
|
|
||||||
|
|||||||
@@ -154,12 +154,15 @@ char *guess_malloc_library();
|
|||||||
|
|
||||||
/* If we have our own safemalloc (for debugging) */
|
/* If we have our own safemalloc (for debugging) */
|
||||||
#if defined(SAFEMALLOC)
|
#if defined(SAFEMALLOC)
|
||||||
void sf_report_leaked_memory(my_thread_id id);
|
my_bool sf_report_leaked_memory(my_thread_id id);
|
||||||
int sf_sanity();
|
int sf_sanity();
|
||||||
|
my_bool sf_have_memory_leak();
|
||||||
extern my_thread_id (*sf_malloc_dbug_id)(void);
|
extern my_thread_id (*sf_malloc_dbug_id)(void);
|
||||||
#define SAFEMALLOC_REPORT_MEMORY(X) if (!sf_leaking_memory) sf_report_leaked_memory(X)
|
#define SAFEMALLOC_REPORT_MEMORY(X) if (!sf_leaking_memory) sf_report_leaked_memory(X)
|
||||||
|
#define SAFEMALLOC_HAVE_MEMORY_LEAK sf_have_memory_leak()
|
||||||
#else
|
#else
|
||||||
#define SAFEMALLOC_REPORT_MEMORY(X) do {} while(0)
|
#define SAFEMALLOC_REPORT_MEMORY(X) do {} while(0)
|
||||||
|
#define SAFEMALLOC_HAVE_MEMORY_LEAK 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef void (*MALLOC_SIZE_CB) (long long size, my_bool is_thread_specific);
|
typedef void (*MALLOC_SIZE_CB) (long long size, my_bool is_thread_specific);
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ typedef struct st_handler_check_param
|
|||||||
void (*init_repair_thread)(void *);
|
void (*init_repair_thread)(void *);
|
||||||
void *init_repair_thread_arg;
|
void *init_repair_thread_arg;
|
||||||
mysql_mutex_t print_msg_mutex;
|
mysql_mutex_t print_msg_mutex;
|
||||||
my_bool need_print_msg_lock;
|
my_bool need_print_msg_lock, status_reporting;
|
||||||
myf malloc_flags;
|
myf malloc_flags;
|
||||||
} HA_CHECK;
|
} HA_CHECK;
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ typedef struct st_plugin_vio_info
|
|||||||
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
||||||
MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
|
MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
|
||||||
int socket;
|
int socket;
|
||||||
|
int tls;
|
||||||
} MYSQL_PLUGIN_VIO_INFO;
|
} MYSQL_PLUGIN_VIO_INFO;
|
||||||
typedef struct st_plugin_vio
|
typedef struct st_plugin_vio
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <mysql/plugin.h>
|
#include <mysql/plugin.h>
|
||||||
|
|
||||||
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0202
|
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION 0x0203
|
||||||
|
|
||||||
#include <mysql/plugin_auth_common.h>
|
#include <mysql/plugin_auth_common.h>
|
||||||
|
|
||||||
|
|||||||
@@ -697,6 +697,7 @@ typedef struct st_plugin_vio_info
|
|||||||
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
enum { MYSQL_VIO_INVALID, MYSQL_VIO_TCP, MYSQL_VIO_SOCKET,
|
||||||
MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
|
MYSQL_VIO_PIPE, MYSQL_VIO_MEMORY } protocol;
|
||||||
int socket;
|
int socket;
|
||||||
|
int tls;
|
||||||
} MYSQL_PLUGIN_VIO_INFO;
|
} MYSQL_PLUGIN_VIO_INFO;
|
||||||
typedef struct st_plugin_vio
|
typedef struct st_plugin_vio
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -98,6 +98,7 @@ typedef struct st_plugin_vio_info
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HANDLE handle; /**< it's set, if the protocol is PIPE or MEMORY */
|
HANDLE handle; /**< it's set, if the protocol is PIPE or MEMORY */
|
||||||
#endif
|
#endif
|
||||||
|
int tls;
|
||||||
} MYSQL_PLUGIN_VIO_INFO;
|
} MYSQL_PLUGIN_VIO_INFO;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -775,7 +775,7 @@ inline_mysql_file_stat(
|
|||||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||||
struct PSI_file_locker *locker;
|
struct PSI_file_locker *locker;
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STAT, path, &locker);
|
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_STAT, path, NULL);
|
||||||
if (psi_likely(locker != NULL))
|
if (psi_likely(locker != NULL))
|
||||||
{
|
{
|
||||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||||
@@ -1025,7 +1025,7 @@ inline_mysql_file_create(
|
|||||||
struct PSI_file_locker *locker;
|
struct PSI_file_locker *locker;
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
|
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
|
||||||
&locker);
|
NULL);
|
||||||
if (psi_likely(locker != NULL))
|
if (psi_likely(locker != NULL))
|
||||||
{
|
{
|
||||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||||
@@ -1051,7 +1051,7 @@ inline_mysql_file_create_temp(
|
|||||||
struct PSI_file_locker *locker;
|
struct PSI_file_locker *locker;
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||||
(&state, key, PSI_FILE_CREATE, NULL, &locker);
|
(&state, key, PSI_FILE_CREATE, NULL, NULL);
|
||||||
if (psi_likely(locker != NULL))
|
if (psi_likely(locker != NULL))
|
||||||
{
|
{
|
||||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||||
@@ -1078,7 +1078,7 @@ inline_mysql_file_open(
|
|||||||
struct PSI_file_locker *locker;
|
struct PSI_file_locker *locker;
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
|
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename,
|
||||||
&locker);
|
NULL);
|
||||||
if (psi_likely(locker != NULL))
|
if (psi_likely(locker != NULL))
|
||||||
{
|
{
|
||||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||||
@@ -1298,7 +1298,7 @@ inline_mysql_file_delete(
|
|||||||
#ifdef HAVE_PSI_FILE_INTERFACE
|
#ifdef HAVE_PSI_FILE_INTERFACE
|
||||||
struct PSI_file_locker *locker;
|
struct PSI_file_locker *locker;
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, &locker);
|
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, name, NULL);
|
||||||
if (psi_likely(locker != NULL))
|
if (psi_likely(locker != NULL))
|
||||||
{
|
{
|
||||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||||
@@ -1324,7 +1324,7 @@ inline_mysql_file_rename(
|
|||||||
struct PSI_file_locker *locker;
|
struct PSI_file_locker *locker;
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||||
(&state, key, PSI_FILE_RENAME, from, &locker);
|
(&state, key, PSI_FILE_RENAME, from, NULL);
|
||||||
if (psi_likely(locker != NULL))
|
if (psi_likely(locker != NULL))
|
||||||
{
|
{
|
||||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||||
@@ -1352,7 +1352,7 @@ inline_mysql_file_create_with_symlink(
|
|||||||
struct PSI_file_locker *locker;
|
struct PSI_file_locker *locker;
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
|
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename,
|
||||||
&locker);
|
NULL);
|
||||||
if (psi_likely(locker != NULL))
|
if (psi_likely(locker != NULL))
|
||||||
{
|
{
|
||||||
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line);
|
||||||
@@ -1383,7 +1383,7 @@ inline_mysql_file_delete_with_symlink(
|
|||||||
struct PSI_file_locker *locker;
|
struct PSI_file_locker *locker;
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, fullname,
|
locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_DELETE, fullname,
|
||||||
&locker);
|
NULL);
|
||||||
if (psi_likely(locker != NULL))
|
if (psi_likely(locker != NULL))
|
||||||
{
|
{
|
||||||
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
PSI_FILE_CALL(start_file_close_wait)(locker, src_file, src_line);
|
||||||
@@ -1410,7 +1410,7 @@ inline_mysql_file_rename_with_symlink(
|
|||||||
struct PSI_file_locker *locker;
|
struct PSI_file_locker *locker;
|
||||||
PSI_file_locker_state state;
|
PSI_file_locker_state state;
|
||||||
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
locker= PSI_FILE_CALL(get_thread_file_name_locker)
|
||||||
(&state, key, PSI_FILE_RENAME, from, &locker);
|
(&state, key, PSI_FILE_RENAME, from, NULL);
|
||||||
if (psi_likely(locker != NULL))
|
if (psi_likely(locker != NULL))
|
||||||
{
|
{
|
||||||
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line);
|
||||||
|
|||||||
@@ -9,5 +9,6 @@ mariabackup,^
|
|||||||
roles,^
|
roles,^
|
||||||
auth_gssapi,^
|
auth_gssapi,^
|
||||||
query_response_time,^
|
query_response_time,^
|
||||||
|
mysql_sha2,^
|
||||||
rocksdb,^
|
rocksdb,^
|
||||||
sysschema
|
sysschema
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
if ($CLIENT_TLS_LIBRARY != "OpenSSL") {
|
if ($CLIENT_TLS_LIBRARY != "OpenSSL") {
|
||||||
if ($CLIENT_TLS_LIBRARY != "LibreSSL") {
|
if ($CLIENT_TLS_LIBRARY != "LibreSSL") {
|
||||||
skip "Test requires Connector/C with OpenSSL library";
|
skip Test requires Connector/C with OpenSSL library;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ my %debuggers = (
|
|||||||
options => '_RR_TRACE_DIR={log} rr record {exe} {args}',
|
options => '_RR_TRACE_DIR={log} rr record {exe} {args}',
|
||||||
run => 'env',
|
run => 'env',
|
||||||
pre => sub {
|
pre => sub {
|
||||||
|
push @::global_suppressions, qr/InnoDB: native AIO failed/;
|
||||||
::mtr_error('rr requires kernel.perf_event_paranoid <= 1')
|
::mtr_error('rr requires kernel.perf_event_paranoid <= 1')
|
||||||
if ::mtr_grab_file('/proc/sys/kernel/perf_event_paranoid') > 1;
|
if ::mtr_grab_file('/proc/sys/kernel/perf_event_paranoid') > 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ X
|
|||||||
"rows": 10000,
|
"rows": 10000,
|
||||||
"r_rows": 10000,
|
"r_rows": 10000,
|
||||||
"r_total_filtered": 100,
|
"r_total_filtered": 100,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": {
|
"r_engine_stats": {
|
||||||
"pages_accessed": "REPLACED",
|
"pages_accessed": "REPLACED",
|
||||||
"pages_updated": "REPLACED"
|
"pages_updated": "REPLACED"
|
||||||
@@ -106,7 +107,8 @@ X
|
|||||||
"rows": 10000,
|
"rows": 10000,
|
||||||
"r_rows": 10000,
|
"r_rows": 10000,
|
||||||
"r_total_filtered": 50,
|
"r_total_filtered": 50,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": {
|
"r_engine_stats": {
|
||||||
"pages_accessed": "REPLACED",
|
"pages_accessed": "REPLACED",
|
||||||
"pages_updated": "REPLACED"
|
"pages_updated": "REPLACED"
|
||||||
|
|||||||
@@ -431,7 +431,8 @@ ANALYZE
|
|||||||
"rows": 1000,
|
"rows": 1000,
|
||||||
"r_rows": 1000,
|
"r_rows": 1000,
|
||||||
"r_total_filtered": 100,
|
"r_total_filtered": 100,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": REPLACED,
|
"r_engine_stats": REPLACED,
|
||||||
"r_filtered": 100
|
"r_filtered": 100
|
||||||
}
|
}
|
||||||
@@ -499,7 +500,8 @@ ANALYZE
|
|||||||
"rows": 10,
|
"rows": 10,
|
||||||
"r_rows": 10,
|
"r_rows": 10,
|
||||||
"r_total_filtered": 50,
|
"r_total_filtered": 50,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": REPLACED,
|
"r_engine_stats": REPLACED,
|
||||||
"attached_condition": "t1.pk < 10 and t1.b > 4",
|
"attached_condition": "t1.pk < 10 and t1.b > 4",
|
||||||
"r_filtered": 50
|
"r_filtered": 50
|
||||||
@@ -1765,3 +1767,125 @@ ANALYZE
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
drop table t12,t13;
|
drop table t12,t13;
|
||||||
|
#
|
||||||
|
# MDEV-33309: ANALYZE FORMAT=JSON: UPDATE|DELETE don't show r_other_time_ms
|
||||||
|
#
|
||||||
|
create table t1 (pk int primary key, a int);
|
||||||
|
insert into t1 select seq, seq from seq_1_to_1000;
|
||||||
|
create table t2 like t1;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
# Top-level query block must have r_table_time_ms and r_other_time_ms
|
||||||
|
analyze format=json
|
||||||
|
update t1 set a=a+1
|
||||||
|
where t1.pk > (select max(a) from t2 where t2.pk+1 = t1.pk+1 ) - 10;
|
||||||
|
ANALYZE
|
||||||
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
|
"query_block": {
|
||||||
|
"select_id": 1,
|
||||||
|
"r_total_time_ms": "REPLACED",
|
||||||
|
"table": {
|
||||||
|
"update": 1,
|
||||||
|
"table_name": "t1",
|
||||||
|
"access_type": "ALL",
|
||||||
|
"rows": 1000,
|
||||||
|
"r_rows": 1000,
|
||||||
|
"r_total_filtered": 100,
|
||||||
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
|
"r_engine_stats": REPLACED,
|
||||||
|
"attached_condition": "t1.pk > (subquery#2) - 10",
|
||||||
|
"r_filtered": 100
|
||||||
|
},
|
||||||
|
"subqueries": [
|
||||||
|
{
|
||||||
|
"query_block": {
|
||||||
|
"select_id": 2,
|
||||||
|
"cost": "REPLACED",
|
||||||
|
"r_loops": 1000,
|
||||||
|
"r_total_time_ms": "REPLACED",
|
||||||
|
"nested_loop": [
|
||||||
|
{
|
||||||
|
"table": {
|
||||||
|
"table_name": "t2",
|
||||||
|
"access_type": "ALL",
|
||||||
|
"loops": 1,
|
||||||
|
"r_loops": 1000,
|
||||||
|
"rows": 1000,
|
||||||
|
"r_rows": 1000,
|
||||||
|
"cost": "REPLACED",
|
||||||
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
|
"r_engine_stats": REPLACED,
|
||||||
|
"filtered": 100,
|
||||||
|
"r_total_filtered": 0.1,
|
||||||
|
"attached_condition": "t2.pk + 1 = t1.pk + 1",
|
||||||
|
"r_filtered": 0.1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# Top-level query block must have r_table_time_ms and r_other_time_ms
|
||||||
|
analyze format=json
|
||||||
|
delete from t1
|
||||||
|
where t1.pk > (select max(a) from t2 where t2.pk+1 = t1.pk+1 ) - 10;
|
||||||
|
ANALYZE
|
||||||
|
{
|
||||||
|
"query_optimization": {
|
||||||
|
"r_total_time_ms": "REPLACED"
|
||||||
|
},
|
||||||
|
"query_block": {
|
||||||
|
"select_id": 1,
|
||||||
|
"r_total_time_ms": "REPLACED",
|
||||||
|
"table": {
|
||||||
|
"delete": 1,
|
||||||
|
"table_name": "t1",
|
||||||
|
"access_type": "ALL",
|
||||||
|
"rows": 1000,
|
||||||
|
"r_rows": 1000,
|
||||||
|
"r_total_filtered": 100,
|
||||||
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
|
"r_engine_stats": REPLACED,
|
||||||
|
"attached_condition": "t1.pk > (subquery#2) - 10",
|
||||||
|
"r_filtered": 100
|
||||||
|
},
|
||||||
|
"subqueries": [
|
||||||
|
{
|
||||||
|
"query_block": {
|
||||||
|
"select_id": 2,
|
||||||
|
"cost": "REPLACED",
|
||||||
|
"r_loops": 1000,
|
||||||
|
"r_total_time_ms": "REPLACED",
|
||||||
|
"nested_loop": [
|
||||||
|
{
|
||||||
|
"table": {
|
||||||
|
"table_name": "t2",
|
||||||
|
"access_type": "ALL",
|
||||||
|
"loops": 1,
|
||||||
|
"r_loops": 1000,
|
||||||
|
"rows": 1000,
|
||||||
|
"r_rows": 1000,
|
||||||
|
"cost": "REPLACED",
|
||||||
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
|
"r_engine_stats": REPLACED,
|
||||||
|
"filtered": 100,
|
||||||
|
"r_total_filtered": 0.1,
|
||||||
|
"attached_condition": "t2.pk + 1 = t1.pk + 1",
|
||||||
|
"r_filtered": 0.1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
drop table t1, t2;
|
||||||
|
|||||||
@@ -346,3 +346,26 @@ analyze format=json select * from t13,t12 where t13.b between 1 and 2 and t12.a=
|
|||||||
between 400 and 450 and t12.b like '%f%';
|
between 400 and 450 and t12.b like '%f%';
|
||||||
|
|
||||||
drop table t12,t13;
|
drop table t12,t13;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-33309: ANALYZE FORMAT=JSON: UPDATE|DELETE don't show r_other_time_ms
|
||||||
|
--echo #
|
||||||
|
--source include/have_sequence.inc
|
||||||
|
create table t1 (pk int primary key, a int);
|
||||||
|
insert into t1 select seq, seq from seq_1_to_1000;
|
||||||
|
create table t2 like t1;
|
||||||
|
insert into t2 select * from t1;
|
||||||
|
|
||||||
|
--echo # Top-level query block must have r_table_time_ms and r_other_time_ms
|
||||||
|
--source include/analyze-format.inc
|
||||||
|
analyze format=json
|
||||||
|
update t1 set a=a+1
|
||||||
|
where t1.pk > (select max(a) from t2 where t2.pk+1 = t1.pk+1 ) - 10;
|
||||||
|
|
||||||
|
--echo # Top-level query block must have r_table_time_ms and r_other_time_ms
|
||||||
|
--source include/analyze-format.inc
|
||||||
|
analyze format=json
|
||||||
|
delete from t1
|
||||||
|
where t1.pk > (select max(a) from t2 where t2.pk+1 = t1.pk+1 ) - 10;
|
||||||
|
|
||||||
|
drop table t1, t2;
|
||||||
|
|||||||
@@ -55,7 +55,8 @@ ANALYZE
|
|||||||
"rows": 10000,
|
"rows": 10000,
|
||||||
"r_rows": 10000,
|
"r_rows": 10000,
|
||||||
"r_total_filtered": 100,
|
"r_total_filtered": 100,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": REPLACED,
|
"r_engine_stats": REPLACED,
|
||||||
"r_filtered": 100
|
"r_filtered": 100
|
||||||
}
|
}
|
||||||
@@ -112,7 +113,8 @@ ANALYZE
|
|||||||
"rows": 9,
|
"rows": 9,
|
||||||
"r_rows": 10,
|
"r_rows": 10,
|
||||||
"r_total_filtered": 100,
|
"r_total_filtered": 100,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": REPLACED,
|
"r_engine_stats": REPLACED,
|
||||||
"attached_condition": "t2.a < 10",
|
"attached_condition": "t2.a < 10",
|
||||||
"r_filtered": 100
|
"r_filtered": 100
|
||||||
@@ -167,7 +169,8 @@ ANALYZE
|
|||||||
"rows": 10000,
|
"rows": 10000,
|
||||||
"r_rows": 10000,
|
"r_rows": 10000,
|
||||||
"r_total_filtered": 100,
|
"r_total_filtered": 100,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": REPLACED,
|
"r_engine_stats": REPLACED,
|
||||||
"r_filtered": 100
|
"r_filtered": 100
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
--source include/long_test.inc
|
--source include/long_test.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/have_metadata_lock_info.inc
|
--source include/have_metadata_lock_info.inc
|
||||||
|
--source include/have_profiling.inc
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
--source include/no_view_protocol.inc
|
--source include/no_view_protocol.inc
|
||||||
|
|
||||||
|
|||||||
@@ -6057,3 +6057,10 @@ b rank() over (order by c)
|
|||||||
drop view v1;
|
drop view v1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
# End of 10.4 tests
|
# End of 10.4 tests
|
||||||
|
#
|
||||||
|
# MDEV-32308: Server crash on cleanup of
|
||||||
|
# non-fully-constructed-due-to-an-error CTE
|
||||||
|
#
|
||||||
|
SELECT ( WITH RECURSIVE x AS ( WITH x AS ( SELECT 1 FROM t14 ) SELECT x ) , t14 AS ( SELECT 1 UNION SELECT 'x' FROM x ) SELECT x FROM x WHERE ( SELECT x FROM x ) ) ;
|
||||||
|
ERROR 42S22: Unknown column 'x' in 'SELECT'
|
||||||
|
# End of 10.6 tests
|
||||||
|
|||||||
@@ -4059,3 +4059,12 @@ drop view v1;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
--echo # End of 10.4 tests
|
--echo # End of 10.4 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-32308: Server crash on cleanup of
|
||||||
|
--echo # non-fully-constructed-due-to-an-error CTE
|
||||||
|
--echo #
|
||||||
|
--error ER_BAD_FIELD_ERROR
|
||||||
|
SELECT ( WITH RECURSIVE x AS ( WITH x AS ( SELECT 1 FROM t14 ) SELECT x ) , t14 AS ( SELECT 1 UNION SELECT 'x' FROM x ) SELECT x FROM x WHERE ( SELECT x FROM x ) ) ;
|
||||||
|
|
||||||
|
--echo # End of 10.6 tests
|
||||||
|
|||||||
@@ -174,8 +174,8 @@ LPAD(_ucs2 X'0420',10,_ucs2 X'04210422')
|
|||||||
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
|
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
|
||||||
LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423')
|
LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423')
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
SELECT LPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
|
SELECT LPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423') AS res;
|
||||||
LPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423')
|
res
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'0421');
|
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'0421');
|
||||||
RPAD(_ucs2 X'0420',10,_ucs2 X'0421')
|
RPAD(_ucs2 X'0420',10,_ucs2 X'0421')
|
||||||
@@ -186,8 +186,8 @@ RPAD(_ucs2 X'0420',10,_ucs2 X'04210422')
|
|||||||
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
|
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
|
||||||
RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423')
|
RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423')
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
SELECT RPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
|
SELECT RPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423') AS res;
|
||||||
RPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423')
|
res
|
||||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
CREATE TABLE t1 SELECT
|
CREATE TABLE t1 SELECT
|
||||||
LPAD(_ucs2 X'0420',10,_ucs2 X'0421') l,
|
LPAD(_ucs2 X'0420',10,_ucs2 X'0421') l,
|
||||||
|
|||||||
@@ -51,12 +51,12 @@ DROP TABLE t1;
|
|||||||
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'0421');
|
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'0421');
|
||||||
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'04210422');
|
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'04210422');
|
||||||
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
|
SELECT LPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
|
||||||
SELECT LPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
|
SELECT LPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423') AS res;
|
||||||
|
|
||||||
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'0421');
|
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'0421');
|
||||||
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'04210422');
|
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'04210422');
|
||||||
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
|
SELECT RPAD(_ucs2 X'0420',10,_ucs2 X'042104220423');
|
||||||
SELECT RPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
|
SELECT RPAD(_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423') AS res;
|
||||||
|
|
||||||
CREATE TABLE t1 SELECT
|
CREATE TABLE t1 SELECT
|
||||||
LPAD(_ucs2 X'0420',10,_ucs2 X'0421') l,
|
LPAD(_ucs2 X'0420',10,_ucs2 X'0421') l,
|
||||||
@@ -118,6 +118,7 @@ SET NAMES koi8r;
|
|||||||
SET character_set_connection=ucs2;
|
SET character_set_connection=ucs2;
|
||||||
--source include/ctype_like.inc
|
--source include/ctype_like.inc
|
||||||
|
|
||||||
|
--disable_service_connection
|
||||||
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ucs2);
|
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ucs2);
|
||||||
INSERT INTO t1 VALUES ('<27><><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD>');
|
INSERT INTO t1 VALUES ('<27><><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD>');
|
||||||
INSERT INTO t1 VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
INSERT INTO t1 VALUES ('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'),('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>');
|
||||||
@@ -127,6 +128,7 @@ SELECT * FROM t1 WHERE a LIKE '%
|
|||||||
SELECT * FROM t1 WHERE a LIKE '%<25><><EFBFBD>%';
|
SELECT * FROM t1 WHERE a LIKE '%<25><><EFBFBD>%';
|
||||||
SELECT * FROM t1 WHERE a LIKE '<27><><EFBFBD><EFBFBD>%';
|
SELECT * FROM t1 WHERE a LIKE '<27><><EFBFBD><EFBFBD>%';
|
||||||
SELECT * FROM t1 WHERE a LIKE '<27><><EFBFBD><EFBFBD>%' COLLATE ucs2_bin;
|
SELECT * FROM t1 WHERE a LIKE '<27><><EFBFBD><EFBFBD>%' COLLATE ucs2_bin;
|
||||||
|
--enable_service_connection
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -320,30 +320,3 @@ SHOW VARIABLES LIKE 'DEBUG_SYNC';
|
|||||||
Variable_name Value
|
Variable_name Value
|
||||||
debug_sync ON - current signals: 's2,s7,s1,s5'
|
debug_sync ON - current signals: 's2,s7,s1,s5'
|
||||||
SET DEBUG_SYNC= 'RESET';
|
SET DEBUG_SYNC= 'RESET';
|
||||||
#
|
|
||||||
# MDEV-30364 Assertion MDL_EXCLUSIVE on DISCARD TABLESPACE in LOCK TABLE mode
|
|
||||||
#
|
|
||||||
create table t (c int) engine=innodb;
|
|
||||||
connect con1,localhost,root;
|
|
||||||
set debug_sync='get_schema_column WAIT_FOR go';
|
|
||||||
select column_name from information_schema.columns
|
|
||||||
where table_schema='test' and table_name='t';
|
|
||||||
connection default;
|
|
||||||
lock table t write;
|
|
||||||
alter table t discard tablespace;
|
|
||||||
connect con2,localhost,root;
|
|
||||||
disconnect con2;
|
|
||||||
connection default;
|
|
||||||
ERROR 70100: Query execution was interrupted
|
|
||||||
set debug_sync='now SIGNAL go';
|
|
||||||
connection con1;
|
|
||||||
column_name
|
|
||||||
c
|
|
||||||
disconnect con1;
|
|
||||||
connection default;
|
|
||||||
unlock tables;
|
|
||||||
drop table t;
|
|
||||||
set debug_sync= 'reset';
|
|
||||||
#
|
|
||||||
# End of 10.6 tests
|
|
||||||
#
|
|
||||||
|
|||||||
@@ -448,43 +448,3 @@ SHOW VARIABLES LIKE 'DEBUG_SYNC';
|
|||||||
# Otherwise signal would confuse the next test.
|
# Otherwise signal would confuse the next test.
|
||||||
#
|
#
|
||||||
SET DEBUG_SYNC= 'RESET';
|
SET DEBUG_SYNC= 'RESET';
|
||||||
|
|
||||||
--echo #
|
|
||||||
--echo # MDEV-30364 Assertion MDL_EXCLUSIVE on DISCARD TABLESPACE in LOCK TABLE mode
|
|
||||||
--echo #
|
|
||||||
create table t (c int) engine=innodb;
|
|
||||||
--connect con1,localhost,root
|
|
||||||
set debug_sync='get_schema_column WAIT_FOR go';
|
|
||||||
send select column_name from information_schema.columns
|
|
||||||
where table_schema='test' and table_name='t';
|
|
||||||
|
|
||||||
--connection default
|
|
||||||
let $wait_condition=select 1 from information_schema.processlist where state like 'debug sync point%';
|
|
||||||
--source include/wait_condition.inc
|
|
||||||
let $connid=`select connection_id()`;
|
|
||||||
lock table t write;
|
|
||||||
send alter table t discard tablespace;
|
|
||||||
|
|
||||||
--connect con2,localhost,root
|
|
||||||
--disable_query_log
|
|
||||||
--eval kill query $connid
|
|
||||||
--enable_query_log
|
|
||||||
--disconnect con2
|
|
||||||
|
|
||||||
--connection default
|
|
||||||
--error ER_QUERY_INTERRUPTED
|
|
||||||
reap;
|
|
||||||
set debug_sync='now SIGNAL go';
|
|
||||||
|
|
||||||
--connection con1
|
|
||||||
reap;
|
|
||||||
--disconnect con1
|
|
||||||
|
|
||||||
--connection default
|
|
||||||
unlock tables;
|
|
||||||
drop table t;
|
|
||||||
set debug_sync= 'reset';
|
|
||||||
|
|
||||||
--echo #
|
|
||||||
--echo # End of 10.6 tests
|
|
||||||
--echo #
|
|
||||||
|
|||||||
@@ -1001,6 +1001,41 @@ id select_type table type possible_keys key key_len ref rows Extra
|
|||||||
2 DERIVED t10 index grp_id grp_id 5 NULL 10000 Using index; Using temporary; Using filesort
|
2 DERIVED t10 index grp_id grp_id 5 NULL 10000 Using index; Using temporary; Using filesort
|
||||||
drop table t1,t2, t10;
|
drop table t1,t2, t10;
|
||||||
drop view v1;
|
drop view v1;
|
||||||
|
#
|
||||||
|
# MDEV-37407 Wrong result with LATERAL DERIVED
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
a int NOT NULL,
|
||||||
|
b int default null,
|
||||||
|
amount decimal DEFAULT NULL,
|
||||||
|
KEY t1_IDX (a,b) USING BTREE
|
||||||
|
) ENGINE=INNODB;
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
a int NOT NULL,
|
||||||
|
b int default null,
|
||||||
|
name varchar(50) DEFAULT NULL,
|
||||||
|
KEY t2_IDX (a,b) USING BTREE
|
||||||
|
) ENGINE=INNODB;
|
||||||
|
INSERT INTO t1 VALUES
|
||||||
|
(1, NULL, 10.0000), (2, 2, 20.0000), (3, 3, 30.0000), (4, 4, 40.0000),
|
||||||
|
(5, 5, NULL), (6, 6, NULL), (7, 7, 70.0000), (8, 8, 80.0000);
|
||||||
|
INSERT INTO t2 VALUES
|
||||||
|
(1, NULL, 'A'), (2,2, 'B'), (3,3, 'C'), (4,4, 'D'), (5,5, NULL), (6,6, NULL),
|
||||||
|
(7,7, 'E'), (8,8, 'F'), (9,9, 'G'), (10,10,'H'), (11,11, NULL), (12,12, NULL);
|
||||||
|
# Must use Split-Materialized:
|
||||||
|
explain $query;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 PRIMARY t2 range t2_IDX t2_IDX 4 NULL 1 Using index condition
|
||||||
|
1 PRIMARY <derived2> ref key0 key0 10 test.t2.a,test.t2.b 1 Using where
|
||||||
|
2 LATERAL DERIVED t1 ref t1_IDX t1_IDX 9 test.t2.a,test.t2.b 1 Using index condition
|
||||||
|
$query;
|
||||||
|
a b name total_amt
|
||||||
|
1 NULL A 10
|
||||||
|
# Compare with correct result:
|
||||||
|
set statement optimizer_switch='split_materialized=off' for $query;
|
||||||
|
a b name total_amt
|
||||||
|
1 NULL A 10
|
||||||
|
DROP TABLE t1,t2;
|
||||||
# End of 10.11 tests
|
# End of 10.11 tests
|
||||||
#
|
#
|
||||||
# MDEV-37057 Wrong result with LATERAL DERIVED
|
# MDEV-37057 Wrong result with LATERAL DERIVED
|
||||||
|
|||||||
@@ -590,6 +590,48 @@ where
|
|||||||
drop table t1,t2, t10;
|
drop table t1,t2, t10;
|
||||||
drop view v1;
|
drop view v1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-37407 Wrong result with LATERAL DERIVED
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
a int NOT NULL,
|
||||||
|
b int default null,
|
||||||
|
amount decimal DEFAULT NULL,
|
||||||
|
KEY t1_IDX (a,b) USING BTREE
|
||||||
|
) ENGINE=INNODB;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
a int NOT NULL,
|
||||||
|
b int default null,
|
||||||
|
name varchar(50) DEFAULT NULL,
|
||||||
|
KEY t2_IDX (a,b) USING BTREE
|
||||||
|
) ENGINE=INNODB;
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES
|
||||||
|
(1, NULL, 10.0000), (2, 2, 20.0000), (3, 3, 30.0000), (4, 4, 40.0000),
|
||||||
|
(5, 5, NULL), (6, 6, NULL), (7, 7, 70.0000), (8, 8, 80.0000);
|
||||||
|
|
||||||
|
INSERT INTO t2 VALUES
|
||||||
|
(1, NULL, 'A'), (2,2, 'B'), (3,3, 'C'), (4,4, 'D'), (5,5, NULL), (6,6, NULL),
|
||||||
|
(7,7, 'E'), (8,8, 'F'), (9,9, 'G'), (10,10,'H'), (11,11, NULL), (12,12, NULL);
|
||||||
|
|
||||||
|
let $query=
|
||||||
|
SELECT t2.a,t2.b,t2.name,t.total_amt FROM t2
|
||||||
|
LEFT JOIN
|
||||||
|
(
|
||||||
|
SELECT a, b, sum(amount) total_amt FROM t1 GROUP BY a, b
|
||||||
|
) AS t ON t2.a=t.a and t2.b<=>t.b
|
||||||
|
WHERE t2.a < 2;
|
||||||
|
|
||||||
|
--echo # Must use Split-Materialized:
|
||||||
|
evalp explain $query;
|
||||||
|
evalp $query;
|
||||||
|
--echo # Compare with correct result:
|
||||||
|
evalp set statement optimizer_switch='split_materialized=off' for $query;
|
||||||
|
|
||||||
|
DROP TABLE t1,t2;
|
||||||
|
|
||||||
--echo # End of 10.11 tests
|
--echo # End of 10.11 tests
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
|||||||
@@ -81,7 +81,8 @@ ANALYZE
|
|||||||
"rows": 10,
|
"rows": 10,
|
||||||
"r_rows": 10,
|
"r_rows": 10,
|
||||||
"r_total_filtered": 30,
|
"r_total_filtered": 30,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": REPLACED,
|
"r_engine_stats": REPLACED,
|
||||||
"attached_condition": "t1.a in (2,3,4)",
|
"attached_condition": "t1.a in (2,3,4)",
|
||||||
"r_filtered": 30
|
"r_filtered": 30
|
||||||
@@ -106,7 +107,8 @@ ANALYZE
|
|||||||
"rows": 10,
|
"rows": 10,
|
||||||
"r_rows": 10,
|
"r_rows": 10,
|
||||||
"r_total_filtered": 0,
|
"r_total_filtered": 0,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": REPLACED,
|
"r_engine_stats": REPLACED,
|
||||||
"attached_condition": "t1.a in (20,30,40)",
|
"attached_condition": "t1.a in (20,30,40)",
|
||||||
"r_filtered": 0
|
"r_filtered": 0
|
||||||
|
|||||||
@@ -2691,6 +2691,30 @@ NULL
|
|||||||
SET @@collation_connection= @save_collation_connection;
|
SET @@collation_connection= @save_collation_connection;
|
||||||
# End of 10.9 Test
|
# End of 10.9 Test
|
||||||
#
|
#
|
||||||
|
# MDEV-30691 Assertion `strlen(Ptr) == str_length' failed in void Binary_string::chop()
|
||||||
|
#
|
||||||
|
set @@collation_connection=utf32_czech_ci;
|
||||||
|
select json_detailed('[[123],456]');
|
||||||
|
json_detailed('[[123],456]')
|
||||||
|
[
|
||||||
|
[123],
|
||||||
|
456
|
||||||
|
]
|
||||||
|
set @@collation_connection=@save_collation_connection;
|
||||||
|
select json_detailed('[[123],456]');
|
||||||
|
json_detailed('[[123],456]')
|
||||||
|
[
|
||||||
|
[123],
|
||||||
|
456
|
||||||
|
]
|
||||||
|
#
|
||||||
|
# MDEV-37428 JSON_VALUE returns NULL for a key with an empty string value rather than an empty string
|
||||||
|
#
|
||||||
|
SELECT JSON_VALUE(JSON_OBJECT("a", ""), '$.a') = "" AS not_null;
|
||||||
|
not_null
|
||||||
|
1
|
||||||
|
# End of 10.11 Test
|
||||||
|
#
|
||||||
# MDEV-32007: JSON_VALUE and JSON_EXTRACT doesn't handle dash (-)
|
# MDEV-32007: JSON_VALUE and JSON_EXTRACT doesn't handle dash (-)
|
||||||
# as first character in key
|
# as first character in key
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -1949,9 +1949,24 @@ SELECT JSON_VALUE(@json,'$.A[last-1][last-1].key1');
|
|||||||
|
|
||||||
SET @@collation_connection= @save_collation_connection;
|
SET @@collation_connection= @save_collation_connection;
|
||||||
|
|
||||||
|
|
||||||
--echo # End of 10.9 Test
|
--echo # End of 10.9 Test
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-30691 Assertion `strlen(Ptr) == str_length' failed in void Binary_string::chop()
|
||||||
|
--echo #
|
||||||
|
set @@collation_connection=utf32_czech_ci;
|
||||||
|
select json_detailed('[[123],456]');
|
||||||
|
set @@collation_connection=@save_collation_connection;
|
||||||
|
select json_detailed('[[123],456]');
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-37428 JSON_VALUE returns NULL for a key with an empty string value rather than an empty string
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SELECT JSON_VALUE(JSON_OBJECT("a", ""), '$.a') = "" AS not_null;
|
||||||
|
|
||||||
|
--echo # End of 10.11 Test
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-32007: JSON_VALUE and JSON_EXTRACT doesn't handle dash (-)
|
--echo # MDEV-32007: JSON_VALUE and JSON_EXTRACT doesn't handle dash (-)
|
||||||
--echo # as first character in key
|
--echo # as first character in key
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# This test uses grants, which can't get tested for embedded server
|
# This test uses grants, which can't get tested for embedded server
|
||||||
-- source include/not_embedded.inc
|
-- source include/not_embedded.inc
|
||||||
-- source include/have_perfschema.inc
|
-- source include/have_perfschema.inc
|
||||||
|
-- source include/have_profiling.inc
|
||||||
|
|
||||||
# check that CSV engine was compiled in, as the result of the test depends
|
# check that CSV engine was compiled in, as the result of the test depends
|
||||||
# on the presence of the log tables (which are CSV-based).
|
# on the presence of the log tables (which are CSV-based).
|
||||||
|
|||||||
@@ -843,3 +843,11 @@ insert into t (a) values (1);
|
|||||||
update t set a=2;
|
update t set a=2;
|
||||||
drop table t;
|
drop table t;
|
||||||
# End of 10.6 tests
|
# End of 10.6 tests
|
||||||
|
#
|
||||||
|
# MDEV-37404 InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON
|
||||||
|
#
|
||||||
|
create table t(c int primary key, c2 blob unique) engine=innodb;
|
||||||
|
insert into t values (0, '');
|
||||||
|
replace into t values (0, '123');
|
||||||
|
drop table t;
|
||||||
|
# End of 10.11 tests
|
||||||
|
|||||||
@@ -767,3 +767,13 @@ update t set a=2;
|
|||||||
drop table t;
|
drop table t;
|
||||||
|
|
||||||
--echo # End of 10.6 tests
|
--echo # End of 10.6 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-37404 InnoDB: Failing assertion: node->pcur->rel_pos == BTR_PCUR_ON
|
||||||
|
--echo #
|
||||||
|
create table t(c int primary key, c2 blob unique) engine=innodb;
|
||||||
|
insert into t values (0, '');
|
||||||
|
replace into t values (0, '123');
|
||||||
|
drop table t;
|
||||||
|
|
||||||
|
--echo # End of 10.11 tests
|
||||||
|
|||||||
@@ -3046,3 +3046,23 @@ disconnect con1;
|
|||||||
connection default;
|
connection default;
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
SET debug_sync='reset';
|
SET debug_sync='reset';
|
||||||
|
#
|
||||||
|
# MDEV-30364 Assertion MDL_EXCLUSIVE on DISCARD TABLESPACE in LOCK TABLE mode
|
||||||
|
#
|
||||||
|
create table t (c int) engine=innodb;
|
||||||
|
set debug_sync='get_schema_column SIGNAL waiting WAIT_FOR go';
|
||||||
|
select column_name from information_schema.columns
|
||||||
|
where table_schema='test' and table_name='t';
|
||||||
|
connect con1,localhost,root;
|
||||||
|
set debug_sync= 'now WAIT_FOR waiting';
|
||||||
|
lock table t write;
|
||||||
|
set statement lock_wait_timeout=0 for alter table t discard tablespace;
|
||||||
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
unlock tables;
|
||||||
|
set debug_sync='now SIGNAL go';
|
||||||
|
disconnect con1;
|
||||||
|
connection default;
|
||||||
|
column_name
|
||||||
|
c
|
||||||
|
drop table t;
|
||||||
|
set debug_sync= 'reset';
|
||||||
|
|||||||
@@ -4062,6 +4062,29 @@ connection default;
|
|||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
SET debug_sync='reset';
|
SET debug_sync='reset';
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-30364 Assertion MDL_EXCLUSIVE on DISCARD TABLESPACE in LOCK TABLE mode
|
||||||
|
--echo #
|
||||||
|
create table t (c int) engine=innodb;
|
||||||
|
set debug_sync='get_schema_column SIGNAL waiting WAIT_FOR go';
|
||||||
|
send select column_name from information_schema.columns
|
||||||
|
where table_schema='test' and table_name='t';
|
||||||
|
|
||||||
|
--connect con1,localhost,root
|
||||||
|
set debug_sync= 'now WAIT_FOR waiting';
|
||||||
|
lock table t write;
|
||||||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
|
set statement lock_wait_timeout=0 for alter table t discard tablespace;
|
||||||
|
unlock tables;
|
||||||
|
set debug_sync='now SIGNAL go';
|
||||||
|
--disconnect con1
|
||||||
|
|
||||||
|
--connection default
|
||||||
|
reap;
|
||||||
|
drop table t;
|
||||||
|
set debug_sync= 'reset';
|
||||||
|
|
||||||
# Check that all connections opened by test cases in this file are really
|
# Check that all connections opened by test cases in this file are really
|
||||||
# gone so execution of other tests won't be affected by their presence.
|
# gone so execution of other tests won't be affected by their presence.
|
||||||
--source include/wait_until_count_sessions.inc
|
--source include/wait_until_count_sessions.inc
|
||||||
|
|||||||
@@ -499,7 +499,10 @@ The following specify which files/extra groups are read (specified before remain
|
|||||||
the only option you need for specifying log files. Sets
|
the only option you need for specifying log files. Sets
|
||||||
names for --log-bin, --log-bin-index, --relay-log,
|
names for --log-bin, --log-bin-index, --relay-log,
|
||||||
--relay-log-index, --general-log-file,
|
--relay-log-index, --general-log-file,
|
||||||
--log-slow-query-file, --log-error-file, and --pid-file
|
--log-slow-query-file, --log-error-file, and --pid-file.
|
||||||
|
If log-basename includes a path, the path will apply for
|
||||||
|
all above variables except pid-file that will use it
|
||||||
|
without the path
|
||||||
--log-bin[=name] Log update queries in binary format. Optional argument
|
--log-bin[=name] Log update queries in binary format. Optional argument
|
||||||
should be name for binary log. If not given
|
should be name for binary log. If not given
|
||||||
'datadir'/'log-basename'-bin or 'datadir'/mysql-bin will
|
'datadir'/'log-basename'-bin or 'datadir'/mysql-bin will
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ perl;
|
|||||||
test-sql-discovery query-cache-info password-reuse-check
|
test-sql-discovery query-cache-info password-reuse-check
|
||||||
query-response-time metadata-lock-info locales unix-socket
|
query-response-time metadata-lock-info locales unix-socket
|
||||||
wsrep file-key-management cracklib-password-check user-variables
|
wsrep file-key-management cracklib-password-check user-variables
|
||||||
provider-bzip2 provider-lzma provider-lzo
|
provider-bzip2 provider-lzma provider-lzo caching-sha2-password
|
||||||
thread-pool-groups thread-pool-queues thread-pool-stats
|
thread-pool-groups thread-pool-queues thread-pool-stats
|
||||||
thread-pool-waits hashicorp provider gssapi parsec/;
|
thread-pool-waits hashicorp provider gssapi parsec/;
|
||||||
|
|
||||||
|
|||||||
@@ -6967,6 +6967,52 @@ drop view `v'1"2`;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
# End of 10.5 tests
|
# End of 10.5 tests
|
||||||
#
|
#
|
||||||
|
# MDEV-37483 mariadb-dump -T doesn't convert table names
|
||||||
|
#
|
||||||
|
create database foo;
|
||||||
|
use foo;
|
||||||
|
create table `con_schöne_grüße` (a int) select 1 as a;
|
||||||
|
create table `con` (b int) select 2 as b;
|
||||||
|
create table `con/bar` (c int) select 3 as c;
|
||||||
|
create table `con@fame` (d int) select 4 as d;
|
||||||
|
drop database foo;
|
||||||
|
use test;
|
||||||
|
con@002fbar.sql
|
||||||
|
con@002fbar.txt
|
||||||
|
con@@@.sql
|
||||||
|
con@@@.txt
|
||||||
|
con@fame.sql
|
||||||
|
con@fame.txt
|
||||||
|
con_sch@1ine_gr@1o@1je.sql
|
||||||
|
con_sch@1ine_gr@1o@1je.txt
|
||||||
|
show tables;
|
||||||
|
Tables_in_test
|
||||||
|
con
|
||||||
|
con/bar
|
||||||
|
con@fame
|
||||||
|
con_schöne_grüße
|
||||||
|
test.con: Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
|
||||||
|
test.con/bar: Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
|
||||||
|
test.con_schöne_grüße: Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
|
||||||
|
test.con@fame: Records: 1 Deleted: 0 Skipped: 0 Warnings: 0
|
||||||
|
select * from `con_schöne_grüße`;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
select * from `con`;
|
||||||
|
b
|
||||||
|
2
|
||||||
|
select * from `con/bar`;
|
||||||
|
c
|
||||||
|
3
|
||||||
|
select * from `con@fame`;
|
||||||
|
d
|
||||||
|
4
|
||||||
|
drop table `con_schöne_grüße`;
|
||||||
|
drop table `con`;
|
||||||
|
drop table `con/bar`;
|
||||||
|
drop table `con@fame`;
|
||||||
|
# End of 10.6 tests
|
||||||
|
#
|
||||||
# MDEV-16733 mysqldump --tab and --xml options are conflicting
|
# MDEV-16733 mysqldump --tab and --xml options are conflicting
|
||||||
#
|
#
|
||||||
mariadb-dump: --xml can't be used with --tab or --dir.
|
mariadb-dump: --xml can't be used with --tab or --dir.
|
||||||
|
|||||||
@@ -3043,6 +3043,42 @@ drop table t1;
|
|||||||
|
|
||||||
--echo # End of 10.5 tests
|
--echo # End of 10.5 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-37483 mariadb-dump -T doesn't convert table names
|
||||||
|
--echo #
|
||||||
|
create database foo;
|
||||||
|
use foo;
|
||||||
|
|
||||||
|
create table `con_schöne_grüße` (a int) select 1 as a;
|
||||||
|
create table `con` (b int) select 2 as b;
|
||||||
|
create table `con/bar` (c int) select 3 as c;
|
||||||
|
create table `con@fame` (d int) select 4 as d;
|
||||||
|
exec $MYSQL_DUMP foo --tab $MYSQLTEST_VARDIR/tmp;
|
||||||
|
drop database foo;
|
||||||
|
use test;
|
||||||
|
move_file $MYSQLTEST_VARDIR/tmp/con@0040fame.sql $MYSQLTEST_VARDIR/tmp/con@fame.sql;
|
||||||
|
move_file $MYSQLTEST_VARDIR/tmp/con@0040fame.txt $MYSQLTEST_VARDIR/tmp/con@fame.txt;
|
||||||
|
list_files $MYSQLTEST_VARDIR/tmp con*;
|
||||||
|
exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/con@@@.sql;
|
||||||
|
exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/con@002fbar.sql;
|
||||||
|
exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/con_sch@1ine_gr@1o@1je.sql;
|
||||||
|
exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/con@fame.sql;
|
||||||
|
show tables;
|
||||||
|
exec $MYSQL_IMPORT test $MYSQLTEST_VARDIR/tmp/con@@@.txt;
|
||||||
|
exec $MYSQL_IMPORT test $MYSQLTEST_VARDIR/tmp/con@002fbar.txt;
|
||||||
|
exec $MYSQL_IMPORT --default-character-set=utf8mb4 test $MYSQLTEST_VARDIR/tmp/con_sch@1ine_gr@1o@1je.txt;
|
||||||
|
exec $MYSQL_IMPORT test $MYSQLTEST_VARDIR/tmp/con@fame.txt;
|
||||||
|
select * from `con_schöne_grüße`;
|
||||||
|
select * from `con`;
|
||||||
|
select * from `con/bar`;
|
||||||
|
select * from `con@fame`;
|
||||||
|
drop table `con_schöne_grüße`;
|
||||||
|
drop table `con`;
|
||||||
|
drop table `con/bar`;
|
||||||
|
drop table `con@fame`;
|
||||||
|
|
||||||
|
--echo # End of 10.6 tests
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-16733 mysqldump --tab and --xml options are conflicting
|
--echo # MDEV-16733 mysqldump --tab and --xml options are conflicting
|
||||||
--echo #
|
--echo #
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ insert into t2 values (bug23333(),1);
|
|||||||
# the following must show there are events after the query
|
# the following must show there are events after the query
|
||||||
# the binlog_limit is used to hide the differences between the mixed
|
# the binlog_limit is used to hide the differences between the mixed
|
||||||
# and row logging formats after BUG#53259
|
# and row logging formats after BUG#53259
|
||||||
let $binlog_limit= 0, 4;
|
let $binlog_limit= 0, 5;
|
||||||
source include/show_binlog_events.inc;
|
source include/show_binlog_events.inc;
|
||||||
select count(*),@a from t1 /* must be 1,1 */;
|
select count(*),@a from t1 /* must be 1,1 */;
|
||||||
|
|
||||||
|
|||||||
169
mysql-test/main/subquery_merge.result
Normal file
169
mysql-test/main/subquery_merge.result
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
#
|
||||||
|
# MDEV-32294 2nd execution problem with inconsistent outer context paths
|
||||||
|
#
|
||||||
|
SELECT
|
||||||
|
(
|
||||||
|
WITH x AS
|
||||||
|
(
|
||||||
|
WITH RECURSIVE x ( x ) AS
|
||||||
|
(
|
||||||
|
SELECT 1 UNION SELECT x FROM x
|
||||||
|
)
|
||||||
|
SELECT * FROM x WHERE x IN
|
||||||
|
(
|
||||||
|
SELECT x FROM x WHERE
|
||||||
|
(
|
||||||
|
SELECT 1 GROUP BY x HAVING ( x )
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
SELECT * FROM x
|
||||||
|
) AS R;
|
||||||
|
R
|
||||||
|
1
|
||||||
|
SELECT * FROM (
|
||||||
|
WITH RECURSIVE x ( a ) AS ( SELECT 1 UNION SELECT a FROM x )
|
||||||
|
SELECT * FROM x
|
||||||
|
WHERE a IN (
|
||||||
|
SELECT a FROM x WHERE ( SELECT 1 GROUP BY a HAVING ( a ) )
|
||||||
|
)
|
||||||
|
) as dt ;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
create table t1 (a int) engine=myisam;
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
create table t2 (b int) engine=myisam;
|
||||||
|
insert into t2 values (3), (1);
|
||||||
|
create table t3 (c int) select a as c from t1;
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
with recursive x as ( select a from t1 union select a+1 from x where a < 4 )
|
||||||
|
select * from x where a in
|
||||||
|
(
|
||||||
|
select a from x where
|
||||||
|
(
|
||||||
|
select b from t2 where b < 3 group by a having a > 0
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
with x as ( select distinct a from t1 )
|
||||||
|
select * from x where a in
|
||||||
|
(
|
||||||
|
select a from x where
|
||||||
|
(
|
||||||
|
select b from t2 where b < 3 group by a having a > 0
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t1 where a in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where b < 3 group by a having a > 0
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t1 where a in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where b < 3 group by a
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
2
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t3 where c in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where b < 3 group by a
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
c
|
||||||
|
1
|
||||||
|
2
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t3 where c in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where a > 0 and b < 3
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
c
|
||||||
|
1
|
||||||
|
2
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t3 where c in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where a > 0 and b < 3
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt
|
||||||
|
where dt.c > 1;
|
||||||
|
c
|
||||||
|
2
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t3 where c in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2
|
||||||
|
where a > 0 and b < 3
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
c
|
||||||
|
1
|
||||||
|
2
|
||||||
|
prepare stmt from "with cte as
|
||||||
|
( select * from t3 where c in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where a > 0 and b < 3
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
select * from cte";
|
||||||
|
execute stmt;
|
||||||
|
c
|
||||||
|
1
|
||||||
|
2
|
||||||
|
execute stmt;
|
||||||
|
c
|
||||||
|
1
|
||||||
|
2
|
||||||
|
deallocate prepare stmt;
|
||||||
|
drop table t1, t2, t3;
|
||||||
|
#
|
||||||
|
# End of 10.11 tests
|
||||||
|
#
|
||||||
151
mysql-test/main/subquery_merge.test
Normal file
151
mysql-test/main/subquery_merge.test
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
--echo #
|
||||||
|
--echo # MDEV-32294 2nd execution problem with inconsistent outer context paths
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
(
|
||||||
|
WITH x AS
|
||||||
|
(
|
||||||
|
WITH RECURSIVE x ( x ) AS
|
||||||
|
(
|
||||||
|
SELECT 1 UNION SELECT x FROM x
|
||||||
|
)
|
||||||
|
SELECT * FROM x WHERE x IN
|
||||||
|
(
|
||||||
|
SELECT x FROM x WHERE
|
||||||
|
(
|
||||||
|
SELECT 1 GROUP BY x HAVING ( x )
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
SELECT * FROM x
|
||||||
|
) AS R;
|
||||||
|
|
||||||
|
SELECT * FROM (
|
||||||
|
WITH RECURSIVE x ( a ) AS ( SELECT 1 UNION SELECT a FROM x )
|
||||||
|
SELECT * FROM x
|
||||||
|
WHERE a IN (
|
||||||
|
SELECT a FROM x WHERE ( SELECT 1 GROUP BY a HAVING ( a ) )
|
||||||
|
)
|
||||||
|
) as dt ;
|
||||||
|
|
||||||
|
create table t1 (a int) engine=myisam;
|
||||||
|
insert into t1 values (1), (2);
|
||||||
|
create table t2 (b int) engine=myisam;
|
||||||
|
insert into t2 values (3), (1);
|
||||||
|
create table t3 (c int) select a as c from t1;
|
||||||
|
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
with recursive x as ( select a from t1 union select a+1 from x where a < 4 )
|
||||||
|
select * from x where a in
|
||||||
|
(
|
||||||
|
select a from x where
|
||||||
|
(
|
||||||
|
select b from t2 where b < 3 group by a having a > 0
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
with x as ( select distinct a from t1 )
|
||||||
|
select * from x where a in
|
||||||
|
(
|
||||||
|
select a from x where
|
||||||
|
(
|
||||||
|
select b from t2 where b < 3 group by a having a > 0
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t1 where a in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where b < 3 group by a having a > 0
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t1 where a in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where b < 3 group by a
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t3 where c in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where b < 3 group by a
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t3 where c in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where a > 0 and b < 3
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t3 where c in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where a > 0 and b < 3
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt
|
||||||
|
where dt.c > 1;
|
||||||
|
|
||||||
|
select * from
|
||||||
|
(
|
||||||
|
select * from t3 where c in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2
|
||||||
|
where a > 0 and b < 3
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
) dt;
|
||||||
|
|
||||||
|
let $q=
|
||||||
|
with cte as
|
||||||
|
( select * from t3 where c in
|
||||||
|
(
|
||||||
|
select a from t1 where
|
||||||
|
(
|
||||||
|
select b from t2 where a > 0 and b < 3
|
||||||
|
) <> 0
|
||||||
|
)
|
||||||
|
)
|
||||||
|
select * from cte;
|
||||||
|
|
||||||
|
eval prepare stmt from "$q";
|
||||||
|
execute stmt;
|
||||||
|
execute stmt;
|
||||||
|
deallocate prepare stmt;
|
||||||
|
|
||||||
|
drop table t1, t2, t3;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 10.11 tests
|
||||||
|
--echo #
|
||||||
@@ -3345,7 +3345,8 @@ ANALYZE
|
|||||||
"rows": 4,
|
"rows": 4,
|
||||||
"r_rows": 4,
|
"r_rows": 4,
|
||||||
"r_total_filtered": 25,
|
"r_total_filtered": 25,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": REPLACED,
|
"r_engine_stats": REPLACED,
|
||||||
"attached_condition": "!(<in_optimizer>(t1.a,t1.a in (subquery#2)))",
|
"attached_condition": "!(<in_optimizer>(t1.a,t1.a in (subquery#2)))",
|
||||||
"r_filtered": 25
|
"r_filtered": 25
|
||||||
@@ -3425,7 +3426,8 @@ ANALYZE
|
|||||||
"rows": 2,
|
"rows": 2,
|
||||||
"r_rows": 2,
|
"r_rows": 2,
|
||||||
"r_total_filtered": 0,
|
"r_total_filtered": 0,
|
||||||
"r_total_time_ms": "REPLACED",
|
"r_table_time_ms": "REPLACED",
|
||||||
|
"r_other_time_ms": "REPLACED",
|
||||||
"r_engine_stats": REPLACED,
|
"r_engine_stats": REPLACED,
|
||||||
"attached_condition": "!(<in_optimizer>(t1.a,t1.a in (subquery#2)))",
|
"attached_condition": "!(<in_optimizer>(t1.a,t1.a in (subquery#2)))",
|
||||||
"r_filtered": 0
|
"r_filtered": 0
|
||||||
|
|||||||
@@ -55,3 +55,74 @@ f1 int(11) YES NULL
|
|||||||
insert into t1 values(2);
|
insert into t1 values(2);
|
||||||
drop table t1;
|
drop table t1;
|
||||||
unlock tables;
|
unlock tables;
|
||||||
|
#
|
||||||
|
# Bug#19988193 ASSERTION `(*TABLES)->REGINFO.LOCK_TYPE >= TL_READ'
|
||||||
|
# FAILED IN LOCK_EXTERNAL
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(a INT);
|
||||||
|
CREATE PROCEDURE p1() CREATE VIEW v1 AS SELECT * FROM t1;
|
||||||
|
|
||||||
|
# Create trigger calling proc creating view, when view DOES NOT
|
||||||
|
# exist already
|
||||||
|
CREATE TRIGGER trg_p1_t1 AFTER INSERT ON t1 FOR EACH ROW CALL p1();
|
||||||
|
|
||||||
|
# Verify that it is possible to lock table
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
# Fails, as expected
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
|
||||||
|
|
||||||
|
# Make sure v1 already exists
|
||||||
|
CREATE VIEW v1 AS SELECT a+1 FROM t1;
|
||||||
|
|
||||||
|
# Verify that it is possible to lock table
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
|
||||||
|
# Verify that we get the expected error when inserting into the table
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
DROP TRIGGER trg_p1_t1;
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
DROP VIEW v1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Bug#21198646 ASSERTION FAILED: (*TABLES)->REGINFO.LOCK_TYPE >= TL_READ
|
||||||
|
# FILE LOCK.CC, LINE 356
|
||||||
|
#
|
||||||
|
CREATE TABLE t2(a INT);
|
||||||
|
# Create procedure p1 invoking RENAME TABLE
|
||||||
|
CREATE PROCEDURE p1() RENAME TABLE t2 TO t3;
|
||||||
|
# Create function f1 calling p1
|
||||||
|
CREATE FUNCTION f1() RETURNS INT BEGIN CALL p1(); RETURN 1; END $
|
||||||
|
# Invoke function f1 and verify that we get the expected error
|
||||||
|
SELECT f1();
|
||||||
|
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
|
||||||
|
# Cleanup
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
DROP TABLE t2;
|
||||||
|
#
|
||||||
|
# MDEV-16686 DDL in procedure propagates no locking to tables locked by DML
|
||||||
|
#
|
||||||
|
create table t (i int);
|
||||||
|
create view v as select * from t;
|
||||||
|
create procedure p() create view v as select * from t;
|
||||||
|
create trigger tr after insert on t for each row call p();
|
||||||
|
insert into t values (1), (2);
|
||||||
|
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
|
||||||
|
drop procedure p;
|
||||||
|
drop view v;
|
||||||
|
drop table t;
|
||||||
|
CREATE TABLE t (a INT);
|
||||||
|
CREATE PROCEDURE p() RENAME TABLE t TO t2;
|
||||||
|
CREATE TRIGGER tt AFTER INSERT ON t FOR EACH ROW CALL p();
|
||||||
|
INSERT INTO t VALUES (0);
|
||||||
|
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger
|
||||||
|
drop procedure p;
|
||||||
|
drop table t;
|
||||||
|
# End of 10.11 tests
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test of lock tables
|
# Test of lock tables
|
||||||
#
|
#
|
||||||
@@ -62,3 +64,91 @@ drop table t1;
|
|||||||
unlock tables;
|
unlock tables;
|
||||||
|
|
||||||
# End of 5.0 tests
|
# End of 5.0 tests
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#19988193 ASSERTION `(*TABLES)->REGINFO.LOCK_TYPE >= TL_READ'
|
||||||
|
--echo # FAILED IN LOCK_EXTERNAL
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1(a INT);
|
||||||
|
CREATE PROCEDURE p1() CREATE VIEW v1 AS SELECT * FROM t1;
|
||||||
|
--echo
|
||||||
|
--echo # Create trigger calling proc creating view, when view DOES NOT
|
||||||
|
--echo # exist already
|
||||||
|
CREATE TRIGGER trg_p1_t1 AFTER INSERT ON t1 FOR EACH ROW CALL p1();
|
||||||
|
--echo
|
||||||
|
--echo # Verify that it is possible to lock table
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
--echo
|
||||||
|
--echo # Fails, as expected
|
||||||
|
--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
--echo
|
||||||
|
--echo # Make sure v1 already exists
|
||||||
|
CREATE VIEW v1 AS SELECT a+1 FROM t1;
|
||||||
|
--echo
|
||||||
|
--echo # Verify that it is possible to lock table
|
||||||
|
LOCK TABLES t1 WRITE;
|
||||||
|
UNLOCK TABLES;
|
||||||
|
--echo
|
||||||
|
--echo # Verify that we get the expected error when inserting into the table
|
||||||
|
--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
--echo
|
||||||
|
--echo # Cleanup
|
||||||
|
DROP TRIGGER trg_p1_t1;
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
DROP VIEW v1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#21198646 ASSERTION FAILED: (*TABLES)->REGINFO.LOCK_TYPE >= TL_READ
|
||||||
|
--echo # FILE LOCK.CC, LINE 356
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t2(a INT);
|
||||||
|
|
||||||
|
--echo # Create procedure p1 invoking RENAME TABLE
|
||||||
|
CREATE PROCEDURE p1() RENAME TABLE t2 TO t3;
|
||||||
|
|
||||||
|
--echo # Create function f1 calling p1
|
||||||
|
DELIMITER $;
|
||||||
|
CREATE FUNCTION f1() RETURNS INT BEGIN CALL p1(); RETURN 1; END $
|
||||||
|
DELIMITER ;$
|
||||||
|
|
||||||
|
--echo # Invoke function f1 and verify that we get the expected error
|
||||||
|
--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
|
SELECT f1();
|
||||||
|
|
||||||
|
--echo # Cleanup
|
||||||
|
DROP PROCEDURE p1;
|
||||||
|
DROP FUNCTION f1;
|
||||||
|
DROP TABLE t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-16686 DDL in procedure propagates no locking to tables locked by DML
|
||||||
|
--echo #
|
||||||
|
create table t (i int);
|
||||||
|
create view v as select * from t;
|
||||||
|
create procedure p() create view v as select * from t;
|
||||||
|
create trigger tr after insert on t for each row call p();
|
||||||
|
--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
|
insert into t values (1), (2);
|
||||||
|
|
||||||
|
# cleanup
|
||||||
|
drop procedure p;
|
||||||
|
drop view v;
|
||||||
|
drop table t;
|
||||||
|
|
||||||
|
CREATE TABLE t (a INT);
|
||||||
|
CREATE PROCEDURE p() RENAME TABLE t TO t2;
|
||||||
|
CREATE TRIGGER tt AFTER INSERT ON t FOR EACH ROW CALL p();
|
||||||
|
--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||||
|
INSERT INTO t VALUES (0);
|
||||||
|
drop procedure p;
|
||||||
|
drop table t;
|
||||||
|
|
||||||
|
--echo # End of 10.11 tests
|
||||||
|
|||||||
@@ -46,70 +46,23 @@ ALTER TABLE t1 MODIFY a DECIMAL(10,0);
|
|||||||
SELECT * FROM t1,t2 WHERE a=d;
|
SELECT * FROM t1,t2 WHERE a=d;
|
||||||
a b c pk d e
|
a b c pk d e
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
Warning 1292 Truncated incorrect DECIMAL value: 'd'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
Warning 1292 Truncated incorrect DECIMAL value: 'd'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
Warning 1292 Truncated incorrect DECIMAL value: 'f'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
Warning 1292 Truncated incorrect DECIMAL value: 'f'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
Warning 1292 Truncated incorrect DECIMAL value: 'g'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'k'
|
Warning 1292 Truncated incorrect DECIMAL value: 'k'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
Warning 1292 Truncated incorrect DECIMAL value: 'm'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
Warning 1292 Truncated incorrect DECIMAL value: 'm'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
Warning 1292 Truncated incorrect DECIMAL value: 'm'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'o'
|
Warning 1292 Truncated incorrect DECIMAL value: 'o'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
Warning 1292 Truncated incorrect DECIMAL value: 'q'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'r'
|
Warning 1292 Truncated incorrect DECIMAL value: 'r'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'u'
|
Warning 1292 Truncated incorrect DECIMAL value: 'u'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'w'
|
Warning 1292 Truncated incorrect DECIMAL value: 'w'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
Warning 1292 Truncated incorrect DECIMAL value: 'x'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
Warning 1292 Truncated incorrect DECIMAL value: 'x'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'y'
|
Warning 1292 Truncated incorrect DECIMAL value: 'y'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'k'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'o'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'r'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'u'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'w'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'y'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'k'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'o'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'r'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'u'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'w'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'y'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'k'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'o'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'r'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'u'
|
|
||||||
ALTER TABLE t1 MODIFY a DOUBLE;
|
ALTER TABLE t1 MODIFY a DOUBLE;
|
||||||
SELECT * FROM t1,t2 WHERE a=d;
|
SELECT * FROM t1,t2 WHERE a=d;
|
||||||
a b c pk d e
|
a b c pk d e
|
||||||
@@ -131,53 +84,6 @@ Warning 1292 Truncated incorrect DOUBLE value: 'w'
|
|||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'y'
|
Warning 1292 Truncated incorrect DOUBLE value: 'y'
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'k'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'o'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'r'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'u'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'w'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'y'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'k'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'o'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'r'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'u'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'w'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'x'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'y'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'd'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'g'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'k'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'm'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'o'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'q'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'r'
|
|
||||||
Warning 1292 Truncated incorrect DOUBLE value: 'u'
|
|
||||||
DROP TABLE t1,t2;
|
DROP TABLE t1,t2;
|
||||||
#
|
#
|
||||||
# End of 10.2 tests
|
# End of 10.2 tests
|
||||||
|
|||||||
@@ -3,7 +3,10 @@
|
|||||||
#
|
#
|
||||||
# Tests will be skipped for the view protocol because the view protocol creates
|
# Tests will be skipped for the view protocol because the view protocol creates
|
||||||
# an additional util connection and other statistics data
|
# an additional util connection and other statistics data
|
||||||
-- source include/no_view_protocol.inc
|
# Skip this test for ps protocol because the previous commit changes the expected
|
||||||
|
# the value of bytes_expected in the userstats output.
|
||||||
|
--source include/no_view_protocol.inc
|
||||||
|
--disable_ps_protocol
|
||||||
|
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
set @save_userstat=@@global.userstat;
|
set @save_userstat=@@global.userstat;
|
||||||
@@ -40,3 +43,4 @@ select user, bytes_received from information_schema.user_statistics where user =
|
|||||||
|
|
||||||
drop user foo@localhost;
|
drop user foo@localhost;
|
||||||
set global userstat=@save_userstat;
|
set global userstat=@save_userstat;
|
||||||
|
--enable_ps_protocol
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ Table_schema Table_name Index_name Rows_read Queries
|
|||||||
select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.client_statistics;;
|
select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.client_statistics;;
|
||||||
TOTAL_CONNECTIONS 2
|
TOTAL_CONNECTIONS 2
|
||||||
TOTAL_SSL_CONNECTIONS 1
|
TOTAL_SSL_CONNECTIONS 1
|
||||||
CONCURRENT_CONNECTIONS 0
|
CONCURRENT_CONNECTIONS 1
|
||||||
ROWS_READ 6
|
ROWS_READ 6
|
||||||
ROWS_SENT 3
|
ROWS_SENT 3
|
||||||
ROWS_DELETED 1
|
ROWS_DELETED 1
|
||||||
@@ -177,7 +177,7 @@ EMPTY_QUERIES 1
|
|||||||
select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.user_statistics;;
|
select TOTAL_CONNECTIONS, TOTAL_SSL_CONNECTIONS, CONCURRENT_CONNECTIONS, ROWS_READ, ROWS_SENT, ROWS_DELETED, ROWS_INSERTED, ROWS_UPDATED, SELECT_COMMANDS, UPDATE_COMMANDS, COMMIT_TRANSACTIONS, ROLLBACK_TRANSACTIONS, DENIED_CONNECTIONS, LOST_CONNECTIONS, ACCESS_DENIED, EMPTY_QUERIES from information_schema.user_statistics;;
|
||||||
TOTAL_CONNECTIONS 2
|
TOTAL_CONNECTIONS 2
|
||||||
TOTAL_SSL_CONNECTIONS 1
|
TOTAL_SSL_CONNECTIONS 1
|
||||||
CONCURRENT_CONNECTIONS 0
|
CONCURRENT_CONNECTIONS 1
|
||||||
ROWS_READ 6
|
ROWS_READ 6
|
||||||
ROWS_SENT 3
|
ROWS_SENT 3
|
||||||
ROWS_DELETED 1
|
ROWS_DELETED 1
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
--- a/mysql-test/main/vector.result
|
--- vector.result
|
||||||
+++ b/mysql-test/main/vector.result
|
+++ vector,myisam.reject
|
||||||
@@ -305,8 +305,30 @@
|
@@ -388,8 +388,30 @@
|
||||||
create table t1 (id int auto_increment primary key, v vector(5) not null, vector index (v));
|
create table t1 (id int auto_increment primary key, v vector(5) not null, vector index (v));
|
||||||
insert t1 (id, v) values (1, x'e360d63ebe554f3fcdbc523f4522193f5236083d');
|
insert t1 (id, v) values (1, x'e360d63ebe554f3fcdbc523f4522193f5236083d');
|
||||||
truncate table t1;
|
truncate table t1;
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
insert t1 (id, v) values (1, x'e360d63ebe554f3fcdbc523f4522193f5236083d');
|
insert t1 (id, v) values (1, x'e360d63ebe554f3fcdbc523f4522193f5236083d');
|
||||||
select id, hex(v) from t1;
|
select id, hex(v) from t1;
|
||||||
id hex(v)
|
id hex(v)
|
||||||
@@ -324,26 +346,32 @@
|
@@ -407,27 +429,33 @@
|
||||||
# Test RENAME TABLE with vector index
|
# Test RENAME TABLE with vector index
|
||||||
create table t1 (id int auto_increment primary key, v vector(5) not null, vector index (v));
|
create table t1 (id int auto_increment primary key, v vector(5) not null, vector index (v));
|
||||||
db.opt
|
db.opt
|
||||||
@@ -73,7 +73,8 @@
|
|||||||
-t1.ibd
|
-t1.ibd
|
||||||
drop database test1;
|
drop database test1;
|
||||||
db.opt
|
db.opt
|
||||||
@@ -387,9 +387,11 @@
|
#
|
||||||
|
@@ -504,9 +532,11 @@
|
||||||
# ADD/DROP COLUMN, ALGORITHM=COPY
|
# ADD/DROP COLUMN, ALGORITHM=COPY
|
||||||
alter table t1 add column a int, algorithm=copy;
|
alter table t1 add column a int, algorithm=copy;
|
||||||
db.opt
|
db.opt
|
||||||
@@ -87,7 +88,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -398,12 +400,14 @@
|
@@ -515,12 +545,14 @@
|
||||||
`a` int(11) DEFAULT NULL,
|
`a` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -105,7 +106,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -415,13 +415,15 @@
|
@@ -528,13 +560,15 @@
|
||||||
`v` vector(5) NOT NULL,
|
`v` vector(5) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -124,7 +125,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -432,12 +432,14 @@
|
@@ -543,12 +577,14 @@
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `a` (`id`),
|
KEY `a` (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -142,7 +143,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -445,13 +447,15 @@
|
@@ -556,13 +592,15 @@
|
||||||
`v` vector(5) NOT NULL,
|
`v` vector(5) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -161,7 +162,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -464,12 +464,14 @@
|
@@ -571,12 +609,14 @@
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `a` (`id`),
|
KEY `a` (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -179,7 +180,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -479,13 +479,15 @@
|
@@ -584,13 +624,15 @@
|
||||||
`v` vector(5) NOT NULL,
|
`v` vector(5) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -198,7 +199,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -494,12 +496,14 @@
|
@@ -599,12 +641,14 @@
|
||||||
`a` int(11) DEFAULT NULL,
|
`a` int(11) DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -216,7 +217,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -509,24 +511,27 @@
|
@@ -612,24 +656,27 @@
|
||||||
`v` vector(5) NOT NULL,
|
`v` vector(5) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -249,7 +250,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -539,24 +539,27 @@
|
@@ -637,24 +684,27 @@
|
||||||
`v` vector(5) NOT NULL,
|
`v` vector(5) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -282,7 +283,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -567,7 +567,7 @@
|
@@ -662,7 +712,7 @@
|
||||||
`v` vector(5) NOT NULL,
|
`v` vector(5) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -291,8 +292,8 @@
|
|||||||
# ADD/DROP INDEX, ALGORITHM=INPLACE (non-vector)
|
# ADD/DROP INDEX, ALGORITHM=INPLACE (non-vector)
|
||||||
alter table t1 add index a(id), algorithm=inplace;
|
alter table t1 add index a(id), algorithm=inplace;
|
||||||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
||||||
@@ -590,31 +590,15 @@
|
@@ -685,31 +735,15 @@
|
||||||
alter table t1 modify column v vector(6) not null, algorithm=inplace;
|
alter table t1 modify column v vector(7) not null, algorithm=inplace;
|
||||||
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
|
||||||
# ADD/CHANGE/DROP/MODIFY COLUMN, ALGORITHM=INPLACE (non-vector)
|
# ADD/CHANGE/DROP/MODIFY COLUMN, ALGORITHM=INPLACE (non-vector)
|
||||||
-alter table t1 add column a varchar(10), algorithm=inplace;
|
-alter table t1 add column a varchar(10), algorithm=inplace;
|
||||||
@@ -327,7 +328,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -606,13 +606,15 @@
|
@@ -717,13 +751,15 @@
|
||||||
`v` vector(5) NOT NULL,
|
`v` vector(5) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -346,7 +347,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -622,14 +622,16 @@
|
@@ -731,14 +767,16 @@
|
||||||
`w` vector(5) NOT NULL,
|
`w` vector(5) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`w`)
|
VECTOR KEY `v` (`w`)
|
||||||
@@ -366,7 +367,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -639,7 +639,7 @@
|
@@ -746,7 +784,7 @@
|
||||||
`v` vector(5) NOT NULL,
|
`v` vector(5) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `w` (`v`)
|
VECTOR KEY `w` (`v`)
|
||||||
@@ -375,7 +376,7 @@
|
|||||||
alter table t1 rename key w to v;
|
alter table t1 rename key w to v;
|
||||||
# IF [NOT] EXISTS
|
# IF [NOT] EXISTS
|
||||||
create vector index if not exists v on t1(v);
|
create vector index if not exists v on t1(v);
|
||||||
@@ -650,15 +650,16 @@
|
@@ -757,77 +795,22 @@
|
||||||
Warnings:
|
Warnings:
|
||||||
Note 1091 Can't DROP INDEX `v`; check that it exists
|
Note 1091 Can't DROP INDEX `v`; check that it exists
|
||||||
db.opt
|
db.opt
|
||||||
@@ -392,9 +393,8 @@
|
|||||||
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||||
+) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
+) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||||
create vector index if not exists v on t1(v);
|
create vector index if not exists v on t1(v);
|
||||||
# CHANGE/MODIFY/DROP COLUMN (vector)
|
alter table t1 rename key if exists v to w;
|
||||||
alter table t1 modify column v int;
|
alter table t1 rename key if exists w to v;
|
||||||
@@ -666,62 +666,6 @@
|
|
||||||
alter table t1 alter key if exists v ignored;
|
alter table t1 alter key if exists v ignored;
|
||||||
alter table t1 alter key if exists v not ignored;
|
alter table t1 alter key if exists v not ignored;
|
||||||
# ENGINE
|
# ENGINE
|
||||||
@@ -457,7 +457,7 @@
|
|||||||
# CHANGE/MODIFY/DROP COLUMN (vector)
|
# CHANGE/MODIFY/DROP COLUMN (vector)
|
||||||
alter table t1 modify column v int;
|
alter table t1 modify column v int;
|
||||||
ERROR HY000: Incorrect arguments to VECTOR INDEX
|
ERROR HY000: Incorrect arguments to VECTOR INDEX
|
||||||
@@ -671,9 +672,11 @@
|
@@ -839,9 +822,11 @@
|
||||||
ERROR 42000: All parts of a VECTOR index must be NOT NULL
|
ERROR 42000: All parts of a VECTOR index must be NOT NULL
|
||||||
alter table t1 modify column v vector(7) not null;
|
alter table t1 modify column v vector(7) not null;
|
||||||
db.opt
|
db.opt
|
||||||
@@ -471,8 +471,8 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -681,12 +684,14 @@
|
@@ -849,12 +834,14 @@
|
||||||
`v` vector(5) NOT NULL,
|
`v` vector(7) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||||
@@ -489,7 +489,7 @@
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
@@ -699,15 +699,16 @@
|
@@ -862,17 +849,18 @@
|
||||||
`v` vector(5) NOT NULL,
|
`v` vector(5) NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
VECTOR KEY `v` (`v`)
|
VECTOR KEY `v` (`v`)
|
||||||
@@ -509,7 +509,9 @@
|
|||||||
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||||
+) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
+) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
|
||||||
drop table t1;
|
drop table t1;
|
||||||
@@ -877,5 +877,5 @@
|
create table t1(v vector(5) not null, vector index(v));
|
||||||
|
alter table t1 add column a int;
|
||||||
|
@@ -889,5 +877,5 @@
|
||||||
t CREATE TABLE `t` (
|
t CREATE TABLE `t` (
|
||||||
`v` vector(1) NOT NULL,
|
`v` vector(1) NOT NULL,
|
||||||
VECTOR KEY `v` (`v`) `distance`=cosine
|
VECTOR KEY `v` (`v`) `distance`=cosine
|
||||||
|
|||||||
@@ -2183,6 +2183,7 @@ sub environment_setup {
|
|||||||
$ENV{'LC_CTYPE'}= "C";
|
$ENV{'LC_CTYPE'}= "C";
|
||||||
$ENV{'LC_COLLATE'}= "C";
|
$ENV{'LC_COLLATE'}= "C";
|
||||||
|
|
||||||
|
$ENV{'GNUTLS_SYSTEM_PRIORITY_FILE'}='/dev/null';
|
||||||
$ENV{'OPENSSL_CONF'}= $mysqld_variables{'version-ssl-library'} gt 'OpenSSL 1.1.1'
|
$ENV{'OPENSSL_CONF'}= $mysqld_variables{'version-ssl-library'} gt 'OpenSSL 1.1.1'
|
||||||
? "$glob_mysql_test_dir/lib/openssl.cnf" : '/dev/null';
|
? "$glob_mysql_test_dir/lib/openssl.cnf" : '/dev/null';
|
||||||
|
|
||||||
@@ -4556,8 +4557,6 @@ sub extract_warning_lines ($$) {
|
|||||||
qr|table.*is full|,
|
qr|table.*is full|,
|
||||||
qr/\[ERROR\] (mysqld|mariadbd): \Z/, # Warning from Aria recovery
|
qr/\[ERROR\] (mysqld|mariadbd): \Z/, # Warning from Aria recovery
|
||||||
qr|Linux Native AIO|, # warning that aio does not work on /dev/shm
|
qr|Linux Native AIO|, # warning that aio does not work on /dev/shm
|
||||||
qr|InnoDB: io_setup\(\) attempt|,
|
|
||||||
qr|InnoDB: io_setup\(\) failed with EAGAIN|,
|
|
||||||
qr|io_uring_queue_init\(\) failed with|,
|
qr|io_uring_queue_init\(\) failed with|,
|
||||||
qr|InnoDB: io_uring failed: falling back to libaio|,
|
qr|InnoDB: io_uring failed: falling back to libaio|,
|
||||||
qr/InnoDB: Failed to set O_DIRECT on file/,
|
qr/InnoDB: Failed to set O_DIRECT on file/,
|
||||||
|
|||||||
@@ -619,6 +619,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
@@ -635,6 +636,7 @@ ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
@@ -671,6 +673,7 @@ ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
@@ -703,6 +706,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t3)
|
master-bin.000001 # Table_map # # table_id: # (test.t3)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
@@ -725,6 +729,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # delete t2.* from t2,t5 where t2.a=t5.a + 1
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
@@ -747,6 +752,7 @@ count(*)
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
@@ -862,6 +868,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
@@ -877,6 +884,7 @@ ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
@@ -911,6 +919,7 @@ ERROR 23000: Duplicate entry '2' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
@@ -942,6 +951,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t3)
|
master-bin.000001 # Table_map # # table_id: # (test.t3)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
@@ -963,6 +973,7 @@ ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # delete t2.* from t2,t5 where t2.a=t5.a + 1
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
@@ -984,6 +995,7 @@ count(*)
|
|||||||
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
|
||||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
master-bin.000001 # Annotate_rows # # insert into t1 values (null)
|
||||||
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
master-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
|
||||||
master-bin.000001 # Query # # COMMIT
|
master-bin.000001 # Query # # COMMIT
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ t1 CREATE TABLE `t1` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `encrypted`=yes `encryption_key_id`=2
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `encrypted`=yes `encryption_key_id`=2
|
||||||
alter table t1 encryption_key_id=3;
|
alter table t1 encryption_key_id=3;
|
||||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
|
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
|
||||||
|
show warnings;
|
||||||
|
Level Code Message
|
||||||
|
Warning 140 InnoDB: ENCRYPTION_KEY_ID 3 not available
|
||||||
|
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
|
||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ t1 CREATE TABLE `t1` (
|
|||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `encrypted`=yes `encryption_key_id`=2
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci `encrypted`=yes `encryption_key_id`=2
|
||||||
alter table t1 encryption_key_id=3;
|
alter table t1 encryption_key_id=3;
|
||||||
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
|
ERROR HY000: Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
|
||||||
|
show warnings;
|
||||||
|
Level Code Message
|
||||||
|
Warning 140 InnoDB: ENCRYPTION_KEY_ID 3 not available
|
||||||
|
Error 1478 Table storage engine 'InnoDB' does not support the create option 'ENCRYPTION_KEY_ID'
|
||||||
show create table t1;
|
show create table t1;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
|
|||||||
@@ -34,4 +34,14 @@ CREATE TABLE t6 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
|
|||||||
# Run innochecksum on t6
|
# Run innochecksum on t6
|
||||||
# Restore the original tables
|
# Restore the original tables
|
||||||
# restart
|
# restart
|
||||||
|
# Trigger AHI and test pages_hashed, pages_old as non zero from sys view
|
||||||
|
SELECT STRAIGHT_JOIN COUNT(t6a.a)
|
||||||
|
FROM t6 AS t6a, t6 AS t6b, t6 AS t6c
|
||||||
|
WHERE t6a.a = t6b.a AND t6c.a = t6a.a;
|
||||||
|
COUNT(t6a.a)
|
||||||
|
1000
|
||||||
|
SELECT SUM(pages_hashed)>0 `1`, SUM(pages_old)>0 `1`
|
||||||
|
FROM sys.innodb_buffer_stats_by_table;
|
||||||
|
1 1
|
||||||
|
1 1
|
||||||
DROP TABLE t1, t2, t3, t4, t5, t6;
|
DROP TABLE t1, t2, t3, t4, t5, t6;
|
||||||
|
|||||||
@@ -1,4 +1,16 @@
|
|||||||
# Wait max 10 min for key encryption threads to encrypt all spaces
|
# Wait max 10 min for key encryption threads to encrypt all spaces
|
||||||
# Success!
|
# Success!
|
||||||
|
SET GLOBAL innodb_encryption_threads=4;
|
||||||
|
SELECT COUNT(*) AS encrypt_threads_running
|
||||||
|
FROM performance_schema.threads
|
||||||
|
WHERE NAME LIKE '%encrypt%';
|
||||||
|
encrypt_threads_running
|
||||||
|
4
|
||||||
# restart: --innodb-read-only=1 --innodb-encrypt-tables=1
|
# restart: --innodb-read-only=1 --innodb-encrypt-tables=1
|
||||||
|
SET GLOBAL innodb_encryption_threads=4;
|
||||||
|
SELECT COUNT(*) AS encrypt_threads_running
|
||||||
|
FROM performance_schema.threads
|
||||||
|
WHERE NAME LIKE '%encrypt%';
|
||||||
|
encrypt_threads_running
|
||||||
|
0
|
||||||
# All done
|
# All done
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ alter table t1 encryption_key_id=2;
|
|||||||
show create table t1;
|
show create table t1;
|
||||||
--error ER_ILLEGAL_HA_CREATE_OPTION
|
--error ER_ILLEGAL_HA_CREATE_OPTION
|
||||||
alter table t1 encryption_key_id=3;
|
alter table t1 encryption_key_id=3;
|
||||||
|
show warnings;
|
||||||
show create table t1;
|
show create table t1;
|
||||||
alter table t1 encryption_key_id=33;
|
alter table t1 encryption_key_id=33;
|
||||||
show create table t1;
|
show create table t1;
|
||||||
|
|||||||
2
mysql-test/suite/encryption/t/innochecksum.opt
Normal file
2
mysql-test/suite/encryption/t/innochecksum.opt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
--innodb-adaptive-hash-index=ON
|
||||||
|
--innodb-buffer-pool-size=64M
|
||||||
@@ -299,4 +299,26 @@ if (0 && $have_debug) { # these messages sometimes fail to appear
|
|||||||
--move_file $MYSQLD_DATADIR/test/t6.ibd.backup $MYSQLD_DATADIR/test/t6.ibd
|
--move_file $MYSQLD_DATADIR/test/t6.ibd.backup $MYSQLD_DATADIR/test/t6.ibd
|
||||||
|
|
||||||
--source include/start_mysqld.inc
|
--source include/start_mysqld.inc
|
||||||
|
|
||||||
|
--echo # Trigger AHI and test pages_hashed, pages_old as non zero from sys view
|
||||||
|
|
||||||
|
SELECT STRAIGHT_JOIN COUNT(t6a.a)
|
||||||
|
FROM t6 AS t6a, t6 AS t6b, t6 AS t6c
|
||||||
|
WHERE t6a.a = t6b.a AND t6c.a = t6a.a;
|
||||||
|
|
||||||
|
let $no_ps=`SELECT count(*)=0 FROM information_schema.engines WHERE
|
||||||
|
(support = 'YES' OR support = 'DEFAULT') AND
|
||||||
|
engine = 'PERFORMANCE_SCHEMA'`;
|
||||||
|
|
||||||
|
if ($no_ps) {
|
||||||
|
--echo SELECT SUM(pages_hashed)>0 `1`, SUM(pages_old)>0 `1`
|
||||||
|
--echo FROM sys.innodb_buffer_stats_by_table;
|
||||||
|
--echo 1 1
|
||||||
|
--echo 1 1
|
||||||
|
}
|
||||||
|
if (!$no_ps) {
|
||||||
|
SELECT SUM(pages_hashed)>0 `1`, SUM(pages_old)>0 `1`
|
||||||
|
FROM sys.innodb_buffer_stats_by_table;
|
||||||
|
}
|
||||||
|
|
||||||
DROP TABLE t1, t2, t3, t4, t5, t6;
|
DROP TABLE t1, t2, t3, t4, t5, t6;
|
||||||
|
|||||||
@@ -25,10 +25,22 @@ if (!$success)
|
|||||||
}
|
}
|
||||||
--echo # Success!
|
--echo # Success!
|
||||||
|
|
||||||
|
# Server in normal mode
|
||||||
|
SET GLOBAL innodb_encryption_threads=4;
|
||||||
|
SELECT COUNT(*) AS encrypt_threads_running
|
||||||
|
FROM performance_schema.threads
|
||||||
|
WHERE NAME LIKE '%encrypt%';
|
||||||
|
|
||||||
#
|
#
|
||||||
# MDEV-11835: InnoDB: Failing assertion: free_slot != NULL on
|
# MDEV-11835: InnoDB: Failing assertion: free_slot != NULL on
|
||||||
# restarting server with encryption and read-only
|
# restarting server with encryption and read-only
|
||||||
#
|
#
|
||||||
--let $restart_parameters= --innodb-read-only=1 --innodb-encrypt-tables=1
|
--let $restart_parameters= --innodb-read-only=1 --innodb-encrypt-tables=1
|
||||||
--source include/restart_mysqld.inc
|
--source include/restart_mysqld.inc
|
||||||
|
|
||||||
|
# Server read-only mode
|
||||||
|
SET GLOBAL innodb_encryption_threads=4;
|
||||||
|
SELECT COUNT(*) AS encrypt_threads_running
|
||||||
|
FROM performance_schema.threads
|
||||||
|
WHERE NAME LIKE '%encrypt%';
|
||||||
--echo # All done
|
--echo # All done
|
||||||
|
|||||||
@@ -43,3 +43,5 @@ let $restart_parameters=;
|
|||||||
SELECT COUNT(*) FROM t1;
|
SELECT COUNT(*) FROM t1;
|
||||||
ALTER TABLE t1 FORCE;
|
ALTER TABLE t1 FORCE;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--rmdir $basedir
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
DROP TABLE IF EXISTS t1;
|
|
||||||
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL KEY );
|
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL KEY );
|
||||||
SET SQL_AUTO_IS_NULL = 1;
|
SET SQL_AUTO_IS_NULL = 1;
|
||||||
INSERT INTO t1 VALUES(null);
|
INSERT INTO t1 VALUES(null);
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
DROP TABLE IF EXISTS t1;
|
|
||||||
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 DATE);
|
CREATE TABLE t1 (c1 TINYINT NOT NULL PRIMARY KEY, c2 CHAR(10), c3 DATE);
|
||||||
LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
|
LOAD DATA LOCAL INFILE 'suite/engines/funcs/t/load_simple.inc' INTO TABLE t1 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n';
|
||||||
Warnings:
|
Warnings:
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
|
||||||
DROP FUNCTION IF EXISTS sf1;
|
|
||||||
CREATE TABLE t1 (id INTEGER NULL , data INTEGER NULL, KEY(id));
|
CREATE TABLE t1 (id INTEGER NULL , data INTEGER NULL, KEY(id));
|
||||||
CREATE TABLE t2 (i INTEGER NULL);
|
CREATE TABLE t2 (i INTEGER NULL);
|
||||||
CREATE TABLE t3 (id INTEGER NULL, data INTEGER NULL, KEY(id));
|
CREATE TABLE t3 (id INTEGER NULL, data INTEGER NULL, KEY(id));
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
|
||||||
DROP FUNCTION IF EXISTS sf1;
|
|
||||||
CREATE TABLE t1 (id INTEGER NULL , data INTEGER NULL, KEY(id));
|
CREATE TABLE t1 (id INTEGER NULL , data INTEGER NULL, KEY(id));
|
||||||
CREATE TABLE t2 (i INTEGER NULL);
|
CREATE TABLE t2 (i INTEGER NULL);
|
||||||
CREATE TABLE t3 (id INTEGER NULL, data INTEGER NULL, KEY(id));
|
CREATE TABLE t3 (id INTEGER NULL, data INTEGER NULL, KEY(id));
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
--disable_warnings
|
--disable_ps2_protocol
|
||||||
DROP TABLE IF EXISTS t1;
|
|
||||||
--enable_warnings
|
|
||||||
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL KEY );
|
CREATE TABLE t1(c1 TINYINT AUTO_INCREMENT NULL KEY );
|
||||||
SET SQL_AUTO_IS_NULL = 1;
|
SET SQL_AUTO_IS_NULL = 1;
|
||||||
INSERT INTO t1 VALUES(null);
|
INSERT INTO t1 VALUES(null);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,4 @@
|
|||||||
--disable_warnings
|
--disable_ps2_protocol
|
||||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
|
||||||
DROP FUNCTION IF EXISTS sf1;
|
|
||||||
--enable_warnings
|
|
||||||
CREATE TABLE t1 (id INTEGER NULL , data INTEGER NULL, KEY(id));
|
CREATE TABLE t1 (id INTEGER NULL , data INTEGER NULL, KEY(id));
|
||||||
CREATE TABLE t2 (i INTEGER NULL);
|
CREATE TABLE t2 (i INTEGER NULL);
|
||||||
CREATE TABLE t3 (id INTEGER NULL, data INTEGER NULL, KEY(id));
|
CREATE TABLE t3 (id INTEGER NULL, data INTEGER NULL, KEY(id));
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
--disable_warnings
|
--disable_ps2_protocol
|
||||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
|
||||||
DROP FUNCTION IF EXISTS sf1;
|
|
||||||
--enable_warnings
|
|
||||||
CREATE TABLE t1 (id INTEGER NULL , data INTEGER NULL, KEY(id));
|
CREATE TABLE t1 (id INTEGER NULL , data INTEGER NULL, KEY(id));
|
||||||
CREATE TABLE t2 (i INTEGER NULL);
|
CREATE TABLE t2 (i INTEGER NULL);
|
||||||
CREATE TABLE t3 (id INTEGER NULL, data INTEGER NULL, KEY(id));
|
CREATE TABLE t3 (id INTEGER NULL, data INTEGER NULL, KEY(id));
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
|
||||||
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
||||||
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
||||||
CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
|
CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
|
||||||
CREATE TABLE t1(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
CREATE TABLE t1(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
||||||
CREATE TABLE t2(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1,c2));
|
CREATE TABLE t2(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1,c2));
|
||||||
CREATE TABLE t3(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, UNIQUE INDEX idx(c1,c2));
|
CREATE TABLE t3(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, UNIQUE INDEX idx(c1,c2));
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
|
||||||
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
||||||
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
||||||
CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
|
CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
--disable_warnings
|
|
||||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
|
||||||
--enable_warnings
|
|
||||||
# Create tables
|
# Create tables
|
||||||
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
||||||
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
||||||
|
--enable_prepare_warnings
|
||||||
CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
|
CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
|
||||||
CREATE TABLE t4(c1 YEAR(2), c2 YEAR(2), UNIQUE INDEX idx(c1,c2));
|
CREATE TABLE t4(c1 YEAR(2), c2 YEAR(2), UNIQUE INDEX idx(c1,c2));
|
||||||
|
--disable_prepare_warnings
|
||||||
#Insert as 4-digit number format in the range '1901' to '2155'
|
#Insert as 4-digit number format in the range '1901' to '2155'
|
||||||
INSERT INTO t1 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
|
INSERT INTO t1 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
|
||||||
INSERT INTO t2 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
|
INSERT INTO t2 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
--disable_warnings
|
|
||||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
|
||||||
--enable_warnings
|
|
||||||
|
|
||||||
######## Running INSERT tests for YEAR(4) ########
|
######## Running INSERT tests for YEAR(4) ########
|
||||||
|
|
||||||
# Create tables
|
# Create tables
|
||||||
CREATE TABLE t1(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
CREATE TABLE t1(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
||||||
CREATE TABLE t2(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1,c2));
|
CREATE TABLE t2(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1,c2));
|
||||||
|
--enable_prepare_warnings
|
||||||
CREATE TABLE t3(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, UNIQUE INDEX idx(c1,c2));
|
CREATE TABLE t3(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME, UNIQUE INDEX idx(c1,c2));
|
||||||
CREATE TABLE t4(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME);
|
CREATE TABLE t4(c1 YEAR(4) NOT NULL, c2 YEAR(4) NULL, c3 DATE, c4 DATETIME);
|
||||||
|
--disable_prepare_warnings
|
||||||
# Insert some rows with targeted values
|
# Insert some rows with targeted values
|
||||||
|
|
||||||
# As a four-digit string in the range '1901' to '2155'
|
# As a four-digit string in the range '1901' to '2155'
|
||||||
@@ -761,10 +759,12 @@ DROP TABLE t1,t2,t3,t4;
|
|||||||
######## Running INSERT tests for YEAR(2) ########
|
######## Running INSERT tests for YEAR(2) ########
|
||||||
|
|
||||||
# Create tables
|
# Create tables
|
||||||
|
--enable_prepare_warnings
|
||||||
CREATE TABLE t1(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
CREATE TABLE t1(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1), UNIQUE INDEX(c2));
|
||||||
CREATE TABLE t2(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1,c2));
|
CREATE TABLE t2(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, PRIMARY KEY(c1,c2));
|
||||||
CREATE TABLE t3(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, UNIQUE INDEX idx(c1,c2));
|
CREATE TABLE t3(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME, UNIQUE INDEX idx(c1,c2));
|
||||||
CREATE TABLE t4(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME);
|
CREATE TABLE t4(c1 YEAR(2) NOT NULL, c2 YEAR(2) NULL, c3 DATE, c4 DATETIME);
|
||||||
|
--disable_prepare_warnings
|
||||||
# Insert some rows with targeted values
|
# Insert some rows with targeted values
|
||||||
|
|
||||||
# As a four-digit string in the range '1901' to '2155'
|
# As a four-digit string in the range '1901' to '2155'
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
--disable_warnings
|
|
||||||
DROP TABLE IF EXISTS t1,t2,t3,t4;
|
|
||||||
--enable_warnings
|
|
||||||
# Create tables
|
# Create tables
|
||||||
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
CREATE TABLE t1(c1 YEAR NOT NULL,c2 YEAR, PRIMARY KEY(c1));
|
||||||
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
CREATE TABLE t2(c1 YEAR NOT NULL, c2 YEAR, UNIQUE INDEX idx(c1,c2));
|
||||||
|
--enable_prepare_warnings
|
||||||
CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
|
CREATE TABLE t3(c1 YEAR(2) NOT NULL,c2 YEAR(2), PRIMARY KEY(c1));
|
||||||
CREATE TABLE t4(c1 YEAR(2), c2 YEAR(2), UNIQUE INDEX idx(c1,c2));
|
CREATE TABLE t4(c1 YEAR(2), c2 YEAR(2), UNIQUE INDEX idx(c1,c2));
|
||||||
|
--disable_prepare_warnings
|
||||||
#Insert as 4-digit number format in the range '1901' to '2155'
|
#Insert as 4-digit number format in the range '1901' to '2155'
|
||||||
INSERT INTO t1 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
|
INSERT INTO t1 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
|
||||||
INSERT INTO t2 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
|
INSERT INTO t2 VALUES (1901,1901),(1970,1970),(1999,1999),(2000,2000),(2155,2155);
|
||||||
|
|||||||
41
mysql-test/suite/galera/r/MDEV-30418.result
Normal file
41
mysql-test/suite/galera/r/MDEV-30418.result
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
|
connection node_2;
|
||||||
|
select @@wsrep_slave_threads;
|
||||||
|
@@wsrep_slave_threads
|
||||||
|
1
|
||||||
|
SET @cluster_address_orig = @@wsrep_cluster_address;
|
||||||
|
SET GLOBAL wsrep_cluster_address=AUTO;
|
||||||
|
SET GLOBAL wsrep_slave_threads=12;
|
||||||
|
ERROR 42000: Variable 'wsrep_slave_threads' can't be set to the value of '12'
|
||||||
|
SHOW WARNINGS;
|
||||||
|
Level Code Message
|
||||||
|
Warning 1231 Cannot set 'wsrep_slave_threads' because wsrep is disconnected
|
||||||
|
Error 1231 Variable 'wsrep_slave_threads' can't be set to the value of '12'
|
||||||
|
SET GLOBAL wsrep_cluster_address=ON;
|
||||||
|
SET GLOBAL wsrep_slave_threads=0;
|
||||||
|
ERROR 42000: Variable 'wsrep_slave_threads' can't be set to the value of '0'
|
||||||
|
SHOW WARNINGS;
|
||||||
|
Level Code Message
|
||||||
|
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
|
||||||
|
Warning 1231 Cannot set 'wsrep_slave_threads' because wsrep is disconnected
|
||||||
|
Error 1231 Variable 'wsrep_slave_threads' can't be set to the value of '0'
|
||||||
|
SET GLOBAL wsrep_cluster_address='a';
|
||||||
|
SET GLOBAL wsrep_slave_threads=2;
|
||||||
|
ERROR 42000: Variable 'wsrep_slave_threads' can't be set to the value of '2'
|
||||||
|
SHOW WARNINGS;
|
||||||
|
Level Code Message
|
||||||
|
Warning 1231 Cannot set 'wsrep_slave_threads' because wsrep is disconnected
|
||||||
|
Error 1231 Variable 'wsrep_slave_threads' can't be set to the value of '2'
|
||||||
|
select @@wsrep_slave_threads;
|
||||||
|
@@wsrep_slave_threads
|
||||||
|
1
|
||||||
|
show status like 'wsrep_cluster_size';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_cluster_size 2
|
||||||
|
show status like 'wsrep_cluster_status';
|
||||||
|
Variable_name Value
|
||||||
|
wsrep_cluster_status Primary
|
||||||
|
call mtr.add_suppression("WSREP:.*");
|
||||||
27
mysql-test/suite/galera/r/MDEV-37366.result
Normal file
27
mysql-test/suite/galera/r/MDEV-37366.result
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
SET SESSION binlog_row_image=minimal;
|
||||||
|
CREATE SEQUENCE `seq_test` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 0 cache 1000 nocycle ENGINE=InnoDB;
|
||||||
|
SHOW CREATE TABLE seq_test;
|
||||||
|
Table Create Table
|
||||||
|
seq_test CREATE TABLE `seq_test` (
|
||||||
|
`next_not_cached_value` bigint(21) NOT NULL,
|
||||||
|
`minimum_value` bigint(21) NOT NULL,
|
||||||
|
`maximum_value` bigint(21) NOT NULL,
|
||||||
|
`start_value` bigint(21) NOT NULL COMMENT 'start value when sequences is created or value if RESTART is used',
|
||||||
|
`increment` bigint(21) NOT NULL COMMENT 'increment value',
|
||||||
|
`cache_size` bigint(21) unsigned NOT NULL,
|
||||||
|
`cycle_option` tinyint(1) unsigned NOT NULL COMMENT '0 if no cycles are allowed, 1 if the sequence should begin a new cycle when maximum_value is passed',
|
||||||
|
`cycle_count` bigint(21) NOT NULL COMMENT 'How many cycles have been done'
|
||||||
|
) ENGINE=InnoDB SEQUENCE=1
|
||||||
|
SELECT NEXT VALUE FOR seq_test;
|
||||||
|
NEXT VALUE FOR seq_test
|
||||||
|
1
|
||||||
|
SELECT NEXT VALUE FOR seq_test;
|
||||||
|
NEXT VALUE FOR seq_test
|
||||||
|
3
|
||||||
|
connection node_2;
|
||||||
|
DROP SEQUENCE seq_test;
|
||||||
137
mysql-test/suite/galera/r/galera_as_slave_with_filtering.result
Normal file
137
mysql-test/suite/galera/r/galera_as_slave_with_filtering.result
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||||
|
connection node_2;
|
||||||
|
START SLAVE;
|
||||||
|
connection node_3;
|
||||||
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t3 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
connection node_2;
|
||||||
|
connection node_1;
|
||||||
|
#
|
||||||
|
# Set up replication filtering this should work for slave
|
||||||
|
#
|
||||||
|
connection node_2;
|
||||||
|
STOP SLAVE;
|
||||||
|
SET GLOBAL replicate_ignore_table='test.t2,mysql.gtid_slave_pos';
|
||||||
|
SELECT @@replicate_ignore_table;
|
||||||
|
@@replicate_ignore_table
|
||||||
|
mysql.gtid_slave_pos,test.t2
|
||||||
|
START SLAVE;
|
||||||
|
#
|
||||||
|
# Set up replication filtering, this should not have any effect
|
||||||
|
#
|
||||||
|
connection node_1;
|
||||||
|
SET GLOBAL replicate_ignore_table='test.t2,mysql.gtid_slave_pos';
|
||||||
|
SELECT @@replicate_ignore_table;
|
||||||
|
@@replicate_ignore_table
|
||||||
|
mysql.gtid_slave_pos,test.t2
|
||||||
|
#
|
||||||
|
# Insert data to MariaDB master, inserts to t2 should not be on slave
|
||||||
|
#
|
||||||
|
connection node_3;
|
||||||
|
INSERT INTO t1 SELECT * FROM seq_1_to_100;
|
||||||
|
INSERT INTO t2 SELECT * FROM seq_1_to_100;
|
||||||
|
INSERT INTO t3 SELECT * FROM seq_1_to_100;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
COUNT(*)
|
||||||
|
100
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
COUNT(*)
|
||||||
|
100
|
||||||
|
SELECT COUNT(*) FROM t3;
|
||||||
|
COUNT(*)
|
||||||
|
100
|
||||||
|
connection node_2;
|
||||||
|
SELECT COUNT(*) AS EXPECT_100 FROM t1;
|
||||||
|
EXPECT_100
|
||||||
|
100
|
||||||
|
SELECT COUNT(*) AS EXPECT_0 FROM t2;
|
||||||
|
EXPECT_0
|
||||||
|
0
|
||||||
|
SELECT COUNT(*) AS EXPECT_100 FROM t3;
|
||||||
|
EXPECT_100
|
||||||
|
100
|
||||||
|
#
|
||||||
|
# Insert data to Galera node_2, all these should be replicated
|
||||||
|
#
|
||||||
|
INSERT INTO t1 SELECT * FROM seq_101_to_200;
|
||||||
|
INSERT INTO t2 SELECT * FROM seq_101_to_200;
|
||||||
|
INSERT INTO t3 SELECT * FROM seq_101_to_200;
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t1;
|
||||||
|
EXPECT_200
|
||||||
|
200
|
||||||
|
SELECT COUNT(*) AS EXPECT_100 FROM t2;
|
||||||
|
EXPECT_100
|
||||||
|
100
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t3;
|
||||||
|
EXPECT_200
|
||||||
|
200
|
||||||
|
connection node_1;
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t1;
|
||||||
|
EXPECT_200
|
||||||
|
200
|
||||||
|
SELECT COUNT(*) AS EXPECT_100 FROM t2;
|
||||||
|
EXPECT_100
|
||||||
|
100
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t3;
|
||||||
|
EXPECT_200
|
||||||
|
200
|
||||||
|
#
|
||||||
|
# Insert data to Galera node_1, all these should be replicated
|
||||||
|
#
|
||||||
|
INSERT INTO t1 SELECT * FROM seq_201_to_300;
|
||||||
|
INSERT INTO t2 SELECT * FROM seq_201_to_300;
|
||||||
|
INSERT INTO t3 SELECT * FROM seq_201_to_300;
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t1;
|
||||||
|
EXPECT_300
|
||||||
|
300
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t2;
|
||||||
|
EXPECT_200
|
||||||
|
200
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t3;
|
||||||
|
EXPECT_300
|
||||||
|
300
|
||||||
|
connection node_3;
|
||||||
|
SELECT @@GLOBAL.gtid_slave_pos;
|
||||||
|
@@GLOBAL.gtid_slave_pos
|
||||||
|
|
||||||
|
connection node_1;
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t1;
|
||||||
|
EXPECT_300
|
||||||
|
300
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t2;
|
||||||
|
EXPECT_200
|
||||||
|
200
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t3;
|
||||||
|
EXPECT_300
|
||||||
|
300
|
||||||
|
SELECT @@GLOBAL.gtid_slave_pos;
|
||||||
|
@@GLOBAL.gtid_slave_pos
|
||||||
|
0-3-6
|
||||||
|
connection node_2;
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t1;
|
||||||
|
EXPECT_300
|
||||||
|
300
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t2;
|
||||||
|
EXPECT_200
|
||||||
|
200
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t3;
|
||||||
|
EXPECT_300
|
||||||
|
300
|
||||||
|
SELECT @@GLOBAL.gtid_slave_pos;
|
||||||
|
@@GLOBAL.gtid_slave_pos
|
||||||
|
0-3-6
|
||||||
|
connection node_2;
|
||||||
|
STOP SLAVE;
|
||||||
|
RESET SLAVE ALL;
|
||||||
|
SET GLOBAL replicate_ignore_table='';
|
||||||
|
connection node_1;
|
||||||
|
SET GLOBAL replicate_ignore_table='';
|
||||||
|
connection node_3;
|
||||||
|
DROP TABLE t1,t2,t3;
|
||||||
|
connection node_2;
|
||||||
|
DROP TABLE t1,t2,t3;
|
||||||
|
connection node_3;
|
||||||
|
RESET MASTER;
|
||||||
@@ -198,7 +198,7 @@ wsrep_auto_increment_control ON
|
|||||||
SET GLOBAL wsrep_auto_increment_control='OFF';
|
SET GLOBAL wsrep_auto_increment_control='OFF';
|
||||||
show variables like '%auto_increment%';
|
show variables like '%auto_increment%';
|
||||||
Variable_name Value
|
Variable_name Value
|
||||||
auto_increment_increment 1
|
auto_increment_increment 2
|
||||||
auto_increment_offset 2
|
auto_increment_offset 2
|
||||||
wsrep_auto_increment_control OFF
|
wsrep_auto_increment_control OFF
|
||||||
SET GLOBAL wsrep_auto_increment_control='ON';
|
SET GLOBAL wsrep_auto_increment_control='ON';
|
||||||
|
|||||||
@@ -94,8 +94,6 @@ ALTER TABLE t1 ADD COLUMN v2 int;
|
|||||||
ALTER TABLE t2 ADD COLUMN v2 int;
|
ALTER TABLE t2 ADD COLUMN v2 int;
|
||||||
ERROR HY000: Galera replication not supported
|
ERROR HY000: Galera replication not supported
|
||||||
INSERT INTO t1 VALUES (1,1),(2,2);
|
INSERT INTO t1 VALUES (1,1),(2,2);
|
||||||
Warnings:
|
|
||||||
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine partition for table 'test'.'t1' is not supported in Galera
|
|
||||||
INSERT INTO t2 VALUES (1),(2);
|
INSERT INTO t2 VALUES (1),(2);
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine partition for table 'test'.'t2' is not supported in Galera
|
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine partition for table 'test'.'t2' is not supported in Galera
|
||||||
@@ -104,8 +102,6 @@ ERROR HY000: Galera replication not supported
|
|||||||
ALTER TABLE t2 ADD COLUMN v3 int, ENGINE=Aria;
|
ALTER TABLE t2 ADD COLUMN v3 int, ENGINE=Aria;
|
||||||
ERROR HY000: Galera replication not supported
|
ERROR HY000: Galera replication not supported
|
||||||
UPDATE t1 SET v2 = v2 + 3;
|
UPDATE t1 SET v2 = v2 + 3;
|
||||||
Warnings:
|
|
||||||
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine partition for table 'test'.'t1' is not supported in Galera
|
|
||||||
UPDATE t2 SET v1 = v1 + 3;
|
UPDATE t2 SET v1 = v1 + 3;
|
||||||
Warnings:
|
Warnings:
|
||||||
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine partition for table 'test'.'t2' is not supported in Galera
|
Warning 1290 WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine partition for table 'test'.'t2' is not supported in Galera
|
||||||
@@ -173,4 +169,61 @@ SELECT @@wsrep_mode;
|
|||||||
STRICT_REPLICATION
|
STRICT_REPLICATION
|
||||||
ALTER TABLE t2 ENGINE=InnoDB;
|
ALTER TABLE t2 ENGINE=InnoDB;
|
||||||
DROP TABLE t2;
|
DROP TABLE t2;
|
||||||
SET GLOBAL wsrep_mode = DEFAULT;
|
connection node_1;
|
||||||
|
#
|
||||||
|
# MDEV-37373 InnoDB partition table disallow local GTIDs in galera
|
||||||
|
# wsrep-mode= DISALLOW_LOCAL_GTID
|
||||||
|
#
|
||||||
|
SET GLOBAL wsrep_mode = "DISALLOW_LOCAL_GTID";
|
||||||
|
SELECT @@wsrep_mode;
|
||||||
|
@@wsrep_mode
|
||||||
|
DISALLOW_LOCAL_GTID
|
||||||
|
CREATE TABLE `sales` (
|
||||||
|
`customer_id` int(11) NOT NULL,
|
||||||
|
`customer_name` varchar(40) DEFAULT NULL,
|
||||||
|
`store_id` varchar(20) NOT NULL,
|
||||||
|
`bill_number` int(11) NOT NULL,
|
||||||
|
`bill_date` date NOT NULL,
|
||||||
|
`amount` decimal(8,2) NOT NULL,
|
||||||
|
PRIMARY KEY (`bill_date`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
||||||
|
PARTITION BY RANGE (year(`bill_date`))
|
||||||
|
(PARTITION `p0` VALUES LESS THAN (2016) ENGINE = InnoDB,
|
||||||
|
PARTITION `p1` VALUES LESS THAN (2017) ENGINE = InnoDB,
|
||||||
|
PARTITION `p2` VALUES LESS THAN (2018) ENGINE = InnoDB,
|
||||||
|
PARTITION `p3` VALUES LESS THAN (2020) ENGINE = InnoDB);
|
||||||
|
INSERT INTO sales
|
||||||
|
VALUES (1, 'Michael', 'S001', 101, '2015-01-02', 125.56),
|
||||||
|
(2, 'Jim', 'S003', 103, '2015-01-25', 476.50),
|
||||||
|
(3, 'Dwight', 'S012', 122, '2016-02-15', 335.00),
|
||||||
|
(4, 'Andy', 'S345', 121, '2016-03-26', 787.00),
|
||||||
|
(5, 'Pam', 'S234', 132, '2017-04-19', 678.00),
|
||||||
|
(6, 'Karen', 'S743', 111, '2017-05-31', 864.00),
|
||||||
|
(7, 'Toby', 'S234', 115, '2018-06-11', 762.00),
|
||||||
|
(8, 'Oscar', 'S012', 125, '2019-07-24', 300.00),
|
||||||
|
(9, 'Darryl', 'S456', 119, '2019-08-02', 492.20);
|
||||||
|
SELECT * FROM sales;
|
||||||
|
customer_id customer_name store_id bill_number bill_date amount
|
||||||
|
1 Michael S001 101 2015-01-02 125.56
|
||||||
|
2 Jim S003 103 2015-01-25 476.50
|
||||||
|
3 Dwight S012 122 2016-02-15 335.00
|
||||||
|
4 Andy S345 121 2016-03-26 787.00
|
||||||
|
5 Pam S234 132 2017-04-19 678.00
|
||||||
|
6 Karen S743 111 2017-05-31 864.00
|
||||||
|
7 Toby S234 115 2018-06-11 762.00
|
||||||
|
8 Oscar S012 125 2019-07-24 300.00
|
||||||
|
9 Darryl S456 119 2019-08-02 492.20
|
||||||
|
SET GLOBAL wsrep_mode=DEFAULT;
|
||||||
|
connection node_2;
|
||||||
|
SELECT * FROM sales;
|
||||||
|
customer_id customer_name store_id bill_number bill_date amount
|
||||||
|
1 Michael S001 101 2015-01-02 125.56
|
||||||
|
2 Jim S003 103 2015-01-25 476.50
|
||||||
|
3 Dwight S012 122 2016-02-15 335.00
|
||||||
|
4 Andy S345 121 2016-03-26 787.00
|
||||||
|
5 Pam S234 132 2017-04-19 678.00
|
||||||
|
6 Karen S743 111 2017-05-31 864.00
|
||||||
|
7 Toby S234 115 2018-06-11 762.00
|
||||||
|
8 Oscar S012 125 2019-07-24 300.00
|
||||||
|
9 Darryl S456 119 2019-08-02 492.20
|
||||||
|
DROP TABLE sales;
|
||||||
|
|||||||
@@ -35,15 +35,6 @@ EXPECT_3
|
|||||||
SELECT COUNT(*) AS EXPECT_2 FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME = 't1';
|
SELECT COUNT(*) AS EXPECT_2 FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME = 't1';
|
||||||
EXPECT_2
|
EXPECT_2
|
||||||
2
|
2
|
||||||
SHOW CREATE TABLE t1;
|
|
||||||
Table Create Table
|
|
||||||
t1 CREATE TABLE `t1` (
|
|
||||||
`f1` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`f2` int(11) DEFAULT NULL,
|
|
||||||
`f3` int(11) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`f1`),
|
|
||||||
UNIQUE KEY `i1` (`f2`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=2002 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|
||||||
SELECT COUNT(*) AS EXPECT_1001 FROM t1;
|
SELECT COUNT(*) AS EXPECT_1001 FROM t1;
|
||||||
EXPECT_1001
|
EXPECT_1001
|
||||||
1001
|
1001
|
||||||
@@ -54,15 +45,6 @@ EXPECT_3
|
|||||||
SELECT COUNT(*) AS EXPECT_2 FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME = 't1';
|
SELECT COUNT(*) AS EXPECT_2 FROM INFORMATION_SCHEMA.STATISTICS WHERE TABLE_NAME = 't1';
|
||||||
EXPECT_2
|
EXPECT_2
|
||||||
2
|
2
|
||||||
SHOW CREATE TABLE t1;
|
|
||||||
Table Create Table
|
|
||||||
t1 CREATE TABLE `t1` (
|
|
||||||
`f1` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`f2` int(11) DEFAULT NULL,
|
|
||||||
`f3` int(11) DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`f1`),
|
|
||||||
UNIQUE KEY `i1` (`f2`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=2047 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
|
|
||||||
SELECT COUNT(*) AS EXPECT_1001 FROM t1;
|
SELECT COUNT(*) AS EXPECT_1001 FROM t1;
|
||||||
EXPECT_1001
|
EXPECT_1001
|
||||||
1001
|
1001
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
|
--source include/no_protocol.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
--source include/force_restart.inc
|
--source include/force_restart.inc
|
||||||
|
|
||||||
|
|||||||
32
mysql-test/suite/galera/t/MDEV-30418.test
Normal file
32
mysql-test/suite/galera/t/MDEV-30418.test
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
--source include/galera_cluster.inc
|
||||||
|
|
||||||
|
# Save original auto_increment_offset values.
|
||||||
|
--let $node_1=node_1
|
||||||
|
--let $node_2=node_2
|
||||||
|
--source ../galera/include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
select @@wsrep_slave_threads;
|
||||||
|
SET @cluster_address_orig = @@wsrep_cluster_address;
|
||||||
|
SET GLOBAL wsrep_cluster_address=AUTO;
|
||||||
|
--error ER_WRONG_VALUE_FOR_VAR
|
||||||
|
SET GLOBAL wsrep_slave_threads=12;
|
||||||
|
SHOW WARNINGS;
|
||||||
|
SET GLOBAL wsrep_cluster_address=ON;
|
||||||
|
--error ER_WRONG_VALUE_FOR_VAR
|
||||||
|
SET GLOBAL wsrep_slave_threads=0;
|
||||||
|
SHOW WARNINGS;
|
||||||
|
SET GLOBAL wsrep_cluster_address='a';
|
||||||
|
--error ER_WRONG_VALUE_FOR_VAR
|
||||||
|
SET GLOBAL wsrep_slave_threads=2;
|
||||||
|
SHOW WARNINGS;
|
||||||
|
--disable_query_log
|
||||||
|
SET GLOBAL wsrep_cluster_address = @cluster_address_orig;
|
||||||
|
--enable_query_log
|
||||||
|
select @@wsrep_slave_threads;
|
||||||
|
show status like 'wsrep_cluster_size';
|
||||||
|
show status like 'wsrep_cluster_status';
|
||||||
|
call mtr.add_suppression("WSREP:.*");
|
||||||
|
|
||||||
|
# Restore original auto_increment_offset values.
|
||||||
|
--source ../galera/include/auto_increment_offset_restore.inc
|
||||||
53
mysql-test/suite/galera/t/MDEV-37366.test
Normal file
53
mysql-test/suite/galera/t/MDEV-37366.test
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
#
|
||||||
|
# MDEV-37366: Inconsistency detected - create sequence
|
||||||
|
# Failed 'SELECT NEXT VALUE' on applier node.
|
||||||
|
#
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/big_test.inc
|
||||||
|
--source include/have_log_bin.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Save original auto_increment_offset values.
|
||||||
|
#
|
||||||
|
--let $node_1=node_1
|
||||||
|
--let $node_2=node_2
|
||||||
|
--source ../galera/include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify there are two nodes in galera cluster.
|
||||||
|
#
|
||||||
|
--connection node_1
|
||||||
|
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create a sequence table on node1.
|
||||||
|
#
|
||||||
|
SET SESSION binlog_row_image=minimal;
|
||||||
|
CREATE SEQUENCE `seq_test` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 0 cache 1000 nocycle ENGINE=InnoDB;
|
||||||
|
SHOW CREATE TABLE seq_test;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Execute 'SELECT NEXT VALUE' which should not fail on applier node.
|
||||||
|
#
|
||||||
|
--disable_ps_protocol
|
||||||
|
SELECT NEXT VALUE FOR seq_test;
|
||||||
|
SELECT NEXT VALUE FOR seq_test;
|
||||||
|
--enable_ps_protocol
|
||||||
|
|
||||||
|
#
|
||||||
|
# Verify there are two nodes in galera cluster.
|
||||||
|
#
|
||||||
|
--let $wait_condition = SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size'
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
#
|
||||||
|
# Cleanup
|
||||||
|
#
|
||||||
|
--connection node_2
|
||||||
|
|
||||||
|
DROP SEQUENCE seq_test;
|
||||||
|
|
||||||
|
# Restore original variable values.
|
||||||
|
--source ../galera/include/auto_increment_offset_restore.inc
|
||||||
11
mysql-test/suite/galera/t/galera_as_slave_with_filtering.cnf
Normal file
11
mysql-test/suite/galera/t/galera_as_slave_with_filtering.cnf
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
!include ../galera_2nodes_as_slave.cnf
|
||||||
|
|
||||||
|
[mariadbd.1]
|
||||||
|
wsrep-gtid-mode=ON
|
||||||
|
log-bin
|
||||||
|
log-slave-updates
|
||||||
|
|
||||||
|
[mariadbd.2]
|
||||||
|
wsrep-gtid-mode=ON
|
||||||
|
log-bin
|
||||||
|
log-slave-updates
|
||||||
146
mysql-test/suite/galera/t/galera_as_slave_with_filtering.test
Normal file
146
mysql-test/suite/galera/t/galera_as_slave_with_filtering.test
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
#
|
||||||
|
# Test Galera as a slave to a MySQL master
|
||||||
|
#
|
||||||
|
# The galera/galera_2node_slave.cnf describes the setup of the nodes
|
||||||
|
#
|
||||||
|
# mariadb master (node_3) ----async replication--->galera node_2 <---galera replication-->node_1
|
||||||
|
#
|
||||||
|
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_sequence.inc
|
||||||
|
|
||||||
|
# As node #3 is not a Galera node, and galera_cluster.inc does not open connetion to it
|
||||||
|
# we open the node_3 connection here
|
||||||
|
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--disable_query_log
|
||||||
|
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0, MASTER_PORT=$NODE_MYPORT_3;
|
||||||
|
--enable_query_log
|
||||||
|
START SLAVE;
|
||||||
|
|
||||||
|
--connection node_3
|
||||||
|
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t2 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t3 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't3';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't2';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't3';
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Set up replication filtering this should work for slave
|
||||||
|
--echo #
|
||||||
|
--connection node_2
|
||||||
|
STOP SLAVE;
|
||||||
|
SET GLOBAL replicate_ignore_table='test.t2,mysql.gtid_slave_pos';
|
||||||
|
SELECT @@replicate_ignore_table;
|
||||||
|
--disable_query_log
|
||||||
|
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_SSL_VERIFY_SERVER_CERT=0, MASTER_PORT=$NODE_MYPORT_3;
|
||||||
|
--enable_query_log
|
||||||
|
START SLAVE;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Set up replication filtering, this should not have any effect
|
||||||
|
--echo #
|
||||||
|
--connection node_1
|
||||||
|
SET GLOBAL replicate_ignore_table='test.t2,mysql.gtid_slave_pos';
|
||||||
|
SELECT @@replicate_ignore_table;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Insert data to MariaDB master, inserts to t2 should not be on slave
|
||||||
|
--echo #
|
||||||
|
--connection node_3
|
||||||
|
INSERT INTO t1 SELECT * FROM seq_1_to_100;
|
||||||
|
INSERT INTO t2 SELECT * FROM seq_1_to_100;
|
||||||
|
INSERT INTO t3 SELECT * FROM seq_1_to_100;
|
||||||
|
SELECT COUNT(*) FROM t1;
|
||||||
|
SELECT COUNT(*) FROM t2;
|
||||||
|
SELECT COUNT(*) FROM t3;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 100 FROM t1;
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 100 FROM t3;
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
|
||||||
|
SELECT COUNT(*) AS EXPECT_100 FROM t1;
|
||||||
|
SELECT COUNT(*) AS EXPECT_0 FROM t2;
|
||||||
|
SELECT COUNT(*) AS EXPECT_100 FROM t3;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Insert data to Galera node_2, all these should be replicated
|
||||||
|
--echo #
|
||||||
|
INSERT INTO t1 SELECT * FROM seq_101_to_200;
|
||||||
|
INSERT INTO t2 SELECT * FROM seq_101_to_200;
|
||||||
|
INSERT INTO t3 SELECT * FROM seq_101_to_200;
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t1;
|
||||||
|
SELECT COUNT(*) AS EXPECT_100 FROM t2;
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t3;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 200 FROM t3;
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t1;
|
||||||
|
SELECT COUNT(*) AS EXPECT_100 FROM t2;
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t3;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Insert data to Galera node_1, all these should be replicated
|
||||||
|
--echo #
|
||||||
|
INSERT INTO t1 SELECT * FROM seq_201_to_300;
|
||||||
|
INSERT INTO t2 SELECT * FROM seq_201_to_300;
|
||||||
|
INSERT INTO t3 SELECT * FROM seq_201_to_300;
|
||||||
|
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t1;
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t2;
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t3;
|
||||||
|
|
||||||
|
--connection node_3
|
||||||
|
SELECT @@GLOBAL.gtid_slave_pos;
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 300 FROM t3;
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t1;
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t2;
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t3;
|
||||||
|
SELECT @@GLOBAL.gtid_slave_pos;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
--let $wait_condition = SELECT COUNT(*) = 300 FROM t3;
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t1;
|
||||||
|
SELECT COUNT(*) AS EXPECT_200 FROM t2;
|
||||||
|
SELECT COUNT(*) AS EXPECT_300 FROM t3;
|
||||||
|
SELECT @@GLOBAL.gtid_slave_pos;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
STOP SLAVE;
|
||||||
|
RESET SLAVE ALL;
|
||||||
|
SET GLOBAL replicate_ignore_table='';
|
||||||
|
|
||||||
|
--connection node_1
|
||||||
|
SET GLOBAL replicate_ignore_table='';
|
||||||
|
|
||||||
|
--connection node_3
|
||||||
|
DROP TABLE t1,t2,t3;
|
||||||
|
|
||||||
|
--connection node_2
|
||||||
|
DROP TABLE t1,t2,t3;
|
||||||
|
|
||||||
|
--connection node_3
|
||||||
|
RESET MASTER;
|
||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
[mysqld.1]
|
[mysqld.1]
|
||||||
auto_increment_offset=1
|
auto_increment_offset=1
|
||||||
auto_increment_increment=1
|
auto_increment_increment=2
|
||||||
|
|
||||||
[mysqld.2]
|
[mysqld.2]
|
||||||
auto_increment_offset=2
|
auto_increment_offset=2
|
||||||
auto_increment_increment=1
|
auto_increment_increment=2
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
--source include/force_restart.inc
|
--source include/force_restart.inc
|
||||||
|
|
||||||
# Make sure that the test is operating on the right version of galera library.
|
# Make sure that the test is operating on the right version of galera library.
|
||||||
--let $galera_version=26.4.21
|
--let $galera_version=26.4.23
|
||||||
source ../wsrep/include/check_galera_version.inc;
|
source ../wsrep/include/check_galera_version.inc;
|
||||||
|
|
||||||
# Global Variables
|
# Global Variables
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
[mysqld.1]
|
[mysqld.1]
|
||||||
auto_increment_offset=1
|
auto_increment_offset=1
|
||||||
auto_increment_increment=1
|
auto_increment_increment=2
|
||||||
|
|
||||||
[mysqld.2]
|
[mysqld.2]
|
||||||
auto_increment_offset=2
|
auto_increment_offset=2
|
||||||
auto_increment_increment=1
|
auto_increment_increment=2
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user