MDEV-6247: Merge 10.0-galera to 10.1.
Merged lp:maria/maria-10.0-galera up to revision 3879. Added a new functions to handler API to forcefully abort_transaction, producing fake_trx_id, get_checkpoint and set_checkpoint for XA. These were added for future possiblity to add more storage engines that could use galera replication.
This commit is contained in:
parent
e974b56438
commit
df4dd593f2
@ -12,6 +12,7 @@
|
||||
*.dll
|
||||
*.dsp
|
||||
*.dylib
|
||||
*.diff
|
||||
*.exe
|
||||
*.exp
|
||||
*.gcda
|
||||
|
@ -215,7 +215,7 @@ all_configs="$SSL_LIBRARY --with-plugins=max --with-plugin-ndbcluster --with-emb
|
||||
alpha_cflags="$check_cpu_cflags -Wa,-m$cpu_flag"
|
||||
amd64_cflags="$check_cpu_cflags"
|
||||
amd64_cxxflags="" # If dropping '--with-big-tables', add here "-DBIG_TABLES"
|
||||
pentium_cflags="$check_cpu_cflags"
|
||||
pentium_cflags="$check_cpu_cflags -m32"
|
||||
pentium64_cflags="$check_cpu_cflags -m64"
|
||||
ppc_cflags="$check_cpu_cflags"
|
||||
sparc_cflags=""
|
||||
|
11
BUILD/compile-amd64-debug-wsrep
Normal file
11
BUILD/compile-amd64-debug-wsrep
Normal file
@ -0,0 +1,11 @@
|
||||
#! /bin/sh
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$amd64_cflags $debug_cflags -g -O0 $wsrep_cflags"
|
||||
c_warnings="$c_warnings $debug_extra_warnings"
|
||||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||
extra_configs="$amd64_configs $debug_configs $wsrep_configs --with-wsrep"
|
||||
|
||||
. "$path/FINISH.sh"
|
9
BUILD/compile-amd64-wsrep
Normal file
9
BUILD/compile-amd64-wsrep
Normal file
@ -0,0 +1,9 @@
|
||||
#! /bin/sh
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$amd64_cflags $fast_cflags -g $wsrep_cflags"
|
||||
extra_configs="$amd64_configs $wsrep_configs --with-wsrep"
|
||||
|
||||
. "$path/FINISH.sh"
|
12
BUILD/compile-pentium-debug-wsrep
Normal file
12
BUILD/compile-pentium-debug-wsrep
Normal file
@ -0,0 +1,12 @@
|
||||
#! /bin/sh -x
|
||||
|
||||
path=`dirname $0`
|
||||
set -- "$@" --with-debug=full
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $debug_cflags -g -O0 $wsrep_cflags"
|
||||
c_warnings="$c_warnings $debug_extra_warnings"
|
||||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||
extra_configs="$pentium_configs $debug_configs $wsrep_configs --with-wsrep"
|
||||
|
||||
. "$path/FINISH.sh"
|
11
BUILD/compile-pentium-wsrep
Normal file
11
BUILD/compile-pentium-wsrep
Normal file
@ -0,0 +1,11 @@
|
||||
#! /bin/sh
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium_cflags $fast_cflags $wsrep_cflags"
|
||||
extra_configs="$pentium_configs $wsrep_configs --with-wsrep"
|
||||
|
||||
#strip=yes
|
||||
|
||||
. "$path/FINISH.sh"
|
28
BUILD/compile-pentium64-wsrep
Normal file
28
BUILD/compile-pentium64-wsrep
Normal file
@ -0,0 +1,28 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (C) 2006, 2007 MySQL AB
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU Library General Public
|
||||
# License as published by the Free Software Foundation; version 2
|
||||
# of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# Library General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Library General Public
|
||||
# License along with this library; if not, write to the Free
|
||||
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
# MA 02111-1307, USA
|
||||
|
||||
path=`dirname $0`
|
||||
. "$path/SETUP.sh"
|
||||
|
||||
extra_flags="$pentium64_cflags $fast_cflags -g $wsrep_cflags"
|
||||
extra_configs="$pentium_configs $static_link $wsrep_configs --with-wsrep"
|
||||
CC="$CC --pipe"
|
||||
strip=yes
|
||||
|
||||
. "$path/FINISH.sh"
|
@ -158,6 +158,7 @@ INCLUDE(ctest)
|
||||
INCLUDE(plugin)
|
||||
INCLUDE(install_macros)
|
||||
INCLUDE(mysql_add_executable)
|
||||
INCLUDE(wsrep)
|
||||
|
||||
# Handle options
|
||||
OPTION(DISABLE_SHARED
|
||||
@ -235,6 +236,12 @@ OPTION(ENABLED_LOCAL_INFILE
|
||||
OPTION(WITH_FAST_MUTEXES "Compile with fast mutexes" OFF)
|
||||
MARK_AS_ADVANCED(WITH_FAST_MUTEXES)
|
||||
|
||||
OPTION(WITH_INNODB_DISALLOW_WRITES "InnoDB freeze writes patch from Google" ${WITH_WSREP})
|
||||
IF (WITH_INNODB_DISALLOW_WRITES)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWITH_INNODB_DISALLOW_WRITES")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DWITH_INNODB_DISALLOW_WRITES")
|
||||
ENDIF()
|
||||
|
||||
# Set DBUG_OFF and other optional release-only flags for non-debug project types
|
||||
FOREACH(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
|
||||
FOREACH(LANG C CXX)
|
||||
@ -369,6 +376,9 @@ ADD_SUBDIRECTORY(vio)
|
||||
ADD_SUBDIRECTORY(mysys)
|
||||
ADD_SUBDIRECTORY(mysys_ssl)
|
||||
ADD_SUBDIRECTORY(libmysql)
|
||||
IF(WITH_WSREP)
|
||||
ADD_SUBDIRECTORY(wsrep)
|
||||
ENDIF()
|
||||
ADD_SUBDIRECTORY(client)
|
||||
ADD_SUBDIRECTORY(extra)
|
||||
ADD_SUBDIRECTORY(libservices)
|
||||
@ -447,6 +457,7 @@ INSTALL_DOCUMENTATION(${CMAKE_BINARY_DIR}/Docs/INFO_SRC
|
||||
|
||||
IF(UNIX)
|
||||
INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY COMPONENT Readme)
|
||||
INSTALL_DOCUMENTATION(Docs/INSTALL-BINARY Docs/README-wsrep COMPONENT Readme)
|
||||
ENDIF()
|
||||
|
||||
INCLUDE(CPack)
|
||||
|
488
Docs/README-wsrep
Normal file
488
Docs/README-wsrep
Normal file
@ -0,0 +1,488 @@
|
||||
Codership Oy
|
||||
http://www.codership.com
|
||||
<info@codership.com>
|
||||
|
||||
DISCLAIMER
|
||||
|
||||
THIS SOFTWARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
|
||||
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
IN NO EVENT SHALL CODERSHIP OY BE HELD LIABLE TO ANY PARTY FOR ANY DAMAGES
|
||||
RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE.
|
||||
|
||||
Trademark Information.
|
||||
|
||||
MySQL is a trademark or registered trademark of Oracle and/or its affiliates.
|
||||
Other trademarks are the property of their respective owners.
|
||||
|
||||
Licensing Information.
|
||||
|
||||
Please see file COPYING that came with this distribution
|
||||
|
||||
Source code can be found at
|
||||
wsrep API: https://launchpad.net/wsrep
|
||||
MySQL patch: https://launchpad.net/codership-mysql
|
||||
|
||||
|
||||
ABOUT THIS DOCUMENT
|
||||
|
||||
This document covers installation and configuration issues specific to this
|
||||
wsrep-patched MySQL distribution by Codership. It does not cover the use or
|
||||
administration of MySQL server per se. The reader is assumed to know how to
|
||||
install, configure, administer and use standard MySQL server version 5.1.xx.
|
||||
|
||||
|
||||
MYSQL-5.5.x/wsrep-23.x
|
||||
|
||||
CONTENTS:
|
||||
=========
|
||||
1. WHAT IS WSREP PATCH FOR MYSQL
|
||||
2. INSTALLATION
|
||||
3. FIRST TIME SETUP
|
||||
3.1 CONFIGURATION FILES
|
||||
3.2 DATABASE PRIVILEGES
|
||||
3.3 CHECK AND CORRECT FIREWALL SETTINGS
|
||||
3.4 SELINUX
|
||||
3.5 APPARMOR
|
||||
3.6 CONNECT TO CLUSTER
|
||||
4. UPGRADING FROM MySQL 5.1.x
|
||||
5. CONFIGURATION OPTIONS
|
||||
5.1 MANDATORY MYSQL OPTIONS
|
||||
5.2 WSREP OPTIONS
|
||||
6. ONLINE SCHEMA UPGRADE
|
||||
6.1 TOTAL ORDER ISOLATION (TOI)
|
||||
6.2 ROLLING SCHEMA UPGRADE (RSU)
|
||||
7. LIMITATIONS
|
||||
|
||||
|
||||
1. WHAT IS WSREP PATCH FOR MYSQL/INNODB
|
||||
|
||||
Wsrep API developed by Codership Oy is a modern generic (database-agnostic)
|
||||
replication API for transactional databases with a goal to make database
|
||||
replication/logging subsystem completely modular and pluggable. It is developed
|
||||
with flexibility and completeness in mind to satisfy broad range of modern
|
||||
replication scenarios. It is equally suitable for synchronous and asynchronous,
|
||||
master-slave and multi-master replication.
|
||||
|
||||
wsrep stands for Write Set REPlication.
|
||||
|
||||
Wsrep patch for MySQL/InnoDB allows MySQL server to load and use various wsrep
|
||||
API implementations ("wsrep providers") with different qualities of service.
|
||||
Without wsrep provider MySQL-wsrep server will function like a regular
|
||||
standalone server.
|
||||
|
||||
|
||||
2. INSTALLATION
|
||||
|
||||
In the examples below mysql authentication options are omitted for brevity.
|
||||
|
||||
2.1 Download and install mysql-wsrep package.
|
||||
|
||||
Download binary package for your Linux distribution from
|
||||
https://launchpad.net/codership-mysql/
|
||||
|
||||
2.1.1 On Debian and Debian-derived distributions.
|
||||
|
||||
Upgrade from mysql-server-5.0 to mysql-wsrep is not supported yet, please
|
||||
upgrade to mysql-server-5.1 first.
|
||||
|
||||
If you're installing over an existing mysql installation, mysql-server-wsrep
|
||||
will conflict with mysql-server-5.1 package, so remove it first:
|
||||
|
||||
$ sudo apt-get remove mysql-server-5.1 mysql-server-core-5.1
|
||||
|
||||
mysql-server-wsrep requires psmisc and mysql-client-5.1.47 (or later).
|
||||
MySQL 5.1 packages can be found from backports repositories.
|
||||
For further information about configuring and using Debian or Ubuntu
|
||||
backports, see:
|
||||
|
||||
* http://backports.debian.org
|
||||
|
||||
* https://help.ubuntu.com/community/UbuntuBackports
|
||||
|
||||
For example, installation of required packages on Debian Lenny:
|
||||
|
||||
$ sudo apt-get install psmisc
|
||||
$ sudo apt-get -t lenny-backports install mysql-client-5.1
|
||||
|
||||
Now you should be able to install mysql-wsrep package:
|
||||
|
||||
$ sudo dpkg -i <mysql-server-wsrep DEB>
|
||||
|
||||
2.1.2 On CentOS and similar RPM-based distributions.
|
||||
|
||||
If you're migrating from existing MySQL installation, there are two variants:
|
||||
|
||||
a) If you're already using official MySQL-server-community 5.1.x RPM from
|
||||
Oracle:
|
||||
|
||||
# rpm -e mysql-server
|
||||
|
||||
b) If you're upgrading from the stock mysql-5.0.77 on CentOS:
|
||||
|
||||
1) Make sure that the following packages are not installed:
|
||||
# rpm --nodeps --allmatches -e mysql-server mysql-test mysql-bench
|
||||
|
||||
2) Install *official* MySQL-shared-compat-5.1.x from
|
||||
http://dev.mysql.com/downloads/mysql/5.1.html
|
||||
|
||||
Actual installation:
|
||||
|
||||
# rpm -Uvh <MySQL-server-wsrep RPM>
|
||||
|
||||
If this fails due to unsatisfied dependencies, install missing packages
|
||||
(e.g. yum install perl-DBI) and retry.
|
||||
|
||||
Additional packages to consider (if not yet installed):
|
||||
* galera (multi-master replication provider, https://launchpad.net/galera)
|
||||
* MySQL-client-community (for connecting to server and mysqldump-based SST)
|
||||
* rsync (for rsync-based SST)
|
||||
* xtrabackup and nc (for xtrabackup-based SST)
|
||||
|
||||
2.2 Upgrade system tables.
|
||||
|
||||
If you're upgrading a previous MySQL installation, it might be advisable to
|
||||
upgrade system tables. To do that start mysqld and run mysql_upgrade command.
|
||||
Consult MySQL documentation in case of errors. Normally they are not critical
|
||||
and can be ignored unless specific functionality is needed.
|
||||
|
||||
|
||||
3. FIRST TIME SETUP
|
||||
|
||||
Unless you're upgrading an already installed mysql-wsrep package, you will need
|
||||
to set up a few things to prepare server for operation.
|
||||
|
||||
3.1 CONFIGURATION FILES
|
||||
|
||||
* Make sure system-wide my.cnf does not bind mysqld to 127.0.0.1. That is, if
|
||||
you have the following line in [mysqld] section, comment it out:
|
||||
|
||||
#bind-address = 127.0.0.1
|
||||
|
||||
* Make sure system-wide my.cnf contains "!includedir /etc/mysql/conf.d/" line.
|
||||
|
||||
* Edit /etc/mysql/conf.d/wsrep.cnf and set wsrep_provider option by specifying
|
||||
a path to provider library. If you don't have a provider, leave it as it is.
|
||||
|
||||
* When a new node joins the cluster it'll have to receive a state snapshot from
|
||||
one of the peers. This requires a privileged MySQL account with access from
|
||||
the rest of the cluster. Edit /etc/mysql/conf.d/wsrep.cnf and set mysql
|
||||
login/password pair for SST, for example:
|
||||
|
||||
wsrep_sst_auth=wsrep_sst:wspass
|
||||
|
||||
* See CONFIGURATION section below about other configuration parameters that you
|
||||
might want to change at this point.
|
||||
|
||||
3.2 DATABASE PRIVILEGES
|
||||
|
||||
Restart MySQL server and connect to it as root to grant privileges to SST
|
||||
account (empty users confuse MySQL authentication matching rules, we need to
|
||||
delete them too):
|
||||
|
||||
$ mysql -e "SET wsrep_on=OFF; DELETE FROM mysql.user WHERE user='';"
|
||||
$ mysql -e "SET wsrep_on=OFF; GRANT ALL ON *.* TO wsrep_sst@'%' IDENTIFIED BY 'wspass'";
|
||||
|
||||
3.3 CHECK AND CORRECT FIREWALL SETTINGS.
|
||||
|
||||
MySQL-wsrep server needs to be accessible from other cluster members through
|
||||
its client listening socket and through wsrep provider socket. See your
|
||||
distribution and wsrep provider documentation for details. For example on
|
||||
CentOS you might need to do something along these lines:
|
||||
|
||||
# iptables --insert RH-Firewall-1-INPUT 1 --proto tcp --source <my IP>/24 --destination <my IP>/32 --dport 3306 -j ACCEPT
|
||||
# iptables --insert RH-Firewall-1-INPUT 1 --proto tcp --source <my IP>/24 --destination <my IP>/32 --dport 4567 -j ACCEPT
|
||||
|
||||
If there is a NAT firewall between the nodes, it must be configured to allow
|
||||
direct connections between the nodes (e.g. via port forwarding).
|
||||
|
||||
3.4 SELINUX
|
||||
|
||||
If you have SELinux enabled, it may block mysqld from doing required operations.
|
||||
You'll need to either disable it or configure to allow mysqld to run external
|
||||
programs and open listen sockets at unprivileged ports (i.e. things that
|
||||
an unprivileged user can do). See SELinux documentation about it.
|
||||
|
||||
To quickly disable SELinux:
|
||||
1) run 'setenforce 0' as root.
|
||||
2) set 'SELINUX=permissive' in /etc/selinux/config
|
||||
|
||||
3.5 APPARMOR
|
||||
|
||||
AppArmor automatically comes with Ubuntu and may also prevent mysqld to from
|
||||
opening additional ports or run scripts. See AppArmor documentation about its
|
||||
configuration. To disable AppArmor for mysqld:
|
||||
|
||||
$ cd /etc/apparmor.d/disable/
|
||||
$ sudo ln -s /etc/apparmor.d/usr.sbin.mysqld
|
||||
$ sudo service apparmor restart
|
||||
|
||||
|
||||
3.6 CONNECT TO CLUSTER
|
||||
|
||||
Now you're ready to connect to cluster by setting wsrep_cluster_address variable
|
||||
and monitor status of wsrep provider:
|
||||
|
||||
mysql> SET GLOBAL wsrep_cluster_address='<cluster address string>';
|
||||
mysql> SHOW STATUS LIKE 'wsrep%';
|
||||
|
||||
|
||||
4 UPGRADING FROM MySQL 5.1.x
|
||||
|
||||
!!! THESE INSTRUCTIONS ARE PRELIMINARY AND INCOMPLETE !!!
|
||||
|
||||
1) BEFORE UPGRADE (while running 5.1.x):
|
||||
- comment out 'wsrep_provider' setting from configuration files
|
||||
(my.cnf and/or wsrep.cnf)
|
||||
- If performing a rolling upgrade on a running cluster, set
|
||||
wsrep_sst_method=mysqldump.
|
||||
You might also need to configure wsrep_sst_receive_address and
|
||||
wsrep_sst_auth appropriately. mysqldump is the only way to transfer data
|
||||
from 5.1.x to 5.5.x reliably.
|
||||
- remove innodb_plugin settings from configuration files.
|
||||
|
||||
2) Perform upgrade as usual:
|
||||
http://dev.mysql.com/doc/refman/5.5/en/upgrading-from-previous-series.html
|
||||
Don't forget to run 'mysql_upgrade' command.
|
||||
|
||||
3) AFTER UPGRADING individual node:
|
||||
- uncomment 'wsrep_provider' line in configuration file.
|
||||
- restart the server and join the cluster.
|
||||
|
||||
4) AFTER UPGRADING the whole cluster:
|
||||
- revert to usual wsrep SST settings if not 'mysqldump'.
|
||||
|
||||
|
||||
5. CONFIGURATION OPTIONS
|
||||
|
||||
5.1 MANDATORY MYSQL OPTIONS
|
||||
|
||||
binlog_format=ROW
|
||||
This option is required to use row-level replication as opposed to
|
||||
statement-level. For performance and consistency considerations don't change
|
||||
that. As a side effect, binlog, if turned on, can be ROW only. In future this
|
||||
option won't have special meaning.
|
||||
|
||||
innodb_autoinc_lock_mode=2
|
||||
This is a required parameter. Without it INSERTs into tables with
|
||||
AUTO_INCREMENT column may fail.
|
||||
autoinc lock modes 0 and 1 can cause unresolved deadlock, and make
|
||||
system unresponsive.
|
||||
|
||||
innodb_locks_unsafe_for_binlog=1
|
||||
This option is required for parallel applying.
|
||||
|
||||
5.2 WSREP OPTIONS
|
||||
|
||||
All options are optional except for wsrep_provider, wsrep_cluster_address, and
|
||||
wsrep_sst_auth.
|
||||
|
||||
wsrep_provider=none
|
||||
A full path to the library that implements WSREP interface. If none is
|
||||
specified, the server behaves like a regular mysqld.
|
||||
|
||||
wsrep_provider_options=
|
||||
Provider-specific option string. Check wsrep provider documentation or
|
||||
http://www.codership.com/wiki
|
||||
|
||||
wsrep_cluster_address=
|
||||
Provider-specific cluster address string. This is used to connect a node to
|
||||
the desired cluster. This option can be given either on mysqld startup or set
|
||||
during runtime. See wsrep provider documentation for possible values.
|
||||
|
||||
wsrep_cluster_name="my_wsrep_cluster"
|
||||
Logical cluster name, must be the same for all nodes of the cluster.
|
||||
|
||||
wsrep_node_address=
|
||||
An option to explicitly specify the network address of the node in the form
|
||||
<address>[:port] if autoguessing for some reason does not produce desirable
|
||||
results (multiple network interfaces, NAT, etc.)
|
||||
If not explicitly overridden by wsrep_sst_receive_address, the <address> part
|
||||
will be used to listen for SST (see below). And the whole <address>[:port]
|
||||
will be passed to wsrep provider to be used as a base address in its
|
||||
communications.
|
||||
|
||||
wsrep_node_name=
|
||||
Human readable node name (for easier log reading only). Defaults to hostname.
|
||||
|
||||
wsrep_slave_threads=1
|
||||
Number of threads dedicated to processing of writesets from other nodes.
|
||||
For best performance should be few per CPU core.
|
||||
|
||||
wsrep_dbug_option
|
||||
Options for the built-in DBUG library (independent from what MySQL uses).
|
||||
Empty by default. Not currently in use.
|
||||
|
||||
wsrep_debug=0
|
||||
Enable debug-level logging.
|
||||
|
||||
wsrep_convert_LOCK_to_trx=0
|
||||
Implicitly convert locking sessions into transactions inside mysqld. By
|
||||
itself it does not mean support for locking sessions, but it prevents the
|
||||
database from going into logically inconsistent state. Note however, that
|
||||
loading large database dump with LOCK statements might result in abnormally
|
||||
large transactions and cause an out-of-memory condition
|
||||
|
||||
wsrep_retry_autocommit=1
|
||||
Retry autocommit queries and single statement transactions should they fail
|
||||
certification test. This is analogous to rescheduling an autocommit query
|
||||
should it go into deadlock with other transactions in the database lock
|
||||
manager.
|
||||
|
||||
wsrep_auto_increment_control=1
|
||||
Automatically adjust auto_increment_increment and auto_increment_offset
|
||||
variables based on the number of nodes in the cluster. Significantly reduces
|
||||
certification conflict rate for INSERTS.
|
||||
|
||||
wsrep_drupal_282555_workaround=1
|
||||
MySQL seems to have an obscure bug when INSERT into table with
|
||||
AUTO_INCREMENT column with NULL value for that column can fail with a
|
||||
duplicate key error. When this option is on, it retries such INSERTs.
|
||||
Required for stable Drupal operation. Documented at:
|
||||
http://bugs.mysql.com/bug.php?id=41984
|
||||
http://drupal.org/node/282555
|
||||
|
||||
wsrep_causal_reads=0
|
||||
Enforce strict READ COMMITTED semantics on reads and transactions. May
|
||||
result in additional latencies. It is a session variable.
|
||||
|
||||
wsrep_OSU_method=TOI
|
||||
Online Schema Upgrade (OSU) can be performed with two alternative methods:
|
||||
Total Order Isolation (TOI) runs DDL statement in all cluster nodes in
|
||||
same total order sequence locking the affected table for the duration of the
|
||||
operation. This may result in the whole cluster being blocked for the
|
||||
duration of the operation.
|
||||
Rolling Schema Upgrade (RSU) executes the DDL statement only locally, thus
|
||||
blocking only one cluster node. During the DDL processing, the node
|
||||
is not replicating and may be unable to process replication events (due to
|
||||
table lock). Once DDL operation is complete, the node will catch up and sync
|
||||
with the cluster to become fully operational again. The DDL statement or
|
||||
its effects are not replicated, so it is user's responsibility to manually
|
||||
perform this operation on each of the nodes.
|
||||
|
||||
wsrep_forced_binlog_format=none
|
||||
Force every transaction to use given binlog format. When this variable is
|
||||
set to something else than NONE, all transactions will use the given forced
|
||||
format, regardless of what the client session has specified in binlog_format.
|
||||
Valid choices for wsrep_forced_binlog_format are: ROW, STATEMENT, MIXED and
|
||||
special value NONE, meaning that there is no forced binlog format in effect.
|
||||
This variable was intruduced to support STATEMENT format replication during
|
||||
rolling schema upgrade processing. However, in most cases ROW replication
|
||||
is valid for asymmetrict schema replication.
|
||||
|
||||
State snapshot transfer options.
|
||||
|
||||
When a new node joins the cluster it has to synchronize its initial state with
|
||||
the other cluster members by transferring state snapshot from one of them.
|
||||
The options below govern how this happens and should be set up before attempting
|
||||
to join or start a cluster.
|
||||
|
||||
wsrep_sst_method=rsync
|
||||
What method to use to copy database state to a newly joined node. Supported
|
||||
methods:
|
||||
- mysqldump: slow (except for small datasets) but allows for upgrade
|
||||
between major MySQL versions or InnoDB features.
|
||||
- rsync: much faster on large datasets (default).
|
||||
- rsync_wan: same as rsync but with deltaxfer to minimize network traffic.
|
||||
- xtrabackup: very fast and practically non-blocking SST method based on
|
||||
Percona's xtrabackup tool.
|
||||
|
||||
(for xtrabackup to work the following settings must be present in my.cnf
|
||||
on all nodes:
|
||||
[mysqld]
|
||||
wsrep_sst_auth=root:<root password>
|
||||
datadir=<path to data dir>
|
||||
[client]
|
||||
socket=<path to socket>
|
||||
)
|
||||
|
||||
wsrep_sst_receive_address=
|
||||
Address (hostname:port) at which this node wants to receive state snapshot.
|
||||
Defaults to mysqld bind address, and if that is not specified (0.0.0.0) -
|
||||
to the first IP of eth0 + mysqld bind port.
|
||||
NOTE: check that your firewall allows connections to this address from other
|
||||
cluster nodes.
|
||||
|
||||
wsrep_sst_auth=
|
||||
Authentication information needed for state transfer. Depends on the state
|
||||
transfer method. For mysqldump-based SST it is
|
||||
<mysql_root_user>:<mysql_root_password>
|
||||
and should be the same on all nodes - it is used to authenticate with both
|
||||
state snapshot receiver and state snapshot donor.
|
||||
|
||||
wsrep_sst_donor=
|
||||
A name of the node which should serve as state snapshot donor. This allows
|
||||
to control which node will serve state snapshot request. By default the
|
||||
most suitable node is chosen by wsrep provider. This is the same as given in
|
||||
wsrep_node_name.
|
||||
|
||||
|
||||
6. ONLINE SCHEMA UPGRADE
|
||||
|
||||
Schema upgrades mean any data definition statements (DDL statemnents) run
|
||||
for the database. They change the database structure and are non-
|
||||
transactional.
|
||||
|
||||
Release 22.3 brings a new method for performing schema upgrades. User can
|
||||
now choose whether to use the traditional total order isolation or new
|
||||
rolling schema upgrade method. The OSU method choice is done by global
|
||||
parameter: 'wsrep_OSU_method'.
|
||||
|
||||
6.1 Total Order Isolation (TOI)
|
||||
|
||||
With earlier releases, DDL processing happened always by Total Order
|
||||
Isolation (TOI) method. With TOI, the DDL was scheduled to be processed in
|
||||
same transaction seqeuncing 'slot' in each cluster node.
|
||||
The processing is secured by locking the affected table from any other use.
|
||||
With TOI method, the whole cluster has part of the database locked for the
|
||||
duration of the DDL processing.
|
||||
|
||||
6.2 Rolling Schema Upgrade (RSU)
|
||||
|
||||
Rolling schema upgrade is new DDL processing method, where DDL will be
|
||||
processed locally for the node. The node is disconnected of the replication
|
||||
for the duration of the DDL processing, so that there is only DDL statement
|
||||
processing in the node and it does not block the rest of the cluster. When
|
||||
the DDL processing is complete, the node applies delayed replication events
|
||||
and synchronizes back with the cluster.
|
||||
The DDL can then be executed cluster-wide by running the same DDL statement
|
||||
for each node in turn. When this rolling schema upgrade proceeds, part of
|
||||
the cluster will have old schema structure and part of the cluster will have
|
||||
new schema structure.
|
||||
|
||||
|
||||
7. LIMITATIONS
|
||||
|
||||
1) Currently replication works only with InnoDB storage engine. Any writes to
|
||||
tables of other types, including system (mysql.*) tables are not replicated.
|
||||
However, DDL statements are replicated in statement level, and changes
|
||||
to mysql.* tables will get replicated that way.
|
||||
So, you can safely issue: CREATE USER...,
|
||||
but issuing: INSERT INTO mysql.user..., will not be replicated.
|
||||
|
||||
2) DELETE operation is unsupported on tables without primary key. Also rows in
|
||||
tables without primary key may appear in different order on different nodes.
|
||||
As a result SELECT...LIMIT... may return slightly different sets.
|
||||
|
||||
3) Unsupported queries:
|
||||
* LOCK/UNLOCK TABLES cannot be supported in multi-master setups.
|
||||
* lock functions (GET_LOCK(), RELEASE_LOCK()... )
|
||||
|
||||
4) Query log cannot be directed to table. If you enable query logging,
|
||||
you must forward the log to a file:
|
||||
log_output = FILE
|
||||
Use general_log and general_log_file to choose query logging and the
|
||||
log file name
|
||||
|
||||
5) Maximum allowed transaction size is defined by wsrep_max_ws_rows and
|
||||
wsrep_max_ws_size. Anything bigger (e.g. huge LOAD DATA) will be rejected.
|
||||
|
||||
6) Due to cluster level optimistic concurrency control, transaction issuing
|
||||
COMMIT may still be aborted at that stage. There can be two transactions.
|
||||
writing to same rows and committing in separate cluster nodes, and only one
|
||||
of the them can successfully commit. The failing one will be aborted.
|
||||
For cluster level aborts, MySQL/galera cluster gives back deadlock error.
|
||||
code (Error: 1213 SQLSTATE: 40001 (ER_LOCK_DEADLOCK)).
|
||||
|
||||
7) XA transactions can not be supported due to possible rollback on commit.
|
||||
|
@ -92,6 +92,7 @@ enum options_client
|
||||
OPT_REPORT_PROGRESS,
|
||||
OPT_SKIP_ANNOTATE_ROWS_EVENTS,
|
||||
OPT_SSL_CRL, OPT_SSL_CRLPATH,
|
||||
OPT_GALERA_SST_MODE,
|
||||
OPT_MAX_CLIENT_OPTION /* should be always the last */
|
||||
};
|
||||
|
||||
|
@ -523,7 +523,12 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res,
|
||||
int ret;
|
||||
File fd;
|
||||
char query_file_path[FN_REFLEN];
|
||||
#ifdef WITH_WSREP
|
||||
/* Note: wsrep_on=ON implicitly enables binary logging. */
|
||||
const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0, WSREP_ON=OFF;";
|
||||
#else
|
||||
const uchar sql_log_bin[]= "SET SQL_LOG_BIN=0;";
|
||||
#endif /* WITH_WSREP */
|
||||
|
||||
DBUG_ENTER("run_query");
|
||||
DBUG_PRINT("enter", ("query: %s", query));
|
||||
|
@ -731,9 +731,15 @@ static int use_db(char *database)
|
||||
DBUG_RETURN(0);
|
||||
} /* use_db */
|
||||
|
||||
/* Do not send commands to replication slaves. */
|
||||
static int disable_binlog()
|
||||
{
|
||||
#ifdef WITH_WSREP
|
||||
/* Additionally turn off @@wsrep_on to disable implicit binary logging. */
|
||||
const char *stmt= "SET SQL_LOG_BIN=0, WSREP_ON=OFF";
|
||||
#else
|
||||
const char *stmt= "SET SQL_LOG_BIN=0";
|
||||
#endif /* WITH_WSREP */
|
||||
return run_query(stmt);
|
||||
}
|
||||
|
||||
|
@ -111,6 +111,7 @@ static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0,
|
||||
opt_slave_apply= 0,
|
||||
opt_include_master_host_port= 0,
|
||||
opt_events= 0, opt_comments_used= 0,
|
||||
opt_galera_sst_mode= 0,
|
||||
opt_alltspcs=0, opt_notspcs= 0;
|
||||
static my_bool insert_pat_inited= 0, debug_info_flag= 0, debug_check_flag= 0;
|
||||
static ulong opt_max_allowed_packet, opt_net_buffer_length;
|
||||
@ -346,6 +347,14 @@ static struct my_option my_long_options[] =
|
||||
{"force", 'f', "Continue even if we get an SQL error.",
|
||||
&ignore_errors, &ignore_errors, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"galera-sst-mode", OPT_GALERA_SST_MODE,
|
||||
"This mode should normally be used in mysqldump snapshot state transfer "
|
||||
"(SST) in a Galera cluster. If enabled, mysqldump additionally dumps "
|
||||
"commands to turn off binary logging and SET global gtid_binlog_state "
|
||||
"with the current value. Note: RESET MASTER needs to be executed on the "
|
||||
"server receiving the resulting dump.",
|
||||
&opt_galera_sst_mode, &opt_galera_sst_mode, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||
0, 0, 0},
|
||||
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"hex-blob", OPT_HEXBLOB, "Dump binary strings (BINARY, "
|
||||
@ -4799,6 +4808,42 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
} /* dump_selected_tables */
|
||||
|
||||
|
||||
/**
|
||||
Add the following statements to the generated dump:
|
||||
a) SET @@session.sql_log_bin=OFF;
|
||||
b) SET @@global.gtid_binlog_state='[N-N-N,...]'
|
||||
*/
|
||||
static int wsrep_set_sst_cmds(MYSQL *mysql) {
|
||||
MYSQL_RES *res;
|
||||
MYSQL_ROW row;
|
||||
|
||||
if (mysql_get_server_version(mysql) < 100005) {
|
||||
/* @@gtid_binlog_state does not exist. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (mysql_query_with_error_report(mysql, &res, "SELECT "
|
||||
"@@global.gtid_binlog_state"))
|
||||
return 1;
|
||||
|
||||
if (mysql_num_rows(res) != 1)
|
||||
/* No entry for @@global.gtid_binlog_state, nothing needs to be done. */
|
||||
return 0;
|
||||
|
||||
if (!(row= mysql_fetch_row(res)) || !(char *)row[0])
|
||||
return 1;
|
||||
|
||||
/* first, add a command to turn off binary logging, */
|
||||
fprintf(md_result_file, "SET @@session.sql_log_bin=OFF;\n");
|
||||
|
||||
/* followed by, a command to set global gtid_binlog_state. */
|
||||
fprintf(md_result_file, "SET @@global.gtid_binlog_state='%s';\n",
|
||||
(char*)row[0]);
|
||||
|
||||
mysql_free_result(res);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
@ -5743,6 +5788,10 @@ int main(int argc, char **argv)
|
||||
/* Add 'STOP SLAVE to beginning of dump */
|
||||
if (opt_slave_apply && add_stop_slave())
|
||||
goto err;
|
||||
|
||||
if (opt_galera_sst_mode && wsrep_set_sst_cmds(mysql))
|
||||
goto err;
|
||||
|
||||
if (opt_master_data && do_show_master_status(mysql, consistent_binlog_pos))
|
||||
goto err;
|
||||
if (opt_slave_data && do_show_slave_status(mysql))
|
||||
|
@ -147,9 +147,10 @@ SETA(CPACK_RPM_test_PACKAGE_OBSOLETES
|
||||
SETA(CPACK_RPM_test_PACKAGE_PROVIDES
|
||||
"MySQL-test")
|
||||
|
||||
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
|
||||
${CPACK_RPM_PACKAGE_REQUIRES}
|
||||
"MariaDB-client")
|
||||
SETA(CPACK_RPM_server_PACKAGE_REQUIRES
|
||||
"${CPACK_RPM_PACKAGE_REQUIRES}"
|
||||
"MariaDB-client" "galera" "rsync" "lsof" "socat" "grep" "gawk" "iproute"
|
||||
"coreutils" "findutils")
|
||||
|
||||
SET(CPACK_RPM_server_PRE_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-prein.sh)
|
||||
SET(CPACK_RPM_server_PRE_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/server-preun.sh)
|
||||
|
@ -153,6 +153,14 @@ MACRO(MYSQL_ADD_PLUGIN)
|
||||
ADD_DEPENDENCIES(${target}_embedded GenError)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF (WITH_WSREP)
|
||||
# Set compile definitions for non-embedded plugins
|
||||
LIST(APPEND wsrep_definitions "WITH_WSREP")
|
||||
LIST(APPEND wsrep_definitions "WSREP_PROC_INFO")
|
||||
SET_TARGET_PROPERTIES(${target} PROPERTIES
|
||||
COMPILE_DEFINITIONS "${wsrep_definitions}")
|
||||
ENDIF()
|
||||
|
||||
IF(ARG_STATIC_OUTPUT_NAME)
|
||||
SET_TARGET_PROPERTIES(${target} PROPERTIES
|
||||
@ -185,8 +193,17 @@ MACRO(MYSQL_ADD_PLUGIN)
|
||||
ADD_VERSION_INFO(${target} MODULE SOURCES)
|
||||
ADD_LIBRARY(${target} MODULE ${SOURCES})
|
||||
DTRACE_INSTRUMENT(${target})
|
||||
|
||||
LIST(APPEND dyn_compile_definitions "MYSQL_DYNAMIC_PLUGIN")
|
||||
|
||||
IF (WITH_WSREP)
|
||||
LIST(APPEND dyn_compile_definitions "WITH_WSREP")
|
||||
LIST(APPEND dyn_compile_definitions "WSREP_PROC_INFO")
|
||||
ENDIF()
|
||||
|
||||
SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX ""
|
||||
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN")
|
||||
COMPILE_DEFINITIONS "${dyn_compile_definitions}")
|
||||
|
||||
TARGET_LINK_LIBRARIES (${target} mysqlservices ${ARG_LINK_LIBRARIES})
|
||||
|
||||
# Plugin uses symbols defined in mysqld executable.
|
||||
@ -207,7 +224,8 @@ MACRO(MYSQL_ADD_PLUGIN)
|
||||
OUTPUT_NAME "${ARG_MODULE_OUTPUT_NAME}")
|
||||
# Install dynamic library
|
||||
IF(ARG_COMPONENT)
|
||||
IF(CPACK_COMPONENTS_ALL AND NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT})
|
||||
IF(CPACK_COMPONENTS_ALL AND
|
||||
NOT CPACK_COMPONENTS_ALL MATCHES ${ARG_COMPONENT})
|
||||
SET(CPACK_COMPONENTS_ALL ${CPACK_COMPONENTS_ALL} ${ARG_COMPONENT} PARENT_SCOPE)
|
||||
SET(CPACK_RPM_${ARG_COMPONENT}_PACKAGE_REQUIRES "MariaDB-server" PARENT_SCOPE)
|
||||
|
||||
|
76
cmake/wsrep.cmake
Normal file
76
cmake/wsrep.cmake
Normal file
@ -0,0 +1,76 @@
|
||||
# Copyright (c) 2011, Codership Oy <info@codership.com>.
|
||||
# Copyright (c) 2013, Monty Program Ab.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# We need to generate a proper spec file even without --with-wsrep flag,
|
||||
# so WSREP_VERSION is produced regardless
|
||||
|
||||
# Set the patch version
|
||||
SET(WSREP_PATCH_VERSION "10")
|
||||
|
||||
# MariaDB addition: Revision number of the last revision merged from
|
||||
# codership branch visible in @@visible_comment.
|
||||
# Branch : codership-mysql/5.6
|
||||
SET(WSREP_PATCH_REVNO "4123") # Should be updated on every merge.
|
||||
|
||||
# MariaDB addition: Revision number of the last revision merged from
|
||||
# Branch : lp:maria/maria-10.0-galera
|
||||
SET(WSREP_PATCH_REVNO2 "3867") # Should be updated on every merge.
|
||||
|
||||
# MariaDB: Obtain patch revision number:
|
||||
# Update WSREP_PATCH_REVNO if WSREP_REV environment variable is set.
|
||||
IF (DEFINED ENV{WSREP_REV})
|
||||
SET(WSREP_PATCH_REVNO $ENV{WSREP_REV})
|
||||
ENDIF()
|
||||
|
||||
# Obtain wsrep API version
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND sh -c "grep WSREP_INTERFACE_VERSION ${MySQL_SOURCE_DIR}/wsrep/wsrep_api.h | cut -d '\"' -f 2"
|
||||
OUTPUT_VARIABLE WSREP_API_VERSION
|
||||
RESULT_VARIABLE RESULT
|
||||
)
|
||||
#FILE(WRITE "wsrep_config" "Debug: WSREP_API_VERSION result: ${RESULT}\n")
|
||||
STRING(REGEX REPLACE "(\r?\n)+$" "" WSREP_API_VERSION "${WSREP_API_VERSION}")
|
||||
|
||||
IF(NOT WSREP_PATCH_REVNO)
|
||||
MESSAGE(WARNING "Could not determine bzr revision number, WSREP_VERSION will "
|
||||
"not contain the revision number.")
|
||||
SET(WSREP_VERSION
|
||||
"${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}"
|
||||
)
|
||||
ELSE()
|
||||
SET(WSREP_VERSION
|
||||
"${WSREP_API_VERSION}.${WSREP_PATCH_VERSION}.r${WSREP_PATCH_REVNO}"
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
#
|
||||
# Galera library does not compile with windows and solaris
|
||||
#
|
||||
IF(UNIX)
|
||||
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" ON)
|
||||
ELSE()
|
||||
OPTION(WITH_WSREP "WSREP replication API (to use, e.g. Galera Replication library)" OFF)
|
||||
ENDIF()
|
||||
|
||||
MACRO (BUILD_WITH_WSREP)
|
||||
SET(WSREP_C_FLAGS "-DWITH_WSREP -DWSREP_PROC_INFO -DMYSQL_MAX_VARIABLE_VALUE_LEN=2048")
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WSREP_C_FLAGS}")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WSREP_C_FLAGS}")
|
||||
SET(COMPILATION_COMMENT "${COMPILATION_COMMENT}, wsrep_${WSREP_VERSION}")
|
||||
#SET(WITH_EMBEDDED_SERVER OFF CACHE INTERNAL "" FORCE)
|
||||
ENDMACRO()
|
||||
|
||||
#
|
2
debian/dist/Debian/control
vendored
2
debian/dist/Debian/control
vendored
@ -192,7 +192,7 @@ Architecture: any
|
||||
Suggests: tinyca, mailx, mariadb-test
|
||||
Recommends: libhtml-template-perl
|
||||
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
|
||||
Depends: mariadb-client-10.1 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.1 (>= ${binary:Version})
|
||||
Depends: mariadb-client-10.1 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.1 (>= ${binary:Version}), galera (>=25.2) rsync, lsof, socat, grep, gawk, iproute, coreutils, findutils
|
||||
Provides: mariadb-server, mysql-server, virtual-mysql-server
|
||||
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
|
||||
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,
|
||||
|
2
debian/dist/Ubuntu/control
vendored
2
debian/dist/Ubuntu/control
vendored
@ -186,7 +186,7 @@ Architecture: any
|
||||
Suggests: tinyca, mailx, mariadb-test
|
||||
Recommends: libhtml-template-perl
|
||||
Pre-Depends: mariadb-common, adduser (>= 3.40), debconf
|
||||
Depends: mariadb-client-10.1 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.1 (>= ${binary:Version})
|
||||
Depends: mariadb-client-10.1 (>= ${source:Version}), libdbi-perl, perl (>= 5.6), ${shlibs:Depends}, ${misc:Depends}, psmisc, passwd, lsb-base (>= 3.0-10), mariadb-server-core-10.1 (>= ${binary:Version}), galera (>=25.2) rsync, lsof, socat, grep, gawk, iproute, coreutils, findutils
|
||||
Provides: mariadb-server, mysql-server, virtual-mysql-server
|
||||
Conflicts: mariadb-server (<< ${source:Version}), mysql-server (<< ${source:Version}),
|
||||
mysql-server-4.1, mysql-server-5.0, mysql-server-5.1, mysql-server-5.5,
|
||||
|
@ -71,7 +71,7 @@ extern struct logger_service_st {
|
||||
int (*rotate)(LOGGER_HANDLE *log);
|
||||
} *logger_service;
|
||||
|
||||
#if MYSQL_DYNAMIC_PLUGIN
|
||||
#ifdef MYSQL_DYNAMIC_PLUGIN
|
||||
|
||||
#define logger_init_mutexes logger_service->logger_init_mutexes
|
||||
#define logger_open(path, size_limit, rotations) \
|
||||
|
@ -5,4 +5,7 @@ const char *load_default_groups[]= {
|
||||
"mysqld", "server", MYSQL_BASE_VERSION,
|
||||
"mariadb", MARIADB_BASE_VERSION,
|
||||
"client-server",
|
||||
#ifdef WITH_WSREP
|
||||
"galera",
|
||||
#endif
|
||||
0, 0};
|
||||
|
@ -20,7 +20,6 @@
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <my_pthread.h>
|
||||
#include <my_list.h>
|
||||
|
||||
@ -95,6 +94,7 @@ typedef struct st_thr_lock_info
|
||||
{
|
||||
pthread_t thread;
|
||||
my_thread_id thread_id;
|
||||
void *mysql_thd; // THD pointer
|
||||
} THR_LOCK_INFO;
|
||||
|
||||
|
||||
@ -164,6 +164,17 @@ my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data,
|
||||
ulong lock_wait_timeout);
|
||||
void thr_set_lock_wait_callback(void (*before_wait)(void),
|
||||
void (*after_wait)(void));
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
#include <my_sys.h>
|
||||
typedef my_bool (* wsrep_thd_is_brute_force_fun)(void *, my_bool);
|
||||
typedef int (* wsrep_abort_thd_fun)(void *, void *, my_bool);
|
||||
typedef int (* wsrep_on_fun)(void *);
|
||||
void wsrep_thr_lock_init(
|
||||
wsrep_thd_is_brute_force_fun bf_fun, wsrep_abort_thd_fun abort_fun,
|
||||
my_bool debug, my_bool convert_LOCK_to_trx, wsrep_on_fun on_fun);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
58
include/wsrep.h
Normal file
58
include/wsrep.h
Normal file
@ -0,0 +1,58 @@
|
||||
/* Copyright 2014 Codership Oy <http://www.codership.com> & SkySQL Ab
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef WSREP_INCLUDED
|
||||
#define WSERP_INCLUDED
|
||||
|
||||
#ifdef WITH_WSREP
|
||||
#define IF_WSREP(A,B) A
|
||||
#define DBUG_ASSERT_IF_WSREP(A) DBUG_ASSERT(A)
|
||||
|
||||
#if !defined(EMBEDDED_LIBRARY)
|
||||
#define WSREP_FORMAT(my_format) \
|
||||
((wsrep_forced_binlog_format != BINLOG_FORMAT_UNSPEC) ? \
|
||||
wsrep_forced_binlog_format : my_format)
|
||||
#else
|
||||
#define WSREP_FORMAT(my_format) my_format
|
||||
#endif /* && !EMBEDDED_LIBRARY */
|
||||
|
||||
#define WSREP_MYSQL_DB (char *)"mysql"
|
||||
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_) \
|
||||
if (WSREP_ON && WSREP(thd) && wsrep_to_isolation_begin(thd, db_, table_, table_list_)) \
|
||||
goto error;
|
||||
|
||||
#define WSREP_TO_ISOLATION_END \
|
||||
if (WSREP_ON && (WSREP(thd) || (thd && thd->wsrep_exec_mode==TOTAL_ORDER))) \
|
||||
wsrep_to_isolation_end(thd);
|
||||
|
||||
#define WSREP_DEBUG(...) \
|
||||
if (wsrep_debug) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
|
||||
#define WSREP_INFO(...) WSREP_LOG(sql_print_information, ##__VA_ARGS__)
|
||||
#define WSREP_WARN(...) WSREP_LOG(sql_print_warning, ##__VA_ARGS__)
|
||||
#define WSREP_ERROR(...) WSREP_LOG(sql_print_error, ##__VA_ARGS__)
|
||||
|
||||
#else
|
||||
#define IF_WSREP(A,B) B
|
||||
#define DBUG_ASSERT_IF_WSREP(A)
|
||||
#define WSREP_DEBUG(...)
|
||||
#define WSREP_INFO(...)
|
||||
#define WSREP_WARN(...)
|
||||
#define WSREP_ERROR(...)
|
||||
#define WSREP_FORMAT(my_format) my_format
|
||||
#define WSREP_TO_ISOLATION_BEGIN(db_, table_, table_list_)
|
||||
#define WSREP_TO_ISOLATION_END
|
||||
#endif
|
||||
|
||||
#endif /* WSERP_INCLUDED */
|
@ -372,7 +372,8 @@ dfLtTBcBAAAAIgAAAPkAAAAAABcAAAAAAAcAAf/+AQAAAA==
|
||||
|
||||
SELECT * FROM t1;
|
||||
--echo # Their values should be ON
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
|
||||
SHOW SESSION VARIABLES LIKE "unique_checks";
|
||||
|
||||
--echo
|
||||
SET @@SESSION.foreign_key_checks= OFF;
|
||||
@ -387,7 +388,8 @@ dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||
|
||||
SELECT * FROM t1;
|
||||
--echo # Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
|
||||
SHOW SESSION VARIABLES LIKE "unique_checks";
|
||||
|
||||
--echo # INSERT INTO t1 VALUES(2)
|
||||
--echo # foreign_key_checks=1 and unique_checks=1
|
||||
@ -401,7 +403,8 @@ dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
|
||||
|
||||
SELECT * FROM t1;
|
||||
--echo # Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
|
||||
SHOW SESSION VARIABLES LIKE "unique_checks";
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
|
10
mysql-test/include/galera_cluster.inc
Normal file
10
mysql-test/include/galera_cluster.inc
Normal file
@ -0,0 +1,10 @@
|
||||
# galera_cluster.inc
|
||||
# ==================
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# Configure galera cluster with 2 nodes.
|
||||
#
|
||||
|
||||
--let $galera_cluster_size = 2
|
||||
--source include/galera_init.inc
|
45
mysql-test/include/galera_connect.inc
Normal file
45
mysql-test/include/galera_connect.inc
Normal file
@ -0,0 +1,45 @@
|
||||
# galera_connect.inc
|
||||
# ==================
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# Open a connection to the specified server number ($galera_server_number).
|
||||
# The connection itself would be identified by $galera_connection_name.
|
||||
#
|
||||
# Parameters
|
||||
# ----------
|
||||
# $galera_connection_name
|
||||
# Name of the resulting connection.
|
||||
#
|
||||
# $galera_server_number
|
||||
# Sequence number of the node in the galera cluster.
|
||||
#
|
||||
# $galera_debug
|
||||
# Print debug information.
|
||||
#
|
||||
|
||||
if (!$galera_connection_name)
|
||||
{
|
||||
--die ERROR IN TEST: $galera_connection_name must be set before sourcing include/galera_connect.inc
|
||||
}
|
||||
|
||||
if (!$galera_server_number)
|
||||
{
|
||||
--die ERROR IN TEST: $galera_server_number must be set before sourcing include/galera_connect.inc
|
||||
}
|
||||
|
||||
--let $_galera_port= \$NODE_MYPORT_$galera_server_number
|
||||
if (!$_galera_port)
|
||||
{
|
||||
--echo Bug in test case: '\$NODE_MYPORT_$galera_server_number' not initialized. Check the test's .cfg file.
|
||||
--die Not all NODE_MYPORT_* environment variables are setup correctly.
|
||||
}
|
||||
|
||||
if ($galera_debug)
|
||||
{
|
||||
--echo connect($galera_connection_name,127.0.0.1,root,,test,$_galera_port,)
|
||||
}
|
||||
|
||||
# Open a connection
|
||||
--connect($galera_connection_name,127.0.0.1,root,,test,$_galera_port,)
|
||||
|
100
mysql-test/include/galera_diff.inc
Normal file
100
mysql-test/include/galera_diff.inc
Normal file
@ -0,0 +1,100 @@
|
||||
# galera_diff.inc
|
||||
# ===============
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# Compare the output of the given statement on all the nodes of the cluster.
|
||||
#
|
||||
# Parameters
|
||||
# ----------
|
||||
# $galera_diff_statement
|
||||
# Statement for which the output would be compared.
|
||||
#
|
||||
# $galera_diff_database
|
||||
# Database against which the above statement would be executed.
|
||||
# (Default : test)
|
||||
#
|
||||
# $galera_diff_servers
|
||||
# Comma separated list of servers to executed the diff statement on. If not
|
||||
# set, a list of servers will be generated based on $galera_cluster_size.
|
||||
#
|
||||
# $galerra_debug
|
||||
# Print debug information.
|
||||
#
|
||||
|
||||
if (!$galera_diff_statement)
|
||||
{
|
||||
--die ERROR IN TEST: $galera_diff_statement must be set before sourcing include/galera_diff.inc
|
||||
}
|
||||
|
||||
--let $_galera_diff_database = $galera_diff_database
|
||||
if (!$_galera_diff_database)
|
||||
{
|
||||
--let $_galera_diff_database = test
|
||||
}
|
||||
|
||||
--let $_galera_diff_servers= $galera_diff_servers
|
||||
if (!$_galera_diff_servers)
|
||||
{
|
||||
--let $_i= $galera_cluster_size
|
||||
--let $_galera_diff_servers=
|
||||
while ($_i)
|
||||
{
|
||||
--let $_galera_diff_servers= $_i,$_galera_diff_servers
|
||||
--dec $_i
|
||||
}
|
||||
}
|
||||
if ($galera_debug)
|
||||
{
|
||||
--echo \$galera_diff_servers= '$_galera_diff_servers'
|
||||
}
|
||||
|
||||
if (!$galera_debug)
|
||||
{
|
||||
--disable_query_log
|
||||
}
|
||||
|
||||
# Generate file containing $galera_diff_statement. We don't pass the
|
||||
# statement on the command line, because it would be subject to shell
|
||||
# substitutions.
|
||||
--let $write_to_file= GENERATE
|
||||
--let $write_var= $galera_diff_statement
|
||||
--source include/write_var_to_file.inc
|
||||
--let $_galera_diff_statement_file= $write_to_file
|
||||
|
||||
if (!$galera_debug)
|
||||
{
|
||||
--enable_query_log
|
||||
}
|
||||
|
||||
# Compare all servers.
|
||||
--let $_galera_diff_first= 1
|
||||
while ($_galera_diff_servers)
|
||||
{
|
||||
# Set $_galera_diff_server_i to the first number in the list
|
||||
--let $_galera_diff_server_i= `SELECT SUBSTRING_INDEX('$_galera_diff_servers', ',', 1)`
|
||||
# Remove $_galera_diff_server_i from the list
|
||||
--let $_galera_diff_servers= `SELECT SUBSTRING('$_galera_diff_servers', LENGTH('$_galera_diff_server_i') + 2)`
|
||||
|
||||
# Execute statement
|
||||
--let $_galera_diff_file= $MYSQLTEST_VARDIR/tmp/_galera_diff_server-$_galera_diff_server_i.tmp
|
||||
--exec $MYSQL --defaults-group-suffix=.$_galera_diff_server_i $_galera_diff_database < $_galera_diff_statement_file > $_galera_diff_file
|
||||
|
||||
# Compare
|
||||
if (!$_galera_diff_first)
|
||||
{
|
||||
if ($galera_debug)
|
||||
{
|
||||
--echo diffing $_galera_diff_file and $_galera_diff_prev_file
|
||||
}
|
||||
--diff_files $_galera_diff_file $_galera_diff_prev_file
|
||||
--remove_file $_galera_diff_prev_file
|
||||
}
|
||||
--let $_galera_diff_prev_file= $_galera_diff_file
|
||||
--let $_galera_diff_first= 0
|
||||
}
|
||||
|
||||
# Cleanup
|
||||
--remove_file $_galera_diff_prev_file
|
||||
--remove_file $_galera_diff_statement_file
|
||||
|
25
mysql-test/include/galera_end.inc
Normal file
25
mysql-test/include/galera_end.inc
Normal file
@ -0,0 +1,25 @@
|
||||
# galera_end.inc
|
||||
# ==============
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# Closes the connections opened via include/galera_init.inc
|
||||
#
|
||||
# Parameters
|
||||
# ----------
|
||||
# $galera_cluster_size
|
||||
# Number of nodes in the cluster.
|
||||
#
|
||||
|
||||
--let $_galera_node= $galera_cluster_size
|
||||
|
||||
while ($_galera_node)
|
||||
{
|
||||
if ($galera_debug)
|
||||
{
|
||||
--echo Disconnecting node_$_galera_node
|
||||
}
|
||||
--disconnect node_$_galera_node
|
||||
--dec $_galera_node
|
||||
}
|
||||
|
26
mysql-test/include/galera_init.inc
Normal file
26
mysql-test/include/galera_init.inc
Normal file
@ -0,0 +1,26 @@
|
||||
# galera_init.inc
|
||||
# ===============
|
||||
#
|
||||
# Description
|
||||
# -----------
|
||||
# Set up a Galera cluster with $wsrep_cluster_size nodes.
|
||||
#
|
||||
# Parameters
|
||||
# ----------
|
||||
# $galera_cluster_size
|
||||
# Number of nodes in the cluster.
|
||||
#
|
||||
|
||||
--source include/have_wsrep_enabled.inc
|
||||
|
||||
--let $_galera_node= $galera_cluster_size
|
||||
|
||||
while ($_galera_node)
|
||||
{
|
||||
--let $galera_connection_name= node_$_galera_node
|
||||
--let $galera_server_number= $_galera_node
|
||||
--source include/galera_connect.inc
|
||||
|
||||
--dec $_galera_node
|
||||
}
|
||||
|
6
mysql-test/include/have_innodb_disallow_writes.inc
Normal file
6
mysql-test/include/have_innodb_disallow_writes.inc
Normal file
@ -0,0 +1,6 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
if (`SELECT COUNT(*) = 0 from INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME = 'INNODB_DISALLOW_WRITES'`) {
|
||||
--skip Test requires 'innodb_disallow_writes'
|
||||
}
|
8
mysql-test/include/have_wsrep.inc
Normal file
8
mysql-test/include/have_wsrep.inc
Normal file
@ -0,0 +1,8 @@
|
||||
# To be used in a test which requires server to be compiled with wsrep support
|
||||
# (-DWITH_WSREP=ON) and wsrep plugin is ACTIVE.
|
||||
|
||||
if (`SELECT COUNT(*)=0 FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME = 'wsrep' AND PLUGIN_STATUS='ACTIVE'`)
|
||||
{
|
||||
--skip Test requires wsrep plugin.
|
||||
}
|
||||
|
9
mysql-test/include/have_wsrep_enabled.inc
Normal file
9
mysql-test/include/have_wsrep_enabled.inc
Normal file
@ -0,0 +1,9 @@
|
||||
# To be used in a test which requires wsrep plugin to be ACTIVE and enabled
|
||||
# (i.e. wsrep_on=ON). It includes have_wsrep.inc.
|
||||
|
||||
--source include/have_wsrep.inc
|
||||
|
||||
--require r/have_wsrep.require
|
||||
disable_query_log;
|
||||
SHOW VARIABLES LIKE 'wsrep_on';
|
||||
enable_query_log;
|
@ -34,6 +34,7 @@ BEGIN
|
||||
AND variable_name != 'INNODB_USE_NATIVE_AIO'
|
||||
AND variable_name not like 'GTID%POS'
|
||||
AND variable_name != 'GTID_BINLOG_STATE'
|
||||
AND variable_name != 'WSREP_DATA_HOME_DIR'
|
||||
ORDER BY variable_name;
|
||||
|
||||
-- Dump all databases, there should be none
|
||||
|
@ -226,6 +226,14 @@ INSERT INTO global_suppressions VALUES
|
||||
("Slave I/O: Notifying master by SET @master_binlog_checksum= @@global.binlog_checksum failed with error.*"),
|
||||
("Slave I/O: Setting master-side filtering of @@skip_replication failed with error:.*"),
|
||||
("Slave I/O: Setting @mariadb_slave_capability failed with error:.*"),
|
||||
|
||||
/*
|
||||
Galera-related warnings.
|
||||
*/
|
||||
("WSREP: Could not open saved state file for reading: .*"),
|
||||
("WSREP: last inactive check more than .* skipping check"),
|
||||
("WSREP: Gap in state sequence. Need state transfer."),
|
||||
("WSREP: Failed to prepare for incremental state transfer: .*"),
|
||||
("THE_LAST_SUPPRESSION")||
|
||||
|
||||
|
||||
|
7
mysql-test/include/not_wsrep.inc
Normal file
7
mysql-test/include/not_wsrep.inc
Normal file
@ -0,0 +1,7 @@
|
||||
# To be used in a test which should be skipped if server is compiled with wsrep
|
||||
# support (-DWITH_WSREP=ON) and wsrep plugin is ACTIVE.
|
||||
|
||||
-- require r/not_wsrep.require
|
||||
disable_query_log;
|
||||
SELECT VERSION() LIKE '%wsrep%' AS 'HAVE_WSREP';
|
||||
enable_query_log;
|
@ -33,7 +33,8 @@
|
||||
--let _WRTF_SERVER_NUMBER= $server_number
|
||||
if (!$server_number)
|
||||
{
|
||||
--let _WRTF_SERVER_NUMBER= `SELECT 1 + @@PORT - $MASTER_MYPORT`
|
||||
# Note: 2 extra ports are reserved per server for galera use.
|
||||
--let _WRTF_SERVER_NUMBER= `SELECT 1 + FLOOR((@@PORT - $MASTER_MYPORT) / 3)`
|
||||
}
|
||||
|
||||
--let $_write_result_msg= [server=$_WRTF_SERVER_NUMBER]
|
||||
|
@ -238,6 +238,9 @@ my @mysqld_rules=
|
||||
{ 'pid-file' => \&fix_pidfile },
|
||||
{ '#host' => \&fix_host },
|
||||
{ 'port' => \&fix_port },
|
||||
# galera base_port and port used during SST
|
||||
{ '#galera_port' => \&fix_port },
|
||||
{ '#sst_port' => \&fix_port },
|
||||
{ 'socket' => \&fix_socket },
|
||||
{ '#log-error' => \&fix_log_error },
|
||||
{ 'general-log' => 1 },
|
||||
|
@ -861,6 +861,8 @@ sub collect_one_test_case {
|
||||
# Suite has no config, autodetect which one to use
|
||||
if ($tinfo->{rpl_test}) {
|
||||
$config= "suite/rpl/my.cnf";
|
||||
} elsif ($tinfo->{galera_test}) {
|
||||
$config= "suite/galera/my.cnf";
|
||||
} else {
|
||||
$config= "include/default_my.cnf";
|
||||
}
|
||||
@ -981,6 +983,7 @@ my $tags_map= {'big_test' => ['big_test', 1],
|
||||
'master-slave' => ['rpl_test', 1],
|
||||
'ndb_master-slave' => ['rpl_test', 1, 'ndb_test', 1],
|
||||
'long_test' => ['long_test', 1],
|
||||
'galera_init' => ['galera_test', 1],
|
||||
};
|
||||
my $tags_regex_string= join('|', keys %$tags_map);
|
||||
my $tags_regex= qr:include/($tags_regex_string)\.inc:o;
|
||||
|
@ -135,6 +135,7 @@ my $opt_start;
|
||||
my $opt_start_dirty;
|
||||
my $opt_start_exit;
|
||||
my $start_only;
|
||||
my $file_wsrep_provider;
|
||||
|
||||
END {
|
||||
if ( defined $opt_tmpdir_pid and $opt_tmpdir_pid == $$ )
|
||||
@ -412,6 +413,7 @@ sub main {
|
||||
check_ndbcluster_support();
|
||||
check_ssl_support();
|
||||
check_debug_support();
|
||||
check_wsrep_support();
|
||||
|
||||
if (!$opt_suites) {
|
||||
$opt_suites= join ',', collect_default_suites(@DEFAULT_SUITES);
|
||||
@ -2397,6 +2399,24 @@ sub environment_setup {
|
||||
$ENV{'NDB_EXAMPLES_OUTPUT'}= $path_ndb_testrun_log;
|
||||
}
|
||||
|
||||
# ----------------------------------------------------
|
||||
# Setup env for wsrep
|
||||
# ----------------------------------------------------
|
||||
if (have_wsrep()) {
|
||||
if (defined $ENV{'WSREP_PROVIDER'} ) {
|
||||
# Nothing needs to be done! WSREP_PROVIDER env is already set & checked;
|
||||
# will be used.
|
||||
} else {
|
||||
$ENV{'WSREP_PROVIDER'}= $file_wsrep_provider;
|
||||
}
|
||||
|
||||
if ($ENV{'WSREP_PROVIDER'} ne "") {
|
||||
mtr_verbose("WSREP_PROVIDER set to $ENV{'WSREP_PROVIDER'}");
|
||||
} else {
|
||||
mtr_verbose("WSREP_PROVIDER isn't available");
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------
|
||||
# mysql clients
|
||||
# ----------------------------------------------------
|
||||
@ -3174,6 +3194,40 @@ sub ndbcluster_start ($) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub have_wsrep() {
|
||||
my $wsrep_on= $mysqld_variables{'wsrep-on'};
|
||||
return defined $wsrep_on
|
||||
}
|
||||
|
||||
sub check_wsrep_provider_env {
|
||||
if (defined $ENV{'WSREP_PROVIDER'}) {
|
||||
if (mtr_file_exists($ENV{'WSREP_PROVIDER'}) eq "") {
|
||||
mtr_error("WSREP_PROVIDER env set to an invalid path");
|
||||
return 0; # error
|
||||
}
|
||||
# Ok, WSREP_PROVIDER set to a valid path.
|
||||
return 1;
|
||||
}
|
||||
# Ok, WSREP_PROVIDER not defined.
|
||||
return 2;
|
||||
}
|
||||
|
||||
sub check_wsrep_support() {
|
||||
if (have_wsrep())
|
||||
{
|
||||
mtr_report(" - binaries built with wsrep patch");
|
||||
|
||||
$file_wsrep_provider=
|
||||
mtr_file_exists("/usr/lib/galera/libgalera_smm.so",
|
||||
"/usr/lib64/galera/libgalera_smm.so");
|
||||
|
||||
if ((check_wsrep_provider_env() == 1) || ($file_wsrep_provider ne "")) {
|
||||
# Add galera test suites
|
||||
mtr_report(" - adding wsrep, galera to default test suites");
|
||||
push @DEFAULT_SUITES, qw(wsrep galera);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub mysql_server_start($) {
|
||||
my ($mysqld, $tinfo) = @_;
|
||||
@ -4837,6 +4891,10 @@ sub extract_warning_lines ($$) {
|
||||
qr|Plugin 'FEEDBACK' registration as a INFORMATION SCHEMA failed|,
|
||||
qr|'log-bin-use-v1-row-events' is MySQL 5.6 compatible option|,
|
||||
qr|InnoDB: Setting thread \d+ nice to \d+ failed, current nice \d+, errno 13|, # setpriority() fails under valgrind
|
||||
# Galera-related warnings.
|
||||
qr|WSREP:.*down context.*|,
|
||||
qr|WSREP: Failed to send state UUID:.*|,
|
||||
qr|WSREP: wsrep_sst_receive_address.*|,
|
||||
);
|
||||
|
||||
my $matched_lines= [];
|
||||
|
2
mysql-test/r/have_wsrep.require
Normal file
2
mysql-test/r/have_wsrep.require
Normal file
@ -0,0 +1,2 @@
|
||||
Variable_name Value
|
||||
wsrep_on ON
|
@ -1,6 +1,7 @@
|
||||
#
|
||||
# MDEV-5226 mysql_tzinfo_to_sql errors with tzdata 2013f and above
|
||||
#
|
||||
SET SESSION wsrep_replicate_myisam=ON;
|
||||
# Verbose run
|
||||
TRUNCATE TABLE time_zone;
|
||||
TRUNCATE TABLE time_zone_name;
|
||||
|
@ -1065,6 +1065,93 @@ The following options may be given as the first argument:
|
||||
-V, --version Output version information and exit.
|
||||
--wait-timeout=# The number of seconds the server waits for activity on a
|
||||
connection before closing it
|
||||
--wsrep-OSU-method[=name]
|
||||
Method for Online Schema Upgrade
|
||||
--wsrep-auto-increment-control
|
||||
To automatically control the assignment of autoincrement
|
||||
variables
|
||||
(Defaults to on; use --skip-wsrep-auto-increment-control to disable.)
|
||||
--wsrep-causal-reads
|
||||
(DEPRECATED) Setting this variable is equivalent to
|
||||
setting wsrep_sync_wait READ flag
|
||||
--wsrep-certify-nonPK
|
||||
Certify tables with no primary key
|
||||
(Defaults to on; use --skip-wsrep-certify-nonPK to disable.)
|
||||
--wsrep-cluster-address=name
|
||||
Address to initially connect to cluster
|
||||
--wsrep-cluster-name=name
|
||||
Name for the cluster
|
||||
--wsrep-convert-LOCK-to-trx
|
||||
To convert locking sessions into transactions
|
||||
--wsrep-data-home-dir=name
|
||||
home directory for wsrep provider
|
||||
--wsrep-dbug-option=name
|
||||
DBUG options to provider library
|
||||
--wsrep-debug To enable debug level logging
|
||||
--wsrep-desync To desynchronize the node from the cluster
|
||||
--wsrep-drupal-282555-workaround
|
||||
To use a workaround forbad autoincrement value
|
||||
--wsrep-forced-binlog-format=name
|
||||
binlog format to take effect over user's choice
|
||||
--wsrep-load-data-splitting
|
||||
To commit LOAD DATA transaction after every 10K rows
|
||||
inserted
|
||||
(Defaults to on; use --skip-wsrep-load-data-splitting to disable.)
|
||||
--wsrep-log-conflicts
|
||||
To log multi-master conflicts
|
||||
--wsrep-max-ws-rows=#
|
||||
Max number of rows in write set
|
||||
--wsrep-max-ws-size=#
|
||||
Max write set size (bytes)
|
||||
--wsrep-mysql-replication-bundle=#
|
||||
mysql replication group commit
|
||||
--wsrep-node-address=name
|
||||
Node address
|
||||
--wsrep-node-incoming-address=name
|
||||
Client connection address
|
||||
--wsrep-node-name=name
|
||||
Node name
|
||||
--wsrep-notify-cmd=name
|
||||
--wsrep-on To enable wsrep replication
|
||||
(Defaults to on; use --skip-wsrep-on to disable.)
|
||||
--wsrep-provider=name
|
||||
Path to replication provider library
|
||||
--wsrep-provider-options=name
|
||||
provider specific options
|
||||
--wsrep-recover Recover database state after crash and exit
|
||||
--wsrep-replicate-myisam
|
||||
To enable myisam replication
|
||||
--wsrep-restart-slave
|
||||
Should MySQL slave be restarted automatically, when node
|
||||
joins back to cluster
|
||||
--wsrep-retry-autocommit=#
|
||||
Max number of times to retry a failed autocommit
|
||||
statement
|
||||
--wsrep-slave-FK-checks
|
||||
Should slave thread do foreign key constraint checks
|
||||
(Defaults to on; use --skip-wsrep-slave-FK-checks to disable.)
|
||||
--wsrep-slave-UK-checks
|
||||
Should slave thread do secondary index uniqueness checks
|
||||
--wsrep-slave-threads=#
|
||||
Number of slave appliers to launch
|
||||
--wsrep-sst-auth=name
|
||||
Authentication for SST connection
|
||||
--wsrep-sst-donor=name
|
||||
preferred donor node for the SST
|
||||
--wsrep-sst-donor-rejects-queries
|
||||
Reject client queries when donating state snapshot
|
||||
transfer
|
||||
--wsrep-sst-method=name
|
||||
State snapshot transfer method
|
||||
--wsrep-sst-receive-address=name
|
||||
Address where node is waiting for SST contact
|
||||
--wsrep-start-position=name
|
||||
global transaction position to start from
|
||||
--wsrep-sync-wait[=#]
|
||||
Ensure "synchronous" read view before executing an
|
||||
operation of the type specified by bitmask: 1 -
|
||||
READ(includes SELECT, SHOW and BEGIN/START TRANSACTION);
|
||||
2 - UPDATE and DELETE; 4 - INSERT and REPLACE
|
||||
|
||||
Variables (--variable-name=value)
|
||||
allow-suspicious-udfs FALSE
|
||||
@ -1364,6 +1451,44 @@ use-stat-tables NEVER
|
||||
userstat FALSE
|
||||
verbose TRUE
|
||||
wait-timeout 28800
|
||||
wsrep-OSU-method TOI
|
||||
wsrep-auto-increment-control TRUE
|
||||
wsrep-causal-reads FALSE
|
||||
wsrep-certify-nonPK TRUE
|
||||
wsrep-cluster-address
|
||||
wsrep-cluster-name my_wsrep_cluster
|
||||
wsrep-convert-LOCK-to-trx FALSE
|
||||
wsrep-data-home-dir
|
||||
wsrep-dbug-option
|
||||
wsrep-debug FALSE
|
||||
wsrep-desync FALSE
|
||||
wsrep-drupal-282555-workaround FALSE
|
||||
wsrep-forced-binlog-format NONE
|
||||
wsrep-load-data-splitting TRUE
|
||||
wsrep-log-conflicts FALSE
|
||||
wsrep-max-ws-rows 131072
|
||||
wsrep-max-ws-size 1073741824
|
||||
wsrep-mysql-replication-bundle 0
|
||||
wsrep-node-address
|
||||
wsrep-node-incoming-address AUTO
|
||||
wsrep-notify-cmd
|
||||
wsrep-on FALSE
|
||||
wsrep-provider none
|
||||
wsrep-provider-options
|
||||
wsrep-recover FALSE
|
||||
wsrep-replicate-myisam FALSE
|
||||
wsrep-restart-slave FALSE
|
||||
wsrep-retry-autocommit 1
|
||||
wsrep-slave-FK-checks TRUE
|
||||
wsrep-slave-UK-checks FALSE
|
||||
wsrep-slave-threads 1
|
||||
wsrep-sst-auth (No default value)
|
||||
wsrep-sst-donor
|
||||
wsrep-sst-donor-rejects-queries FALSE
|
||||
wsrep-sst-method rsync
|
||||
wsrep-sst-receive-address AUTO
|
||||
wsrep-start-position 00000000-0000-0000-0000-000000000000:-1
|
||||
wsrep-sync-wait 0
|
||||
|
||||
To see what values a running MySQL server is using, type
|
||||
'mysqladmin variables' instead of 'mysqld --verbose --help'.
|
||||
|
2
mysql-test/r/not_wsrep.require
Normal file
2
mysql-test/r/not_wsrep.require
Normal file
@ -0,0 +1,2 @@
|
||||
HAVE_WSREP
|
||||
0
|
@ -806,9 +806,11 @@ SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
# Their values should be ON
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
|
||||
Variable_name Value
|
||||
foreign_key_checks ON
|
||||
SHOW SESSION VARIABLES LIKE "unique_checks";
|
||||
Variable_name Value
|
||||
unique_checks ON
|
||||
|
||||
SET @@SESSION.foreign_key_checks= OFF;
|
||||
@ -824,9 +826,11 @@ c1
|
||||
1
|
||||
2
|
||||
# Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
|
||||
Variable_name Value
|
||||
foreign_key_checks OFF
|
||||
SHOW SESSION VARIABLES LIKE "unique_checks";
|
||||
Variable_name Value
|
||||
unique_checks OFF
|
||||
# INSERT INTO t1 VALUES(2)
|
||||
# foreign_key_checks=1 and unique_checks=1
|
||||
@ -842,8 +846,10 @@ c1
|
||||
1
|
||||
2
|
||||
# Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
|
||||
Variable_name Value
|
||||
foreign_key_checks OFF
|
||||
SHOW SESSION VARIABLES LIKE "unique_checks";
|
||||
Variable_name Value
|
||||
unique_checks OFF
|
||||
DROP TABLE t1;
|
||||
|
@ -618,9 +618,11 @@ SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
# Their values should be ON
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
|
||||
Variable_name Value
|
||||
foreign_key_checks ON
|
||||
SHOW SESSION VARIABLES LIKE "unique_checks";
|
||||
Variable_name Value
|
||||
unique_checks ON
|
||||
|
||||
SET @@SESSION.foreign_key_checks= OFF;
|
||||
@ -636,9 +638,11 @@ c1
|
||||
1
|
||||
2
|
||||
# Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
|
||||
Variable_name Value
|
||||
foreign_key_checks OFF
|
||||
SHOW SESSION VARIABLES LIKE "unique_checks";
|
||||
Variable_name Value
|
||||
unique_checks OFF
|
||||
# INSERT INTO t1 VALUES(2)
|
||||
# foreign_key_checks=1 and unique_checks=1
|
||||
@ -654,8 +658,10 @@ c1
|
||||
1
|
||||
2
|
||||
# Their values should be OFF
|
||||
SHOW SESSION VARIABLES LIKE "%_checks";
|
||||
SHOW SESSION VARIABLES LIKE "foreign_key_checks";
|
||||
Variable_name Value
|
||||
foreign_key_checks OFF
|
||||
SHOW SESSION VARIABLES LIKE "unique_checks";
|
||||
Variable_name Value
|
||||
unique_checks OFF
|
||||
DROP TABLE t1;
|
||||
|
24
mysql-test/suite/galera/galera_2nodes.cnf
Normal file
24
mysql-test/suite/galera/galera_2nodes.cnf
Normal file
@ -0,0 +1,24 @@
|
||||
# Use default setting for mysqld processes
|
||||
!include include/default_mysqld.cnf
|
||||
|
||||
[mysqld.1]
|
||||
binlog-format=row
|
||||
wsrep_provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_cluster_address='gcomm://'
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port'
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
[mysqld.2]
|
||||
binlog-format=row
|
||||
wsrep_provider=@ENV.WSREP_PROVIDER
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='base_port=@mysqld.2.#galera_port'
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
|
||||
|
||||
[ENV]
|
||||
NODE_MYPORT_1= @mysqld.1.port
|
||||
NODE_MYSOCK_1= @mysqld.1.socket
|
||||
|
||||
NODE_MYPORT_2= @mysqld.2.port
|
||||
NODE_MYSOCK_2= @mysqld.2.socket
|
||||
|
1
mysql-test/suite/galera/my.cnf
Normal file
1
mysql-test/suite/galera/my.cnf
Normal file
@ -0,0 +1 @@
|
||||
!include galera_2nodes.cnf
|
30
mysql-test/suite/galera/r/basic.result
Normal file
30
mysql-test/suite/galera/r/basic.result
Normal file
@ -0,0 +1,30 @@
|
||||
USE test;
|
||||
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
||||
SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
|
||||
# On node_1
|
||||
SELECT * FROM test.t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
|
||||
# On node_2
|
||||
SELECT * FROM test.t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
DROP TABLE t1;
|
||||
# End of test
|
24
mysql-test/suite/galera/r/galera_sst_mode.result
Normal file
24
mysql-test/suite/galera/r/galera_sst_mode.result
Normal file
@ -0,0 +1,24 @@
|
||||
#
|
||||
# Test for mysqldump's galera-sst-mode option
|
||||
#
|
||||
#
|
||||
# MDEV-6490: mysqldump unknown option --galera-sst-mode
|
||||
#
|
||||
CREATE DATABASE bug6490;
|
||||
USE bug6490;
|
||||
CREATE TABLE t1(c1 INT);
|
||||
INSERT INTO t1 values (1);
|
||||
INSERT INTO t1 values (2);
|
||||
# Save the current gtid_binlog_state.
|
||||
# Take a dump of bug6490 database
|
||||
DROP TABLE t1;
|
||||
# Load the dump
|
||||
RESET MASTER;
|
||||
SELECT * from t1;
|
||||
c1
|
||||
1
|
||||
2
|
||||
# Compare the two gtid_binlog_state's
|
||||
# Cleanup
|
||||
DROP DATABASE bug6490;
|
||||
# End of test
|
17
mysql-test/suite/galera/r/grant.result
Normal file
17
mysql-test/suite/galera/r/grant.result
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# MDEV#6266: Changing password fails on galera cluster
|
||||
#
|
||||
|
||||
# On node_1
|
||||
GRANT SELECT ON *.* TO 'user_6266'@'localhost' IDENTIFIED BY 'pass';
|
||||
|
||||
# Now, try changing password for 'user_6266'. This command should also
|
||||
# execute successfully on the other node.
|
||||
SET PASSWORD FOR 'user_6266'@'localhost' = PASSWORD('newpass');
|
||||
|
||||
# On node_2
|
||||
SELECT user FROM mysql.user WHERE user='user_6266';
|
||||
user
|
||||
user_6266
|
||||
DROP USER 'user_6266'@'localhost';
|
||||
# End of test
|
23
mysql-test/suite/galera/r/partition.result
Normal file
23
mysql-test/suite/galera/r/partition.result
Normal file
@ -0,0 +1,23 @@
|
||||
#
|
||||
# MDEV#4953 Galera: DELETE from a partitioned table is not replicated
|
||||
#
|
||||
USE test;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
|
||||
INSERT INTO t1 VALUES (1,100), (2,200);
|
||||
SELECT * FROM t1;
|
||||
pk i
|
||||
2 200
|
||||
1 100
|
||||
DELETE FROM t1;
|
||||
SELECT * FROM t1;
|
||||
pk i
|
||||
|
||||
# On node_1
|
||||
SELECT * FROM t1;
|
||||
pk i
|
||||
|
||||
# On node_2
|
||||
SELECT * FROM t1;
|
||||
pk i
|
||||
DROP TABLE t1;
|
||||
# End of test
|
47
mysql-test/suite/galera/r/unique_key.result
Normal file
47
mysql-test/suite/galera/r/unique_key.result
Normal file
@ -0,0 +1,47 @@
|
||||
#
|
||||
# MDEV#5552 Deadlock when inserting NULL column value in column with
|
||||
# UNIQUE index
|
||||
#
|
||||
USE test;
|
||||
|
||||
# On node_1
|
||||
CREATE TABLE t1(c1 INT DEFAULT NULL, UNIQUE KEY c1(c1)) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SELECT * FROM test.t1;
|
||||
c1
|
||||
NULL
|
||||
NULL
|
||||
|
||||
# On node_2
|
||||
SELECT * FROM test.t1;
|
||||
c1
|
||||
NULL
|
||||
NULL
|
||||
|
||||
# On node_1
|
||||
INSERT INTO t1 VALUES (1);
|
||||
UPDATE t1 SET c1=NULL WHERE c1=1;
|
||||
SELECT * FROM test.t1;
|
||||
c1
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
# On node_2
|
||||
SELECT * FROM test.t1;
|
||||
c1
|
||||
NULL
|
||||
NULL
|
||||
NULL
|
||||
|
||||
# On node_1
|
||||
DELETE FROM t1 WHERE c1<=>NULL;
|
||||
SELECT * FROM test.t1;
|
||||
c1
|
||||
|
||||
# On node_2
|
||||
SELECT * FROM test.t1;
|
||||
c1
|
||||
DROP TABLE t1;
|
||||
# End of test
|
26
mysql-test/suite/galera/t/basic.test
Normal file
26
mysql-test/suite/galera/t/basic.test
Normal file
@ -0,0 +1,26 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
USE test;
|
||||
CREATE TABLE t1(c1 INT PRIMARY KEY) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
||||
SELECT * FROM t1;
|
||||
|
||||
--echo
|
||||
--echo # On node_1
|
||||
--connection node_1
|
||||
SELECT * FROM test.t1;
|
||||
|
||||
--echo
|
||||
--echo # On node_2
|
||||
--connection node_2
|
||||
SELECT * FROM test.t1;
|
||||
|
||||
--let $galera_diff_statement = SELECT * FROM t1
|
||||
--source include/galera_diff.inc
|
||||
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/galera_end.inc
|
||||
--echo # End of test
|
43
mysql-test/suite/galera/t/galera_sst_mode.test
Normal file
43
mysql-test/suite/galera/t/galera_sst_mode.test
Normal file
@ -0,0 +1,43 @@
|
||||
# Embedded server doesn't support external clients
|
||||
--source include/not_embedded.inc
|
||||
# Binlog is required
|
||||
--source include/have_log_bin.inc
|
||||
|
||||
--echo #
|
||||
--echo # Test for mysqldump's galera-sst-mode option
|
||||
--echo #
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-6490: mysqldump unknown option --galera-sst-mode
|
||||
--echo #
|
||||
CREATE DATABASE bug6490;
|
||||
USE bug6490;
|
||||
CREATE TABLE t1(c1 INT);
|
||||
INSERT INTO t1 values (1);
|
||||
INSERT INTO t1 values (2);
|
||||
|
||||
--echo # Save the current gtid_binlog_state.
|
||||
--let $before= `SELECT @@global.gtid_binlog_state`
|
||||
|
||||
--echo # Take a dump of bug6490 database
|
||||
--exec $MYSQL_DUMP --galera-sst-mode bug6490 > $MYSQLTEST_VARDIR/tmp/bug6490.sql
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # Load the dump
|
||||
RESET MASTER;
|
||||
--exec $MYSQL -uroot bug6490 < $MYSQLTEST_VARDIR/tmp/bug6490.sql
|
||||
|
||||
SELECT * from t1;
|
||||
|
||||
--echo # Compare the two gtid_binlog_state's
|
||||
--let $after= `SELECT @@global.gtid_binlog_state`
|
||||
if (`SELECT STRCMP($before, $after)`)
|
||||
{
|
||||
--die ERROR: The two gtid_binlog_state's did not match.
|
||||
}
|
||||
|
||||
--echo # Cleanup
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/bug6490.sql
|
||||
DROP DATABASE bug6490;
|
||||
|
||||
--echo # End of test
|
25
mysql-test/suite/galera/t/grant.test
Normal file
25
mysql-test/suite/galera/t/grant.test
Normal file
@ -0,0 +1,25 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV#6266: Changing password fails on galera cluster
|
||||
--echo #
|
||||
|
||||
--echo
|
||||
--echo # On node_1
|
||||
--connection node_1
|
||||
GRANT SELECT ON *.* TO 'user_6266'@'localhost' IDENTIFIED BY 'pass';
|
||||
--echo
|
||||
--echo # Now, try changing password for 'user_6266'. This command should also
|
||||
--echo # execute successfully on the other node.
|
||||
SET PASSWORD FOR 'user_6266'@'localhost' = PASSWORD('newpass');
|
||||
|
||||
--echo
|
||||
--echo # On node_2
|
||||
--connection node_2
|
||||
SELECT user FROM mysql.user WHERE user='user_6266';
|
||||
# cleanup
|
||||
DROP USER 'user_6266'@'localhost';
|
||||
|
||||
--source include/galera_end.inc
|
||||
--echo # End of test
|
31
mysql-test/suite/galera/t/partition.test
Normal file
31
mysql-test/suite/galera/t/partition.test
Normal file
@ -0,0 +1,31 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_partition.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV#4953 Galera: DELETE from a partitioned table is not replicated
|
||||
--echo #
|
||||
|
||||
USE test;
|
||||
CREATE TABLE t1 (pk INT PRIMARY KEY, i INT) ENGINE=INNODB PARTITION BY HASH(pk) PARTITIONS 2;
|
||||
INSERT INTO t1 VALUES (1,100), (2,200);
|
||||
SELECT * FROM t1;
|
||||
|
||||
DELETE FROM t1;
|
||||
SELECT * FROM t1;
|
||||
|
||||
--echo
|
||||
--echo # On node_1
|
||||
--connection node_1
|
||||
SELECT * FROM t1;
|
||||
|
||||
--echo
|
||||
--echo # On node_2
|
||||
--connection node_2
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/galera_end.inc
|
||||
--echo # End of test
|
54
mysql-test/suite/galera/t/unique_key.test
Normal file
54
mysql-test/suite/galera/t/unique_key.test
Normal file
@ -0,0 +1,54 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--echo #
|
||||
--echo # MDEV#5552 Deadlock when inserting NULL column value in column with
|
||||
--echo # UNIQUE index
|
||||
--echo #
|
||||
|
||||
USE test;
|
||||
--echo
|
||||
--echo # On node_1
|
||||
--connection node_1
|
||||
CREATE TABLE t1(c1 INT DEFAULT NULL, UNIQUE KEY c1(c1)) ENGINE=INNODB;
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SELECT * FROM test.t1;
|
||||
|
||||
--echo
|
||||
--echo # On node_2
|
||||
--connection node_2
|
||||
SELECT * FROM test.t1;
|
||||
|
||||
|
||||
--echo
|
||||
--echo # On node_1
|
||||
--connection node_1
|
||||
INSERT INTO t1 VALUES (1);
|
||||
UPDATE t1 SET c1=NULL WHERE c1=1;
|
||||
SELECT * FROM test.t1;
|
||||
|
||||
--echo
|
||||
--echo # On node_2
|
||||
--connection node_2
|
||||
SELECT * FROM test.t1;
|
||||
|
||||
--echo
|
||||
--echo # On node_1
|
||||
--connection node_1
|
||||
DELETE FROM t1 WHERE c1<=>NULL;
|
||||
SELECT * FROM test.t1;
|
||||
|
||||
--echo
|
||||
--echo # On node_2
|
||||
--connection node_2
|
||||
SELECT * FROM test.t1;
|
||||
|
||||
--let $galera_diff_statement = SELECT * FROM t1
|
||||
--source include/galera_diff.inc
|
||||
|
||||
# Cleanup
|
||||
DROP TABLE t1;
|
||||
|
||||
--source include/galera_end.inc
|
||||
--echo # End of test
|
@ -197,7 +197,7 @@ c1 c2
|
||||
5 9
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 100
|
||||
auto_increment_offset 10
|
||||
@ -230,7 +230,7 @@ c1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -269,7 +269,7 @@ c1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -282,7 +282,7 @@ SELECT * FROM t1;
|
||||
c1
|
||||
-1
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 100
|
||||
auto_increment_offset 10
|
||||
@ -315,7 +315,7 @@ c1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -330,7 +330,7 @@ SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 100
|
||||
auto_increment_offset 10
|
||||
@ -370,7 +370,7 @@ c1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -385,7 +385,7 @@ SELECT * FROM t1;
|
||||
c1
|
||||
1
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 100
|
||||
auto_increment_offset 10
|
||||
@ -419,7 +419,7 @@ c1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -434,7 +434,7 @@ c1
|
||||
1
|
||||
9223372036854775794
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
auto_increment_offset 10
|
||||
@ -452,7 +452,7 @@ c1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -467,7 +467,7 @@ c1
|
||||
1
|
||||
18446744073709551603
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 2
|
||||
auto_increment_offset 10
|
||||
@ -480,7 +480,7 @@ c1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -495,7 +495,7 @@ c1
|
||||
1
|
||||
18446744073709551603
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 5
|
||||
auto_increment_offset 7
|
||||
@ -508,7 +508,7 @@ c1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -527,7 +527,7 @@ c1
|
||||
-9223372036854775806
|
||||
1
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=3, @@SESSION.AUTO_INCREMENT_OFFSET=3;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 3
|
||||
auto_increment_offset 3
|
||||
@ -544,7 +544,7 @@ c1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -562,7 +562,7 @@ SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCRE
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect auto_increment_increment value: '1152921504606846976'
|
||||
Warning 1292 Truncated incorrect auto_increment_offset value: '1152921504606846976'
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 65535
|
||||
auto_increment_offset 65535
|
||||
@ -575,7 +575,7 @@ c1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -862,7 +862,7 @@ ERROR 22003: Out of range value for column 'c1' at row 1
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
@ -1252,7 +1252,7 @@ t1 CREATE TABLE `t1` (
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=256;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 256
|
||||
@ -1270,7 +1270,7 @@ c1 c2
|
||||
1 NULL
|
||||
DROP TABLE t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 1
|
||||
auto_increment_offset 1
|
||||
|
@ -161,7 +161,7 @@ DROP TABLE t1;
|
||||
#
|
||||
# Test changes to AUTOINC next value calculation
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (NULL),(5),(NULL);
|
||||
@ -178,7 +178,7 @@ DROP TABLE t1;
|
||||
# Reset the AUTOINC session variables
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(0);
|
||||
@ -198,13 +198,13 @@ DROP TABLE t1;
|
||||
# Reset the AUTOINC session variables
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 INT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(-1);
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
INSERT INTO t1 VALUES (-2), (NULL),(2),(NULL);
|
||||
INSERT INTO t1 VALUES (250),(NULL);
|
||||
SELECT * FROM t1;
|
||||
@ -219,13 +219,13 @@ DROP TABLE t1;
|
||||
# Reset the AUTOINC session variables
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(-1);
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
INSERT INTO t1 VALUES (-2);
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
INSERT INTO t1 VALUES (2);
|
||||
@ -245,13 +245,13 @@ DROP TABLE t1;
|
||||
# Reset the AUTOINC session variables
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(-1);
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
INSERT INTO t1 VALUES (-2),(NULL),(2),(NULL);
|
||||
INSERT INTO t1 VALUES (250),(NULL);
|
||||
SELECT * FROM t1;
|
||||
@ -267,7 +267,7 @@ DROP TABLE t1;
|
||||
# Check for overflow handling when increment is > 1
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 BIGINT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
# TODO: Fix the autoinc init code
|
||||
@ -276,7 +276,7 @@ INSERT INTO t1 VALUES(NULL);
|
||||
INSERT INTO t1 VALUES (9223372036854775794); #-- 2^63 - 14
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
# This should just fit
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
SELECT * FROM t1;
|
||||
@ -286,7 +286,7 @@ DROP TABLE t1;
|
||||
# Check for overflow handling when increment and offser are > 1
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
# TODO: Fix the autoinc init code
|
||||
@ -295,7 +295,7 @@ INSERT INTO t1 VALUES(NULL);
|
||||
INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=2, @@SESSION.AUTO_INCREMENT_OFFSET=10;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
--error ER_AUTOINC_READ_FAILED
|
||||
INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL);
|
||||
SELECT * FROM t1;
|
||||
@ -305,7 +305,7 @@ DROP TABLE t1;
|
||||
# Check for overflow handling when increment and offset are odd numbers
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
# TODO: Fix the autoinc init code
|
||||
@ -314,7 +314,7 @@ INSERT INTO t1 VALUES(NULL);
|
||||
INSERT INTO t1 VALUES (18446744073709551603); #-- 2^64 - 13
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=5, @@SESSION.AUTO_INCREMENT_OFFSET=7;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
--error ER_AUTOINC_READ_FAILED
|
||||
INSERT INTO t1 VALUES (NULL),(NULL), (NULL);
|
||||
SELECT * FROM t1;
|
||||
@ -324,7 +324,7 @@ DROP TABLE t1;
|
||||
# and check for large -ve numbers
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 BIGINT AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
# TODO: Fix the autoinc init code
|
||||
@ -335,7 +335,7 @@ INSERT INTO t1 VALUES(-9223372036854775807); #-- -2^63 + 1
|
||||
INSERT INTO t1 VALUES(-9223372036854775808); #-- -2^63
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=3, @@SESSION.AUTO_INCREMENT_OFFSET=3;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
INSERT INTO t1 VALUES (NULL),(NULL), (NULL);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
@ -344,7 +344,7 @@ DROP TABLE t1;
|
||||
# large numbers 2^60
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TABLE t1 (c1 BIGINT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
|
||||
# TODO: Fix the autoinc init code
|
||||
@ -353,7 +353,7 @@ INSERT INTO t1 VALUES(NULL);
|
||||
INSERT INTO t1 VALUES (18446744073709551610); #-- 2^64 - 2
|
||||
SELECT * FROM t1;
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1152921504606846976, @@SESSION.AUTO_INCREMENT_OFFSET=1152921504606846976;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
--error 167
|
||||
INSERT INTO t1 VALUES (NULL),(NULL);
|
||||
SELECT * FROM t1;
|
||||
@ -364,7 +364,7 @@ DROP TABLE t1;
|
||||
#
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SET @@INSERT_ID=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
CREATE TABLE t1 (c1 DOUBLE NOT NULL AUTO_INCREMENT, c2 INT, PRIMARY KEY (c1)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES(NULL, 1);
|
||||
INSERT INTO t1 VALUES(NULL, 2);
|
||||
@ -450,7 +450,7 @@ DROP TABLE t2;
|
||||
# If the user has specified negative values for an AUTOINC column then
|
||||
# InnoDB should ignore those values when setting the table's max value.
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
# TINYINT
|
||||
CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, NULL);
|
||||
@ -646,7 +646,7 @@ DROP TABLE t1;
|
||||
|
||||
# Check if we handle offset > column max value properly
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=256;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
# TINYINT
|
||||
CREATE TABLE t1 (c1 TINYINT PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1, NULL);
|
||||
@ -658,7 +658,7 @@ DROP TABLE t1;
|
||||
# of the column. IMO, this should not be allowed and the assertion that fails
|
||||
# is actually an invariant.
|
||||
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
|
||||
SHOW VARIABLES LIKE "%auto_inc%";
|
||||
SHOW VARIABLES LIKE "auto_inc%";
|
||||
# TINYINT
|
||||
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (2147483648, 'a');
|
||||
|
2
mysql-test/suite/parts/r/partition_exch_qa_10.result
Executable file → Normal file
2
mysql-test/suite/parts/r/partition_exch_qa_10.result
Executable file → Normal file
@ -23,7 +23,7 @@ a b
|
||||
DROP PROCEDURE test_p1;
|
||||
SET @save_autocommit= @@autocommit;
|
||||
SET @@autocommit= OFF;
|
||||
SHOW VARIABLES LIKE '%autocommit%';
|
||||
SHOW VARIABLES LIKE 'autocommit%';
|
||||
Variable_name Value
|
||||
autocommit OFF
|
||||
CREATE TRIGGER test_trg_1 BEFORE UPDATE ON tp FOR EACH ROW
|
||||
|
@ -37,7 +37,7 @@ DROP PROCEDURE test_p1;
|
||||
|
||||
SET @save_autocommit= @@autocommit;
|
||||
SET @@autocommit= OFF;
|
||||
SHOW VARIABLES LIKE '%autocommit%';
|
||||
SHOW VARIABLES LIKE 'autocommit%';
|
||||
DELIMITER |;
|
||||
--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG
|
||||
CREATE TRIGGER test_trg_1 BEFORE UPDATE ON tp FOR EACH ROW
|
||||
|
@ -3,7 +3,7 @@ Warnings:
|
||||
Note 1051 Unknown table 'test.t1'
|
||||
select @@version_comment limit 1 ;
|
||||
@@version_comment
|
||||
Source distribution
|
||||
Source distribution, wsrep_25.10.r3991
|
||||
SELECT COUNT(*) FROM `information_schema`.`INNODB_SYS_INDEXES` ;
|
||||
CREATE TABLE test.t1 ( `a` SERIAL NOT NULL , `b` VARCHAR( 255 ) NOT NULL , INDEX ( `b` ) ) ENGINE = InnoDB ;
|
||||
SHOW TABLE STATUS FROM `information_schema` LIKE 'INNODB\_SYS\_INDEXES%' ;
|
||||
|
@ -5,7 +5,8 @@ drop table if exists t1;
|
||||
#
|
||||
# test for bug LP#875797 "Using 'innodb_sys_indexes' causes core dump"
|
||||
#
|
||||
select @@version_comment limit 1 ;
|
||||
# disable version_commit as it could contain wsrep
|
||||
#select @@version_comment limit 1 ;
|
||||
--disable_result_log
|
||||
SELECT COUNT(*) FROM `information_schema`.`INNODB_SYS_INDEXES` ;
|
||||
CREATE TABLE test.t1 ( `a` SERIAL NOT NULL , `b` VARCHAR( 255 ) NOT NULL , INDEX ( `b` ) ) ENGINE = InnoDB ;
|
||||
|
@ -11,9 +11,10 @@ include/master-slave.inc
|
||||
|
||||
*** Create test tables
|
||||
|
||||
show variables like '%binlog_format%';
|
||||
show variables like 'binlog_format%';
|
||||
Variable_name Value
|
||||
binlog_format MIXED
|
||||
wsrep_forced_binlog_format NONE
|
||||
drop table if exists test.marker;
|
||||
select thread_id into @my_thread_id
|
||||
from performance_schema.threads
|
||||
@ -55,9 +56,10 @@ Expect 1
|
||||
*** MASTER ***
|
||||
**************
|
||||
|
||||
show variables like '%binlog_format%';
|
||||
show variables like 'binlog_format%';
|
||||
Variable_name Value
|
||||
binlog_format MIXED
|
||||
wsrep_forced_binlog_format NONE
|
||||
*** Clear statement events
|
||||
|
||||
*** Create/drop table, create/drop database
|
||||
|
@ -64,7 +64,7 @@ connection master;
|
||||
--echo *** Create test tables
|
||||
--echo
|
||||
|
||||
show variables like '%binlog_format%';
|
||||
show variables like 'binlog_format%';
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists test.marker;
|
||||
@ -129,7 +129,7 @@ connection master;
|
||||
--echo *** MASTER ***
|
||||
--echo **************
|
||||
--echo
|
||||
show variables like '%binlog_format%';
|
||||
show variables like 'binlog_format%';
|
||||
|
||||
--echo *** Clear statement events
|
||||
--source ../include/rpl_statements_truncate.inc
|
||||
|
@ -0,0 +1,45 @@
|
||||
#
|
||||
# innodb_disallow_writes
|
||||
#
|
||||
# save the initial value
|
||||
SET @innodb_disallow_writes_global_saved = @@global.innodb_disallow_writes;
|
||||
# default
|
||||
SELECT @@global.innodb_disallow_writes;
|
||||
@@global.innodb_disallow_writes
|
||||
0
|
||||
|
||||
# scope
|
||||
SELECT @@session.innodb_disallow_writes;
|
||||
ERROR HY000: Variable 'innodb_disallow_writes' is a GLOBAL variable
|
||||
SET @@global.innodb_disallow_writes=OFF;
|
||||
SELECT @@global.innodb_disallow_writes;
|
||||
@@global.innodb_disallow_writes
|
||||
0
|
||||
SET @@global.innodb_disallow_writes=ON;
|
||||
SELECT @@global.innodb_disallow_writes;
|
||||
@@global.innodb_disallow_writes
|
||||
1
|
||||
|
||||
# valid values
|
||||
SET @@global.innodb_disallow_writes='OFF';
|
||||
SELECT @@global.innodb_disallow_writes;
|
||||
@@global.innodb_disallow_writes
|
||||
0
|
||||
SET @@global.innodb_disallow_writes=ON;
|
||||
SELECT @@global.innodb_disallow_writes;
|
||||
@@global.innodb_disallow_writes
|
||||
1
|
||||
SET @@global.innodb_disallow_writes=default;
|
||||
SELECT @@global.innodb_disallow_writes;
|
||||
@@global.innodb_disallow_writes
|
||||
0
|
||||
|
||||
# invalid values
|
||||
SET @@global.innodb_disallow_writes=NULL;
|
||||
ERROR 42000: Variable 'innodb_disallow_writes' can't be set to the value of 'NULL'
|
||||
SET @@global.innodb_disallow_writes='junk';
|
||||
ERROR 42000: Variable 'innodb_disallow_writes' can't be set to the value of 'junk'
|
||||
|
||||
# restore the initial value
|
||||
SET @@global.innodb_disallow_writes = @innodb_disallow_writes_global_saved;
|
||||
# End of test
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_auto_increment_control;
|
||||
set @@global.wsrep_auto_increment_control=ON;
|
||||
set @@global.wsrep_auto_increment_control=OFF;
|
||||
set @@global.wsrep_auto_increment_control=1;
|
||||
set @@global.wsrep_auto_increment_control=0;
|
||||
SET @@global.wsrep_auto_increment_control = -1;
|
||||
ERROR 42000: Variable 'wsrep_auto_increment_control' can't be set to the value of '-1'
|
||||
set @@global.wsrep_auto_increment_control = @start_value;
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_causal_reads;
|
||||
set @@global.wsrep_causal_reads=ON;
|
||||
set @@global.wsrep_causal_reads=OFF;
|
||||
set @@global.wsrep_causal_reads=1;
|
||||
set @@global.wsrep_causal_reads=0;
|
||||
SET @@global.wsrep_causal_reads = -1;
|
||||
ERROR 42000: Variable 'wsrep_causal_reads' can't be set to the value of '-1'
|
||||
set @@global.wsrep_causal_reads = @start_value;
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_certify_nonpk;
|
||||
set @@global.wsrep_certify_nonpk=ON;
|
||||
set @@global.wsrep_certify_nonpk=OFF;
|
||||
set @@global.wsrep_certify_nonpk=1;
|
||||
set @@global.wsrep_certify_nonpk=0;
|
||||
SET @@global.wsrep_certify_nonpk = -1;
|
||||
ERROR 42000: Variable 'wsrep_certify_nonPK' can't be set to the value of '-1'
|
||||
set @@global.wsrep_certify_nonpk = @start_value;
|
@ -0,0 +1,45 @@
|
||||
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
|
||||
COUNT(@@GLOBAL.wsrep_cluster_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
|
||||
COUNT(@@GLOBAL.wsrep_cluster_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@GLOBAL.wsrep_cluster_address = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_cluster_address';
|
||||
@@GLOBAL.wsrep_cluster_address = VARIABLE_VALUE
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
|
||||
COUNT(@@GLOBAL.wsrep_cluster_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_cluster_address';
|
||||
COUNT(VARIABLE_VALUE)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@wsrep_cluster_address = @@GLOBAL.wsrep_cluster_address;
|
||||
@@wsrep_cluster_address = @@GLOBAL.wsrep_cluster_address
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@wsrep_cluster_address);
|
||||
COUNT(@@wsrep_cluster_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@local.wsrep_cluster_address);
|
||||
ERROR HY000: Variable 'wsrep_cluster_address' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@SESSION.wsrep_cluster_address);
|
||||
ERROR HY000: Variable 'wsrep_cluster_address' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.wsrep_cluster_address);
|
||||
COUNT(@@GLOBAL.wsrep_cluster_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT wsrep_cluster_address = @@SESSION.wsrep_cluster_address;
|
||||
ERROR 42S22: Unknown column 'wsrep_cluster_address' in 'field list'
|
||||
Expected error 'Readonly variable'
|
@ -0,0 +1,7 @@
|
||||
set @start_value = @@wsrep_cluster_name;
|
||||
set @@global.wsrep_cluster_name='test';
|
||||
set @@global.wsrep_cluster_name=NULL;
|
||||
ERROR 42000: Variable 'wsrep_cluster_name' can't be set to the value of 'NULL'
|
||||
SET @@global.wsrep_cluster_name = 1;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_cluster_name'
|
||||
set @@global.wsrep_cluster_name = @start_value;
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_convert_lock_to_trx;
|
||||
set @@global.wsrep_convert_lock_to_trx=ON;
|
||||
set @@global.wsrep_convert_lock_to_trx=OFF;
|
||||
set @@global.wsrep_convert_lock_to_trx=1;
|
||||
set @@global.wsrep_convert_lock_to_trx=0;
|
||||
SET @@global.wsrep_convert_lock_to_trx = -1;
|
||||
ERROR 42000: Variable 'wsrep_convert_LOCK_to_trx' can't be set to the value of '-1'
|
||||
set @@global.wsrep_convert_lock_to_trx = @start_value;
|
48
mysql-test/suite/sys_vars/r/wsrep_data_home_dir_basic.result
Normal file
48
mysql-test/suite/sys_vars/r/wsrep_data_home_dir_basic.result
Normal file
@ -0,0 +1,48 @@
|
||||
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
|
||||
COUNT(@@GLOBAL.wsrep_data_home_dir)
|
||||
1
|
||||
1 Expected
|
||||
SET @@GLOBAL.wsrep_data_home_dir=1;
|
||||
ERROR HY000: Variable 'wsrep_data_home_dir' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
|
||||
COUNT(@@GLOBAL.wsrep_data_home_dir)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@GLOBAL.wsrep_data_home_dir = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_data_home_dir';
|
||||
@@GLOBAL.wsrep_data_home_dir = VARIABLE_VALUE
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
|
||||
COUNT(@@GLOBAL.wsrep_data_home_dir)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_data_home_dir';
|
||||
COUNT(VARIABLE_VALUE)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@wsrep_data_home_dir = @@GLOBAL.wsrep_data_home_dir;
|
||||
@@wsrep_data_home_dir = @@GLOBAL.wsrep_data_home_dir
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@wsrep_data_home_dir);
|
||||
COUNT(@@wsrep_data_home_dir)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@local.wsrep_data_home_dir);
|
||||
ERROR HY000: Variable 'wsrep_data_home_dir' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@SESSION.wsrep_data_home_dir);
|
||||
ERROR HY000: Variable 'wsrep_data_home_dir' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.wsrep_data_home_dir);
|
||||
COUNT(@@GLOBAL.wsrep_data_home_dir)
|
||||
1
|
||||
1 Expected
|
||||
SELECT wsrep_data_home_dir = @@SESSION.wsrep_data_home_dir;
|
||||
ERROR 42S22: Unknown column 'wsrep_data_home_dir' in 'field list'
|
||||
Expected error 'Readonly variable'
|
@ -0,0 +1,6 @@
|
||||
set @start_value = @@wsrep_dbug_option;
|
||||
set @@global.wsrep_dbug_option='foo:bar';
|
||||
set @@global.wsrep_dbug_option=NULL;
|
||||
SET @@global.wsrep_dbug_option = -1;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_dbug_option'
|
||||
set @@global.wsrep_dbug_option = @start_value;
|
8
mysql-test/suite/sys_vars/r/wsrep_debug_basic.result
Normal file
8
mysql-test/suite/sys_vars/r/wsrep_debug_basic.result
Normal file
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_debug;
|
||||
set @@global.wsrep_debug=ON;
|
||||
set @@global.wsrep_debug=OFF;
|
||||
set @@global.wsrep_debug=1;
|
||||
set @@global.wsrep_debug=0;
|
||||
SET @@global.wsrep_debug = -1;
|
||||
ERROR 42000: Variable 'wsrep_debug' can't be set to the value of '-1'
|
||||
set @@global.wsrep_debug = @start_value;
|
3
mysql-test/suite/sys_vars/r/wsrep_desync_basic.result
Normal file
3
mysql-test/suite/sys_vars/r/wsrep_desync_basic.result
Normal file
@ -0,0 +1,3 @@
|
||||
select @@global.wsrep_desync;
|
||||
@@global.wsrep_desync
|
||||
0
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_drupal_282555_workaround;
|
||||
set @@global.wsrep_drupal_282555_workaround=ON;
|
||||
set @@global.wsrep_drupal_282555_workaround=OFF;
|
||||
set @@global.wsrep_drupal_282555_workaround=1;
|
||||
set @@global.wsrep_drupal_282555_workaround=0;
|
||||
SET @@global.wsrep_drupal_282555_workaround = -1;
|
||||
ERROR 42000: Variable 'wsrep_drupal_282555_workaround' can't be set to the value of '-1'
|
||||
set @@global.wsrep_drupal_282555_workaround = @start_value;
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_forced_binlog_format;
|
||||
set @@global.wsrep_forced_binlog_format = ROW;
|
||||
set @@global.wsrep_forced_binlog_format = MIXED;
|
||||
set @@global.wsrep_forced_binlog_format = STATEMENT;
|
||||
set @@global.wsrep_forced_binlog_format = NONE;
|
||||
set @@global.wsrep_forced_binlog_format = FOO;
|
||||
ERROR 42000: Variable 'wsrep_forced_binlog_format' can't be set to the value of 'FOO'
|
||||
set @@global.wsrep_forced_binlog_format = @start_value;
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_load_data_splitting;
|
||||
set @@global.wsrep_load_data_splitting=ON;
|
||||
set @@global.wsrep_load_data_splitting=OFF;
|
||||
set @@global.wsrep_load_data_splitting=1;
|
||||
set @@global.wsrep_load_data_splitting=0;
|
||||
SET @@global.wsrep_load_data_splitting = -1;
|
||||
ERROR 42000: Variable 'wsrep_load_data_splitting' can't be set to the value of '-1'
|
||||
set @@global.wsrep_load_data_splitting = @start_value;
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_log_conflicts;
|
||||
set @@global.wsrep_log_conflicts=ON;
|
||||
set @@global.wsrep_log_conflicts=OFF;
|
||||
set @@global.wsrep_log_conflicts=1;
|
||||
set @@global.wsrep_log_conflicts=0;
|
||||
SET @@global.wsrep_log_conflicts = -1;
|
||||
ERROR 42000: Variable 'wsrep_log_conflicts' can't be set to the value of '-1'
|
||||
set @@global.wsrep_log_conflicts = @start_value;
|
17
mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result
Normal file
17
mysql-test/suite/sys_vars/r/wsrep_max_ws_rows_basic.result
Normal file
@ -0,0 +1,17 @@
|
||||
set @start_value = @@wsrep_max_ws_rows;
|
||||
set @@global.wsrep_max_ws_rows=256000;
|
||||
set @@global.wsrep_max_ws_rows=0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '0'
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '0'
|
||||
set @@global.wsrep_max_ws_rows=-1;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '-1'
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect wsrep_max_ws_rows value: '-1'
|
||||
SET @@global.wsrep_max_ws_rows = r;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_max_ws_rows'
|
||||
set @@global.wsrep_max_ws_rows = @start_value;
|
17
mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result
Normal file
17
mysql-test/suite/sys_vars/r/wsrep_max_ws_size_basic.result
Normal file
@ -0,0 +1,17 @@
|
||||
set @start_value = @@wsrep_max_ws_size;
|
||||
set @@global.wsrep_max_ws_size=256000;
|
||||
set @@global.wsrep_max_ws_size=0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '0'
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '0'
|
||||
set @@global.wsrep_max_ws_size=-1;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '-1'
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect wsrep_max_ws_size value: '-1'
|
||||
SET @@global.wsrep_max_ws_size = r;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_max_ws_size'
|
||||
set @@global.wsrep_max_ws_size = @start_value;
|
@ -0,0 +1,18 @@
|
||||
set @start_value = @@wsrep_mysql_replication_bundle;
|
||||
set @@global.wsrep_mysql_replication_bundle=0;
|
||||
set @@global.wsrep_mysql_replication_bundle=1000;
|
||||
set @@global.wsrep_mysql_replication_bundle=-1;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_mysql_replication_bundle value: '-1'
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect wsrep_mysql_replication_bundle value: '-1'
|
||||
set @@global.wsrep_mysql_replication_bundle=1001;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_mysql_replication_bundle value: '1001'
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect wsrep_mysql_replication_bundle value: '1001'
|
||||
SET @@global.wsrep_mysql_replication_bundle = r;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_mysql_replication_bundle'
|
||||
set @@global.wsrep_mysql_replication_bundle = @start_value;
|
45
mysql-test/suite/sys_vars/r/wsrep_node_address_basic.result
Normal file
45
mysql-test/suite/sys_vars/r/wsrep_node_address_basic.result
Normal file
@ -0,0 +1,45 @@
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_address)
|
||||
1
|
||||
1 Expected
|
||||
SET @@GLOBAL.wsrep_node_address=1;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_node_address'
|
||||
Expected error 'Read only variable'
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@GLOBAL.wsrep_node_address = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_node_address';
|
||||
@@GLOBAL.wsrep_node_address = VARIABLE_VALUE
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_node_address';
|
||||
COUNT(VARIABLE_VALUE)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@wsrep_node_address = @@GLOBAL.wsrep_node_address;
|
||||
@@wsrep_node_address = @@GLOBAL.wsrep_node_address
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@wsrep_node_address);
|
||||
COUNT(@@wsrep_node_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@local.wsrep_node_address);
|
||||
ERROR HY000: Variable 'wsrep_node_address' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@SESSION.wsrep_node_address);
|
||||
ERROR HY000: Variable 'wsrep_node_address' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_address)
|
||||
1
|
||||
1 Expected
|
@ -0,0 +1,45 @@
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_incoming_address)
|
||||
1
|
||||
1 Expected
|
||||
SET @@GLOBAL.wsrep_node_incoming_address=1;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_node_incoming_address'
|
||||
Expected error 'Read only variable'
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_incoming_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@GLOBAL.wsrep_node_incoming_address = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_node_incoming_address';
|
||||
@@GLOBAL.wsrep_node_incoming_address = VARIABLE_VALUE
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_incoming_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_node_incoming_address';
|
||||
COUNT(VARIABLE_VALUE)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@wsrep_node_incoming_address = @@GLOBAL.wsrep_node_incoming_address;
|
||||
@@wsrep_node_incoming_address = @@GLOBAL.wsrep_node_incoming_address
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@wsrep_node_incoming_address);
|
||||
COUNT(@@wsrep_node_incoming_address)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@local.wsrep_node_incoming_address);
|
||||
ERROR HY000: Variable 'wsrep_node_incoming_address' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@SESSION.wsrep_node_incoming_address);
|
||||
ERROR HY000: Variable 'wsrep_node_incoming_address' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.wsrep_node_incoming_address);
|
||||
COUNT(@@GLOBAL.wsrep_node_incoming_address)
|
||||
1
|
||||
1 Expected
|
6
mysql-test/suite/sys_vars/r/wsrep_node_name_basic.result
Normal file
6
mysql-test/suite/sys_vars/r/wsrep_node_name_basic.result
Normal file
@ -0,0 +1,6 @@
|
||||
set @start_value = @@wsrep_node_name;
|
||||
set @@global.wsrep_node_name='test';
|
||||
set @@global.wsrep_node_name=NULL;
|
||||
SET @@global.wsrep_node_name = 1;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_node_name'
|
||||
set @@global.wsrep_node_name = @start_value;
|
@ -0,0 +1,6 @@
|
||||
set @start_value = @@wsrep_notify_cmd;
|
||||
set @@global.wsrep_notify_cmd='test';
|
||||
set @@global.wsrep_notify_cmd=NULL;
|
||||
SET @@global.wsrep_notify_cmd = 1;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_notify_cmd'
|
||||
set @@global.wsrep_notify_cmd = @start_value;
|
8
mysql-test/suite/sys_vars/r/wsrep_on_basic.result
Normal file
8
mysql-test/suite/sys_vars/r/wsrep_on_basic.result
Normal file
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_on;
|
||||
set @@global.wsrep_on=ON;
|
||||
set @@global.wsrep_on=OFF;
|
||||
set @@global.wsrep_on=1;
|
||||
set @@global.wsrep_on=0;
|
||||
SET @@global.wsrep_on = -1;
|
||||
ERROR 42000: Variable 'wsrep_on' can't be set to the value of '-1'
|
||||
set @@global.wsrep_on = @start_value;
|
12
mysql-test/suite/sys_vars/r/wsrep_osu_method_basic.result
Normal file
12
mysql-test/suite/sys_vars/r/wsrep_osu_method_basic.result
Normal file
@ -0,0 +1,12 @@
|
||||
set @start_value = @@wsrep_osu_method;
|
||||
set @@global.wsrep_osu_method='TOI';
|
||||
set @@global.wsrep_osu_method='RSU';
|
||||
set @@global.wsrep_osu_method=TOI;
|
||||
set @@global.wsrep_osu_method=RSU;
|
||||
set @@global.wsrep_osu_method=TSU;
|
||||
ERROR 42000: Variable 'wsrep_OSU_method' can't be set to the value of 'TSU'
|
||||
set @@global.wsrep_osu_method='TSU';
|
||||
ERROR 42000: Variable 'wsrep_OSU_method' can't be set to the value of 'TSU'
|
||||
SET @@global.wsrep_on = -1;
|
||||
ERROR 42000: Variable 'wsrep_on' can't be set to the value of '-1'
|
||||
set @@global.wsrep_osu_method = @start_value;
|
4
mysql-test/suite/sys_vars/r/wsrep_provider_basic.result
Normal file
4
mysql-test/suite/sys_vars/r/wsrep_provider_basic.result
Normal file
@ -0,0 +1,4 @@
|
||||
SELECT COUNT(@@GLOBAL.wsrep_provider);
|
||||
COUNT(@@GLOBAL.wsrep_provider)
|
||||
1
|
||||
1 Expected
|
@ -0,0 +1,4 @@
|
||||
SELECT COUNT(@@GLOBAL.wsrep_provider_options);
|
||||
COUNT(@@GLOBAL.wsrep_provider_options)
|
||||
1
|
||||
1 Expected
|
49
mysql-test/suite/sys_vars/r/wsrep_recover_basic.result
Normal file
49
mysql-test/suite/sys_vars/r/wsrep_recover_basic.result
Normal file
@ -0,0 +1,49 @@
|
||||
SELECT COUNT(@@GLOBAL.wsrep_recover);
|
||||
COUNT(@@GLOBAL.wsrep_recover)
|
||||
1
|
||||
1 Expected
|
||||
set @@global.wsrep_recover=ON;
|
||||
ERROR HY000: Variable 'wsrep_recover' is a read only variable
|
||||
Expected error 'Readonly variable'
|
||||
set @@global.wsrep_recover=OFF;
|
||||
ERROR HY000: Variable 'wsrep_recover' is a read only variable
|
||||
Expected error 'Readonly variable'
|
||||
SELECT @@GLOBAL.wsrep_recover = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_recover';
|
||||
@@GLOBAL.wsrep_recover = VARIABLE_VALUE
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'OFF'
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.wsrep_recover);
|
||||
COUNT(@@GLOBAL.wsrep_recover)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='wsrep_recover';
|
||||
COUNT(VARIABLE_VALUE)
|
||||
1
|
||||
1 Expected
|
||||
SELECT @@wsrep_recover = @@GLOBAL.wsrep_recover;
|
||||
@@wsrep_recover = @@GLOBAL.wsrep_recover
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@wsrep_recover);
|
||||
COUNT(@@wsrep_recover)
|
||||
1
|
||||
1 Expected
|
||||
SELECT COUNT(@@local.wsrep_recover);
|
||||
ERROR HY000: Variable 'wsrep_recover' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@SESSION.wsrep_recover);
|
||||
ERROR HY000: Variable 'wsrep_recover' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.wsrep_recover);
|
||||
COUNT(@@GLOBAL.wsrep_recover)
|
||||
1
|
||||
1 Expected
|
||||
SELECT wsrep_recover = @@SESSION.wsrep_recover;
|
||||
ERROR 42S22: Unknown column 'wsrep_recover' in 'field list'
|
||||
Expected error 'Readonly variable'
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_replicate_myisam;
|
||||
set @@global.wsrep_replicate_myisam=ON;
|
||||
set @@global.wsrep_replicate_myisam=OFF;
|
||||
set @@global.wsrep_replicate_myisam=1;
|
||||
set @@global.wsrep_replicate_myisam=0;
|
||||
SET @@global.wsrep_replicate_myisam = -1;
|
||||
ERROR 42000: Variable 'wsrep_replicate_myisam' can't be set to the value of '-1'
|
||||
set @@global.wsrep_replicate_myisam = @start_value;
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_restart_slave;
|
||||
set @@global.wsrep_restart_slave=ON;
|
||||
set @@global.wsrep_restart_slave=OFF;
|
||||
set @@global.wsrep_restart_slave=1;
|
||||
set @@global.wsrep_restart_slave=0;
|
||||
SET @@global.wsrep_restart_slave = -1;
|
||||
ERROR 42000: Variable 'wsrep_restart_slave' can't be set to the value of '-1'
|
||||
set @@global.wsrep_restart_slave = @start_value;
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_restart_slave;
|
||||
set @@global.wsrep_restart_slave=ON;
|
||||
set @@global.wsrep_restart_slave=OFF;
|
||||
set @@global.wsrep_restart_slave=1;
|
||||
set @@global.wsrep_restart_slave=0;
|
||||
SET @@global.wsrep_restart_slave = -1;
|
||||
ERROR 42000: Variable 'wsrep_restart_slave' can't be set to the value of '-1'
|
||||
set @@global.wsrep_restart_slave = @start_value;
|
@ -0,0 +1,45 @@
|
||||
#
|
||||
# wsrep_slave_fk_checks
|
||||
#
|
||||
# save the initial value
|
||||
SET @wsrep_slave_fk_checks_global_saved = @@global.wsrep_slave_fk_checks;
|
||||
# default
|
||||
SELECT @@global.wsrep_slave_fk_checks;
|
||||
@@global.wsrep_slave_fk_checks
|
||||
1
|
||||
|
||||
# scope
|
||||
SELECT @@session.wsrep_slave_fk_checks;
|
||||
ERROR HY000: Variable 'wsrep_slave_FK_checks' is a GLOBAL variable
|
||||
SET @@global.wsrep_slave_fk_checks=OFF;
|
||||
SELECT @@global.wsrep_slave_fk_checks;
|
||||
@@global.wsrep_slave_fk_checks
|
||||
0
|
||||
SET @@global.wsrep_slave_fk_checks=ON;
|
||||
SELECT @@global.wsrep_slave_fk_checks;
|
||||
@@global.wsrep_slave_fk_checks
|
||||
1
|
||||
|
||||
# valid values
|
||||
SET @@global.wsrep_slave_fk_checks='OFF';
|
||||
SELECT @@global.wsrep_slave_fk_checks;
|
||||
@@global.wsrep_slave_fk_checks
|
||||
0
|
||||
SET @@global.wsrep_slave_fk_checks=ON;
|
||||
SELECT @@global.wsrep_slave_fk_checks;
|
||||
@@global.wsrep_slave_fk_checks
|
||||
1
|
||||
SET @@global.wsrep_slave_fk_checks=default;
|
||||
SELECT @@global.wsrep_slave_fk_checks;
|
||||
@@global.wsrep_slave_fk_checks
|
||||
1
|
||||
|
||||
# invalid values
|
||||
SET @@global.wsrep_slave_fk_checks=NULL;
|
||||
ERROR 42000: Variable 'wsrep_slave_FK_checks' can't be set to the value of 'NULL'
|
||||
SET @@global.wsrep_slave_fk_checks='junk';
|
||||
ERROR 42000: Variable 'wsrep_slave_FK_checks' can't be set to the value of 'junk'
|
||||
|
||||
# restore the initial value
|
||||
SET @@global.wsrep_slave_fk_checks = @wsrep_slave_fk_checks_global_saved;
|
||||
# End of test
|
20
mysql-test/suite/sys_vars/r/wsrep_slave_threads_basic.result
Normal file
20
mysql-test/suite/sys_vars/r/wsrep_slave_threads_basic.result
Normal file
@ -0,0 +1,20 @@
|
||||
set @start_value = @@wsrep_slave_threads;
|
||||
set @@global.wsrep_slave_threads=1;
|
||||
set @@global.wsrep_slave_threads=4;
|
||||
show warnings;
|
||||
Level Code Message
|
||||
set @@global.wsrep_slave_threads=0;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect wsrep_slave_threads value: '0'
|
||||
set @@global.wsrep_slave_threads=-1;
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect wsrep_slave_threads value: '-1'
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 1292 Truncated incorrect wsrep_slave_threads value: '-1'
|
||||
SET @@global.wsrep_slave_threads = r;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_slave_threads'
|
||||
set @@global.wsrep_slave_threads = @start_value;
|
@ -0,0 +1,45 @@
|
||||
#
|
||||
# wsrep_slave_uk_checks
|
||||
#
|
||||
# save the initial value
|
||||
SET @wsrep_slave_uk_checks_global_saved = @@global.wsrep_slave_uk_checks;
|
||||
# default
|
||||
SELECT @@global.wsrep_slave_uk_checks;
|
||||
@@global.wsrep_slave_uk_checks
|
||||
0
|
||||
|
||||
# scope
|
||||
SELECT @@session.wsrep_slave_uk_checks;
|
||||
ERROR HY000: Variable 'wsrep_slave_UK_checks' is a GLOBAL variable
|
||||
SET @@global.wsrep_slave_uk_checks=OFF;
|
||||
SELECT @@global.wsrep_slave_uk_checks;
|
||||
@@global.wsrep_slave_uk_checks
|
||||
0
|
||||
SET @@global.wsrep_slave_uk_checks=ON;
|
||||
SELECT @@global.wsrep_slave_uk_checks;
|
||||
@@global.wsrep_slave_uk_checks
|
||||
1
|
||||
|
||||
# valid values
|
||||
SET @@global.wsrep_slave_uk_checks='OFF';
|
||||
SELECT @@global.wsrep_slave_uk_checks;
|
||||
@@global.wsrep_slave_uk_checks
|
||||
0
|
||||
SET @@global.wsrep_slave_uk_checks=ON;
|
||||
SELECT @@global.wsrep_slave_uk_checks;
|
||||
@@global.wsrep_slave_uk_checks
|
||||
1
|
||||
SET @@global.wsrep_slave_uk_checks=default;
|
||||
SELECT @@global.wsrep_slave_uk_checks;
|
||||
@@global.wsrep_slave_uk_checks
|
||||
0
|
||||
|
||||
# invalid values
|
||||
SET @@global.wsrep_slave_uk_checks=NULL;
|
||||
ERROR 42000: Variable 'wsrep_slave_UK_checks' can't be set to the value of 'NULL'
|
||||
SET @@global.wsrep_slave_uk_checks='junk';
|
||||
ERROR 42000: Variable 'wsrep_slave_UK_checks' can't be set to the value of 'junk'
|
||||
|
||||
# restore the initial value
|
||||
SET @@global.wsrep_slave_uk_checks = @wsrep_slave_uk_checks_global_saved;
|
||||
# End of test
|
3
mysql-test/suite/sys_vars/r/wsrep_sst_auth_basic.result
Normal file
3
mysql-test/suite/sys_vars/r/wsrep_sst_auth_basic.result
Normal file
@ -0,0 +1,3 @@
|
||||
SELECT COUNT(@@wsrep_sst_auth);
|
||||
COUNT(@@wsrep_sst_auth)
|
||||
0
|
10
mysql-test/suite/sys_vars/r/wsrep_sst_donor_basic.result
Normal file
10
mysql-test/suite/sys_vars/r/wsrep_sst_donor_basic.result
Normal file
@ -0,0 +1,10 @@
|
||||
SELECT COUNT(@@wsrep_sst_donor);
|
||||
COUNT(@@wsrep_sst_donor)
|
||||
1
|
||||
set @start_value = @@wsrep_sst_donor;
|
||||
set @@global.wsrep_sst_donor='foo';
|
||||
set @@global.wsrep_sst_donor=NULL;
|
||||
set @@global.wsrep_sst_donor=r;
|
||||
set @@global.wsrep_sst_donor=1;
|
||||
ERROR 42000: Incorrect argument type to variable 'wsrep_sst_donor'
|
||||
set @@global.wsrep_sst_donor = @start_value;
|
@ -0,0 +1,8 @@
|
||||
set @start_value = @@wsrep_sst_donor_rejects_queries;
|
||||
set @@global.wsrep_sst_donor_rejects_queries=ON;
|
||||
set @@global.wsrep_sst_donor_rejects_queries=OFF;
|
||||
set @@global.wsrep_sst_donor_rejects_queries=1;
|
||||
set @@global.wsrep_sst_donor_rejects_queries=0;
|
||||
SET @@global.wsrep_sst_donor_rejects_queries = -1;
|
||||
ERROR 42000: Variable 'wsrep_sst_donor_rejects_queries' can't be set to the value of '-1'
|
||||
set @@global.wsrep_sst_donor_rejects_queries = @start_value;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user