mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Merge remote-tracking branch 10.2 into 10.3
Conflicts: mysql-test/suite/galera/t/galera_binlog_event_max_size_max-master.opt mysql-test/suite/innodb/r/innodb-mdev-7513.result mysql-test/suite/innodb/t/innodb-mdev-7513.test mysql-test/suite/wsrep/disabled.def storage/innobase/ibuf/ibuf0ibuf.cc
This commit is contained in:
@ -1666,6 +1666,9 @@ ibx_copy_incremental_over_full()
|
||||
}
|
||||
}
|
||||
|
||||
if (!(ret = backup_files_from_datadir(xtrabackup_incremental_dir)))
|
||||
goto cleanup;
|
||||
|
||||
/* copy buffer pool dump */
|
||||
if (innobase_buffer_pool_filename) {
|
||||
const char *src_name;
|
||||
@ -2177,21 +2180,27 @@ static bool backup_files_from_datadir(const char *dir_path)
|
||||
if (info.type != OS_FILE_TYPE_FILE)
|
||||
continue;
|
||||
|
||||
const char *pname = strrchr(info.name, IF_WIN('\\', '/'));
|
||||
const char *pname = strrchr(info.name, OS_PATH_SEPARATOR);
|
||||
if (!pname)
|
||||
pname = info.name;
|
||||
|
||||
/* Copy aria log files, and aws keys for encryption plugins.*/
|
||||
const char *prefixes[] = { "aria_log", "aws-kms-key" };
|
||||
for (size_t i = 0; i < array_elements(prefixes); i++) {
|
||||
if (starts_with(pname, prefixes[i])) {
|
||||
ret = copy_file(ds_data, info.name, info.name, 1);
|
||||
if (!ret) {
|
||||
if (!starts_with(pname, "aws-kms-key") &&
|
||||
!starts_with(pname, "aria_log"))
|
||||
/* For ES exchange the above line with the following code:
|
||||
(!xtrabackup_prepare || !xtrabackup_incremental_dir ||
|
||||
!starts_with(pname, "aria_log")))
|
||||
*/
|
||||
continue;
|
||||
|
||||
if (xtrabackup_prepare && xtrabackup_incremental_dir &&
|
||||
file_exists(info.name))
|
||||
unlink(info.name);
|
||||
|
||||
std::string full_path(dir_path);
|
||||
full_path.append(1, OS_PATH_SEPARATOR).append(info.name);
|
||||
if (!(ret = copy_file(ds_data, full_path.c_str() , info.name, 1)))
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
os_file_closedir(dir);
|
||||
return ret;
|
||||
}
|
||||
|
Submodule libmariadb updated: 980f2dbea6...f035fc5f7f
@ -3051,15 +3051,43 @@ sub mysql_server_start($) {
|
||||
# Save this test case information, so next can examine it
|
||||
$mysqld->{'started_tinfo'}= $tinfo;
|
||||
}
|
||||
|
||||
# If wsrep is on, we need to wait until the first
|
||||
# server starts and bootstraps the cluster before
|
||||
# starting other servers. The bootsrap server in the
|
||||
# configuration should always be the first which has
|
||||
# wsrep_on=ON
|
||||
if (wsrep_on($mysqld) && wsrep_is_bootstrap_server($mysqld))
|
||||
{
|
||||
mtr_verbose("Waiting for wsrep bootstrap server to start");
|
||||
if ($mysqld->{WAIT}->($mysqld))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub mysql_server_wait {
|
||||
my ($mysqld) = @_;
|
||||
my ($mysqld, $tinfo) = @_;
|
||||
|
||||
return not sleep_until_file_created($mysqld->value('pid-file'),
|
||||
if (!sleep_until_file_created($mysqld->value('pid-file'),
|
||||
$opt_start_timeout,
|
||||
$mysqld->{'proc'},
|
||||
$warn_seconds);
|
||||
$warn_seconds))
|
||||
{
|
||||
$tinfo->{comment}= "Failed to start ".$mysqld->name() . "\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (wsrep_on($mysqld))
|
||||
{
|
||||
mtr_verbose("Waiting for wsrep server " . $mysqld->name() . " to be ready");
|
||||
if (!wait_wsrep_ready($tinfo, $mysqld))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub create_config_file_for_extern {
|
||||
@ -5593,6 +5621,118 @@ sub stop_servers($$) {
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# run_query_output
|
||||
#
|
||||
# Run a query against a server using mysql client. The output of
|
||||
# the query will be written into outfile.
|
||||
#
|
||||
sub run_query_output {
|
||||
my ($mysqld, $query, $outfile)= @_;
|
||||
my $args;
|
||||
|
||||
mtr_init_args(\$args);
|
||||
mtr_add_arg($args, "--defaults-file=%s", $path_config_file);
|
||||
mtr_add_arg($args, "--defaults-group-suffix=%s", $mysqld->after('mysqld'));
|
||||
mtr_add_arg($args, "--silent");
|
||||
mtr_add_arg($args, "--execute=%s", $query);
|
||||
|
||||
my $res= My::SafeProcess->run
|
||||
(
|
||||
name => "run_query_output -> ".$mysqld->name(),
|
||||
path => $exe_mysql,
|
||||
args => \$args,
|
||||
output => $outfile,
|
||||
error => $outfile
|
||||
);
|
||||
|
||||
return $res
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# wsrep_wait_ready
|
||||
#
|
||||
# Wait until the server has been joined to the cluster and is
|
||||
# ready for operation.
|
||||
#
|
||||
# RETURN
|
||||
# 1 Server is ready
|
||||
# 0 Server didn't transition to ready state within start timeout
|
||||
#
|
||||
sub wait_wsrep_ready($$) {
|
||||
my ($tinfo, $mysqld)= @_;
|
||||
|
||||
my $sleeptime= 100; # Milliseconds
|
||||
my $loops= ($opt_start_timeout * 1000) / $sleeptime;
|
||||
|
||||
my $name= $mysqld->name();
|
||||
my $outfile= "$opt_vardir/tmp/$name.wsrep_ready";
|
||||
my $query= "SET SESSION wsrep_sync_wait = 0;
|
||||
SELECT VARIABLE_NAME, VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
||||
WHERE VARIABLE_NAME = 'wsrep_ready'";
|
||||
|
||||
for (my $loop= 1; $loop <= $loops; $loop++)
|
||||
{
|
||||
# Careful... if MTR runs with option 'verbose' then the
|
||||
# file contains also SafeProcess verbose output
|
||||
if (run_query_output($mysqld, $query, $outfile) == 0 &&
|
||||
mtr_grab_file($outfile) =~ /WSREP_READY\s+ON/)
|
||||
{
|
||||
unlink($outfile);
|
||||
return 1;
|
||||
}
|
||||
mtr_milli_sleep($sleeptime);
|
||||
}
|
||||
|
||||
$tinfo->{logfile}= "WSREP did not transition to state READY";
|
||||
return 0;
|
||||
}
|
||||
|
||||
#
|
||||
# wsrep_is_bootstrap_server
|
||||
#
|
||||
# Check if the server is the first one to be started in the
|
||||
# cluster.
|
||||
#
|
||||
# RETURN
|
||||
# 1 The server is a bootstrap server
|
||||
# 0 The server is not a bootstrap server
|
||||
#
|
||||
sub wsrep_is_bootstrap_server($) {
|
||||
my $mysqld= shift;
|
||||
|
||||
my $cluster_address= $mysqld->if_exist('wsrep-cluster-address') ||
|
||||
$mysqld->if_exist('wsrep_cluster_address');
|
||||
if (defined $cluster_address)
|
||||
{
|
||||
return $cluster_address eq "gcomm://" || $cluster_address eq "'gcomm://'";
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#
|
||||
# wsrep_on
|
||||
#
|
||||
# Check if wsrep has been enabled for a server.
|
||||
#
|
||||
# RETURN
|
||||
# 1 Wsrep has been enabled
|
||||
# 0 Wsrep is not enabled
|
||||
#
|
||||
sub wsrep_on($) {
|
||||
my $mysqld= shift;
|
||||
#check if wsrep_on= is set in configuration
|
||||
if ($mysqld->if_exist('wsrep-on')) {
|
||||
my $on= "".$mysqld->value('wsrep-on');
|
||||
if ($on eq "1" || $on eq "ON") {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# start_servers
|
||||
@ -5612,7 +5752,7 @@ sub start_servers($) {
|
||||
|
||||
for (all_servers()) {
|
||||
next unless $_->{WAIT} and started($_);
|
||||
if ($_->{WAIT}->($_)) {
|
||||
if ($_->{WAIT}->($_, $tinfo)) {
|
||||
$tinfo->{comment}= "Failed to start ".$_->name() . "\n";
|
||||
return 1;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
MW-286 : MDEV-18464 Killing thread can cause mutex deadlock if done concurrently with Galera/replication victim kill
|
||||
MW-329 : MDEV-19962 Galera test failure on MW-329
|
||||
MW-388: MDEV-19803 Long semaphore wait error on galera.MW-388
|
||||
galera_account_management : MariaDB 10.0 does not support ALTER USER
|
||||
@ -17,6 +18,7 @@ galera_as_master_gtid : Requires MySQL GTID
|
||||
galera_as_master_gtid_change_master : Requires MySQL GTID
|
||||
galera_as_slave_preordered : wsrep-preordered feature not merged to MariaDB
|
||||
galera_as_slave_replication_bundle : MDEV-15785 OPTION_GTID_BEGIN is set in Gtid_log_event::do_apply_event()
|
||||
galera_autoinc_sst_mariabackup : Known issue, may require porting MDEV-17458 from later versions
|
||||
galera_binlog_rows_query_log_events: MariaDB does not support binlog_rows_query_log_events
|
||||
galera_binlog_stmt_autoinc: MDEV-19959 Galera test failure on galera_binlog_stmt_autoinc
|
||||
galera_flush : MariaDB does not have global.thread_statistics
|
||||
|
@ -2,7 +2,7 @@
|
||||
!include include/default_mysqld.cnf
|
||||
|
||||
[mysqld]
|
||||
wsrep-on=1
|
||||
loose-innodb
|
||||
binlog-format=row
|
||||
innodb-autoinc-lock-mode=2
|
||||
default-storage-engine=innodb
|
||||
@ -12,18 +12,26 @@ wsrep_node_address=127.0.0.1
|
||||
wsrep-sync-wait=15
|
||||
|
||||
[mysqld.1]
|
||||
loose-innodb
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep-cluster-address=gcomm://
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.1.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S;gcache.size=10M'
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
|
||||
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
|
||||
|
||||
# enforce read-committed characteristics across the cluster
|
||||
wsrep_causal_reads=ON
|
||||
wsrep_sync_wait = 15
|
||||
|
||||
[mysqld.2]
|
||||
loose-innodb
|
||||
#galera_port=@OPT.port
|
||||
#ist_port=@OPT.port
|
||||
#sst_port=@OPT.port
|
||||
wsrep-on=1
|
||||
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
|
||||
wsrep_provider_options='repl.causal_read_timeout=PT90S;base_port=@mysqld.2.#galera_port;evs.suspect_timeout=PT10S;evs.inactive_timeout=PT30S;evs.install_timeout=PT15S'
|
||||
|
||||
@ -36,7 +44,6 @@ wsrep_sst_receive_address=127.0.0.2:@mysqld.2.#sst_port
|
||||
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.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
|
||||
|
@ -1,4 +1,6 @@
|
||||
connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3;
|
||||
call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*");
|
||||
call mtr.add_suppression("WSREP has not yet prepared node for application use");
|
||||
connection node_1;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET GLOBAL wsrep_provider_options='gmcast.isolate=1';
|
||||
@ -6,6 +8,9 @@ SET SESSION wsrep_on = OFF;
|
||||
SET SESSION wsrep_on = ON;
|
||||
SET global wsrep_sync_wait=0;
|
||||
connection node_3;
|
||||
SELECT @@wsrep_on;
|
||||
@@wsrep_on
|
||||
0
|
||||
START SLAVE;
|
||||
include/wait_for_slave_param.inc [Slave_IO_Running]
|
||||
connection node_1;
|
||||
@ -22,9 +27,3 @@ connection node_3;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
CALL mtr.add_suppression('failed registering on master');
|
||||
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
|
||||
connection node_1;
|
||||
RESET MASTER;
|
||||
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
|
||||
connection node_2;
|
||||
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
|
||||
|
@ -1,23 +0,0 @@
|
||||
CREATE TABLE t1 (f1 INTEGER AUTO_INCREMENT PRIMARY KEY, f2 CHAR(20) DEFAULT 'abc') ENGINE=InnoDB;
|
||||
INSERT INTO t1 (f1) VALUES (1);
|
||||
CREATE TABLE t2 (f1 CHAR(20)) ENGINE=InnoDB;
|
||||
CREATE PROCEDURE proc_update ()
|
||||
BEGIN
|
||||
DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
|
||||
SET SESSION wsrep_sync_wait = 0;
|
||||
WHILE 1 DO
|
||||
UPDATE t1 SET f2 = LEFT(MD5(RAND()), 4);
|
||||
END WHILE;
|
||||
END|
|
||||
connect node_1X, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1X;
|
||||
CALL proc_update();;
|
||||
connection node_2;
|
||||
SET SESSION wsrep_retry_autocommit = 10000;
|
||||
connection node_1;
|
||||
connection node_1X;
|
||||
Got one of the listed errors
|
||||
connection node_1;
|
||||
DROP PROCEDURE proc_update;
|
||||
DROP TABLE t1, t2;
|
||||
CALL mtr.add_suppression("conflict state ABORTED after post commit");
|
@ -1,24 +1,11 @@
|
||||
connection node_1;
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
connection node_2;
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
connection node_1;
|
||||
SELECT Argument FROM mysql.general_log;
|
||||
Argument
|
||||
SET GLOBAL general_log='ON';
|
||||
SET SESSION wsrep_osu_method=TOI;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_osu_method=RSU;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
SET SESSION wsrep_osu_method=TOI;
|
||||
SELECT argument FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%';
|
||||
argument
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB
|
||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER
|
||||
connection node_2;
|
||||
SELECT Argument FROM mysql.general_log;
|
||||
Argument
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL general_log='OFF';
|
||||
connection node_1;
|
||||
SET GLOBAL general_log='OFF';
|
||||
|
@ -1,13 +1,11 @@
|
||||
connection node_1;
|
||||
SET SESSION wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET SESSION wsrep_on=ON;
|
||||
SET SESSION binlog_format = 'STATEMENT';
|
||||
Warnings:
|
||||
Warning 1105 MariaDB Galera and flashback do not support binlog format: STATEMENT
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
SET SESSION binlog_format = 'MIXED';
|
||||
Warnings:
|
||||
Warning 1105 MariaDB Galera and flashback do not support binlog format: MIXED
|
||||
INSERT INTO t1 VALUES (2);
|
||||
SHOW BINLOG EVENTS IN 'mysqld-bin.000001' FROM 256;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
|
@ -1,14 +1,12 @@
|
||||
CREATE TABLE t1 (f1 INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
connection node_2;
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
UPDATE t1 SET f1 = 2;
|
||||
connection node_1;
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
COUNT(*) = 1
|
||||
1
|
||||
SET SESSION wsrep_sync_wait = 15;
|
||||
SELECT * from t1;
|
||||
f1
|
||||
2
|
||||
gtid_binlog_state_equal
|
||||
1
|
||||
DROP TABLE t1;
|
||||
|
@ -71,5 +71,3 @@ DROP TABLE t2;
|
||||
#cleanup
|
||||
connection node_1;
|
||||
RESET MASTER;
|
||||
connection node_2;
|
||||
reset master;
|
||||
|
@ -1,3 +1,4 @@
|
||||
call mtr.add_suppression("WSREP has not yet prepared node for application use");
|
||||
connection node_1;
|
||||
connection node_2;
|
||||
connection node_2;
|
||||
@ -16,9 +17,9 @@ SHOW STATUS LIKE 'wsrep_cluster_status';
|
||||
Variable_name Value
|
||||
wsrep_cluster_status non-Primary
|
||||
SELECT * FROM t1;
|
||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||
Got one of the listed errors
|
||||
SELECT 1 FROM t1;
|
||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||
Got one of the listed errors
|
||||
SET @@session.wsrep_dirty_reads=ON;
|
||||
SELECT * FROM t1;
|
||||
i
|
||||
@ -31,7 +32,7 @@ i variable_name variable_value
|
||||
1 WSREP_DIRTY_READS ON
|
||||
SET @@session.wsrep_dirty_reads=OFF;
|
||||
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
|
||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||
Got one of the listed errors
|
||||
SELECT 1;
|
||||
1
|
||||
1
|
||||
|
@ -7,4 +7,4 @@ MAX(size) = 2
|
||||
1
|
||||
SELECT COUNT(DISTINCT idx) = 2 FROM mtr_wsrep_notify.status;
|
||||
COUNT(DISTINCT idx) = 2
|
||||
1
|
||||
0
|
||||
|
@ -1,3 +1,4 @@
|
||||
call mtr.add_suppression("WSREP has not yet prepared node for application use");
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
connection node_1;
|
||||
@ -5,14 +6,14 @@ SET SESSION wsrep_reject_queries = ALL;
|
||||
ERROR HY000: Variable 'wsrep_reject_queries' is a GLOBAL variable and should be set with SET GLOBAL
|
||||
SET GLOBAL wsrep_reject_queries = ALL;
|
||||
SELECT * FROM t1;
|
||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||
Got one of the listed errors
|
||||
SET GLOBAL wsrep_reject_queries = ALL_KILL;
|
||||
connection node_1a;
|
||||
SELECT * FROM t1;
|
||||
Got one of the listed errors
|
||||
connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1;
|
||||
SELECT * FROM t1;
|
||||
ERROR 08S01: WSREP has not yet prepared node for application use
|
||||
Got one of the listed errors
|
||||
connection node_2;
|
||||
SELECT VARIABLE_VALUE = 2 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_size';
|
||||
VARIABLE_VALUE = 2
|
||||
|
@ -25,7 +25,7 @@ VARIABLE_VALUE = 'ON'
|
||||
1
|
||||
SELECT VARIABLE_VALUE = 0 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_local_index';
|
||||
VARIABLE_VALUE = 0
|
||||
1
|
||||
0
|
||||
SELECT VARIABLE_VALUE = 'ON' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_ready';
|
||||
VARIABLE_VALUE = 'ON'
|
||||
1
|
||||
|
@ -2,10 +2,13 @@
|
||||
# MW-284 Slave I/O retry on ER_COM_UNKNOWN_ERROR
|
||||
#
|
||||
|
||||
--source include/have_log_bin.inc
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3
|
||||
call mtr.add_suppression("\\[ERROR\\] Error reading packet from server: WSREP has not yet prepared node for application use .*");
|
||||
call mtr.add_suppression("WSREP has not yet prepared node for application use");
|
||||
|
||||
--disable_query_log
|
||||
--eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$NODE_MYPORT_1, MASTER_USER='root', MASTER_CONNECT_RETRY=1;
|
||||
--enable_query_log
|
||||
@ -18,11 +21,14 @@ SET SESSION wsrep_on = OFF;
|
||||
--let $wait_condition = SELECT VARIABLE_VALUE = 'non-Primary' FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE VARIABLE_NAME = 'wsrep_cluster_status'
|
||||
--source include/wait_condition.inc
|
||||
SET SESSION wsrep_on = ON;
|
||||
|
||||
#wsrep_sync_wait is set to zero because when slave tries to connect it it ask for queries like SELECT UNIX_TIMESTAMP() on node 1 which will fail, causing
|
||||
#a warning in slave error log.
|
||||
SET global wsrep_sync_wait=0;
|
||||
|
||||
--connection node_3
|
||||
SELECT @@wsrep_on;
|
||||
--sleep 1
|
||||
START SLAVE;
|
||||
--let $slave_param= Slave_IO_Running
|
||||
--let $slave_param_value= Connecting
|
||||
@ -50,8 +56,8 @@ INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_1
|
||||
DROP TABLE t1;
|
||||
|
||||
--eval SET global wsrep_sync_wait=$wsrep_sync_wait_state
|
||||
|
||||
--connection node_3
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 't1'
|
||||
--source include/wait_condition.inc
|
||||
@ -60,11 +66,5 @@ STOP SLAVE;
|
||||
RESET SLAVE ALL;
|
||||
|
||||
CALL mtr.add_suppression('failed registering on master');
|
||||
CALL mtr.add_suppression('You need to use --log-bin to make --binlog-format work');
|
||||
|
||||
--connection node_1
|
||||
RESET MASTER;
|
||||
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
|
||||
|
||||
--connection node_2
|
||||
CALL mtr.add_suppression('WSREP: Last Applied Action message in non-primary configuration from member');
|
@ -1 +0,0 @@
|
||||
--log-bin --log-slave-updates
|
12
mysql-test/suite/galera/t/MW-313.cnf
Normal file
12
mysql-test/suite/galera/t/MW-313.cnf
Normal file
@ -0,0 +1,12 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
[mysqld.2]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
|
||||
|
@ -1,36 +0,0 @@
|
||||
#
|
||||
# MW-328 Fix unnecessary/silent BF aborts
|
||||
#
|
||||
|
||||
#
|
||||
# Make sure that a high value of wsrep_retry_autocommit
|
||||
# masks all deadlock errors
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/big_test.inc
|
||||
--source suite/galera/t/MW-328-header.inc
|
||||
|
||||
--connection node_2
|
||||
--let $count = 100
|
||||
|
||||
SET SESSION wsrep_retry_autocommit = 10000;
|
||||
|
||||
--disable_query_log
|
||||
|
||||
while ($count)
|
||||
{
|
||||
--error 0
|
||||
INSERT IGNORE INTO t2 SELECT f2 FROM t1;
|
||||
|
||||
--disable_result_log
|
||||
--error 0
|
||||
SELECT 1 FROM DUAL;
|
||||
--enable_result_log
|
||||
|
||||
--dec $count
|
||||
}
|
||||
|
||||
--enable_query_log
|
||||
|
||||
--source suite/galera/t/MW-328-footer.inc
|
@ -1 +0,0 @@
|
||||
--wsrep-retry-autocommit=0
|
9
mysql-test/suite/galera/t/MW-329.cnf
Normal file
9
mysql-test/suite/galera/t/MW-329.cnf
Normal file
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-retry-autocommit=0
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
@ -1,2 +1 @@
|
||||
--log-output=TABLE
|
||||
--general-log=OFF
|
||||
|
@ -3,40 +3,30 @@
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
--connection node_1
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
|
||||
--sleep 1
|
||||
--connection node_2
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log;
|
||||
--source include/wait_condition.inc
|
||||
TRUNCATE TABLE mysql.general_log;
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument NOT LIKE '%mysql.general_log%'
|
||||
--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
|
||||
--source include/wait_condition_with_debug.inc
|
||||
|
||||
--sleep 1
|
||||
--connection node_1
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log;
|
||||
--source include/wait_condition.inc
|
||||
SELECT Argument FROM mysql.general_log;
|
||||
|
||||
SET GLOBAL general_log='ON';
|
||||
SET SESSION wsrep_osu_method=TOI;
|
||||
CREATE TABLE t1 (f1 INTEGER) ENGINE=InnoDB;
|
||||
SET SESSION wsrep_osu_method=RSU;
|
||||
ALTER TABLE t1 ADD COLUMN f2 INTEGER;
|
||||
SET SESSION wsrep_osu_method=TOI;
|
||||
|
||||
--let $wait_condition = SELECT COUNT(argument) = 2 FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%';
|
||||
--source include/wait_condition.inc
|
||||
|
||||
SELECT argument FROM mysql.general_log WHERE argument LIKE 'CREATE%' OR argument LIKE 'ALTER%';
|
||||
--let $wait_condition = SELECT COUNT(*) = 2 FROM mysql.general_log WHERE argument LIKE "CREATE%" OR argument LIKE "ALTER%"
|
||||
--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
|
||||
--source include/wait_condition_with_debug.inc
|
||||
|
||||
--connection node_2
|
||||
SELECT Argument FROM mysql.general_log;
|
||||
|
||||
--let $wait_condition = SELECT COUNT(*) = 0 FROM mysql.general_log WHERE argument LIKE "CREATE%" OR argument LIKE "ALTER%"
|
||||
--let $wait_condition_on_error_output = SELECT * FROM mysql.general_log
|
||||
--source include/wait_condition_with_debug.inc
|
||||
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL general_log='OFF';
|
||||
|
||||
--connection node_1
|
||||
SET GLOBAL general_log='OFF';
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--log-bin --log-slave-updates
|
@ -1 +0,0 @@
|
||||
--log-bin --log-slave-updates
|
10
mysql-test/suite/galera/t/MW-86-wait8.cnf
Normal file
10
mysql-test/suite/galera/t/MW-86-wait8.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
[mysqld.2]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
13
mysql-test/suite/galera/t/enforce_storage_engine2.cnf
Normal file
13
mysql-test/suite/galera/t/enforce_storage_engine2.cnf
Normal file
@ -0,0 +1,13 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
enforce_storage_engine=innodb
|
||||
sql_mode=''
|
||||
|
||||
[mysqld.2]
|
||||
enforce_storage_engine=innodb
|
||||
sql_mode=''
|
||||
|
||||
|
||||
|
||||
|
@ -1,2 +0,0 @@
|
||||
--enforce_storage_engine=innodb --sql_mode=''
|
||||
|
@ -1 +0,0 @@
|
||||
--lock_wait_timeout=5 --innodb_lock_wait_timeout=5 --wait_timeout=5
|
@ -0,0 +1,14 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
lock_wait_timeout=5
|
||||
innodb_lock_wait_timeout=5
|
||||
wait_timeout=5
|
||||
|
||||
[mysqld.2]
|
||||
lock_wait_timeout=5
|
||||
innodb_lock_wait_timeout=5
|
||||
wait_timeout=5
|
||||
|
||||
|
||||
|
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
innodb_stats_persistent=ON
|
||||
|
||||
[mysqld.2]
|
||||
innodb_stats_persistent=ON
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--innodb_stats_persistent=ON
|
@ -1 +0,0 @@
|
||||
--binlog-checksum=CRC32 --master-verify-checksum=1 --slave-sql-verify-checksum=1
|
13
mysql-test/suite/galera/t/galera_binlog_checksum.cnf
Normal file
13
mysql-test/suite/galera/t/galera_binlog_checksum.cnf
Normal file
@ -0,0 +1,13 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
binlog-checksum=CRC32
|
||||
master-verify-checksum=1
|
||||
slave-sql-verify-checksum=1
|
||||
|
||||
[mysqld.2]
|
||||
binlog-checksum=CRC32
|
||||
master-verify-checksum=1
|
||||
slave-sql-verify-checksum=1
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--binlog-row-event-max-size=4294967040
|
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
binlog-row-event-max-size=4294967040
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--binlog-row-event-max-size=256
|
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
binlog-row-event-max-size=256
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--query_cache_type=1 --query_cache_size=1000000
|
10
mysql-test/suite/galera/t/galera_flush.cnf
Normal file
10
mysql-test/suite/galera/t/galera_flush.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
query_cache_type=1
|
||||
query_cache_size=1000000
|
||||
|
||||
[mysqld.2]
|
||||
query_cache_type=1
|
||||
query_cache_size=1000000
|
||||
|
12
mysql-test/suite/galera/t/galera_flush_local.cnf
Normal file
12
mysql-test/suite/galera/t/galera_flush_local.cnf
Normal file
@ -0,0 +1,12 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
query_cache_type=1
|
||||
query_cache_size=1000000
|
||||
wsrep_replicate_myisam=ON
|
||||
|
||||
[mysqld.2]
|
||||
query_cache_type=1
|
||||
query_cache_size=1000000
|
||||
wsrep_replicate_myisam=ON
|
||||
|
@ -1,3 +0,0 @@
|
||||
--query_cache_type=1
|
||||
--query_cache_size=1000000
|
||||
--wsrep_replicate_myisam=ON
|
@ -7,14 +7,20 @@
|
||||
--source include/galera_cluster.inc
|
||||
|
||||
--connection node_1
|
||||
SET SESSION wsrep_on=OFF;
|
||||
RESET MASTER;
|
||||
SET SESSION wsrep_on=ON;
|
||||
|
||||
--disable_warnings
|
||||
SET SESSION binlog_format = 'STATEMENT';
|
||||
--enable_warnings
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--disable_warnings
|
||||
SET SESSION binlog_format = 'MIXED';
|
||||
--enable_warnings
|
||||
|
||||
INSERT INTO t1 VALUES (2);
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--log-bin --log-slave-updates
|
10
mysql-test/suite/galera/t/galera_gtid.cnf
Normal file
10
mysql-test/suite/galera/t/galera_gtid.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
[mysqld.2]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
@ -11,14 +11,18 @@ CREATE TABLE t1 (f1 INT PRIMARY KEY);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
||||
--connection node_2
|
||||
SELECT COUNT(*) = 1 FROM t1;
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1
|
||||
--source include/wait_condition.inc
|
||||
|
||||
UPDATE t1 SET f1 = 2;
|
||||
|
||||
--let $gtid_binlog_state_node2 = `SELECT @@global.gtid_binlog_state;`
|
||||
|
||||
--connection node_1
|
||||
SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2;
|
||||
SET SESSION wsrep_sync_wait = 15;
|
||||
--let $wait_condition = SELECT COUNT(*) = 1 FROM t1 WHERE f1 = 2
|
||||
--source include/wait_condition.inc
|
||||
SELECT * from t1;
|
||||
|
||||
--disable_query_log
|
||||
--eval SELECT '$gtid_binlog_state_node2' = @@global.gtid_binlog_state AS gtid_binlog_state_equal;
|
||||
|
@ -1,6 +1,15 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld]
|
||||
[mysqld.1]
|
||||
secure-file-priv = ""
|
||||
innodb_file_format ='Barracuda'
|
||||
innodb_file_per_table = ON
|
||||
innodb_stats_persistent=ON
|
||||
innodb_stats_auto_recalc=ON
|
||||
innodb_stats_persistent_sample_pages=20
|
||||
innodb_stats_sample_pages=8
|
||||
|
||||
[mysqld.2]
|
||||
secure-file-priv = ""
|
||||
innodb_file_format ='Barracuda'
|
||||
innodb_file_per_table = ON
|
||||
|
@ -1 +0,0 @@
|
||||
--log-bin --log-slave-updates
|
10
mysql-test/suite/galera/t/galera_log_bin.cnf
Normal file
10
mysql-test/suite/galera/t/galera_log_bin.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
||||
[mysqld.2]
|
||||
log-bin
|
||||
log-slave-updates
|
||||
|
@ -1,5 +1,5 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/force_restart.inc
|
||||
|
||||
--connection node_1
|
||||
reset master;
|
||||
@ -39,5 +39,4 @@ DROP TABLE t2;
|
||||
--echo #cleanup
|
||||
--connection node_1
|
||||
RESET MASTER;
|
||||
--connection node_2
|
||||
reset master;
|
||||
|
||||
|
9
mysql-test/suite/galera/t/galera_mdev_13787.cnf
Normal file
9
mysql-test/suite/galera/t/galera_mdev_13787.cnf
Normal file
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
innodb-stats-persistent=1
|
||||
|
||||
[mysqld.2]
|
||||
innodb-stats-persistent=1
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--innodb-stats-persistent=1
|
@ -1 +0,0 @@
|
||||
--query_cache_type=1 --query_cache_size=1355776
|
10
mysql-test/suite/galera/t/galera_query_cache.cnf
Normal file
10
mysql-test/suite/galera/t/galera_query_cache.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
query_cache_type=1
|
||||
query_cache_size=1355776
|
||||
|
||||
[mysqld.2]
|
||||
query_cache_type=1
|
||||
query_cache_size=1355776
|
||||
|
@ -1 +0,0 @@
|
||||
--query_cache_type=1 --query_cache_size=1355776
|
10
mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf
Normal file
10
mysql-test/suite/galera/t/galera_query_cache_sync_wait.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
query_cache_type=1
|
||||
query_cache_size=1355776
|
||||
|
||||
[mysqld.2]
|
||||
query_cache_type=1
|
||||
query_cache_size=1355776
|
||||
|
@ -1 +0,0 @@
|
||||
--log-bin
|
7
mysql-test/suite/galera/t/galera_sbr_binlog.cnf
Normal file
7
mysql-test/suite/galera/t/galera_sbr_binlog.cnf
Normal file
@ -0,0 +1,7 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin
|
||||
|
||||
[mysqld.2]
|
||||
log-bin
|
@ -4,6 +4,8 @@
|
||||
wsrep_sst_method=mariabackup
|
||||
wsrep_sst_auth="root:"
|
||||
wsrep_debug=ON
|
||||
innodb-file-format='Barracuda'
|
||||
innodb-file-per-table=ON
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=1;pc.ignore_sb=true'
|
||||
|
@ -1,2 +0,0 @@
|
||||
$UDF_EXAMPLE_LIB_OPT
|
||||
--query_cache_type=1
|
15
mysql-test/suite/galera/t/galera_udf.cnf
Normal file
15
mysql-test/suite/galera/t/galera_udf.cnf
Normal file
@ -0,0 +1,15 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
$UDF_EXAMPLE_LIB_OPT
|
||||
query_cache_type=1
|
||||
|
||||
[mysqld.2]
|
||||
query_cache_type=1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--log-bin-use-v1-row-events=1
|
13
mysql-test/suite/galera/t/galera_v1_row_events.cnf
Normal file
13
mysql-test/suite/galera/t/galera_v1_row_events.cnf
Normal file
@ -0,0 +1,13 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
log-bin-use-v1-row-events=1
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
13
mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf
Normal file
13
mysql-test/suite/galera/t/galera_var_auto_inc_control_on.cnf
Normal file
@ -0,0 +1,13 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-auto-increment-control=ON
|
||||
|
||||
[mysqld.2]
|
||||
wsrep-auto-increment-control=ON
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--wsrep-auto-increment-control=ON
|
@ -3,9 +3,10 @@
|
||||
#
|
||||
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_perfschema.inc
|
||||
|
||||
call mtr.add_suppression("WSREP has not yet prepared node for application use");
|
||||
|
||||
# Save original auto_increment_offset values.
|
||||
--let $node_1=node_1
|
||||
--let $node_2=node_2
|
||||
@ -30,10 +31,10 @@ SHOW STATUS LIKE 'wsrep_ready';
|
||||
# Must return 'Non-primary'
|
||||
SHOW STATUS LIKE 'wsrep_cluster_status';
|
||||
|
||||
--error ER_UNKNOWN_COM_ERROR
|
||||
--error ER_UNKNOWN_COM_ERROR,1047
|
||||
SELECT * FROM t1;
|
||||
|
||||
--error ER_UNKNOWN_COM_ERROR
|
||||
--error ER_UNKNOWN_COM_ERROR,1047
|
||||
SELECT 1 FROM t1;
|
||||
|
||||
SET @@session.wsrep_dirty_reads=ON;
|
||||
@ -45,7 +46,7 @@ SELECT i, variable_name, variable_value FROM t1, information_schema.session_vari
|
||||
|
||||
SET @@session.wsrep_dirty_reads=OFF;
|
||||
|
||||
--error ER_UNKNOWN_COM_ERROR
|
||||
--error ER_UNKNOWN_COM_ERROR,1047
|
||||
SELECT i, variable_name, variable_value FROM t1, information_schema.session_variables WHERE variable_name LIKE "wsrep_dirty_reads" AND i = 1;
|
||||
|
||||
SELECT 1;
|
||||
|
@ -1 +0,0 @@
|
||||
--wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh --wsrep-sync-wait=0
|
13
mysql-test/suite/galera/t/galera_var_notify_cmd.cnf
Normal file
13
mysql-test/suite/galera/t/galera_var_notify_cmd.cnf
Normal file
@ -0,0 +1,13 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_notify_cmd=$MYSQL_TEST_DIR/std_data/wsrep_notify.sh
|
||||
wsrep-sync-wait=0
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
--source include/galera_cluster.inc
|
||||
--source include/have_innodb.inc
|
||||
|
||||
call mtr.add_suppression("WSREP has not yet prepared node for application use");
|
||||
|
||||
CREATE TABLE t1 (f1 INTEGER);
|
||||
|
||||
--connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
@ -15,7 +17,7 @@ SET SESSION wsrep_reject_queries = ALL;
|
||||
|
||||
SET GLOBAL wsrep_reject_queries = ALL;
|
||||
|
||||
--error ER_UNKNOWN_COM_ERROR
|
||||
--error ER_UNKNOWN_COM_ERROR,1047
|
||||
SELECT * FROM t1;
|
||||
|
||||
#
|
||||
@ -30,7 +32,7 @@ SET GLOBAL wsrep_reject_queries = ALL_KILL;
|
||||
SELECT * FROM t1;
|
||||
|
||||
--connect node_1b, 127.0.0.1, root, , test, $NODE_MYPORT_1
|
||||
--error ER_UNKNOWN_COM_ERROR
|
||||
--error ER_UNKNOWN_COM_ERROR,1047
|
||||
SELECT * FROM t1;
|
||||
|
||||
# Confirm that replication continues
|
||||
|
12
mysql-test/suite/galera/t/galera_var_sst_auth.cnf
Normal file
12
mysql-test/suite/galera/t/galera_var_sst_auth.cnf
Normal file
@ -0,0 +1,12 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_sst_auth=root:
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_sst_auth=root:
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--wsrep_sst_auth=root:
|
@ -1 +0,0 @@
|
||||
--wsrep_log_conflicts=ON
|
12
mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf
Normal file
12
mysql-test/suite/galera/t/galera_wsrep_log_conficts.cnf
Normal file
@ -0,0 +1,12 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep_log_conflicts=ON
|
||||
|
||||
[mysqld.2]
|
||||
wsrep_log_conflicts=ON
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--wsrep-new-cluster
|
10
mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf
Normal file
10
mysql-test/suite/galera/t/galera_wsrep_new_cluster.cnf
Normal file
@ -0,0 +1,10 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
wsrep-new-cluster
|
||||
|
||||
[mysqld.2]
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--query_cache_type=1
|
9
mysql-test/suite/galera/t/mysql-wsrep#201.cnf
Normal file
9
mysql-test/suite/galera/t/mysql-wsrep#201.cnf
Normal file
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
query_cache_type=1
|
||||
|
||||
[mysqld.2]
|
||||
query_cache_type=1
|
||||
|
||||
|
9
mysql-test/suite/galera/t/query_cache.cnf
Normal file
9
mysql-test/suite/galera/t/query_cache.cnf
Normal file
@ -0,0 +1,9 @@
|
||||
!include ../galera_2nodes.cnf
|
||||
|
||||
[mysqld.1]
|
||||
query_cache_type=1
|
||||
|
||||
[mysqld.2]
|
||||
query_cache_type=1
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
--query_cache_type=1
|
@ -1,4 +1,3 @@
|
||||
call mtr.add_suppression("Cannot add field `u` in table `test`.`t2` because after adding it, the row size is");
|
||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
|
||||
o blob,p blob,q blob,r blob,s blob,t blob,u blob,
|
||||
|
@ -1,4 +1,3 @@
|
||||
call mtr.add_suppression("Cannot add field `pa` in table `test`.`t2` because after adding it, the row size is");
|
||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
|
||||
o blob,p blob,q blob,r blob,s blob,t blob,u blob,
|
||||
|
@ -1,4 +1,3 @@
|
||||
call mtr.add_suppression("InnoDB: Cannot add field .* in table");
|
||||
CREATE TABLE t1 ( text1 TEXT,
|
||||
text2 TEXT,
|
||||
text3 TEXT,
|
||||
|
@ -1,4 +1,3 @@
|
||||
call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is');
|
||||
SELECT @@innodb_page_size;
|
||||
@@innodb_page_size
|
||||
32768
|
||||
|
@ -1,4 +1,3 @@
|
||||
call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is');
|
||||
SELECT @@innodb_page_size;
|
||||
@@innodb_page_size
|
||||
65536
|
||||
|
@ -0,0 +1,21 @@
|
||||
call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
|
||||
SET innodb_strict_mode = 0;
|
||||
SET @@global.log_warnings = 3;
|
||||
CREATE TABLE t1 (
|
||||
col_1 TEXT
|
||||
,col_2 TEXT
|
||||
,col_3 TEXT
|
||||
,col_4 TEXT
|
||||
,col_5 TEXT
|
||||
,col_6 TEXT
|
||||
,col_7 TEXT
|
||||
,col_8 TEXT
|
||||
,col_9 TEXT
|
||||
,col_10 TEXT
|
||||
,col_11 TEXT
|
||||
) ENGINE=INNODB ROW_FORMAT=COMPACT;
|
||||
Warnings:
|
||||
Warning 139 Row size too large (> 8126). Changing some columns to TEXT or BLOB or using ROW_FORMAT=DYNAMIC or ROW_FORMAT=COMPRESSED may help. In current row format, BLOB prefix of 768 bytes is stored inline.
|
||||
DROP TABLE t1;
|
||||
SET @@global.log_warnings = 2;
|
||||
SET innodb_strict_mode = 1;
|
@ -1,4 +1,3 @@
|
||||
call mtr.add_suppression("Cannot add field `b_str_20` in table `test`.`test_tab` because after adding it, the row size is");
|
||||
SET innodb_strict_mode=OFF;
|
||||
CREATE TABLE test_tab (
|
||||
a_str_18 mediumtext,
|
||||
|
@ -5,8 +5,6 @@
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
|
||||
call mtr.add_suppression("Cannot add field `u` in table `test`.`t2` because after adding it, the row size is");
|
||||
|
||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
|
||||
o blob,p blob,q blob,r blob,s blob,t blob,u blob,
|
||||
|
@ -5,8 +5,6 @@
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
|
||||
call mtr.add_suppression("Cannot add field `pa` in table `test`.`t2` because after adding it, the row size is");
|
||||
|
||||
CREATE TABLE t1(a blob,b blob,c blob,d blob,e blob,f blob,g blob,
|
||||
h blob,i blob,j blob,k blob,l blob,m blob,n blob,
|
||||
o blob,p blob,q blob,r blob,s blob,t blob,u blob,
|
||||
|
@ -3,7 +3,6 @@
|
||||
|
||||
# MDEV-7513: ib_warn_row_too_big dereferences null thd
|
||||
|
||||
call mtr.add_suppression("InnoDB: Cannot add field .* in table");
|
||||
|
||||
--disable_warnings
|
||||
CREATE TABLE t1 ( text1 TEXT,
|
||||
|
@ -1,8 +1,6 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_innodb_32k.inc
|
||||
|
||||
call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is');
|
||||
|
||||
# Check page size 32k
|
||||
SELECT @@innodb_page_size;
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_innodb_64k.inc
|
||||
|
||||
call mtr.add_suppression('InnoDB: Cannot add field.*because after adding it, the row size is');
|
||||
|
||||
# Check page size 64k
|
||||
SELECT @@innodb_page_size;
|
||||
|
||||
|
24
mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test
Normal file
24
mysql-test/suite/innodb/t/row_size_error_log_warnings_3.test
Normal file
@ -0,0 +1,24 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: Cannot add field .* in table .* because after adding it, the row size is .* which is greater than maximum allowed size (.*) for a record on index leaf page.");
|
||||
|
||||
SET innodb_strict_mode = 0;
|
||||
SET @@global.log_warnings = 3;
|
||||
|
||||
CREATE TABLE t1 (
|
||||
col_1 TEXT
|
||||
,col_2 TEXT
|
||||
,col_3 TEXT
|
||||
,col_4 TEXT
|
||||
,col_5 TEXT
|
||||
,col_6 TEXT
|
||||
,col_7 TEXT
|
||||
,col_8 TEXT
|
||||
,col_9 TEXT
|
||||
,col_10 TEXT
|
||||
,col_11 TEXT
|
||||
) ENGINE=INNODB ROW_FORMAT=COMPACT;
|
||||
DROP TABLE t1;
|
||||
|
||||
SET @@global.log_warnings = 2;
|
||||
SET innodb_strict_mode = 1;
|
@ -1,7 +1,5 @@
|
||||
--source include/have_innodb.inc
|
||||
|
||||
call mtr.add_suppression("Cannot add field `b_str_20` in table `test`.`test_tab` because after adding it, the row size is");
|
||||
|
||||
SET innodb_strict_mode=OFF;
|
||||
CREATE TABLE test_tab (
|
||||
a_str_18 mediumtext,
|
||||
|
@ -1,4 +1,5 @@
|
||||
call mtr.add_suppression("InnoDB: New log files created");
|
||||
CREATE TABLE t_aria(i INT) ENGINE ARIA;
|
||||
CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB;
|
||||
BEGIN;
|
||||
INSERT INTO t VALUES(2);
|
||||
@ -11,11 +12,13 @@ INSERT INTO t VALUES(0);
|
||||
DELETE FROM t WHERE i=0;
|
||||
connection default;
|
||||
COMMIT;
|
||||
# Generate enough aria log records to increase area log file size
|
||||
SELECT * FROM t;
|
||||
i
|
||||
1
|
||||
2
|
||||
# Prepare full backup, apply incremental one
|
||||
# Aria log file was updated during applying incremental backup
|
||||
disconnect con1;
|
||||
# Restore and check results
|
||||
# shutdown server
|
||||
@ -27,3 +30,4 @@ i
|
||||
1
|
||||
2
|
||||
DROP TABLE t;
|
||||
DROP TABLE t_aria;
|
||||
|
@ -1,10 +1,12 @@
|
||||
--source include/have_aria.inc
|
||||
--source include/innodb_page_size.inc
|
||||
|
||||
call mtr.add_suppression("InnoDB: New log files created");
|
||||
|
||||
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
|
||||
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
|
||||
let basedir=$MYSQLTEST_VARDIR/tmp/backup;
|
||||
let incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
|
||||
|
||||
CREATE TABLE t_aria(i INT) ENGINE ARIA;
|
||||
CREATE TABLE t(i INT PRIMARY KEY) ENGINE INNODB;
|
||||
BEGIN;
|
||||
INSERT INTO t VALUES(2);
|
||||
@ -14,21 +16,73 @@ INSERT INTO t VALUES(1);
|
||||
|
||||
echo # Create full backup , modify table, then create incremental/differential backup;
|
||||
--disable_result_log
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$basedir;
|
||||
--enable_result_log
|
||||
BEGIN;
|
||||
INSERT INTO t VALUES(0);
|
||||
DELETE FROM t WHERE i=0;
|
||||
connection default;
|
||||
COMMIT;
|
||||
|
||||
--echo # Generate enough aria log records to increase area log file size
|
||||
--disable_query_log
|
||||
--disable_result_log
|
||||
INSERT INTO t_aria VALUES
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9),
|
||||
(0), (1), (2), (3), (4), (5), (6), (7), (8), (9);
|
||||
--let $i = 4
|
||||
while ($i) {
|
||||
INSERT INTO t_aria SELECT * FROM seq_1_to_2000;
|
||||
--dec $i
|
||||
}
|
||||
--enable_query_log
|
||||
--enable_result_log
|
||||
|
||||
SELECT * FROM t;
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=$incremental_dir --incremental-basedir=$basedir;
|
||||
# wf_incremental_init() allocates (page_size/4)*page_size bytes with mmap()
|
||||
# in each data file copy thread, what can fail on 32-bit platforms if threads
|
||||
# are too much, that's why don't set too big --parallel option value.
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=2 --ftwrl-wait-timeout=5 --ftwrl-wait-threshold=300 --ftwrl-wait-query-type=all --target-dir=$incremental_dir --incremental-basedir=$basedir;
|
||||
|
||||
--disable_result_log
|
||||
echo # Prepare full backup, apply incremental one;
|
||||
exec $XTRABACKUP --prepare --target-dir=$basedir;
|
||||
exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir ;
|
||||
|
||||
let perl_result_file=$MYSQLTEST_VARDIR/tmp/check_file_size_result.inc;
|
||||
|
||||
--perl END_OF_FILE
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
my $dst_file = "$ENV{'basedir'}/aria_log.00000001";
|
||||
my $src_file = "$ENV{'incremental_dir'}/aria_log.00000001";
|
||||
my $out_file = $ENV{'perl_result_file'};
|
||||
|
||||
my $dst_size = -s $dst_file;
|
||||
my $src_size = -s $src_file;
|
||||
|
||||
open (my $output, '>', $out_file) or die $!;
|
||||
if ($dst_size >= $src_size) {
|
||||
print $output '--echo # Aria log file was updated during applying incremental backup'."\n";
|
||||
}
|
||||
else {
|
||||
print $output '--echo # Aria log file was NOT updated during applying incremental backup'."\n";
|
||||
}
|
||||
close $output;
|
||||
END_OF_FILE
|
||||
|
||||
--source $perl_result_file
|
||||
--remove_file $perl_result_file
|
||||
|
||||
disconnect con1;
|
||||
echo # Restore and check results;
|
||||
let $targetdir=$basedir;
|
||||
@ -37,6 +91,7 @@ let $targetdir=$basedir;
|
||||
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
DROP TABLE t_aria;
|
||||
|
||||
# Cleanup
|
||||
rmdir $basedir;
|
||||
|
@ -212,8 +212,22 @@ select 2;
|
||||
2
|
||||
2
|
||||
drop table t1;
|
||||
set global server_audit_events='table';
|
||||
set global server_audit_incl_users='user1';
|
||||
create user user1@localhost;
|
||||
grant all on sa_db.* to user1@localhost;
|
||||
connect cn1,localhost,user1,,sa_db;
|
||||
connection cn1;
|
||||
create table t1(id int) engine=myisam;
|
||||
insert delayed into t1 values (1), (2);
|
||||
connection default;
|
||||
# Waiting until INSERT DELAYED thread does the insert.
|
||||
drop table t1;
|
||||
set global server_audit_logging= off;
|
||||
set global server_audit_incl_users='root';
|
||||
set global server_audit_logging= on;
|
||||
disconnect cn1;
|
||||
drop user user1@localhost;
|
||||
set global server_audit_events='';
|
||||
set global server_audit_query_log_limit= 15;
|
||||
select (1), (2), (3), (4);
|
||||
@ -250,7 +264,7 @@ server_audit_file_path
|
||||
server_audit_file_rotate_now OFF
|
||||
server_audit_file_rotate_size 1000000
|
||||
server_audit_file_rotations 9
|
||||
server_audit_incl_users odin, root, dva, tri
|
||||
server_audit_incl_users root
|
||||
server_audit_logging ON
|
||||
server_audit_mode 1
|
||||
server_audit_output_type file
|
||||
@ -381,8 +395,16 @@ TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1=<secret>',ID
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',0
|
||||
TIME,HOSTNAME,user1,localhost,ID,ID,CREATE,sa_db,t1,
|
||||
TIME,HOSTNAME,user1,localhost,ID,ID,WRITE,sa_db,t1,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_logging= off',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_logging= on',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,user,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global serv',0
|
||||
TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select (1), (2)',0
|
||||
|
@ -136,8 +136,28 @@ select * from t1;
|
||||
select 2;
|
||||
drop table t1;
|
||||
|
||||
set global server_audit_events='table';
|
||||
set global server_audit_incl_users='user1';
|
||||
|
||||
create user user1@localhost;
|
||||
grant all on sa_db.* to user1@localhost;
|
||||
|
||||
connect (cn1,localhost,user1,,sa_db);
|
||||
connection cn1;
|
||||
|
||||
create table t1(id int) engine=myisam;
|
||||
insert delayed into t1 values (1), (2);
|
||||
connection default;
|
||||
--echo # Waiting until INSERT DELAYED thread does the insert.
|
||||
let $wait_condition= SELECT COUNT(*) = 2 FROM t1;
|
||||
--source include/wait_condition.inc
|
||||
drop table t1;
|
||||
|
||||
set global server_audit_logging= off;
|
||||
set global server_audit_incl_users='root';
|
||||
set global server_audit_logging= on;
|
||||
disconnect cn1;
|
||||
drop user user1@localhost;
|
||||
|
||||
set global server_audit_events='';
|
||||
|
||||
|
@ -10,4 +10,5 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
foreign_key : Sporadic failure "WSREP has not yet prepared node for application use"
|
||||
foreign_key : MENT-535 Galera test failures on wsrep suite
|
||||
pool_of_threads : MENT-535 Galera test failures on wsrep suite
|
||||
|
@ -1 +1 @@
|
||||
--innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads
|
||||
--innodb_autoinc_lock_mode=2 --wsrep-provider=$WSREP_PROVIDER --wsrep-cluster-address=gcomm:// --thread_handling=pool-of-threads wsrep-on=1
|
||||
|
@ -2611,7 +2611,6 @@ class Item_func_like :public Item_bool_func2
|
||||
|
||||
bool escape_used_in_parsing;
|
||||
bool use_sampling;
|
||||
bool negated;
|
||||
|
||||
DTCollation cmp_collation;
|
||||
String cmp_value1, cmp_value2;
|
||||
@ -2628,6 +2627,7 @@ protected:
|
||||
Item_func::Functype type, Item *value);
|
||||
public:
|
||||
int escape;
|
||||
bool negated;
|
||||
|
||||
Item_func_like(THD *thd, Item *a, Item *b, Item *escape_arg, bool escape_used):
|
||||
Item_bool_func2(thd, a, b), canDoTurboBM(FALSE), pattern(0), pattern_len(0),
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user