Merge 10.4 into 10.5

This commit is contained in:
Marko Mäkelä 2019-12-16 07:47:17 +02:00
commit 28c89b7151
376 changed files with 6928 additions and 5364 deletions

32
.gitignore vendored
View File

@ -9,6 +9,7 @@
*.ninja
.ninja_*
.gdb_history
.vs/
errmsg.sys
typescript
_CPack_Packages
@ -138,6 +139,10 @@ scripts/maria_add_gis_sp.sql
scripts/maria_add_gis_sp_bootstrap.sql
scripts/galera_new_cluster
scripts/galera_recovery
scripts/mysql_convert_table_format.pl
scripts/mysqld_multi.pl
scripts/mysqldumpslow.pl
scripts/mysqlhotcopy.pl
sql-bench/bench-count-distinct
sql-bench/bench-init.pl
sql-bench/compare-results
@ -162,6 +167,30 @@ sql-bench/test-select
sql-bench/test-table-elimination
sql-bench/test-transactions
sql-bench/test-wisconsin
sql-bench/bench-count-distinct.pl
sql-bench/compare-results.pl
sql-bench/copy-db.pl
sql-bench/crash-me.pl
sql-bench/graph-compare-results.pl
sql-bench/innotest1.pl
sql-bench/innotest1a.pl
sql-bench/innotest1b.pl
sql-bench/innotest2.pl
sql-bench/innotest2a.pl
sql-bench/innotest2b.pl
sql-bench/run-all-tests.pl
sql-bench/server-cfg.pl
sql-bench/test-ATIS.pl
sql-bench/test-alter-table.pl
sql-bench/test-big-tables.pl
sql-bench/test-connect.pl
sql-bench/test-create.pl
sql-bench/test-insert.pl
sql-bench/test-select.pl
sql-bench/test-table-elimination.pl
sql-bench/test-transactions.pl
sql-bench/test-wisconsin.pl
sql/make_mysqld_lib.cmake
sql/lex_token.h
sql/gen_lex_token
sql/gen_lex_hash
@ -592,3 +621,6 @@ sql/mariadb-tzinfo-to-sql
sql/mariadbd
storage/rocksdb/mariadb-ldb
tests/mariadb-client-test
versioninfo_dll.rc
versioninfo_exe.rc
win/packaging/ca/symlinks.cc

View File

@ -3207,7 +3207,7 @@ static int
com_go(String *buffer,char *line __attribute__((unused)))
{
char buff[200]; /* about 110 chars used so far */
char time_buff[53+3+1]; /* time max + space&parens + NUL */
char time_buff[53+3+1]; /* time max + space & parens + NUL */
MYSQL_RES *result;
ulonglong timer;
ulong warnings= 0;
@ -3227,7 +3227,7 @@ com_go(String *buffer,char *line __attribute__((unused)))
if (buffer->is_empty())
{
if (status.batch) // Ignore empty quries
if (status.batch) // Ignore empty queries.
return 0;
return put_info("No query specified\n",INFO_ERROR);
@ -3292,7 +3292,7 @@ com_go(String *buffer,char *line __attribute__((unused)))
else
time_buff[0]= '\0';
/* Every branch must truncate buff . */
/* Every branch must truncate buff. */
if (result)
{
if (!mysql_num_rows(result) && ! quick && !column_types_flag)

View File

@ -4587,7 +4587,7 @@ static int dump_databases(char **db_names)
/*
View Specific database initalization.
View Specific database initialization.
SYNOPSIS
init_dumping_views
@ -4604,7 +4604,7 @@ int init_dumping_views(char *qdatabase __attribute__((unused)))
/*
Table Specific database initalization.
Table Specific database initialization.
SYNOPSIS
init_dumping_tables

View File

@ -324,8 +324,36 @@ static void DbugVfprintf(FILE *stream, const char* format, va_list args);
*/
#include <my_pthread.h>
/*
** Protects writing to all file descriptors, init_settings.keywords
** pointer and it's pointee - a linked list with keywords.
*/
static pthread_mutex_t THR_LOCK_dbug;
static void LockMutex(CODE_STATE *cs)
{
if (!cs->locked)
pthread_mutex_lock(&THR_LOCK_dbug);
cs->locked++;
}
static void UnlockMutex(CODE_STATE *cs)
{
--cs->locked;
assert(cs->locked >= 0);
if (cs->locked == 0)
pthread_mutex_unlock(&THR_LOCK_dbug);
}
static void LockIfInitSettings(CODE_STATE *cs)
{
if (cs->stack == &init_settings)
LockMutex(cs);
}
static void UnlockIfInitSettings(CODE_STATE *cs)
{
if (cs->stack == &init_settings)
UnlockMutex(cs);
}
static CODE_STATE *code_state(void)
{
CODE_STATE *cs, **cs_ptr;
@ -453,16 +481,9 @@ static int DbugParse(CODE_STATE *cs, const char *control)
const char *end;
int rel, f_used=0;
struct settings *stack;
int org_cs_locked;
stack= cs->stack;
if (!(org_cs_locked= cs->locked))
{
pthread_mutex_lock(&THR_LOCK_dbug);
cs->locked= 1;
}
if (control[0] == '-' && control[1] == '#')
control+=2;
@ -476,7 +497,9 @@ static int DbugParse(CODE_STATE *cs, const char *control)
stack->sub_level= 0;
stack->out_file= sstderr;
stack->functions= NULL;
LockIfInitSettings(cs);
stack->keywords= NULL;
UnlockIfInitSettings(cs);
stack->processes= NULL;
}
else if (!stack->out_file)
@ -492,7 +515,9 @@ static int DbugParse(CODE_STATE *cs, const char *control)
{
/* never share with the global parent - it can change under your feet */
stack->functions= ListCopy(init_settings.functions);
LockMutex(cs);
stack->keywords= ListCopy(init_settings.keywords);
UnlockMutex(cs);
stack->processes= ListCopy(init_settings.processes);
}
else
@ -516,21 +541,31 @@ static int DbugParse(CODE_STATE *cs, const char *control)
case 'd':
if (sign < 0 && control == end)
{
LockIfInitSettings(cs);
if (!is_shared(stack, keywords))
FreeList(stack->keywords);
stack->keywords=NULL;
UnlockIfInitSettings(cs);
stack->flags &= ~DEBUG_ON;
break;
}
LockIfInitSettings(cs);
if (rel && is_shared(stack, keywords))
stack->keywords= ListCopy(stack->keywords);
UnlockIfInitSettings(cs);
if (sign < 0)
{
if (DEBUGGING)
{
LockIfInitSettings(cs);
stack->keywords= ListDel(stack->keywords, control, end);
UnlockIfInitSettings(cs);
}
break;
}
LockIfInitSettings(cs);
stack->keywords= ListAdd(stack->keywords, control, end);
UnlockIfInitSettings(cs);
stack->flags |= DEBUG_ON;
break;
case 'D':
@ -665,11 +700,6 @@ static int DbugParse(CODE_STATE *cs, const char *control)
control=end+1;
end= DbugStrTok(control);
}
if (!org_cs_locked)
{
cs->locked= 0;
pthread_mutex_unlock(&THR_LOCK_dbug);
}
return !rel || f_used;
}
@ -1002,7 +1032,9 @@ int _db_explain_ (CODE_STATE *cs, char *buf, size_t len)
get_code_state_if_not_set_or_return *buf=0;
LockIfInitSettings(cs);
op_list_to_buf('d', cs->stack->keywords, DEBUGGING);
UnlockIfInitSettings(cs);
op_int_to_buf ('D', cs->stack->delay, 0);
op_list_to_buf('f', cs->stack->functions, cs->stack->functions);
op_bool_to_buf('F', cs->stack->flags & FILE_ON);
@ -1097,7 +1129,6 @@ int _db_explain_init_(char *buf, size_t len)
void _db_enter_(const char *_func_, const char *_file_,
uint _line_, struct _db_stack_frame_ *_stack_frame_)
{
int save_errno, org_cs_locked;
CODE_STATE *cs;
if (!((cs=code_state())))
{
@ -1105,7 +1136,6 @@ void _db_enter_(const char *_func_, const char *_file_,
_stack_frame_->prev= 0;
return;
}
save_errno= errno;
_stack_frame_->line= -1;
_stack_frame_->func= cs->func;
@ -1126,20 +1156,14 @@ void _db_enter_(const char *_func_, const char *_file_,
cs->stack->flags &= ~SANITY_CHECK_ON;
if (TRACING)
{
if (!(org_cs_locked= cs->locked))
{
pthread_mutex_lock(&THR_LOCK_dbug);
cs->locked= 1;
}
int save_errno= errno;
LockMutex(cs);
DoPrefix(cs, _line_);
Indent(cs, cs->level);
(void) fprintf(cs->stack->out_file->file, ">%s\n", cs->func);
DbugFlush(cs); /* This does a unlock */
if (!org_cs_locked)
{
cs->locked= 0;
pthread_mutex_unlock(&THR_LOCK_dbug);
}
UnlockMutex(cs);
DbugFlush(cs);
errno=save_errno;
}
break;
case DISABLE_TRACE:
@ -1148,7 +1172,6 @@ void _db_enter_(const char *_func_, const char *_file_,
case DONT_TRACE:
break;
}
errno=save_errno;
}
/*
@ -1173,7 +1196,6 @@ void _db_enter_(const char *_func_, const char *_file_,
void _db_return_(struct _db_stack_frame_ *_stack_frame_)
{
int save_errno=errno;
uint _slevel_= _stack_frame_->level & ~TRACE_ON;
CODE_STATE *cs;
get_code_state_or_return;
@ -1190,25 +1212,18 @@ void _db_return_(struct _db_stack_frame_ *_stack_frame_)
if (DoTrace(cs) & DO_TRACE)
{
int org_cs_locked;
if ((cs->stack->flags & SANITY_CHECK_ON) && (*dbug_sanity)())
cs->stack->flags &= ~SANITY_CHECK_ON;
if (TRACING)
{
if (!(org_cs_locked= cs->locked))
{
pthread_mutex_lock(&THR_LOCK_dbug);
cs->locked= 1;
}
int save_errno=errno;
LockMutex(cs);
DoPrefix(cs, _stack_frame_->line);
Indent(cs, cs->level);
(void) fprintf(cs->stack->out_file->file, "<%s\n", cs->func);
UnlockMutex(cs);
DbugFlush(cs);
if (!org_cs_locked)
{
cs->locked= 0;
pthread_mutex_unlock(&THR_LOCK_dbug);
}
errno=save_errno;
}
}
/*
@ -1220,7 +1235,6 @@ void _db_return_(struct _db_stack_frame_ *_stack_frame_)
cs->file= _stack_frame_->file;
if (cs->framep != NULL)
cs->framep= cs->framep->prev;
errno=save_errno;
}
@ -1285,18 +1299,14 @@ void _db_doprnt_(const char *format,...)
{
va_list args;
CODE_STATE *cs;
int save_errno, org_cs_locked;
int save_errno;
get_code_state_or_return;
va_start(args,format);
if (!(org_cs_locked= cs->locked))
{
pthread_mutex_lock(&THR_LOCK_dbug);
cs->locked= 1;
}
save_errno=errno;
LockMutex(cs);
DoPrefix(cs, cs->u_line);
if (TRACING)
Indent(cs, cs->level + 1);
@ -1304,12 +1314,8 @@ void _db_doprnt_(const char *format,...)
(void) fprintf(cs->stack->out_file->file, "%s: ", cs->func);
(void) fprintf(cs->stack->out_file->file, "%s: ", cs->u_keyword);
DbugVfprintf(cs->stack->out_file->file, format, args);
UnlockMutex(cs);
DbugFlush(cs);
if (!org_cs_locked)
{
cs->locked= 0;
pthread_mutex_unlock(&THR_LOCK_dbug);
}
errno=save_errno;
va_end(args);
@ -1349,17 +1355,13 @@ static void DbugVfprintf(FILE *stream, const char* format, va_list args)
void _db_dump_(uint _line_, const char *keyword,
const unsigned char *memory, size_t length)
{
int pos, org_cs_locked;
int pos;
CODE_STATE *cs;
get_code_state_or_return;
if (!(org_cs_locked= cs->locked))
{
pthread_mutex_lock(&THR_LOCK_dbug);
cs->locked= 1;
}
if (_db_keyword_(cs, keyword, 0))
{
LockMutex(cs);
DoPrefix(cs, _line_);
if (TRACING)
{
@ -1387,13 +1389,9 @@ void _db_dump_(uint _line_, const char *keyword,
fputc(' ',cs->stack->out_file->file);
}
(void) fputc('\n',cs->stack->out_file->file);
UnlockMutex(cs);
DbugFlush(cs);
}
if (!org_cs_locked)
{
cs->locked= 0;
pthread_mutex_unlock(&THR_LOCK_dbug);
}
}
@ -1621,8 +1619,13 @@ static void PushState(CODE_STATE *cs)
static void FreeState(CODE_STATE *cs, int free_state)
{
struct settings *state= cs->stack;
LockIfInitSettings(cs);
if (!is_shared(state, keywords))
{
FreeList(state->keywords);
state->keywords= NULL;
}
UnlockIfInitSettings(cs);
if (!is_shared(state, functions))
FreeList(state->functions);
if (!is_shared(state, processes))
@ -1701,8 +1704,6 @@ void _db_end_()
static int DoTrace(CODE_STATE *cs)
{
int res= DONT_TRACE;
if (!cs->locked)
pthread_mutex_lock(&THR_LOCK_dbug);
if ((cs->stack->maxdepth == 0 || cs->level <= cs->stack->maxdepth) &&
InList(cs->stack->processes, cs->process, 0) & (MATCHED|INCLUDE))
{
@ -1727,8 +1728,6 @@ static int DoTrace(CODE_STATE *cs)
break;
}
}
if (!cs->locked)
pthread_mutex_unlock(&THR_LOCK_dbug);
return res;
}
@ -1768,11 +1767,9 @@ BOOLEAN _db_keyword_(CODE_STATE *cs, const char *keyword, int strict)
if (!(DEBUGGING && (DoTrace(cs) & DO_TRACE)))
return 0;
if (!cs->locked)
pthread_mutex_lock(&THR_LOCK_dbug);
LockIfInitSettings(cs);
res= (InList(cs->stack->keywords, keyword, strict) & match);
if (!cs->locked)
pthread_mutex_unlock(&THR_LOCK_dbug);
UnlockIfInitSettings(cs);
return res != 0;
}
@ -1999,16 +1996,16 @@ static void DBUGCloseFile(CODE_STATE *cs, sFILE *new_value)
sFILE *fp;
if (!cs || !cs->stack || !cs->stack->out_file)
return;
if (!cs->locked)
pthread_mutex_lock(&THR_LOCK_dbug);
fp= cs->stack->out_file;
if (--fp->used == 0)
{
if (fclose(fp->file) == EOF)
{
LockMutex(cs);
(void) fprintf(stderr, ERR_CLOSE, cs->process);
perror("");
UnlockMutex(cs);
}
else
{
@ -2016,8 +2013,6 @@ static void DBUGCloseFile(CODE_STATE *cs, sFILE *new_value)
}
}
cs->stack->out_file= new_value;
if (!cs->locked)
pthread_mutex_unlock(&THR_LOCK_dbug);
}
@ -2200,9 +2195,7 @@ void _db_flush_()
get_code_state_or_return;
if (DEBUGGING)
{
pthread_mutex_lock(&THR_LOCK_dbug);
(void) fflush(cs->stack->out_file->file);
pthread_mutex_unlock(&THR_LOCK_dbug);
}
}
@ -2230,16 +2223,14 @@ void _db_lock_file_()
{
CODE_STATE *cs;
get_code_state_or_return;
pthread_mutex_lock(&THR_LOCK_dbug);
cs->locked=1;
LockMutex(cs);
}
void _db_unlock_file_()
{
CODE_STATE *cs;
get_code_state_or_return;
cs->locked=0;
pthread_mutex_unlock(&THR_LOCK_dbug);
UnlockMutex(cs);
}
const char* _db_get_func_(void)

View File

@ -1602,7 +1602,7 @@ my %exprs = (
my %columns = (
active_secs => { hdr => 'SecsActive', num => 1, label => 'Seconds transaction has been active', },
add_pool_alloc => { hdr => 'Add\'l Pool', num => 1, label => 'Additonal pool allocated' },
add_pool_alloc => { hdr => 'Add\'l Pool', num => 1, label => 'Additional pool allocated' },
attempted_op => { hdr => 'Action', num => 0, label => 'The action that caused the error' },
awe_mem_alloc => { hdr => 'AWE Memory', num => 1, label => '[Windows] AWE memory allocated' },
binlog_cache_overflow => { hdr => 'Binlog Cache', num => 1, label => 'Transactions too big for binlog cache that went to disk' },

View File

@ -323,7 +323,7 @@ error_message(
/***********************************************//*
@param>>_______[in] name>_____name of file.
@retval file pointer; file pointer is NULL when error occured.
@retval file pointer; file pointer is NULL when error occurred.
*/
FILE*
@ -1119,7 +1119,7 @@ parse_page(
/**
@param [in/out] file_name name of the filename
@retval FILE pointer if successfully created else NULL when error occured.
@retval FILE pointer if successfully created else NULL when error occurred.
*/
FILE*
create_file(

View File

@ -1664,6 +1664,9 @@ ibx_copy_incremental_over_full()
}
}
if (!(ret = backup_files_from_datadir(xtrabackup_incremental_dir)))
goto cleanup;
/* copy buffer pool dump */
if (innobase_buffer_pool_filename) {
const char *src_name;
@ -2175,20 +2178,26 @@ static bool backup_files_from_datadir(const char *dir_path)
if (info.type != OS_FILE_TYPE_FILE)
continue;
const char *pname = strrchr(info.name, IF_WIN('\\', '/'));
const char *pname = strrchr(info.name, OS_PATH_SEPARATOR);
if (!pname)
pname = info.name;
/* Copy aria log files, and aws keys for encryption plugins.*/
const char *prefixes[] = { "aria_log", "aws-kms-key" };
for (size_t i = 0; i < array_elements(prefixes); i++) {
if (starts_with(pname, prefixes[i])) {
ret = copy_file(ds_data, info.name, info.name, 1);
if (!ret) {
break;
}
}
}
if (!starts_with(pname, "aws-kms-key") &&
!starts_with(pname, "aria_log"))
/* For ES exchange the above line with the following code:
(!xtrabackup_prepare || !xtrabackup_incremental_dir ||
!starts_with(pname, "aria_log")))
*/
continue;
if (xtrabackup_prepare && xtrabackup_incremental_dir &&
file_exists(info.name))
unlink(info.name);
std::string full_path(dir_path);
full_path.append(1, OS_PATH_SEPARATOR).append(info.name);
if (!(ret = copy_file(ds_data, full_path.c_str() , info.name, 1)))
break;
}
os_file_closedir(dir);
return ret;

View File

@ -716,7 +716,7 @@ The --decompress command will decompress a backup made\n\
with the --compress option. The\n\
--parallel option will allow multiple files to be decompressed\n\
simultaneously. In order to decompress, the qpress utility MUST be installed\n\
and accessable within the path. This process will remove the original\n\
and accessible within the path. This process will remove the original\n\
compressed files and leave the results in the same location.\n\
\n\
On success the exit code innobackupex is 0. A non-zero exit code \n\

View File

@ -102,6 +102,7 @@ Street, Fifth Floor, Boston, MA 02110-1335 USA
#include <srv0srv.h>
#include <crc_glue.h>
#include <log.h>
#include <derror.h>
#include <thr_timer.h>
int sys_var_init();
@ -1960,7 +1961,7 @@ static bool innodb_init_param()
return false;
error:
msg("mariabackup: innodb_init_param(): Error occured.\n");
msg("mariabackup: innodb_init_param(): Error occurred.\n");
return true;
}
@ -2747,7 +2748,7 @@ static bool xtrabackup_copy_logfile(bool last = false)
log_mutex_exit();
if (!start_lsn) {
msg(recv_sys.found_corrupt_log
die(recv_sys.found_corrupt_log
? "xtrabackup_copy_logfile() failed: corrupt log."
: "xtrabackup_copy_logfile() failed.");
return true;
@ -4226,6 +4227,8 @@ fail_before_log_copying_thread_start:
if (xtrabackup_copy_logfile())
goto fail_before_log_copying_thread_start;
DBUG_MARIABACKUP_EVENT("before_innodb_log_copy_thread_started",0);
log_copying_stop = os_event_create(0);
os_thread_create(log_copying_thread, NULL, &log_copying_thread_id);
@ -5842,41 +5845,12 @@ extern void init_signals(void);
#include <sql_locale.h>
/* Messages . Avoid loading errmsg.sys file */
void setup_error_messages()
{
static const char *my_msgs[ERRORS_PER_RANGE];
static const char **all_msgs[] = { my_msgs, my_msgs, my_msgs, my_msgs };
my_default_lc_messages = &my_locale_en_US;
my_default_lc_messages->errmsgs->errmsgs = all_msgs;
/* Populate the necessary error messages */
struct {
int id;
const char *fmt;
}
xb_msgs[] =
{
{ ER_DATABASE_NAME,"Database" },
{ ER_TABLE_NAME,"Table"},
{ ER_PARTITION_NAME, "Partition" },
{ ER_SUBPARTITION_NAME, "Subpartition" },
{ ER_TEMPORARY_NAME, "Temporary"},
{ ER_RENAMED_NAME, "Renamed"},
{ ER_CANT_FIND_DL_ENTRY, "Can't find symbol '%-.128s' in library"},
{ ER_CANT_OPEN_LIBRARY, "Can't open shared library '%-.192s' (errno: %d, %-.128s)" },
{ ER_OUTOFMEMORY, "Out of memory; restart server and try again (needed %d bytes)" },
{ ER_CANT_OPEN_LIBRARY, "Can't open shared library '%-.192s' (errno: %d, %-.128s)" },
{ ER_UDF_NO_PATHS, "No paths allowed for shared library" },
{ ER_CANT_INITIALIZE_UDF,"Can't initialize function '%-.192s'; %-.80s"},
{ ER_PLUGIN_IS_NOT_LOADED,"Plugin '%-.192s' is not loaded" }
};
for (int i = 0; i < (int)array_elements(all_msgs); i++)
all_msgs[0][i] = "Unknown error";
for (int i = 0; i < (int)array_elements(xb_msgs); i++)
all_msgs[0][xb_msgs[i].id - ER_ERROR_FIRST] = xb_msgs[i].fmt;
if (init_errmessage())
die("could not initialize error messages");
}
void
@ -6151,6 +6125,8 @@ int main(int argc, char **argv)
(void) pthread_key_delete(THR_THD);
logger.cleanup_base();
cleanup_errmsgs();
free_error_messages();
mysql_mutex_destroy(&LOCK_error_log);
if (status == EXIT_SUCCESS) {

View File

@ -74,7 +74,7 @@ extern struct wsrep_service_st {
const char* (*wsrep_thd_client_mode_str_func)(const MYSQL_THD thd);
const char* (*wsrep_thd_transaction_state_str_func)(const MYSQL_THD thd);
query_id_t (*wsrep_thd_transaction_id_func)(const MYSQL_THD thd);
my_bool (*wsrep_thd_bf_abort_func)(const MYSQL_THD bf_thd,
my_bool (*wsrep_thd_bf_abort_func)(MYSQL_THD bf_thd,
MYSQL_THD victim_thd,
my_bool signal);
my_bool (*wsrep_thd_order_before_func)(const MYSQL_THD left, const MYSQL_THD right);
@ -194,7 +194,7 @@ extern "C" void wsrep_handle_SR_rollback(MYSQL_THD BF_thd, MYSQL_THD victim_thd)
/* Return thd retry counter */
extern "C" int wsrep_thd_retry_counter(const MYSQL_THD thd);
/* BF abort victim_thd */
extern "C" my_bool wsrep_thd_bf_abort(const MYSQL_THD bf_thd,
extern "C" my_bool wsrep_thd_bf_abort(MYSQL_THD bf_thd,
MYSQL_THD victim_thd,
my_bool signal);
/* Return true if left thd is ordered before right thd */

View File

@ -29,8 +29,8 @@
One can disable SSL later by using --skip-ssl or --ssl=0
*/
opt_use_ssl= 1;
#ifdef HAVE_WOLFSSL
/* CRL does not work with WolfSSL */
#if defined (HAVE_WOLFSSL) && (!defined (_WIN32) || defined (MYSQL_SERVER))
/* CRL does not work with WolfSSL */
opt_ssl_crl= NULL;
opt_ssl_crlpath= NULL;
#endif

View File

@ -169,7 +169,7 @@ void thr_set_lock_wait_callback(void (*before_wait)(void),
#ifdef WITH_WSREP
typedef my_bool (* wsrep_thd_is_brute_force_fun)(const MYSQL_THD, my_bool);
typedef my_bool(* wsrep_abort_thd_fun)(const MYSQL_THD, MYSQL_THD, my_bool);
typedef my_bool(* wsrep_abort_thd_fun)(MYSQL_THD, MYSQL_THD, my_bool);
typedef my_bool (* wsrep_on_fun)(const MYSQL_THD);
void wsrep_thr_lock_init(
wsrep_thd_is_brute_force_fun bf_fun, wsrep_abort_thd_fun abort_fun,

@ -1 +1 @@
Subproject commit 980f2dbea6586091333057bb2994b18747466942
Subproject commit 63df45ce3df3fbc04d8fab9bceb77f9d1cccd4aa

View File

@ -1937,8 +1937,10 @@ Run stress test, providing options to mysql\-stress\-test\&.pl\&. Options are se
.\" suite option: mysql-test-run.pl
\fB\-\-suite[s]=\fR\fB\fIsuite_name...\fR\fR
.sp
Comma separated list of suite names to run. The default is: "main-,archive-,binlog-,csv-,federated-,funcs_1-,funcs_2-,handler-,heap-,innodb-,innodb_fts-,
innodb_zip-,maria-,multi_source-,optimizer_unfixed_bugs-,parts-,perfschema-,
Comma separated list of suite names to run. The default is:
"main-,archive-,binlog-,csv-,federated-,funcs_1-,funcs_2-,
handler-,heap-,innodb-,innodb_fts-,innodb_zip-,maria-,
multi_source-,optimizer_unfixed_bugs-,parts-,perfschema-,
plugins-,roles-,rpl-,sys_vars-,unit-,vcol-"\&.
.RE
.sp

View File

@ -949,7 +949,7 @@ drop table t1;
Bug #26104 Bug on foreign key class constructor
Check that ref_columns is initalized correctly in the constructor
Check that ref_columns is initialized correctly in the constructor
and semantic checks in mysql_prepare_table work.
We do not need a storage engine that supports foreign keys

View File

@ -850,7 +850,7 @@ drop table t1;
--echo
--echo Bug #26104 Bug on foreign key class constructor
--echo
--echo Check that ref_columns is initalized correctly in the constructor
--echo Check that ref_columns is initialized correctly in the constructor
--echo and semantic checks in mysql_prepare_table work.
--echo
--echo We do not need a storage engine that supports foreign keys

View File

@ -1674,6 +1674,24 @@ t
1
use test;
#
# MDEV-18460: Server crashed in strmake / tdc_create_key /
# THD::create_tmp_table_def_key
#
connect con1,localhost,root,,;
CREATE TEMPORARY TABLE test.t (a INT);
WITH cte AS (SELECT 1) SELECT * FROM cte;
1
1
WITH t AS (SELECT 1) SELECT * FROM t;
1
1
WITH cte AS (SELECT 1) SELECT * FROM t;
ERROR 3D000: No database selected
DROP TABLE test.t;
connection default;
disconnect con1;
# End of 10.2 tests
#
# MDEV-20730: Syntax error on SELECT INTO @variable with CTE
#
with data as (select 1 as id)

View File

@ -1183,6 +1183,25 @@ with columns as (select 1 as t) select * from columns;
use test;
--echo #
--echo # MDEV-18460: Server crashed in strmake / tdc_create_key /
--echo # THD::create_tmp_table_def_key
--echo #
--connect con1,localhost,root,,
--change_user root,,
CREATE TEMPORARY TABLE test.t (a INT);
WITH cte AS (SELECT 1) SELECT * FROM cte;
WITH t AS (SELECT 1) SELECT * FROM t;
--error ER_NO_DB_ERROR
WITH cte AS (SELECT 1) SELECT * FROM t;
DROP TABLE test.t;
--connection default
--disconnect con1
--echo # End of 10.2 tests
--echo #
--echo # MDEV-20730: Syntax error on SELECT INTO @variable with CTE

View File

@ -1,4 +1,5 @@
create table t1(c1 integer not null,c2 integer not null, key (c1)) engine=InnoDb;
create table t1(c1 integer not null,c2 integer not null, key (c1))
ENGINE=InnoDB STATS_PERSISTENT=1;
create view v1 as select * from t1 where c1 in (0,1);
insert t1 select 0,seq from seq_1_to_500;
insert t1 select 1,seq from seq_1_to_100;
@ -48,7 +49,7 @@ rollback;
start transaction;
explain delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 range c1 c1 4 NULL 502 Using where
1 PRIMARY t1 range c1 c1 4 NULL 600 Using where
2 DEPENDENT SUBQUERY b ref c1 c1 4 test.t1.c1 167 Using index
delete from v1 where (select count(*) from t1 b where b.c1=v1.c1) = 500 limit 1;
affected rows: 1

View File

@ -2,7 +2,8 @@
--source include/have_innodb.inc
# This test is slow on buildbot.
--source include/big_test.inc
create table t1(c1 integer not null,c2 integer not null, key (c1)) engine=InnoDb;
create table t1(c1 integer not null,c2 integer not null, key (c1))
ENGINE=InnoDB STATS_PERSISTENT=1;
create view v1 as select * from t1 where c1 in (0,1);
insert t1 select 0,seq from seq_1_to_500;

View File

@ -82,3 +82,29 @@ add foreign key (a) references t3 (a)
on update set default on update set default);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'update set default)' at line 3
drop table t_34455;
#
# MDEV-18460 Don't allow multiple table CONSTRAINTs with the same name.
#
CREATE TABLE tpk (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,name VARCHAR(100) NOT NULL) ENGINE=Innodb;
CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1), CONSTRAINT sid CHECK (c2>15));
ERROR HY000: Duplicate CHECK constraint name 'sid'
CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1));
ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15);
ERROR HY000: Duplicate CHECK constraint name 'sid'
DROP TABLE tfk;
CREATE TABLE tfk (c1 INT, c2 INT,
CONSTRAINT sid FOREIGN KEY (c1) REFERENCES tpk (id)) ENGINE=Innodb;
show create table tfk;
Table Create Table
tfk CREATE TABLE `tfk` (
`c1` int(11) DEFAULT NULL,
`c2` int(11) DEFAULT NULL,
KEY `sid` (`c1`),
CONSTRAINT `sid` FOREIGN KEY (`c1`) REFERENCES `tpk` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15);
ERROR HY000: Duplicate CHECK constraint name 'sid'
ALTER TABLE tfk ADD CONSTRAINT sid UNIQUE(c2);
ERROR 42000: Duplicate key name 'sid'
DROP TABLE tfk;
DROP TABLE tpk;

View File

@ -117,4 +117,28 @@ alter table t_34455
drop table t_34455;
--echo #
--echo # MDEV-18460 Don't allow multiple table CONSTRAINTs with the same name.
--echo #
CREATE TABLE tpk (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,name VARCHAR(100) NOT NULL) ENGINE=Innodb;
--error ER_DUP_CONSTRAINT_NAME
CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1), CONSTRAINT sid CHECK (c2>15));
CREATE TABLE tfk (c1 INT, c2 INT, CONSTRAINT sid UNIQUE (c1));
--error ER_DUP_CONSTRAINT_NAME
ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15);
DROP TABLE tfk;
CREATE TABLE tfk (c1 INT, c2 INT,
CONSTRAINT sid FOREIGN KEY (c1) REFERENCES tpk (id)) ENGINE=Innodb;
show create table tfk;
--error ER_DUP_CONSTRAINT_NAME
ALTER TABLE tfk ADD CONSTRAINT sid CHECK (c2>15);
--error ER_DUP_KEYNAME
ALTER TABLE tfk ADD CONSTRAINT sid UNIQUE(c2);
DROP TABLE tfk;
DROP TABLE tpk;

View File

@ -1109,7 +1109,7 @@ The following specify which files/extra groups are read (specified before remain
disable; STATE to track just transaction state (Is there
an active transaction? Does it have any data? etc.);
CHARACTERISTICS to track transaction state and report all
statements needed to start a transaction withthe same
statements needed to start a transaction with the same
characteristics (isolation level, read only/read
write,snapshot - but not any work done / data modified
within the transaction).
@ -1785,5 +1785,5 @@ userstat FALSE
verbose TRUE
wait-timeout 28800
To see what values a running MySQL server is using, type
To see what variables a running MySQL server is using, type
'mysqladmin variables' instead of 'mysqld --verbose --help'.

View File

@ -629,11 +629,9 @@ SELECT * FROM t1 WHERE i IN (NULL, NULL, NULL, NULL, NULL);
i
EXPLAIN EXTENDED SELECT * FROM t1 WHERE i IN (NULL, NULL, NULL, NULL, NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 5 100.00 Using where; FirstMatch(t1); Using join buffer (flat, BNL join)
3 DERIVED NULL NULL NULL NULL NULL NULL NULL NULL No tables used
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 100.00 Using where
Warnings:
Note 1003 /* select#1 */ select `test`.`t1`.`i` AS `i` from `test`.`t1` semi join ((values (NULL),(NULL),(NULL),(NULL),(NULL)) `tvc_0`) where `test`.`t1`.`i` = `tvc_0`.`_col_1`
Note 1003 select `test`.`t1`.`i` AS `i` from `test`.`t1` where `test`.`t1`.`i` in (NULL,NULL,NULL,NULL,NULL)
SET in_predicate_conversion_threshold= default;
DROP TABLE t1;
#
@ -687,3 +685,50 @@ f1 f2
1 1
DROP TABLE t1,t2,t3;
SET @@in_predicate_conversion_threshold= default;
#
# MDEV-20900: IN predicate to IN subquery conversion causes performance regression
#
create table t1(a int, b int);
insert into t1 select seq-1, seq-1 from seq_1_to_10;
set in_predicate_conversion_threshold=2;
explain select * from t1 where t1.a IN ("1","2","3","4");
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where
select * from t1 where t1.a IN ("1","2","3","4");
a b
1 1
2 2
3 3
4 4
set in_predicate_conversion_threshold=0;
explain select * from t1 where t1.a IN ("1","2","3","4");
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where
select * from t1 where t1.a IN ("1","2","3","4");
a b
1 1
2 2
3 3
4 4
set in_predicate_conversion_threshold=2;
explain select * from t1 where (t1.a,t1.b) in (("1","1"),(2,2),(3,3),(4,4));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where
select * from t1 where (t1.a,t1.b) in (("1","1"),(2,2),(3,3),(4,4));
a b
1 1
2 2
3 3
4 4
set in_predicate_conversion_threshold=0;
explain select * from t1 where (t1.a,t1.b) in (("1","1"),(2,2),(3,3),(4,4));
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 10 Using where
select * from t1 where (t1.a,t1.b) in (("1","1"),(2,2),(3,3),(4,4));
a b
1 1
2 2
3 3
4 4
drop table t1;
SET @@in_predicate_conversion_threshold= default;

View File

@ -3,6 +3,7 @@
#
source include/have_debug.inc;
source include/default_optimizer_switch.inc;
source include/have_sequence.inc;
create table t1 (a int, b int);
@ -397,3 +398,33 @@ SELECT * FROM t3 WHERE (f1,f2) IN ((2, 2), (1, 2), (3, 5), (1, 1));
DROP TABLE t1,t2,t3;
SET @@in_predicate_conversion_threshold= default;
--echo #
--echo # MDEV-20900: IN predicate to IN subquery conversion causes performance regression
--echo #
create table t1(a int, b int);
insert into t1 select seq-1, seq-1 from seq_1_to_10;
set in_predicate_conversion_threshold=2;
let $query= select * from t1 where t1.a IN ("1","2","3","4");
eval explain $query;
eval $query;
set in_predicate_conversion_threshold=0;
eval explain $query;
eval $query;
set in_predicate_conversion_threshold=2;
let $query= select * from t1 where (t1.a,t1.b) in (("1","1"),(2,2),(3,3),(4,4));
eval explain $query;
eval $query;
set in_predicate_conversion_threshold=0;
eval explain $query;
eval $query;
drop table t1;
SET @@in_predicate_conversion_threshold= default;

View File

@ -3282,6 +3282,36 @@ pk
3
DROP TABLE t1;
#
# MDEV-21044: Wrong result when using a smaller size for sort buffer
#
create table t1(a varchar(765),b int);
insert into t1 values ("a",1),("b",2),("c",3),("e",4);
insert into t1 values ("d",5),("f",6),("g",7),("h",8);
insert into t1 values ("k",11),("l",12),("i",9),("j",10);
insert into t1 values ("m",13),("n",14),("o",15),("p",16);
set @save_sort_buffer_size= @@sort_buffer_size;
set sort_buffer_size=1024;
select * from t1 order by b;
a b
a 1
b 2
c 3
e 4
d 5
f 6
g 7
h 8
i 9
j 10
k 11
l 12
m 13
n 14
o 15
p 16
set @@sort_buffer_size= @save_sort_buffer_size;
drop table t1;
#
# MDEV-13994: Bad join results with orderby_uses_equalities=on
#
CREATE TABLE books (

View File

@ -2146,6 +2146,22 @@ SELECT DISTINCT pk FROM t1 GROUP BY 'foo';
SELECT DISTINCT pk FROM t1;
DROP TABLE t1;
--echo #
--echo # MDEV-21044: Wrong result when using a smaller size for sort buffer
--echo #
create table t1(a varchar(765),b int);
insert into t1 values ("a",1),("b",2),("c",3),("e",4);
insert into t1 values ("d",5),("f",6),("g",7),("h",8);
insert into t1 values ("k",11),("l",12),("i",9),("j",10);
insert into t1 values ("m",13),("n",14),("o",15),("p",16);
set @save_sort_buffer_size= @@sort_buffer_size;
set sort_buffer_size=1024;
select * from t1 order by b;
set @@sort_buffer_size= @save_sort_buffer_size;
drop table t1;
--echo #
--echo # MDEV-13994: Bad join results with orderby_uses_equalities=on
--echo #

View File

@ -1,5 +1,5 @@
#
# Bug #47412: Valgrind warnings / user can read uninitalized memory
# Bug #47412: Valgrind warnings / user can read uninitialized memory
# using SP variables
#
CREATE SCHEMA testdb;

View File

@ -1,7 +1,7 @@
# Test file for stored procedure bugfixes
--echo #
--echo # Bug #47412: Valgrind warnings / user can read uninitalized memory
--echo # Bug #47412: Valgrind warnings / user can read uninitialized memory
--echo # using SP variables
--echo #

View File

@ -342,7 +342,7 @@ flush privileges;
drop table t1;
#
# Bug#9503 reseting correct parameters of thread after error in SP function
# Bug#9503 resetting correct parameters of thread after error in SP function
#
connect (root,localhost,root,,test);
connection root;

View File

@ -21,15 +21,6 @@ create procedure have_ssl()
--exec $MYSQL --ssl-ca=$MYSQL_TEST_DIR/std_data/cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
--echo mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
# this is the test where certificate verification fails.
# but client library may not support certificate verification, so
# we fake the test result for it. We assume client is openssl, when server is openssl
let client_supports_cert_verification =`select variable_value not in('Unknown','OFF') from information_schema.session_status where variable_name='Ssl_session_cache_mode'`;
if ($client_supports_cert_verification) {
--replace_result "self signed certificate in certificate chain" "Failed to verify the server certificate" "Error in the certificate." "Failed to verify the server certificate"
--exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
}
if (!$client_supports_cert_verification) {
--echo ERROR 2026 (HY000): SSL connection error: Failed to verify the server certificate
}
--replace_regex /SSL connection error.*certificate[^\n]*/SSL connection error: Failed to verify the server certificate/
--exec $MYSQL --ssl --ssl-verify-server-cert -e "call test.have_ssl()" 2>&1
drop procedure have_ssl;

View File

@ -1,6 +1,3 @@
# schannel does not support keys longer than 4k
-- source include/not_windows.inc
-- source include/have_ssl_communication.inc
#
# Bug#29784 YaSSL assertion failure when reading 8k key.

View File

@ -1,6 +1,12 @@
# This test should work in embedded server after we fix mysqltest
-- source include/not_embedded.inc
-- source include/have_openssl.inc
if (`SELECT COUNT(*) = 0 FROM information_schema.GLOBAL_VARIABLES
WHERE (VARIABLE_NAME ='version_compile_os' AND VARIABLE_VALUE LIKE 'Win%' OR
VARIABLE_NAME='have_openssl' AND VARIABLE_VALUE='YES')`)
{
skip Need openssl or Windows;
}
--echo # Test clients with and without CRL lists
@ -14,10 +20,12 @@ copy_file $MYSQL_TEST_DIR/std_data/server-cert.crl $MYSQL_TMP_DIR/ed1f42db.r0;
--echo ############ Test mysql ##############
--echo # Test mysql connecting to a server with a certificate revoked by -crl
--replace_result "Server certificate validation failed. The certificate is revoked. Error 0x80092010(CRYPT_E_REVOKED)" "certificate revoked"
--error 1
--exec $MYSQL $ssl_crl test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1
--echo # Test mysql connecting to a server with a certificate revoked by -crlpath
--replace_result "Server certificate validation failed. The certificate is revoked. Error 0x80092010(CRYPT_E_REVOKED)" "certificate revoked"
--error 1
--exec $MYSQL $ssl_crlpath test -e "SHOW STATUS LIKE 'Ssl_version'" 2>&1
@ -26,11 +34,11 @@ copy_file $MYSQL_TEST_DIR/std_data/server-cert.crl $MYSQL_TMP_DIR/ed1f42db.r0;
let $admin_suffix = --default-character-set=latin1 -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping;
--echo # Test mysqladmin connecting to a server with a certificate revoked by -crl
--replace_regex /.*mysqladmin.*:/mysqladmin:/
--replace_regex /.*mysqladmin.*:/mysqladmin:/ /SSL connection error: .*CRYPT_E_REVOKED./SSL connection error: certificate revoked/
--error 1
--exec $MYSQLADMIN $ssl_crl $admin_suffix 2>&1
--echo # Test mysqladmin connecting to a server with a certificate revoked by -crlpath
--replace_regex /.*mysqladmin.*:/mysqladmin:/
--replace_regex /.*mysqladmin.*:/mysqladmin:/ /SSL connection error: .*CRYPT_E_REVOKED./SSL connection error: certificate revoked/
--error 1
--exec $MYSQLADMIN $ssl_crlpath $admin_suffix 2>&1

View File

@ -262,7 +262,7 @@ select hex(a), b from t1;
drop table t1;
#
# type was not properly initalized, which caused key_copy to fail
# type was not properly initialized, which caused key_copy to fail
#
create table t1(bit_field bit(2), int_field int, key a(bit_field));

View File

@ -3633,6 +3633,15 @@ rank() over (partition by 'abc' order by 'xyz')
1
drop table t1;
#
# MDEV-19380: ASAN heap-use-after-free in Protocol::net_store_data
#
CREATE TABLE t1 (i int);
INSERT INTO t1 VALUES (1),(2),(3);
SELECT (SELECT MIN('foo') OVER() FROM t1 LIMIT 1) as x;
x
foo
drop table t1;
#
# End of 10.2 tests
#
#

View File

@ -2340,6 +2340,16 @@ select rank() over (partition by 'abc' order by 'xyz') from t1;
select rank() over (partition by 'abc' order by 'xyz') from t1;
drop table t1;
--echo #
--echo # MDEV-19380: ASAN heap-use-after-free in Protocol::net_store_data
--echo #
CREATE TABLE t1 (i int);
INSERT INTO t1 VALUES (1),(2),(3);
SELECT (SELECT MIN('foo') OVER() FROM t1 LIMIT 1) as x;
drop table t1;
--echo #
--echo # End of 10.2 tests
--echo #

View File

@ -330,7 +330,8 @@ my $opt_valgrind_mysqld= 0;
my $opt_valgrind_mysqltest= 0;
my @valgrind_args;
my $opt_strace= 0;
my $opt_strace_client;
my $opt_stracer;
my $opt_client_strace = 0;
my @strace_args;
my $opt_valgrind_path;
my $valgrind_reports= 0;
@ -1335,9 +1336,10 @@ sub command_line_setup {
'debugger=s' => \$opt_debugger,
'boot-dbx' => \$opt_boot_dbx,
'client-debugger=s' => \$opt_client_debugger,
'strace' => \$opt_strace,
'strace-client' => \$opt_strace_client,
'strace-option=s' => \@strace_args,
'strace' => \$opt_strace,
'strace-option=s' => \@strace_args,
'client-strace' => \$opt_client_strace,
'stracer=s' => \$opt_stracer,
'max-save-core=i' => \$opt_max_save_core,
'max-save-datadir=i' => \$opt_max_save_datadir,
'max-test-fail=i' => \$opt_max_test_fail,
@ -1950,7 +1952,7 @@ sub command_line_setup {
join(" ", @valgrind_args), "\"");
}
if (@strace_args)
if (@strace_args || $opt_stracer)
{
$opt_strace=1;
}
@ -5901,14 +5903,6 @@ sub start_mysqltest ($) {
mtr_add_arg($args, "--non-blocking-api");
}
if ( $opt_strace_client )
{
$exe= $opt_strace_client || "strace";
mtr_add_arg($args, "-o");
mtr_add_arg($args, "%s/log/mysqltest.strace", $opt_vardir);
mtr_add_arg($args, "$exe_mysqltest");
}
mtr_add_arg($args, "--timer-file=%s/log/timer", $opt_vardir);
if ( $opt_compress )
@ -5974,6 +5968,17 @@ sub start_mysqltest ($) {
mtr_add_arg($args, "%s", $_) for @args_saved;
}
# ----------------------------------------------------------------------
# Prefix the strace options to the argument list.
# ----------------------------------------------------------------------
if ( $opt_client_strace )
{
my @args_saved = @$args;
mtr_init_args(\$args);
strace_arguments($args, \$exe, "mysqltest");
mtr_add_arg($args, "%s", $_) for @args_saved;
}
if ($opt_force > 1)
{
mtr_add_arg($args, "--continue-on-error");
@ -6298,16 +6303,17 @@ sub strace_arguments {
my $args= shift;
my $exe= shift;
my $mysqld_name= shift;
my $output= sprintf("%s/log/%s.strace", $path_vardir_trace, $mysqld_name);
mtr_add_arg($args, "-f");
mtr_add_arg($args, "-o%s/var/log/%s.strace", $glob_mysql_test_dir, $mysqld_name);
mtr_add_arg($args, "-o%s", $output);
# Add strace options, can be overridden by user
# Add strace options
mtr_add_arg($args, '%s', $_) for (@strace_args);
mtr_add_arg($args, $$exe);
$$exe= "strace";
$$exe= $opt_stracer || "strace";
if ($exe_libtool)
{
@ -6583,11 +6589,11 @@ Options for valgrind
Options for strace
strace Run the "mysqld" executables using strace. Default
options are -f -o var/log/'mysqld-name'.strace
strace-option=ARGS Option to give strace, replaces default option(s),
strace-client=[path] Create strace output for mysqltest client, optionally
specifying name and path to the trace program to use.
Example: $0 --strace-client=ktrace
options are -f -o 'vardir'/log/'mysqld-name'.strace.
client-strace Trace the "mysqltest".
strace-option=ARGS Option to give strace, appends to existing options.
stracer=<EXE> Specify name and path to the trace program to use.
Default is "strace". Example: $0 --stracer=ktrace.
Misc options
user=USER User for connecting to mysqld(default: $opt_user)

View File

@ -32,7 +32,7 @@ CALL p1('SELECT 1');
1
1
'Error1: ' || SQLCODE || ' ' || SQLERRM
Error1: 0 normal, successful completition
Error1: 0 normal, successful completion
CALL p1('xxx');
'Error2: ' || SQLCODE || ' ' || SQLERRM
Error2: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1
@ -40,7 +40,7 @@ CALL p1('SELECT 1');
1
1
'Error1: ' || SQLCODE || ' ' || SQLERRM
Error1: 0 normal, successful completition
Error1: 0 normal, successful completion
DROP PROCEDURE p1;
#
# SQLCODE and SQLERRM hidden by local variables
@ -219,7 +219,7 @@ f1()
Exception|1329 No data - zero rows fetched, selected, or processed
SELECT f2() FROM DUAL;
f2()
Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completition
Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completion
DROP TABLE t1;
DROP FUNCTION f2;
DROP FUNCTION f1;
@ -246,7 +246,7 @@ f1()
Exception|1329 No data - zero rows fetched, selected, or processed
SELECT f2() FROM DUAL;
f2()
Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completition
Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completion
DROP TABLE t1;
DROP FUNCTION f2;
DROP FUNCTION f1;
@ -274,7 +274,7 @@ END;
$$
SELECT f2() FROM DUAL;
f2()
Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completition
Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completion
DROP FUNCTION f2;
DROP PROCEDURE p1;
DROP TABLE t1;
@ -299,7 +299,7 @@ END;
$$
SELECT f2() FROM DUAL;
f2()
Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completition
Exception|1329 No data - zero rows fetched, selected, or processed|0 normal, successful completion
DROP FUNCTION f2;
DROP PROCEDURE p1;
DROP TABLE t1;

View File

@ -0,0 +1,236 @@
SET sql_mode=ORACLE;
#
# MDEV-20667 Server crash on pop_cursor
#
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<< iac_err >>
RETURN;
END//
SHOW PROCEDURE CODE p1;
Pos Instruction
0 jump_if_not 5(5) 1 = 2
1 cpush cur1@0
2 jump 3
3 cpop 1
4 jump 7
5 jump_if_not 7(7) 1 = 1
6 jump 7
7 preturn
DROP PROCEDURE p1;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<< iac_err >>
RETURN ;
END//
SHOW PROCEDURE CODE p1;
Pos Instruction
0 jump_if_not 5(5) 1 = 2
1 cpush cur1@0
2 jump 3
3 cpop 1
4 jump 7
5 jump_if_not 7(7) 1 = 1
6 jump 7
7 preturn
DROP PROCEDURE p1;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
GOTO iac_err;
<< iac_err >>
RETURN ;
END//
SHOW PROCEDURE CODE p1;
Pos Instruction
0 jump_if_not 5(5) 1 = 2
1 cpush cur1@0
2 jump 3
3 cpop 1
4 jump 5
5 preturn
DROP PROCEDURE p1;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=1 THEN
DECLARE
CURSOR cur2 IS SELECT 'cur2' FROM DUAL;
BEGIN
SELECT 'cur2';
IF 1=1 THEN
DECLARE
CURSOR cur3 IS SELECT 'cur3' FROM DUAL;
BEGIN
SELECT 'cur3';
IF 1=1 THEN
DECLARE
CURSOR cur4 IS SELECT 'cur4' FROM DUAL;
BEGIN
SELECT 'cur4';
GOTO ret;
END;
END IF;
GOTO ret;
END;
END IF;
GOTO ret;
END;
END IF;
<<ret>>
RETURN;
END;
//
SHOW PROCEDURE CODE p1;
Pos Instruction
0 jump_if_not 15(15) 1 = 1
1 cpush cur2@0
2 stmt 0 "SELECT 'cur2'"
3 jump_if_not 13(13) 1 = 1
4 cpush cur3@1
5 stmt 0 "SELECT 'cur3'"
6 jump_if_not 11(11) 1 = 1
7 cpush cur4@2
8 stmt 0 "SELECT 'cur4'"
9 cpop 3
10 jump 15
11 cpop 2
12 jump 15
13 cpop 1
14 jump 15
15 preturn
DROP PROCEDURE p1;
CREATE PROCEDURE p1(lab VARCHAR(32)) IS
BEGIN
IF 1=1 THEN
DECLARE
CURSOR cur2 IS SELECT 'cur2' FROM DUAL;
BEGIN
IF 1=1 THEN
DECLARE
CURSOR cur3 IS SELECT 'cur3' FROM DUAL;
BEGIN
IF 1=1 THEN
DECLARE
CURSOR cur4 IS SELECT 'cur4' FROM DUAL;
BEGIN
IF lab = 'cur4' THEN
SELECT 'goto from cur4' AS comment;
GOTO ret;
END IF;
END;
END IF;
IF lab = 'cur3' THEN
SELECT 'goto from cur3' AS comment;
GOTO ret;
END IF;
END;
END IF;
IF lab = 'cur2' THEN
SELECT 'goto from cur2' AS comment;
GOTO ret;
END IF;
END;
END IF;
<<ret>>
RETURN;
END;
//
SHOW PROCEDURE CODE p1;
Pos Instruction
0 jump_if_not 21(21) 1 = 1
1 cpush cur2@0
2 jump_if_not 16(16) 1 = 1
3 cpush cur3@1
4 jump_if_not 11(11) 1 = 1
5 cpush cur4@2
6 jump_if_not 10(10) lab@0 = 'cur4'
7 stmt 0 "SELECT 'goto from cur4' AS comment"
8 cpop 3
9 jump 21
10 cpop 1
11 jump_if_not 15(15) lab@0 = 'cur3'
12 stmt 0 "SELECT 'goto from cur3' AS comment"
13 cpop 2
14 jump 21
15 cpop 1
16 jump_if_not 20(20) lab@0 = 'cur2'
17 stmt 0 "SELECT 'goto from cur2' AS comment"
18 cpop 1
19 jump 21
20 cpop 1
21 preturn
CALL p1('');
CALL p1('cur2');
comment
goto from cur2
CALL p1('cur3');
comment
goto from cur3
CALL p1('cur4');
comment
goto from cur4
DROP PROCEDURE p1;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CONTINUE HANDLER FOR SQLSTATE '23000' SET @x2 = 1;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<<iac_err >>
RETURN;
END//
SHOW PROCEDURE CODE p1;
Pos Instruction
0 jump_if_not 9(9) 1 = 2
1 hpush_jump 4 0 CONTINUE
2 stmt 31 "SET @x2 = 1"
3 hreturn 0
4 hpop 1
5 jump 11
6 jump 11
7 hpop 1
8 jump 9
9 jump_if_not 11(11) 1 = 1
10 jump 11
11 preturn
DROP PROCEDURE p1;

View File

@ -832,3 +832,82 @@ a
15
DROP TRIGGER trg1;
DROP TABLE t1;
#
# MDEV-20667 Server crash on pop_cursor
#
CREATE TABLE t1 (a VARCHAR(6));
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<< iac_err >>
RETURN;
END//
CALL p1();
DROP PROCEDURE p1;
DROP TABLE t1;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<< iac_err >>
RETURN ;
END//
CALL p1;
DROP PROCEDURE p1;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
GOTO iac_err;
<< iac_err >>
RETURN ;
END//
CALL p1;
DROP PROCEDURE p1;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CONTINUE HANDLER FOR SQLSTATE '23000' SET @x2 = 1;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<<iac_err >>
RETURN;
END//
CALL p1;
DROP PROCEDURE p1;

View File

@ -0,0 +1,178 @@
-- source include/have_debug.inc
SET sql_mode=ORACLE;
--echo #
--echo # MDEV-20667 Server crash on pop_cursor
--echo #
DELIMITER //;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<< iac_err >>
RETURN;
END//
DELIMITER ;//
SHOW PROCEDURE CODE p1;
DROP PROCEDURE p1;
DELIMITER //;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<< iac_err >>
RETURN ;
END//
DELIMITER ;//
SHOW PROCEDURE CODE p1;
DROP PROCEDURE p1;
DELIMITER //;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
GOTO iac_err;
<< iac_err >>
RETURN ;
END//
DELIMITER ;//
SHOW PROCEDURE CODE p1;
DROP PROCEDURE p1;
DELIMITER //;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=1 THEN
DECLARE
CURSOR cur2 IS SELECT 'cur2' FROM DUAL;
BEGIN
SELECT 'cur2';
IF 1=1 THEN
DECLARE
CURSOR cur3 IS SELECT 'cur3' FROM DUAL;
BEGIN
SELECT 'cur3';
IF 1=1 THEN
DECLARE
CURSOR cur4 IS SELECT 'cur4' FROM DUAL;
BEGIN
SELECT 'cur4';
GOTO ret;
END;
END IF;
GOTO ret;
END;
END IF;
GOTO ret;
END;
END IF;
<<ret>>
RETURN;
END;
//
DELIMITER ;//
SHOW PROCEDURE CODE p1;
DROP PROCEDURE p1;
DELIMITER //;
CREATE PROCEDURE p1(lab VARCHAR(32)) IS
BEGIN
IF 1=1 THEN
DECLARE
CURSOR cur2 IS SELECT 'cur2' FROM DUAL;
BEGIN
IF 1=1 THEN
DECLARE
CURSOR cur3 IS SELECT 'cur3' FROM DUAL;
BEGIN
IF 1=1 THEN
DECLARE
CURSOR cur4 IS SELECT 'cur4' FROM DUAL;
BEGIN
IF lab = 'cur4' THEN
SELECT 'goto from cur4' AS comment;
GOTO ret;
END IF;
END;
END IF;
IF lab = 'cur3' THEN
SELECT 'goto from cur3' AS comment;
GOTO ret;
END IF;
END;
END IF;
IF lab = 'cur2' THEN
SELECT 'goto from cur2' AS comment;
GOTO ret;
END IF;
END;
END IF;
<<ret>>
RETURN;
END;
//
DELIMITER ;//
SHOW PROCEDURE CODE p1;
CALL p1('');
CALL p1('cur2');
CALL p1('cur3');
CALL p1('cur4');
DROP PROCEDURE p1;
DELIMITER //;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CONTINUE HANDLER FOR SQLSTATE '23000' SET @x2 = 1;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<<iac_err >>
RETURN;
END//
DELIMITER ;//
SHOW PROCEDURE CODE p1;
DROP PROCEDURE p1;

View File

@ -869,4 +869,100 @@ insert into t1 values (1);
insert into t1 values (null);
SELECT * FROM t1;
DROP TRIGGER trg1;
DROP TABLE t1;
DROP TABLE t1;
--echo #
--echo # MDEV-20667 Server crash on pop_cursor
--echo #
CREATE TABLE t1 (a VARCHAR(6));
DELIMITER //;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<< iac_err >>
RETURN;
END//
DELIMITER ;//
CALL p1();
DROP PROCEDURE p1;
DROP TABLE t1;
DELIMITER //;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<< iac_err >>
RETURN ;
END//
DELIMITER ;//
CALL p1;
DROP PROCEDURE p1;
DELIMITER //;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CURSOR cur1 IS SELECT a FROM t1 ;
BEGIN
GOTO iac_err;
END;
END;
END IF;
GOTO iac_err;
<< iac_err >>
RETURN ;
END//
DELIMITER ;//
CALL p1;
DROP PROCEDURE p1;
DELIMITER //;
CREATE PROCEDURE p1() IS
BEGIN
IF 1=2 THEN
BEGIN
DECLARE
CONTINUE HANDLER FOR SQLSTATE '23000' SET @x2 = 1;
BEGIN
GOTO iac_err;
END;
END;
END IF;
IF 1=1 THEN
GOTO iac_err;
END IF;
<<iac_err >>
RETURN;
END//
DELIMITER ;//
CALL p1;
DROP PROCEDURE p1;

View File

@ -764,7 +764,7 @@ CREATE VIEW test.v2 AS SELECT * FROM test.t0;
CREATE VIEW test2.v2 AS SELECT * FROM test2.t0;
# Some additional tests on the just created objects to show that they are
# accessable and do have the expected content.
# accessible and do have the expected content.
# INSERTs with full qualified table
INSERT INTO test.t1 VALUES('test.t1 - 1');
INSERT INTO test2.t1 VALUES('test2.t1 - 1');

View File

@ -11,6 +11,7 @@
##############################################################################
GCF-1081 : MDEV-18283 Galera test failure on galera.GCF-1081
MW-286 : MDEV-18464 Killing thread can cause mutex deadlock if done concurrently with Galera/replication victim kill
MW-329 : MDEV-19962 Galera test failure on MW-329
MW-360 : needs rewrite to be MariaDB gtid compatible
MW-388: MDEV-19803 Long semaphore wait error on galera.MW-388
@ -21,6 +22,7 @@ galera_as_slave_gtid_replicate_do_db_cc : Requires MySQL GTID
galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
galera_bf_abort_group_commit : MDEV-18282 Galera test failure on galera.galera_bf_abort_group_commit
galera_autoinc_sst_mariabackup : Known issue, may require porting MDEV-17458 from later versions
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
galera_binlog_stmt_autoinc: MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc
galera_concurrent_ctas : MDEV-18180 Galera test failure on galera.galera_concurrent_ctas
@ -41,5 +43,6 @@ galera_var_reject_queries : assertion in inline_mysql_socket_send
galera_var_retry_autocommit: MDEV-18181 Galera test failure on galera.galera_var_retry_autocommit
galera_wan : MDEV-17259 Test failure on galera.galera_wan
mysql-wsrep#198 : MDEV-18935 Galera test mysql-wsrep#198 sporaric assertion transaction.cpp:362: int wsrep::transaction::before_commit(): Assertion `state() == s_executing || state() == s_committing || state() == s_must_abort || state() == s_replaying' failed.
galera_partition : MDEV-21189 test timeout
partition : MDEV-19958 Galera test failure on galera.partition
query_cache: MDEV-15805 Test failure on galera.query_cache

View File

@ -9,13 +9,18 @@
binlog-format=row
[mysqld.1]
log-bin
server-id=1
wsrep-on=0
[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-on=1
log-bin=master-bin
log-bin-index=master-bin
log-bin
log-slave-updates
innodb-autoinc-lock-mode=2
@ -23,33 +28,6 @@ default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
wsrep-cluster-address=gcomm://
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
server-id=1
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS
[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-on=1
log-bin=master-bin
log-bin-index=master-bin
log-slave-updates
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
@ -58,18 +36,30 @@ wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
wsrep-causal-reads=ON
wsrep-sync-wait=15
server-id=2
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS
[mysqld.3]
log-bin=master-bin
log-bin-index=master-bin
server-id=3
# lock schedule alg appears to be VATS by default, and it is not
# yet compatible with galera
innodb_lock_schedule_algorithm=FCFS
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
wsrep-on=1
log-bin
log-slave-updates
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.2.#galera_port'
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M'
wsrep_node_incoming_address=127.0.0.1:@mysqld.3.port
wsrep_sst_receive_address='127.0.0.1:@mysqld.3.#sst_port'
# enforce read-committed characteristics across the cluster
wsrep-causal-reads=ON
wsrep-sync-wait=15
server-id=3
[ENV]
NODE_MYPORT_1= @mysqld.1.port
@ -80,3 +70,9 @@ NODE_MYSOCK_2= @mysqld.2.socket
NODE_MYPORT_3= @mysqld.3.port
NODE_MYSOCK_3= @mysqld.3.socket
NODE_GALERAPORT_2= @mysqld.2.#galera_port
NODE_GALERAPORT_3= @mysqld.3.#galera_port
NODE_SSTPORT_2= @mysqld.2.#sst_port
NODE_SSTPORT_3= @mysqld.3.#sst_port

View File

@ -1,6 +1,8 @@
connection node_2;
connection node_1;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*");
call mtr.add_suppression("WSREP has not yet prepared node for application use");
connection node_1;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
@ -8,6 +10,9 @@ SET SESSION wsrep_on = OFF;
SET SESSION wsrep_on = ON;
SET global wsrep_sync_wait=0;
connection node_3;
SELECT @@wsrep_on;
@@wsrep_on
0
START SLAVE;
include/wait_for_slave_param.inc [Slave_IO_Running]
connection node_1;
@ -24,11 +29,3 @@ connection node_3;
STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression('failed registering on master');
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
connection node_1;
set global wsrep_on=OFF;
RESET MASTER;
set global wsrep_on=ON;
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
connection node_2;
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');

View File

@ -3,24 +3,11 @@ connection node_1;
connection node_1;
TRUNCATE TABLE mysql.general_log;
connection node_2;
TRUNCATE TABLE mysql.general_log;
connection node_1;
SELECT Argument FROM mysql.general_log;
Argument
SET GLOBAL general_log='ON';
SET SESSION wsrep_osu_method=TOI;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
SET SESSION wsrep_osu_method=RSU;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
SET SESSION wsrep_osu_method=TOI;
SELECT argument FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%';
argument
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
ALTER TABLE t1 ADD COLUMN f2 INTEGER
connection node_2;
SELECT Argument FROM mysql.general_log;
Argument
DROP TABLE t1;
SET GLOBAL general_log='OFF';
connection node_1;
SET GLOBAL general_log='OFF';

View File

@ -0,0 +1,29 @@
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connection node_2a;
START SLAVE;
connection default;
SHOW VARIABLES LIKE 'binlog_format';
Variable_name Value
binlog_format ROW
connection default;
CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE target AS SELECT * FROM source;
connection node_2a;
connection node_3;
connection default;
DROP TABLE target;
INSERT INTO source VALUES(1);
CREATE TABLE target AS SELECT * FROM source;
connection node_2a;
connection node_3;
connection default;
DROP TABLE source;
DROP TABLE target;
connection node_3;
connection node_2a;
STOP SLAVE;
RESET SLAVE ALL;
connection default;
RESET MASTER;
disconnect node_2a;

View File

@ -0,0 +1,33 @@
connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2;
connection node_2a;
ALTER TABLE mysql.gtid_slave_pos engine = InnoDB;
START SLAVE;
connection default;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1);
SELECT LENGTH(@@global.gtid_binlog_state) > 1;
LENGTH(@@global.gtid_binlog_state) > 1
1
connection node_2a;
gtid_binlog_state_equal
0
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
SELECT COUNT(*) = 0 FROM t1;
COUNT(*) = 0
1
gtid_binlog_state_equal
0
#cleanup
connection default;
DROP TABLE t1;
reset master;
connection node_2a;
STOP SLAVE;
RESET SLAVE ALL;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
connection node_3;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;

View File

@ -1,18 +1,14 @@
connection node_2;
connection node_1;
connection node_1;
SEt GLOBAL wsrep_on=OFF;
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SEt GLOBAL wsrep_on=ON;
SET GLOBAL wsrep_on=ON;
FLUSH BINARY LOGS;
SET SESSION binlog_format = 'STATEMENT';
Warnings:
Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
SET SESSION binlog_format = 'MIXED';
Warnings:
Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED
INSERT INTO t1 VALUES (2);
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
Log_name Pos Event_type Server_id End_log_pos Info

View File

@ -3,14 +3,12 @@ connection node_1;
CREATE TABLE t1 (f1 INT PRIMARY KEY);
INSERT INTO t1 VALUES (1);
connection node_2;
SELECT COUNT(*) = 1 FROM t1;
COUNT(*) = 1
1
UPDATE t1 SET f1 = 2;
connection node_1;
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
COUNT(*) = 1
1
SET SESSION wsrep_sync_wait = 15;
SELECT * from t1;
f1
2
gtid_binlog_state_equal
1
DROP TABLE t1;

View File

@ -78,8 +78,3 @@ DROP TABLE t2;
connection node_1;
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
connection node_2;
SET GLOBAL wsrep_on=OFF;
reset master;
SET GLOBAL wsrep_on=ON;

View File

@ -0,0 +1,424 @@
connection node_1;
call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*");
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4;
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
CREATE TABLE t1(
id bigint unsigned NOT NULL AUTO_INCREMENT,
dt datetime NOT NULL,
PRIMARY KEY (id,dt),
KEY dt_idx (dt)
) ENGINE=InnoDB
PARTITION BY RANGE( TO_DAYS(dt) ) (
PARTITION rx2009xx VALUES LESS THAN( TO_DAYS('2010-01-01 00:00:00') ),
PARTITION rx201001 VALUES LESS THAN( TO_DAYS('2010-02-01 00:00:00') ),
PARTITION rx201002 VALUES LESS THAN( TO_DAYS('2010-03-01 00:00:00') ),
PARTITION rx201003 VALUES LESS THAN( TO_DAYS('2010-04-01 00:00:00') ),
PARTITION rx201004 VALUES LESS THAN( TO_DAYS('2010-05-01 00:00:00') ),
PARTITION rx201005 VALUES LESS THAN( TO_DAYS('2010-06-01 00:00:00') ),
PARTITION rx201006 VALUES LESS THAN( TO_DAYS('2010-07-01 00:00:00') ),
PARTITION rx201007 VALUES LESS THAN( TO_DAYS('2010-08-01 00:00:00') ),
PARTITION rx201008 VALUES LESS THAN( TO_DAYS('2010-09-01 00:00:00') ),
PARTITION rx201009 VALUES LESS THAN( TO_DAYS('2010-10-01 00:00:00') ),
PARTITION rx201010 VALUES LESS THAN( TO_DAYS('2010-11-01 00:00:00') ),
PARTITION rx201011 VALUES LESS THAN( TO_DAYS('2010-12-01 00:00:00') ),
PARTITION rx201012 VALUES LESS THAN( TO_DAYS('2011-01-01 00:00:00') ),
PARTITION rx2011 VALUES LESS THAN MAXVALUE);
CREATE PROCEDURE p1 (repeat_count int)
BEGIN
DECLARE current_num int;
SET current_num = 0;
WHILE current_num < repeat_count do
INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2010-02-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2010-03-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2010-04-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2010-06-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2012-02-21 00:00:00');
COMMIT;
SET current_num = current_num + 1;
END WHILE;
END|
insert into t1 (id, dt) values (1, '2010-01-02 00:00:00');
insert into t1 (id, dt) values (2, '2010-01-03 00:00:00');
insert into t1 (id, dt) values (3, '2010-01-04 00:00:00');
insert into t1 (id, dt) values (4, '2010-01-05 00:00:00');
insert into t1 (id, dt) values (5, '2010-01-06 00:00:00');
insert into t1 (id, dt) values (6, '2010-01-07 00:00:00');
insert into t1 (id, dt) values (7, '2010-01-08 00:00:00');
insert into t1 (id, dt) values (8, '2010-01-09 00:00:00');
insert into t1 (id, dt) values (9, '2010-01-10 00:00:00');
insert into t1 (id, dt) values (10, '2010-01-11 00:00:00');
insert into t1 (id, dt) values (11, '2010-01-12 00:00:00');
insert into t1 (id, dt) values (12, '2010-01-13 00:00:00');
insert into t1 (id, dt) values (13, '2010-01-14 00:00:00');
insert into t1 (id, dt) values (14, '2010-01-15 00:00:00');
insert into t1 (id, dt) values (15, '2010-01-16 00:00:00');
insert into t1 (id, dt) values (16, '2010-01-17 00:00:00');
insert into t1 (id, dt) values (17, '2010-01-18 00:00:00');
insert into t1 (id, dt) values (18, '2010-01-19 00:00:00');
insert into t1 (id, dt) values (19, '2010-01-20 00:00:00');
insert into t1 (id, dt) values (20, '2010-01-21 00:00:00');
insert into t1 (id, dt) values (21, '2010-01-22 00:00:00');
insert into t1 (id, dt) values (22, '2010-01-23 00:00:00');
insert into t1 (id, dt) values (23, '2010-01-24 00:00:00');
insert into t1 (id, dt) values (24, '2010-01-25 00:00:00');
insert into t1 (id, dt) values (25, '2010-01-26 00:00:00');
insert into t1 (id, dt) values (26, '2010-01-27 00:00:00');
insert into t1 (id, dt) values (27, '2010-01-28 00:00:00');
insert into t1 (id, dt) values (28, '2010-01-29 00:00:00');
insert into t1 (id, dt) values (29, '2010-01-30 00:00:00');
insert into t1 (id, dt) values (30, '2010-01-31 00:00:00');
insert into t1 (id, dt) values (31, '2010-02-01 00:00:00');
insert into t1 (id, dt) values (32, '2010-02-02 00:00:00');
insert into t1 (id, dt) values (33, '2010-02-03 00:00:00');
insert into t1 (id, dt) values (34, '2010-02-04 00:00:00');
insert into t1 (id, dt) values (35, '2010-02-05 00:00:00');
insert into t1 (id, dt) values (36, '2010-02-06 00:00:00');
insert into t1 (id, dt) values (37, '2010-02-07 00:00:00');
insert into t1 (id, dt) values (38, '2010-02-08 00:00:00');
insert into t1 (id, dt) values (39, '2010-02-09 00:00:00');
insert into t1 (id, dt) values (40, '2010-02-10 00:00:00');
insert into t1 (id, dt) values (41, '2010-02-11 00:00:00');
insert into t1 (id, dt) values (42, '2010-02-12 00:00:00');
insert into t1 (id, dt) values (43, '2010-02-13 00:00:00');
insert into t1 (id, dt) values (44, '2010-02-14 00:00:00');
insert into t1 (id, dt) values (45, '2010-02-15 00:00:00');
insert into t1 (id, dt) values (46, '2010-02-16 00:00:00');
insert into t1 (id, dt) values (47, '2010-02-17 00:00:00');
insert into t1 (id, dt) values (48, '2010-02-18 00:00:00');
insert into t1 (id, dt) values (49, '2010-02-19 00:00:00');
insert into t1 (id, dt) values (50, '2010-02-20 00:00:00');
insert into t1 (id, dt) values (51, '2010-02-21 00:00:00');
insert into t1 (id, dt) values (52, '2010-02-22 00:00:00');
insert into t1 (id, dt) values (53, '2010-02-23 00:00:00');
insert into t1 (id, dt) values (54, '2010-02-24 00:00:00');
insert into t1 (id, dt) values (55, '2010-02-25 00:00:00');
insert into t1 (id, dt) values (56, '2010-02-26 00:00:00');
insert into t1 (id, dt) values (57, '2010-02-27 00:00:00');
insert into t1 (id, dt) values (58, '2010-02-28 00:00:00');
insert into t1 (id, dt) values (59, '2010-03-01 00:00:00');
insert into t1 (id, dt) values (60, '2010-03-02 00:00:00');
insert into t1 (id, dt) values (61, '2010-03-03 00:00:00');
insert into t1 (id, dt) values (62, '2010-03-04 00:00:00');
insert into t1 (id, dt) values (63, '2010-03-05 00:00:00');
insert into t1 (id, dt) values (64, '2010-03-06 00:00:00');
insert into t1 (id, dt) values (65, '2010-03-07 00:00:00');
insert into t1 (id, dt) values (66, '2010-03-08 00:00:00');
insert into t1 (id, dt) values (67, '2010-03-09 00:00:00');
insert into t1 (id, dt) values (68, '2010-03-10 00:00:00');
insert into t1 (id, dt) values (69, '2010-03-11 00:00:00');
insert into t1 (id, dt) values (70, '2010-03-12 00:00:00');
insert into t1 (id, dt) values (71, '2010-03-13 00:00:00');
insert into t1 (id, dt) values (72, '2010-03-14 00:00:00');
insert into t1 (id, dt) values (73, '2010-03-15 00:00:00');
insert into t1 (id, dt) values (74, '2010-03-16 00:00:00');
insert into t1 (id, dt) values (75, '2010-03-17 00:00:00');
insert into t1 (id, dt) values (76, '2010-03-18 00:00:00');
insert into t1 (id, dt) values (77, '2010-03-19 00:00:00');
insert into t1 (id, dt) values (78, '2010-03-20 00:00:00');
insert into t1 (id, dt) values (79, '2010-03-21 00:00:00');
insert into t1 (id, dt) values (80, '2010-03-22 00:00:00');
insert into t1 (id, dt) values (81, '2010-03-23 00:00:00');
insert into t1 (id, dt) values (82, '2010-03-24 00:00:00');
insert into t1 (id, dt) values (83, '2010-03-25 00:00:00');
insert into t1 (id, dt) values (84, '2010-03-26 00:00:00');
insert into t1 (id, dt) values (85, '2010-03-27 00:00:00');
insert into t1 (id, dt) values (86, '2010-03-28 00:00:00');
insert into t1 (id, dt) values (87, '2010-03-29 00:00:00');
insert into t1 (id, dt) values (88, '2010-03-30 00:00:00');
insert into t1 (id, dt) values (89, '2010-03-31 00:00:00');
insert into t1 (id, dt) values (90, '2010-04-01 00:00:00');
insert into t1 (id, dt) values (91, '2010-04-02 00:00:00');
insert into t1 (id, dt) values (92, '2010-04-03 00:00:00');
insert into t1 (id, dt) values (93, '2010-04-04 00:00:00');
insert into t1 (id, dt) values (94, '2010-04-05 00:00:00');
insert into t1 (id, dt) values (95, '2010-04-06 00:00:00');
insert into t1 (id, dt) values (96, '2010-04-07 00:00:00');
insert into t1 (id, dt) values (97, '2010-04-08 00:00:00');
insert into t1 (id, dt) values (98, '2010-04-09 00:00:00');
insert into t1 (id, dt) values (99, '2010-04-10 00:00:00');
insert into t1 (id, dt) values (100, '2010-04-11 00:00:00');
insert into t1 (id, dt) values (101, '2010-04-12 00:00:00');
insert into t1 (id, dt) values (102, '2010-04-13 00:00:00');
insert into t1 (id, dt) values (103, '2010-04-14 00:00:00');
insert into t1 (id, dt) values (104, '2010-04-15 00:00:00');
insert into t1 (id, dt) values (105, '2010-04-16 00:00:00');
insert into t1 (id, dt) values (106, '2010-04-17 00:00:00');
insert into t1 (id, dt) values (107, '2010-04-18 00:00:00');
insert into t1 (id, dt) values (108, '2010-04-19 00:00:00');
insert into t1 (id, dt) values (109, '2010-04-20 00:00:00');
insert into t1 (id, dt) values (110, '2010-04-21 00:00:00');
insert into t1 (id, dt) values (111, '2010-04-22 00:00:00');
insert into t1 (id, dt) values (112, '2010-04-23 00:00:00');
insert into t1 (id, dt) values (113, '2010-04-24 00:00:00');
insert into t1 (id, dt) values (114, '2010-04-25 00:00:00');
insert into t1 (id, dt) values (115, '2010-04-26 00:00:00');
insert into t1 (id, dt) values (116, '2010-04-27 00:00:00');
insert into t1 (id, dt) values (117, '2010-04-28 00:00:00');
insert into t1 (id, dt) values (118, '2010-04-29 00:00:00');
insert into t1 (id, dt) values (119, '2010-04-30 00:00:00');
insert into t1 (id, dt) values (120, '2010-05-01 00:00:00');
insert into t1 (id, dt) values (121, '2010-05-02 00:00:00');
insert into t1 (id, dt) values (122, '2010-05-03 00:00:00');
insert into t1 (id, dt) values (123, '2010-05-04 00:00:00');
insert into t1 (id, dt) values (124, '2010-05-05 00:00:00');
insert into t1 (id, dt) values (125, '2010-05-06 00:00:00');
insert into t1 (id, dt) values (126, '2010-05-07 00:00:00');
insert into t1 (id, dt) values (127, '2010-05-08 00:00:00');
insert into t1 (id, dt) values (128, '2010-05-09 00:00:00');
insert into t1 (id, dt) values (129, '2010-05-10 00:00:00');
insert into t1 (id, dt) values (130, '2010-05-11 00:00:00');
insert into t1 (id, dt) values (131, '2010-05-12 00:00:00');
insert into t1 (id, dt) values (132, '2010-05-13 00:00:00');
insert into t1 (id, dt) values (133, '2010-05-14 00:00:00');
insert into t1 (id, dt) values (134, '2010-05-15 00:00:00');
insert into t1 (id, dt) values (135, '2010-05-16 00:00:00');
insert into t1 (id, dt) values (136, '2010-05-17 00:00:00');
insert into t1 (id, dt) values (137, '2010-05-18 00:00:00');
insert into t1 (id, dt) values (138, '2010-05-19 00:00:00');
insert into t1 (id, dt) values (139, '2010-05-20 00:00:00');
insert into t1 (id, dt) values (140, '2010-05-21 00:00:00');
insert into t1 (id, dt) values (141, '2010-05-22 00:00:00');
insert into t1 (id, dt) values (142, '2010-05-23 00:00:00');
insert into t1 (id, dt) values (143, '2010-05-24 00:00:00');
insert into t1 (id, dt) values (144, '2010-05-25 00:00:00');
insert into t1 (id, dt) values (145, '2010-05-26 00:00:00');
insert into t1 (id, dt) values (146, '2010-05-27 00:00:00');
insert into t1 (id, dt) values (147, '2010-05-28 00:00:00');
insert into t1 (id, dt) values (148, '2010-05-29 00:00:00');
insert into t1 (id, dt) values (149, '2010-05-30 00:00:00');
insert into t1 (id, dt) values (150, '2010-05-31 00:00:00');
insert into t1 (id, dt) values (151, '2010-06-01 00:00:00');
insert into t1 (id, dt) values (152, '2010-06-02 00:00:00');
insert into t1 (id, dt) values (153, '2010-06-03 00:00:00');
insert into t1 (id, dt) values (154, '2010-06-04 00:00:00');
insert into t1 (id, dt) values (155, '2010-06-05 00:00:00');
insert into t1 (id, dt) values (156, '2010-06-06 00:00:00');
insert into t1 (id, dt) values (157, '2010-06-07 00:00:00');
insert into t1 (id, dt) values (158, '2010-06-08 00:00:00');
insert into t1 (id, dt) values (159, '2010-06-09 00:00:00');
insert into t1 (id, dt) values (160, '2010-06-10 00:00:00');
insert into t1 (id, dt) values (161, '2010-06-11 00:00:00');
insert into t1 (id, dt) values (162, '2010-06-12 00:00:00');
insert into t1 (id, dt) values (163, '2010-06-13 00:00:00');
insert into t1 (id, dt) values (164, '2010-06-14 00:00:00');
insert into t1 (id, dt) values (165, '2010-06-15 00:00:00');
insert into t1 (id, dt) values (166, '2010-06-16 00:00:00');
insert into t1 (id, dt) values (167, '2010-06-17 00:00:00');
insert into t1 (id, dt) values (168, '2010-06-18 00:00:00');
insert into t1 (id, dt) values (169, '2010-06-19 00:00:00');
insert into t1 (id, dt) values (170, '2010-06-20 00:00:00');
insert into t1 (id, dt) values (171, '2010-06-21 00:00:00');
insert into t1 (id, dt) values (172, '2010-06-22 00:00:00');
insert into t1 (id, dt) values (173, '2010-06-23 00:00:00');
insert into t1 (id, dt) values (174, '2010-06-24 00:00:00');
insert into t1 (id, dt) values (175, '2010-06-25 00:00:00');
insert into t1 (id, dt) values (176, '2010-06-26 00:00:00');
insert into t1 (id, dt) values (177, '2010-06-27 00:00:00');
insert into t1 (id, dt) values (178, '2010-06-28 00:00:00');
insert into t1 (id, dt) values (179, '2010-06-29 00:00:00');
insert into t1 (id, dt) values (180, '2010-06-30 00:00:00');
insert into t1 (id, dt) values (181, '2010-07-01 00:00:00');
insert into t1 (id, dt) values (182, '2010-07-02 00:00:00');
insert into t1 (id, dt) values (183, '2010-07-03 00:00:00');
insert into t1 (id, dt) values (184, '2010-07-04 00:00:00');
insert into t1 (id, dt) values (185, '2010-07-05 00:00:00');
insert into t1 (id, dt) values (186, '2010-07-06 00:00:00');
insert into t1 (id, dt) values (187, '2010-07-07 00:00:00');
insert into t1 (id, dt) values (188, '2010-07-08 00:00:00');
insert into t1 (id, dt) values (189, '2010-07-09 00:00:00');
insert into t1 (id, dt) values (190, '2010-07-10 00:00:00');
insert into t1 (id, dt) values (191, '2010-07-11 00:00:00');
insert into t1 (id, dt) values (192, '2010-07-12 00:00:00');
insert into t1 (id, dt) values (193, '2010-07-13 00:00:00');
insert into t1 (id, dt) values (194, '2010-07-14 00:00:00');
insert into t1 (id, dt) values (195, '2010-07-15 00:00:00');
insert into t1 (id, dt) values (196, '2010-07-16 00:00:00');
insert into t1 (id, dt) values (197, '2010-07-17 00:00:00');
insert into t1 (id, dt) values (198, '2010-07-18 00:00:00');
insert into t1 (id, dt) values (199, '2010-07-19 00:00:00');
insert into t1 (id, dt) values (200, '2010-07-20 00:00:00');
insert into t1 (id, dt) values (201, '2010-07-21 00:00:00');
insert into t1 (id, dt) values (202, '2010-07-22 00:00:00');
insert into t1 (id, dt) values (203, '2010-07-23 00:00:00');
insert into t1 (id, dt) values (204, '2010-07-24 00:00:00');
insert into t1 (id, dt) values (205, '2010-07-25 00:00:00');
insert into t1 (id, dt) values (206, '2010-07-26 00:00:00');
insert into t1 (id, dt) values (207, '2010-07-27 00:00:00');
insert into t1 (id, dt) values (208, '2010-07-28 00:00:00');
insert into t1 (id, dt) values (209, '2010-07-29 00:00:00');
insert into t1 (id, dt) values (210, '2010-07-30 00:00:00');
insert into t1 (id, dt) values (211, '2010-07-31 00:00:00');
insert into t1 (id, dt) values (212, '2010-08-01 00:00:00');
insert into t1 (id, dt) values (213, '2010-08-02 00:00:00');
insert into t1 (id, dt) values (214, '2010-08-03 00:00:00');
insert into t1 (id, dt) values (215, '2010-08-04 00:00:00');
insert into t1 (id, dt) values (216, '2010-08-05 00:00:00');
insert into t1 (id, dt) values (217, '2010-08-06 00:00:00');
insert into t1 (id, dt) values (218, '2010-08-07 00:00:00');
insert into t1 (id, dt) values (219, '2010-08-08 00:00:00');
insert into t1 (id, dt) values (220, '2010-08-09 00:00:00');
insert into t1 (id, dt) values (221, '2010-08-10 00:00:00');
insert into t1 (id, dt) values (222, '2010-08-11 00:00:00');
insert into t1 (id, dt) values (223, '2010-08-12 00:00:00');
insert into t1 (id, dt) values (224, '2010-08-13 00:00:00');
insert into t1 (id, dt) values (225, '2010-08-14 00:00:00');
insert into t1 (id, dt) values (226, '2010-08-15 00:00:00');
insert into t1 (id, dt) values (227, '2010-08-16 00:00:00');
insert into t1 (id, dt) values (228, '2010-08-17 00:00:00');
insert into t1 (id, dt) values (229, '2010-08-18 00:00:00');
insert into t1 (id, dt) values (230, '2010-08-19 00:00:00');
insert into t1 (id, dt) values (231, '2010-08-20 00:00:00');
insert into t1 (id, dt) values (232, '2010-08-21 00:00:00');
insert into t1 (id, dt) values (233, '2010-08-22 00:00:00');
insert into t1 (id, dt) values (234, '2010-08-23 00:00:00');
insert into t1 (id, dt) values (235, '2010-08-24 00:00:00');
insert into t1 (id, dt) values (236, '2010-08-25 00:00:00');
insert into t1 (id, dt) values (237, '2010-08-26 00:00:00');
insert into t1 (id, dt) values (238, '2010-08-27 00:00:00');
insert into t1 (id, dt) values (239, '2010-08-28 00:00:00');
insert into t1 (id, dt) values (240, '2010-08-29 00:00:00');
insert into t1 (id, dt) values (241, '2010-08-30 00:00:00');
insert into t1 (id, dt) values (242, '2010-08-31 00:00:00');
insert into t1 (id, dt) values (243, '2010-09-01 00:00:00');
insert into t1 (id, dt) values (244, '2010-09-02 00:00:00');
insert into t1 (id, dt) values (245, '2010-09-03 00:00:00');
insert into t1 (id, dt) values (246, '2010-09-04 00:00:00');
insert into t1 (id, dt) values (247, '2010-09-05 00:00:00');
insert into t1 (id, dt) values (248, '2010-09-06 00:00:00');
insert into t1 (id, dt) values (249, '2010-09-07 00:00:00');
insert into t1 (id, dt) values (250, '2010-09-08 00:00:00');
insert into t1 (id, dt) values (251, '2010-09-09 00:00:00');
insert into t1 (id, dt) values (252, '2010-09-10 00:00:00');
insert into t1 (id, dt) values (253, '2010-09-11 00:00:00');
insert into t1 (id, dt) values (254, '2010-09-12 00:00:00');
insert into t1 (id, dt) values (255, '2010-09-13 00:00:00');
insert into t1 (id, dt) values (256, '2010-09-14 00:00:00');
insert into t1 (id, dt) values (257, '2010-09-15 00:00:00');
insert into t1 (id, dt) values (258, '2010-09-16 00:00:00');
insert into t1 (id, dt) values (259, '2010-09-17 00:00:00');
insert into t1 (id, dt) values (260, '2010-09-18 00:00:00');
insert into t1 (id, dt) values (261, '2010-09-19 00:00:00');
insert into t1 (id, dt) values (262, '2010-09-20 00:00:00');
insert into t1 (id, dt) values (263, '2010-09-21 00:00:00');
insert into t1 (id, dt) values (264, '2010-09-22 00:00:00');
insert into t1 (id, dt) values (265, '2010-09-23 00:00:00');
insert into t1 (id, dt) values (266, '2010-09-24 00:00:00');
insert into t1 (id, dt) values (267, '2010-09-25 00:00:00');
insert into t1 (id, dt) values (268, '2010-09-26 00:00:00');
insert into t1 (id, dt) values (269, '2010-09-27 00:00:00');
insert into t1 (id, dt) values (270, '2010-09-28 00:00:00');
insert into t1 (id, dt) values (271, '2010-09-29 00:00:00');
insert into t1 (id, dt) values (272, '2010-09-30 00:00:00');
insert into t1 (id, dt) values (273, '2010-10-01 00:00:00');
insert into t1 (id, dt) values (274, '2010-10-02 00:00:00');
insert into t1 (id, dt) values (275, '2010-10-03 00:00:00');
insert into t1 (id, dt) values (276, '2010-10-04 00:00:00');
insert into t1 (id, dt) values (277, '2010-10-05 00:00:00');
insert into t1 (id, dt) values (278, '2010-10-06 00:00:00');
insert into t1 (id, dt) values (279, '2010-10-07 00:00:00');
insert into t1 (id, dt) values (280, '2010-10-08 00:00:00');
insert into t1 (id, dt) values (281, '2010-10-09 00:00:00');
insert into t1 (id, dt) values (282, '2010-10-10 00:00:00');
insert into t1 (id, dt) values (283, '2010-10-11 00:00:00');
insert into t1 (id, dt) values (284, '2010-10-12 00:00:00');
insert into t1 (id, dt) values (285, '2010-10-13 00:00:00');
insert into t1 (id, dt) values (286, '2010-10-14 00:00:00');
insert into t1 (id, dt) values (287, '2010-10-15 00:00:00');
insert into t1 (id, dt) values (288, '2010-10-16 00:00:00');
insert into t1 (id, dt) values (289, '2010-10-17 00:00:00');
insert into t1 (id, dt) values (290, '2010-10-18 00:00:00');
insert into t1 (id, dt) values (291, '2010-10-19 00:00:00');
insert into t1 (id, dt) values (292, '2010-10-20 00:00:00');
insert into t1 (id, dt) values (293, '2010-10-21 00:00:00');
insert into t1 (id, dt) values (294, '2010-10-22 00:00:00');
insert into t1 (id, dt) values (295, '2010-10-23 00:00:00');
insert into t1 (id, dt) values (296, '2010-10-24 00:00:00');
insert into t1 (id, dt) values (297, '2010-10-25 00:00:00');
insert into t1 (id, dt) values (298, '2010-10-26 00:00:00');
insert into t1 (id, dt) values (299, '2010-10-27 00:00:00');
insert into t1 (id, dt) values (300, '2010-10-28 00:00:00');
insert into t1 (id, dt) values (301, '2010-10-29 00:00:00');
insert into t1 (id, dt) values (302, '2010-10-30 00:00:00');
insert into t1 (id, dt) values (303, '2010-10-31 00:00:00');
insert into t1 (id, dt) values (304, '2010-11-01 00:00:00');
insert into t1 (id, dt) values (305, '2010-11-02 00:00:00');
insert into t1 (id, dt) values (306, '2010-11-03 00:00:00');
insert into t1 (id, dt) values (307, '2010-11-04 00:00:00');
insert into t1 (id, dt) values (308, '2010-11-05 00:00:00');
insert into t1 (id, dt) values (309, '2010-11-06 00:00:00');
insert into t1 (id, dt) values (310, '2010-11-07 00:00:00');
insert into t1 (id, dt) values (311, '2010-11-08 00:00:00');
insert into t1 (id, dt) values (312, '2010-11-09 00:00:00');
insert into t1 (id, dt) values (313, '2010-11-10 00:00:00');
insert into t1 (id, dt) values (314, '2010-11-11 00:00:00');
insert into t1 (id, dt) values (315, '2010-11-12 00:00:00');
insert into t1 (id, dt) values (316, '2010-11-13 00:00:00');
insert into t1 (id, dt) values (317, '2010-11-14 00:00:00');
insert into t1 (id, dt) values (318, '2010-11-15 00:00:00');
insert into t1 (id, dt) values (319, '2010-11-16 00:00:00');
insert into t1 (id, dt) values (320, '2010-11-17 00:00:00');
insert into t1 (id, dt) values (321, '2010-11-18 00:00:00');
insert into t1 (id, dt) values (322, '2010-11-19 00:00:00');
insert into t1 (id, dt) values (323, '2010-11-20 00:00:00');
insert into t1 (id, dt) values (324, '2010-11-21 00:00:00');
insert into t1 (id, dt) values (325, '2010-11-22 00:00:00');
insert into t1 (id, dt) values (326, '2010-11-23 00:00:00');
insert into t1 (id, dt) values (327, '2010-11-24 00:00:00');
insert into t1 (id, dt) values (328, '2010-11-25 00:00:00');
insert into t1 (id, dt) values (329, '2010-11-26 00:00:00');
insert into t1 (id, dt) values (330, '2010-11-27 00:00:00');
insert into t1 (id, dt) values (331, '2010-11-28 00:00:00');
insert into t1 (id, dt) values (332, '2010-11-29 00:00:00');
insert into t1 (id, dt) values (333, '2010-11-30 00:00:00');
insert into t1 (id, dt) values (334, '2010-12-01 00:00:00');
insert into t1 (id, dt) values (335, '2010-12-02 00:00:00');
insert into t1 (id, dt) values (336, '2010-12-03 00:00:00');
insert into t1 (id, dt) values (337, '2010-12-04 00:00:00');
insert into t1 (id, dt) values (338, '2010-12-05 00:00:00');
insert into t1 (id, dt) values (339, '2010-12-06 00:00:00');
insert into t1 (id, dt) values (340, '2010-12-07 00:00:00');
insert into t1 (id, dt) values (341, '2010-12-08 00:00:00');
insert into t1 (id, dt) values (342, '2010-12-09 00:00:00');
insert into t1 (id, dt) values (343, '2010-12-10 00:00:00');
insert into t1 (id, dt) values (344, '2010-12-11 00:00:00');
insert into t1 (id, dt) values (345, '2010-12-12 00:00:00');
insert into t1 (id, dt) values (346, '2010-12-13 00:00:00');
insert into t1 (id, dt) values (347, '2010-12-14 00:00:00');
insert into t1 (id, dt) values (348, '2010-12-15 00:00:00');
insert into t1 (id, dt) values (349, '2010-12-16 00:00:00');
insert into t1 (id, dt) values (350, '2010-12-17 00:00:00');
SELECT COUNT(*) FROM t1;
COUNT(*)
350
connection node_2;
call p1(100);;
connection node_1a;
call p1(100);;
connection node_3;
call p1(100);;
connection node_4;
call p1(100);;
connection node_1;
SET SESSION wsrep_OSU_method='RSU';
SELECT @@wsrep_OSU_method;
@@wsrep_OSU_method
RSU
SET SESSION sql_log_bin = 0;
ALTER TABLE t1 DROP PARTITION rx2009xx;
ALTER TABLE t1 DROP PARTITION rx201004;
ALTER TABLE t1 DROP PARTITION rx201008;
SET SESSION wsrep_OSU_METHOD='TOI';
SELECT @@wsrep_OSU_method;
@@wsrep_OSU_method
TOI
connection node_2;
connection node_3;
connection node_4;
connection node_1a;
DROP TABLE t1;
DROP PROCEDURE p1;

View File

@ -1,5 +1,6 @@
connection node_2;
connection node_1;
call mtr.add_suppression("WSREP has not yet prepared node for application use");
connection node_1;
connection node_2;
connection node_2;
@ -18,9 +19,9 @@ SHOW STATUS LIKE 'wsrep_cluster_status';
Variable_name Value
wsrep_cluster_status Disconnected
SELECT * FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
Got one of the listed errors
SELECT 1 FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
Got one of the listed errors
SET @@session.wsrep_dirty_reads=ON;
SELECT * FROM t1;
i
@ -33,7 +34,7 @@ i variable_name variable_value
1 WSREP_DIRTY_READS ON
SET @@session.wsrep_dirty_reads=OFF;
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
ERROR 08S01: WSREP has not yet prepared node for application use
Got one of the listed errors
SELECT 1;
1
1

View File

@ -1,10 +1,11 @@
connection node_1;
SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership;
COUNT(DISTINCT uuid) = 2
1
SELECT MAX(size) = 2 FROM mtr_wsrep_notify.status;
MAX(size) = 2
1
SELECT COUNT(DISTINCT idx) = 2 FROM mtr_wsrep_notify.status;
COUNT(DISTINCT idx) = 2
SET SESSION wsrep_sync_wait=15;
SELECT COUNT(DISTINCT uuid) FROM mtr_wsrep_notify.membership;
COUNT(DISTINCT uuid)
2
SELECT MAX(size) FROM mtr_wsrep_notify.status;
MAX(size)
2
SELECT COUNT(DISTINCT idx) FROM mtr_wsrep_notify.status;
COUNT(DISTINCT idx)
1

View File

@ -1,5 +1,10 @@
<<<<<<< HEAD
connection node_2;
connection node_1;
||||||| merged common ancestors
=======
call mtr.add_suppression("WSREP has not yet prepared node for application use");
>>>>>>> 10.3
CREATE TABLE t1 (f1 INTEGER);
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
connection node_1;
@ -7,14 +12,14 @@ SET SESSION wsrep_reject_queries = ALL;
ERROR HY000: Variable 'wsrep_reject_queries' is a GLOBAL variable and should be set with SET GLOBAL
SET GLOBAL wsrep_reject_queries = ALL;
SELECT * FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
Got one of the listed errors
SET GLOBAL wsrep_reject_queries = ALL_KILL;
connection node_1a;
SELECT * FROM t1;
Got one of the listed errors
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
SELECT * FROM t1;
ERROR 08S01: WSREP has not yet prepared node for application use
Got one of the listed errors
connection node_2;
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
VARIABLE_VALUE = 2

View File

@ -27,7 +27,7 @@ VARIABLE_VALUE = 'ON'
1
SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index';
VARIABLE_VALUE = 0
1
0
SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
VARIABLE_VALUE = 'ON'
1

View File

@ -2,10 +2,13 @@
# MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR
#
--source include/have_log_bin.inc
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*");
call mtr.add_suppression("WSREP has not yet prepared node for application use");
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root', MASTER_CONNECT_RETRY=1;
--enable_query_log
@ -18,11 +21,14 @@ SET SESSION wsrep_on = OFF;
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'
--source include/wait_condition.inc
SET SESSION wsrep_on = ON;
#wsrep_sync_wait is set to zero because when slave tries to connect it it ask for queries like SELECT UNIX_TIMESTAMP() on node 1 which will fail, causing
#a warning in slave error log.
SET global wsrep_sync_wait=0;
--connection node_3
SELECT @@wsrep_on;
--sleep 1
START SLAVE;
--let $slave_param= Slave_IO_Running
--let $slave_param_value= Connecting
@ -50,8 +56,8 @@ INSERT INTO t1 VALUES (1);
--connection node_1
DROP TABLE t1;
--eval SET global wsrep_sync_wait=$wsrep_sync_wait_state
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
--source include/wait_condition.inc
@ -60,13 +66,3 @@ STOP SLAVE;
RESET SLAVE ALL;
CALL mtr.add_suppression('failed registering on master');
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
--connection node_1
set global wsrep_on=OFF;
RESET MASTER;
set global wsrep_on=ON;
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
--connection node_2
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');

View File

@ -1 +0,0 @@
--log-bin --log-slave-updates

View File

@ -0,0 +1,12 @@
!include ../galera_2nodes.cnf
[mysqld.1]
log-bin
log-slave-updates
[mysqld.2]
log-bin
log-slave-updates

View File

@ -1,36 +0,0 @@
#
# MW-328 Fix unnecessary/silent BF aborts
#
#
# Make sure that a high value of wsrep_retry_autocommit
# masks all deadlock errors
#
--source include/galera_cluster.inc
--source include/big_test.inc
--source suite/galera/t/MW-328-header.inc
--connection node_2
--let $count = 100
SET SESSION wsrep_retry_autocommit = 10000;
--disable_query_log
while ($count)
{
--error 0
INSERT IGNORE INTO t2 SELECT f2 FROM t1;
--disable_result_log
--error 0
SELECT 1 FROM DUAL;
--enable_result_log
--dec $count
}
--enable_query_log
--source suite/galera/t/MW-328-footer.inc

View File

@ -1 +0,0 @@
--wsrep-retry-autocommit=0

View File

@ -0,0 +1,9 @@
!include ../galera_2nodes.cnf
[mysqld.1]
wsrep-retry-autocommit=0
[mysqld.2]

View File

@ -1,2 +1 @@
--log-output=TABLE
--general-log=OFF

View File

@ -3,40 +3,30 @@
#
--source include/galera_cluster.inc
--source include/have_innodb.inc
--connection node_1
TRUNCATE TABLE mysql.general_log;
--sleep 1
--connection node_2
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log;
--source include/wait_condition.inc
TRUNCATE TABLE mysql.general_log;
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE '%mysql.general_log%'
--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
--source include/wait_condition_with_debug.inc
--sleep 1
--connection node_1
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log;
--source include/wait_condition.inc
SELECT Argument FROM mysql.general_log;
SET GLOBAL general_log='ON';
SET SESSION wsrep_osu_method=TOI;
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
SET SESSION wsrep_osu_method=RSU;
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
SET SESSION wsrep_osu_method=TOI;
--let $wait_condition = SELECT COUNT(argument) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%';
--source include/wait_condition.inc
SELECT argument FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%';
--let $wait_condition = SELECT COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE "CREATE%" OR argument LIKE "ALTER%"
--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
--source include/wait_condition_with_debug.inc
--connection node_2
SELECT Argument FROM mysql.general_log;
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument LIKE "CREATE%" OR argument LIKE "ALTER%"
--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
--source include/wait_condition_with_debug.inc
DROP TABLE t1;
SET GLOBAL general_log='OFF';
--connection node_1
SET GLOBAL general_log='OFF';

View File

@ -1 +0,0 @@
--log-bin --log-slave-updates

View File

@ -1 +0,0 @@
--log-bin --log-slave-updates

View File

@ -0,0 +1,10 @@
!include ../galera_2nodes.cnf
[mysqld.1]
log-bin
log-slave-updates
[mysqld.2]
log-bin
log-slave-updates

View File

@ -0,0 +1,13 @@
!include ../galera_2nodes.cnf
[mysqld.1]
enforce_storage_engine=innodb
sql_mode=''
[mysqld.2]
enforce_storage_engine=innodb
sql_mode=''

View File

@ -1,2 +0,0 @@
--enforce_storage_engine=innodb --sql_mode=''

View File

@ -0,0 +1,14 @@
!include ../galera_2nodes.cnf
[mysqld.1]
lock_wait_timeout=5
innodb_lock_wait_timeout=5
wait_timeout=5
[mysqld.2]
lock_wait_timeout=5
innodb_lock_wait_timeout=5
wait_timeout=5

View File

@ -0,0 +1,5 @@
!include ../galera_2nodes_as_slave.cnf
# make sure master server uses ROW format for replication
[mysqld]
binlog-format=row

View File

@ -0,0 +1,74 @@
#
# Test Galera as a slave to a MySQL master
#
# The galera/galera_2node_slave.cnf describes the setup of the nodes
# also, for this test, master server must have binlog_format=ROW
#
--source include/have_innodb.inc
# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connection node_2a
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
--enable_query_log
START SLAVE;
# make sure master server has binlog_format=ROW
--connection default
SHOW VARIABLES LIKE 'binlog_format';
#
# test phase one, issue CTAS with empty source table
#
--connection default
CREATE TABLE source (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
CREATE TABLE target AS SELECT * FROM source;
--connection node_2a
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target';
--source include/wait_condition.inc
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target';
--source include/wait_condition.inc
#
# test phase two, issue CTAS with populated source table
#
--connection default
DROP TABLE target;
INSERT INTO source VALUES(1);
CREATE TABLE target AS SELECT * FROM source;
--connection node_2a
--let $wait_condition = SELECT COUNT(*) = 1 FROM target;
--source include/wait_condition.inc
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 1 FROM target;
--source include/wait_condition.inc
--connection default
DROP TABLE source;
DROP TABLE target;
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'target';
--source include/wait_condition.inc
--connection node_2a
STOP SLAVE;
RESET SLAVE ALL;
--connection default
RESET MASTER;
--disconnect node_2a

View File

@ -0,0 +1,6 @@
!include ../galera_2nodes_as_slave.cnf
[mysqld]
log-bin=mysqld-bin
log-slave-updates
binlog-format=ROW

View File

@ -0,0 +1,74 @@
#
# Test Galera as a slave to a MariaDB master using GTIDs
#
# suite/galera/galera_2nodes_as_slave.cnf describes the setup of the nodes
# suite/galera/t/galera_as_slave_gtid.cnf has the GTID options
#
# This test will replicate writes to MyISAM table and check that slave node is able
# to apply them.
# mysql.gtid_slave_pos table should be defined as innodb engine, original problem
# by writes to mysql.gtid_slave_pos, whereas the replicated transaction contained
# no innodb writes
#
--source include/have_innodb.inc
# As node #1 is not a Galera node, we connect to node #2 in order to run include/galera_cluster.inc
--connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2
--connection node_2a
# make sure gtid_slave_pos is of innodb engine, mtr does not currently provide that
ALTER TABLE mysql.gtid_slave_pos engine = InnoDB;
--disable_query_log
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_USER='root', MASTER_PORT=$NODE_MYPORT_1;
--enable_query_log
START SLAVE;
--connection default
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1);
SELECT LENGTH(@@global.gtid_binlog_state) > 1;
--let $gtid_binlog_state_node1 = `SELECT @@global.gtid_binlog_state;`
--connection node_2a
--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 t1;
--source include/wait_condition.inc
--disable_query_log
--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
--enable_query_log
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
SELECT COUNT(*) = 0 FROM t1;
--disable_query_log
--eval SELECT '$gtid_binlog_state_node1' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
--enable_query_log
--echo #cleanup
--connection default
DROP TABLE t1;
reset master;
--connection node_2a
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
STOP SLAVE;
RESET SLAVE ALL;
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;
--connection node_3
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1';
--source include/wait_condition.inc
set global wsrep_on=OFF;
reset master;
set global wsrep_on=ON;

View File

@ -0,0 +1,9 @@
!include ../galera_2nodes.cnf
[mysqld.1]
innodb_stats_persistent=ON
[mysqld.2]
innodb_stats_persistent=ON

View File

@ -1 +0,0 @@
--innodb_stats_persistent=ON

View File

@ -1 +0,0 @@
--binlog-checksum=CRC32 --master-verify-checksum=1 --slave-sql-verify-checksum=1

View File

@ -0,0 +1,13 @@
!include ../galera_2nodes.cnf
[mysqld.1]
binlog-checksum=CRC32
master-verify-checksum=1
slave-sql-verify-checksum=1
[mysqld.2]
binlog-checksum=CRC32
master-verify-checksum=1
slave-sql-verify-checksum=1

View File

@ -1 +0,0 @@
--binlog-row-event-max-size=4294967040

View File

@ -0,0 +1,9 @@
!include ../galera_2nodes.cnf
[mysqld.1]
binlog-row-event-max-size=4294967040
[mysqld.2]

View File

@ -1 +0,0 @@
--binlog-row-event-max-size=256

View File

@ -0,0 +1,9 @@
!include ../galera_2nodes.cnf
[mysqld.1]
binlog-row-event-max-size=256
[mysqld.2]

View File

@ -1 +0,0 @@
--query_cache_type=1 --query_cache_size=1000000

View File

@ -0,0 +1,10 @@
!include ../galera_2nodes.cnf
[mysqld.1]
query_cache_type=1
query_cache_size=1000000
[mysqld.2]
query_cache_type=1
query_cache_size=1000000

View File

@ -0,0 +1,12 @@
!include ../galera_2nodes.cnf
[mysqld.1]
query_cache_type=1
query_cache_size=1000000
wsrep_replicate_myisam=ON
[mysqld.2]
query_cache_type=1
query_cache_size=1000000
wsrep_replicate_myisam=ON

View File

@ -1,3 +0,0 @@
--query_cache_type=1
--query_cache_size=1000000
--wsrep_replicate_myisam=ON

View File

@ -7,17 +7,21 @@
--source include/galera_cluster.inc
--connection node_1
SEt GLOBAL wsrep_on=OFF;
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SEt GLOBAL wsrep_on=ON;
SET GLOBAL wsrep_on=ON;
FLUSH BINARY LOGS;
--disable_warnings
SET SESSION binlog_format = 'STATEMENT';
--enable_warnings
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1);
--disable_warnings
SET SESSION binlog_format = 'MIXED';
--enable_warnings
INSERT INTO t1 VALUES (2);

View File

@ -0,0 +1,10 @@
!include ../galera_2nodes.cnf
[mysqld.1]
log-bin
log-slave-updates
[mysqld.2]
log-bin
log-slave-updates

View File

@ -11,14 +11,18 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY);
INSERT INTO t1 VALUES (1);
--connection node_2
SELECT COUNT(*) = 1 FROM t1;
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1
--source include/wait_condition.inc
UPDATE t1 SET f1 = 2;
--let $gtid_binlog_state_node2 = `SELECT @@global.gtid_binlog_state;`
--connection node_1
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
SET SESSION wsrep_sync_wait = 15;
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2
--source include/wait_condition.inc
SELECT * from t1;
--disable_query_log
--eval SELECT '$gtid_binlog_state_node2' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;

View File

@ -1,6 +1,14 @@
!include ../galera_2nodes.cnf
[mysqld]
[mysqld.1]
secure-file-priv = ""
innodb_file_per_table = ON
innodb_stats_persistent=ON
innodb_stats_auto_recalc=ON
innodb_stats_persistent_sample_pages=20
innodb_stats_transient_sample_pages=8
[mysqld.2]
secure-file-priv = ""
innodb_file_per_table = ON
innodb_stats_persistent=ON

View File

@ -1 +0,0 @@
--log-bin --log-slave-updates

View File

@ -0,0 +1,10 @@
!include ../galera_2nodes.cnf
[mysqld.1]
log-bin
log-slave-updates
[mysqld.2]
log-bin
log-slave-updates

View File

@ -1,5 +1,5 @@
--source include/galera_cluster.inc
--source include/have_innodb.inc
--source include/force_restart.inc
--connection node_1
set global wsrep_on=OFF;
@ -44,8 +44,3 @@ DROP TABLE t2;
--connection node_1
SET GLOBAL wsrep_on=OFF;
RESET MASTER;
SET GLOBAL wsrep_on=ON;
--connection node_2
SET GLOBAL wsrep_on=OFF;
reset master;
SET GLOBAL wsrep_on=ON;

View File

@ -0,0 +1,9 @@
!include ../galera_2nodes.cnf
[mysqld.1]
innodb-stats-persistent=1
[mysqld.2]
innodb-stats-persistent=1

View File

@ -1 +0,0 @@
--innodb-stats-persistent=1

View File

@ -0,0 +1,18 @@
!include ../galera_4nodes.cnf
[mysqld.1]
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M;gmcast.segment=1'
wsrep_slave_threads=10
[mysqld.2]
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M;gmcast.segment=1'
wsrep_slave_threads=10
[mysqld.3]
wsrep_provider_options='base_port=@mysqld.3.#galera_port;gcache.size=10M;gmcast.segment=2'
wsrep_slave_threads=10
[mysqld.4]
wsrep_provider_options='base_port=@mysqld.4.#galera_port;gcache.size=10M;gmcast.segment=3'
wsrep_slave_threads=10

View File

@ -0,0 +1,453 @@
--source include/galera_cluster.inc
--source include/have_partition.inc
--connection node_1
call mtr.add_suppression("WSREP: RSU failed due to pending transactions, schema: test, query ALTER.*");
call mtr.add_suppression("WSREP: ALTER TABLE isolation failure");
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
--connect node_4, 127.0.0.1, root, , test, $NODE_MYPORT_4
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
--connection node_1
CREATE TABLE t1(
id bigint unsigned NOT NULL AUTO_INCREMENT,
dt datetime NOT NULL,
PRIMARY KEY (id,dt),
KEY dt_idx (dt)
) ENGINE=InnoDB
PARTITION BY RANGE( TO_DAYS(dt) ) (
PARTITION rx2009xx VALUES LESS THAN( TO_DAYS('2010-01-01 00:00:00') ),
PARTITION rx201001 VALUES LESS THAN( TO_DAYS('2010-02-01 00:00:00') ),
PARTITION rx201002 VALUES LESS THAN( TO_DAYS('2010-03-01 00:00:00') ),
PARTITION rx201003 VALUES LESS THAN( TO_DAYS('2010-04-01 00:00:00') ),
PARTITION rx201004 VALUES LESS THAN( TO_DAYS('2010-05-01 00:00:00') ),
PARTITION rx201005 VALUES LESS THAN( TO_DAYS('2010-06-01 00:00:00') ),
PARTITION rx201006 VALUES LESS THAN( TO_DAYS('2010-07-01 00:00:00') ),
PARTITION rx201007 VALUES LESS THAN( TO_DAYS('2010-08-01 00:00:00') ),
PARTITION rx201008 VALUES LESS THAN( TO_DAYS('2010-09-01 00:00:00') ),
PARTITION rx201009 VALUES LESS THAN( TO_DAYS('2010-10-01 00:00:00') ),
PARTITION rx201010 VALUES LESS THAN( TO_DAYS('2010-11-01 00:00:00') ),
PARTITION rx201011 VALUES LESS THAN( TO_DAYS('2010-12-01 00:00:00') ),
PARTITION rx201012 VALUES LESS THAN( TO_DAYS('2011-01-01 00:00:00') ),
PARTITION rx2011 VALUES LESS THAN MAXVALUE);
DELIMITER |;
CREATE PROCEDURE p1 (repeat_count int)
BEGIN
DECLARE current_num int;
SET current_num = 0;
WHILE current_num < repeat_count do
INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2010-02-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2010-03-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2010-04-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2010-06-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2010-10-21 00:00:00');
INSERT INTO t1 VALUES (NULL, '2012-02-21 00:00:00');
COMMIT;
SET current_num = current_num + 1;
END WHILE;
END|
DELIMITER ;|
insert into t1 (id, dt) values (1, '2010-01-02 00:00:00');
insert into t1 (id, dt) values (2, '2010-01-03 00:00:00');
insert into t1 (id, dt) values (3, '2010-01-04 00:00:00');
insert into t1 (id, dt) values (4, '2010-01-05 00:00:00');
insert into t1 (id, dt) values (5, '2010-01-06 00:00:00');
insert into t1 (id, dt) values (6, '2010-01-07 00:00:00');
insert into t1 (id, dt) values (7, '2010-01-08 00:00:00');
insert into t1 (id, dt) values (8, '2010-01-09 00:00:00');
insert into t1 (id, dt) values (9, '2010-01-10 00:00:00');
insert into t1 (id, dt) values (10, '2010-01-11 00:00:00');
insert into t1 (id, dt) values (11, '2010-01-12 00:00:00');
insert into t1 (id, dt) values (12, '2010-01-13 00:00:00');
insert into t1 (id, dt) values (13, '2010-01-14 00:00:00');
insert into t1 (id, dt) values (14, '2010-01-15 00:00:00');
insert into t1 (id, dt) values (15, '2010-01-16 00:00:00');
insert into t1 (id, dt) values (16, '2010-01-17 00:00:00');
insert into t1 (id, dt) values (17, '2010-01-18 00:00:00');
insert into t1 (id, dt) values (18, '2010-01-19 00:00:00');
insert into t1 (id, dt) values (19, '2010-01-20 00:00:00');
insert into t1 (id, dt) values (20, '2010-01-21 00:00:00');
insert into t1 (id, dt) values (21, '2010-01-22 00:00:00');
insert into t1 (id, dt) values (22, '2010-01-23 00:00:00');
insert into t1 (id, dt) values (23, '2010-01-24 00:00:00');
insert into t1 (id, dt) values (24, '2010-01-25 00:00:00');
insert into t1 (id, dt) values (25, '2010-01-26 00:00:00');
insert into t1 (id, dt) values (26, '2010-01-27 00:00:00');
insert into t1 (id, dt) values (27, '2010-01-28 00:00:00');
insert into t1 (id, dt) values (28, '2010-01-29 00:00:00');
insert into t1 (id, dt) values (29, '2010-01-30 00:00:00');
insert into t1 (id, dt) values (30, '2010-01-31 00:00:00');
insert into t1 (id, dt) values (31, '2010-02-01 00:00:00');
insert into t1 (id, dt) values (32, '2010-02-02 00:00:00');
insert into t1 (id, dt) values (33, '2010-02-03 00:00:00');
insert into t1 (id, dt) values (34, '2010-02-04 00:00:00');
insert into t1 (id, dt) values (35, '2010-02-05 00:00:00');
insert into t1 (id, dt) values (36, '2010-02-06 00:00:00');
insert into t1 (id, dt) values (37, '2010-02-07 00:00:00');
insert into t1 (id, dt) values (38, '2010-02-08 00:00:00');
insert into t1 (id, dt) values (39, '2010-02-09 00:00:00');
insert into t1 (id, dt) values (40, '2010-02-10 00:00:00');
insert into t1 (id, dt) values (41, '2010-02-11 00:00:00');
insert into t1 (id, dt) values (42, '2010-02-12 00:00:00');
insert into t1 (id, dt) values (43, '2010-02-13 00:00:00');
insert into t1 (id, dt) values (44, '2010-02-14 00:00:00');
insert into t1 (id, dt) values (45, '2010-02-15 00:00:00');
insert into t1 (id, dt) values (46, '2010-02-16 00:00:00');
insert into t1 (id, dt) values (47, '2010-02-17 00:00:00');
insert into t1 (id, dt) values (48, '2010-02-18 00:00:00');
insert into t1 (id, dt) values (49, '2010-02-19 00:00:00');
insert into t1 (id, dt) values (50, '2010-02-20 00:00:00');
insert into t1 (id, dt) values (51, '2010-02-21 00:00:00');
insert into t1 (id, dt) values (52, '2010-02-22 00:00:00');
insert into t1 (id, dt) values (53, '2010-02-23 00:00:00');
insert into t1 (id, dt) values (54, '2010-02-24 00:00:00');
insert into t1 (id, dt) values (55, '2010-02-25 00:00:00');
insert into t1 (id, dt) values (56, '2010-02-26 00:00:00');
insert into t1 (id, dt) values (57, '2010-02-27 00:00:00');
insert into t1 (id, dt) values (58, '2010-02-28 00:00:00');
insert into t1 (id, dt) values (59, '2010-03-01 00:00:00');
insert into t1 (id, dt) values (60, '2010-03-02 00:00:00');
insert into t1 (id, dt) values (61, '2010-03-03 00:00:00');
insert into t1 (id, dt) values (62, '2010-03-04 00:00:00');
insert into t1 (id, dt) values (63, '2010-03-05 00:00:00');
insert into t1 (id, dt) values (64, '2010-03-06 00:00:00');
insert into t1 (id, dt) values (65, '2010-03-07 00:00:00');
insert into t1 (id, dt) values (66, '2010-03-08 00:00:00');
insert into t1 (id, dt) values (67, '2010-03-09 00:00:00');
insert into t1 (id, dt) values (68, '2010-03-10 00:00:00');
insert into t1 (id, dt) values (69, '2010-03-11 00:00:00');
insert into t1 (id, dt) values (70, '2010-03-12 00:00:00');
insert into t1 (id, dt) values (71, '2010-03-13 00:00:00');
insert into t1 (id, dt) values (72, '2010-03-14 00:00:00');
insert into t1 (id, dt) values (73, '2010-03-15 00:00:00');
insert into t1 (id, dt) values (74, '2010-03-16 00:00:00');
insert into t1 (id, dt) values (75, '2010-03-17 00:00:00');
insert into t1 (id, dt) values (76, '2010-03-18 00:00:00');
insert into t1 (id, dt) values (77, '2010-03-19 00:00:00');
insert into t1 (id, dt) values (78, '2010-03-20 00:00:00');
insert into t1 (id, dt) values (79, '2010-03-21 00:00:00');
insert into t1 (id, dt) values (80, '2010-03-22 00:00:00');
insert into t1 (id, dt) values (81, '2010-03-23 00:00:00');
insert into t1 (id, dt) values (82, '2010-03-24 00:00:00');
insert into t1 (id, dt) values (83, '2010-03-25 00:00:00');
insert into t1 (id, dt) values (84, '2010-03-26 00:00:00');
insert into t1 (id, dt) values (85, '2010-03-27 00:00:00');
insert into t1 (id, dt) values (86, '2010-03-28 00:00:00');
insert into t1 (id, dt) values (87, '2010-03-29 00:00:00');
insert into t1 (id, dt) values (88, '2010-03-30 00:00:00');
insert into t1 (id, dt) values (89, '2010-03-31 00:00:00');
insert into t1 (id, dt) values (90, '2010-04-01 00:00:00');
insert into t1 (id, dt) values (91, '2010-04-02 00:00:00');
insert into t1 (id, dt) values (92, '2010-04-03 00:00:00');
insert into t1 (id, dt) values (93, '2010-04-04 00:00:00');
insert into t1 (id, dt) values (94, '2010-04-05 00:00:00');
insert into t1 (id, dt) values (95, '2010-04-06 00:00:00');
insert into t1 (id, dt) values (96, '2010-04-07 00:00:00');
insert into t1 (id, dt) values (97, '2010-04-08 00:00:00');
insert into t1 (id, dt) values (98, '2010-04-09 00:00:00');
insert into t1 (id, dt) values (99, '2010-04-10 00:00:00');
insert into t1 (id, dt) values (100, '2010-04-11 00:00:00');
insert into t1 (id, dt) values (101, '2010-04-12 00:00:00');
insert into t1 (id, dt) values (102, '2010-04-13 00:00:00');
insert into t1 (id, dt) values (103, '2010-04-14 00:00:00');
insert into t1 (id, dt) values (104, '2010-04-15 00:00:00');
insert into t1 (id, dt) values (105, '2010-04-16 00:00:00');
insert into t1 (id, dt) values (106, '2010-04-17 00:00:00');
insert into t1 (id, dt) values (107, '2010-04-18 00:00:00');
insert into t1 (id, dt) values (108, '2010-04-19 00:00:00');
insert into t1 (id, dt) values (109, '2010-04-20 00:00:00');
insert into t1 (id, dt) values (110, '2010-04-21 00:00:00');
insert into t1 (id, dt) values (111, '2010-04-22 00:00:00');
insert into t1 (id, dt) values (112, '2010-04-23 00:00:00');
insert into t1 (id, dt) values (113, '2010-04-24 00:00:00');
insert into t1 (id, dt) values (114, '2010-04-25 00:00:00');
insert into t1 (id, dt) values (115, '2010-04-26 00:00:00');
insert into t1 (id, dt) values (116, '2010-04-27 00:00:00');
insert into t1 (id, dt) values (117, '2010-04-28 00:00:00');
insert into t1 (id, dt) values (118, '2010-04-29 00:00:00');
insert into t1 (id, dt) values (119, '2010-04-30 00:00:00');
insert into t1 (id, dt) values (120, '2010-05-01 00:00:00');
insert into t1 (id, dt) values (121, '2010-05-02 00:00:00');
insert into t1 (id, dt) values (122, '2010-05-03 00:00:00');
insert into t1 (id, dt) values (123, '2010-05-04 00:00:00');
insert into t1 (id, dt) values (124, '2010-05-05 00:00:00');
insert into t1 (id, dt) values (125, '2010-05-06 00:00:00');
insert into t1 (id, dt) values (126, '2010-05-07 00:00:00');
insert into t1 (id, dt) values (127, '2010-05-08 00:00:00');
insert into t1 (id, dt) values (128, '2010-05-09 00:00:00');
insert into t1 (id, dt) values (129, '2010-05-10 00:00:00');
insert into t1 (id, dt) values (130, '2010-05-11 00:00:00');
insert into t1 (id, dt) values (131, '2010-05-12 00:00:00');
insert into t1 (id, dt) values (132, '2010-05-13 00:00:00');
insert into t1 (id, dt) values (133, '2010-05-14 00:00:00');
insert into t1 (id, dt) values (134, '2010-05-15 00:00:00');
insert into t1 (id, dt) values (135, '2010-05-16 00:00:00');
insert into t1 (id, dt) values (136, '2010-05-17 00:00:00');
insert into t1 (id, dt) values (137, '2010-05-18 00:00:00');
insert into t1 (id, dt) values (138, '2010-05-19 00:00:00');
insert into t1 (id, dt) values (139, '2010-05-20 00:00:00');
insert into t1 (id, dt) values (140, '2010-05-21 00:00:00');
insert into t1 (id, dt) values (141, '2010-05-22 00:00:00');
insert into t1 (id, dt) values (142, '2010-05-23 00:00:00');
insert into t1 (id, dt) values (143, '2010-05-24 00:00:00');
insert into t1 (id, dt) values (144, '2010-05-25 00:00:00');
insert into t1 (id, dt) values (145, '2010-05-26 00:00:00');
insert into t1 (id, dt) values (146, '2010-05-27 00:00:00');
insert into t1 (id, dt) values (147, '2010-05-28 00:00:00');
insert into t1 (id, dt) values (148, '2010-05-29 00:00:00');
insert into t1 (id, dt) values (149, '2010-05-30 00:00:00');
insert into t1 (id, dt) values (150, '2010-05-31 00:00:00');
insert into t1 (id, dt) values (151, '2010-06-01 00:00:00');
insert into t1 (id, dt) values (152, '2010-06-02 00:00:00');
insert into t1 (id, dt) values (153, '2010-06-03 00:00:00');
insert into t1 (id, dt) values (154, '2010-06-04 00:00:00');
insert into t1 (id, dt) values (155, '2010-06-05 00:00:00');
insert into t1 (id, dt) values (156, '2010-06-06 00:00:00');
insert into t1 (id, dt) values (157, '2010-06-07 00:00:00');
insert into t1 (id, dt) values (158, '2010-06-08 00:00:00');
insert into t1 (id, dt) values (159, '2010-06-09 00:00:00');
insert into t1 (id, dt) values (160, '2010-06-10 00:00:00');
insert into t1 (id, dt) values (161, '2010-06-11 00:00:00');
insert into t1 (id, dt) values (162, '2010-06-12 00:00:00');
insert into t1 (id, dt) values (163, '2010-06-13 00:00:00');
insert into t1 (id, dt) values (164, '2010-06-14 00:00:00');
insert into t1 (id, dt) values (165, '2010-06-15 00:00:00');
insert into t1 (id, dt) values (166, '2010-06-16 00:00:00');
insert into t1 (id, dt) values (167, '2010-06-17 00:00:00');
insert into t1 (id, dt) values (168, '2010-06-18 00:00:00');
insert into t1 (id, dt) values (169, '2010-06-19 00:00:00');
insert into t1 (id, dt) values (170, '2010-06-20 00:00:00');
insert into t1 (id, dt) values (171, '2010-06-21 00:00:00');
insert into t1 (id, dt) values (172, '2010-06-22 00:00:00');
insert into t1 (id, dt) values (173, '2010-06-23 00:00:00');
insert into t1 (id, dt) values (174, '2010-06-24 00:00:00');
insert into t1 (id, dt) values (175, '2010-06-25 00:00:00');
insert into t1 (id, dt) values (176, '2010-06-26 00:00:00');
insert into t1 (id, dt) values (177, '2010-06-27 00:00:00');
insert into t1 (id, dt) values (178, '2010-06-28 00:00:00');
insert into t1 (id, dt) values (179, '2010-06-29 00:00:00');
insert into t1 (id, dt) values (180, '2010-06-30 00:00:00');
insert into t1 (id, dt) values (181, '2010-07-01 00:00:00');
insert into t1 (id, dt) values (182, '2010-07-02 00:00:00');
insert into t1 (id, dt) values (183, '2010-07-03 00:00:00');
insert into t1 (id, dt) values (184, '2010-07-04 00:00:00');
insert into t1 (id, dt) values (185, '2010-07-05 00:00:00');
insert into t1 (id, dt) values (186, '2010-07-06 00:00:00');
insert into t1 (id, dt) values (187, '2010-07-07 00:00:00');
insert into t1 (id, dt) values (188, '2010-07-08 00:00:00');
insert into t1 (id, dt) values (189, '2010-07-09 00:00:00');
insert into t1 (id, dt) values (190, '2010-07-10 00:00:00');
insert into t1 (id, dt) values (191, '2010-07-11 00:00:00');
insert into t1 (id, dt) values (192, '2010-07-12 00:00:00');
insert into t1 (id, dt) values (193, '2010-07-13 00:00:00');
insert into t1 (id, dt) values (194, '2010-07-14 00:00:00');
insert into t1 (id, dt) values (195, '2010-07-15 00:00:00');
insert into t1 (id, dt) values (196, '2010-07-16 00:00:00');
insert into t1 (id, dt) values (197, '2010-07-17 00:00:00');
insert into t1 (id, dt) values (198, '2010-07-18 00:00:00');
insert into t1 (id, dt) values (199, '2010-07-19 00:00:00');
insert into t1 (id, dt) values (200, '2010-07-20 00:00:00');
insert into t1 (id, dt) values (201, '2010-07-21 00:00:00');
insert into t1 (id, dt) values (202, '2010-07-22 00:00:00');
insert into t1 (id, dt) values (203, '2010-07-23 00:00:00');
insert into t1 (id, dt) values (204, '2010-07-24 00:00:00');
insert into t1 (id, dt) values (205, '2010-07-25 00:00:00');
insert into t1 (id, dt) values (206, '2010-07-26 00:00:00');
insert into t1 (id, dt) values (207, '2010-07-27 00:00:00');
insert into t1 (id, dt) values (208, '2010-07-28 00:00:00');
insert into t1 (id, dt) values (209, '2010-07-29 00:00:00');
insert into t1 (id, dt) values (210, '2010-07-30 00:00:00');
insert into t1 (id, dt) values (211, '2010-07-31 00:00:00');
insert into t1 (id, dt) values (212, '2010-08-01 00:00:00');
insert into t1 (id, dt) values (213, '2010-08-02 00:00:00');
insert into t1 (id, dt) values (214, '2010-08-03 00:00:00');
insert into t1 (id, dt) values (215, '2010-08-04 00:00:00');
insert into t1 (id, dt) values (216, '2010-08-05 00:00:00');
insert into t1 (id, dt) values (217, '2010-08-06 00:00:00');
insert into t1 (id, dt) values (218, '2010-08-07 00:00:00');
insert into t1 (id, dt) values (219, '2010-08-08 00:00:00');
insert into t1 (id, dt) values (220, '2010-08-09 00:00:00');
insert into t1 (id, dt) values (221, '2010-08-10 00:00:00');
insert into t1 (id, dt) values (222, '2010-08-11 00:00:00');
insert into t1 (id, dt) values (223, '2010-08-12 00:00:00');
insert into t1 (id, dt) values (224, '2010-08-13 00:00:00');
insert into t1 (id, dt) values (225, '2010-08-14 00:00:00');
insert into t1 (id, dt) values (226, '2010-08-15 00:00:00');
insert into t1 (id, dt) values (227, '2010-08-16 00:00:00');
insert into t1 (id, dt) values (228, '2010-08-17 00:00:00');
insert into t1 (id, dt) values (229, '2010-08-18 00:00:00');
insert into t1 (id, dt) values (230, '2010-08-19 00:00:00');
insert into t1 (id, dt) values (231, '2010-08-20 00:00:00');
insert into t1 (id, dt) values (232, '2010-08-21 00:00:00');
insert into t1 (id, dt) values (233, '2010-08-22 00:00:00');
insert into t1 (id, dt) values (234, '2010-08-23 00:00:00');
insert into t1 (id, dt) values (235, '2010-08-24 00:00:00');
insert into t1 (id, dt) values (236, '2010-08-25 00:00:00');
insert into t1 (id, dt) values (237, '2010-08-26 00:00:00');
insert into t1 (id, dt) values (238, '2010-08-27 00:00:00');
insert into t1 (id, dt) values (239, '2010-08-28 00:00:00');
insert into t1 (id, dt) values (240, '2010-08-29 00:00:00');
insert into t1 (id, dt) values (241, '2010-08-30 00:00:00');
insert into t1 (id, dt) values (242, '2010-08-31 00:00:00');
insert into t1 (id, dt) values (243, '2010-09-01 00:00:00');
insert into t1 (id, dt) values (244, '2010-09-02 00:00:00');
insert into t1 (id, dt) values (245, '2010-09-03 00:00:00');
insert into t1 (id, dt) values (246, '2010-09-04 00:00:00');
insert into t1 (id, dt) values (247, '2010-09-05 00:00:00');
insert into t1 (id, dt) values (248, '2010-09-06 00:00:00');
insert into t1 (id, dt) values (249, '2010-09-07 00:00:00');
insert into t1 (id, dt) values (250, '2010-09-08 00:00:00');
insert into t1 (id, dt) values (251, '2010-09-09 00:00:00');
insert into t1 (id, dt) values (252, '2010-09-10 00:00:00');
insert into t1 (id, dt) values (253, '2010-09-11 00:00:00');
insert into t1 (id, dt) values (254, '2010-09-12 00:00:00');
insert into t1 (id, dt) values (255, '2010-09-13 00:00:00');
insert into t1 (id, dt) values (256, '2010-09-14 00:00:00');
insert into t1 (id, dt) values (257, '2010-09-15 00:00:00');
insert into t1 (id, dt) values (258, '2010-09-16 00:00:00');
insert into t1 (id, dt) values (259, '2010-09-17 00:00:00');
insert into t1 (id, dt) values (260, '2010-09-18 00:00:00');
insert into t1 (id, dt) values (261, '2010-09-19 00:00:00');
insert into t1 (id, dt) values (262, '2010-09-20 00:00:00');
insert into t1 (id, dt) values (263, '2010-09-21 00:00:00');
insert into t1 (id, dt) values (264, '2010-09-22 00:00:00');
insert into t1 (id, dt) values (265, '2010-09-23 00:00:00');
insert into t1 (id, dt) values (266, '2010-09-24 00:00:00');
insert into t1 (id, dt) values (267, '2010-09-25 00:00:00');
insert into t1 (id, dt) values (268, '2010-09-26 00:00:00');
insert into t1 (id, dt) values (269, '2010-09-27 00:00:00');
insert into t1 (id, dt) values (270, '2010-09-28 00:00:00');
insert into t1 (id, dt) values (271, '2010-09-29 00:00:00');
insert into t1 (id, dt) values (272, '2010-09-30 00:00:00');
insert into t1 (id, dt) values (273, '2010-10-01 00:00:00');
insert into t1 (id, dt) values (274, '2010-10-02 00:00:00');
insert into t1 (id, dt) values (275, '2010-10-03 00:00:00');
insert into t1 (id, dt) values (276, '2010-10-04 00:00:00');
insert into t1 (id, dt) values (277, '2010-10-05 00:00:00');
insert into t1 (id, dt) values (278, '2010-10-06 00:00:00');
insert into t1 (id, dt) values (279, '2010-10-07 00:00:00');
insert into t1 (id, dt) values (280, '2010-10-08 00:00:00');
insert into t1 (id, dt) values (281, '2010-10-09 00:00:00');
insert into t1 (id, dt) values (282, '2010-10-10 00:00:00');
insert into t1 (id, dt) values (283, '2010-10-11 00:00:00');
insert into t1 (id, dt) values (284, '2010-10-12 00:00:00');
insert into t1 (id, dt) values (285, '2010-10-13 00:00:00');
insert into t1 (id, dt) values (286, '2010-10-14 00:00:00');
insert into t1 (id, dt) values (287, '2010-10-15 00:00:00');
insert into t1 (id, dt) values (288, '2010-10-16 00:00:00');
insert into t1 (id, dt) values (289, '2010-10-17 00:00:00');
insert into t1 (id, dt) values (290, '2010-10-18 00:00:00');
insert into t1 (id, dt) values (291, '2010-10-19 00:00:00');
insert into t1 (id, dt) values (292, '2010-10-20 00:00:00');
insert into t1 (id, dt) values (293, '2010-10-21 00:00:00');
insert into t1 (id, dt) values (294, '2010-10-22 00:00:00');
insert into t1 (id, dt) values (295, '2010-10-23 00:00:00');
insert into t1 (id, dt) values (296, '2010-10-24 00:00:00');
insert into t1 (id, dt) values (297, '2010-10-25 00:00:00');
insert into t1 (id, dt) values (298, '2010-10-26 00:00:00');
insert into t1 (id, dt) values (299, '2010-10-27 00:00:00');
insert into t1 (id, dt) values (300, '2010-10-28 00:00:00');
insert into t1 (id, dt) values (301, '2010-10-29 00:00:00');
insert into t1 (id, dt) values (302, '2010-10-30 00:00:00');
insert into t1 (id, dt) values (303, '2010-10-31 00:00:00');
insert into t1 (id, dt) values (304, '2010-11-01 00:00:00');
insert into t1 (id, dt) values (305, '2010-11-02 00:00:00');
insert into t1 (id, dt) values (306, '2010-11-03 00:00:00');
insert into t1 (id, dt) values (307, '2010-11-04 00:00:00');
insert into t1 (id, dt) values (308, '2010-11-05 00:00:00');
insert into t1 (id, dt) values (309, '2010-11-06 00:00:00');
insert into t1 (id, dt) values (310, '2010-11-07 00:00:00');
insert into t1 (id, dt) values (311, '2010-11-08 00:00:00');
insert into t1 (id, dt) values (312, '2010-11-09 00:00:00');
insert into t1 (id, dt) values (313, '2010-11-10 00:00:00');
insert into t1 (id, dt) values (314, '2010-11-11 00:00:00');
insert into t1 (id, dt) values (315, '2010-11-12 00:00:00');
insert into t1 (id, dt) values (316, '2010-11-13 00:00:00');
insert into t1 (id, dt) values (317, '2010-11-14 00:00:00');
insert into t1 (id, dt) values (318, '2010-11-15 00:00:00');
insert into t1 (id, dt) values (319, '2010-11-16 00:00:00');
insert into t1 (id, dt) values (320, '2010-11-17 00:00:00');
insert into t1 (id, dt) values (321, '2010-11-18 00:00:00');
insert into t1 (id, dt) values (322, '2010-11-19 00:00:00');
insert into t1 (id, dt) values (323, '2010-11-20 00:00:00');
insert into t1 (id, dt) values (324, '2010-11-21 00:00:00');
insert into t1 (id, dt) values (325, '2010-11-22 00:00:00');
insert into t1 (id, dt) values (326, '2010-11-23 00:00:00');
insert into t1 (id, dt) values (327, '2010-11-24 00:00:00');
insert into t1 (id, dt) values (328, '2010-11-25 00:00:00');
insert into t1 (id, dt) values (329, '2010-11-26 00:00:00');
insert into t1 (id, dt) values (330, '2010-11-27 00:00:00');
insert into t1 (id, dt) values (331, '2010-11-28 00:00:00');
insert into t1 (id, dt) values (332, '2010-11-29 00:00:00');
insert into t1 (id, dt) values (333, '2010-11-30 00:00:00');
insert into t1 (id, dt) values (334, '2010-12-01 00:00:00');
insert into t1 (id, dt) values (335, '2010-12-02 00:00:00');
insert into t1 (id, dt) values (336, '2010-12-03 00:00:00');
insert into t1 (id, dt) values (337, '2010-12-04 00:00:00');
insert into t1 (id, dt) values (338, '2010-12-05 00:00:00');
insert into t1 (id, dt) values (339, '2010-12-06 00:00:00');
insert into t1 (id, dt) values (340, '2010-12-07 00:00:00');
insert into t1 (id, dt) values (341, '2010-12-08 00:00:00');
insert into t1 (id, dt) values (342, '2010-12-09 00:00:00');
insert into t1 (id, dt) values (343, '2010-12-10 00:00:00');
insert into t1 (id, dt) values (344, '2010-12-11 00:00:00');
insert into t1 (id, dt) values (345, '2010-12-12 00:00:00');
insert into t1 (id, dt) values (346, '2010-12-13 00:00:00');
insert into t1 (id, dt) values (347, '2010-12-14 00:00:00');
insert into t1 (id, dt) values (348, '2010-12-15 00:00:00');
insert into t1 (id, dt) values (349, '2010-12-16 00:00:00');
insert into t1 (id, dt) values (350, '2010-12-17 00:00:00');
SELECT COUNT(*) FROM t1;
--connection node_2
--send call p1(100);
--connection node_1a
--send call p1(100);
--connection node_3
--send call p1(100);
--connection node_4
--send call p1(100);
--connection node_1
SET SESSION wsrep_OSU_method='RSU';
SELECT @@wsrep_OSU_method;
SET SESSION sql_log_bin = 0;
--error 0,ER_LOCK_DEADLOCK
ALTER TABLE t1 DROP PARTITION rx2009xx;
--error 0,ER_LOCK_DEADLOCK
ALTER TABLE t1 DROP PARTITION rx201004;
--error 0,ER_LOCK_DEADLOCK
ALTER TABLE t1 DROP PARTITION rx201008;
SET SESSION wsrep_OSU_METHOD='TOI';
SELECT @@wsrep_OSU_method;
--connection node_2
--error 0,ER_LOCK_DEADLOCK
reap;
--connection node_3
--error 0,ER_LOCK_DEADLOCK
reap;
--connection node_4
--error 0,ER_LOCK_DEADLOCK
reap;
--connection node_1a
--error 0,ER_LOCK_DEADLOCK
reap;
DROP TABLE t1;
DROP PROCEDURE p1;

View File

@ -1 +0,0 @@
--query_cache_type=1 --query_cache_size=1355776

View File

@ -0,0 +1,10 @@
!include ../galera_2nodes.cnf
[mysqld.1]
query_cache_type=1
query_cache_size=1355776
[mysqld.2]
query_cache_type=1
query_cache_size=1355776

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