mirror of
https://github.com/MariaDB/server.git
synced 2025-08-09 22:24:09 +03:00
Merge 10.9 into 10.10
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
Copyright (c) 2001, 2012, Oracle and/or its affiliates.
|
||||
Copyright (c) 2009, 2020, MariaDB
|
||||
Copyright (c) 2009, 2022, MariaDB
|
||||
|
||||
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
|
||||
@@ -102,6 +102,7 @@ enum options_client
|
||||
OPT_IGNORE_DATA,
|
||||
OPT_PRINT_ROW_COUNT, OPT_PRINT_ROW_EVENT_POSITIONS,
|
||||
OPT_CHECK_IF_UPGRADE_NEEDED,
|
||||
OPT_COMPATIBILTY_CLEARTEXT_PLUGIN,
|
||||
OPT_SHUTDOWN_WAIT_FOR_SLAVES,
|
||||
OPT_COPY_S3_TABLES,
|
||||
OPT_PRINT_TABLE_METADATA,
|
||||
|
@@ -1660,6 +1660,8 @@ static struct my_option my_long_options[] =
|
||||
&delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"execute", 'e', "Execute command and quit. (Disables --force and history file.)", 0,
|
||||
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"enable-cleartext-plugin", OPT_COMPATIBILTY_CLEARTEXT_PLUGIN, "Obsolete option. Exists only for MySQL compatibility.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"vertical", 'E', "Print the output of a query (rows) vertically.",
|
||||
&vertical, &vertical, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0,
|
||||
0},
|
||||
@@ -1969,6 +1971,14 @@ get_one_option(const struct my_option *opt, const char *argument, const char *fi
|
||||
printf("WARNING: --server-arg option not supported in this configuration.\n");
|
||||
#endif
|
||||
break;
|
||||
case OPT_COMPATIBILTY_CLEARTEXT_PLUGIN:
|
||||
/*
|
||||
This option exists in MySQL client but not in MariaDB. Users switching from
|
||||
MySQL might still have this option in their commands, and it will not work
|
||||
in MariaDB unless it is handled. Therefore output a warning and continue.
|
||||
*/
|
||||
printf("WARNING: option '--enable-cleartext-plugin' is obsolete.\n");
|
||||
break;
|
||||
case 'A':
|
||||
opt_rehash= 0;
|
||||
break;
|
||||
|
@@ -1997,11 +1997,10 @@ static void DBUGOpenFile(CODE_STATE *cs,
|
||||
static void DBUGCloseFile(CODE_STATE *cs, sFILE *new_value)
|
||||
{
|
||||
sFILE *fp;
|
||||
if (!cs || !cs->stack || !cs->stack->out_file)
|
||||
if (!cs || !cs->stack || !(fp= cs->stack->out_file))
|
||||
return;
|
||||
|
||||
fp= cs->stack->out_file;
|
||||
if (--fp->used == 0)
|
||||
if (fp != sstdout && fp != sstderr && --fp->used == 0)
|
||||
{
|
||||
if (fclose(fp->file) == EOF)
|
||||
{
|
||||
|
@@ -1,5 +1,6 @@
|
||||
/******************************************************
|
||||
Copyright (c) 2011-2013 Percona LLC and/or its affiliates.
|
||||
Copyright (c) 2022, MariaDB Corporation.
|
||||
|
||||
Compressing datasink implementation for XtraBackup.
|
||||
|
||||
@@ -32,11 +33,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
|
||||
typedef struct {
|
||||
pthread_t id;
|
||||
uint num;
|
||||
pthread_mutex_t ctrl_mutex;
|
||||
pthread_cond_t ctrl_cond;
|
||||
pthread_mutex_t data_mutex;
|
||||
pthread_cond_t data_cond;
|
||||
my_bool started;
|
||||
my_bool data_avail;
|
||||
my_bool cancelled;
|
||||
const char *from;
|
||||
@@ -206,14 +204,13 @@ compress_write(ds_file_t *file, const uchar *buf, size_t len)
|
||||
|
||||
thd = threads + i;
|
||||
|
||||
pthread_mutex_lock(&thd->ctrl_mutex);
|
||||
pthread_mutex_lock(&thd->data_mutex);
|
||||
|
||||
chunk_len = (len > COMPRESS_CHUNK_SIZE) ?
|
||||
COMPRESS_CHUNK_SIZE : len;
|
||||
thd->from = ptr;
|
||||
thd->from_len = chunk_len;
|
||||
|
||||
pthread_mutex_lock(&thd->data_mutex);
|
||||
thd->data_avail = TRUE;
|
||||
pthread_cond_signal(&thd->data_cond);
|
||||
pthread_mutex_unlock(&thd->data_mutex);
|
||||
@@ -239,26 +236,24 @@ compress_write(ds_file_t *file, const uchar *buf, size_t len)
|
||||
|
||||
xb_a(threads[i].to_len > 0);
|
||||
|
||||
if (ds_write(dest_file, "NEWBNEWB", 8) ||
|
||||
write_uint64_le(dest_file,
|
||||
comp_file->bytes_processed)) {
|
||||
msg("compress: write to the destination stream "
|
||||
"failed.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool fail = ds_write(dest_file, "NEWBNEWB", 8) ||
|
||||
write_uint64_le(dest_file,
|
||||
comp_file->bytes_processed);
|
||||
comp_file->bytes_processed += threads[i].from_len;
|
||||
|
||||
if (write_uint32_le(dest_file, threads[i].adler) ||
|
||||
ds_write(dest_file, threads[i].to,
|
||||
threads[i].to_len)) {
|
||||
msg("compress: write to the destination stream "
|
||||
"failed.");
|
||||
return 1;
|
||||
if (!fail) {
|
||||
fail = write_uint32_le(dest_file, threads[i].adler) ||
|
||||
ds_write(dest_file, threads[i].to,
|
||||
threads[i].to_len);
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&threads[i].data_mutex);
|
||||
pthread_mutex_unlock(&threads[i].ctrl_mutex);
|
||||
|
||||
if (fail) {
|
||||
msg("compress: write to the destination stream "
|
||||
"failed.");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,6 +323,23 @@ write_uint64_le(ds_file_t *file, ulonglong n)
|
||||
return ds_write(file, tmp, sizeof(tmp));
|
||||
}
|
||||
|
||||
static
|
||||
void
|
||||
destroy_worker_thread(comp_thread_ctxt_t *thd)
|
||||
{
|
||||
pthread_mutex_lock(&thd->data_mutex);
|
||||
thd->cancelled = TRUE;
|
||||
pthread_cond_signal(&thd->data_cond);
|
||||
pthread_mutex_unlock(&thd->data_mutex);
|
||||
|
||||
pthread_join(thd->id, NULL);
|
||||
|
||||
pthread_cond_destroy(&thd->data_cond);
|
||||
pthread_mutex_destroy(&thd->data_mutex);
|
||||
|
||||
my_free(thd->to);
|
||||
}
|
||||
|
||||
static
|
||||
comp_thread_ctxt_t *
|
||||
create_worker_threads(uint n)
|
||||
@@ -342,53 +354,31 @@ create_worker_threads(uint n)
|
||||
comp_thread_ctxt_t *thd = threads + i;
|
||||
|
||||
thd->num = i + 1;
|
||||
thd->started = FALSE;
|
||||
thd->cancelled = FALSE;
|
||||
thd->data_avail = FALSE;
|
||||
|
||||
thd->to = (char *) my_malloc(PSI_NOT_INSTRUMENTED,
|
||||
COMPRESS_CHUNK_SIZE + MY_QLZ_COMPRESS_OVERHEAD, MYF(MY_FAE));
|
||||
|
||||
/* Initialize the control mutex and condition var */
|
||||
if (pthread_mutex_init(&thd->ctrl_mutex, NULL) ||
|
||||
pthread_cond_init(&thd->ctrl_cond, NULL)) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Initialize and data mutex and condition var */
|
||||
if (pthread_mutex_init(&thd->data_mutex, NULL) ||
|
||||
pthread_cond_init(&thd->data_cond, NULL)) {
|
||||
goto err;
|
||||
}
|
||||
|
||||
pthread_mutex_lock(&thd->ctrl_mutex);
|
||||
|
||||
if (pthread_create(&thd->id, NULL, compress_worker_thread_func,
|
||||
thd)) {
|
||||
msg("compress: pthread_create() failed: "
|
||||
"errno = %d", errno);
|
||||
pthread_mutex_unlock(&thd->ctrl_mutex);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait for the threads to start */
|
||||
for (i = 0; i < n; i++) {
|
||||
comp_thread_ctxt_t *thd = threads + i;
|
||||
|
||||
while (thd->started == FALSE)
|
||||
pthread_cond_wait(&thd->ctrl_cond, &thd->ctrl_mutex);
|
||||
pthread_mutex_unlock(&thd->ctrl_mutex);
|
||||
}
|
||||
|
||||
return threads;
|
||||
|
||||
err:
|
||||
while (i > 0) {
|
||||
comp_thread_ctxt_t *thd;
|
||||
i--;
|
||||
thd = threads + i;
|
||||
pthread_mutex_unlock(&thd->ctrl_mutex);
|
||||
for (; i; i--) {
|
||||
destroy_worker_thread(threads + i);
|
||||
}
|
||||
|
||||
my_free(threads);
|
||||
@@ -402,21 +392,7 @@ destroy_worker_threads(comp_thread_ctxt_t *threads, uint n)
|
||||
uint i;
|
||||
|
||||
for (i = 0; i < n; i++) {
|
||||
comp_thread_ctxt_t *thd = threads + i;
|
||||
|
||||
pthread_mutex_lock(&thd->data_mutex);
|
||||
threads[i].cancelled = TRUE;
|
||||
pthread_cond_signal(&thd->data_cond);
|
||||
pthread_mutex_unlock(&thd->data_mutex);
|
||||
|
||||
pthread_join(thd->id, NULL);
|
||||
|
||||
pthread_cond_destroy(&thd->data_cond);
|
||||
pthread_mutex_destroy(&thd->data_mutex);
|
||||
pthread_cond_destroy(&thd->ctrl_cond);
|
||||
pthread_mutex_destroy(&thd->ctrl_mutex);
|
||||
|
||||
my_free(thd->to);
|
||||
destroy_worker_thread(threads + i);
|
||||
}
|
||||
|
||||
my_free(threads);
|
||||
@@ -428,19 +404,9 @@ compress_worker_thread_func(void *arg)
|
||||
{
|
||||
comp_thread_ctxt_t *thd = (comp_thread_ctxt_t *) arg;
|
||||
|
||||
pthread_mutex_lock(&thd->ctrl_mutex);
|
||||
|
||||
pthread_mutex_lock(&thd->data_mutex);
|
||||
|
||||
thd->started = TRUE;
|
||||
pthread_cond_signal(&thd->ctrl_cond);
|
||||
|
||||
pthread_mutex_unlock(&thd->ctrl_mutex);
|
||||
|
||||
while (1) {
|
||||
thd->data_avail = FALSE;
|
||||
pthread_cond_signal(&thd->data_cond);
|
||||
|
||||
while (!thd->data_avail && !thd->cancelled) {
|
||||
pthread_cond_wait(&thd->data_cond, &thd->data_mutex);
|
||||
}
|
||||
|
@@ -580,8 +580,8 @@ void CorruptedPages::zero_out_free_pages()
|
||||
space_it->second.pages.begin();
|
||||
page_it != space_it->second.pages.end(); ++page_it)
|
||||
{
|
||||
bool is_free= fseg_page_is_free(space, *page_it);
|
||||
if (!is_free) {
|
||||
if (fseg_page_is_allocated(space, *page_it))
|
||||
{
|
||||
space_info_t &space_info = non_free_pages[space_id];
|
||||
space_info.pages.insert(*page_it);
|
||||
if (space_info.space_name.empty())
|
||||
|
17
man/mysql.1
17
man/mysql.1
@@ -18,7 +18,7 @@
|
||||
.\" SQL scripts
|
||||
.\" batch SQL files
|
||||
.SH "NAME"
|
||||
mysql \- the MariaDB command\-line tool
|
||||
mariadb \- the MariaDB command\-line tool (mysql is now a symlink to mariadb)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\ 'u
|
||||
\fBmysql [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR
|
||||
@@ -507,6 +507,21 @@ the section called \(lqMYSQL COMMANDS\(rq\&.
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysql: enable cleartext plugin option
|
||||
.\" enable cleartext plugin option: mysql
|
||||
\fB\-\-enable\-cleartext\-plugin\fR
|
||||
.sp
|
||||
Obsolete option\&. Exists only for MySQL compatibility\&.
|
||||
.RE
|
||||
.sp
|
||||
.RS 4
|
||||
.ie n \{\
|
||||
\h'-04'\(bu\h'+03'\c
|
||||
.\}
|
||||
.el \{\
|
||||
.sp -1
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
.\" mysql: execute option
|
||||
.\" execute option: mysql
|
||||
\fB\-\-execute=\fR\fB\fIstatement\fR\fR,
|
||||
|
@@ -14,9 +14,9 @@
|
||||
.\" mysql_client_test
|
||||
.\" mysql_client_test_embedded
|
||||
.SH "NAME"
|
||||
mysql_client_test \- test client API
|
||||
mariadb-client-test \- test client API (mysql_client_test is now a symlink to mariadb-client-test)
|
||||
.br
|
||||
mysql_client_test_embedded \- test client API for embedded server
|
||||
mariadb-client-test-embedded \- test client API for embedded server (mysql_client_test_embedded is now a symlink to mariadb-client-test-embedded)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_client_test\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fItest_name\fR\fR\fB]\ \&.\&.\&.\fR\ 'u
|
||||
\fBmysql_client_test [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fItest_name\fR\fR\fB] \&.\&.\&.\fR
|
||||
|
@@ -13,7 +13,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysql_convert_table_format
|
||||
.SH "NAME"
|
||||
mysql_convert_table_format \- convert tables to use a given storage engine
|
||||
mariadb-convert-table-format \- convert tables to use a given storage engine (mysql_convert_table_format is now a symlink to mariadb-convert-table-format)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_convert_table_format\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\ 'u
|
||||
\fBmysql_convert_table_format [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR
|
||||
|
@@ -13,7 +13,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysql_find_rows
|
||||
.SH "NAME"
|
||||
mysql_find_rows \- extract SQL statements from files
|
||||
mariadb-find-rows \- extract SQL statements from files (mysql_find_rows is now a symlink to mariadb-find-rows)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_find_rows\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIfile_name\fR\fR\fB\ \&.\&.\&.]\fR\ 'u
|
||||
\fBmysql_find_rows [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIfile_name\fR\fR\fB \&.\&.\&.]\fR
|
||||
|
@@ -13,7 +13,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysql_fix_extensions
|
||||
.SH "NAME"
|
||||
mysql_fix_extensions \- normalize table file name extensions
|
||||
mariadb-fix-extensions \- normalize table file name extensions (mysql_fix_extensions is now a symlink to mariadb-fix-extensions)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_fix_extensions\ \fR\fB\fIdata_dir\fR\fR\ 'u
|
||||
\fBmysql_fix_extensions \fR\fB\fIdata_dir\fR\fR
|
||||
|
@@ -13,7 +13,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysql_install_db
|
||||
.SH "NAME"
|
||||
mysql_install_db \- initialize MariaDB data directory
|
||||
mariadb-install-db \- initialize MariaDB data directory (mysql_install_db is now a symlink to mariadb-install-db)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_install_db\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
|
||||
\fBmysql_install_db [\fR\fB\fIoptions\fR\fR\fB]\fR
|
||||
|
@@ -9,7 +9,7 @@
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH NAME
|
||||
mysql_ldb \- RocksDB tool
|
||||
mariadb-ldb \- RocksDB tool (mysql_ldb is now a symlink to mariadb-ldb)
|
||||
.SH DESCRIPTION
|
||||
Use \fBmysql_ldb \-\-help\fR for details on usage\.
|
||||
.PP
|
||||
|
@@ -22,7 +22,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysql_plugin
|
||||
.SH "NAME"
|
||||
mysql_plugin \- configure MariaDB server plugins
|
||||
mariadb-plugin \- configure MariaDB server plugins (mysql_plugin is now a symlink to mariadb-plugin)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_plugin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIplugin\fR\fR\fB\ {ENABLE|DISABLE}\fR\ 'u
|
||||
\fBmysql_plugin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIplugin\fR\fR\fB {ENABLE|DISABLE}\fR
|
||||
|
@@ -13,7 +13,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysql_secure_installation
|
||||
.SH "NAME"
|
||||
mysql_secure_installation \- improve MariaDB installation security
|
||||
mariadb-secure-installation \- improve MariaDB installation security (mysql_secure_installation is now a symlink to mariadb-secure-installation)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_secure_installation\fR\ 'u
|
||||
\fBmysql_secure_installation\fR
|
||||
|
@@ -13,7 +13,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysql_setpermission
|
||||
.SH "NAME"
|
||||
mysql_setpermission \- interactively set permissions in grant tables
|
||||
mariadb-setpermission \- interactively set permissions in grant tables (mysql_setpermission is now a symlink to mariadb-setpermission)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_setpermission\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
|
||||
\fBmysql_setpermission [\fR\fB\fIoptions\fR\fR\fB]\fR
|
||||
|
@@ -14,7 +14,7 @@
|
||||
.\" mysql_tzinfo_to_sql
|
||||
.\" time zone tables
|
||||
.SH "NAME"
|
||||
mysql_tzinfo_to_sql \- load the time zone tables
|
||||
mariadb-tzinfo-to-sql \- load the time zone tables (mysql_tzinfo_to_sql is now a symlink to mariadb-tzinfo-to-sql)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_tzinfo_to_sql\ \fR\fB\fIarguments\fR\fR\ 'u
|
||||
\fBmysql_tzinfo_to_sql \fR\fB\fIarguments\fR\fR
|
||||
|
@@ -15,7 +15,7 @@
|
||||
.\" upgrading MySQL
|
||||
.\" MySQL: upgrading
|
||||
.SH "NAME"
|
||||
mysql_upgrade \- check tables for MariaDB upgrade
|
||||
mariadb-upgrade \- check tables for MariaDB upgrade (mysql_upgrade is now a symlink to mariadb-upgrade)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_upgrade\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
|
||||
\fBmysql_upgrade [\fR\fB\fIoptions\fR\fR\fB]\fR
|
||||
|
@@ -13,7 +13,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysql_waitpid
|
||||
.SH "NAME"
|
||||
mysql_waitpid \- kill process and wait for its termination
|
||||
mariadb-waitpid \- kill process and wait for its termination (mysql_waitpid is now a symlink to mariadb-waitpid)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysql_waitpid\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIpid\fR\fR\fB\ \fR\fB\fIwait_time\fR\fR\ 'u
|
||||
\fBmysql_waitpid [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIpid\fR\fR\fB \fR\fB\fIwait_time\fR\fR
|
||||
|
@@ -13,7 +13,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysqlaccess
|
||||
.SH "NAME"
|
||||
mysqlaccess \- client for checking access privileges
|
||||
mariadb-access \- client for checking access privileges (mysqlaccess is now a symlink to mariadb-access)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqlaccess\ [\fR\fB\fIhost_name\fR\fR\fB\ [\fR\fB\fIuser_name\fR\fR\fB\ [\fR\fB\fIdb_name\fR\fR\fB]]]\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
|
||||
\fBmysqlaccess [\fR\fB\fIhost_name\fR\fR\fB [\fR\fB\fIuser_name\fR\fR\fB [\fR\fB\fIdb_name\fR\fR\fB]]] [\fR\fB\fIoptions\fR\fR\fB]\fR
|
||||
|
@@ -15,7 +15,7 @@
|
||||
.\" administration: server
|
||||
.\" server administration
|
||||
.SH "NAME"
|
||||
mysqladmin \- client for administering a MariaDB server
|
||||
mariadb-admin \- client for administering a MariaDB server (mysqladmin is now a symlink to mariadb-admin)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqladmin\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-arg\fR\fR\fB]\ [\fR\fB\fIcommand\fR\fR\fB\ [\fR\fB\fIcommand\-arg\fR\fR\fB]]\ \&.\&.\&.\fR\ 'u
|
||||
\fBmysqladmin [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB] [\fR\fB\fIcommand\fR\fR\fB [\fR\fB\fIcommand\-arg\fR\fR\fB]] \&.\&.\&.\fR
|
||||
|
@@ -13,7 +13,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysqlbinlog
|
||||
.SH "NAME"
|
||||
mysqlbinlog \- utility for processing binary log files
|
||||
mariadb-binlog \- utility for processing binary log files (mysqlbinlog is now a symlink to mariadb-binlog)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqlbinlog\ [\fR\fBoptions\fR\fB]\ \fR\fB\fIlog_file\fR\fR\fB\ \&.\&.\&.\fR\ 'u
|
||||
\fBmysqlbinlog [\fR\fBoptions\fR\fB] \fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.\fR
|
||||
|
@@ -17,7 +17,7 @@
|
||||
.\" tables: maintenance
|
||||
.\" tables: repair
|
||||
.SH "NAME"
|
||||
mysqlcheck \- a table maintenance program
|
||||
mariadb-check \- a table maintenance program (mysqlcheck is now a symlink to mariadb-check)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqlcheck\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ \&.\&.\&.]]\fR\ 'u
|
||||
\fBmysqlcheck [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]]\fR
|
||||
|
@@ -14,7 +14,7 @@
|
||||
.\" mysqld: MariaDB server
|
||||
.\" MariaDB server: mysqld
|
||||
.SH "NAME"
|
||||
mysqld \- the MariaDB server
|
||||
mariadbd \- the MariaDB server (mysqld is now a symlink to mariadbd)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqld\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
|
||||
\fBmysqld [\fR\fB\fIoptions\fR\fR\fB]\fR
|
||||
|
@@ -1,6 +1,6 @@
|
||||
'\" t
|
||||
.\"
|
||||
.TH "\FBMARIADB-MULTI\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
|
||||
.TH "\FBMARIADBD-MULTI\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -16,7 +16,7 @@
|
||||
.\" scripts
|
||||
.\" multi mysqld
|
||||
.SH "NAME"
|
||||
mysqld_multi \- manage multiple MariaDB servers
|
||||
mariadbd-multi \- manage multiple MariaDB servers (mysqld_multi is now a symlink to mariadbd-multi)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqld_multi\ [\fR\fB\fIoptions\fR\fR\fB]\ {start|stop|report}\ [\fR\fB\fIGNR\fR\fR\fB[,\fR\fB\fIGNR\fR\fR\fB]\ \&.\&.\&.]\fR\ 'u
|
||||
\fBmysqld_multi [\fR\fB\fIoptions\fR\fR\fB] {start|stop|report} [\fR\fB\fIGNR\fR\fR\fB[,\fR\fB\fIGNR\fR\fR\fB] \&.\&.\&.]\fR
|
||||
|
@@ -1,6 +1,6 @@
|
||||
'\" t
|
||||
.\"
|
||||
.TH "\FBMARIADB-SAFE\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
|
||||
.TH "\FBMARIADBD-SAFE\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -15,7 +15,7 @@
|
||||
.\" tools: mysqld_safe
|
||||
.\" scripts
|
||||
.SH "NAME"
|
||||
mysqld_safe \- MariaDB server startup script
|
||||
mariadbd-safe \- MariaDB server startup script (mysqld_safe is now a symlink to mariadbd-safe)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqld_safe\ \fR\fB\fIoptions\fR\fR\ 'u
|
||||
\fBmysqld_safe \fR\fB\fIoptions\fR\fR
|
||||
|
@@ -1,6 +1,6 @@
|
||||
'\" t
|
||||
.\"
|
||||
.TH "\FBMARIADB-SAFE-HELPER\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
|
||||
.TH "\FBMARIADBD-SAFE-HELPER\FR" "1" "15 May 2020" "MariaDB 10\&.10" "MariaDB Database System"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * set default formatting
|
||||
.\" -----------------------------------------------------------------
|
||||
@@ -9,7 +9,7 @@
|
||||
.\" disable justification (adjust text to left margin only)
|
||||
.ad l
|
||||
.SH NAME
|
||||
mysqld_safe_helper \- helper script
|
||||
mariadbd-safe-helper \- helper script (mysqld_safe_helper is now a symlink to mariadbd-safe-helper)
|
||||
.SH DESCRIPTION
|
||||
Use: Helper script\.
|
||||
.PP
|
||||
|
@@ -17,7 +17,7 @@
|
||||
.\" databases: dumping
|
||||
.\" tables: dumping
|
||||
.SH "NAME"
|
||||
mysqldump \- a database backup program
|
||||
mariadb-dump \- a database backup program (mysqldump is now a symlink to mariadb-dump)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqldump\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ \&.\&.\&.]]\fR\ 'u
|
||||
\fBmysqldump [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB \&.\&.\&.]]\fR
|
||||
|
@@ -13,7 +13,7 @@
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" mysqldumpslow
|
||||
.SH "NAME"
|
||||
mysqldumpslow \- Summarize slow query log files
|
||||
mariadb-dumpslow \- Summarize slow query log files (mysqldumpslow is now a symlink to mariadb-dumpslow)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqldumpslow\ [\fR\fBoptions\fR\fB]\ [\fR\fB\fIlog_file\fR\fR\fB\ \&.\&.\&.]\fR\ 'u
|
||||
\fBmysqldumpslow [\fR\fBoptions\fR\fB] [\fR\fB\fIlog_file\fR\fR\fB \&.\&.\&.]\fR
|
||||
|
@@ -17,7 +17,7 @@
|
||||
.\" databases: dumping
|
||||
.\" tables: dumping
|
||||
.SH "NAME"
|
||||
mysqlhotcopy \- a database backup program
|
||||
mariadb-hotcopy \- a database backup program (mysqlhotcopy is now a symlink to mariadb-hotcopy)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqlhotcopy\ \fR\fB\fIarguments\fR\fR\ 'u
|
||||
\fBmysqlhotcopy \fR\fB\fIarguments\fR\fR
|
||||
|
@@ -17,7 +17,7 @@
|
||||
.\" files: text
|
||||
.\" text files: importing
|
||||
.SH "NAME"
|
||||
mysqlimport \- a data import program
|
||||
mariadb-import \- a data import program (mysqlimport is now a symlink to mariadb-import)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqlimport\ [\fR\fB\fIoptions\fR\fR\fB]\ \fR\fB\fIdb_name\fR\fR\fB\ \fR\fB\fItextfile1\fR\fR\fB\ \&.\&.\&.\fR\ 'u
|
||||
\fBmysqlimport [\fR\fB\fIoptions\fR\fR\fB] \fR\fB\fIdb_name\fR\fR\fB \fR\fB\fItextfile1\fR\fR\fB \&.\&.\&.\fR
|
||||
|
@@ -18,7 +18,7 @@
|
||||
.\" columns: displaying
|
||||
.\" showing: database information
|
||||
.SH "NAME"
|
||||
mysqlshow \- display database, table, and column information
|
||||
mariadb-show \- display database, table, and column information (mysqlshow is now a symlink to mariadb-show)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqlshow\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIdb_name\fR\fR\fB\ [\fR\fB\fItbl_name\fR\fR\fB\ [\fR\fB\fIcol_name\fR\fR\fB]]]\fR\ 'u
|
||||
\fBmysqlshow [\fR\fB\fIoptions\fR\fR\fB] [\fR\fB\fIdb_name\fR\fR\fB [\fR\fB\fItbl_name\fR\fR\fB [\fR\fB\fIcol_name\fR\fR\fB]]]\fR
|
||||
|
@@ -14,7 +14,7 @@
|
||||
.\" mysqlslap
|
||||
.\" load emulation
|
||||
.SH "NAME"
|
||||
mysqlslap \- load emulation client
|
||||
mariadb-slap \- load emulation client (mysqlslap is now a symlink to mariadb-slap)
|
||||
.SH "SYNOPSIS"
|
||||
.HP \w'\fBmysqlslap\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u
|
||||
\fBmysqlslap [\fR\fB\fIoptions\fR\fR\fB]\fR
|
||||
|
@@ -14,7 +14,7 @@
|
||||
.\" mysqltest
|
||||
.\" mysqltest_embedded
|
||||
.SH "NAME"
|
||||
mysqltest \- program to run test cases
|
||||
mariadb-test \- program to run test cases (mysqltest is now a symlink to mariadb-test)
|
||||
.br
|
||||
mysqltest_embedded \- program to run embedded test cases
|
||||
.SH "SYNOPSIS"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
--require include/not_valgrind.require
|
||||
--disable_query_log
|
||||
eval select $VALGRIND_TEST as using_valgrind;
|
||||
eval select $VALGRIND_TEST+0 as using_valgrind;
|
||||
--enable_query_log
|
||||
|
@@ -1,5 +1,3 @@
|
||||
drop table if exists t1,t2;
|
||||
drop database if exists mysqltest;
|
||||
set @save_max_allowed_packet=@@global.max_allowed_packet;
|
||||
create table t1 (
|
||||
col1 int not null auto_increment primary key,
|
||||
@@ -2588,22 +2586,6 @@ set max_statement_time= 0;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
#
|
||||
# MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
|
||||
#
|
||||
set @save_default_engine= @@default_storage_engine;
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
set @@default_storage_engine= @save_default_engine;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
#
|
||||
@@ -2650,296 +2632,6 @@ DROP TABLE t1;
|
||||
# End of 10.4 tests
|
||||
#
|
||||
#
|
||||
# MDEV-16290 ALTER TABLE ... RENAME COLUMN syntax
|
||||
#
|
||||
SET @save_default_engine= @@DEFAULT_STORAGE_ENGINE;
|
||||
CREATE TABLE t1(a INT, b VARCHAR(30), c FLOAT);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`c` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES(1,'abcd',1.234);
|
||||
CREATE TABLE t2(a INT, b VARCHAR(30), c FLOAT) ENGINE=MyIsam;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`c` float DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
INSERT INTO t2 VALUES(1,'abcd',1.234);
|
||||
ALTER TABLE t1 RENAME COLUMN a TO a;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`c` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN a TO m;
|
||||
ALTER TABLE t1 RENAME COLUMN a TO m;
|
||||
ERROR 42S22: Unknown column 'a' in 't1'
|
||||
ALTER TABLE t1 RENAME COLUMN IF EXISTS a TO m;
|
||||
Warnings:
|
||||
Note 1054 Unknown column 'a' in 't1'
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`m` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`c` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t1;
|
||||
m b c
|
||||
1 abcd 1.234
|
||||
ALTER TABLE t1 RENAME COLUMN m TO x,
|
||||
RENAME COLUMN b TO y,
|
||||
RENAME COLUMN c TO z;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`x` int(11) DEFAULT NULL,
|
||||
`y` varchar(30) DEFAULT NULL,
|
||||
`z` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t1;
|
||||
x y z
|
||||
1 abcd 1.234
|
||||
ALTER TABLE t2 RENAME COLUMN a TO d, RENAME COLUMN b TO e, RENAME COLUMN c to f;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`d` int(11) DEFAULT NULL,
|
||||
`e` varchar(30) DEFAULT NULL,
|
||||
`f` float DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
d e f
|
||||
1 abcd 1.234
|
||||
ALTER TABLE t1 CHANGE COLUMN x a INT, RENAME COLUMN y TO b;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`z` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 CHANGE COLUMN z c DOUBLE, RENAME COLUMN b to b;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`c` double DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 CHANGE COLUMN a b int, RENAME COLUMN b TO c, CHANGE COLUMN c d FLOAT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` varchar(30) DEFAULT NULL,
|
||||
`d` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 ADD COLUMN zz INT, RENAME COLUMN d TO f;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` varchar(30) DEFAULT NULL,
|
||||
`f` float DEFAULT NULL,
|
||||
`zz` int(11) DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 DROP COLUMN zz, RENAME COLUMN c TO zz;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`zz` varchar(30) DEFAULT NULL,
|
||||
`f` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN zz to c, DROP COLUMN f;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` varchar(30) DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 ADD COLUMN d INT DEFAULT 5, RENAME COLUMN c TO b, DROP COLUMN b;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`d` int(11) DEFAULT 5
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN b TO d, RENAME COLUMN d TO b;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT 5
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 ADD KEY(b);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT 5,
|
||||
KEY `b` (`b`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN b TO bb;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`bb` int(11) DEFAULT 5,
|
||||
KEY `b` (`bb`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t1;
|
||||
d bb
|
||||
abcd 5
|
||||
CREATE TABLE t3(a int, b int, KEY(b));
|
||||
ALTER TABLE t3 ADD CONSTRAINT FOREIGN KEY(b) REFERENCES t1(bb);
|
||||
SHOW CREATE TABLE t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL,
|
||||
KEY `b` (`b`),
|
||||
CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`bb`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN bb TO b;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT 5,
|
||||
KEY `b` (`b`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t3 RENAME COLUMN b TO c;
|
||||
SHOW CREATE TABLE t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`c` int(11) DEFAULT NULL,
|
||||
KEY `b` (`c`),
|
||||
CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`b`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
CREATE TABLE t4(a int);
|
||||
ALTER TABLE t4 RENAME COLUMN a TO aa, ALGORITHM = INPLACE;
|
||||
SHOW CREATE TABLE t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`aa` int(11) DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t4 RENAME COLUMN aa TO a, ALGORITHM = COPY;
|
||||
SHOW CREATE TABLE t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
DROP TABLE t4;
|
||||
CREATE VIEW v1 AS SELECT d,e,f FROM t2;
|
||||
CREATE TRIGGER trg1 BEFORE UPDATE on t2 FOR EACH ROW SET NEW.d=OLD.d + 10;
|
||||
CREATE PROCEDURE sp1() INSERT INTO t2(d) VALUES(10);
|
||||
ALTER TABLE t2 RENAME COLUMN d TO g;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`g` int(11) DEFAULT NULL,
|
||||
`e` varchar(30) DEFAULT NULL,
|
||||
`f` float DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t2`.`d` AS `d`,`test`.`t2`.`e` AS `e`,`test`.`t2`.`f` AS `f` from `t2` koi8r koi8r_general_ci
|
||||
Warnings:
|
||||
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
SELECT * FROM v1;
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
UPDATE t2 SET f = f + 10;
|
||||
ERROR 42S22: Unknown column 'd' in 'OLD'
|
||||
CALL sp1();
|
||||
ERROR 42S22: Unknown column 'd' in 'field list'
|
||||
DROP TRIGGER trg1;
|
||||
DROP PROCEDURE sp1;
|
||||
CREATE TABLE t_gen(a INT, b DOUBLE GENERATED ALWAYS AS (SQRT(a)));
|
||||
INSERT INTO t_gen(a) VALUES(4);
|
||||
SELECT * FROM t_gen;
|
||||
a b
|
||||
4 2
|
||||
SHOW CREATE TABLE t_gen;
|
||||
Table Create Table
|
||||
t_gen CREATE TABLE `t_gen` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` double GENERATED ALWAYS AS (sqrt(`a`)) VIRTUAL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t_gen RENAME COLUMN a TO c, CHANGE COLUMN b b DOUBLE GENERATED ALWAYS AS (SQRT(c));
|
||||
SELECT * FROM t_gen;
|
||||
c b
|
||||
4 2
|
||||
SHOW CREATE TABLE t_gen;
|
||||
Table Create Table
|
||||
t_gen CREATE TABLE `t_gen` (
|
||||
`c` int(11) DEFAULT NULL,
|
||||
`b` double GENERATED ALWAYS AS (sqrt(`c`)) VIRTUAL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t_gen CHANGE COLUMN c x INT;
|
||||
show create table t_gen;
|
||||
Table Create Table
|
||||
t_gen CREATE TABLE `t_gen` (
|
||||
`x` int(11) DEFAULT NULL,
|
||||
`b` double GENERATED ALWAYS AS (sqrt(`x`)) VIRTUAL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t_gen RENAME COLUMN x TO a;
|
||||
DROP TABLE t_gen;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT 5,
|
||||
KEY `b` (`b`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN b z;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'z' at line 1
|
||||
ALTER TABLE t1 RENAME COLUMN FROM b TO z;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM b TO z' at line 1
|
||||
ALTER TABLE t1 RENAME COLUMN b TO 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1' at line 1
|
||||
ALTER TABLE t1 RENAME COLUMN b TO e, RENAME COLUMN c TO e;
|
||||
ERROR 42S22: Unknown column 'c' in 't1'
|
||||
ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN b TO z;
|
||||
ERROR 42S21: Duplicate column name 'z'
|
||||
ALTER TABLE t1 DROP COLUMN b, RENAME COLUMN b TO z;
|
||||
ERROR 42S22: Unknown column 'b' in 't1'
|
||||
ALTER TABLE t1 RENAME COLUMN b TO b, RENAME COLUMN b TO b;
|
||||
ERROR 42S22: Unknown column 'b' in 't1'
|
||||
ALTER TABLE t1 RENAME COLUMN b TO c3, DROP COLUMN c3;
|
||||
ERROR 42000: Can't DROP COLUMN `c3`; check that it exists
|
||||
ALTER TABLE t1 ADD COLUMN z INT, CHANGE COLUMN z y INT, DROP COLUMN y;
|
||||
ERROR 42S22: Unknown column 'z' in 't1'
|
||||
ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN z TO y, DROP COLUMN y;
|
||||
ERROR 42S22: Unknown column 'z' in 't1'
|
||||
ALTER TABLE t1 RENAME COLUMN b TO `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn`;
|
||||
ERROR 42000: Incorrect column name 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn'
|
||||
ALTER TABLE t1 CHANGE b `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn` int;
|
||||
ERROR 42000: Identifier name 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn' is too long
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT 5,
|
||||
KEY `b` (`b`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t1;
|
||||
d b
|
||||
abcd 5
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t3,t1,t2;
|
||||
SET DEFAULT_STORAGE_ENGINE= @save_default_engine;
|
||||
#
|
||||
# MDEV-7318 RENAME INDEX
|
||||
#
|
||||
#
|
||||
@@ -3389,22 +3081,6 @@ t1 CREATE TABLE `t1` (
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
#
|
||||
# MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
|
||||
#
|
||||
set @save_default_engine= @@default_storage_engine;
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
set @@default_storage_engine= @save_default_engine;
|
||||
#
|
||||
# MDEV-25555 Server crashes in tree_record_pos after INPLACE-recreating index on HEAP table
|
||||
#
|
||||
create table t1 (a int, key idx1(a), key idx2 using btree(a)) engine=memory;
|
||||
|
@@ -2,10 +2,6 @@
|
||||
#
|
||||
# Test of alter table
|
||||
#
|
||||
--disable_warnings
|
||||
drop table if exists t1,t2;
|
||||
drop database if exists mysqltest;
|
||||
--enable_warnings
|
||||
set @save_max_allowed_packet=@@global.max_allowed_packet;
|
||||
|
||||
create table t1 (
|
||||
@@ -2099,47 +2095,6 @@ set max_statement_time= 0;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
|
||||
--echo #
|
||||
set @save_default_engine= @@default_storage_engine;
|
||||
--disable_query_log
|
||||
if ($MTR_COMBINATION_INNODB)
|
||||
{
|
||||
set default_storage_engine= innodb;
|
||||
}
|
||||
if ($MTR_COMBINATION_ARIA)
|
||||
{
|
||||
set default_storage_engine= aria;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
if (!$MTR_COMBINATION_INNODB)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
# There is no inplace ADD INDEX for MyISAM/Aria:
|
||||
create or replace table t1 (x int);
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add unique (x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add primary key(x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add index(x), algorithm=inplace;
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
# cleanup
|
||||
drop table t1;
|
||||
set @@default_storage_engine= @save_default_engine;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
@@ -2192,205 +2147,6 @@ DROP TABLE t1;
|
||||
--echo # End of 10.4 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-16290 ALTER TABLE ... RENAME COLUMN syntax
|
||||
--echo #
|
||||
SET @save_default_engine= @@DEFAULT_STORAGE_ENGINE;
|
||||
--disable_query_log
|
||||
if ($MTR_COMBINATION_INNODB)
|
||||
{
|
||||
SET DEFAULT_STORAGE_ENGINE= INNODB;
|
||||
}
|
||||
if ($MTR_COMBINATION_ARIA)
|
||||
{
|
||||
SET DEFAULT_STORAGE_ENGINE= ARIA;
|
||||
}
|
||||
if ($MTR_COMBINATION_HEAP)
|
||||
{
|
||||
SET DEFAULT_STORAGE_ENGINE= MEMORY;
|
||||
}
|
||||
--enable_query_log
|
||||
let $default_engine= `select @@default_storage_engine`;
|
||||
|
||||
CREATE TABLE t1(a INT, b VARCHAR(30), c FLOAT);
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1 VALUES(1,'abcd',1.234);
|
||||
CREATE TABLE t2(a INT, b VARCHAR(30), c FLOAT) ENGINE=MyIsam;
|
||||
SHOW CREATE TABLE t2;
|
||||
INSERT INTO t2 VALUES(1,'abcd',1.234);
|
||||
|
||||
# Rename one column
|
||||
ALTER TABLE t1 RENAME COLUMN a TO a;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 RENAME COLUMN a TO m;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN a TO m;
|
||||
ALTER TABLE t1 RENAME COLUMN IF EXISTS a TO m;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Rename multiple column
|
||||
ALTER TABLE t1 RENAME COLUMN m TO x,
|
||||
RENAME COLUMN b TO y,
|
||||
RENAME COLUMN c TO z;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Rename multiple columns with MyIsam Engine
|
||||
ALTER TABLE t2 RENAME COLUMN a TO d, RENAME COLUMN b TO e, RENAME COLUMN c to f;
|
||||
SHOW CREATE TABLE t2;
|
||||
SELECT * FROM t2;
|
||||
|
||||
# Mix different ALTER operations with RENAME COLUMN
|
||||
ALTER TABLE t1 CHANGE COLUMN x a INT, RENAME COLUMN y TO b;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 CHANGE COLUMN z c DOUBLE, RENAME COLUMN b to b;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 CHANGE COLUMN a b int, RENAME COLUMN b TO c, CHANGE COLUMN c d FLOAT;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 ADD COLUMN zz INT, RENAME COLUMN d TO f;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 DROP COLUMN zz, RENAME COLUMN c TO zz;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 RENAME COLUMN zz to c, DROP COLUMN f;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 ADD COLUMN d INT DEFAULT 5, RENAME COLUMN c TO b, DROP COLUMN b;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
#Cyclic Rename
|
||||
ALTER TABLE t1 RENAME COLUMN b TO d, RENAME COLUMN d TO b;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
# Rename with Indexes
|
||||
ALTER TABLE t1 ADD KEY(b);
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 RENAME COLUMN b TO bb;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Rename with Foreign keys.
|
||||
CREATE TABLE t3(a int, b int, KEY(b));
|
||||
ALTER TABLE t3 ADD CONSTRAINT FOREIGN KEY(b) REFERENCES t1(bb);
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t3;
|
||||
ALTER TABLE t1 RENAME COLUMN bb TO b;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t3 RENAME COLUMN b TO c;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t3;
|
||||
|
||||
# Different Algorithm
|
||||
CREATE TABLE t4(a int);
|
||||
ALTER TABLE t4 RENAME COLUMN a TO aa, ALGORITHM = INPLACE;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t4;
|
||||
ALTER TABLE t4 RENAME COLUMN aa TO a, ALGORITHM = COPY;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t4;
|
||||
DROP TABLE t4;
|
||||
|
||||
# View, Trigger and SP
|
||||
CREATE VIEW v1 AS SELECT d,e,f FROM t2;
|
||||
CREATE TRIGGER trg1 BEFORE UPDATE on t2 FOR EACH ROW SET NEW.d=OLD.d + 10;
|
||||
CREATE PROCEDURE sp1() INSERT INTO t2(d) VALUES(10);
|
||||
ALTER TABLE t2 RENAME COLUMN d TO g;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t2;
|
||||
SHOW CREATE VIEW v1;
|
||||
--error ER_VIEW_INVALID
|
||||
SELECT * FROM v1;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
UPDATE t2 SET f = f + 10;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
CALL sp1();
|
||||
DROP TRIGGER trg1;
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
# Generated Columns
|
||||
if (!$MTR_COMBINATION_HEAP)
|
||||
{
|
||||
CREATE TABLE t_gen(a INT, b DOUBLE GENERATED ALWAYS AS (SQRT(a)));
|
||||
INSERT INTO t_gen(a) VALUES(4);
|
||||
SELECT * FROM t_gen;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t_gen;
|
||||
ALTER TABLE t_gen RENAME COLUMN a TO c, CHANGE COLUMN b b DOUBLE GENERATED ALWAYS AS (SQRT(c));
|
||||
SELECT * FROM t_gen;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t_gen;
|
||||
#--error ER_DEPENDENT_BY_GENERATED_COLUMN
|
||||
ALTER TABLE t_gen CHANGE COLUMN c x INT;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
show create table t_gen;
|
||||
#--error ER_DEPENDENT_BY_GENERATED_COLUMN
|
||||
ALTER TABLE t_gen RENAME COLUMN x TO a;
|
||||
DROP TABLE t_gen;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Negative tests
|
||||
#
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
# Invalid Syntax
|
||||
--error ER_PARSE_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN b z;
|
||||
--error ER_PARSE_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN FROM b TO z;
|
||||
--error ER_PARSE_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN b TO 1;
|
||||
|
||||
# Duplicate column name
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN b TO e, RENAME COLUMN c TO e;
|
||||
--error ER_DUP_FIELDNAME
|
||||
ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN b TO z;
|
||||
|
||||
# Multiple operation on same column
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 DROP COLUMN b, RENAME COLUMN b TO z;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN b TO b, RENAME COLUMN b TO b;
|
||||
--error ER_CANT_DROP_FIELD_OR_KEY
|
||||
ALTER TABLE t1 RENAME COLUMN b TO c3, DROP COLUMN c3;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 ADD COLUMN z INT, CHANGE COLUMN z y INT, DROP COLUMN y;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN z TO y, DROP COLUMN y;
|
||||
|
||||
# Invalid column name while renaming
|
||||
--error ER_WRONG_COLUMN_NAME
|
||||
ALTER TABLE t1 RENAME COLUMN b TO `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn`;
|
||||
# This error is different compared to ALTER TABLE ... CHANGE command
|
||||
--error ER_TOO_LONG_IDENT
|
||||
ALTER TABLE t1 CHANGE b `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn` int;
|
||||
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Cleanup
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t3,t1,t2;
|
||||
SET DEFAULT_STORAGE_ENGINE= @save_default_engine;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-7318 RENAME INDEX
|
||||
--echo #
|
||||
@@ -2608,47 +2364,6 @@ alter table t1 rename column abc to ABC;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
|
||||
--echo #
|
||||
set @save_default_engine= @@default_storage_engine;
|
||||
--disable_query_log
|
||||
if ($MTR_COMBINATION_INNODB)
|
||||
{
|
||||
set default_storage_engine= innodb;
|
||||
}
|
||||
if ($MTR_COMBINATION_ARIA)
|
||||
{
|
||||
set default_storage_engine= aria;
|
||||
}
|
||||
--enable_query_log
|
||||
|
||||
if (!$MTR_COMBINATION_INNODB)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
# There is no inplace ADD INDEX for MyISAM/Aria:
|
||||
create or replace table t1 (x int);
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add unique (x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add primary key(x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add index(x), algorithm=inplace;
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
# cleanup
|
||||
drop table t1;
|
||||
set @@default_storage_engine= @save_default_engine;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25555 Server crashes in tree_record_pos after INPLACE-recreating index on HEAP table
|
||||
--echo #
|
||||
|
@@ -1,6 +1,6 @@
|
||||
--- ./mysql-test/main/alter_table.result 2020-02-27 19:35:41.279992329 +0300
|
||||
+++ ./mysql-test/main/alter_table,aria.reject 2020-02-27 19:37:13.251994491 +0300
|
||||
@@ -2716,8 +2716,7 @@
|
||||
--- main/alter_table_combinations.result 2022-05-24 17:16:56.769146869 +0200
|
||||
+++ main/alter_table_combinations.reject 2022-05-24 17:25:20.847126357 +0200
|
||||
@@ -173,8 +173,7 @@
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL,
|
||||
@@ -10,7 +10,7 @@
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN bb TO b;
|
||||
SHOW CREATE TABLE t1;
|
||||
@@ -2733,8 +2732,7 @@
|
||||
@@ -190,8 +189,7 @@
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`c` int(11) DEFAULT NULL,
|
@@ -1,6 +1,15 @@
|
||||
--- ./mysql-test/main/alter_table.result 2020-02-27 19:35:41.279992329 +0300
|
||||
+++ ./mysql-test/main/alter_table,heap.reject 2020-02-27 19:39:44.175998039 +0300
|
||||
@@ -2716,8 +2716,7 @@
|
||||
--- main/alter_table_combinations.result 2022-05-24 17:16:56.769146869 +0200
|
||||
+++ main/alter_table_combinations.reject 2022-05-24 17:25:01.216127156 +0200
|
||||
@@ -11,7 +11,7 @@
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
-test.t1 check status OK
|
||||
+test.t1 check note The storage engine for the table doesn't support check
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
@@ -173,8 +173,7 @@
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL,
|
||||
@@ -10,7 +19,7 @@
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN bb TO b;
|
||||
SHOW CREATE TABLE t1;
|
||||
@@ -2733,8 +2732,7 @@
|
||||
@@ -190,8 +189,7 @@
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`c` int(11) DEFAULT NULL,
|
||||
@@ -20,7 +29,7 @@
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
CREATE TABLE t4(a int);
|
||||
ALTER TABLE t4 RENAME COLUMN a TO aa, ALGORITHM = INPLACE;
|
||||
@@ -2774,36 +2772,6 @@
|
||||
@@ -231,36 +229,6 @@
|
||||
ERROR 42S22: Unknown column 'd' in 'field list'
|
||||
DROP TRIGGER trg1;
|
||||
DROP PROCEDURE sp1;
|
||||
@@ -57,3 +66,12 @@
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
@@ -316,7 +284,7 @@
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
-test.t1 check status OK
|
||||
+test.t1 check note The storage engine for the table doesn't support check
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.5 tests
|
@@ -1,4 +1,5 @@
|
||||
[innodb]
|
||||
innodb
|
||||
|
||||
[aria]
|
||||
|
324
mysql-test/main/alter_table_combinations.result
Normal file
324
mysql-test/main/alter_table_combinations.result
Normal file
@@ -0,0 +1,324 @@
|
||||
set @save_default_engine= @@default_storage_engine;
|
||||
#
|
||||
# MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
|
||||
#
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.3 tests
|
||||
#
|
||||
#
|
||||
# MDEV-16290 ALTER TABLE ... RENAME COLUMN syntax
|
||||
#
|
||||
CREATE TABLE t1(a INT, b VARCHAR(30), c FLOAT);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`c` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
INSERT INTO t1 VALUES(1,'abcd',1.234);
|
||||
CREATE TABLE t2(a INT, b VARCHAR(30), c FLOAT) ENGINE=MyIsam;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`c` float DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
INSERT INTO t2 VALUES(1,'abcd',1.234);
|
||||
ALTER TABLE t1 RENAME COLUMN a TO a;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`c` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN a TO m;
|
||||
ALTER TABLE t1 RENAME COLUMN a TO m;
|
||||
ERROR 42S22: Unknown column 'a' in 't1'
|
||||
ALTER TABLE t1 RENAME COLUMN IF EXISTS a TO m;
|
||||
Warnings:
|
||||
Note 1054 Unknown column 'a' in 't1'
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`m` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`c` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t1;
|
||||
m b c
|
||||
1 abcd 1.234
|
||||
ALTER TABLE t1 RENAME COLUMN m TO x,
|
||||
RENAME COLUMN b TO y,
|
||||
RENAME COLUMN c TO z;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`x` int(11) DEFAULT NULL,
|
||||
`y` varchar(30) DEFAULT NULL,
|
||||
`z` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t1;
|
||||
x y z
|
||||
1 abcd 1.234
|
||||
ALTER TABLE t2 RENAME COLUMN a TO d, RENAME COLUMN b TO e, RENAME COLUMN c to f;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`d` int(11) DEFAULT NULL,
|
||||
`e` varchar(30) DEFAULT NULL,
|
||||
`f` float DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t2;
|
||||
d e f
|
||||
1 abcd 1.234
|
||||
ALTER TABLE t1 CHANGE COLUMN x a INT, RENAME COLUMN y TO b;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`z` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 CHANGE COLUMN z c DOUBLE, RENAME COLUMN b to b;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`c` double DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 CHANGE COLUMN a b int, RENAME COLUMN b TO c, CHANGE COLUMN c d FLOAT;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` varchar(30) DEFAULT NULL,
|
||||
`d` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 ADD COLUMN zz INT, RENAME COLUMN d TO f;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` varchar(30) DEFAULT NULL,
|
||||
`f` float DEFAULT NULL,
|
||||
`zz` int(11) DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 DROP COLUMN zz, RENAME COLUMN c TO zz;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`zz` varchar(30) DEFAULT NULL,
|
||||
`f` float DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN zz to c, DROP COLUMN f;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` int(11) DEFAULT NULL,
|
||||
`c` varchar(30) DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 ADD COLUMN d INT DEFAULT 5, RENAME COLUMN c TO b, DROP COLUMN b;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`b` varchar(30) DEFAULT NULL,
|
||||
`d` int(11) DEFAULT 5
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN b TO d, RENAME COLUMN d TO b;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT 5
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 ADD KEY(b);
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT 5,
|
||||
KEY `b` (`b`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN b TO bb;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`bb` int(11) DEFAULT 5,
|
||||
KEY `b` (`bb`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t1;
|
||||
d bb
|
||||
abcd 5
|
||||
CREATE TABLE t3(a int, b int, KEY(b));
|
||||
ALTER TABLE t3 ADD CONSTRAINT FOREIGN KEY(b) REFERENCES t1(bb);
|
||||
SHOW CREATE TABLE t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL,
|
||||
KEY `b` (`b`),
|
||||
CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`b`) REFERENCES `t1` (`bb`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN bb TO b;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT 5,
|
||||
KEY `b` (`b`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t3 RENAME COLUMN b TO c;
|
||||
SHOW CREATE TABLE t3;
|
||||
Table Create Table
|
||||
t3 CREATE TABLE `t3` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`c` int(11) DEFAULT NULL,
|
||||
KEY `b` (`c`),
|
||||
CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`c`) REFERENCES `t1` (`b`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
CREATE TABLE t4(a int);
|
||||
ALTER TABLE t4 RENAME COLUMN a TO aa, ALGORITHM = INPLACE;
|
||||
SHOW CREATE TABLE t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`aa` int(11) DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t4 RENAME COLUMN aa TO a, ALGORITHM = COPY;
|
||||
SHOW CREATE TABLE t4;
|
||||
Table Create Table
|
||||
t4 CREATE TABLE `t4` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
DROP TABLE t4;
|
||||
CREATE VIEW v1 AS SELECT d,e,f FROM t2;
|
||||
CREATE TRIGGER trg1 BEFORE UPDATE on t2 FOR EACH ROW SET NEW.d=OLD.d + 10;
|
||||
CREATE PROCEDURE sp1() INSERT INTO t2(d) VALUES(10);
|
||||
ALTER TABLE t2 RENAME COLUMN d TO g;
|
||||
SHOW CREATE TABLE t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`g` int(11) DEFAULT NULL,
|
||||
`e` varchar(30) DEFAULT NULL,
|
||||
`f` float DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `test`.`t2`.`d` AS `d`,`test`.`t2`.`e` AS `e`,`test`.`t2`.`f` AS `f` from `t2` latin1 latin1_swedish_ci
|
||||
Warnings:
|
||||
Warning 1356 View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
SELECT * FROM v1;
|
||||
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
|
||||
UPDATE t2 SET f = f + 10;
|
||||
ERROR 42S22: Unknown column 'd' in 'OLD'
|
||||
CALL sp1();
|
||||
ERROR 42S22: Unknown column 'd' in 'field list'
|
||||
DROP TRIGGER trg1;
|
||||
DROP PROCEDURE sp1;
|
||||
CREATE TABLE t_gen(a INT, b DOUBLE GENERATED ALWAYS AS (SQRT(a)));
|
||||
INSERT INTO t_gen(a) VALUES(4);
|
||||
SELECT * FROM t_gen;
|
||||
a b
|
||||
4 2
|
||||
SHOW CREATE TABLE t_gen;
|
||||
Table Create Table
|
||||
t_gen CREATE TABLE `t_gen` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` double GENERATED ALWAYS AS (sqrt(`a`)) VIRTUAL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t_gen RENAME COLUMN a TO c, CHANGE COLUMN b b DOUBLE GENERATED ALWAYS AS (SQRT(c));
|
||||
SELECT * FROM t_gen;
|
||||
c b
|
||||
4 2
|
||||
SHOW CREATE TABLE t_gen;
|
||||
Table Create Table
|
||||
t_gen CREATE TABLE `t_gen` (
|
||||
`c` int(11) DEFAULT NULL,
|
||||
`b` double GENERATED ALWAYS AS (sqrt(`c`)) VIRTUAL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t_gen CHANGE COLUMN c x INT;
|
||||
show create table t_gen;
|
||||
Table Create Table
|
||||
t_gen CREATE TABLE `t_gen` (
|
||||
`x` int(11) DEFAULT NULL,
|
||||
`b` double GENERATED ALWAYS AS (sqrt(`x`)) VIRTUAL
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t_gen RENAME COLUMN x TO a;
|
||||
DROP TABLE t_gen;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT 5,
|
||||
KEY `b` (`b`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
ALTER TABLE t1 RENAME COLUMN b z;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'z' at line 1
|
||||
ALTER TABLE t1 RENAME COLUMN FROM b TO z;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM b TO z' at line 1
|
||||
ALTER TABLE t1 RENAME COLUMN b TO 1;
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1' at line 1
|
||||
ALTER TABLE t1 RENAME COLUMN b TO e, RENAME COLUMN c TO e;
|
||||
ERROR 42S22: Unknown column 'c' in 't1'
|
||||
ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN b TO z;
|
||||
ERROR 42S21: Duplicate column name 'z'
|
||||
ALTER TABLE t1 DROP COLUMN b, RENAME COLUMN b TO z;
|
||||
ERROR 42S22: Unknown column 'b' in 't1'
|
||||
ALTER TABLE t1 RENAME COLUMN b TO b, RENAME COLUMN b TO b;
|
||||
ERROR 42S22: Unknown column 'b' in 't1'
|
||||
ALTER TABLE t1 RENAME COLUMN b TO c3, DROP COLUMN c3;
|
||||
ERROR 42000: Can't DROP COLUMN `c3`; check that it exists
|
||||
ALTER TABLE t1 ADD COLUMN z INT, CHANGE COLUMN z y INT, DROP COLUMN y;
|
||||
ERROR 42S22: Unknown column 'z' in 't1'
|
||||
ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN z TO y, DROP COLUMN y;
|
||||
ERROR 42S22: Unknown column 'z' in 't1'
|
||||
ALTER TABLE t1 RENAME COLUMN b TO `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn`;
|
||||
ERROR 42000: Incorrect column name 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn'
|
||||
ALTER TABLE t1 CHANGE b `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn` int;
|
||||
ERROR 42000: Identifier name 'nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn' is too long
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`d` varchar(30) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT 5,
|
||||
KEY `b` (`b`)
|
||||
) ENGINE=DEFAULT_ENGINE DEFAULT CHARSET=latin1
|
||||
SELECT * FROM t1;
|
||||
d b
|
||||
abcd 5
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t3,t1,t2;
|
||||
#
|
||||
# MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
|
||||
#
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
#
|
||||
# End of 10.5 tests
|
||||
#
|
||||
set @@default_storage_engine= @save_default_engine;
|
263
mysql-test/main/alter_table_combinations.test
Normal file
263
mysql-test/main/alter_table_combinations.test
Normal file
@@ -0,0 +1,263 @@
|
||||
set @save_default_engine= @@default_storage_engine;
|
||||
--disable_query_log
|
||||
if ($MTR_COMBINATION_INNODB)
|
||||
{
|
||||
set default_storage_engine= innodb;
|
||||
}
|
||||
if ($MTR_COMBINATION_ARIA)
|
||||
{
|
||||
set default_storage_engine= aria;
|
||||
}
|
||||
if ($MTR_COMBINATION_HEAP)
|
||||
{
|
||||
set default_storage_engine= memory;
|
||||
}
|
||||
--enable_query_log
|
||||
let $default_engine= `select @@default_storage_engine`;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
|
||||
--echo #
|
||||
|
||||
if (!$MTR_COMBINATION_INNODB)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
# There is no inplace ADD INDEX for MyISAM/Aria:
|
||||
create or replace table t1 (x int);
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add unique (x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add primary key(x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add index(x), algorithm=inplace;
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.3 tests
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-16290 ALTER TABLE ... RENAME COLUMN syntax
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a INT, b VARCHAR(30), c FLOAT);
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
INSERT INTO t1 VALUES(1,'abcd',1.234);
|
||||
CREATE TABLE t2(a INT, b VARCHAR(30), c FLOAT) ENGINE=MyIsam;
|
||||
SHOW CREATE TABLE t2;
|
||||
INSERT INTO t2 VALUES(1,'abcd',1.234);
|
||||
|
||||
# Rename one column
|
||||
ALTER TABLE t1 RENAME COLUMN a TO a;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 RENAME COLUMN a TO m;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN a TO m;
|
||||
ALTER TABLE t1 RENAME COLUMN IF EXISTS a TO m;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Rename multiple column
|
||||
ALTER TABLE t1 RENAME COLUMN m TO x,
|
||||
RENAME COLUMN b TO y,
|
||||
RENAME COLUMN c TO z;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Rename multiple columns with MyIsam Engine
|
||||
ALTER TABLE t2 RENAME COLUMN a TO d, RENAME COLUMN b TO e, RENAME COLUMN c to f;
|
||||
SHOW CREATE TABLE t2;
|
||||
SELECT * FROM t2;
|
||||
|
||||
# Mix different ALTER operations with RENAME COLUMN
|
||||
ALTER TABLE t1 CHANGE COLUMN x a INT, RENAME COLUMN y TO b;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 CHANGE COLUMN z c DOUBLE, RENAME COLUMN b to b;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 CHANGE COLUMN a b int, RENAME COLUMN b TO c, CHANGE COLUMN c d FLOAT;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 ADD COLUMN zz INT, RENAME COLUMN d TO f;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 DROP COLUMN zz, RENAME COLUMN c TO zz;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 RENAME COLUMN zz to c, DROP COLUMN f;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 ADD COLUMN d INT DEFAULT 5, RENAME COLUMN c TO b, DROP COLUMN b;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
#Cyclic Rename
|
||||
ALTER TABLE t1 RENAME COLUMN b TO d, RENAME COLUMN d TO b;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
# Rename with Indexes
|
||||
ALTER TABLE t1 ADD KEY(b);
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t1 RENAME COLUMN b TO bb;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Rename with Foreign keys.
|
||||
CREATE TABLE t3(a int, b int, KEY(b));
|
||||
ALTER TABLE t3 ADD CONSTRAINT FOREIGN KEY(b) REFERENCES t1(bb);
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t3;
|
||||
ALTER TABLE t1 RENAME COLUMN bb TO b;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
ALTER TABLE t3 RENAME COLUMN b TO c;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t3;
|
||||
|
||||
# Different Algorithm
|
||||
CREATE TABLE t4(a int);
|
||||
ALTER TABLE t4 RENAME COLUMN a TO aa, ALGORITHM = INPLACE;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t4;
|
||||
ALTER TABLE t4 RENAME COLUMN aa TO a, ALGORITHM = COPY;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t4;
|
||||
DROP TABLE t4;
|
||||
|
||||
# View, Trigger and SP
|
||||
CREATE VIEW v1 AS SELECT d,e,f FROM t2;
|
||||
CREATE TRIGGER trg1 BEFORE UPDATE on t2 FOR EACH ROW SET NEW.d=OLD.d + 10;
|
||||
CREATE PROCEDURE sp1() INSERT INTO t2(d) VALUES(10);
|
||||
ALTER TABLE t2 RENAME COLUMN d TO g;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t2;
|
||||
SHOW CREATE VIEW v1;
|
||||
--error ER_VIEW_INVALID
|
||||
SELECT * FROM v1;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
UPDATE t2 SET f = f + 10;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
CALL sp1();
|
||||
DROP TRIGGER trg1;
|
||||
DROP PROCEDURE sp1;
|
||||
|
||||
# Generated Columns
|
||||
if (!$MTR_COMBINATION_HEAP)
|
||||
{
|
||||
CREATE TABLE t_gen(a INT, b DOUBLE GENERATED ALWAYS AS (SQRT(a)));
|
||||
INSERT INTO t_gen(a) VALUES(4);
|
||||
SELECT * FROM t_gen;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t_gen;
|
||||
ALTER TABLE t_gen RENAME COLUMN a TO c, CHANGE COLUMN b b DOUBLE GENERATED ALWAYS AS (SQRT(c));
|
||||
SELECT * FROM t_gen;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t_gen;
|
||||
#--error ER_DEPENDENT_BY_GENERATED_COLUMN
|
||||
ALTER TABLE t_gen CHANGE COLUMN c x INT;
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
show create table t_gen;
|
||||
#--error ER_DEPENDENT_BY_GENERATED_COLUMN
|
||||
ALTER TABLE t_gen RENAME COLUMN x TO a;
|
||||
DROP TABLE t_gen;
|
||||
}
|
||||
|
||||
#
|
||||
# Negative tests
|
||||
#
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
# Invalid Syntax
|
||||
--error ER_PARSE_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN b z;
|
||||
--error ER_PARSE_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN FROM b TO z;
|
||||
--error ER_PARSE_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN b TO 1;
|
||||
|
||||
# Duplicate column name
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN b TO e, RENAME COLUMN c TO e;
|
||||
--error ER_DUP_FIELDNAME
|
||||
ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN b TO z;
|
||||
|
||||
# Multiple operation on same column
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 DROP COLUMN b, RENAME COLUMN b TO z;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 RENAME COLUMN b TO b, RENAME COLUMN b TO b;
|
||||
--error ER_CANT_DROP_FIELD_OR_KEY
|
||||
ALTER TABLE t1 RENAME COLUMN b TO c3, DROP COLUMN c3;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 ADD COLUMN z INT, CHANGE COLUMN z y INT, DROP COLUMN y;
|
||||
--error ER_BAD_FIELD_ERROR
|
||||
ALTER TABLE t1 ADD COLUMN z INT, RENAME COLUMN z TO y, DROP COLUMN y;
|
||||
|
||||
# Invalid column name while renaming
|
||||
--error ER_WRONG_COLUMN_NAME
|
||||
ALTER TABLE t1 RENAME COLUMN b TO `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn`;
|
||||
# This error is different compared to ALTER TABLE ... CHANGE command
|
||||
--error ER_TOO_LONG_IDENT
|
||||
ALTER TABLE t1 CHANGE b `nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn` int;
|
||||
|
||||
--replace_result $default_engine DEFAULT_ENGINE " PAGE_CHECKSUM=1" ""
|
||||
SHOW CREATE TABLE t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Cleanup
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t3,t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25803 Inplace ALTER breaks MyISAM/Aria tables when order of keys is changed
|
||||
--echo #
|
||||
|
||||
if (!$MTR_COMBINATION_INNODB)
|
||||
{
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
# There is no inplace ADD INDEX for MyISAM/Aria:
|
||||
create or replace table t1 (x int);
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add unique (x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add primary key(x), algorithm=inplace;
|
||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||
alter table t1 add index(x), algorithm=inplace;
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
}
|
||||
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x)) engine myisam;
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
create or replace table t1 (x int, y int, unique (y), unique (x), primary key(x));
|
||||
alter table t1 change x xx int, algorithm=inplace;
|
||||
check table t1;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 tests
|
||||
--echo #
|
||||
|
||||
set @@default_storage_engine= @save_default_engine;
|
@@ -3960,10 +3960,10 @@ a b max_c avg_c a b max_c avg_c a b min_c a b c d
|
||||
6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 20 315 279
|
||||
6 20 315 279.3333 6 20 315 279.3333 8 33 114 8 80 800 314
|
||||
6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 23 303 909
|
||||
6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 20 315 279
|
||||
6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 23 303 909
|
||||
8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 64 248 107
|
||||
8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 80 800 314
|
||||
6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 20 315 279
|
||||
6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 23 303 909
|
||||
8 33 404 213.6667 8 33 404 213.6667 7 11 708 7 13 312 406
|
||||
8 33 404 213.6667 8 33 404 213.6667 8 33 114 8 64 248 107
|
||||
8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 20 315 279
|
||||
@@ -3978,10 +3978,10 @@ a b max_c avg_c a b max_c avg_c a b min_c a b c d
|
||||
6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 20 315 279
|
||||
6 20 315 279.3333 6 20 315 279.3333 8 33 114 8 80 800 314
|
||||
6 20 315 279.3333 6 20 315 279.3333 6 20 214 6 23 303 909
|
||||
6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 20 315 279
|
||||
6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 23 303 909
|
||||
8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 64 248 107
|
||||
8 33 404 213.6667 6 20 315 279.3333 8 33 114 8 80 800 314
|
||||
6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 20 315 279
|
||||
6 20 315 279.3333 8 33 404 213.6667 6 20 214 6 23 303 909
|
||||
8 33 404 213.6667 8 33 404 213.6667 7 11 708 7 13 312 406
|
||||
8 33 404 213.6667 8 33 404 213.6667 8 33 114 8 64 248 107
|
||||
8 33 404 213.6667 8 33 404 213.6667 6 20 214 6 20 315 279
|
||||
@@ -3993,8 +3993,8 @@ and (v1.max_c<500) and (v3.a=t2.a) and (v2.max_c>300);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 PRIMARY <derived4> ref key0 key0 5 test.t2.a 2 Using where
|
||||
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY <derived3> ALL NULL NULL NULL NULL 20 Using where; Using join buffer (incremental, BNL join)
|
||||
4 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
|
||||
3 DERIVED t1 ALL NULL NULL NULL NULL 20 Using where; Using temporary; Using filesort
|
||||
2 DERIVED t1 ALL NULL NULL NULL NULL 20 Using temporary; Using filesort
|
||||
@@ -4051,6 +4051,41 @@ EXPLAIN
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"block-nl-join": {
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"access_type": "ALL",
|
||||
"rows": 20,
|
||||
"filtered": 100,
|
||||
"attached_condition": "v1.max_c < 500"
|
||||
},
|
||||
"buffer_type": "flat",
|
||||
"buffer_size": "715",
|
||||
"join_type": "BNL",
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"having_condition": "max_c < 707 and max_c < 500",
|
||||
"filesort": {
|
||||
"sort_key": "t1.a, t1.b",
|
||||
"temporary_table": {
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 20,
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"block-nl-join": {
|
||||
"table": {
|
||||
@@ -4060,9 +4095,10 @@ EXPLAIN
|
||||
"filtered": 100,
|
||||
"attached_condition": "v2.max_c > 300"
|
||||
},
|
||||
"buffer_type": "flat",
|
||||
"buffer_size": "715",
|
||||
"buffer_type": "incremental",
|
||||
"buffer_size": "9Kb",
|
||||
"join_type": "BNL",
|
||||
"attached_condition": "v2.a = v1.a or v1.a = t2.a",
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
@@ -4086,42 +4122,6 @@ EXPLAIN
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"block-nl-join": {
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"access_type": "ALL",
|
||||
"rows": 20,
|
||||
"filtered": 100,
|
||||
"attached_condition": "v1.max_c < 500"
|
||||
},
|
||||
"buffer_type": "incremental",
|
||||
"buffer_size": "9Kb",
|
||||
"join_type": "BNL",
|
||||
"attached_condition": "v1.a = v2.a or v1.a = t2.a",
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
"having_condition": "max_c < 707 and max_c < 500",
|
||||
"filesort": {
|
||||
"sort_key": "t1.a, t1.b",
|
||||
"temporary_table": {
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 20,
|
||||
"filtered": 100
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -11120,11 +11120,24 @@ EXPLAIN
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "1 in (0,dt1.a)",
|
||||
"attached_condition": "1 in (0,t1.a) and t1.a is not null"
|
||||
}
|
||||
},
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"access_type": "ref",
|
||||
"possible_keys": ["key0"],
|
||||
"key": "key0",
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["a"],
|
||||
"ref": ["test.t1.a"],
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
@@ -11147,20 +11160,6 @@ EXPLAIN
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"block-nl-join": {
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100
|
||||
},
|
||||
"buffer_type": "flat",
|
||||
"buffer_size": "65",
|
||||
"join_type": "BNL",
|
||||
"attached_condition": "t1.a = dt1.a"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -11189,11 +11188,24 @@ EXPLAIN
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "dt.a in (1,dt.a)",
|
||||
"attached_condition": "t1.a in (1,t1.a) and t1.a is not null"
|
||||
}
|
||||
},
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"access_type": "ref",
|
||||
"possible_keys": ["key0"],
|
||||
"key": "key0",
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["a"],
|
||||
"ref": ["test.t1.a"],
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 2,
|
||||
@@ -11216,20 +11228,6 @@ EXPLAIN
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"block-nl-join": {
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100
|
||||
},
|
||||
"buffer_type": "flat",
|
||||
"buffer_size": "119",
|
||||
"join_type": "BNL",
|
||||
"attached_condition": "t1.a = dt.a"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -11920,11 +11918,24 @@ EXPLAIN
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<derived3>",
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "t.f2 < 2",
|
||||
"attached_condition": "t1.f2 < 2 and t1.f2 is not null"
|
||||
}
|
||||
},
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<derived3>",
|
||||
"access_type": "ref",
|
||||
"possible_keys": ["key0"],
|
||||
"key": "key0",
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["f2"],
|
||||
"ref": ["test.t1.f2"],
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
@@ -11942,15 +11953,6 @@ EXPLAIN
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "t1.f2 = t.f2"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -11971,11 +11973,24 @@ EXPLAIN
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<derived3>",
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "t.f2 < 2",
|
||||
"attached_condition": "t1.f2 < 2 and t1.f2 is not null"
|
||||
}
|
||||
},
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<derived3>",
|
||||
"access_type": "ref",
|
||||
"possible_keys": ["key0"],
|
||||
"key": "key0",
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["f2"],
|
||||
"ref": ["test.t1.f2"],
|
||||
"rows": 1,
|
||||
"filtered": 100,
|
||||
"materialized": {
|
||||
"query_block": {
|
||||
"select_id": 3,
|
||||
@@ -11995,20 +12010,6 @@ EXPLAIN
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"block-nl-join": {
|
||||
"table": {
|
||||
"table_name": "t1",
|
||||
"access_type": "ALL",
|
||||
"rows": 2,
|
||||
"filtered": 100
|
||||
},
|
||||
"buffer_type": "flat",
|
||||
"buffer_size": "65",
|
||||
"join_type": "BNL",
|
||||
"attached_condition": "t1.f2 = t.f2"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -16484,8 +16485,8 @@ a b c a b c
|
||||
3 21 500 3 21 231
|
||||
explain select * from v1,t2 where (v1.b=t2.b) and (v1.a<4);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 3 Using where
|
||||
1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY t2 ALL NULL NULL NULL NULL 9 Using where
|
||||
1 PRIMARY <derived2> ref key0 key0 5 test.t2.b 2 Using where
|
||||
2 DERIVED t3 range i1 i1 5 NULL 2 Using index condition
|
||||
3 UNION t3 range i1 i1 5 NULL 1 Using index condition
|
||||
NULL UNION RESULT <union2,3> ALL NULL NULL NULL NULL NULL
|
||||
@@ -16497,9 +16498,23 @@ EXPLAIN
|
||||
"nested_loop": [
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 3,
|
||||
"rows": 9,
|
||||
"filtered": 100,
|
||||
"attached_condition": "t2.b is not null"
|
||||
}
|
||||
},
|
||||
{
|
||||
"table": {
|
||||
"table_name": "<derived2>",
|
||||
"access_type": "ref",
|
||||
"possible_keys": ["key0"],
|
||||
"key": "key0",
|
||||
"key_length": "5",
|
||||
"used_key_parts": ["b"],
|
||||
"ref": ["test.t2.b"],
|
||||
"rows": 2,
|
||||
"filtered": 100,
|
||||
"attached_condition": "v1.a < 4",
|
||||
"materialized": {
|
||||
@@ -16554,20 +16569,6 @@ EXPLAIN
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"block-nl-join": {
|
||||
"table": {
|
||||
"table_name": "t2",
|
||||
"access_type": "ALL",
|
||||
"rows": 9,
|
||||
"filtered": 100
|
||||
},
|
||||
"buffer_type": "flat",
|
||||
"buffer_size": "173",
|
||||
"join_type": "BNL",
|
||||
"attached_condition": "t2.b = v1.b"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@ call mtr.add_suppression("mysql.user");
|
||||
flush tables;
|
||||
flush privileges;
|
||||
Warnings:
|
||||
Error 145 Table './mysql/user' is marked as crashed and should be repaired
|
||||
Error 145 Got error '145 "Table was marked as crashed and should be repaired"' for './mysql/user'
|
||||
Warning 1034 12544 clients are using or haven't closed the table properly
|
||||
Note 1034 Table is fixed
|
||||
# switching back from mysql.user to mysql.global_priv
|
||||
|
@@ -274,12 +274,16 @@ delete from mysql.help_relation where help_keyword_id=@keyword1_id and help_topi
|
||||
delete from mysql.help_relation where help_keyword_id=@keyword2_id and help_topic_id=@topic1_id;
|
||||
delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic3_id;
|
||||
delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic4_id;
|
||||
End of 4.1 tests.
|
||||
DROP TABLE IF EXISTS t1;
|
||||
flush tables;
|
||||
#
|
||||
# End of 4.1 tests.
|
||||
#
|
||||
CREATE TABLE t1 (i INT);
|
||||
LOCK TABLES t1 WRITE;
|
||||
HELP no_such_topic;
|
||||
name is_it_category
|
||||
UNLOCK TABLES;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests.
|
||||
#
|
||||
# End of 5.1 tests.
|
||||
#
|
||||
|
@@ -122,25 +122,22 @@ delete from mysql.help_relation where help_keyword_id=@keyword2_id and help_topi
|
||||
delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic3_id;
|
||||
delete from mysql.help_relation where help_keyword_id=@keyword3_id and help_topic_id=@topic4_id;
|
||||
|
||||
--echo End of 4.1 tests.
|
||||
flush tables;
|
||||
--echo #
|
||||
--echo # End of 4.1 tests.
|
||||
--echo #
|
||||
|
||||
#
|
||||
# Test that we can use HELP even under LOCK TABLES. See bug#9953:
|
||||
# CONVERT_TZ requires mysql.time_zone_name to be locked.
|
||||
#
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (i INT);
|
||||
|
||||
LOCK TABLES t1 WRITE;
|
||||
|
||||
HELP no_such_topic;
|
||||
|
||||
UNLOCK TABLES;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of 5.1 tests.
|
||||
--echo #
|
||||
--echo # End of 5.1 tests.
|
||||
--echo #
|
||||
|
@@ -916,11 +916,11 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where
|
||||
1 SIMPLE t8 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 8 100.00 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t4 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (flat, BNL join)
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(`test`.`t3`.`a` = 1 and `test`.`t4`.`b` = `test`.`t2`.`b` and `test`.`t2`.`a` > 0) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(`test`.`t8`.`b` = `test`.`t5`.`b` and `test`.`t6`.`b` < 10)) on(`test`.`t7`.`b` = `test`.`t5`.`b` and `test`.`t6`.`b` >= 2)) on((`test`.`t3`.`b` = 2 or `test`.`t3`.`c` is null) and (`test`.`t6`.`b` = 2 or `test`.`t6`.`c` is null) and (`test`.`t5`.`b` = `test`.`t0`.`b` or `test`.`t3`.`c` is null or `test`.`t6`.`c` is null or `test`.`t8`.`c` is null) and `test`.`t1`.`a` <> 2) join `test`.`t9` where `test`.`t0`.`a` = 1 and `test`.`t1`.`b` = `test`.`t0`.`b` and `test`.`t9`.`a` = 1 and (`test`.`t2`.`a` >= 4 or `test`.`t2`.`c` is null) and (`test`.`t3`.`a` < 5 or `test`.`t3`.`c` is null) and (`test`.`t3`.`b` = `test`.`t4`.`b` or `test`.`t3`.`c` is null or `test`.`t4`.`c` is null) and (`test`.`t5`.`a` >= 2 or `test`.`t5`.`c` is null) and (`test`.`t6`.`a` >= 4 or `test`.`t6`.`c` is null) and (`test`.`t7`.`a` <= 2 or `test`.`t7`.`c` is null) and (`test`.`t8`.`a` < 1 or `test`.`t8`.`c` is null) and (`test`.`t9`.`b` = `test`.`t8`.`b` or `test`.`t8`.`c` is null)
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(`test`.`t3`.`a` = 1 and `test`.`t4`.`b` = `test`.`t2`.`b` and `test`.`t2`.`a` > 0) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(`test`.`t8`.`b` = `test`.`t5`.`b` and `test`.`t6`.`b` < 10)) on(`test`.`t7`.`b` = `test`.`t5`.`b` and `test`.`t6`.`b` >= 2)) on((`test`.`t3`.`b` = 2 or `test`.`t3`.`c` is null) and (`test`.`t6`.`b` = 2 or `test`.`t6`.`c` is null) and (`test`.`t5`.`b` = `test`.`t0`.`b` or `test`.`t3`.`c` is null or `test`.`t6`.`c` is null or `test`.`t8`.`c` is null) and `test`.`t1`.`a` <> 2) join `test`.`t9` where `test`.`t0`.`a` = 1 and `test`.`t1`.`b` = `test`.`t0`.`b` and `test`.`t9`.`a` = 1 and (`test`.`t2`.`a` >= 4 or `test`.`t2`.`c` is null) and (`test`.`t3`.`a` < 5 or `test`.`t3`.`c` is null) and (`test`.`t4`.`b` = `test`.`t3`.`b` or `test`.`t3`.`c` is null or `test`.`t4`.`c` is null) and (`test`.`t5`.`a` >= 2 or `test`.`t5`.`c` is null) and (`test`.`t6`.`a` >= 4 or `test`.`t6`.`c` is null) and (`test`.`t7`.`a` <= 2 or `test`.`t7`.`c` is null) and (`test`.`t8`.`a` < 1 or `test`.`t8`.`c` is null) and (`test`.`t9`.`b` = `test`.`t8`.`b` or `test`.`t8`.`c` is null)
|
||||
INSERT INTO t4 VALUES (-3,12,0), (-4,13,0), (-1,11,0), (-3,11,0), (-5,15,0);
|
||||
INSERT INTO t5 VALUES (-3,11,0), (-2,12,0), (-3,13,0), (-4,12,0);
|
||||
CREATE INDEX idx_b ON t4(b);
|
||||
@@ -1476,9 +1476,9 @@ join t5 on t5.a=t3.b) on t3.a=t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL X
|
||||
1 SIMPLE t3 ref a a 5 test.t2.b X Using where
|
||||
1 SIMPLE t5 ref a a 5 test.t3.b X
|
||||
1 SIMPLE t4 ref a a 5 test.t5.a X Using where
|
||||
1 SIMPLE t4 ref a a 5 test.t3.b X Using where
|
||||
1 SIMPLE t6 ref a a 5 test.t4.b X
|
||||
1 SIMPLE t5 ref a a 5 test.t3.b X
|
||||
drop table t0, t1, t2, t3, t4, t5, t6, t7;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
@@ -925,11 +925,11 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||
1 SIMPLE t8 hash_ALL NULL #hash#$hj 5 test.t5.b 2 100.00 Using where; Using join buffer (incremental, BNLH join)
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL 8 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||
1 SIMPLE t4 hash_ALL NULL #hash#$hj 5 test.t2.b 2 100.00 Using where; Using join buffer (incremental, BNLH join)
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||
1 SIMPLE t4 hash_ALL NULL #hash#$hj 5 test.t2.b 2 100.00 Using where; Using join buffer (incremental, BNLH join)
|
||||
1 SIMPLE t9 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(`test`.`t3`.`a` = 1 and `test`.`t4`.`b` = `test`.`t2`.`b` and `test`.`t2`.`a` > 0 and `test`.`t2`.`b` is not null) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(`test`.`t8`.`b` = `test`.`t5`.`b` and `test`.`t6`.`b` < 10 and `test`.`t5`.`b` is not null)) on(`test`.`t7`.`b` = `test`.`t5`.`b` and `test`.`t6`.`b` >= 2 and `test`.`t5`.`b` is not null)) on((`test`.`t3`.`b` = 2 or `test`.`t3`.`c` is null) and (`test`.`t6`.`b` = 2 or `test`.`t6`.`c` is null) and (`test`.`t5`.`b` = `test`.`t0`.`b` or `test`.`t3`.`c` is null or `test`.`t6`.`c` is null or `test`.`t8`.`c` is null) and `test`.`t1`.`a` <> 2) join `test`.`t9` where `test`.`t0`.`a` = 1 and `test`.`t1`.`b` = `test`.`t0`.`b` and `test`.`t9`.`a` = 1 and (`test`.`t2`.`a` >= 4 or `test`.`t2`.`c` is null) and (`test`.`t3`.`a` < 5 or `test`.`t3`.`c` is null) and (`test`.`t3`.`b` = `test`.`t4`.`b` or `test`.`t3`.`c` is null or `test`.`t4`.`c` is null) and (`test`.`t5`.`a` >= 2 or `test`.`t5`.`c` is null) and (`test`.`t6`.`a` >= 4 or `test`.`t6`.`c` is null) and (`test`.`t7`.`a` <= 2 or `test`.`t7`.`c` is null) and (`test`.`t8`.`a` < 1 or `test`.`t8`.`c` is null) and (`test`.`t9`.`b` = `test`.`t8`.`b` or `test`.`t8`.`c` is null)
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(`test`.`t3`.`a` = 1 and `test`.`t4`.`b` = `test`.`t2`.`b` and `test`.`t2`.`a` > 0 and `test`.`t2`.`b` is not null) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(`test`.`t8`.`b` = `test`.`t5`.`b` and `test`.`t6`.`b` < 10 and `test`.`t5`.`b` is not null)) on(`test`.`t7`.`b` = `test`.`t5`.`b` and `test`.`t6`.`b` >= 2 and `test`.`t5`.`b` is not null)) on((`test`.`t3`.`b` = 2 or `test`.`t3`.`c` is null) and (`test`.`t6`.`b` = 2 or `test`.`t6`.`c` is null) and (`test`.`t5`.`b` = `test`.`t0`.`b` or `test`.`t3`.`c` is null or `test`.`t6`.`c` is null or `test`.`t8`.`c` is null) and `test`.`t1`.`a` <> 2) join `test`.`t9` where `test`.`t0`.`a` = 1 and `test`.`t1`.`b` = `test`.`t0`.`b` and `test`.`t9`.`a` = 1 and (`test`.`t2`.`a` >= 4 or `test`.`t2`.`c` is null) and (`test`.`t3`.`a` < 5 or `test`.`t3`.`c` is null) and (`test`.`t4`.`b` = `test`.`t3`.`b` or `test`.`t3`.`c` is null or `test`.`t4`.`c` is null) and (`test`.`t5`.`a` >= 2 or `test`.`t5`.`c` is null) and (`test`.`t6`.`a` >= 4 or `test`.`t6`.`c` is null) and (`test`.`t7`.`a` <= 2 or `test`.`t7`.`c` is null) and (`test`.`t8`.`a` < 1 or `test`.`t8`.`c` is null) and (`test`.`t9`.`b` = `test`.`t8`.`b` or `test`.`t8`.`c` is null)
|
||||
INSERT INTO t4 VALUES (-3,12,0), (-4,13,0), (-1,11,0), (-3,11,0), (-5,15,0);
|
||||
INSERT INTO t5 VALUES (-3,11,0), (-2,12,0), (-3,13,0), (-4,12,0);
|
||||
CREATE INDEX idx_b ON t4(b);
|
||||
@@ -1027,8 +1027,8 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t3 ALL NULL NULL NULL NULL 2 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||
1 SIMPLE t4 ref idx_b idx_b 5 test.t2.b 2 100.00 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
|
||||
1 SIMPLE t5 ALL idx_b NULL NULL NULL 7 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||
1 SIMPLE t7 hash_ALL NULL #hash#$hj 5 test.t5.b 2 100.00 Using where; Using join buffer (incremental, BNLH join)
|
||||
1 SIMPLE t6 ALL NULL NULL NULL NULL 3 100.00 Using where; Using join buffer (incremental, BNL join)
|
||||
1 SIMPLE t8 ref idx_b idx_b 5 test.t5.b 2 100.00 Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t0`.`a` AS `a`,`test`.`t0`.`b` AS `b`,`test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t5`.`a` AS `a`,`test`.`t5`.`b` AS `b`,`test`.`t6`.`a` AS `a`,`test`.`t6`.`b` AS `b`,`test`.`t7`.`a` AS `a`,`test`.`t7`.`b` AS `b`,`test`.`t8`.`a` AS `a`,`test`.`t8`.`b` AS `b`,`test`.`t9`.`a` AS `a`,`test`.`t9`.`b` AS `b` from `test`.`t0` join `test`.`t1` left join (`test`.`t2` left join (`test`.`t3` join `test`.`t4`) on(`test`.`t3`.`a` = 1 and `test`.`t4`.`b` = `test`.`t2`.`b` and `test`.`t2`.`a` > 0 and `test`.`t4`.`a` > 0 and `test`.`t2`.`b` is not null) join `test`.`t5` left join (`test`.`t6` join `test`.`t7` left join `test`.`t8` on(`test`.`t8`.`b` = `test`.`t5`.`b` and `test`.`t6`.`b` < 10 and `test`.`t8`.`a` >= 0 and `test`.`t5`.`b` is not null)) on(`test`.`t7`.`b` = `test`.`t5`.`b` and `test`.`t6`.`b` >= 2 and `test`.`t5`.`a` > 0 and `test`.`t5`.`b` is not null)) on((`test`.`t3`.`b` = 2 or `test`.`t3`.`c` is null) and (`test`.`t6`.`b` = 2 or `test`.`t6`.`c` is null) and (`test`.`t5`.`b` = `test`.`t0`.`b` or `test`.`t3`.`c` is null or `test`.`t6`.`c` is null or `test`.`t8`.`c` is null) and `test`.`t1`.`a` <> 2) join `test`.`t9` where `test`.`t0`.`a` = 1 and `test`.`t1`.`b` = `test`.`t0`.`b` and `test`.`t9`.`a` = 1 and (`test`.`t2`.`a` >= 4 or `test`.`t2`.`c` is null) and (`test`.`t3`.`a` < 5 or `test`.`t3`.`c` is null) and (`test`.`t4`.`b` = `test`.`t3`.`b` or `test`.`t3`.`c` is null or `test`.`t4`.`c` is null) and (`test`.`t5`.`a` >= 2 or `test`.`t5`.`c` is null) and (`test`.`t6`.`a` >= 4 or `test`.`t6`.`c` is null) and (`test`.`t7`.`a` <= 2 or `test`.`t7`.`c` is null) and (`test`.`t8`.`a` < 1 or `test`.`t8`.`c` is null) and (`test`.`t8`.`b` = `test`.`t9`.`b` or `test`.`t8`.`c` is null)
|
||||
@@ -1485,9 +1485,9 @@ join t5 on t5.a=t3.b) on t3.a=t2.b;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 ALL NULL NULL NULL NULL X
|
||||
1 SIMPLE t3 ref a a 5 test.t2.b X Using where; Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
|
||||
1 SIMPLE t5 ref a a 5 test.t3.b X Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
|
||||
1 SIMPLE t4 ref a a 5 test.t5.a X Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
|
||||
1 SIMPLE t4 ref a a 5 test.t3.b X Using where; Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
|
||||
1 SIMPLE t6 ref a a 5 test.t4.b X Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
|
||||
1 SIMPLE t5 ref a a 5 test.t3.b X Using join buffer (incremental, BKA join); Key-ordered Rowid-ordered scan
|
||||
drop table t0, t1, t2, t3, t4, t5, t6, t7;
|
||||
create table t1 (a int);
|
||||
insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
@@ -634,3 +634,6 @@ drop table t1;
|
||||
# MDEV-15538 '-N' Produce html output wrong
|
||||
#
|
||||
<TABLE BORDER=1><TR><TD>1</TD></TR></TABLE>
|
||||
WARNING: option '--enable-cleartext-plugin' is obsolete.
|
||||
1
|
||||
1
|
||||
|
@@ -708,3 +708,11 @@ drop table t1;
|
||||
--echo # MDEV-15538 '-N' Produce html output wrong
|
||||
--echo #
|
||||
--exec $MYSQL -NHe "select 1 as a"
|
||||
|
||||
|
||||
#
|
||||
# Test obsolete option --enable-cleartext-plugin
|
||||
# This should proceed with a warning
|
||||
#
|
||||
--echo
|
||||
--exec $MYSQL test --enable-cleartext-plugin -e "select 1"
|
||||
|
@@ -17,7 +17,6 @@ mysqld is alive
|
||||
# Creating an empty file 'cnf_file'
|
||||
# Using --defaults-extra-file option with 'cnf_file'.
|
||||
mysqld is alive
|
||||
# Kill the server
|
||||
# restart: --ssl-key=MYSQLTEST_VARDIR/tmp/ssl_key.pem --ssl-cert=MYSQLTEST_VARDIR/tmp/ssl_cert.pem
|
||||
connect ssl_con,localhost,root,,,,,SSL;
|
||||
SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
|
||||
@@ -26,5 +25,4 @@ SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS
|
||||
Result
|
||||
OK
|
||||
# Cleanup
|
||||
# Kill the server
|
||||
# restart
|
||||
|
@@ -56,7 +56,7 @@ EOF
|
||||
# MDEV-19168 Reload SSL certificate
|
||||
# This test reloads server SSL certs ./mysqladmin flush-ssl, and checks that new SSL
|
||||
# connection use new certificate.
|
||||
# SWtatus variable Ssl_server_not_after is used to tell the old certificate from new.
|
||||
# Status variable Ssl_server_not_after is used to tell the old certificate from new.
|
||||
#
|
||||
|
||||
source include/have_ssl_communication.inc;
|
||||
@@ -72,8 +72,7 @@ copy_file $MYSQL_TEST_DIR/std_data/server-key.pem $ssl_key;
|
||||
copy_file $MYSQL_TEST_DIR/std_data/server-cert.pem $ssl_cert;
|
||||
|
||||
let $restart_parameters=--ssl-key=$ssl_key --ssl-cert=$ssl_cert;
|
||||
--source include/kill_mysqld.inc
|
||||
--source include/start_mysqld.inc
|
||||
--source include/restart_mysqld.inc
|
||||
|
||||
connect ssl_con,localhost,root,,,,,SSL;
|
||||
SELECT VARIABLE_VALUE INTO @ssl_not_after FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_server_not_after';
|
||||
@@ -94,7 +93,6 @@ exec $MYSQL --ssl -e "SELECT IF(VARIABLE_VALUE <> '$ssl_not_after', 'OK', 'FAI
|
||||
--echo # Cleanup
|
||||
remove_file $ssl_cert;
|
||||
remove_file $ssl_key;
|
||||
# restart with usuall SSL
|
||||
# restart with usual SSL
|
||||
let $restart_parameters=;
|
||||
--source include/kill_mysqld.inc
|
||||
--source include/start_mysqld.inc
|
||||
--source include/restart_mysqld.inc
|
||||
|
@@ -5515,6 +5515,11 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"rows_for_plan": 729,
|
||||
"cost_for_plan": 451.8615234,
|
||||
"semijoin_strategy_choice": [
|
||||
{
|
||||
"strategy": "FirstMatch",
|
||||
"records": 27,
|
||||
"read_time": 665.225293
|
||||
},
|
||||
{
|
||||
"strategy": "DuplicateWeedout",
|
||||
"records": 27,
|
||||
@@ -5665,44 +5670,6 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"cost_for_plan": 172.4410156,
|
||||
"semijoin_strategy_choice": [],
|
||||
"rest_of_plan": [
|
||||
{
|
||||
"plan_prefix": [
|
||||
"t_outer_1",
|
||||
"t_inner_1",
|
||||
"t_outer_2",
|
||||
"t_inner_3"
|
||||
],
|
||||
"table": "t_inner_4",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
"access_type": "scan",
|
||||
"resulting_rows": 3,
|
||||
"cost": 2.005126953,
|
||||
"chosen": true
|
||||
}
|
||||
],
|
||||
"chosen_access_method": {
|
||||
"type": "scan",
|
||||
"records": 3,
|
||||
"cost": 2.005126953,
|
||||
"uses_join_buffering": true
|
||||
}
|
||||
},
|
||||
"rows_for_plan": 2187,
|
||||
"cost_for_plan": 611.8461426,
|
||||
"semijoin_strategy_choice": [
|
||||
{
|
||||
"strategy": "FirstMatch",
|
||||
"records": 81,
|
||||
"read_time": 2232.809033
|
||||
},
|
||||
{
|
||||
"chosen_strategy": "FirstMatch"
|
||||
}
|
||||
],
|
||||
"pruned_by_cost": true
|
||||
},
|
||||
{
|
||||
"plan_prefix": [
|
||||
"t_outer_1",
|
||||
@@ -5731,6 +5698,35 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"cost_for_plan": 1486.656396,
|
||||
"semijoin_strategy_choice": [],
|
||||
"pruned_by_cost": true
|
||||
},
|
||||
{
|
||||
"plan_prefix": [
|
||||
"t_outer_1",
|
||||
"t_inner_1",
|
||||
"t_outer_2",
|
||||
"t_inner_3"
|
||||
],
|
||||
"table": "t_inner_4",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
"access_type": "scan",
|
||||
"resulting_rows": 3,
|
||||
"cost": 2.005126953,
|
||||
"chosen": true
|
||||
}
|
||||
],
|
||||
"chosen_access_method": {
|
||||
"type": "scan",
|
||||
"records": 3,
|
||||
"cost": 2.005126953,
|
||||
"uses_join_buffering": true
|
||||
}
|
||||
},
|
||||
"rows_for_plan": 2187,
|
||||
"cost_for_plan": 611.8461426,
|
||||
"semijoin_strategy_choice": [],
|
||||
"pruned_by_cost": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5761,7 +5757,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"rest_of_plan": [
|
||||
{
|
||||
"plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_4"],
|
||||
"table": "t_outer_2",
|
||||
"table": "t_inner_2",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
@@ -5787,9 +5783,9 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"t_outer_1",
|
||||
"t_inner_1",
|
||||
"t_inner_4",
|
||||
"t_outer_2"
|
||||
"t_inner_2"
|
||||
],
|
||||
"table": "t_inner_2",
|
||||
"table": "t_outer_2",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
@@ -5816,7 +5812,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"t_outer_1",
|
||||
"t_inner_1",
|
||||
"t_inner_4",
|
||||
"t_outer_2"
|
||||
"t_inner_2"
|
||||
],
|
||||
"table": "t_inner_3",
|
||||
"best_access_path": {
|
||||
@@ -5844,7 +5840,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
},
|
||||
{
|
||||
"plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_4"],
|
||||
"table": "t_inner_2",
|
||||
"table": "t_outer_2",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
@@ -5917,7 +5913,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"rest_of_plan": [
|
||||
{
|
||||
"plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_3"],
|
||||
"table": "t_outer_2",
|
||||
"table": "t_inner_2",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
@@ -5943,7 +5939,36 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"t_outer_1",
|
||||
"t_inner_1",
|
||||
"t_inner_3",
|
||||
"t_outer_2"
|
||||
"t_inner_2"
|
||||
],
|
||||
"table": "t_outer_2",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
"access_type": "scan",
|
||||
"resulting_rows": 9,
|
||||
"cost": 2.015380859,
|
||||
"chosen": true
|
||||
}
|
||||
],
|
||||
"chosen_access_method": {
|
||||
"type": "scan",
|
||||
"records": 9,
|
||||
"cost": 2.015380859,
|
||||
"uses_join_buffering": true
|
||||
}
|
||||
},
|
||||
"rows_for_plan": 6561,
|
||||
"cost_for_plan": 1486.656396,
|
||||
"semijoin_strategy_choice": [],
|
||||
"pruned_by_cost": true
|
||||
},
|
||||
{
|
||||
"plan_prefix": [
|
||||
"t_outer_1",
|
||||
"t_inner_1",
|
||||
"t_inner_3",
|
||||
"t_inner_2"
|
||||
],
|
||||
"table": "t_inner_4",
|
||||
"best_access_path": {
|
||||
@@ -5966,38 +5991,33 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"cost_for_plan": 611.8461426,
|
||||
"semijoin_strategy_choice": [],
|
||||
"pruned_by_cost": true
|
||||
},
|
||||
{
|
||||
"plan_prefix": [
|
||||
"t_outer_1",
|
||||
"t_inner_1",
|
||||
"t_inner_3",
|
||||
"t_outer_2"
|
||||
],
|
||||
"table": "t_inner_2",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
"access_type": "scan",
|
||||
"resulting_rows": 9,
|
||||
"cost": 2.015380859,
|
||||
"chosen": true
|
||||
}
|
||||
],
|
||||
"chosen_access_method": {
|
||||
"type": "scan",
|
||||
"records": 9,
|
||||
"cost": 2.015380859,
|
||||
"uses_join_buffering": true
|
||||
}
|
||||
},
|
||||
"rows_for_plan": 6561,
|
||||
"cost_for_plan": 1486.656396,
|
||||
"semijoin_strategy_choice": [],
|
||||
"pruned_by_cost": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_3"],
|
||||
"table": "t_outer_2",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
"access_type": "scan",
|
||||
"resulting_rows": 9,
|
||||
"cost": 2.015380859,
|
||||
"chosen": true
|
||||
}
|
||||
],
|
||||
"chosen_access_method": {
|
||||
"type": "scan",
|
||||
"records": 9,
|
||||
"cost": 2.015380859,
|
||||
"uses_join_buffering": true
|
||||
}
|
||||
},
|
||||
"rows_for_plan": 729,
|
||||
"cost_for_plan": 172.4410156,
|
||||
"semijoin_strategy_choice": [],
|
||||
"pruned_by_heuristic": true
|
||||
},
|
||||
{
|
||||
"plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_3"],
|
||||
"table": "t_inner_4",
|
||||
@@ -6028,7 +6048,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"t_inner_3",
|
||||
"t_inner_4"
|
||||
],
|
||||
"table": "t_outer_2",
|
||||
"table": "t_inner_2",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
@@ -6057,7 +6077,7 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"t_inner_3",
|
||||
"t_inner_4"
|
||||
],
|
||||
"table": "t_inner_2",
|
||||
"table": "t_outer_2",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
@@ -6080,30 +6100,6 @@ t_outer_2.a in (select t_inner_3.a from t2 t_inner_3, t1 t_inner_4) {
|
||||
"pruned_by_cost": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"plan_prefix": ["t_outer_1", "t_inner_1", "t_inner_3"],
|
||||
"table": "t_inner_2",
|
||||
"best_access_path": {
|
||||
"considered_access_paths": [
|
||||
{
|
||||
"access_type": "scan",
|
||||
"resulting_rows": 9,
|
||||
"cost": 2.015380859,
|
||||
"chosen": true
|
||||
}
|
||||
],
|
||||
"chosen_access_method": {
|
||||
"type": "scan",
|
||||
"records": 9,
|
||||
"cost": 2.015380859,
|
||||
"uses_join_buffering": true
|
||||
}
|
||||
},
|
||||
"rows_for_plan": 729,
|
||||
"cost_for_plan": 172.4410156,
|
||||
"semijoin_strategy_choice": [],
|
||||
"pruned_by_heuristic": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -6,7 +6,18 @@ drop table if exists t1, t2;
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE v1;
|
||||
ERROR 42000: Can't open table
|
||||
ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# MDEV-28599 EXCHANGE PARTITION on view causes ER_CHECK_NO_SUCH_TABLE instead of ER_WRONG_OBJECT
|
||||
#
|
||||
CREATE TABLE t1 (a int)
|
||||
PARTITION BY HASH (a)
|
||||
PARTITIONS 2;
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE v1;
|
||||
ERROR HY000: 'test.v1' is not of type 'BASE TABLE'
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
|
@@ -16,7 +16,19 @@ let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
--echo #
|
||||
CREATE TABLE t1 (a int);
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
|
||||
--error ER_CHECK_NO_SUCH_TABLE
|
||||
--error ER_WRONG_OBJECT
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE v1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-28599 EXCHANGE PARTITION on view causes ER_CHECK_NO_SUCH_TABLE instead of ER_WRONG_OBJECT
|
||||
--echo #
|
||||
CREATE TABLE t1 (a int)
|
||||
PARTITION BY HASH (a)
|
||||
PARTITIONS 2;
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
|
||||
--error ER_WRONG_OBJECT
|
||||
ALTER TABLE t1 EXCHANGE PARTITION p0 WITH TABLE v1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
@@ -326,8 +326,8 @@ group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice
|
||||
order by o_totalprice desc, o_orderdate;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY orders ALL PRIMARY,i_o_custkey NULL NULL NULL 1500 100.00 Using where; Using temporary; Using filesort
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 dbt3_s001.orders.o_orderkey 1 100.00
|
||||
1 PRIMARY customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 100.00
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 dbt3_s001.orders.o_orderkey 1 100.00
|
||||
1 PRIMARY lineitem ref PRIMARY,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey_quantity 4 dbt3_s001.orders.o_orderkey 4 100.00 Using index
|
||||
2 MATERIALIZED lineitem index NULL i_l_orderkey_quantity 13 NULL 6005 100.00 Using index
|
||||
Warnings:
|
||||
@@ -360,8 +360,8 @@ group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice
|
||||
order by o_totalprice desc, o_orderdate;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY orders ALL PRIMARY,i_o_custkey NULL NULL NULL 1500 100.00 Using where; Using temporary; Using filesort
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 dbt3_s001.orders.o_orderkey 1 100.00
|
||||
1 PRIMARY customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 100.00
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 dbt3_s001.orders.o_orderkey 1 100.00
|
||||
1 PRIMARY lineitem ref PRIMARY,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey_quantity 4 dbt3_s001.orders.o_orderkey 4 100.00 Using index
|
||||
2 MATERIALIZED lineitem index NULL i_l_orderkey_quantity 13 NULL 6005 100.00 Using index
|
||||
Warnings:
|
||||
|
@@ -331,8 +331,8 @@ group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice
|
||||
order by o_totalprice desc, o_orderdate;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY orders ALL PRIMARY,i_o_custkey NULL NULL NULL 1500 100.00 Using where; Using temporary; Using filesort
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 dbt3_s001.orders.o_orderkey 1 100.00
|
||||
1 PRIMARY customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 100.00
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 dbt3_s001.orders.o_orderkey 1 100.00
|
||||
1 PRIMARY lineitem ref PRIMARY,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey_quantity 4 dbt3_s001.orders.o_orderkey 4 100.00 Using index
|
||||
2 MATERIALIZED lineitem index NULL PRIMARY 8 NULL 6005 100.00
|
||||
Warnings:
|
||||
@@ -365,8 +365,8 @@ group by c_name, c_custkey, o_orderkey, o_orderdate, o_totalprice
|
||||
order by o_totalprice desc, o_orderdate;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY orders ALL PRIMARY,i_o_custkey NULL NULL NULL 1500 100.00 Using where; Using temporary; Using filesort
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 dbt3_s001.orders.o_orderkey 1 100.00
|
||||
1 PRIMARY customer eq_ref PRIMARY PRIMARY 4 dbt3_s001.orders.o_custkey 1 100.00
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 dbt3_s001.orders.o_orderkey 1 100.00
|
||||
1 PRIMARY lineitem ref PRIMARY,i_l_orderkey,i_l_orderkey_quantity i_l_orderkey_quantity 4 dbt3_s001.orders.o_orderkey 4 100.00 Using index
|
||||
2 MATERIALIZED lineitem index NULL PRIMARY 8 NULL 6005 100.00
|
||||
Warnings:
|
||||
|
@@ -1160,8 +1160,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY A ALL NULL NULL NULL NULL 10
|
||||
1 PRIMARY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
|
||||
1 PRIMARY E ALL NULL NULL NULL NULL 5 Start temporary; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY D ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY C ALL NULL NULL NULL NULL 10 Using where; End temporary; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY C ALL NULL NULL NULL NULL 10 Using where; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY D ALL NULL NULL NULL NULL 10 Using where; End temporary; Using join buffer (flat, BNL join)
|
||||
flush status;
|
||||
select count(*) from t0 A, t0 B, t0 C, t0 D where D.a in (select a from t1 E where a+1 < 10000 + A.a + B.a +C.a+D.a);
|
||||
count(*)
|
||||
|
@@ -1163,8 +1163,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY A ALL NULL NULL NULL NULL 10
|
||||
1 PRIMARY B ALL NULL NULL NULL NULL 10 Using join buffer (flat, BNL join)
|
||||
1 PRIMARY E ALL NULL NULL NULL NULL 5 Using where; Start temporary; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY D hash_ALL NULL #hash#$hj 5 test.E.a 10 Using where; Using join buffer (incremental, BNLH join)
|
||||
1 PRIMARY C ALL NULL NULL NULL NULL 10 Using where; End temporary; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY C ALL NULL NULL NULL NULL 10 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY D hash_ALL NULL #hash#$hj 5 test.E.a 10 Using where; End temporary; Using join buffer (incremental, BNLH join)
|
||||
flush status;
|
||||
select count(*) from t0 A, t0 B, t0 C, t0 D where D.a in (select a from t1 E where a+1 < 10000 + A.a + B.a +C.a+D.a);
|
||||
count(*)
|
||||
|
@@ -2178,10 +2178,10 @@ INSERT INTO t5 VALUES (7,0),(9,0);
|
||||
explain
|
||||
SELECT * FROM t3 WHERE t3.a IN (SELECT t5.a FROM t2, t4, t5 WHERE t2.c = t5.a AND t2.b = t5.b);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t5 index a a 10 NULL 2 Using index; Start temporary
|
||||
1 PRIMARY t5 index a a 10 NULL 2 Using where; Using index; LooseScan
|
||||
1 PRIMARY t4 ALL NULL NULL NULL NULL 3
|
||||
1 PRIMARY t2 ALL b NULL NULL NULL 10 Using where
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 15 Using where; End temporary; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY t2 ref b b 5 test.t5.b 2 Using where; FirstMatch(t5)
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 15 Using where; Using join buffer (flat, BNL join)
|
||||
SELECT * FROM t3 WHERE t3.a IN (SELECT t5.a FROM t2, t4, t5 WHERE t2.c = t5.a AND t2.b = t5.b);
|
||||
a
|
||||
0
|
||||
@@ -2500,8 +2500,8 @@ WHERE t1.a = t2.a AND t2.a IN (SELECT b FROM t3 STRAIGHT_JOIN t4);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t3 system NULL NULL NULL NULL 1
|
||||
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 1
|
||||
1 PRIMARY t2 ref a a 5 const 1 Using index
|
||||
1 PRIMARY t1 ref a a 5 func 1 Using index
|
||||
1 PRIMARY t1 ref a a 5 const 1 Using index
|
||||
1 PRIMARY t2 ref a a 5 func 1 Using index
|
||||
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 0
|
||||
SELECT * FROM t1, t2
|
||||
WHERE t1.a = t2.a AND t2.a IN (SELECT b FROM t3 STRAIGHT_JOIN t4);
|
||||
|
@@ -1129,8 +1129,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
|
||||
1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
|
||||
1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
|
||||
WHERE alias3.d IN (
|
||||
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
|
||||
@@ -1150,8 +1150,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
|
||||
1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
|
||||
1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
|
||||
WHERE alias3.d IN (
|
||||
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
|
||||
|
@@ -1142,8 +1142,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
|
||||
1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
|
||||
1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (incremental, BNL join)
|
||||
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
|
||||
WHERE alias3.d IN (
|
||||
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
|
||||
@@ -1163,8 +1163,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
|
||||
1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
|
||||
1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (incremental, BNL join)
|
||||
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
|
||||
WHERE alias3.d IN (
|
||||
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
|
||||
|
@@ -1131,8 +1131,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
|
||||
1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
|
||||
1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
|
||||
WHERE alias3.d IN (
|
||||
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
|
||||
@@ -1152,8 +1152,8 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY alias3 ALL PRIMARY NULL NULL NULL # Using where
|
||||
1 PRIMARY alias4 ref PRIMARY,c c 4 test.alias3.d # Using index
|
||||
1 PRIMARY alias5 eq_ref PRIMARY PRIMARY 4 test.alias4.b # Using where; FirstMatch(alias3)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias1 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
1 PRIMARY alias2 ALL NULL NULL NULL NULL # Using join buffer (flat, BNL join)
|
||||
SELECT COUNT(*) FROM t1 AS alias1, t1 AS alias2, t2 AS alias3
|
||||
WHERE alias3.d IN (
|
||||
SELECT alias4.c FROM t2 AS alias4, t2 AS alias5
|
||||
@@ -1933,19 +1933,19 @@ AND t3.id_product IN (SELECT id_product FROM t2 t2_4 WHERE t2_4.id_t2 = 34 OR t2
|
||||
AND t3.id_product IN (SELECT id_product FROM t2 t2_5 WHERE t2_5.id_t2 = 29 OR t2_5.id_t2 = 28 OR t2_5.id_t2 = 26);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t3 index PRIMARY PRIMARY 4 NULL 18 Using index
|
||||
1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 Using where
|
||||
1 PRIMARY t5 ALL NULL NULL NULL NULL 18 Using where; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 func 1 Using where
|
||||
1 PRIMARY <subquery6> eq_ref distinct_key distinct_key 4 func 1 Using where
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 Using where
|
||||
1 PRIMARY t4 eq_ref PRIMARY PRIMARY 8 test.t3.id_product,const 1 Using where; Using index
|
||||
1 PRIMARY <subquery5> eq_ref distinct_key distinct_key 4 func 1 Using where
|
||||
1 PRIMARY t5 ALL NULL NULL NULL NULL 18 Using where; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY <subquery6> eq_ref distinct_key distinct_key 4 func 1 Using where
|
||||
1 PRIMARY t4 eq_ref PRIMARY PRIMARY 8 test.t3.id_product,const 1 Using where; Using index
|
||||
1 PRIMARY <subquery3> eq_ref distinct_key distinct_key 4 func 1 Using where
|
||||
1 PRIMARY t1 index NULL PRIMARY 8 NULL 73 Using where; Using index; Using join buffer (flat, BNL join)
|
||||
1 PRIMARY <subquery4> eq_ref distinct_key distinct_key 4 func 1 Using where
|
||||
1 PRIMARY <subquery2> eq_ref distinct_key distinct_key 4 func 1 Using where
|
||||
5 MATERIALIZED t2_4 range id_t2,id_product id_t2 5 NULL 18 Using index condition; Using where
|
||||
6 MATERIALIZED t2_5 range id_t2,id_product id_t2 5 NULL 31 Using index condition; Using where
|
||||
3 MATERIALIZED t2_2 ref id_t2,id_product id_t2 5 const 12
|
||||
4 MATERIALIZED t2_3 range id_t2,id_product id_t2 5 NULL 33 Using index condition; Using where
|
||||
6 MATERIALIZED t2_5 range id_t2,id_product id_t2 5 NULL 31 Using index condition; Using where
|
||||
2 MATERIALIZED t2_1 ALL id_t2,id_product NULL NULL NULL 223 Using where
|
||||
5 MATERIALIZED t2_4 range id_t2,id_product id_t2 5 NULL 18 Using index condition; Using where
|
||||
set optimizer_switch='rowid_filter=default';
|
||||
drop table t1,t2,t3,t4,t5;
|
||||
set global innodb_stats_persistent= @innodb_stats_persistent_save;
|
||||
|
@@ -2189,10 +2189,10 @@ INSERT INTO t5 VALUES (7,0),(9,0);
|
||||
explain
|
||||
SELECT * FROM t3 WHERE t3.a IN (SELECT t5.a FROM t2, t4, t5 WHERE t2.c = t5.a AND t2.b = t5.b);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t5 index a a 10 NULL 2 Using index; Start temporary
|
||||
1 PRIMARY t4 ALL NULL NULL NULL NULL 3 Using join buffer (flat, BNL join)
|
||||
1 PRIMARY t2 ALL b NULL NULL NULL 10 Using where; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 15 Using where; End temporary; Using join buffer (incremental, BNL join)
|
||||
1 PRIMARY t5 index a a 10 NULL 2 Using where; Using index; LooseScan
|
||||
1 PRIMARY t4 ALL NULL NULL NULL NULL 3
|
||||
1 PRIMARY t2 ref b b 5 test.t5.b 2 Using where; FirstMatch(t5)
|
||||
1 PRIMARY t3 ALL NULL NULL NULL NULL 15 Using where; Using join buffer (flat, BNL join)
|
||||
SELECT * FROM t3 WHERE t3.a IN (SELECT t5.a FROM t2, t4, t5 WHERE t2.c = t5.a AND t2.b = t5.b);
|
||||
a
|
||||
0
|
||||
@@ -2511,8 +2511,8 @@ WHERE t1.a = t2.a AND t2.a IN (SELECT b FROM t3 STRAIGHT_JOIN t4);
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY t3 system NULL NULL NULL NULL 1
|
||||
1 PRIMARY <subquery2> ALL distinct_key NULL NULL NULL 1
|
||||
1 PRIMARY t2 ref a a 5 const 1 Using index
|
||||
1 PRIMARY t1 ref a a 5 func 1 Using index
|
||||
1 PRIMARY t1 ref a a 5 const 1 Using index
|
||||
1 PRIMARY t2 ref a a 5 func 1 Using index
|
||||
2 MATERIALIZED t4 ALL NULL NULL NULL NULL 0
|
||||
SELECT * FROM t1, t2
|
||||
WHERE t1.a = t2.a AND t2.a IN (SELECT b FROM t3 STRAIGHT_JOIN t4);
|
||||
|
@@ -18,7 +18,7 @@ error 0,$ERROR_SERVICE_DOES_NOT_EXIST;
|
||||
exec $sc_exe delete $service_name;
|
||||
--enable_result_log
|
||||
|
||||
source include/kill_mysqld.inc;
|
||||
source include/shutdown_mysqld.inc;
|
||||
echo # run mysql_install_db with --service parameter;
|
||||
--disable_result_log
|
||||
exec $MYSQL_INSTALL_DB_EXE --datadir=$ddir --port=$MASTER_MYPORT --password=$password --service=$service_name -R;
|
||||
|
@@ -1,4 +1,3 @@
|
||||
# Kill the server
|
||||
# run mysql_install_db with --service parameter
|
||||
# Start service
|
||||
# Connect with root user password=password
|
||||
|
@@ -1,4 +1,3 @@
|
||||
# Kill the server
|
||||
# run mysql_install_db with --service parameter
|
||||
# Start service
|
||||
# Connect with root user password=パスワード
|
||||
|
@@ -2,8 +2,8 @@ call mtr.add_suppression("Plugin 'file_key_management' init function returned er
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` has an unreadable root page");
|
||||
call mtr.add_suppression("Table .*t[12].* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("failed to read \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
call mtr.add_suppression("\\[ERROR\\] InnoDB: Cannot decrypt \\[page id: space=");
|
||||
|
@@ -1,5 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|does not exist.*is trying to rename)");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("InnoDB: Tablespace for table \`test\`.\`t1\` is set as discarded\\.");
|
||||
|
@@ -1,5 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root page");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page)");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
call mtr.add_suppression("Table .*t1.* is corrupted");
|
||||
|
@@ -1,4 +1,4 @@
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
|
||||
|
@@ -1,6 +1,7 @@
|
||||
call mtr.add_suppression("Plugin 'file_key_management'");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t[1234]\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t[12]\\.ibd'");
|
||||
|
@@ -12,8 +12,8 @@ call mtr.add_suppression("Plugin 'file_key_management' init function returned er
|
||||
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` has an unreadable root page");
|
||||
call mtr.add_suppression("Table .*t[12].* is corrupted");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[12]\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("failed to read \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Encrypted page \\[page id: space=[1-9][0-9]*, page number=3\\] in file .*test.t1.ibd looks corrupted; key_version=1");
|
||||
call mtr.add_suppression("File '.*mysql-test.std_data.keysbad3\\.txt' not found");
|
||||
# for innodb_checksum_algorithm=full_crc32 only
|
||||
|
@@ -9,7 +9,7 @@
|
||||
# MDEV-8727: Server/InnoDB hangs on shutdown after trying to read an encrypted table with a wrong key
|
||||
#
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page|does not exist.*is trying to rename)");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1(new)?\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
|
@@ -7,8 +7,8 @@
|
||||
# MDEV-8768: Server crash at file btr0btr.ic line 122 when checking encrypted table using incorrect keys
|
||||
#
|
||||
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` has an unreadable root page");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t1` (has an unreadable root page)");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t1\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
# Suppression for builds where file_key_management plugin is linked statically
|
||||
call mtr.add_suppression("Couldn't load plugins from 'file_key_management");
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# embedded does not support restart
|
||||
-- source include/not_embedded.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted\\.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[123]\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Unable to decompress ..test.t[1-3]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
call mtr.add_suppression("InnoDB: Table `test`\\.`t[12]` is corrupted");
|
||||
|
@@ -9,7 +9,8 @@
|
||||
|
||||
call mtr.add_suppression("Plugin 'file_key_management'");
|
||||
call mtr.add_suppression("Plugin 'InnoDB' init function returned error.");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted");
|
||||
call mtr.add_suppression("InnoDB: The page \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\] in file '.*test.t[1-4]\\.ibd' cannot be decrypted; key_version=1");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t[1234]\\.ibd' is corrupted");
|
||||
call mtr.add_suppression("failed to read or decrypt \\[page id: space=[1-9][0-9]*, page number=[1-9][0-9]*\\]");
|
||||
call mtr.add_suppression("InnoDB: Unable to decompress .*.test.t[12]\\.ibd\\[page id: space=[1-9][0-9]*, page number=[0-9]+\\]");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*test.t[12]\\.ibd'");
|
||||
|
@@ -10,7 +10,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
GCF-1081 : MDEV-18283 Galera test failure on galera.GCF-1081
|
||||
GCF-939 : MDEV-21520 galera.GCF-939
|
||||
MW-329 : MDEV-19962 Galera test failure on MW-329
|
||||
galera_as_slave_ctas : MDEV-28378 timeout
|
||||
@@ -20,10 +19,7 @@ galera_bf_kill_debug : MDEV-24485 wsrep::client_state::do_acquire_ownership(): A
|
||||
galera_bf_lock_wait : MDEV-21597 wsrep::transaction::start_transaction(): Assertion `active() == false' failed
|
||||
galera_encrypt_tmp_files : Get error failed to enable encryption of temporary files
|
||||
galera_gcache_recover_manytrx : MDEV-18834 Galera test failure
|
||||
galera_kill_largechanges : MDEV-18179 Galera test failure on galera.galera_kill_largechanges
|
||||
galera_mdl_race : MDEV-21524 galera.galera_mdl_race
|
||||
galera_parallel_simple : MDEV-20318 galera.galera_parallel_simple fails
|
||||
galera_pc_ignore_sb : MDEV-20888 galera.galera_pc_ignore_sb
|
||||
galera_pc_recovery : MDEV-25199 cluster fails to start up
|
||||
galera_shutdown_nonprim : MDEV-21493 galera.galera_shutdown_nonprim
|
||||
galera_sst_mysqldump : MDEV-26501 : galera.galera_sst_mysqldump MTR failed: galera SST with mysqldump failed
|
||||
|
@@ -1,47 +0,0 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 0), (3, 0);
|
||||
CREATE PROCEDURE proc_update ()
|
||||
BEGIN
|
||||
UPDATE t1 SET f2 = 1 where f1 > 0;
|
||||
END|
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
|
||||
connection node_1;
|
||||
CALL proc_update ();;
|
||||
connection node_1a;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
SET SESSION wsrep_on = 0;
|
||||
SET SESSION wsrep_on = 1;
|
||||
connection node_1a;
|
||||
SET GLOBAL DEBUG = 'd,sync.wsrep_before_BF_victim_unlock';
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
connection node_2;
|
||||
INSERT INTO t1 VALUES (2, 2);;
|
||||
connection node_1a;
|
||||
SET SESSION DEBUG_SYNC = 'now WAIT_FOR sync.wsrep_before_BF_victim_unlock_reached';
|
||||
SET GLOBAL DEBUG = '';
|
||||
Warnings:
|
||||
Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
|
||||
connection node_1a;
|
||||
SET GLOBAL wsrep_provider_options = 'dbug=';
|
||||
SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
|
||||
connection node_2;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 1
|
||||
2 2
|
||||
3 1
|
||||
connection node_1;
|
||||
SELECT * FROM t1;
|
||||
f1 f2
|
||||
1 1
|
||||
2 2
|
||||
3 1
|
||||
wsrep_local_replays
|
||||
1
|
||||
DROP PROCEDURE proc_update;
|
||||
DROP TABLE t1;
|
@@ -12,3 +12,6 @@ INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
|
||||
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
|
||||
DROP SEQUENCE Seq1_1;
|
||||
DROP TABLE t1;
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
|
54
mysql-test/suite/galera/r/MDEV-27862.result
Normal file
54
mysql-test/suite/galera/r/MDEV-27862.result
Normal file
@@ -0,0 +1,54 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
CREATE SEQUENCE seq_nocache ENGINE=InnoDB;
|
||||
DROP SEQUENCE seq_nocache;
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
connection node_1;
|
||||
CREATE SEQUENCE seq NOCACHE ENGINE=InnoDB;
|
||||
SELECT NEXTVAL(seq) = 1;
|
||||
NEXTVAL(seq) = 1
|
||||
1
|
||||
connection node_2;
|
||||
SELECT NEXTVAL(seq) = 2;
|
||||
NEXTVAL(seq) = 2
|
||||
1
|
||||
connection node_1;
|
||||
SELECT NEXTVAL(seq) = 3;
|
||||
NEXTVAL(seq) = 3
|
||||
1
|
||||
SELECT SETVAL(seq, 100);
|
||||
SETVAL(seq, 100)
|
||||
100
|
||||
connection node_2;
|
||||
SELECT NEXTVAL(seq) = 101;
|
||||
NEXTVAL(seq) = 101
|
||||
1
|
||||
connection node_1;
|
||||
SELECT NEXTVAL(seq) = 102;
|
||||
NEXTVAL(seq) = 102
|
||||
1
|
||||
DROP SEQUENCE seq;
|
||||
CREATE TABLE t1(f1 INT);
|
||||
CREATE SEQUENCE seq_transaction NOCACHE ENGINE=InnoDB;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (0);
|
||||
SELECT NEXTVAL(seq_transaction);
|
||||
NEXTVAL(seq_transaction)
|
||||
1
|
||||
INSERT INTO t1 VALUES (NEXTVAL(seq_transaction));
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 2 FROM t1;
|
||||
COUNT(*) = 2
|
||||
1
|
||||
SELECT NEXTVAL(seq_transaction) = 3;
|
||||
NEXTVAL(seq_transaction) = 3
|
||||
1
|
||||
connection node_1;
|
||||
SELECT NEXTVAL(seq_transaction) = 4;
|
||||
NEXTVAL(seq_transaction) = 4
|
||||
1
|
||||
DROP SEQUENCE seq_transaction;
|
||||
DROP TABLE t1;
|
@@ -1,27 +1,27 @@
|
||||
--- r/galera_ist_MDEV-28423.result
|
||||
+++ r/galera_ist_MDEV-28423,debug.reject
|
||||
@@ -517,3 +517,187 @@
|
||||
1
|
||||
+++ r/galera_ist_MDEV-28423.reject
|
||||
@@ -286,3 +286,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 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (5,'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');
|
||||
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
+connection node_2;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (10,'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');
|
||||
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
+COMMIT;
|
||||
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
||||
+connection node_1;
|
||||
@@ -32,26 +32,26 @@
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (15,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||
+COMMIT;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (20,'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');
|
||||
+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 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (25,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+connection node_2;
|
||||
+Performing --wsrep-recover ...
|
||||
+connection node_2;
|
||||
@@ -59,132 +59,56 @@
|
||||
+Using --wsrep-start-position when starting mysqld ...
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (30,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1;
|
||||
+INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (35,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+COMMIT;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (40,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1a_galera_st_kill_slave_ddl;
|
||||
+INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (45,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+ROLLBACK;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET SESSION wsrep_sync_wait=15;
|
||||
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+EXPECT_3
|
||||
+3
|
||||
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
+EXPECT_35
|
||||
+35
|
||||
+SELECT * FROM t1;
|
||||
+id f1 f2
|
||||
+1 node1_committed_before NULL
|
||||
+2 node1_committed_before NULL
|
||||
+3 node1_committed_before NULL
|
||||
+4 node1_committed_before NULL
|
||||
+5 node1_committed_before NULL
|
||||
+6 node2_committed_before NULL
|
||||
+7 node2_committed_before NULL
|
||||
+8 node2_committed_before NULL
|
||||
+9 node2_committed_before NULL
|
||||
+10 node2_committed_before NULL
|
||||
+11 node1_committed_during NULL
|
||||
+12 node1_committed_during NULL
|
||||
+13 node1_committed_during NULL
|
||||
+14 node1_committed_during NULL
|
||||
+15 node1_committed_during NULL
|
||||
+16 node1_to_be_committed_after NULL
|
||||
+17 node1_to_be_committed_after NULL
|
||||
+18 node1_to_be_committed_after NULL
|
||||
+19 node1_to_be_committed_after NULL
|
||||
+20 node1_to_be_committed_after NULL
|
||||
+26 node2_committed_after NULL
|
||||
+27 node2_committed_after NULL
|
||||
+28 node2_committed_after NULL
|
||||
+29 node2_committed_after NULL
|
||||
+30 node2_committed_after NULL
|
||||
+31 node1_to_be_committed_after NULL
|
||||
+32 node1_to_be_committed_after NULL
|
||||
+33 node1_to_be_committed_after NULL
|
||||
+34 node1_to_be_committed_after NULL
|
||||
+35 node1_to_be_committed_after NULL
|
||||
+36 node1_committed_after NULL
|
||||
+37 node1_committed_after NULL
|
||||
+38 node1_committed_after NULL
|
||||
+39 node1_committed_after NULL
|
||||
+40 node1_committed_after NULL
|
||||
+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;
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET SESSION wsrep_sync_wait=15;
|
||||
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+EXPECT_3
|
||||
+3
|
||||
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
+EXPECT_35
|
||||
+35
|
||||
+SELECT * FROM t1;
|
||||
+id f1 f2
|
||||
+1 node1_committed_before NULL
|
||||
+2 node1_committed_before NULL
|
||||
+3 node1_committed_before NULL
|
||||
+4 node1_committed_before NULL
|
||||
+5 node1_committed_before NULL
|
||||
+6 node2_committed_before NULL
|
||||
+7 node2_committed_before NULL
|
||||
+8 node2_committed_before NULL
|
||||
+9 node2_committed_before NULL
|
||||
+10 node2_committed_before NULL
|
||||
+11 node1_committed_during NULL
|
||||
+12 node1_committed_during NULL
|
||||
+13 node1_committed_during NULL
|
||||
+14 node1_committed_during NULL
|
||||
+15 node1_committed_during NULL
|
||||
+16 node1_to_be_committed_after NULL
|
||||
+17 node1_to_be_committed_after NULL
|
||||
+18 node1_to_be_committed_after NULL
|
||||
+19 node1_to_be_committed_after NULL
|
||||
+20 node1_to_be_committed_after NULL
|
||||
+26 node2_committed_after NULL
|
||||
+27 node2_committed_after NULL
|
||||
+28 node2_committed_after NULL
|
||||
+29 node2_committed_after NULL
|
||||
+30 node2_committed_after NULL
|
||||
+31 node1_to_be_committed_after NULL
|
||||
+32 node1_to_be_committed_after NULL
|
||||
+33 node1_to_be_committed_after NULL
|
||||
+34 node1_to_be_committed_after NULL
|
||||
+35 node1_to_be_committed_after NULL
|
||||
+36 node1_committed_after NULL
|
||||
+37 node1_committed_after NULL
|
||||
+38 node1_committed_after NULL
|
||||
+39 node1_committed_after NULL
|
||||
+40 node1_committed_after NULL
|
||||
+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,519 +1,287 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
Performing State Transfer on a server that has been temporarily disconnected
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
COMMIT;
|
||||
Unloading wsrep provider ...
|
||||
SET GLOBAL wsrep_cluster_address = '';
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'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;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'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 ...
|
||||
disconnect node_2;
|
||||
connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'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');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_disconnect_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'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');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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 shut down cleanly and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
COMMIT;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'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;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'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 ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'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');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_shutdown_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'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');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
COMMIT;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'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;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'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 ...
|
||||
Starting server ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'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');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_kill_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (46,'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');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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;
|
||||
|
@@ -1,27 +1,27 @@
|
||||
--- r/galera_ist_MDEV-28583.result
|
||||
+++ r/galera_ist_MDEV-28583,debug.reject
|
||||
@@ -517,3 +517,187 @@
|
||||
1
|
||||
+++ r/galera_ist_MDEV-28583.reject
|
||||
@@ -285,3 +285,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 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
+CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
+INSERT INTO t1 VALUES (5,'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');
|
||||
+INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
+connection node_2;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
+INSERT INTO t1 VALUES (10,'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');
|
||||
+INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
+COMMIT;
|
||||
+SET GLOBAL debug_dbug = 'd,sync.alter_opened_table';
|
||||
+connection node_1;
|
||||
@@ -32,26 +32,26 @@
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (11,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (12,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (13,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (14,'node1_committed_during');
|
||||
+INSERT INTO t1 (id,f1) VALUES (15,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_during');
|
||||
+COMMIT;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (16,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (17,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (18,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (19,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (20,'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');
|
||||
+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 (id,f1) VALUES (21,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (22,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (23,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (24,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (25,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+connection node_2;
|
||||
+Performing --wsrep-recover ...
|
||||
+connection node_2;
|
||||
@@ -59,132 +59,56 @@
|
||||
+Using --wsrep-start-position when starting mysqld ...
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (26,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (27,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (28,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (29,'node2_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (30,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node2_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1;
|
||||
+INSERT INTO t1 (id,f1) VALUES (31,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (32,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (33,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (34,'node1_to_be_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (35,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_committed_after');
|
||||
+COMMIT;
|
||||
+SET AUTOCOMMIT=OFF;
|
||||
+START TRANSACTION;
|
||||
+INSERT INTO t1 (id,f1) VALUES (36,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (37,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (38,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (39,'node1_committed_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (40,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_committed_after');
|
||||
+COMMIT;
|
||||
+connection node_1a_galera_st_kill_slave_ddl;
|
||||
+INSERT INTO t1 (id,f1) VALUES (41,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (42,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (43,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (44,'node1_to_be_rollbacked_after');
|
||||
+INSERT INTO t1 (id,f1) VALUES (45,'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');
|
||||
+INSERT INTO t1 (f1) VALUES ('node1_to_be_rollbacked_after');
|
||||
+ROLLBACK;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET SESSION wsrep_sync_wait=15;
|
||||
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+EXPECT_3
|
||||
+3
|
||||
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
+EXPECT_35
|
||||
+35
|
||||
+SELECT * FROM t1;
|
||||
+id f1 f2
|
||||
+1 node1_committed_before NULL
|
||||
+2 node1_committed_before NULL
|
||||
+3 node1_committed_before NULL
|
||||
+4 node1_committed_before NULL
|
||||
+5 node1_committed_before NULL
|
||||
+6 node2_committed_before NULL
|
||||
+7 node2_committed_before NULL
|
||||
+8 node2_committed_before NULL
|
||||
+9 node2_committed_before NULL
|
||||
+10 node2_committed_before NULL
|
||||
+11 node1_committed_during NULL
|
||||
+12 node1_committed_during NULL
|
||||
+13 node1_committed_during NULL
|
||||
+14 node1_committed_during NULL
|
||||
+15 node1_committed_during NULL
|
||||
+16 node1_to_be_committed_after NULL
|
||||
+17 node1_to_be_committed_after NULL
|
||||
+18 node1_to_be_committed_after NULL
|
||||
+19 node1_to_be_committed_after NULL
|
||||
+20 node1_to_be_committed_after NULL
|
||||
+26 node2_committed_after NULL
|
||||
+27 node2_committed_after NULL
|
||||
+28 node2_committed_after NULL
|
||||
+29 node2_committed_after NULL
|
||||
+30 node2_committed_after NULL
|
||||
+31 node1_to_be_committed_after NULL
|
||||
+32 node1_to_be_committed_after NULL
|
||||
+33 node1_to_be_committed_after NULL
|
||||
+34 node1_to_be_committed_after NULL
|
||||
+35 node1_to_be_committed_after NULL
|
||||
+36 node1_committed_after NULL
|
||||
+37 node1_committed_after NULL
|
||||
+38 node1_committed_after NULL
|
||||
+39 node1_committed_after NULL
|
||||
+40 node1_committed_after NULL
|
||||
+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;
|
||||
+connection node_1;
|
||||
+SET AUTOCOMMIT=ON;
|
||||
+SET SESSION wsrep_sync_wait=15;
|
||||
+SELECT COUNT(*) AS EXPECT_3 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 't1';
|
||||
+EXPECT_3
|
||||
+3
|
||||
+SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
+EXPECT_35
|
||||
+35
|
||||
+SELECT * FROM t1;
|
||||
+id f1 f2
|
||||
+1 node1_committed_before NULL
|
||||
+2 node1_committed_before NULL
|
||||
+3 node1_committed_before NULL
|
||||
+4 node1_committed_before NULL
|
||||
+5 node1_committed_before NULL
|
||||
+6 node2_committed_before NULL
|
||||
+7 node2_committed_before NULL
|
||||
+8 node2_committed_before NULL
|
||||
+9 node2_committed_before NULL
|
||||
+10 node2_committed_before NULL
|
||||
+11 node1_committed_during NULL
|
||||
+12 node1_committed_during NULL
|
||||
+13 node1_committed_during NULL
|
||||
+14 node1_committed_during NULL
|
||||
+15 node1_committed_during NULL
|
||||
+16 node1_to_be_committed_after NULL
|
||||
+17 node1_to_be_committed_after NULL
|
||||
+18 node1_to_be_committed_after NULL
|
||||
+19 node1_to_be_committed_after NULL
|
||||
+20 node1_to_be_committed_after NULL
|
||||
+26 node2_committed_after NULL
|
||||
+27 node2_committed_after NULL
|
||||
+28 node2_committed_after NULL
|
||||
+29 node2_committed_after NULL
|
||||
+30 node2_committed_after NULL
|
||||
+31 node1_to_be_committed_after NULL
|
||||
+32 node1_to_be_committed_after NULL
|
||||
+33 node1_to_be_committed_after NULL
|
||||
+34 node1_to_be_committed_after NULL
|
||||
+35 node1_to_be_committed_after NULL
|
||||
+36 node1_committed_after NULL
|
||||
+37 node1_committed_after NULL
|
||||
+38 node1_committed_after NULL
|
||||
+39 node1_committed_after NULL
|
||||
+40 node1_committed_after NULL
|
||||
+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,519 +1,287 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
Performing State Transfer on a server that has been temporarily disconnected
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
COMMIT;
|
||||
Unloading wsrep provider ...
|
||||
SET GLOBAL wsrep_cluster_address = '';
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'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;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'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 ...
|
||||
disconnect node_2;
|
||||
connect node_2, 127.0.0.1, root, , test, $NODE_MYPORT_2;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'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');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_disconnect_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'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');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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
|
||||
connection node_1;
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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 shut down cleanly and restarted
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
COMMIT;
|
||||
Shutting down server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'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;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'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 ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'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');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_shutdown_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (44,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'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');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_15 FROM t1;
|
||||
EXPECT_15
|
||||
35
|
||||
SELECT * from t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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 (id int not null primary key,f1 CHAR(255)) ENGINE=InnoDB;
|
||||
CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (1,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (2,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (3,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (4,'node1_committed_before');
|
||||
INSERT INTO t1 VALUES (5,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_before');
|
||||
COMMIT;
|
||||
connection node_2;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (6,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (7,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (8,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (9,'node2_committed_before');
|
||||
INSERT INTO t1 VALUES (10,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_before');
|
||||
COMMIT;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (11,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (12,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (13,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (14,'node1_committed_during');
|
||||
INSERT INTO t1 VALUES (15,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_during');
|
||||
COMMIT;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (16,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (17,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (18,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (19,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (20,'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;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (21,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (22,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (23,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (24,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (25,'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 ...
|
||||
Starting server ...
|
||||
Using --wsrep-start-position when starting mysqld ...
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (26,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (27,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (28,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (29,'node2_committed_after');
|
||||
INSERT INTO t1 VALUES (30,'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');
|
||||
INSERT INTO t1 VALUES ('node2_committed_after');
|
||||
COMMIT;
|
||||
connection node_1;
|
||||
INSERT INTO t1 VALUES (31,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (32,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (33,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (34,'node1_to_be_committed_after');
|
||||
INSERT INTO t1 VALUES (35,'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');
|
||||
COMMIT;
|
||||
SET AUTOCOMMIT=OFF;
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (36,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (37,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (38,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (39,'node1_committed_after');
|
||||
INSERT INTO t1 VALUES (40,'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');
|
||||
INSERT INTO t1 VALUES ('node1_committed_after');
|
||||
COMMIT;
|
||||
connection node_1a_galera_st_kill_slave;
|
||||
INSERT INTO t1 VALUES (41,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (42,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (43,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (45,'node1_to_be_rollbacked_after');
|
||||
INSERT INTO t1 VALUES (46,'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');
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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;
|
||||
connection node_1;
|
||||
SET AUTOCOMMIT=ON;
|
||||
SET SESSION wsrep_sync_wait=15;
|
||||
SELECT COUNT(*) AS EXPECT_35 FROM t1;
|
||||
EXPECT_35
|
||||
35
|
||||
SELECT * FROM t1;
|
||||
id f1
|
||||
1 node1_committed_before
|
||||
2 node1_committed_before
|
||||
3 node1_committed_before
|
||||
4 node1_committed_before
|
||||
5 node1_committed_before
|
||||
6 node2_committed_before
|
||||
7 node2_committed_before
|
||||
8 node2_committed_before
|
||||
9 node2_committed_before
|
||||
10 node2_committed_before
|
||||
11 node1_committed_during
|
||||
12 node1_committed_during
|
||||
13 node1_committed_during
|
||||
14 node1_committed_during
|
||||
15 node1_committed_during
|
||||
16 node1_to_be_committed_after
|
||||
17 node1_to_be_committed_after
|
||||
18 node1_to_be_committed_after
|
||||
19 node1_to_be_committed_after
|
||||
20 node1_to_be_committed_after
|
||||
26 node2_committed_after
|
||||
27 node2_committed_after
|
||||
28 node2_committed_after
|
||||
29 node2_committed_after
|
||||
30 node2_committed_after
|
||||
31 node1_to_be_committed_after
|
||||
32 node1_to_be_committed_after
|
||||
33 node1_to_be_committed_after
|
||||
34 node1_to_be_committed_after
|
||||
35 node1_to_be_committed_after
|
||||
36 node1_committed_after
|
||||
37 node1_committed_after
|
||||
38 node1_committed_after
|
||||
39 node1_committed_after
|
||||
40 node1_committed_after
|
||||
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;
|
||||
|
@@ -1,24 +0,0 @@
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_1;
|
||||
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10),(11);
|
||||
CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB;
|
||||
connection node_2;
|
||||
Killing server ...
|
||||
connection node_1;
|
||||
INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
|
||||
connection node_2;
|
||||
connection node_2a;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1771561
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE
|
||||
2
|
||||
connection node_1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
@@ -44,6 +44,9 @@ Table Create Table
|
||||
Seq1_1 CREATE SEQUENCE `Seq1_1` start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 1 cache 1000 nocycle ENGINE=InnoDB
|
||||
select NEXT VALUE FOR Seq1_1;
|
||||
NEXT VALUE FOR Seq1_1
|
||||
1
|
||||
3001
|
||||
connection node_1;
|
||||
DROP SEQUENCE Seq1_1;
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
|
@@ -12,9 +12,9 @@ connection node_2;
|
||||
TRUNCATE TABLE t1;
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
@@ -27,9 +27,9 @@ SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
|
||||
connection node_2;
|
||||
TRUNCATE TABLE t1;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
DROP TABLE t1;
|
||||
connection node_1;
|
||||
@@ -44,18 +44,17 @@ connection node_2;
|
||||
TRUNCATE TABLE t1;
|
||||
connection node_1a;
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_cert';
|
||||
connection node_2;
|
||||
TRUNCATE TABLE t1;
|
||||
connection node_1a;
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
COUNT(*) = 0
|
||||
1
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
0
|
||||
connection node_1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SET GLOBAL debug_dbug = NULL;
|
||||
DROP TABLE t1;
|
||||
@@ -66,8 +65,8 @@ SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
|
||||
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64';
|
||||
INSERT INTO t1 VALUES (5);
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
SELECT COUNT(*) FROM t1;
|
||||
COUNT(*)
|
||||
1
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SET GLOBAL debug_dbug = NULL;
|
||||
|
@@ -1,72 +0,0 @@
|
||||
#
|
||||
# GCF-1081 - Assertion `!thd->sp_runtime_ctx`
|
||||
#
|
||||
# Test replaying of stored procedures
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_debug_sync.inc
|
||||
--source include/galera_have_debug_sync.inc
|
||||
|
||||
--connection node_1
|
||||
|
||||
--let $wsrep_local_replays_old = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, 0), (3, 0);
|
||||
|
||||
DELIMITER |;
|
||||
CREATE PROCEDURE proc_update ()
|
||||
BEGIN
|
||||
UPDATE t1 SET f2 = 1 where f1 > 0;
|
||||
END|
|
||||
DELIMITER ;|
|
||||
|
||||
# Block the SP
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--let $galera_sync_point = commit_monitor_master_enter_sync
|
||||
--source include/galera_set_sync_point.inc
|
||||
|
||||
--connection node_1
|
||||
--send CALL proc_update ();
|
||||
|
||||
# Wait until SP is blocked
|
||||
--connection node_1a
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
--source include/galera_wait_sync_point.inc
|
||||
|
||||
# Issue a conflicting insert on node #2
|
||||
--connection node_1a
|
||||
SET GLOBAL debug_dbug = 'd,sync.wsrep_before_BF_victim_unlock';
|
||||
|
||||
--connection node_2
|
||||
--send INSERT INTO t1 VALUES (2, 2);
|
||||
|
||||
# Wait until it BF aborts the SP
|
||||
--connection node_1a
|
||||
SET SESSION DEBUG_SYNC = 'now WAIT_FOR sync.wsrep_before_BF_victim_unlock_reached';
|
||||
SET GLOBAL debug_dbug = '';
|
||||
|
||||
# Unblock the SP
|
||||
--connection node_1a
|
||||
--source include/galera_clear_sync_point.inc
|
||||
--source include/galera_signal_sync_point.inc
|
||||
|
||||
--connection node_2
|
||||
--reap
|
||||
SELECT * FROM t1;
|
||||
|
||||
# SP succeeds
|
||||
--connection node_1
|
||||
--reap
|
||||
SELECT * FROM t1;
|
||||
|
||||
# wsrep_local_replays has increased by 1
|
||||
--let $wsrep_local_replays_new = `SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_replays'`
|
||||
--disable_query_log
|
||||
--eval SELECT $wsrep_local_replays_new - $wsrep_local_replays_old AS wsrep_local_replays;
|
||||
--enable_query_log
|
||||
|
||||
DROP PROCEDURE proc_update;
|
||||
DROP TABLE t1;
|
@@ -13,3 +13,11 @@ CREATE SEQUENCE Seq1_1 START WITH 1 INCREMENT BY 1;
|
||||
INSERT INTO t1 VALUES (NEXT VALUE FOR Seq1_1);
|
||||
DROP SEQUENCE Seq1_1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Supress warning for SEQUENCES that are declared without `NOCACHE` introduced with MDEV-27862
|
||||
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
|
||||
--connection node_2
|
||||
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
|
4
mysql-test/suite/galera/t/MDEV-27862.combinations
Normal file
4
mysql-test/suite/galera/t/MDEV-27862.combinations
Normal file
@@ -0,0 +1,4 @@
|
||||
[binlogoff]
|
||||
|
||||
[binlogon]
|
||||
log-bin
|
67
mysql-test/suite/galera/t/MDEV-27862.test
Normal file
67
mysql-test/suite/galera/t/MDEV-27862.test
Normal file
@@ -0,0 +1,67 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
# Report WARNING when SEQUENCE is created without `NOCACHE`
|
||||
|
||||
CREATE SEQUENCE seq_nocache ENGINE=InnoDB;
|
||||
DROP SEQUENCE seq_nocache;
|
||||
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
|
||||
--connection node_2
|
||||
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
|
||||
# NEXTVAL
|
||||
|
||||
--connection node_1
|
||||
|
||||
CREATE SEQUENCE seq NOCACHE ENGINE=InnoDB;
|
||||
|
||||
SELECT NEXTVAL(seq) = 1;
|
||||
|
||||
--connection node_2
|
||||
|
||||
SELECT NEXTVAL(seq) = 2;
|
||||
|
||||
--connection node_1
|
||||
|
||||
SELECT NEXTVAL(seq) = 3;
|
||||
|
||||
|
||||
# SETVAL
|
||||
|
||||
SELECT SETVAL(seq, 100);
|
||||
|
||||
--connection node_2
|
||||
|
||||
SELECT NEXTVAL(seq) = 101;
|
||||
|
||||
--connection node_1
|
||||
|
||||
SELECT NEXTVAL(seq) = 102;
|
||||
|
||||
DROP SEQUENCE seq;
|
||||
|
||||
# TRANSACTIONS
|
||||
|
||||
CREATE TABLE t1(f1 INT);
|
||||
CREATE SEQUENCE seq_transaction NOCACHE ENGINE=InnoDB;
|
||||
|
||||
START TRANSACTION;
|
||||
INSERT INTO t1 VALUES (0);
|
||||
SELECT NEXTVAL(seq_transaction);
|
||||
INSERT INTO t1 VALUES (NEXTVAL(seq_transaction));
|
||||
COMMIT;
|
||||
|
||||
--connection node_2
|
||||
|
||||
SELECT COUNT(*) = 2 FROM t1;
|
||||
SELECT NEXTVAL(seq_transaction) = 3;
|
||||
|
||||
--connection node_1
|
||||
SELECT NEXTVAL(seq_transaction) = 4;
|
||||
|
||||
DROP SEQUENCE seq_transaction;
|
||||
DROP TABLE t1;
|
||||
|
@@ -1,50 +0,0 @@
|
||||
#
|
||||
# This test kill -9-s a slave while a large update has been performed on the master. SST is performed.
|
||||
#
|
||||
|
||||
--source include/big_test.inc
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
--source include/auto_increment_offset_save.inc
|
||||
|
||||
--connection node_1
|
||||
# Enable the master to continue running during the split-brain situation that
|
||||
# occurs when the slave is killed
|
||||
--let $wsrep_provider_options_orig = `SELECT @@wsrep_provider_options`
|
||||
SET GLOBAL wsrep_provider_options = 'pc.ignore_sb=true';
|
||||
|
||||
CREATE TABLE ten (f1 INTEGER) ENGINE=InnoDB;
|
||||
INSERT INTO ten VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10),(11);
|
||||
CREATE TABLE t1 (f1 VARCHAR(128)) ENGINE=InnoDB;
|
||||
|
||||
--connection node_2
|
||||
--source include/kill_galera.inc
|
||||
|
||||
--connection node_1
|
||||
# We create a 128Mb (or so) transaction that is larger than gcache. The size of the gcache is not adjustable dynamically
|
||||
INSERT INTO t1 SELECT REPEAT('a', 128) FROM ten AS a1, ten AS a2, ten AS a3, ten AS a4, ten AS a5, ten AS a6;
|
||||
|
||||
--connection node_2
|
||||
--source include/start_mysqld.inc
|
||||
|
||||
--let $galera_connection_name = node_2a
|
||||
--let $galera_server_number = 2
|
||||
--source include/galera_connect.inc
|
||||
--connection node_2a
|
||||
|
||||
SELECT COUNT(*) FROM t1;
|
||||
SELECT VARIABLE_VALUE FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
|
||||
--connection node_1
|
||||
--disable_query_log
|
||||
--eval SET GLOBAL wsrep_provider_options = '$wsrep_provider_options_orig';
|
||||
--enable_query_log
|
||||
|
||||
--let $node_2=node_2a
|
||||
--source include/auto_increment_offset_restore.inc
|
||||
|
||||
DROP TABLE t1;
|
||||
DROP TABLE ten;
|
11
mysql-test/suite/galera/t/galera_pc_ignore_sb.cnf
Normal file
11
mysql-test/suite/galera/t/galera_pc_ignore_sb.cnf
Normal file
@@ -0,0 +1,11 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
wsrep_debug=1
|
||||
|
||||
[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'
|
||||
|
@@ -44,3 +44,9 @@ select NEXT VALUE FOR Seq1_1;
|
||||
|
||||
--connection node_1
|
||||
DROP SEQUENCE Seq1_1;
|
||||
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
|
||||
--connection node_2
|
||||
|
||||
CALL mtr.add_suppression("SEQUENCES declared without `NOCACHE` will not behave correctly in galera cluster.");
|
||||
|
@@ -30,7 +30,7 @@ TRUNCATE TABLE t1;
|
||||
--connection node_1
|
||||
--error ER_LOCK_DEADLOCK
|
||||
--reap
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
DROP TABLE t1;
|
||||
@@ -54,8 +54,9 @@ SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
|
||||
TRUNCATE TABLE t1;
|
||||
|
||||
--connection node_1
|
||||
--error 0,ER_LOCK_DEADLOCK
|
||||
--reap
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
DROP TABLE t1;
|
||||
@@ -82,17 +83,17 @@ TRUNCATE TABLE t1;
|
||||
|
||||
--connection node_1a
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue WAIT_FOR before_cert';
|
||||
|
||||
--connection node_2
|
||||
TRUNCATE TABLE t1;
|
||||
|
||||
--connection node_1a
|
||||
SELECT COUNT(*) = 0 FROM t1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
--connection node_1
|
||||
--error ER_LOCK_DEADLOCK
|
||||
--error 0,ER_LOCK_DEADLOCK
|
||||
--reap
|
||||
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
@@ -126,7 +127,7 @@ while ($count)
|
||||
|
||||
--connection node_1a
|
||||
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue';
|
||||
|
||||
--dec $count
|
||||
@@ -135,8 +136,9 @@ while ($count)
|
||||
--enable_query_log
|
||||
|
||||
--connection node_1
|
||||
--error 0,ER_LOCK_DEADLOCK
|
||||
--reap
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
|
||||
SET DEBUG_SYNC = 'RESET';
|
||||
SET GLOBAL debug_dbug = NULL;
|
||||
|
@@ -10,8 +10,5 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
GCF-1018B : MDEV-18534 wsrep::transaction::adopt(): Assertion `transaction.is_streaming()' failed
|
||||
GCF-1060 : MDEV-20848 galera_sr.GCF_1060
|
||||
GCF-585 : MDEV-24698 galera_sr.GCF-585 MTR failed with SIGABRT: no such a transition REPLICATING -> APPLYING
|
||||
GCF-1060 : MDEV-26528 wrong usage of mutex LOCK_thd_kill and LOCK_thd_kill
|
||||
galera_sr_shutdown_master : MDEV-23612: galera_sr.galera_sr_shutdown_master MTR failed: WSREP_SST: [ERROR] Possible timeout in receving first data from donor in gtid stage
|
||||
|
||||
|
@@ -1,13 +0,0 @@
|
||||
##############################################################################
|
||||
#
|
||||
# List the test cases that are to be disabled temporarily.
|
||||
#
|
||||
# Separate the test case name and the comment with ':'.
|
||||
#
|
||||
# <testcasename> : BUG#<xxxx> <date disabled> <disabler> <comment>
|
||||
#
|
||||
# Do not use any TAB characters for whitespace.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
create-index-debug : MDEV-13680 InnoDB may crash when btr_page_alloc() fails
|
@@ -1,23 +0,0 @@
|
||||
SET @saved_debug_dbug = @@SESSION.debug_dbug;
|
||||
#
|
||||
#BUG#21326304 INNODB ONLINE ALTER TABLE ENDS IN CRASH ON DISK FULL
|
||||
#
|
||||
CREATE TABLE t1(f1 CHAR(255) NOT NULL, f2 CHAR(255) NOT NULL, f3
|
||||
CHAR(255) NOT NULL, f4 CHAR(255) NOT NULL, f5 CHAR(255) NOT NULL,f6
|
||||
CHAR(255) NOT NULL, f7 CHAR(255) NOT NULL, f8 CHAR(255) NOT NULL,f9
|
||||
CHAR(255) NOT NULL, f10 CHAR(255) NOT NULL, f11 CHAR(255) NOT NULL,f12
|
||||
CHAR(255) NOT NULL, f13 CHAR(255) NOT NULL, f14 CHAR(255) NOT NULL,f15
|
||||
CHAR(255) NOT NULL, f16 CHAR(255) NOT NULL, f17 CHAR(255) NOT NULL,f18
|
||||
CHAR(255) NOT NULL)
|
||||
ENGINE=INNODB ROW_FORMAT=DYNAMIC;
|
||||
INSERT INTO t1
|
||||
VALUES('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r');
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
INSERT INTO t1 SELECT * FROM t1;
|
||||
SET debug_dbug = '+d,disk_is_full';
|
||||
ALTER TABLE t1 FORCE, ALGORITHM=INPLACE;
|
||||
ERROR HY000: The table 't1' is full
|
||||
SET debug_dbug= @saved_debug_dbug;
|
||||
DROP TABLE t1;
|
@@ -1,6 +1,7 @@
|
||||
call mtr.add_suppression("Table `test`.`t2` should have 2 indexes but the tablespace has 1 indexes");
|
||||
call mtr.add_suppression("Index for table 't2' is corrupt; try to repair it");
|
||||
call mtr.add_suppression("Trying to read .* bytes at .* outside the bounds of the file: \\..test.t2\\.ibd");
|
||||
call mtr.add_suppression("InnoDB: File '.*test/t2\\.ibd' is corrupted");
|
||||
CREATE TABLE t1 (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
not_id INT,
|
||||
|
@@ -9,6 +9,8 @@ call mtr.add_suppression("InnoDB: Page for tablespace ");
|
||||
call mtr.add_suppression("InnoDB: Invalid FSP_SPACE_FLAGS=");
|
||||
call mtr.add_suppression("InnoDB: Unknown index id .* on page");
|
||||
call mtr.add_suppression("InnoDB: Cannot save statistics for table `test`\\.`t1` because the \\.ibd file is missing");
|
||||
call mtr.add_suppression("InnoDB: Database page corruption on disk or a failed read of file '.*ibdata1' page");
|
||||
call mtr.add_suppression("InnoDB: File '.*ibdata1' is corrupted");
|
||||
FLUSH TABLES;
|
||||
SET GLOBAL innodb_file_per_table = 1;
|
||||
CREATE TABLE t1 (c1 INT) ENGINE = InnoDB;
|
||||
@@ -862,10 +864,8 @@ ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
SELECT COUNT(*) FROM t1;
|
||||
ERROR HY000: Tablespace has been discarded for table `t1`
|
||||
restore: t1 .ibd and .cfg files
|
||||
SET SESSION debug_dbug="+d,buf_page_import_corrupt_failure";
|
||||
ALTER TABLE t1 IMPORT TABLESPACE;
|
||||
ERROR HY000: Internal error: Cannot reset LSNs in table `test`.`t1` : Data structure corruption
|
||||
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||
ERROR HY000: Index for table 't1' is corrupt; try to repair it
|
||||
DROP TABLE t1;
|
||||
unlink: t1.ibd
|
||||
unlink: t1.cfg
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user