mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Test modifications
* Added a basic test for wsrep_sync_wait system variable. * Separate innodb_load_xa tests for wsrep and non-wsrep builds. * Updated file_contents.test with correct file location * Some coding style related changes.
This commit is contained in:
19
mysql-test/r/innodb_load_xa_with_wsrep.result
Normal file
19
mysql-test/r/innodb_load_xa_with_wsrep.result
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
install plugin innodb soname 'ha_innodb';
|
||||||
|
select engine,support,transactions,xa from information_schema.engines where engine='innodb';
|
||||||
|
engine support transactions xa
|
||||||
|
InnoDB YES YES YES
|
||||||
|
create table t1 (a int) engine=innodb;
|
||||||
|
start transaction;
|
||||||
|
insert t1 values (1);
|
||||||
|
insert t1 values (2);
|
||||||
|
commit;
|
||||||
|
include/show_binlog_events.inc
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
mysqld-bin.000001 # Gtid # # GTID #-#-#
|
||||||
|
mysqld-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb
|
||||||
|
mysqld-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||||
|
mysqld-bin.000001 # Query # # use `test`; insert t1 values (1)
|
||||||
|
mysqld-bin.000001 # Query # # use `test`; insert t1 values (2)
|
||||||
|
mysqld-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
|
drop table t1;
|
||||||
|
uninstall plugin innodb;
|
@@ -1058,8 +1058,8 @@ The following options may be given as the first argument:
|
|||||||
variables
|
variables
|
||||||
(Defaults to on; use --skip-wsrep-auto-increment-control to disable.)
|
(Defaults to on; use --skip-wsrep-auto-increment-control to disable.)
|
||||||
--wsrep-causal-reads
|
--wsrep-causal-reads
|
||||||
Enable "strictly synchronous" semantics for read
|
(DEPRECATED) Setting this variable is equivalent to
|
||||||
operations
|
setting wsrep_sync_wait READ flag
|
||||||
--wsrep-certify-nonPK
|
--wsrep-certify-nonPK
|
||||||
Certify tables with no primary key
|
Certify tables with no primary key
|
||||||
(Defaults to on; use --skip-wsrep-certify-nonPK to disable.)
|
(Defaults to on; use --skip-wsrep-certify-nonPK to disable.)
|
||||||
@@ -1133,6 +1133,11 @@ The following options may be given as the first argument:
|
|||||||
Address where node is waiting for SST contact
|
Address where node is waiting for SST contact
|
||||||
--wsrep-start-position=name
|
--wsrep-start-position=name
|
||||||
global transaction position to start from
|
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)
|
Variables (--variable-name=value)
|
||||||
allow-suspicious-udfs FALSE
|
allow-suspicious-udfs FALSE
|
||||||
@@ -1468,6 +1473,7 @@ wsrep-sst-donor-rejects-queries FALSE
|
|||||||
wsrep-sst-method rsync
|
wsrep-sst-method rsync
|
||||||
wsrep-sst-receive-address AUTO
|
wsrep-sst-receive-address AUTO
|
||||||
wsrep-start-position 00000000-0000-0000-0000-000000000000:-1
|
wsrep-start-position 00000000-0000-0000-0000-000000000000:-1
|
||||||
|
wsrep-sync-wait 0
|
||||||
|
|
||||||
To see what values a running MySQL server is using, type
|
To see what values a running MySQL server is using, type
|
||||||
'mysqladmin variables' instead of 'mysqld --verbose --help'.
|
'mysqladmin variables' instead of 'mysqld --verbose --help'.
|
||||||
|
56
mysql-test/suite/sys_vars/r/wsrep_sync_wait_basic.result
Normal file
56
mysql-test/suite/sys_vars/r/wsrep_sync_wait_basic.result
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
#
|
||||||
|
# wsrep_sync_wait
|
||||||
|
#
|
||||||
|
# save the initial values
|
||||||
|
SET @wsrep_sync_wait_global_saved = @@global.wsrep_sync_wait;
|
||||||
|
SET @wsrep_sync_wait_session_saved = @@session.wsrep_sync_wait;
|
||||||
|
# default
|
||||||
|
SELECT @@global.wsrep_sync_wait;
|
||||||
|
@@global.wsrep_sync_wait
|
||||||
|
0
|
||||||
|
SELECT @@session.wsrep_sync_wait;
|
||||||
|
@@session.wsrep_sync_wait
|
||||||
|
0
|
||||||
|
|
||||||
|
# scope and valid values
|
||||||
|
SET @@global.wsrep_sync_wait=0;
|
||||||
|
SELECT @@global.wsrep_sync_wait;
|
||||||
|
@@global.wsrep_sync_wait
|
||||||
|
0
|
||||||
|
SET @@global.wsrep_sync_wait=7;
|
||||||
|
SELECT @@global.wsrep_sync_wait;
|
||||||
|
@@global.wsrep_sync_wait
|
||||||
|
7
|
||||||
|
SET @@session.wsrep_sync_wait=0;
|
||||||
|
SELECT @@session.wsrep_sync_wait;
|
||||||
|
@@session.wsrep_sync_wait
|
||||||
|
0
|
||||||
|
SET @@session.wsrep_sync_wait=7;
|
||||||
|
SELECT @@session.wsrep_sync_wait;
|
||||||
|
@@session.wsrep_sync_wait
|
||||||
|
7
|
||||||
|
SET @@session.wsrep_sync_wait=default;
|
||||||
|
SELECT @@session.wsrep_sync_wait;
|
||||||
|
@@session.wsrep_sync_wait
|
||||||
|
7
|
||||||
|
SET @@session.wsrep_sync_wait=8;
|
||||||
|
Warnings:
|
||||||
|
Warning 1292 Truncated incorrect wsrep_sync_wait value: '8'
|
||||||
|
SELECT @@session.wsrep_sync_wait;
|
||||||
|
@@session.wsrep_sync_wait
|
||||||
|
7
|
||||||
|
|
||||||
|
# invalid values
|
||||||
|
SET @@global.wsrep_sync_wait=NULL;
|
||||||
|
ERROR 42000: Incorrect argument type to variable 'wsrep_sync_wait'
|
||||||
|
SET @@global.wsrep_sync_wait='junk';
|
||||||
|
ERROR 42000: Incorrect argument type to variable 'wsrep_sync_wait'
|
||||||
|
SET @@session.wsrep_sync_wait=NULL;
|
||||||
|
ERROR 42000: Incorrect argument type to variable 'wsrep_sync_wait'
|
||||||
|
SET @@session.wsrep_sync_wait='junk';
|
||||||
|
ERROR 42000: Incorrect argument type to variable 'wsrep_sync_wait'
|
||||||
|
|
||||||
|
# restore the initial values
|
||||||
|
SET @@global.wsrep_sync_wait = @wsrep_sync_wait_global_saved;
|
||||||
|
SET @@session.wsrep_sync_wait = @wsrep_sync_wait_session_saved;
|
||||||
|
# End of test
|
47
mysql-test/suite/sys_vars/t/wsrep_sync_wait_basic.test
Normal file
47
mysql-test/suite/sys_vars/t/wsrep_sync_wait_basic.test
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
--source include/have_wsrep.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # wsrep_sync_wait
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo # save the initial values
|
||||||
|
SET @wsrep_sync_wait_global_saved = @@global.wsrep_sync_wait;
|
||||||
|
SET @wsrep_sync_wait_session_saved = @@session.wsrep_sync_wait;
|
||||||
|
|
||||||
|
--echo # default
|
||||||
|
SELECT @@global.wsrep_sync_wait;
|
||||||
|
SELECT @@session.wsrep_sync_wait;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # scope and valid values
|
||||||
|
SET @@global.wsrep_sync_wait=0;
|
||||||
|
SELECT @@global.wsrep_sync_wait;
|
||||||
|
SET @@global.wsrep_sync_wait=7;
|
||||||
|
SELECT @@global.wsrep_sync_wait;
|
||||||
|
|
||||||
|
SET @@session.wsrep_sync_wait=0;
|
||||||
|
SELECT @@session.wsrep_sync_wait;
|
||||||
|
SET @@session.wsrep_sync_wait=7;
|
||||||
|
SELECT @@session.wsrep_sync_wait;
|
||||||
|
SET @@session.wsrep_sync_wait=default;
|
||||||
|
SELECT @@session.wsrep_sync_wait;
|
||||||
|
SET @@session.wsrep_sync_wait=8;
|
||||||
|
SELECT @@session.wsrep_sync_wait;
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # invalid values
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET @@global.wsrep_sync_wait=NULL;
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET @@global.wsrep_sync_wait='junk';
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET @@session.wsrep_sync_wait=NULL;
|
||||||
|
--error ER_WRONG_TYPE_FOR_VAR
|
||||||
|
SET @@session.wsrep_sync_wait='junk';
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # restore the initial values
|
||||||
|
SET @@global.wsrep_sync_wait = @wsrep_sync_wait_global_saved;
|
||||||
|
SET @@session.wsrep_sync_wait = @wsrep_sync_wait_session_saved;
|
||||||
|
|
||||||
|
--echo # End of test
|
@@ -30,7 +30,7 @@ if ($dir_bin eq '/usr/') {
|
|||||||
$dir_docs = glob "$dir_docs/packages/MySQL-server*";
|
$dir_docs = glob "$dir_docs/packages/MySQL-server*";
|
||||||
} else {
|
} else {
|
||||||
# RedHat/Debian: version number in directory name
|
# RedHat/Debian: version number in directory name
|
||||||
$dir_docs = glob "$dir_docs/mariadb-server-*";
|
$dir_docs = glob "$dir_docs/mariadb-galera-server-*";
|
||||||
$dir_docs = glob "$dir_docs/MySQL-server*" unless -d $dir_docs;
|
$dir_docs = glob "$dir_docs/MySQL-server*" unless -d $dir_docs;
|
||||||
}
|
}
|
||||||
# Slackware
|
# Slackware
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
# MDEV-6082 Assertion `0' fails in TC_LOG_DUMMY::log_and_order on DML after installing TokuDB at runtime on server with disabled InnoDB
|
# MDEV-6082 Assertion `0' fails in TC_LOG_DUMMY::log_and_order on DML after installing TokuDB at runtime on server with disabled InnoDB
|
||||||
#
|
#
|
||||||
--source include/not_embedded.inc
|
--source include/not_embedded.inc
|
||||||
|
--source include/not_wsrep.inc
|
||||||
|
|
||||||
if (!$HA_INNODB_SO) {
|
if (!$HA_INNODB_SO) {
|
||||||
--skip Need InnoDB plugin
|
--skip Need InnoDB plugin
|
||||||
|
1
mysql-test/t/innodb_load_xa_with_wsrep.opt
Normal file
1
mysql-test/t/innodb_load_xa_with_wsrep.opt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
--ignore-builtin-innodb --loose-innodb --log-bin
|
19
mysql-test/t/innodb_load_xa_with_wsrep.test
Normal file
19
mysql-test/t/innodb_load_xa_with_wsrep.test
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
# MDEV-6082 Assertion `0' fails in TC_LOG_DUMMY::log_and_order on DML after installing TokuDB at runtime on server with disabled InnoDB
|
||||||
|
#
|
||||||
|
--source include/not_embedded.inc
|
||||||
|
--source include/have_wsrep.inc
|
||||||
|
|
||||||
|
if (!$HA_INNODB_SO) {
|
||||||
|
--skip Need InnoDB plugin
|
||||||
|
}
|
||||||
|
install plugin innodb soname 'ha_innodb';
|
||||||
|
select engine,support,transactions,xa from information_schema.engines where engine='innodb';
|
||||||
|
create table t1 (a int) engine=innodb;
|
||||||
|
start transaction;
|
||||||
|
insert t1 values (1);
|
||||||
|
insert t1 values (2);
|
||||||
|
commit;
|
||||||
|
--source include/show_binlog_events.inc
|
||||||
|
drop table t1;
|
||||||
|
uninstall plugin innodb;
|
@@ -4664,19 +4664,20 @@ static Sys_var_mybool Sys_wsrep_certify_nonPK(
|
|||||||
CMD_LINE(OPT_ARG), DEFAULT(TRUE));
|
CMD_LINE(OPT_ARG), DEFAULT(TRUE));
|
||||||
|
|
||||||
static Sys_var_mybool Sys_wsrep_causal_reads(
|
static Sys_var_mybool Sys_wsrep_causal_reads(
|
||||||
"wsrep_causal_reads", "(DEPRECATED) setting this variable is equivalent to setting wsrep_sync_wait READ flag",
|
"wsrep_causal_reads", "(DEPRECATED) Setting this variable is equivalent "
|
||||||
SESSION_VAR(wsrep_causal_reads),
|
"to setting wsrep_sync_wait READ flag",
|
||||||
CMD_LINE(OPT_ARG), DEFAULT(FALSE),
|
SESSION_VAR(wsrep_causal_reads), CMD_LINE(OPT_ARG), DEFAULT(FALSE),
|
||||||
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
|
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
|
||||||
ON_UPDATE(wsrep_causal_reads_update));
|
ON_UPDATE(wsrep_causal_reads_update));
|
||||||
|
|
||||||
static Sys_var_uint Sys_wsrep_sync_wait(
|
static Sys_var_uint Sys_wsrep_sync_wait(
|
||||||
"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",
|
"wsrep_sync_wait", "Ensure \"synchronous\" read view before executing "
|
||||||
SESSION_VAR(wsrep_sync_wait),
|
"an operation of the type specified by bitmask: 1 - READ(includes "
|
||||||
CMD_LINE(OPT_ARG),
|
"SELECT, SHOW and BEGIN/START TRANSACTION); 2 - UPDATE and DELETE; 4 - "
|
||||||
|
"INSERT and REPLACE",
|
||||||
|
SESSION_VAR(wsrep_sync_wait), CMD_LINE(OPT_ARG),
|
||||||
VALID_RANGE(WSREP_SYNC_WAIT_NONE, WSREP_SYNC_WAIT_MAX),
|
VALID_RANGE(WSREP_SYNC_WAIT_NONE, WSREP_SYNC_WAIT_MAX),
|
||||||
DEFAULT(WSREP_SYNC_WAIT_NONE),
|
DEFAULT(WSREP_SYNC_WAIT_NONE), BLOCK_SIZE(1),
|
||||||
BLOCK_SIZE(1),
|
|
||||||
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
|
NO_MUTEX_GUARD, NOT_IN_BINLOG, ON_CHECK(0),
|
||||||
ON_UPDATE(wsrep_sync_wait_update));
|
ON_UPDATE(wsrep_sync_wait_update));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user