Merge branch '10.1' into 10.2
This commit is contained in:
commit
c764bc0a78
@ -1229,6 +1229,8 @@ int main(int argc,char *argv[])
|
|||||||
window_resize(0);
|
window_resize(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!status.batch)
|
||||||
|
{
|
||||||
put_info("Welcome to the MariaDB monitor. Commands end with ; or \\g.",
|
put_info("Welcome to the MariaDB monitor. Commands end with ; or \\g.",
|
||||||
INFO_INFO);
|
INFO_INFO);
|
||||||
my_snprintf((char*) glob_buffer.ptr(), glob_buffer.alloced_length(),
|
my_snprintf((char*) glob_buffer.ptr(), glob_buffer.alloced_length(),
|
||||||
@ -1236,8 +1238,8 @@ int main(int argc,char *argv[])
|
|||||||
mysql_get_server_name(&mysql),
|
mysql_get_server_name(&mysql),
|
||||||
mysql_thread_id(&mysql), server_version_string(&mysql));
|
mysql_thread_id(&mysql), server_version_string(&mysql));
|
||||||
put_info((char*) glob_buffer.ptr(),INFO_INFO);
|
put_info((char*) glob_buffer.ptr(),INFO_INFO);
|
||||||
|
|
||||||
put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO);
|
put_info(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"), INFO_INFO);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_READLINE
|
#ifdef HAVE_READLINE
|
||||||
initialize_readline((char*) my_progname);
|
initialize_readline((char*) my_progname);
|
||||||
|
@ -60,7 +60,7 @@ MYSQL_ADD_EXECUTABLE(mariabackup
|
|||||||
datasink.c
|
datasink.c
|
||||||
ds_buffer.c
|
ds_buffer.c
|
||||||
ds_compress.c
|
ds_compress.c
|
||||||
ds_local.c
|
ds_local.cc
|
||||||
ds_stdout.c
|
ds_stdout.c
|
||||||
ds_tmpfile.c
|
ds_tmpfile.c
|
||||||
ds_xbstream.c
|
ds_xbstream.c
|
||||||
@ -97,7 +97,7 @@ ENDIF()
|
|||||||
########################################################################
|
########################################################################
|
||||||
MYSQL_ADD_EXECUTABLE(mbstream
|
MYSQL_ADD_EXECUTABLE(mbstream
|
||||||
ds_buffer.c
|
ds_buffer.c
|
||||||
ds_local.c
|
ds_local.cc
|
||||||
ds_stdout.c
|
ds_stdout.c
|
||||||
datasink.c
|
datasink.c
|
||||||
xbstream.c
|
xbstream.c
|
||||||
@ -111,6 +111,7 @@ TARGET_LINK_LIBRARIES(mbstream
|
|||||||
mysys
|
mysys
|
||||||
crc
|
crc
|
||||||
)
|
)
|
||||||
|
ADD_DEPENDENCIES(mbstream GenError)
|
||||||
|
|
||||||
IF(MSVC)
|
IF(MSVC)
|
||||||
SET_TARGET_PROPERTIES(mbstream PROPERTIES LINK_FLAGS setargv.obj)
|
SET_TARGET_PROPERTIES(mbstream PROPERTIES LINK_FLAGS setargv.obj)
|
||||||
|
@ -108,7 +108,7 @@ Write to a datasink file.
|
|||||||
int
|
int
|
||||||
ds_write(ds_file_t *file, const void *buf, size_t len)
|
ds_write(ds_file_t *file, const void *buf, size_t len)
|
||||||
{
|
{
|
||||||
return file->datasink->write(file, buf, len);
|
return file->datasink->write(file, (const uchar *)buf, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
|
@ -48,7 +48,7 @@ typedef struct {
|
|||||||
struct datasink_struct {
|
struct datasink_struct {
|
||||||
ds_ctxt_t *(*init)(const char *root);
|
ds_ctxt_t *(*init)(const char *root);
|
||||||
ds_file_t *(*open)(ds_ctxt_t *ctxt, const char *path, MY_STAT *stat);
|
ds_file_t *(*open)(ds_ctxt_t *ctxt, const char *path, MY_STAT *stat);
|
||||||
int (*write)(ds_file_t *file, const void *buf, size_t len);
|
int (*write)(ds_file_t *file, const unsigned char *buf, size_t len);
|
||||||
int (*close)(ds_file_t *file);
|
int (*close)(ds_file_t *file);
|
||||||
void (*deinit)(ds_ctxt_t *ctxt);
|
void (*deinit)(ds_ctxt_t *ctxt);
|
||||||
};
|
};
|
||||||
|
@ -45,7 +45,7 @@ typedef struct {
|
|||||||
static ds_ctxt_t *buffer_init(const char *root);
|
static ds_ctxt_t *buffer_init(const char *root);
|
||||||
static ds_file_t *buffer_open(ds_ctxt_t *ctxt, const char *path,
|
static ds_file_t *buffer_open(ds_ctxt_t *ctxt, const char *path,
|
||||||
MY_STAT *mystat);
|
MY_STAT *mystat);
|
||||||
static int buffer_write(ds_file_t *file, const void *buf, size_t len);
|
static int buffer_write(ds_file_t *file, const uchar *buf, size_t len);
|
||||||
static int buffer_close(ds_file_t *file);
|
static int buffer_close(ds_file_t *file);
|
||||||
static void buffer_deinit(ds_ctxt_t *ctxt);
|
static void buffer_deinit(ds_ctxt_t *ctxt);
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ buffer_open(ds_ctxt_t *ctxt, const char *path, MY_STAT *mystat)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
buffer_write(ds_file_t *file, const void *buf, size_t len)
|
buffer_write(ds_file_t *file, const uchar *buf, size_t len)
|
||||||
{
|
{
|
||||||
ds_buffer_file_t *buffer_file;
|
ds_buffer_file_t *buffer_file;
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ buffer_write(ds_file_t *file, const void *buf, size_t len)
|
|||||||
|
|
||||||
buffer_file->pos = 0;
|
buffer_file->pos = 0;
|
||||||
|
|
||||||
buf = (const char *) buf + bytes;
|
buf += bytes;
|
||||||
len -= bytes;
|
len -= bytes;
|
||||||
} else {
|
} else {
|
||||||
/* We don't have any buffered bytes, just write
|
/* We don't have any buffered bytes, just write
|
||||||
|
@ -65,7 +65,7 @@ extern ulonglong xtrabackup_compress_chunk_size;
|
|||||||
static ds_ctxt_t *compress_init(const char *root);
|
static ds_ctxt_t *compress_init(const char *root);
|
||||||
static ds_file_t *compress_open(ds_ctxt_t *ctxt, const char *path,
|
static ds_file_t *compress_open(ds_ctxt_t *ctxt, const char *path,
|
||||||
MY_STAT *mystat);
|
MY_STAT *mystat);
|
||||||
static int compress_write(ds_file_t *file, const void *buf, size_t len);
|
static int compress_write(ds_file_t *file, const uchar *buf, size_t len);
|
||||||
static int compress_close(ds_file_t *file);
|
static int compress_close(ds_file_t *file);
|
||||||
static void compress_deinit(ds_ctxt_t *ctxt);
|
static void compress_deinit(ds_ctxt_t *ctxt);
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ err:
|
|||||||
|
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
compress_write(ds_file_t *file, const void *buf, size_t len)
|
compress_write(ds_file_t *file, const uchar *buf, size_t len)
|
||||||
{
|
{
|
||||||
ds_compress_file_t *comp_file;
|
ds_compress_file_t *comp_file;
|
||||||
ds_compress_ctxt_t *comp_ctxt;
|
ds_compress_ctxt_t *comp_ctxt;
|
||||||
|
@ -1,151 +0,0 @@
|
|||||||
/******************************************************
|
|
||||||
Copyright (c) 2011-2013 Percona LLC and/or its affiliates.
|
|
||||||
|
|
||||||
Local datasink implementation for XtraBackup.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
||||||
|
|
||||||
*******************************************************/
|
|
||||||
|
|
||||||
#include <mysql_version.h>
|
|
||||||
#include <my_base.h>
|
|
||||||
#include <mysys_err.h>
|
|
||||||
#include "common.h"
|
|
||||||
#include "datasink.h"
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
File fd;
|
|
||||||
} ds_local_file_t;
|
|
||||||
|
|
||||||
static ds_ctxt_t *local_init(const char *root);
|
|
||||||
static ds_file_t *local_open(ds_ctxt_t *ctxt, const char *path,
|
|
||||||
MY_STAT *mystat);
|
|
||||||
static int local_write(ds_file_t *file, const void *buf, size_t len);
|
|
||||||
static int local_close(ds_file_t *file);
|
|
||||||
static void local_deinit(ds_ctxt_t *ctxt);
|
|
||||||
|
|
||||||
datasink_t datasink_local = {
|
|
||||||
&local_init,
|
|
||||||
&local_open,
|
|
||||||
&local_write,
|
|
||||||
&local_close,
|
|
||||||
&local_deinit
|
|
||||||
};
|
|
||||||
|
|
||||||
static
|
|
||||||
ds_ctxt_t *
|
|
||||||
local_init(const char *root)
|
|
||||||
{
|
|
||||||
ds_ctxt_t *ctxt;
|
|
||||||
|
|
||||||
if (my_mkdir(root, 0777, MYF(0)) < 0
|
|
||||||
&& my_errno != EEXIST && my_errno != EISDIR)
|
|
||||||
{
|
|
||||||
char errbuf[MYSYS_STRERROR_SIZE];
|
|
||||||
my_strerror(errbuf, sizeof(errbuf),my_errno);
|
|
||||||
my_error(EE_CANT_MKDIR, MYF(ME_BELL | ME_WAITTANG),
|
|
||||||
root, my_errno,errbuf, my_errno);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
ctxt = my_malloc(sizeof(ds_ctxt_t), MYF(MY_FAE));
|
|
||||||
|
|
||||||
ctxt->root = my_strdup(root, MYF(MY_FAE));
|
|
||||||
|
|
||||||
return ctxt;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
ds_file_t *
|
|
||||||
local_open(ds_ctxt_t *ctxt, const char *path,
|
|
||||||
MY_STAT *mystat __attribute__((unused)))
|
|
||||||
{
|
|
||||||
char fullpath[FN_REFLEN];
|
|
||||||
char dirpath[FN_REFLEN];
|
|
||||||
size_t dirpath_len;
|
|
||||||
size_t path_len;
|
|
||||||
ds_local_file_t *local_file;
|
|
||||||
ds_file_t *file;
|
|
||||||
File fd;
|
|
||||||
|
|
||||||
fn_format(fullpath, path, ctxt->root, "", MYF(MY_RELATIVE_PATH));
|
|
||||||
|
|
||||||
/* Create the directory if needed */
|
|
||||||
dirname_part(dirpath, fullpath, &dirpath_len);
|
|
||||||
if (my_mkdir(dirpath, 0777, MYF(0)) < 0 && my_errno != EEXIST) {
|
|
||||||
char errbuf[MYSYS_STRERROR_SIZE];
|
|
||||||
my_strerror(errbuf, sizeof(errbuf), my_errno);
|
|
||||||
my_error(EE_CANT_MKDIR, MYF(ME_BELL | ME_WAITTANG),
|
|
||||||
dirpath, my_errno, errbuf);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
fd = my_create(fullpath, 0, O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
|
|
||||||
MYF(MY_WME));
|
|
||||||
if (fd < 0) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
path_len = strlen(fullpath) + 1; /* terminating '\0' */
|
|
||||||
|
|
||||||
file = (ds_file_t *) my_malloc(sizeof(ds_file_t) +
|
|
||||||
sizeof(ds_local_file_t) +
|
|
||||||
path_len,
|
|
||||||
MYF(MY_FAE));
|
|
||||||
local_file = (ds_local_file_t *) (file + 1);
|
|
||||||
|
|
||||||
local_file->fd = fd;
|
|
||||||
|
|
||||||
file->path = (char *) local_file + sizeof(ds_local_file_t);
|
|
||||||
memcpy(file->path, fullpath, path_len);
|
|
||||||
|
|
||||||
file->ptr = local_file;
|
|
||||||
|
|
||||||
return file;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
int
|
|
||||||
local_write(ds_file_t *file, const void *buf, size_t len)
|
|
||||||
{
|
|
||||||
File fd = ((ds_local_file_t *) file->ptr)->fd;
|
|
||||||
|
|
||||||
if (!my_write(fd, buf, len, MYF(MY_WME | MY_NABP))) {
|
|
||||||
posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
int
|
|
||||||
local_close(ds_file_t *file)
|
|
||||||
{
|
|
||||||
File fd = ((ds_local_file_t *) file->ptr)->fd;
|
|
||||||
|
|
||||||
my_free(file);
|
|
||||||
|
|
||||||
my_sync(fd, MYF(MY_WME));
|
|
||||||
|
|
||||||
return my_close(fd, MYF(MY_WME));
|
|
||||||
}
|
|
||||||
|
|
||||||
static
|
|
||||||
void
|
|
||||||
local_deinit(ds_ctxt_t *ctxt)
|
|
||||||
{
|
|
||||||
my_free(ctxt->root);
|
|
||||||
my_free(ctxt);
|
|
||||||
}
|
|
259
extra/mariabackup/ds_local.cc
Normal file
259
extra/mariabackup/ds_local.cc
Normal file
@ -0,0 +1,259 @@
|
|||||||
|
/******************************************************
|
||||||
|
Copyright (c) 2011-2013 Percona LLC and/or its affiliates.
|
||||||
|
|
||||||
|
Local datasink implementation for XtraBackup.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
|
||||||
|
*******************************************************/
|
||||||
|
|
||||||
|
#include <my_config.h>
|
||||||
|
#include <mysql_version.h>
|
||||||
|
#include <my_base.h>
|
||||||
|
#include <mysys_err.h>
|
||||||
|
#include "common.h"
|
||||||
|
#include "datasink.h"
|
||||||
|
#include "univ.i"
|
||||||
|
#include "fsp0fsp.h"
|
||||||
|
#ifdef _WIN32
|
||||||
|
#include <winioctl.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
File fd;
|
||||||
|
my_bool init_ibd_done;
|
||||||
|
my_bool is_ibd;
|
||||||
|
my_bool compressed;
|
||||||
|
size_t pagesize;
|
||||||
|
} ds_local_file_t;
|
||||||
|
|
||||||
|
static ds_ctxt_t *local_init(const char *root);
|
||||||
|
static ds_file_t *local_open(ds_ctxt_t *ctxt, const char *path,
|
||||||
|
MY_STAT *mystat);
|
||||||
|
static int local_write(ds_file_t *file, const uchar *buf, size_t len);
|
||||||
|
static int local_close(ds_file_t *file);
|
||||||
|
static void local_deinit(ds_ctxt_t *ctxt);
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
datasink_t datasink_local = {
|
||||||
|
&local_init,
|
||||||
|
&local_open,
|
||||||
|
&local_write,
|
||||||
|
&local_close,
|
||||||
|
&local_deinit
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
ds_ctxt_t *
|
||||||
|
local_init(const char *root)
|
||||||
|
{
|
||||||
|
ds_ctxt_t *ctxt;
|
||||||
|
|
||||||
|
if (my_mkdir(root, 0777, MYF(0)) < 0
|
||||||
|
&& my_errno != EEXIST && my_errno != EISDIR)
|
||||||
|
{
|
||||||
|
char errbuf[MYSYS_STRERROR_SIZE];
|
||||||
|
my_strerror(errbuf, sizeof(errbuf),my_errno);
|
||||||
|
my_error(EE_CANT_MKDIR, MYF(ME_BELL | ME_WAITTANG),
|
||||||
|
root, my_errno,errbuf, my_errno);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
ctxt = (ds_ctxt_t *)my_malloc(sizeof(ds_ctxt_t), MYF(MY_FAE));
|
||||||
|
|
||||||
|
ctxt->root = my_strdup(root, MYF(MY_FAE));
|
||||||
|
|
||||||
|
return ctxt;
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
ds_file_t *
|
||||||
|
local_open(ds_ctxt_t *ctxt, const char *path,
|
||||||
|
MY_STAT *mystat __attribute__((unused)))
|
||||||
|
{
|
||||||
|
char fullpath[FN_REFLEN];
|
||||||
|
char dirpath[FN_REFLEN];
|
||||||
|
size_t dirpath_len;
|
||||||
|
size_t path_len;
|
||||||
|
ds_local_file_t *local_file;
|
||||||
|
ds_file_t *file;
|
||||||
|
File fd;
|
||||||
|
|
||||||
|
fn_format(fullpath, path, ctxt->root, "", MYF(MY_RELATIVE_PATH));
|
||||||
|
|
||||||
|
/* Create the directory if needed */
|
||||||
|
dirname_part(dirpath, fullpath, &dirpath_len);
|
||||||
|
if (my_mkdir(dirpath, 0777, MYF(0)) < 0 && my_errno != EEXIST) {
|
||||||
|
char errbuf[MYSYS_STRERROR_SIZE];
|
||||||
|
my_strerror(errbuf, sizeof(errbuf), my_errno);
|
||||||
|
my_error(EE_CANT_MKDIR, MYF(ME_BELL | ME_WAITTANG),
|
||||||
|
dirpath, my_errno, errbuf);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
fd = my_create(fullpath, 0, O_WRONLY | O_BINARY | O_EXCL | O_NOFOLLOW,
|
||||||
|
MYF(MY_WME));
|
||||||
|
if (fd < 0) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
path_len = strlen(fullpath) + 1; /* terminating '\0' */
|
||||||
|
|
||||||
|
file = (ds_file_t *) my_malloc(sizeof(ds_file_t) +
|
||||||
|
sizeof(ds_local_file_t) +
|
||||||
|
path_len,
|
||||||
|
MYF(MY_FAE));
|
||||||
|
local_file = (ds_local_file_t *) (file + 1);
|
||||||
|
|
||||||
|
local_file->fd = fd;
|
||||||
|
local_file->init_ibd_done = 0;
|
||||||
|
local_file->is_ibd = (path_len > 5) && !strcmp(fullpath + path_len - 5, ".ibd");
|
||||||
|
local_file->compressed = 0;
|
||||||
|
local_file->pagesize = 0;
|
||||||
|
file->path = (char *) local_file + sizeof(ds_local_file_t);
|
||||||
|
memcpy(file->path, fullpath, path_len);
|
||||||
|
|
||||||
|
file->ptr = local_file;
|
||||||
|
|
||||||
|
return file;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Calculate size of data without trailing zero bytes. */
|
||||||
|
static size_t trim_binary_zeros(uchar *buf, size_t pagesize)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
for (i = pagesize; (i > 0) && (buf[i - 1] == 0); i--) {};
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Write data to the output file, and punch "holes" if needed. */
|
||||||
|
static int write_compressed(File fd, uchar *data, size_t len, size_t pagesize)
|
||||||
|
{
|
||||||
|
uchar *ptr = data;
|
||||||
|
for (size_t written= 0; written < len;)
|
||||||
|
{
|
||||||
|
size_t n_bytes = MY_MIN(pagesize, len - written);
|
||||||
|
size_t datasize= trim_binary_zeros(ptr,n_bytes);
|
||||||
|
if (datasize > 0) {
|
||||||
|
if (!my_write(fd, ptr, datasize, MYF(MY_WME | MY_NABP)))
|
||||||
|
posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
|
||||||
|
else
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if (datasize < n_bytes) {
|
||||||
|
/* This punches a "hole" in the file. */
|
||||||
|
size_t hole_bytes = n_bytes - datasize;
|
||||||
|
if (my_seek(fd, hole_bytes, MY_SEEK_CUR, MYF(MY_WME | MY_NABP))
|
||||||
|
== MY_FILEPOS_ERROR)
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
written += n_bytes;
|
||||||
|
ptr += n_bytes;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Calculate Innodb tablespace specific data, when first page is written.
|
||||||
|
We're interested in page compression and page size.
|
||||||
|
*/
|
||||||
|
static void init_ibd_data(ds_local_file_t *local_file, const uchar *buf, size_t len)
|
||||||
|
{
|
||||||
|
if (len < FIL_PAGE_DATA + FSP_SPACE_FLAGS) {
|
||||||
|
/* Weird, bail out.*/
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ulint flags = mach_read_from_4(&buf[FIL_PAGE_DATA + FSP_SPACE_FLAGS]);
|
||||||
|
ulint ssize = FSP_FLAGS_GET_PAGE_SSIZE(flags);
|
||||||
|
local_file->pagesize= ssize == 0 ? UNIV_PAGE_SIZE_ORIG : ((UNIV_ZIP_SIZE_MIN >> 1) << ssize);
|
||||||
|
local_file->compressed = (my_bool)FSP_FLAGS_HAS_PAGE_COMPRESSION(flags);
|
||||||
|
|
||||||
|
#if defined(_WIN32) && (MYSQL_VERSION_ID > 100200)
|
||||||
|
/* Make compressed file sparse, on Windows.
|
||||||
|
In 10.1, we do not use sparse files. */
|
||||||
|
if (local_file->compressed) {
|
||||||
|
HANDLE handle= my_get_osfhandle(local_file->fd);
|
||||||
|
if (!DeviceIoControl(handle, FSCTL_SET_SPARSE, NULL, 0, NULL, 0, NULL, 0)) {
|
||||||
|
fprintf(stderr, "Warning: cannot make file sparse");
|
||||||
|
local_file->compressed = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static
|
||||||
|
int
|
||||||
|
local_write(ds_file_t *file, const uchar *buf, size_t len)
|
||||||
|
{
|
||||||
|
uchar *b = (uchar*)buf;
|
||||||
|
ds_local_file_t *local_file= (ds_local_file_t *)file->ptr;
|
||||||
|
File fd = local_file->fd;
|
||||||
|
|
||||||
|
if (local_file->is_ibd && !local_file->init_ibd_done) {
|
||||||
|
init_ibd_data(local_file, b , len);
|
||||||
|
local_file->init_ibd_done= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (local_file->compressed) {
|
||||||
|
return write_compressed(fd, b, len, local_file->pagesize);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!my_write(fd, b , len, MYF(MY_WME | MY_NABP))) {
|
||||||
|
posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Set EOF at file's current position.*/
|
||||||
|
static int set_eof(File fd)
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
return !SetEndOfFile(my_get_osfhandle(fd));
|
||||||
|
#elif defined(HAVE_FTRUNCATE)
|
||||||
|
return ftruncate(fd, my_tell(fd, MYF(MY_WME)));
|
||||||
|
#else
|
||||||
|
#error no ftruncate
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static
|
||||||
|
int
|
||||||
|
local_close(ds_file_t *file)
|
||||||
|
{
|
||||||
|
ds_local_file_t *local_file= (ds_local_file_t *)file->ptr;
|
||||||
|
File fd = local_file->fd;
|
||||||
|
int ret= 0;
|
||||||
|
|
||||||
|
if (local_file->compressed) {
|
||||||
|
ret = set_eof(fd);
|
||||||
|
}
|
||||||
|
|
||||||
|
my_close(fd, MYF(MY_WME));
|
||||||
|
my_free(file);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void
|
||||||
|
local_deinit(ds_ctxt_t *ctxt)
|
||||||
|
{
|
||||||
|
my_free(ctxt->root);
|
||||||
|
my_free(ctxt);
|
||||||
|
}
|
@ -23,6 +23,12 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|||||||
|
|
||||||
#include "datasink.h"
|
#include "datasink.h"
|
||||||
|
|
||||||
extern datasink_t datasink_local;
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#else
|
||||||
|
extern
|
||||||
|
#endif
|
||||||
|
|
||||||
|
datasink_t datasink_local;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -30,7 +30,7 @@ typedef struct {
|
|||||||
static ds_ctxt_t *stdout_init(const char *root);
|
static ds_ctxt_t *stdout_init(const char *root);
|
||||||
static ds_file_t *stdout_open(ds_ctxt_t *ctxt, const char *path,
|
static ds_file_t *stdout_open(ds_ctxt_t *ctxt, const char *path,
|
||||||
MY_STAT *mystat);
|
MY_STAT *mystat);
|
||||||
static int stdout_write(ds_file_t *file, const void *buf, size_t len);
|
static int stdout_write(ds_file_t *file, const uchar *buf, size_t len);
|
||||||
static int stdout_close(ds_file_t *file);
|
static int stdout_close(ds_file_t *file);
|
||||||
static void stdout_deinit(ds_ctxt_t *ctxt);
|
static void stdout_deinit(ds_ctxt_t *ctxt);
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ stdout_open(ds_ctxt_t *ctxt __attribute__((unused)),
|
|||||||
|
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
stdout_write(ds_file_t *file, const void *buf, size_t len)
|
stdout_write(ds_file_t *file, const uchar *buf, size_t len)
|
||||||
{
|
{
|
||||||
File fd = ((ds_stdout_file_t *) file->ptr)->fd;
|
File fd = ((ds_stdout_file_t *) file->ptr)->fd;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ typedef struct {
|
|||||||
static ds_ctxt_t *tmpfile_init(const char *root);
|
static ds_ctxt_t *tmpfile_init(const char *root);
|
||||||
static ds_file_t *tmpfile_open(ds_ctxt_t *ctxt, const char *path,
|
static ds_file_t *tmpfile_open(ds_ctxt_t *ctxt, const char *path,
|
||||||
MY_STAT *mystat);
|
MY_STAT *mystat);
|
||||||
static int tmpfile_write(ds_file_t *file, const void *buf, size_t len);
|
static int tmpfile_write(ds_file_t *file, const uchar *buf, size_t len);
|
||||||
static int tmpfile_close(ds_file_t *file);
|
static int tmpfile_close(ds_file_t *file);
|
||||||
static void tmpfile_deinit(ds_ctxt_t *ctxt);
|
static void tmpfile_deinit(ds_ctxt_t *ctxt);
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ tmpfile_open(ds_ctxt_t *ctxt, const char *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tmpfile_write(ds_file_t *file, const void *buf, size_t len)
|
tmpfile_write(ds_file_t *file, const uchar *buf, size_t len)
|
||||||
{
|
{
|
||||||
File fd = ((ds_tmp_file_t *) file->ptr)->fd;
|
File fd = ((ds_tmp_file_t *) file->ptr)->fd;
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ General streaming interface */
|
|||||||
static ds_ctxt_t *xbstream_init(const char *root);
|
static ds_ctxt_t *xbstream_init(const char *root);
|
||||||
static ds_file_t *xbstream_open(ds_ctxt_t *ctxt, const char *path,
|
static ds_file_t *xbstream_open(ds_ctxt_t *ctxt, const char *path,
|
||||||
MY_STAT *mystat);
|
MY_STAT *mystat);
|
||||||
static int xbstream_write(ds_file_t *file, const void *buf, size_t len);
|
static int xbstream_write(ds_file_t *file, const uchar *buf, size_t len);
|
||||||
static int xbstream_close(ds_file_t *file);
|
static int xbstream_close(ds_file_t *file);
|
||||||
static void xbstream_deinit(ds_ctxt_t *ctxt);
|
static void xbstream_deinit(ds_ctxt_t *ctxt);
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ err:
|
|||||||
|
|
||||||
static
|
static
|
||||||
int
|
int
|
||||||
xbstream_write(ds_file_t *file, const void *buf, size_t len)
|
xbstream_write(ds_file_t *file, const uchar *buf, size_t len)
|
||||||
{
|
{
|
||||||
ds_stream_file_t *stream_file;
|
ds_stream_file_t *stream_file;
|
||||||
xb_wstream_file_t *xbstream_file;
|
xb_wstream_file_t *xbstream_file;
|
||||||
|
5
mysql-test/include/maybe_debug.combinations
Normal file
5
mysql-test/include/maybe_debug.combinations
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
[debug]
|
||||||
|
--enable-gdb
|
||||||
|
|
||||||
|
[release]
|
||||||
|
--disable-gdb
|
3
mysql-test/include/maybe_debug.inc
Normal file
3
mysql-test/include/maybe_debug.inc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# include file for test files that can be run with and without debug
|
||||||
|
# having debug and non-debug tests.
|
||||||
|
let $have_debug=`select version() like '%debug%'`;
|
@ -2438,11 +2438,27 @@ CREATE TABLE t1 (b1 BIT NOT NULL);
|
|||||||
INSERT INTO t1 VALUES (0),(1);
|
INSERT INTO t1 VALUES (0),(1);
|
||||||
CREATE TABLE t2 (b2 BIT NOT NULL);
|
CREATE TABLE t2 (b2 BIT NOT NULL);
|
||||||
INSERT INTO t2 VALUES (0),(1);
|
INSERT INTO t2 VALUES (0),(1);
|
||||||
SET SESSION JOIN_CACHE_LEVEL = 3;
|
set @save_join_cache_level= @@join_cache_level;
|
||||||
|
SET @@join_cache_level = 3;
|
||||||
SELECT t1.b1+'0' , t2.b2 + '0' FROM t1 LEFT JOIN t2 ON b1 = b2;
|
SELECT t1.b1+'0' , t2.b2 + '0' FROM t1 LEFT JOIN t2 ON b1 = b2;
|
||||||
t1.b1+'0' t2.b2 + '0'
|
t1.b1+'0' t2.b2 + '0'
|
||||||
0 0
|
0 0
|
||||||
1 1
|
1 1
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
set @join_cache_level= @save_join_cache_level;
|
||||||
|
#
|
||||||
|
# MDEV-14779: using left join causes incorrect results with materialization and derived tables
|
||||||
|
#
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1),(2);
|
||||||
|
create table t2(sid int, id int);
|
||||||
|
insert into t2 values (1,1),(2,2);
|
||||||
|
select * from t1 t
|
||||||
|
left join (select * from t2 where sid in (select max(sid) from t2 where 0=1 group by id)) r
|
||||||
|
on t.id=r.id ;
|
||||||
|
id sid id
|
||||||
|
1 NULL NULL
|
||||||
|
2 NULL NULL
|
||||||
|
drop table t1, t2;
|
||||||
# end of 5.5 tests
|
# end of 5.5 tests
|
||||||
SET optimizer_switch=@save_optimizer_switch;
|
SET optimizer_switch=@save_optimizer_switch;
|
||||||
|
@ -2449,12 +2449,28 @@ CREATE TABLE t1 (b1 BIT NOT NULL);
|
|||||||
INSERT INTO t1 VALUES (0),(1);
|
INSERT INTO t1 VALUES (0),(1);
|
||||||
CREATE TABLE t2 (b2 BIT NOT NULL);
|
CREATE TABLE t2 (b2 BIT NOT NULL);
|
||||||
INSERT INTO t2 VALUES (0),(1);
|
INSERT INTO t2 VALUES (0),(1);
|
||||||
SET SESSION JOIN_CACHE_LEVEL = 3;
|
set @save_join_cache_level= @@join_cache_level;
|
||||||
|
SET @@join_cache_level = 3;
|
||||||
SELECT t1.b1+'0' , t2.b2 + '0' FROM t1 LEFT JOIN t2 ON b1 = b2;
|
SELECT t1.b1+'0' , t2.b2 + '0' FROM t1 LEFT JOIN t2 ON b1 = b2;
|
||||||
t1.b1+'0' t2.b2 + '0'
|
t1.b1+'0' t2.b2 + '0'
|
||||||
0 0
|
0 0
|
||||||
1 1
|
1 1
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
set @join_cache_level= @save_join_cache_level;
|
||||||
|
#
|
||||||
|
# MDEV-14779: using left join causes incorrect results with materialization and derived tables
|
||||||
|
#
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1),(2);
|
||||||
|
create table t2(sid int, id int);
|
||||||
|
insert into t2 values (1,1),(2,2);
|
||||||
|
select * from t1 t
|
||||||
|
left join (select * from t2 where sid in (select max(sid) from t2 where 0=1 group by id)) r
|
||||||
|
on t.id=r.id ;
|
||||||
|
id sid id
|
||||||
|
1 NULL NULL
|
||||||
|
2 NULL NULL
|
||||||
|
drop table t1, t2;
|
||||||
# end of 5.5 tests
|
# end of 5.5 tests
|
||||||
SET optimizer_switch=@save_optimizer_switch;
|
SET optimizer_switch=@save_optimizer_switch;
|
||||||
set join_cache_level=default;
|
set join_cache_level=default;
|
||||||
|
29
mysql-test/r/ps_qc_innodb.result
Normal file
29
mysql-test/r/ps_qc_innodb.result
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#
|
||||||
|
# MDEV-15492: Subquery crash similar to MDEV-10050
|
||||||
|
#
|
||||||
|
SET @qcs.save= @@global.query_cache_size, @qct.save= @@global.query_cache_type;
|
||||||
|
SET GLOBAL query_cache_size= 512*1024*1024, query_cache_type= ON;
|
||||||
|
connect con1,localhost,root,,test;
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t2 (b INT) ENGINE=InnoDB;
|
||||||
|
CREATE VIEW v AS select a from t1 join t2;
|
||||||
|
PREPARE stmt1 FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)";
|
||||||
|
connect con2,localhost,root,,test;
|
||||||
|
PREPARE stmt2 FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)";
|
||||||
|
EXECUTE stmt2;
|
||||||
|
a
|
||||||
|
connection con1;
|
||||||
|
EXECUTE stmt1;
|
||||||
|
a
|
||||||
|
INSERT INTO t2 VALUES (0);
|
||||||
|
EXECUTE stmt1;
|
||||||
|
a
|
||||||
|
START TRANSACTION;
|
||||||
|
EXECUTE stmt1;
|
||||||
|
a
|
||||||
|
disconnect con1;
|
||||||
|
disconnect con2;
|
||||||
|
connection default;
|
||||||
|
DROP VIEW v;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
SET GLOBAL query_cache_size= @qcs.save, query_cache_type= @qct.save;
|
@ -2489,6 +2489,17 @@ FROM t2 WHERE b <= 'quux' GROUP BY field;
|
|||||||
field COUNT(DISTINCT c)
|
field COUNT(DISTINCT c)
|
||||||
0 1
|
0 1
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
#
|
||||||
|
# MDEV-15555: select from DUAL where false yielding wrong result when in a IN
|
||||||
|
#
|
||||||
|
explain
|
||||||
|
SELECT 2 IN (SELECT 2 from DUAL WHERE 1 != 1);
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL No tables used
|
||||||
|
2 SUBQUERY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
|
||||||
|
SELECT 2 IN (SELECT 2 from DUAL WHERE 1 != 1);
|
||||||
|
2 IN (SELECT 2 from DUAL WHERE 1 != 1)
|
||||||
|
0
|
||||||
SET optimizer_switch= @@global.optimizer_switch;
|
SET optimizer_switch= @@global.optimizer_switch;
|
||||||
set @@tmp_table_size= @@global.tmp_table_size;
|
set @@tmp_table_size= @@global.tmp_table_size;
|
||||||
#
|
#
|
||||||
|
@ -34,6 +34,9 @@ sub skip_combinations {
|
|||||||
die "unknown value max-binlog-stmt-cache-size=$longsysvar" unless $val_map{$longsysvar};
|
die "unknown value max-binlog-stmt-cache-size=$longsysvar" unless $val_map{$longsysvar};
|
||||||
$skip{'include/word_size.combinations'} = [ $val_map{$longsysvar} ];
|
$skip{'include/word_size.combinations'} = [ $val_map{$longsysvar} ];
|
||||||
|
|
||||||
|
$skip{'include/maybe_debug.combinations'} =
|
||||||
|
[ defined $::mysqld_variables{'debug-dbug'} ? 'release' : 'debug' ];
|
||||||
|
|
||||||
# as a special case, disable certain include files as a whole
|
# as a special case, disable certain include files as a whole
|
||||||
$skip{'include/not_embedded.inc'} = 'Not run for embedded server'
|
$skip{'include/not_embedded.inc'} = 'Not run for embedded server'
|
||||||
if $::opt_embedded_server;
|
if $::opt_embedded_server;
|
||||||
|
@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
--echo Setting SST method to mysqldump ...
|
--echo Setting SST method to mysqldump ...
|
||||||
|
|
||||||
|
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
|
||||||
|
call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
# We need a user with a password to perform SST, otherwise we hit LP #1378253
|
# We need a user with a password to perform SST, otherwise we hit LP #1378253
|
||||||
CREATE USER 'sst';
|
CREATE USER 'sst';
|
||||||
@ -19,6 +22,6 @@ SET GLOBAL wsrep_sst_auth = 'sst:';
|
|||||||
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
# Set wsrep_sst_receive_address to the SQL port
|
# Set wsrep_sst_receive_address to the SQL port
|
||||||
--eval SET GLOBAL wsrep_sst_receive_address = '127.0.0.2:$NODE_MYPORT_2';
|
--eval SET GLOBAL wsrep_sst_receive_address = '127.0.0.1:$NODE_MYPORT_2';
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
SET GLOBAL wsrep_sst_method = 'mysqldump';
|
SET GLOBAL wsrep_sst_method = 'mysqldump';
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
source include/maybe_debug.inc;
|
||||||
|
if ($have_debug) {
|
||||||
--echo Performing State Transfer on a server that has been killed and restarted
|
--echo Performing State Transfer on a server that has been killed and restarted
|
||||||
--echo while a DDL was in progress on it
|
--echo while a DDL was in progress on it
|
||||||
|
|
||||||
@ -121,3 +123,4 @@ COMMIT;
|
|||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
|
|
||||||
SET GLOBAL debug_dbug = $debug_orig;
|
SET GLOBAL debug_dbug = $debug_orig;
|
||||||
|
}
|
||||||
|
4
mysql-test/suite/galera/include/have_mariabackup.inc
Normal file
4
mysql-test/suite/galera/include/have_mariabackup.inc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#
|
||||||
|
# suite.pm will make sure that all tests including this file
|
||||||
|
# will be skipped as needed
|
||||||
|
#
|
4
mysql-test/suite/galera/include/have_xtrabackup.inc
Normal file
4
mysql-test/suite/galera/include/have_xtrabackup.inc
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#
|
||||||
|
# suite.pm will make sure that all tests including this file
|
||||||
|
# will be skipped as needed
|
||||||
|
#
|
116
mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff
Normal file
116
mysql-test/suite/galera/r/galera_sst_mariabackup,debug.rdiff
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
--- galera_sst_mariabackup.result
|
||||||
|
+++ galera_sst_mariabackup,debug.reject
|
||||||
|
@@ -286,5 +286,113 @@
|
||||||
|
DROP TABLE t1;
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
+Performing State Transfer on a server that has been killed and restarted
|
||||||
|
+while a DDL was in progress on it
|
||||||
|
+connection node_1;
|
||||||
|
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+connection node_2;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+COMMIT;
|
||||||
|
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
||||||
|
+connection node_1;
|
||||||
|
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||||
|
+connection node_2;
|
||||||
|
+SET wsrep_sync_wait = 0;
|
||||||
|
+Killing server ...
|
||||||
|
+connection node_1;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+COMMIT;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+connection node_2;
|
||||||
|
+Performing --wsrep-recover ...
|
||||||
|
+connection node_2;
|
||||||
|
+Starting server ...
|
||||||
|
+Using --wsrep-start-position when starting mysqld ...
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+connection node_1;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+connection node_1a_galera_st_kill_slave_ddl;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+ROLLBACK;
|
||||||
|
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
|
+COUNT(*) = 2
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
+COUNT(*) = 35
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
+COUNT(*) = 0
|
||||||
|
+1
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=ON;
|
||||||
|
+connection node_1;
|
||||||
|
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
|
+COUNT(*) = 2
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
+COUNT(*) = 35
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
+COUNT(*) = 0
|
||||||
|
+1
|
||||||
|
+DROP TABLE t1;
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=ON;
|
||||||
|
+SET GLOBAL debug_dbug = $debug_orig;
|
||||||
|
disconnect node_2;
|
||||||
|
disconnect node_1;
|
290
mysql-test/suite/galera/r/galera_sst_mariabackup.result
Normal file
290
mysql-test/suite/galera/r/galera_sst_mariabackup.result
Normal file
@ -0,0 +1,290 @@
|
|||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
|
Performing State Transfer on a server that has been shut down cleanly and restarted
|
||||||
|
connection node_1;
|
||||||
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
COMMIT;
|
||||||
|
Shutting down server ...
|
||||||
|
connection node_1;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
COMMIT;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
connection node_2;
|
||||||
|
Starting server ...
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
COMMIT;
|
||||||
|
connection node_1;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
COMMIT;
|
||||||
|
connection node_1a_galera_st_shutdown_slave;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
ROLLBACK;
|
||||||
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
COUNT(*) = 35
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
COUNT(*) = 0
|
||||||
|
1
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
connection node_1;
|
||||||
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
COUNT(*) = 35
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
COUNT(*) = 0
|
||||||
|
1
|
||||||
|
DROP TABLE t1;
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
Performing State Transfer on a server that starts from a clean var directory
|
||||||
|
This is accomplished by shutting down node #2 and removing its var directory before restarting it
|
||||||
|
connection node_1;
|
||||||
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
COMMIT;
|
||||||
|
Shutting down server ...
|
||||||
|
connection node_1;
|
||||||
|
Cleaning var directory ...
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
COMMIT;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
connection node_2;
|
||||||
|
Starting server ...
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
COMMIT;
|
||||||
|
connection node_1;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
COMMIT;
|
||||||
|
connection node_1a_galera_st_clean_slave;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
ROLLBACK;
|
||||||
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
COUNT(*) = 35
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
COUNT(*) = 0
|
||||||
|
1
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
connection node_1;
|
||||||
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
COUNT(*) = 35
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
COUNT(*) = 0
|
||||||
|
1
|
||||||
|
DROP TABLE t1;
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
Performing State Transfer on a server that has been killed and restarted
|
||||||
|
connection node_1;
|
||||||
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
COMMIT;
|
||||||
|
Killing server ...
|
||||||
|
connection node_1;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
|
COMMIT;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
connection node_2;
|
||||||
|
Performing --wsrep-recover ...
|
||||||
|
Starting server ...
|
||||||
|
Using --wsrep-start-position when starting mysqld ...
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
|
COMMIT;
|
||||||
|
connection node_1;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=OFF;
|
||||||
|
START TRANSACTION;
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
|
COMMIT;
|
||||||
|
connection node_1a_galera_st_kill_slave;
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
ROLLBACK;
|
||||||
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
COUNT(*) = 35
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
COUNT(*) = 0
|
||||||
|
1
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
connection node_1;
|
||||||
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
COUNT(*) = 35
|
||||||
|
1
|
||||||
|
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
COUNT(*) = 0
|
||||||
|
1
|
||||||
|
DROP TABLE t1;
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
disconnect node_2;
|
||||||
|
disconnect node_1;
|
117
mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff
Normal file
117
mysql-test/suite/galera/r/galera_sst_mysqldump,debug.rdiff
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
--- galera_sst_mysqldump.result
|
||||||
|
+++ galera_sst_mysqldump,debug.reject
|
||||||
|
@@ -388,6 +388,114 @@
|
||||||
|
DROP TABLE t1;
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
+Performing State Transfer on a server that has been killed and restarted
|
||||||
|
+while a DDL was in progress on it
|
||||||
|
+connection node_1;
|
||||||
|
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+connection node_2;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+COMMIT;
|
||||||
|
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
||||||
|
+connection node_1;
|
||||||
|
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||||
|
+connection node_2;
|
||||||
|
+SET wsrep_sync_wait = 0;
|
||||||
|
+Killing server ...
|
||||||
|
+connection node_1;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+COMMIT;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+connection node_2;
|
||||||
|
+Performing --wsrep-recover ...
|
||||||
|
+connection node_2;
|
||||||
|
+Starting server ...
|
||||||
|
+Using --wsrep-start-position when starting mysqld ...
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+connection node_1;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+connection node_1a_galera_st_kill_slave_ddl;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+ROLLBACK;
|
||||||
|
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
|
+COUNT(*) = 2
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
+COUNT(*) = 35
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
+COUNT(*) = 0
|
||||||
|
+1
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=ON;
|
||||||
|
+connection node_1;
|
||||||
|
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
|
+COUNT(*) = 2
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
+COUNT(*) = 35
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
+COUNT(*) = 0
|
||||||
|
+1
|
||||||
|
+DROP TABLE t1;
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=ON;
|
||||||
|
+SET GLOBAL debug_dbug = $debug_orig;
|
||||||
|
connection node_1;
|
||||||
|
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
|
||||||
|
DROP USER sst;
|
@ -1,9 +1,16 @@
|
|||||||
Setting SST method to mysqldump ...
|
Setting SST method to mysqldump ...
|
||||||
|
call mtr.add_suppression("WSREP: wsrep_sst_method is set to 'mysqldump' yet mysqld bind_address is set to '127.0.0.1'");
|
||||||
|
call mtr.add_suppression("Failed to load slave replication state from table mysql.gtid_slave_pos");
|
||||||
|
connection node_1;
|
||||||
CREATE USER 'sst';
|
CREATE USER 'sst';
|
||||||
GRANT ALL PRIVILEGES ON *.* TO 'sst';
|
GRANT ALL PRIVILEGES ON *.* TO 'sst';
|
||||||
SET GLOBAL wsrep_sst_auth = 'sst:';
|
SET GLOBAL wsrep_sst_auth = 'sst:';
|
||||||
|
connection node_2;
|
||||||
SET GLOBAL wsrep_sst_method = 'mysqldump';
|
SET GLOBAL wsrep_sst_method = 'mysqldump';
|
||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
Performing State Transfer on a server that has been temporarily disconnected
|
Performing State Transfer on a server that has been temporarily disconnected
|
||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -13,6 +20,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
@ -23,6 +31,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
Unloading wsrep provider ...
|
Unloading wsrep provider ...
|
||||||
SET GLOBAL wsrep_provider = 'none';
|
SET GLOBAL wsrep_provider = 'none';
|
||||||
|
connection node_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
@ -37,6 +46,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
connect node_1a_galera_st_disconnect_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -44,6 +54,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
connection node_2;
|
||||||
Loading wsrep provider ...
|
Loading wsrep provider ...
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -53,6 +64,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
@ -67,6 +79,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1a_galera_st_disconnect_slave;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -81,6 +94,7 @@ COUNT(*) = 0
|
|||||||
1
|
1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
|
connection node_1;
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
COUNT(*) = 35
|
COUNT(*) = 35
|
||||||
1
|
1
|
||||||
@ -91,6 +105,7 @@ DROP TABLE t1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
Performing State Transfer on a server that has been shut down cleanly and restarted
|
Performing State Transfer on a server that has been shut down cleanly and restarted
|
||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -100,6 +115,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
@ -109,6 +125,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
Shutting down server ...
|
Shutting down server ...
|
||||||
|
connection node_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
@ -123,6 +140,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -130,6 +148,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
connection node_2;
|
||||||
Starting server ...
|
Starting server ...
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -139,6 +158,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
@ -153,6 +173,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1a_galera_st_shutdown_slave;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -167,6 +188,7 @@ COUNT(*) = 0
|
|||||||
1
|
1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
|
connection node_1;
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
COUNT(*) = 35
|
COUNT(*) = 35
|
||||||
1
|
1
|
||||||
@ -178,6 +200,7 @@ COMMIT;
|
|||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
Performing State Transfer on a server that starts from a clean var directory
|
Performing State Transfer on a server that starts from a clean var directory
|
||||||
This is accomplished by shutting down node #2 and removing its var directory before restarting it
|
This is accomplished by shutting down node #2 and removing its var directory before restarting it
|
||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -187,6 +210,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
@ -196,6 +220,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
Shutting down server ...
|
Shutting down server ...
|
||||||
|
connection node_1;
|
||||||
Cleaning var directory ...
|
Cleaning var directory ...
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -211,6 +236,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -218,6 +244,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
connection node_2;
|
||||||
Starting server ...
|
Starting server ...
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -227,6 +254,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
@ -241,6 +269,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1a_galera_st_clean_slave;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -255,6 +284,7 @@ COUNT(*) = 0
|
|||||||
1
|
1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
|
connection node_1;
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
COUNT(*) = 35
|
COUNT(*) = 35
|
||||||
1
|
1
|
||||||
@ -265,6 +295,7 @@ DROP TABLE t1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
Performing State Transfer on a server that has been killed and restarted
|
Performing State Transfer on a server that has been killed and restarted
|
||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -274,6 +305,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
@ -283,6 +315,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
Killing server ...
|
Killing server ...
|
||||||
|
connection node_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
@ -297,6 +330,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -304,6 +338,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
connection node_2;
|
||||||
Performing --wsrep-recover ...
|
Performing --wsrep-recover ...
|
||||||
Starting server ...
|
Starting server ...
|
||||||
Using --wsrep-start-position when starting mysqld ...
|
Using --wsrep-start-position when starting mysqld ...
|
||||||
@ -315,6 +350,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
@ -329,6 +365,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1a_galera_st_kill_slave;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -343,6 +380,7 @@ COUNT(*) = 0
|
|||||||
1
|
1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
|
connection node_1;
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
COUNT(*) = 35
|
COUNT(*) = 35
|
||||||
1
|
1
|
||||||
@ -352,104 +390,10 @@ COUNT(*) = 0
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
Performing State Transfer on a server that has been killed and restarted
|
connection node_1;
|
||||||
while a DDL was in progress on it
|
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
COMMIT;
|
|
||||||
SET GLOBAL debug = 'd,sync.alter_opened_table';
|
|
||||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
|
||||||
SET wsrep_sync_wait = 0;
|
|
||||||
Killing server ...
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
COMMIT;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
Performing --wsrep-recover ...
|
|
||||||
Starting server ...
|
|
||||||
Using --wsrep-start-position when starting mysqld ...
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
COMMIT;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
COMMIT;
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
COMMIT;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
ROLLBACK;
|
|
||||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
|
||||||
COUNT(*) = 2
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
|
||||||
COUNT(*) = 35
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
||||||
COUNT(*) = 0
|
|
||||||
1
|
|
||||||
COMMIT;
|
|
||||||
SET AUTOCOMMIT=ON;
|
|
||||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
|
||||||
COUNT(*) = 2
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
|
||||||
COUNT(*) = 35
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
||||||
COUNT(*) = 0
|
|
||||||
1
|
|
||||||
DROP TABLE t1;
|
|
||||||
COMMIT;
|
|
||||||
SET AUTOCOMMIT=ON;
|
|
||||||
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
|
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
|
||||||
DROP USER sst;
|
DROP USER sst;
|
||||||
|
connection node_2;
|
||||||
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
|
CALL mtr.add_suppression("Slave SQL: Error 'The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement' on query");
|
||||||
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
|
CALL mtr.add_suppression("InnoDB: Error: Table \"mysql\"\\.\"innodb_index_stats\" not found");
|
||||||
CALL mtr.add_suppression("Can't open and lock time zone table");
|
CALL mtr.add_suppression("Can't open and lock time zone table");
|
||||||
|
114
mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff
Normal file
114
mysql-test/suite/galera/r/galera_sst_rsync,debug.rdiff
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
--- galera_sst_rsync.result
|
||||||
|
+++ galera_sst_rsync,debug.reject
|
||||||
|
@@ -284,3 +284,111 @@
|
||||||
|
DROP TABLE t1;
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
+Performing State Transfer on a server that has been killed and restarted
|
||||||
|
+while a DDL was in progress on it
|
||||||
|
+connection node_1;
|
||||||
|
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+connection node_2;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+COMMIT;
|
||||||
|
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
||||||
|
+connection node_1;
|
||||||
|
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||||
|
+connection node_2;
|
||||||
|
+SET wsrep_sync_wait = 0;
|
||||||
|
+Killing server ...
|
||||||
|
+connection node_1;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+COMMIT;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+connection node_2;
|
||||||
|
+Performing --wsrep-recover ...
|
||||||
|
+connection node_2;
|
||||||
|
+Starting server ...
|
||||||
|
+Using --wsrep-start-position when starting mysqld ...
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+connection node_1;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+connection node_1a_galera_st_kill_slave_ddl;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+ROLLBACK;
|
||||||
|
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
|
+COUNT(*) = 2
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
+COUNT(*) = 35
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
+COUNT(*) = 0
|
||||||
|
+1
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=ON;
|
||||||
|
+connection node_1;
|
||||||
|
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
|
+COUNT(*) = 2
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
+COUNT(*) = 35
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
+COUNT(*) = 0
|
||||||
|
+1
|
||||||
|
+DROP TABLE t1;
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=ON;
|
||||||
|
+SET GLOBAL debug_dbug = $debug_orig;
|
@ -1,3 +1,5 @@
|
|||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
Performing State Transfer on a server that has been shut down cleanly and restarted
|
Performing State Transfer on a server that has been shut down cleanly and restarted
|
||||||
connection node_1;
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
@ -284,111 +286,3 @@ COUNT(*) = 0
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
Performing State Transfer on a server that has been killed and restarted
|
|
||||||
while a DDL was in progress on it
|
|
||||||
connection node_1;
|
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
connection node_2;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
COMMIT;
|
|
||||||
SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
|
||||||
connection node_1;
|
|
||||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
|
||||||
connection node_2;
|
|
||||||
SET wsrep_sync_wait = 0;
|
|
||||||
Killing server ...
|
|
||||||
connection node_1;
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
COMMIT;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
connection node_2;
|
|
||||||
Performing --wsrep-recover ...
|
|
||||||
connection node_2;
|
|
||||||
Starting server ...
|
|
||||||
Using --wsrep-start-position when starting mysqld ...
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
COMMIT;
|
|
||||||
connection node_1;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
COMMIT;
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
COMMIT;
|
|
||||||
connection node_1a_galera_st_kill_slave_ddl;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
ROLLBACK;
|
|
||||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
|
||||||
COUNT(*) = 2
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
|
||||||
COUNT(*) = 35
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
||||||
COUNT(*) = 0
|
|
||||||
1
|
|
||||||
COMMIT;
|
|
||||||
SET AUTOCOMMIT=ON;
|
|
||||||
connection node_1;
|
|
||||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
|
||||||
COUNT(*) = 2
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
|
||||||
COUNT(*) = 35
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
||||||
COUNT(*) = 0
|
|
||||||
1
|
|
||||||
DROP TABLE t1;
|
|
||||||
COMMIT;
|
|
||||||
SET AUTOCOMMIT=ON;
|
|
||||||
SET GLOBAL debug_dbug = $debug_orig;
|
|
||||||
|
116
mysql-test/suite/galera/r/galera_sst_xtrabackup-v2,debug.rdiff
Normal file
116
mysql-test/suite/galera/r/galera_sst_xtrabackup-v2,debug.rdiff
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
--- galera_sst_mariabackup.result
|
||||||
|
+++ galera_sst_mariabackup,debug.reject
|
||||||
|
@@ -286,5 +286,113 @@
|
||||||
|
DROP TABLE t1;
|
||||||
|
COMMIT;
|
||||||
|
SET AUTOCOMMIT=ON;
|
||||||
|
+Performing State Transfer on a server that has been killed and restarted
|
||||||
|
+while a DDL was in progress on it
|
||||||
|
+connection node_1;
|
||||||
|
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
|
+connection node_2;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
|
+COMMIT;
|
||||||
|
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
||||||
|
+connection node_1;
|
||||||
|
+ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||||
|
+connection node_2;
|
||||||
|
+SET wsrep_sync_wait = 0;
|
||||||
|
+Killing server ...
|
||||||
|
+connection node_1;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||||
|
+COMMIT;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+connect node_1a_galera_st_kill_slave_ddl, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+connection node_2;
|
||||||
|
+Performing --wsrep-recover ...
|
||||||
|
+connection node_2;
|
||||||
|
+Starting server ...
|
||||||
|
+Using --wsrep-start-position when starting mysqld ...
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+connection node_1;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=OFF;
|
||||||
|
+START TRANSACTION;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||||
|
+COMMIT;
|
||||||
|
+connection node_1a_galera_st_kill_slave_ddl;
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
+ROLLBACK;
|
||||||
|
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
|
+COUNT(*) = 2
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
+COUNT(*) = 35
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
+COUNT(*) = 0
|
||||||
|
+1
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=ON;
|
||||||
|
+connection node_1;
|
||||||
|
+SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||||
|
+COUNT(*) = 2
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 35 FROM t1;
|
||||||
|
+COUNT(*) = 35
|
||||||
|
+1
|
||||||
|
+SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
||||||
|
+COUNT(*) = 0
|
||||||
|
+1
|
||||||
|
+DROP TABLE t1;
|
||||||
|
+COMMIT;
|
||||||
|
+SET AUTOCOMMIT=ON;
|
||||||
|
+SET GLOBAL debug_dbug = $debug_orig;
|
||||||
|
disconnect node_2;
|
||||||
|
disconnect node_1;
|
@ -1,4 +1,7 @@
|
|||||||
|
connection node_1;
|
||||||
|
connection node_2;
|
||||||
Performing State Transfer on a server that has been shut down cleanly and restarted
|
Performing State Transfer on a server that has been shut down cleanly and restarted
|
||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -8,6 +11,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
@ -17,6 +21,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
Shutting down server ...
|
Shutting down server ...
|
||||||
|
connection node_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
@ -31,6 +36,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
connect node_1a_galera_st_shutdown_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -38,6 +44,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
connection node_2;
|
||||||
Starting server ...
|
Starting server ...
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -47,6 +54,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
@ -61,6 +69,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1a_galera_st_shutdown_slave;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -75,6 +84,7 @@ COUNT(*) = 0
|
|||||||
1
|
1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
|
connection node_1;
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
COUNT(*) = 35
|
COUNT(*) = 35
|
||||||
1
|
1
|
||||||
@ -86,6 +96,7 @@ COMMIT;
|
|||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
Performing State Transfer on a server that starts from a clean var directory
|
Performing State Transfer on a server that starts from a clean var directory
|
||||||
This is accomplished by shutting down node #2 and removing its var directory before restarting it
|
This is accomplished by shutting down node #2 and removing its var directory before restarting it
|
||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -95,6 +106,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
@ -104,6 +116,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
Shutting down server ...
|
Shutting down server ...
|
||||||
|
connection node_1;
|
||||||
Cleaning var directory ...
|
Cleaning var directory ...
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -119,6 +132,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
connect node_1a_galera_st_clean_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -126,6 +140,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
connection node_2;
|
||||||
Starting server ...
|
Starting server ...
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -135,6 +150,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
@ -149,6 +165,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1a_galera_st_clean_slave;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -163,6 +180,7 @@ COUNT(*) = 0
|
|||||||
1
|
1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
|
connection node_1;
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
COUNT(*) = 35
|
COUNT(*) = 35
|
||||||
1
|
1
|
||||||
@ -173,6 +191,7 @@ DROP TABLE t1;
|
|||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
Performing State Transfer on a server that has been killed and restarted
|
Performing State Transfer on a server that has been killed and restarted
|
||||||
|
connection node_1;
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
@ -182,6 +201,7 @@ INSERT INTO t1 VALUES ('node1_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_2;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
@ -191,6 +211,7 @@ INSERT INTO t1 VALUES ('node2_committed_before');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
Killing server ...
|
Killing server ...
|
||||||
|
connection node_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||||
@ -205,6 +226,7 @@ INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
|
connect node_1a_galera_st_kill_slave, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||||
SET AUTOCOMMIT=OFF;
|
SET AUTOCOMMIT=OFF;
|
||||||
START TRANSACTION;
|
START TRANSACTION;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -212,6 +234,7 @@ INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
|
connection node_2;
|
||||||
Performing --wsrep-recover ...
|
Performing --wsrep-recover ...
|
||||||
Starting server ...
|
Starting server ...
|
||||||
Using --wsrep-start-position when starting mysqld ...
|
Using --wsrep-start-position when starting mysqld ...
|
||||||
@ -223,6 +246,7 @@ INSERT INTO t1 VALUES ('node2_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
INSERT INTO t1 VALUES ('node1_to_be_committed_after');
|
||||||
@ -237,6 +261,7 @@ INSERT INTO t1 VALUES ('node1_committed_after');
|
|||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
connection node_1a_galera_st_kill_slave;
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
INSERT INTO t1 VALUES ('node1_to_be_rollbacked_after');
|
||||||
@ -251,6 +276,7 @@ COUNT(*) = 0
|
|||||||
1
|
1
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
|
connection node_1;
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
SELECT COUNT(*) = 35 FROM t1;
|
||||||
COUNT(*) = 35
|
COUNT(*) = 35
|
||||||
1
|
1
|
||||||
@ -260,100 +286,5 @@ COUNT(*) = 0
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
COMMIT;
|
COMMIT;
|
||||||
SET AUTOCOMMIT=ON;
|
SET AUTOCOMMIT=ON;
|
||||||
Performing State Transfer on a server that has been killed and restarted
|
disconnect node_2;
|
||||||
while a DDL was in progress on it
|
disconnect node_1;
|
||||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
|
||||||
COMMIT;
|
|
||||||
SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
|
||||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
|
||||||
SET wsrep_sync_wait = 0;
|
|
||||||
Killing server ...
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
|
||||||
COMMIT;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
Performing --wsrep-recover ...
|
|
||||||
Starting server ...
|
|
||||||
Using --wsrep-start-position when starting mysqld ...
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
|
||||||
COMMIT;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
|
||||||
COMMIT;
|
|
||||||
SET AUTOCOMMIT=OFF;
|
|
||||||
START TRANSACTION;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
|
||||||
COMMIT;
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
|
||||||
ROLLBACK;
|
|
||||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
|
||||||
COUNT(*) = 2
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
|
||||||
COUNT(*) = 35
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
||||||
COUNT(*) = 0
|
|
||||||
1
|
|
||||||
COMMIT;
|
|
||||||
SET AUTOCOMMIT=ON;
|
|
||||||
SELECT COUNT(*) = 2 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
|
||||||
COUNT(*) = 2
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 35 FROM t1;
|
|
||||||
COUNT(*) = 35
|
|
||||||
1
|
|
||||||
SELECT COUNT(*) = 0 FROM (SELECT COUNT(*) AS c, f1 FROM t1 GROUP BY f1 HAVING c NOT IN (5, 10)) AS a1;
|
|
||||||
COUNT(*) = 0
|
|
||||||
1
|
|
||||||
DROP TABLE t1;
|
|
||||||
COMMIT;
|
|
||||||
SET AUTOCOMMIT=ON;
|
|
||||||
SET GLOBAL debug_dbug = $debug_orig;
|
|
||||||
|
@ -33,9 +33,9 @@ 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;
|
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
|
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||||
SELECT 1;
|
SELECT 1;
|
||||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
1
|
||||||
|
1
|
||||||
USE information_schema;
|
USE information_schema;
|
||||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
|
||||||
SELECT * FROM information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads";
|
SELECT * FROM information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads";
|
||||||
VARIABLE_NAME VARIABLE_VALUE
|
VARIABLE_NAME VARIABLE_VALUE
|
||||||
WSREP_DIRTY_READS OFF
|
WSREP_DIRTY_READS OFF
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package My::Suite::GALERA;
|
package My::Suite::Galera;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use My::Find;
|
use My::Find;
|
||||||
|
|
||||||
@ -25,6 +25,10 @@ return "No scritps" unless $cpath;
|
|||||||
my ($epath) = grep { -f "$_/my_print_defaults"; } "$::bindir/extra", $::path_client_bindir;
|
my ($epath) = grep { -f "$_/my_print_defaults"; } "$::bindir/extra", $::path_client_bindir;
|
||||||
return "No my_print_defaults" unless $epath;
|
return "No my_print_defaults" unless $epath;
|
||||||
|
|
||||||
|
my ($bpath) = grep { -f "$_/mariabackup"; } "$::bindir/extra/mariabackup", $::path_client_bindir;
|
||||||
|
|
||||||
|
sub which($) { return `sh -c "command -v $_[0]"` }
|
||||||
|
|
||||||
push @::global_suppressions,
|
push @::global_suppressions,
|
||||||
(
|
(
|
||||||
qr(WSREP: wsrep_sst_receive_address is set to '127.0.0.1),
|
qr(WSREP: wsrep_sst_receive_address is set to '127.0.0.1),
|
||||||
@ -77,10 +81,30 @@ push @::global_suppressions,
|
|||||||
qr|WSREP: JOIN message from member .* in non-primary configuration. Ignored.|,
|
qr|WSREP: JOIN message from member .* in non-primary configuration. Ignored.|,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$ENV{PATH}="$epath:$ENV{PATH}";
|
$ENV{PATH}="$epath:$ENV{PATH}";
|
||||||
$ENV{PATH}="$spath:$ENV{PATH}" unless $epath eq $spath;
|
$ENV{PATH}="$spath:$ENV{PATH}" unless $epath eq $spath;
|
||||||
$ENV{PATH}="$cpath:$ENV{PATH}" unless $cpath eq $spath;
|
$ENV{PATH}="$cpath:$ENV{PATH}" unless $cpath eq $spath;
|
||||||
|
$ENV{PATH}="$bpath:$ENV{PATH}" unless $bpath eq $spath;
|
||||||
|
|
||||||
|
if (which(socat)) {
|
||||||
|
$ENV{MTR_GALERA_TFMT}='socat';
|
||||||
|
} elsif (which(nc)) {
|
||||||
|
$ENV{MTR_GALERA_TFMT}='nc';
|
||||||
|
}
|
||||||
|
|
||||||
|
sub skip_combinations {
|
||||||
|
my %skip = ();
|
||||||
|
$skip{'include/have_xtrabackup.inc'} = 'Need innobackupex'
|
||||||
|
unless which(innobackupex);
|
||||||
|
$skip{'include/have_xtrabackup.inc'} = 'Need socat or nc'
|
||||||
|
unless $ENV{MTR_GALERA_TFMT};
|
||||||
|
$skip{'include/have_mariabackup.inc'} = 'Need mariabackup'
|
||||||
|
unless which(mariabackup);
|
||||||
|
$skip{'include/have_mariabackup.inc'} = 'Need ss'
|
||||||
|
unless which(ss);
|
||||||
|
$skip{'include/have_mariabackup.inc'} = 'Need socat or nc'
|
||||||
|
unless $ENV{MTR_GALERA_TFMT};
|
||||||
|
%skip;
|
||||||
|
}
|
||||||
|
|
||||||
bless { };
|
bless { };
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
|
|||||||
--let $value = query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1)
|
--let $value = query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1)
|
||||||
--connection node_3
|
--connection node_3
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
--eval SELECT "$value" IN ("Error 'WSREP has not yet prepared node for application use' on query. Default database: 'test'. Query: 'BEGIN'", "Node has dropped from cluster") AS expected_error
|
--eval SELECT "$value" IN ("Error 'Unknown command' on query. Default database: 'test'. Query: 'BEGIN'", "Node has dropped from cluster") AS expected_error
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
# Step #4. Bring back the async slave and restart replication
|
# Step #4. Bring back the async slave and restart replication
|
||||||
@ -85,9 +85,8 @@ DROP TABLE t1;
|
|||||||
STOP SLAVE;
|
STOP SLAVE;
|
||||||
RESET SLAVE ALL;
|
RESET SLAVE ALL;
|
||||||
|
|
||||||
CALL mtr.add_suppression("Slave SQL: Error 'WSREP has not yet prepared node for application use' on query");
|
CALL mtr.add_suppression("Slave SQL: Error 'Unknown command' on query");
|
||||||
CALL mtr.add_suppression("Slave: WSREP has not yet prepared node for application use Error_code: 1047");
|
CALL mtr.add_suppression("Slave: Unknown command Error_code: 1047");
|
||||||
CALL mtr.add_suppression("TORDERED} returned -107 \\(Transport endpoint is not connected\\)");
|
|
||||||
CALL mtr.add_suppression("Transport endpoint is not connected");
|
CALL mtr.add_suppression("Transport endpoint is not connected");
|
||||||
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
|
CALL mtr.add_suppression("Slave SQL: Error in Xid_log_event: Commit could not be completed, 'Deadlock found when trying to get lock; try restarting transaction', Error_code: 1213");
|
||||||
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
|
CALL mtr.add_suppression("Slave SQL: Node has dropped from cluster, Error_code: 1047");
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_xtrabackup.inc
|
||||||
|
|
||||||
--connection node_1
|
--connection node_1
|
||||||
--let $connection_id = `SELECT CONNECTION_ID()`
|
--let $connection_id = `SELECT CONNECTION_ID()`
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_xtrabackup.inc
|
||||||
|
|
||||||
--source suite/galera/include/galera_st_disconnect_slave.inc
|
--source suite/galera/include/galera_st_disconnect_slave.inc
|
||||||
--source suite/galera/include/galera_st_shutdown_slave.inc
|
--source suite/galera/include/galera_st_shutdown_slave.inc
|
||||||
|
16
mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
Normal file
16
mysql-test/suite/galera/t/galera_sst_mariabackup.cnf
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
!include ../galera_2nodes.cnf
|
||||||
|
|
||||||
|
[mysqld]
|
||||||
|
wsrep_sst_method=mariabackup
|
||||||
|
wsrep_sst_auth="root:"
|
||||||
|
wsrep_debug=ON
|
||||||
|
|
||||||
|
[mysqld.1]
|
||||||
|
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
||||||
|
|
||||||
|
[mysqld.2]
|
||||||
|
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
||||||
|
|
||||||
|
[sst]
|
||||||
|
transferfmt=@ENV.MTR_GALERA_TFMT
|
||||||
|
streamfmt=xbstream
|
19
mysql-test/suite/galera/t/galera_sst_mariabackup.test
Normal file
19
mysql-test/suite/galera/t/galera_sst_mariabackup.test
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
--source include/galera_cluster.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_mariabackup.inc
|
||||||
|
|
||||||
|
# Save original auto_increment_offset values.
|
||||||
|
--let $node_1=node_1
|
||||||
|
--let $node_2=node_2
|
||||||
|
--source include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
|
--source suite/galera/include/galera_st_shutdown_slave.inc
|
||||||
|
--source suite/galera/include/galera_st_clean_slave.inc
|
||||||
|
|
||||||
|
--source suite/galera/include/galera_st_kill_slave.inc
|
||||||
|
--source suite/galera/include/galera_st_kill_slave_ddl.inc
|
||||||
|
|
||||||
|
# Restore original auto_increment_offset values.
|
||||||
|
--source include/auto_increment_offset_restore.inc
|
||||||
|
|
||||||
|
--source include/galera_end.inc
|
@ -1,9 +1,11 @@
|
|||||||
--source include/big_test.inc
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
|
||||||
|
|
||||||
--source suite/galera/include/galera_sst_set_mysqldump.inc
|
--source suite/galera/include/galera_sst_set_mysqldump.inc
|
||||||
|
|
||||||
|
--let $node_1=node_1
|
||||||
|
--let $node_2=node_2
|
||||||
|
--source include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
--source suite/galera/include/galera_st_disconnect_slave.inc
|
--source suite/galera/include/galera_st_disconnect_slave.inc
|
||||||
|
|
||||||
# We set the required mysqldump SST options here so that they are used every time the server is restarted during the test
|
# We set the required mysqldump SST options here so that they are used every time the server is restarted during the test
|
||||||
@ -15,4 +17,5 @@
|
|||||||
--source suite/galera/include/galera_st_kill_slave.inc
|
--source suite/galera/include/galera_st_kill_slave.inc
|
||||||
--source suite/galera/include/galera_st_kill_slave_ddl.inc
|
--source suite/galera/include/galera_st_kill_slave_ddl.inc
|
||||||
|
|
||||||
|
--source include/auto_increment_offset_restore.inc
|
||||||
--source suite/galera/include/galera_sst_restore.inc
|
--source suite/galera/include/galera_sst_restore.inc
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
--source include/big_test.inc
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
|
||||||
|
--let $node_1=node_1
|
||||||
|
--let $node_2=node_2
|
||||||
|
--source include/auto_increment_offset_save.inc
|
||||||
|
|
||||||
--source suite/galera/include/galera_st_shutdown_slave.inc
|
--source suite/galera/include/galera_st_shutdown_slave.inc
|
||||||
--source suite/galera/include/galera_st_clean_slave.inc
|
--source suite/galera/include/galera_st_clean_slave.inc
|
||||||
|
|
||||||
--source suite/galera/include/galera_st_kill_slave.inc
|
--source suite/galera/include/galera_st_kill_slave.inc
|
||||||
--source suite/galera/include/galera_st_kill_slave_ddl.inc
|
--source suite/galera/include/galera_st_kill_slave_ddl.inc
|
||||||
|
--source include/auto_increment_offset_restore.inc
|
||||||
|
@ -22,3 +22,4 @@ parallel=2
|
|||||||
encrypt=1
|
encrypt=1
|
||||||
encrypt-algo=AES256
|
encrypt-algo=AES256
|
||||||
encrypt-key=4FA92C5873672E20FB163A0BCB2BB4A4
|
encrypt-key=4FA92C5873672E20FB163A0BCB2BB4A4
|
||||||
|
transferfmt=@ENV.MTR_GALERA_TFMT
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
# Initial SST happens via xtrabackup, so there is not much to do in the body of the test
|
# Initial SST happens via xtrabackup, so there is not much to do in the body of the test
|
||||||
#
|
#
|
||||||
|
|
||||||
--source include/big_test.inc
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_xtrabackup.inc
|
||||||
|
|
||||||
SELECT 1;
|
SELECT 1;
|
||||||
|
|
||||||
|
@ -11,3 +11,5 @@ wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore
|
|||||||
[mysqld.2]
|
[mysqld.2]
|
||||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
||||||
|
|
||||||
|
[sst]
|
||||||
|
transferfmt=@ENV.MTR_GALERA_TFMT
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--source include/big_test.inc
|
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_xtrabackup.inc
|
||||||
|
|
||||||
# Save original auto_increment_offset values.
|
# Save original auto_increment_offset values.
|
||||||
--let $node_1=node_1
|
--let $node_1=node_1
|
||||||
|
@ -9,3 +9,4 @@ wsrep_debug=ON
|
|||||||
tkey=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem
|
tkey=@ENV.MYSQL_TEST_DIR/std_data/galera-key.pem
|
||||||
tcert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem
|
tcert=@ENV.MYSQL_TEST_DIR/std_data/galera-cert.pem
|
||||||
encrypt=3
|
encrypt=3
|
||||||
|
transferfmt=@ENV.MTR_GALERA_TFMT
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
--source include/big_test.inc
|
--source include/big_test.inc
|
||||||
--source include/galera_cluster.inc
|
--source include/galera_cluster.inc
|
||||||
--source include/have_innodb.inc
|
--source include/have_innodb.inc
|
||||||
|
--source include/have_xtrabackup.inc
|
||||||
|
|
||||||
SELECT 1;
|
SELECT 1;
|
||||||
|
|
||||||
|
@ -47,10 +47,8 @@ SET @@session.wsrep_dirty_reads=OFF;
|
|||||||
--error ER_UNKNOWN_COM_ERROR
|
--error ER_UNKNOWN_COM_ERROR
|
||||||
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
|
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
|
||||||
|
|
||||||
--error ER_UNKNOWN_COM_ERROR
|
|
||||||
SELECT 1;
|
SELECT 1;
|
||||||
|
|
||||||
--error ER_UNKNOWN_COM_ERROR
|
|
||||||
USE information_schema;
|
USE information_schema;
|
||||||
|
|
||||||
SELECT * FROM information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads";
|
SELECT * FROM information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads";
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
--source include/not_windows.inc
|
|
||||||
|
|
||||||
if (!$DISKS_SO) {
|
|
||||||
skip No DISKS plugin;
|
|
||||||
}
|
|
||||||
|
|
||||||
install plugin DISKS soname 'disks';
|
|
||||||
show create table information_schema.disks;
|
|
||||||
select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
|
|
||||||
|
|
||||||
uninstall plugin DISKS;
|
|
@ -30,10 +30,6 @@ SELECT @@global.wsrep_sst_receive_address;
|
|||||||
192.168.2.254
|
192.168.2.254
|
||||||
|
|
||||||
# invalid values
|
# invalid values
|
||||||
SET @@global.wsrep_sst_receive_address='127.0.0.1:4444';
|
|
||||||
ERROR 42000: Variable 'wsrep_sst_receive_address' can't be set to the value of '127.0.0.1:4444'
|
|
||||||
SET @@global.wsrep_sst_receive_address='127.0.0.1';
|
|
||||||
ERROR 42000: Variable 'wsrep_sst_receive_address' can't be set to the value of '127.0.0.1'
|
|
||||||
SELECT @@global.wsrep_sst_receive_address;
|
SELECT @@global.wsrep_sst_receive_address;
|
||||||
@@global.wsrep_sst_receive_address
|
@@global.wsrep_sst_receive_address
|
||||||
192.168.2.254
|
192.168.2.254
|
||||||
|
@ -27,10 +27,6 @@ SELECT @@global.wsrep_sst_receive_address;
|
|||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo # invalid values
|
--echo # invalid values
|
||||||
--error ER_WRONG_VALUE_FOR_VAR
|
|
||||||
SET @@global.wsrep_sst_receive_address='127.0.0.1:4444';
|
|
||||||
--error ER_WRONG_VALUE_FOR_VAR
|
|
||||||
SET @@global.wsrep_sst_receive_address='127.0.0.1';
|
|
||||||
SELECT @@global.wsrep_sst_receive_address;
|
SELECT @@global.wsrep_sst_receive_address;
|
||||||
--error ER_WRONG_VALUE_FOR_VAR
|
--error ER_WRONG_VALUE_FOR_VAR
|
||||||
SET @@global.wsrep_sst_receive_address=NULL;
|
SET @@global.wsrep_sst_receive_address=NULL;
|
||||||
|
@ -1972,9 +1972,25 @@ INSERT INTO t1 VALUES (0),(1);
|
|||||||
CREATE TABLE t2 (b2 BIT NOT NULL);
|
CREATE TABLE t2 (b2 BIT NOT NULL);
|
||||||
INSERT INTO t2 VALUES (0),(1);
|
INSERT INTO t2 VALUES (0),(1);
|
||||||
|
|
||||||
SET SESSION JOIN_CACHE_LEVEL = 3;
|
set @save_join_cache_level= @@join_cache_level;
|
||||||
|
SET @@join_cache_level = 3;
|
||||||
SELECT t1.b1+'0' , t2.b2 + '0' FROM t1 LEFT JOIN t2 ON b1 = b2;
|
SELECT t1.b1+'0' , t2.b2 + '0' FROM t1 LEFT JOIN t2 ON b1 = b2;
|
||||||
DROP TABLE t1, t2;
|
DROP TABLE t1, t2;
|
||||||
|
set @join_cache_level= @save_join_cache_level;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-14779: using left join causes incorrect results with materialization and derived tables
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create table t1(id int);
|
||||||
|
insert into t1 values (1),(2);
|
||||||
|
create table t2(sid int, id int);
|
||||||
|
insert into t2 values (1,1),(2,2);
|
||||||
|
|
||||||
|
select * from t1 t
|
||||||
|
left join (select * from t2 where sid in (select max(sid) from t2 where 0=1 group by id)) r
|
||||||
|
on t.id=r.id ;
|
||||||
|
drop table t1, t2;
|
||||||
|
|
||||||
--echo # end of 5.5 tests
|
--echo # end of 5.5 tests
|
||||||
|
|
||||||
|
35
mysql-test/t/ps_qc_innodb.test
Normal file
35
mysql-test/t/ps_qc_innodb.test
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
--source include/have_query_cache.inc
|
||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-15492: Subquery crash similar to MDEV-10050
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET @qcs.save= @@global.query_cache_size, @qct.save= @@global.query_cache_type;
|
||||||
|
SET GLOBAL query_cache_size= 512*1024*1024, query_cache_type= ON;
|
||||||
|
|
||||||
|
--connect (con1,localhost,root,,test)
|
||||||
|
CREATE TABLE t1 (a INT) ENGINE=InnoDB;
|
||||||
|
CREATE TABLE t2 (b INT) ENGINE=InnoDB;
|
||||||
|
CREATE VIEW v AS select a from t1 join t2;
|
||||||
|
|
||||||
|
PREPARE stmt1 FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)";
|
||||||
|
|
||||||
|
--connect (con2,localhost,root,,test)
|
||||||
|
PREPARE stmt2 FROM "SELECT * FROM t1 WHERE a in (SELECT a FROM v)";
|
||||||
|
EXECUTE stmt2;
|
||||||
|
|
||||||
|
--connection con1
|
||||||
|
EXECUTE stmt1;
|
||||||
|
INSERT INTO t2 VALUES (0);
|
||||||
|
EXECUTE stmt1;
|
||||||
|
START TRANSACTION;
|
||||||
|
EXECUTE stmt1;
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
--disconnect con1
|
||||||
|
--disconnect con2
|
||||||
|
--connection default
|
||||||
|
DROP VIEW v;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
SET GLOBAL query_cache_size= @qcs.save, query_cache_type= @qct.save;
|
@ -2032,6 +2032,14 @@ SELECT ( SELECT COUNT(*) FROM t1 WHERE a = c ) AS field, COUNT(DISTINCT c)
|
|||||||
FROM t2 WHERE b <= 'quux' GROUP BY field;
|
FROM t2 WHERE b <= 'quux' GROUP BY field;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-15555: select from DUAL where false yielding wrong result when in a IN
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
explain
|
||||||
|
SELECT 2 IN (SELECT 2 from DUAL WHERE 1 != 1);
|
||||||
|
SELECT 2 IN (SELECT 2 from DUAL WHERE 1 != 1);
|
||||||
|
|
||||||
SET optimizer_switch= @@global.optimizer_switch;
|
SET optimizer_switch= @@global.optimizer_switch;
|
||||||
set @@tmp_table_size= @@global.tmp_table_size;
|
set @@tmp_table_size= @@global.tmp_table_size;
|
||||||
|
|
||||||
|
@ -22,14 +22,24 @@ top: accounting
|
|||||||
@group_ro: readonly
|
@group_ro: readonly
|
||||||
=========================================================
|
=========================================================
|
||||||
|
|
||||||
|
If something doesn't work as expected you can get verbose
|
||||||
|
comments with the 'debug' option like this
|
||||||
|
=========================================================
|
||||||
|
auth required pam_user_map.so debug
|
||||||
|
=========================================================
|
||||||
|
These comments are written to the syslog as 'authpriv.debug'
|
||||||
|
and usually end up in /var/log/secure file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <string.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <grp.h>
|
#include <grp.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
||||||
|
#include <security/pam_ext.h>
|
||||||
#include <security/pam_modules.h>
|
#include <security/pam_modules.h>
|
||||||
|
|
||||||
#define FILENAME "/etc/security/user_map.conf"
|
#define FILENAME "/etc/security/user_map.conf"
|
||||||
@ -90,9 +100,42 @@ static int user_in_group(const gid_t *user_groups, int ng,const char *group)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void print_groups(pam_handle_t *pamh, const gid_t *user_groups, int ng)
|
||||||
|
{
|
||||||
|
char buf[256];
|
||||||
|
char *c_buf= buf, *buf_end= buf+sizeof(buf)-2;
|
||||||
|
struct group *gr;
|
||||||
|
int cg;
|
||||||
|
|
||||||
|
for (cg=0; cg < ng; cg++)
|
||||||
|
{
|
||||||
|
char *c;
|
||||||
|
if (c_buf == buf_end)
|
||||||
|
break;
|
||||||
|
*(c_buf++)= ',';
|
||||||
|
if (!(gr= getgrgid(user_groups[cg])) ||
|
||||||
|
!(c= gr->gr_name))
|
||||||
|
continue;
|
||||||
|
while (*c)
|
||||||
|
{
|
||||||
|
if (c_buf == buf_end)
|
||||||
|
break;
|
||||||
|
*(c_buf++)= *(c++);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
c_buf[0]= c_buf[1]= 0;
|
||||||
|
pam_syslog(pamh, LOG_DEBUG, "User belongs to %d %s [%s].\n",
|
||||||
|
ng, (ng == 1) ? "group" : "groups", buf+1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static const char debug_keyword[]= "debug";
|
||||||
|
#define SYSLOG_DEBUG if (mode_debug) pam_syslog
|
||||||
|
|
||||||
int pam_sm_authenticate(pam_handle_t *pamh, int flags,
|
int pam_sm_authenticate(pam_handle_t *pamh, int flags,
|
||||||
int argc, const char *argv[])
|
int argc, const char *argv[])
|
||||||
{
|
{
|
||||||
|
int mode_debug= 0;
|
||||||
int pam_err, line= 0;
|
int pam_err, line= 0;
|
||||||
const char *username;
|
const char *username;
|
||||||
char buf[256];
|
char buf[256];
|
||||||
@ -101,6 +144,14 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
|
|||||||
gid_t *groups= group_buffer;
|
gid_t *groups= group_buffer;
|
||||||
int n_groups= -1;
|
int n_groups= -1;
|
||||||
|
|
||||||
|
for (; argc > 0; argc--)
|
||||||
|
{
|
||||||
|
if (strcasecmp(argv[argc-1], debug_keyword) == 0)
|
||||||
|
mode_debug= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
SYSLOG_DEBUG(pamh, LOG_DEBUG, "Opening file '%s'.\n", FILENAME);
|
||||||
|
|
||||||
f= fopen(FILENAME, "r");
|
f= fopen(FILENAME, "r");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
@ -110,12 +161,18 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
|
|||||||
|
|
||||||
pam_err = pam_get_item(pamh, PAM_USER, (const void**)&username);
|
pam_err = pam_get_item(pamh, PAM_USER, (const void**)&username);
|
||||||
if (pam_err != PAM_SUCCESS)
|
if (pam_err != PAM_SUCCESS)
|
||||||
|
{
|
||||||
|
pam_syslog(pamh, LOG_ERR, "Cannot get username.\n");
|
||||||
goto ret;
|
goto ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
SYSLOG_DEBUG(pamh, LOG_DEBUG, "Incoming username '%s'.\n", username);
|
||||||
|
|
||||||
while (fgets(buf, sizeof(buf), f) != NULL)
|
while (fgets(buf, sizeof(buf), f) != NULL)
|
||||||
{
|
{
|
||||||
char *s= buf, *from, *to, *end_from, *end_to;
|
char *s= buf, *from, *to, *end_from, *end_to;
|
||||||
int check_group;
|
int check_group;
|
||||||
|
int cmp_result;
|
||||||
|
|
||||||
line++;
|
line++;
|
||||||
|
|
||||||
@ -124,7 +181,11 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
|
|||||||
if ((check_group= *s == '@'))
|
if ((check_group= *s == '@'))
|
||||||
{
|
{
|
||||||
if (n_groups < 0)
|
if (n_groups < 0)
|
||||||
|
{
|
||||||
n_groups= populate_user_groups(username, &groups);
|
n_groups= populate_user_groups(username, &groups);
|
||||||
|
if (mode_debug)
|
||||||
|
print_groups(pamh, groups, n_groups);
|
||||||
|
}
|
||||||
s++;
|
s++;
|
||||||
}
|
}
|
||||||
from= s;
|
from= s;
|
||||||
@ -139,14 +200,30 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags,
|
|||||||
if (end_to == to) goto syntax_error;
|
if (end_to == to) goto syntax_error;
|
||||||
|
|
||||||
*end_from= *end_to= 0;
|
*end_from= *end_to= 0;
|
||||||
if (check_group ?
|
|
||||||
user_in_group(groups, n_groups, from) :
|
if (check_group)
|
||||||
(strcmp(username, from) == 0))
|
{
|
||||||
|
cmp_result= user_in_group(groups, n_groups, from);
|
||||||
|
SYSLOG_DEBUG(pamh, LOG_DEBUG, "Check if user is in group '%s': %s\n",
|
||||||
|
from, cmp_result ? "YES":"NO");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cmp_result= (strcmp(username, from) == 0);
|
||||||
|
SYSLOG_DEBUG(pamh, LOG_DEBUG, "Check if username '%s': %s\n",
|
||||||
|
from, cmp_result ? "YES":"NO");
|
||||||
|
}
|
||||||
|
if (cmp_result)
|
||||||
{
|
{
|
||||||
pam_err= pam_set_item(pamh, PAM_USER, to);
|
pam_err= pam_set_item(pamh, PAM_USER, to);
|
||||||
|
SYSLOG_DEBUG(pamh, LOG_DEBUG,
|
||||||
|
(pam_err == PAM_SUCCESS) ? "User mapped as '%s'\n" :
|
||||||
|
"Couldn't map as '%s'\n", to);
|
||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SYSLOG_DEBUG(pamh, LOG_DEBUG, "User not found in the list.\n");
|
||||||
pam_err= PAM_AUTH_ERR;
|
pam_err= PAM_AUTH_ERR;
|
||||||
goto ret;
|
goto ret;
|
||||||
|
|
||||||
@ -162,6 +239,7 @@ ret:
|
|||||||
return pam_err;
|
return pam_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int pam_sm_setcred(pam_handle_t *pamh, int flags,
|
int pam_sm_setcred(pam_handle_t *pamh, int flags,
|
||||||
int argc, const char *argv[])
|
int argc, const char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
IF(NOT WIN32)
|
IF("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
|
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)
|
||||||
MYSQL_ADD_PLUGIN(DISKS information_schema_disks.cc MODULE_ONLY RECOMPILE_FOR_EMBEDDED)
|
MYSQL_ADD_PLUGIN(DISKS information_schema_disks.cc MODULE_ONLY RECOMPILE_FOR_EMBEDDED)
|
||||||
ENDIF()
|
ENDIF()
|
@ -57,31 +57,16 @@ tables; disks and mounts.
|
|||||||
...
|
...
|
||||||
|
|
||||||
|
|
||||||
Building
|
|
||||||
--------
|
|
||||||
- Ensure that the directory information_schema_disks is in the top-level
|
|
||||||
directory of the server.
|
|
||||||
- Add
|
|
||||||
|
|
||||||
ADD_SUBDIRECTORY(information_schema_disks)
|
|
||||||
|
|
||||||
to the top-level CMakeLists.txt
|
|
||||||
|
|
||||||
> Invoke make
|
|
||||||
|
|
||||||
$ make
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
- Copy information_schema_disks/libinformation_schema_disks.so to the plugin
|
|
||||||
directory of the server:
|
|
||||||
|
|
||||||
$ cd information_schema_disks
|
- Use "install plugin" or "install soname" command:
|
||||||
$ sudo cp libinformation_schema_disks.so plugin-directory-of-server
|
|
||||||
|
|
||||||
- Using mysql, install the plugin:
|
MariaDB [(none)]> install plugin disks soname 'disks.so';
|
||||||
|
|
||||||
MariaDB [(none)]> install plugin disks soname 'libinformation_schema_disks.so';
|
or
|
||||||
|
|
||||||
|
MariaDB [(none)]> install soname 'disks.so';
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
@ -19,7 +19,8 @@
|
|||||||
#include <mntent.h>
|
#include <mntent.h>
|
||||||
#include <sql_class.h>
|
#include <sql_class.h>
|
||||||
#include <table.h>
|
#include <table.h>
|
||||||
#include <innodb_priv.h>
|
|
||||||
|
bool schema_table_store_record(THD *thd, TABLE *table);
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
@ -133,21 +134,21 @@ int disks_table_init(void *ptr)
|
|||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
|
||||||
mysql_declare_plugin(disks_library)
|
maria_declare_plugin(disks)
|
||||||
{
|
{
|
||||||
MYSQL_INFORMATION_SCHEMA_PLUGIN,
|
MYSQL_INFORMATION_SCHEMA_PLUGIN,
|
||||||
&disks_table_info, /* type-specific descriptor */
|
&disks_table_info, /* type-specific descriptor */
|
||||||
"DISKS", /* table name */
|
"DISKS", /* table name */
|
||||||
"MariaDB", /* author */
|
"Johan Wikman", /* author */
|
||||||
"Disk space information", /* description */
|
"Disk space information", /* description */
|
||||||
PLUGIN_LICENSE_GPL, /* license type */
|
PLUGIN_LICENSE_GPL, /* license type */
|
||||||
disks_table_init, /* init function */
|
disks_table_init, /* init function */
|
||||||
NULL,
|
NULL, /* deinit function */
|
||||||
0x0100, /* version = 1.0 */
|
0x0100, /* version = 1.0 */
|
||||||
NULL, /* no status variables */
|
NULL, /* no status variables */
|
||||||
NULL, /* no system variables */
|
NULL, /* no system variables */
|
||||||
NULL, /* no reserved information */
|
"1.0", /* String version representation */
|
||||||
0 /* no flags */
|
MariaDB_PLUGIN_MATURITY_BETA /* Maturity (see include/mysql/plugin.h)*/
|
||||||
}
|
}
|
||||||
mysql_declare_plugin_end;
|
mysql_declare_plugin_end;
|
||||||
|
|
@ -1,4 +1,3 @@
|
|||||||
install plugin DISKS soname 'disks';
|
|
||||||
show create table information_schema.disks;
|
show create table information_schema.disks;
|
||||||
Table Create Table
|
Table Create Table
|
||||||
DISKS CREATE TEMPORARY TABLE `DISKS` (
|
DISKS CREATE TEMPORARY TABLE `DISKS` (
|
||||||
@ -11,4 +10,3 @@ DISKS CREATE TEMPORARY TABLE `DISKS` (
|
|||||||
select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
|
select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
|
||||||
sum(Total) > sum(Available) sum(Total)>sum(Used)
|
sum(Total) > sum(Available) sum(Total)>sum(Used)
|
||||||
1 1
|
1 1
|
||||||
uninstall plugin DISKS;
|
|
2
plugin/disks/mysql-test/disks/disks.test
Normal file
2
plugin/disks/mysql-test/disks/disks.test
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
show create table information_schema.disks;
|
||||||
|
select sum(Total) > sum(Available), sum(Total)>sum(Used) from information_schema.disks;
|
1
plugin/disks/mysql-test/disks/suite.opt
Normal file
1
plugin/disks/mysql-test/disks/suite.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--plugin-load-add=$DISKS_SO
|
10
plugin/disks/mysql-test/disks/suite.pm
Normal file
10
plugin/disks/mysql-test/disks/suite.pm
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
package My::Suite::Disks;
|
||||||
|
|
||||||
|
@ISA = qw(My::Suite);
|
||||||
|
|
||||||
|
return "No Disks plugin" unless $ENV{DISKS_SO};
|
||||||
|
|
||||||
|
sub is_default { 1 }
|
||||||
|
|
||||||
|
bless { };
|
||||||
|
|
@ -179,12 +179,26 @@ get_transfer()
|
|||||||
wsrep_log_info "Using netcat as streamer"
|
wsrep_log_info "Using netcat as streamer"
|
||||||
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
|
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
|
||||||
if nc -h 2>&1 | grep -q ncat;then
|
if nc -h 2>&1 | grep -q ncat;then
|
||||||
|
# Ncat
|
||||||
tcmd="nc -l ${TSST_PORT}"
|
tcmd="nc -l ${TSST_PORT}"
|
||||||
else
|
elif nc -h 2>&1 | grep -q -- '-d\>';then
|
||||||
|
# Debian netcat
|
||||||
tcmd="nc -dl ${TSST_PORT}"
|
tcmd="nc -dl ${TSST_PORT}"
|
||||||
|
else
|
||||||
|
# traditional netcat
|
||||||
|
tcmd="nc -l -p ${TSST_PORT}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
if nc -h 2>&1 | grep -q ncat;then
|
||||||
|
# Ncat
|
||||||
tcmd="nc ${REMOTEIP} ${TSST_PORT}"
|
tcmd="nc ${REMOTEIP} ${TSST_PORT}"
|
||||||
|
elif nc -h 2>&1 | grep -q -- '-d\>';then
|
||||||
|
# Debian netcat
|
||||||
|
tcmd="nc ${REMOTEIP} ${TSST_PORT}"
|
||||||
|
else
|
||||||
|
# traditional netcat
|
||||||
|
tcmd="nc -q0 ${REMOTEIP} ${TSST_PORT}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
tfmt='socat'
|
tfmt='socat'
|
||||||
|
@ -119,11 +119,11 @@ MYSQL="$MYSQL_CLIENT $WSREP_SST_OPT_CONF "\
|
|||||||
|
|
||||||
# Check if binary logging is enabled on the joiner node.
|
# Check if binary logging is enabled on the joiner node.
|
||||||
# Note: SELECT cannot be used at this point.
|
# Note: SELECT cannot be used at this point.
|
||||||
LOG_BIN=$(echo "SHOW VARIABLES LIKE 'log_bin'" | $MYSQL |\
|
LOG_BIN=$(echo "set statement wsrep_sync_wait=0 for SHOW VARIABLES LIKE 'log_bin'" | $MYSQL |\
|
||||||
tail -1 | awk -F ' ' '{ print $2 }')
|
tail -1 | awk -F ' ' '{ print $2 }')
|
||||||
|
|
||||||
# Check the joiner node's server version.
|
# Check the joiner node's server version.
|
||||||
SERVER_VERSION=$(echo "SHOW VARIABLES LIKE 'version'" | $MYSQL |\
|
SERVER_VERSION=$(echo "set statement wsrep_sync_wait=0 for SHOW VARIABLES LIKE 'version'" | $MYSQL |\
|
||||||
tail -1 | awk -F ' ' '{ print $2 }')
|
tail -1 | awk -F ' ' '{ print $2 }')
|
||||||
|
|
||||||
RESET_MASTER=""
|
RESET_MASTER=""
|
||||||
|
@ -268,13 +268,26 @@ get_transfer()
|
|||||||
wsrep_log_info "Using netcat as streamer"
|
wsrep_log_info "Using netcat as streamer"
|
||||||
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
|
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
|
||||||
if nc -h 2>&1 | grep -q ncat; then
|
if nc -h 2>&1 | grep -q ncat; then
|
||||||
|
# Ncat
|
||||||
tcmd="nc $sockopt -l ${TSST_PORT}"
|
tcmd="nc $sockopt -l ${TSST_PORT}"
|
||||||
else
|
elif nc -h 2>&1 | grep -q -- '-d\>';then
|
||||||
|
# Debian netcat
|
||||||
tcmd="nc $sockopt -dl ${TSST_PORT}"
|
tcmd="nc $sockopt -dl ${TSST_PORT}"
|
||||||
|
else
|
||||||
|
# traditional netcat
|
||||||
|
tcmd="nc $sockopt -l -p ${TSST_PORT}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# netcat doesn't understand [] around IPv6 address
|
if nc -h 2>&1 | grep -q ncat;then
|
||||||
|
# Ncat
|
||||||
tcmd="nc ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
|
tcmd="nc ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
|
||||||
|
elif nc -h 2>&1 | grep -q -- '-d\>';then
|
||||||
|
# Debian netcat
|
||||||
|
tcmd="nc ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
|
||||||
|
else
|
||||||
|
# traditional netcat
|
||||||
|
tcmd="nc -q0 ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
tfmt='socat'
|
tfmt='socat'
|
||||||
|
@ -144,12 +144,26 @@ get_transfer()
|
|||||||
wsrep_log_info "Using netcat as streamer"
|
wsrep_log_info "Using netcat as streamer"
|
||||||
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
|
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
|
||||||
if nc -h 2>&1 | grep -q ncat;then
|
if nc -h 2>&1 | grep -q ncat;then
|
||||||
|
# Ncat
|
||||||
tcmd="nc -l ${TSST_PORT}"
|
tcmd="nc -l ${TSST_PORT}"
|
||||||
else
|
elif nc -h 2>&1 | grep -q -- '-d\>';then
|
||||||
|
# Debian netcat
|
||||||
tcmd="nc -dl ${TSST_PORT}"
|
tcmd="nc -dl ${TSST_PORT}"
|
||||||
|
else
|
||||||
|
# traditional netcat
|
||||||
|
tcmd="nc -l -p ${TSST_PORT}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
tcmd="nc ${WSREP_SST_OPT_HOST_UNESCAPED} ${TSST_PORT}"
|
if nc -h 2>&1 | grep -q ncat;then
|
||||||
|
# Ncat
|
||||||
|
tcmd="nc ${REMOTEIP} ${TSST_PORT}"
|
||||||
|
elif nc -h 2>&1 | grep -q -- '-d\>';then
|
||||||
|
# Debian netcat
|
||||||
|
tcmd="nc ${REMOTEIP} ${TSST_PORT}"
|
||||||
|
else
|
||||||
|
# traditional netcat
|
||||||
|
tcmd="nc -q0 ${REMOTEIP} ${TSST_PORT}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
tfmt='socat'
|
tfmt='socat'
|
||||||
|
@ -345,6 +345,7 @@ public:
|
|||||||
bool is_null();
|
bool is_null();
|
||||||
longlong val_int();
|
longlong val_int();
|
||||||
void cleanup();
|
void cleanup();
|
||||||
|
enum Functype functype() const { return IN_OPTIMIZER_FUNC; }
|
||||||
const char *func_name() const { return "<in_optimizer>"; }
|
const char *func_name() const { return "<in_optimizer>"; }
|
||||||
Item_cache **get_cache() { return &cache; }
|
Item_cache **get_cache() { return &cache; }
|
||||||
void keep_top_level_cache();
|
void keep_top_level_cache();
|
||||||
@ -362,6 +363,8 @@ public:
|
|||||||
void reset_cache() { cache= NULL; }
|
void reset_cache() { cache= NULL; }
|
||||||
virtual void print(String *str, enum_query_type query_type);
|
virtual void print(String *str, enum_query_type query_type);
|
||||||
void restore_first_argument();
|
void restore_first_argument();
|
||||||
|
Item* get_wrapped_in_subselect_item()
|
||||||
|
{ return args[1]; }
|
||||||
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
Item *get_copy(THD *thd, MEM_ROOT *mem_root)
|
||||||
{ return get_item_copy<Item_in_optimizer>(thd, mem_root, this); }
|
{ return get_item_copy<Item_in_optimizer>(thd, mem_root, this); }
|
||||||
};
|
};
|
||||||
|
@ -67,7 +67,8 @@ public:
|
|||||||
NOW_FUNC, NOW_UTC_FUNC, SYSDATE_FUNC, TRIG_COND_FUNC,
|
NOW_FUNC, NOW_UTC_FUNC, SYSDATE_FUNC, TRIG_COND_FUNC,
|
||||||
SUSERVAR_FUNC, GUSERVAR_FUNC, COLLATE_FUNC,
|
SUSERVAR_FUNC, GUSERVAR_FUNC, COLLATE_FUNC,
|
||||||
EXTRACT_FUNC, CHAR_TYPECAST_FUNC, FUNC_SP, UDF_FUNC,
|
EXTRACT_FUNC, CHAR_TYPECAST_FUNC, FUNC_SP, UDF_FUNC,
|
||||||
NEG_FUNC, GSYSVAR_FUNC, DYNCOL_FUNC, JSON_EXTRACT_FUNC };
|
NEG_FUNC, GSYSVAR_FUNC, IN_OPTIMIZER_FUNC, DYNCOL_FUNC,
|
||||||
|
JSON_EXTRACT_FUNC };
|
||||||
enum Type type() const { return FUNC_ITEM; }
|
enum Type type() const { return FUNC_ITEM; }
|
||||||
virtual enum Functype functype() const { return UNKNOWN_FUNC; }
|
virtual enum Functype functype() const { return UNKNOWN_FUNC; }
|
||||||
Item_func(THD *thd): Item_func_or_sum(thd), allowed_arg_cols(1)
|
Item_func(THD *thd): Item_func_or_sum(thd), allowed_arg_cols(1)
|
||||||
|
@ -1827,7 +1827,7 @@ Item_in_subselect::single_value_transformer(JOIN *join)
|
|||||||
Item* join_having= join->having ? join->having : join->tmp_having;
|
Item* join_having= join->having ? join->having : join->tmp_having;
|
||||||
if (!(join_having || select_lex->with_sum_func ||
|
if (!(join_having || select_lex->with_sum_func ||
|
||||||
select_lex->group_list.elements) &&
|
select_lex->group_list.elements) &&
|
||||||
select_lex->table_list.elements == 0 &&
|
select_lex->table_list.elements == 0 && !join->conds &&
|
||||||
!select_lex->master_unit()->is_union())
|
!select_lex->master_unit()->is_union())
|
||||||
{
|
{
|
||||||
Item *where_item= (Item*) select_lex->item_list.head();
|
Item *where_item= (Item*) select_lex->item_list.head();
|
||||||
|
@ -1010,6 +1010,10 @@ bool check_for_outer_joins(List<TABLE_LIST> *join_list)
|
|||||||
void find_and_block_conversion_to_sj(Item *to_find,
|
void find_and_block_conversion_to_sj(Item *to_find,
|
||||||
List_iterator_fast<Item_in_subselect> &li)
|
List_iterator_fast<Item_in_subselect> &li)
|
||||||
{
|
{
|
||||||
|
if (to_find->type() == Item::FUNC_ITEM &&
|
||||||
|
((Item_func*)to_find)->functype() == Item_func::IN_OPTIMIZER_FUNC)
|
||||||
|
to_find= ((Item_in_optimizer*)to_find)->get_wrapped_in_subselect_item();
|
||||||
|
|
||||||
if (to_find->type() != Item::SUBSELECT_ITEM ||
|
if (to_find->type() != Item::SUBSELECT_ITEM ||
|
||||||
((Item_subselect *) to_find)->substype() != Item_subselect::IN_SUBS)
|
((Item_subselect *) to_find)->substype() != Item_subselect::IN_SUBS)
|
||||||
return;
|
return;
|
||||||
|
@ -2680,15 +2680,19 @@ Item_change_list::check_and_register_item_tree_change(Item **place,
|
|||||||
|
|
||||||
void Item_change_list::rollback_item_tree_changes()
|
void Item_change_list::rollback_item_tree_changes()
|
||||||
{
|
{
|
||||||
|
DBUG_ENTER("THD::rollback_item_tree_changes");
|
||||||
I_List_iterator<Item_change_record> it(change_list);
|
I_List_iterator<Item_change_record> it(change_list);
|
||||||
Item_change_record *change;
|
Item_change_record *change;
|
||||||
|
|
||||||
while ((change= it++))
|
while ((change= it++))
|
||||||
{
|
{
|
||||||
|
DBUG_PRINT("info", ("Rollback: %p (%p) <- %p",
|
||||||
|
*change->place, change->place, change->old_value));
|
||||||
*change->place= change->old_value;
|
*change->place= change->old_value;
|
||||||
}
|
}
|
||||||
/* We can forget about changes memory: it's allocated in runtime memroot */
|
/* We can forget about changes memory: it's allocated in runtime memroot */
|
||||||
change_list.empty();
|
change_list.empty();
|
||||||
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1152,7 +1152,6 @@ static enum enum_server_command fetch_command(THD *thd, char *packet)
|
|||||||
#ifdef WITH_WSREP
|
#ifdef WITH_WSREP
|
||||||
static bool wsrep_tables_accessible_when_detached(const TABLE_LIST *tables)
|
static bool wsrep_tables_accessible_when_detached(const TABLE_LIST *tables)
|
||||||
{
|
{
|
||||||
bool has_tables = false;
|
|
||||||
for (const TABLE_LIST *table= tables; table; table= table->next_global)
|
for (const TABLE_LIST *table= tables; table; table= table->next_global)
|
||||||
{
|
{
|
||||||
TABLE_CATEGORY c;
|
TABLE_CATEGORY c;
|
||||||
@ -1165,9 +1164,8 @@ static bool wsrep_tables_accessible_when_detached(const TABLE_LIST *tables)
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
has_tables = true;
|
|
||||||
}
|
}
|
||||||
return has_tables;
|
return true;
|
||||||
}
|
}
|
||||||
#endif /* WITH_WSREP */
|
#endif /* WITH_WSREP */
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
|
@ -4657,6 +4657,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
|||||||
Statement stmt_backup;
|
Statement stmt_backup;
|
||||||
Query_arena *old_stmt_arena;
|
Query_arena *old_stmt_arena;
|
||||||
bool error= TRUE;
|
bool error= TRUE;
|
||||||
|
bool qc_executed= FALSE;
|
||||||
|
|
||||||
char saved_cur_db_name_buf[SAFE_NAME_LEN+1];
|
char saved_cur_db_name_buf[SAFE_NAME_LEN+1];
|
||||||
LEX_STRING saved_cur_db_name=
|
LEX_STRING saved_cur_db_name=
|
||||||
@ -4779,6 +4780,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
|||||||
thd->lex->sql_command= SQLCOM_SELECT;
|
thd->lex->sql_command= SQLCOM_SELECT;
|
||||||
status_var_increment(thd->status_var.com_stat[SQLCOM_SELECT]);
|
status_var_increment(thd->status_var.com_stat[SQLCOM_SELECT]);
|
||||||
thd->update_stats();
|
thd->update_stats();
|
||||||
|
qc_executed= TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4817,7 +4819,7 @@ bool Prepared_statement::execute(String *expanded_query, bool open_cursor)
|
|||||||
thd->set_statement(&stmt_backup);
|
thd->set_statement(&stmt_backup);
|
||||||
thd->stmt_arena= old_stmt_arena;
|
thd->stmt_arena= old_stmt_arena;
|
||||||
|
|
||||||
if (state == Query_arena::STMT_PREPARED)
|
if (state == Query_arena::STMT_PREPARED && !qc_executed)
|
||||||
state= Query_arena::STMT_EXECUTED;
|
state= Query_arena::STMT_EXECUTED;
|
||||||
|
|
||||||
if (error == 0 && this->lex->sql_command == SQLCOM_CALL)
|
if (error == 0 && this->lex->sql_command == SQLCOM_CALL)
|
||||||
|
@ -3606,6 +3606,13 @@ extern ST_SCHEMA_TABLE schema_tables[];
|
|||||||
bool schema_table_store_record(THD *thd, TABLE *table)
|
bool schema_table_store_record(THD *thd, TABLE *table)
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
|
if (thd->killed)
|
||||||
|
{
|
||||||
|
thd->send_kill_message();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if ((error= table->file->ha_write_tmp_row(table->record[0])))
|
if ((error= table->file->ha_write_tmp_row(table->record[0])))
|
||||||
{
|
{
|
||||||
TMP_TABLE_PARAM *param= table->pos_in_table_list->schema_table_param;
|
TMP_TABLE_PARAM *param= table->pos_in_table_list->schema_table_param;
|
||||||
|
@ -49,7 +49,7 @@ int wsrep_check_opts()
|
|||||||
(!strcasecmp(my_bind_addr_str, "127.0.0.1") ||
|
(!strcasecmp(my_bind_addr_str, "127.0.0.1") ||
|
||||||
!strcasecmp(my_bind_addr_str, "localhost")))
|
!strcasecmp(my_bind_addr_str, "localhost")))
|
||||||
{
|
{
|
||||||
WSREP_ERROR("wsrep_sst_method is set to 'mysqldump' yet "
|
WSREP_WARN("wsrep_sst_method is set to 'mysqldump' yet "
|
||||||
"mysqld bind_address is set to '%s', which makes it "
|
"mysqld bind_address is set to '%s', which makes it "
|
||||||
"impossible to receive state transfer from another "
|
"impossible to receive state transfer from another "
|
||||||
"node, since mysqld won't accept such connections. "
|
"node, since mysqld won't accept such connections. "
|
||||||
@ -57,7 +57,6 @@ int wsrep_check_opts()
|
|||||||
"set bind_address to allow mysql client connections "
|
"set bind_address to allow mysql client connections "
|
||||||
"from other cluster members (e.g. 0.0.0.0).",
|
"from other cluster members (e.g. 0.0.0.0).",
|
||||||
my_bind_addr_str);
|
my_bind_addr_str);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -382,7 +382,7 @@ wsrep_view_handler_cb (void* app_ctx,
|
|||||||
if (!wsrep_before_SE())
|
if (!wsrep_before_SE())
|
||||||
{
|
{
|
||||||
WSREP_DEBUG("[debug]: closing client connections for PRIM");
|
WSREP_DEBUG("[debug]: closing client connections for PRIM");
|
||||||
wsrep_close_client_connections(TRUE);
|
wsrep_close_client_connections(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t const req_len= wsrep_sst_prepare (sst_req);
|
ssize_t const req_len= wsrep_sst_prepare (sst_req);
|
||||||
|
@ -79,37 +79,14 @@ static void make_wsrep_defaults_file()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: Improve address verification.
|
|
||||||
static bool sst_receive_address_check (const char* str)
|
|
||||||
{
|
|
||||||
if (!strncasecmp(str, "127.0.0.1", strlen("127.0.0.1")) ||
|
|
||||||
!strncasecmp(str, "localhost", strlen("localhost")))
|
|
||||||
{
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wsrep_sst_receive_address_check (sys_var *self, THD* thd, set_var* var)
|
bool wsrep_sst_receive_address_check (sys_var *self, THD* thd, set_var* var)
|
||||||
{
|
{
|
||||||
char addr_buf[FN_REFLEN];
|
|
||||||
|
|
||||||
if ((! var->save_result.string_value.str) ||
|
if ((! var->save_result.string_value.str) ||
|
||||||
(var->save_result.string_value.length > (FN_REFLEN - 1))) // safety
|
(var->save_result.string_value.length > (FN_REFLEN - 1))) // safety
|
||||||
{
|
{
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(addr_buf, var->save_result.string_value.str,
|
|
||||||
var->save_result.string_value.length);
|
|
||||||
addr_buf[var->save_result.string_value.length]= 0;
|
|
||||||
|
|
||||||
if (sst_receive_address_check(addr_buf))
|
|
||||||
{
|
|
||||||
goto err;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err:
|
err:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user