Merge branch '10.3' into 10.4
This commit is contained in:
commit
a15234bf4b
@ -3208,7 +3208,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;
|
||||
@ -3228,7 +3228,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);
|
||||
|
||||
@ -3293,7 +3293,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)
|
||||
|
@ -4538,7 +4538,7 @@ static int dump_databases(char **db_names)
|
||||
|
||||
|
||||
/*
|
||||
View Specific database initalization.
|
||||
View Specific database initialization.
|
||||
|
||||
SYNOPSIS
|
||||
init_dumping_views
|
||||
@ -4555,7 +4555,7 @@ int init_dumping_views(char *qdatabase __attribute__((unused)))
|
||||
|
||||
|
||||
/*
|
||||
Table Specific database initalization.
|
||||
Table Specific database initialization.
|
||||
|
||||
SYNOPSIS
|
||||
init_dumping_tables
|
||||
|
146
dbug/dbug.c
146
dbug/dbug.c
@ -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);
|
||||
LockIfInitSettings(cs);
|
||||
stack->keywords= ListCopy(init_settings.keywords);
|
||||
UnlockIfInitSettings(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,10 @@ 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);
|
||||
UnlockIfInitSettings(cs);
|
||||
if (!is_shared(state, functions))
|
||||
FreeList(state->functions);
|
||||
if (!is_shared(state, processes))
|
||||
@ -1701,8 +1701,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 +1725,6 @@ static int DoTrace(CODE_STATE *cs)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!cs->locked)
|
||||
pthread_mutex_unlock(&THR_LOCK_dbug);
|
||||
return res;
|
||||
}
|
||||
|
||||
@ -1768,11 +1764,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 +1993,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 +2010,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 +2192,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 +2220,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)
|
||||
|
2
debian/additions/innotop/innotop
vendored
2
debian/additions/innotop/innotop
vendored
@ -1607,7 +1607,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' },
|
||||
|
@ -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(
|
||||
|
@ -1665,6 +1665,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;
|
||||
@ -2176,20 +2179,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;
|
||||
|
@ -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\
|
||||
|
@ -1973,7 +1973,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;
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 980f2dbea6586091333057bb2994b18747466942
|
||||
Subproject commit c8833751cf48d0085d9d7a4285aafdc967a63a4d
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -1107,7 +1107,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).
|
||||
@ -1773,5 +1773,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'.
|
||||
|
@ -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 (
|
||||
|
@ -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 #
|
||||
|
@ -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;
|
||||
|
@ -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 #
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -327,7 +327,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;
|
||||
@ -1332,9 +1333,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,
|
||||
@ -1930,7 +1932,7 @@ sub command_line_setup {
|
||||
join(" ", @valgrind_args), "\"");
|
||||
}
|
||||
|
||||
if (@strace_args)
|
||||
if (@strace_args || $opt_stracer)
|
||||
{
|
||||
$opt_strace=1;
|
||||
}
|
||||
@ -5879,14 +5881,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 )
|
||||
@ -5952,6 +5946,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");
|
||||
@ -6276,16 +6281,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)
|
||||
{
|
||||
@ -6561,11 +6567,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)
|
||||
|
@ -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;
|
||||
|
@ -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');
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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');
|
||||
|
@ -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';
|
||||
|
29
mysql-test/suite/galera/r/galera_as_slave_ctas.result
Normal file
29
mysql-test/suite/galera/r/galera_as_slave_ctas.result
Normal 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;
|
33
mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result
Normal file
33
mysql-test/suite/galera/r/galera_as_slave_gtid_myisam.result
Normal 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;
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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');
|
@ -1 +0,0 @@
|
||||
--log-bin --log-slave-updates
|
12
mysql-test/suite/galera/t/MW-313.cnf
Normal file
12
mysql-test/suite/galera/t/MW-313.cnf
Normal file
@ -0,0 +1,12 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
[mysqld.2]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
|
||||
|
@ -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
|
@ -1 +0,0 @@
|
||||
--wsrep-retry-autocommit=0
|
9
mysql-test/suite/galera/t/MW-329.cnf
Normal file
9
mysql-test/suite/galera/t/MW-329.cnf
Normal file
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-retry-autocommit=0
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
@ -1,2 +1 @@
|
||||
--log-output=TABLE
|
||||
--general-log=OFF
|
||||
|
@ -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';
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--log-bin --log-slave-updates
|
@ -1 +0,0 @@
|
||||
--log-bin --log-slave-updates
|
10
mysql-test/suite/galera/t/MW-86-wait8.cnf
Normal file
10
mysql-test/suite/galera/t/MW-86-wait8.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
[mysqld.2]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
13
mysql-test/suite/galera/t/enforce_storage_engine2.cnf
Normal file
13
mysql-test/suite/galera/t/enforce_storage_engine2.cnf
Normal 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=''
|
||||
|
||||
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
--enforce_storage_engine=innodb --sql_mode=''
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
5
mysql-test/suite/galera/t/galera_as_slave_ctas.cnf
Normal file
5
mysql-test/suite/galera/t/galera_as_slave_ctas.cnf
Normal file
@ -0,0 +1,5 @@
|
||||
!include ../galera_2nodes_as_slave.cnf
|
||||
|
||||
# make sure master server uses ROW format for replication
|
||||
[mysqld]
|
||||
binlog-format=row
|
74
mysql-test/suite/galera/t/galera_as_slave_ctas.test
Normal file
74
mysql-test/suite/galera/t/galera_as_slave_ctas.test
Normal 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
|
@ -0,0 +1,6 @@
|
||||
!include ../galera_2nodes_as_slave.cnf
|
||||
|
||||
[mysqld]
|
||||
log-bin=mysqld-bin
|
||||
log-slave-updates
|
||||
binlog-format=ROW
|
74
mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test
Normal file
74
mysql-test/suite/galera/t/galera_as_slave_gtid_myisam.test
Normal 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;
|
||||
|
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
innodb_stats_persistent=ON
|
||||
|
||||
[mysqld.2]
|
||||
innodb_stats_persistent=ON
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--innodb_stats_persistent=ON
|
@ -1 +0,0 @@
|
||||
--binlog-checksum=CRC32 --master-verify-checksum=1 --slave-sql-verify-checksum=1
|
13
mysql-test/suite/galera/t/galera_binlog_checksum.cnf
Normal file
13
mysql-test/suite/galera/t/galera_binlog_checksum.cnf
Normal 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
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--binlog-row-event-max-size=4294967040
|
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
binlog-row-event-max-size=4294967040
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--binlog-row-event-max-size=256
|
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
binlog-row-event-max-size=256
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--query_cache_type=1 --query_cache_size=1000000
|
10
mysql-test/suite/galera/t/galera_flush.cnf
Normal file
10
mysql-test/suite/galera/t/galera_flush.cnf
Normal 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
|
||||
|
12
mysql-test/suite/galera/t/galera_flush_local.cnf
Normal file
12
mysql-test/suite/galera/t/galera_flush_local.cnf
Normal 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
|
||||
|
@ -1,3 +0,0 @@
|
||||
--query_cache_type=1
|
||||
--query_cache_size=1000000
|
||||
--wsrep_replicate_myisam=ON
|
@ -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);
|
||||
|
||||
|
10
mysql-test/suite/galera/t/galera_gtid.cnf
Normal file
10
mysql-test/suite/galera/t/galera_gtid.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
[mysqld.2]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
@ -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;
|
||||
|
@ -1,6 +1,15 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
[mysqld.1]
|
||||
secure-file-priv = ""
|
||||
innodb_file_format ='Barracuda'
|
||||
innodb_file_per_table = ON
|
||||
innodb_stats_persistent=ON
|
||||
innodb_stats_auto_recalc=ON
|
||||
innodb_stats_persistent_sample_pages=20
|
||||
innodb_stats_sample_pages=8
|
||||
|
||||
[mysqld.2]
|
||||
secure-file-priv = ""
|
||||
innodb_file_format ='Barracuda'
|
||||
innodb_file_per_table = ON
|
||||
|
@ -1 +0,0 @@
|
||||
--log-bin --log-slave-updates
|
10
mysql-test/suite/galera/t/galera_log_bin.cnf
Normal file
10
mysql-test/suite/galera/t/galera_log_bin.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
[mysqld.2]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
@ -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;
|
||||
|
9
mysql-test/suite/galera/t/galera_mdev_13787.cnf
Normal file
9
mysql-test/suite/galera/t/galera_mdev_13787.cnf
Normal file
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
innodb-stats-persistent=1
|
||||
|
||||
[mysqld.2]
|
||||
innodb-stats-persistent=1
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--innodb-stats-persistent=1
|
@ -1 +0,0 @@
|
||||
--query_cache_type=1 --query_cache_size=1355776
|
10
mysql-test/suite/galera/t/galera_query_cache.cnf
Normal file
10
mysql-test/suite/galera/t/galera_query_cache.cnf
Normal 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
|
||||
|
@ -1 +0,0 @@
|
||||
--query_cache_type=1 --query_cache_size=1355776
|
10
mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf
Normal file
10
mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf
Normal 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
|
||||
|
@ -1 +0,0 @@
|
||||
--log-bin
|
7
mysql-test/suite/galera/t/galera_sbr_binlog.cnf
Normal file
7
mysql-test/suite/galera/t/galera_sbr_binlog.cnf
Normal file
@ -0,0 +1,7 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
|
||||
[mysqld.2]
|
||||
log-bin
|
@ -4,6 +4,8 @@
|
||||
wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth="root:"
|
||||
wsrep_debug=1
|
||||
innodb-file-format='Barracuda'
|
||||
innodb-file-per-table=ON
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
||||
|
@ -1,2 +0,0 @@
|
||||
$UDF_EXAMPLE_LIB_OPT
|
||||
--query_cache_type=1
|
15
mysql-test/suite/galera/t/galera_udf.cnf
Normal file
15
mysql-test/suite/galera/t/galera_udf.cnf
Normal file
@ -0,0 +1,15 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
$UDF_EXAMPLE_LIB_OPT
|
||||
query_cache_type=1
|
||||
|
||||
[mysqld.2]
|
||||
query_cache_type=1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--log-bin-use-v1-row-events=1
|
13
mysql-test/suite/galera/t/galera_v1_row_events.cnf
Normal file
13
mysql-test/suite/galera/t/galera_v1_row_events.cnf
Normal file
@ -0,0 +1,13 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin-use-v1-row-events=1
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
13
mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf
Normal file
13
mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf
Normal file
@ -0,0 +1,13 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-auto-increment-control=ON
|
||||
|
||||
[mysqld.2]
|
||||
wsrep-auto-increment-control=ON
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--wsrep-auto-increment-control=ON
|
@ -3,9 +3,10 @@
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
call mtr.add_suppression("WSREP has not yet prepared node for application use");
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
@ -30,10 +31,10 @@ SHOW STATUS LIKE 'wsrep_ready';
|
||||
# Must return 'Disconnected'
|
||||
SHOW STATUS LIKE 'wsrep_cluster_status';
|
||||
|
||||
--error ER_UNKNOWN_COM_ERROR
|
||||
--error ER_UNKNOWN_COM_ERROR,1047
|
||||
SELECT * FROM t1;
|
||||
|
||||
--error ER_UNKNOWN_COM_ERROR
|
||||
--error ER_UNKNOWN_COM_ERROR,1047
|
||||
SELECT 1 FROM t1;
|
||||
|
||||
SET @@session.wsrep_dirty_reads=ON;
|
||||
@ -45,7 +46,7 @@ SELECT i, variable_name, variable_value FROM t1, information_schema.session_vari
|
||||
|
||||
SET @@session.wsrep_dirty_reads=OFF;
|
||||
|
||||
--error ER_UNKNOWN_COM_ERROR
|
||||
--error ER_UNKNOWN_COM_ERROR,1047
|
||||
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh --wsrep-sync-wait=0
|
13
mysql-test/suite/galera/t/galera_var_notify_cmd.cnf
Normal file
13
mysql-test/suite/galera/t/galera_var_notify_cmd.cnf
Normal file
@ -0,0 +1,13 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh
|
||||
wsrep-sync-wait=0
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
# notifications into a table.
|
||||
#
|
||||
|
||||
--source include/have_innodb.inc
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
--connection node_1
|
||||
SELECT COUNT(DISTINCT uuid) = 2 FROM mtr_wsrep_notify.membership;
|
||||
SELECT MAX(size) = 2 FROM mtr_wsrep_notify.status;
|
||||
SELECT COUNT(DISTINCT idx) = 2 FROM mtr_wsrep_notify.status;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(DISTINCT uuid) FROM mtr_wsrep_notify.membership;
|
||||
SELECT MAX(size) FROM mtr_wsrep_notify.status;
|
||||
SELECT COUNT(DISTINCT idx) FROM mtr_wsrep_notify.status;
|
||||
|
@ -5,6 +5,8 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
call mtr.add_suppression("WSREP has not yet prepared node for application use");
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
@ -15,7 +17,7 @@ SET SESSION wsrep_reject_queries = ALL;
|
||||
|
||||
SET GLOBAL wsrep_reject_queries = ALL;
|
||||
|
||||
--error ER_UNKNOWN_COM_ERROR
|
||||
--error ER_UNKNOWN_COM_ERROR,1047
|
||||
SELECT * FROM t1;
|
||||
|
||||
#
|
||||
@ -30,7 +32,7 @@ SET GLOBAL wsrep_reject_queries = ALL_KILL;
|
||||
SELECT * FROM t1;
|
||||
|
||||
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--error ER_UNKNOWN_COM_ERROR
|
||||
--error ER_UNKNOWN_COM_ERROR,1047
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Confirm that replication continues
|
||||
|
12
mysql-test/suite/galera/t/galera_var_sst_auth.cnf
Normal file
12
mysql-test/suite/galera/t/galera_var_sst_auth.cnf
Normal file
@ -0,0 +1,12 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_sst_auth=root:
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_sst_auth=root:
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--wsrep_sst_auth=root:
|
@ -1 +0,0 @@
|
||||
--wsrep_log_conflicts=ON
|
12
mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf
Normal file
12
mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf
Normal file
@ -0,0 +1,12 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_log_conflicts=ON
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_log_conflicts=ON
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--wsrep-new-cluster
|
10
mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf
Normal file
10
mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-new-cluster
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--query_cache_type=1
|
9
mysql-test/suite/galera/t/mysql-wsrep#201.cnf
Normal file
9
mysql-test/suite/galera/t/mysql-wsrep#201.cnf
Normal file
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
query_cache_type=1
|
||||
|
||||
[mysqld.2]
|
||||
query_cache_type=1
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user