Commit graph

269 commits

Author SHA1 Message Date
Marko Mäkelä
4c25e75ce7 Merge 10.3 into 10.4 2019-12-27 18:20:28 +02:00
Marko Mäkelä
5ab70e7f68 Merge 10.2 into 10.3 2019-12-27 15:14:48 +02:00
Marko Mäkelä
73985d8301 Merge 10.1 into 10.2 2019-12-23 07:14:51 +02:00
Jan Lindström
e9259d50f0 MDEV-21335 : Galera test failure on suite wsrep
Problem was that wsrep_on was OFF.
2019-12-18 10:02:57 +02:00
Jan Lindström
088de81d96 MDEV-21335 : Galera test failure on suite wsrep
Problem was that wsrep_on was OFF.

This is 10.4 version.
2019-12-18 08:22:07 +02:00
Oleksandr Byelkin
a15234bf4b Merge branch '10.3' into 10.4 2019-12-09 15:09:41 +01:00
Jan Lindström
2b7e461cc0 MDEV-21209 : mysql_tzinfo_to_sql's Galera checks do not work
wsrep_on parameter can be visible even when wsrep_on is set OFF
so we need to check variable_value from I_S also.
2019-12-05 12:41:13 +02:00
Jan Lindström
9d9a2253c6 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
2019-12-02 14:35:10 +02:00
Jan Lindström
c6ed37b88a MDEV-21182: Galera test failure on MW-284
galera_2nodes.cnf did not contain wsrep_on=1 on correct places. Fixed
restart options to use correct configuration.
2019-11-30 13:52:49 +02:00
Marko Mäkelä
ec40980ddd Merge 10.3 into 10.4 2019-11-01 15:23:18 +02:00
Jan Lindström
6cdde9ebbf MDEV-20836 : Galera test failure on wsrep.variables
Add one more wait to make sure all threads have been started.
2019-10-16 13:01:40 +03:00
Jan Lindström
57b666b2e5 Fix test case wsrep.mdev_6832 we need to wait until wsrep_ready
is ON before test can end.
2019-10-08 15:04:39 +03:00
Jan Lindström
e73dbec1c8 Disable wsrep.variables until fixed. 2019-09-14 11:48:41 +03:00
Marko Mäkelä
60c04be659 Merge 10.3 into 10.4 2019-09-12 12:16:40 +03:00
Marko Mäkelä
ff5ecfd335 Correct the merge 0f83c8878d
Re-enable some Galera tests that should have been enabled.

Add client_ed25519.so to debian/libmariadb3.install;
merge e47a143fc0 correctly.

Remove a duplicated #include from wsrep_mysqld.cc.
2019-09-10 10:04:04 +03:00
Marko Mäkelä
32ec5fb979 Merge 10.2 into 10.3 2019-08-21 15:23:45 +03:00
Marko Mäkelä
48c67038b9 Merge 10.1 into 10.2
For MDEV-15955, the fix in create_tmp_field_from_item() would cause a
compilation error. After a discussion with Alexander Barkov, the fix
was omitted and only the test case was kept.

In 10.3 and later, MDEV-15955 is fixed properly by overriding
create_tmp_field() in Item_func_user_var.
2019-08-20 09:15:28 +03:00
Jan Lindström
e6b505fd3c MDEV-18778: mysql_tzinfo_to_sql does not work correctly in MariaDB Galera
There were two problems:

(1) If user wanted same time zone information on all nodes in the Galera
cluster all updates were not replicated as time zone information was
stored on MyISAM tables. This is fixed on Galera by altering time zone
tables to InnoDB while they are modified.

(2) If user wanted different time zone information to nodes in the Galera
cluster TRUNCATE TABLE for time zone tables was replicated by Galera
destroying time zone information from other nodes. This is fixed
on Galera by introducing new option for mysql_tzinfo_to_sql_symlink
tool --skip-write-binlog to disable Galera replication while
time zone tables are modified.

Changes to be committed:
        modified:   mysql-test/r/mysql_tzinfo_to_sql_symlink.result
        modified:   mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result
        new file:   mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result
        new file:   mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test
        modified:   sql/tztime.cc

This is 10.4 version of commit fa74088838
2019-08-16 07:07:31 +03:00
Jan Lindström
fa74088838 MDEV-18778: mysql_tzinfo_to_sql does not work correctly in MariaDB Galera
There were two problems:

(1) If user wanted same time zone information on all nodes in the Galera
cluster all updates were not replicated as time zone information was
stored on MyISAM tables. This is fixed on Galera by altering time zone
tables to InnoDB while they are modified.

(2) If user wanted different time zone information to nodes in the Galera
cluster TRUNCATE TABLE for time zone tables was replicated by Galera
destroying time zone information from other nodes. This is fixed
on Galera by introducing new option for mysql_tzinfo_to_sql_symlink
tool --skip-write-binlog to disable Galera replication while
time zone tables are modified.

Changes to be committed:
	modified:   mysql-test/r/mysql_tzinfo_to_sql_symlink.result
	modified:   mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink.result
	new file:   mysql-test/suite/wsrep/r/mysql_tzinfo_to_sql_symlink_skip.result
	new file:   mysql-test/suite/wsrep/t/mysql_tzinfo_to_sql_symlink_skip.test
	modified:   sql/tztime.cc
2019-08-16 07:01:30 +03:00
Marko Mäkelä
e9c1701e11 Merge 10.3 into 10.4 2019-07-25 18:42:06 +03:00
Marko Mäkelä
33215edcba Resolve conflicts in wsrep.variables
This was forgotten in the merge 0f83c8878d
because the test is disabled.
2019-07-24 15:30:27 +03:00
Julius Goryavsky
f5390eea9a MDEV-18565: Galera mtr-suite fails if galera library is not installed
Currently, running mtr with an incorrect (for example, new or
obsolete) version of wsrep_provider (for example, with the 26
version of libgalera_smm.so) leads to the failure of tests in
several suites with vague error diagnostics.

As for the galera_3nodes suite, the mtr also does not effectively
check all the prerequisites after merge with MDEV-18426 fixes.
For example, tests that using mariabackup do not check for presence
of ss and socat/nc. This is due to improper handling of relative
paths in mtr scripts.

In addition, some tests in different suites can be run without
setting the environment variables such as MTR_GALERA_TFMT, XBSTREAM,
and so on.

To eliminate all these issues, this patch makes the following changes:

1. Added auxiliary wsrep_mtr_check utility (which located in the
mysql-test/lib/My/SafeProcess subdirectory), which compares the
versions of the wsrep API that used by the server and by the wsrep
provider library, and it does this comparison safely, without
accessing the API if the versions do not match.

2. All checks related to the presence of mariabackup and utilities
that necessary for its operation transferred from the local directories
of different mtr suites (from the suite.pm files) to the main suite.pm
file. This not only reduces the amount of code and eliminates duplication
of identical code fragments, but also avoids problems due to the inability
of mtr to consider relative paths to include files when checking skip
combinations.

3. Setting the values of auxiliary environment variables that
are necessary for Galera, SST scripts and mariabackup (to work
properly) is moved to the main mysql-test-run.pl script, so as
not to duplicate this code in different suites, and to avoid
partial corrections of the same errors for different suites
(while other suites remain uncorrected).

4. Fixed duplication of the have_file_key_management.inc and
have_filekeymanagement.inc files between different suites,
these checks are also transferred to the top level.

5. Added garbd presence check and garbd path variable.

https://jira.mariadb.org/browse/MDEV-18565
2019-07-17 12:57:38 +02:00
Julius Goryavsky
4e02e502f6 MDEV-18565: Galera mtr-suite fails if galera library is not installed
Currently, running mtr with an incorrect (for example, new or
obsolete) version of wsrep_provider (for example, with the 26
version of libgalera_smm.so) leads to the failure of tests in
several suites with vague error diagnostics.

As for the galera_3nodes suite, the mtr also does not effectively
check all the prerequisites after merge with MDEV-18426 fixes.
For example, tests that using mariabackup do not check for presence
of ss and socat/nc. This is due to improper handling of relative
paths in mtr scripts.

In addition, some tests in different suites can be run without
setting the environment variables such as MTR_GALERA_TFMT, XBSTREAM,
and so on.

To eliminate all these issues, this patch makes the following changes:

1. Added auxiliary wsrep_mtr_check utility (which located in the
mysql-test/lib/My/SafeProcess subdirectory), which compares the
versions of the wsrep API that used by the server and by the wsrep
provider library, and it does this comparison safely, without
accessing the API if the versions do not match.

2. All checks related to the presence of mariabackup and utilities
that necessary for its operation transferred from the local directories
of different mtr suites (from the suite.pm files) to the main suite.pm
file. This not only reduces the amount of code and eliminates duplication
of identical code fragments, but also avoids problems due to the inability
of mtr to consider relative paths to include files when checking skip
combinations.

3. Setting the values of auxiliary environment variables that
are necessary for Galera, SST scripts and mariabackup (to work
properly) is moved to the main mysql-test-run.pl script, so as
not to duplicate this code in different suites, and to avoid
partial corrections of the same errors for different suites
(while other suites remain uncorrected).

4. Fixed duplication of the have_file_key_management.inc and
have_filekeymanagement.inc files between different suites,
these checks are also transferred to the top level.

5. Added garbd presence check and garbd path variable.

https://jira.mariadb.org/browse/MDEV-18565
2019-07-17 12:54:12 +02:00
Eugene Kosov
0f83c8878d Merge 10.2 into 10.3 2019-07-16 18:39:21 +03:00
Jan Lindström
ec49976e38 MDEV-19746: Galera test failures because of wsrep_slave_threads identification
Problem was that tests select INFORMATION_SCHEMA.PROCESSLIST processes
from user system user and empty state. Thus, there is not clear
state for slave threads.

Changes:
- Added new status variables that store current amount of applier threads
(wsrep_applier_thread_count) and rollbacker threads
(wsrep_rollbacker_thread_count). This will make clear how many slave threads
of certain type there is.
- Added THD state "wsrep applier idle" when applier slave thread is
waiting for work. This makes finding slave/applier threads easier.
- Added force-restart option for mtr to always restart servers between tests
to avoid race on start of the test
- Added wait_condition_with_debug to wait until the passed statement returns
true, or the operation times out. If operation times out, the additional error
statement will be executed

Changes to be committed:
	new file:   mysql-test/include/force_restart.inc
	new file:   mysql-test/include/wait_condition_with_debug.inc
	modified:   mysql-test/mysql-test-run.pl
	modified:   mysql-test/suite/galera/disabled.def
	modified:   mysql-test/suite/galera/r/MW-336.result
	modified:   mysql-test/suite/galera/r/galera_kill_applier.result
	modified:   mysql-test/suite/galera/r/galera_var_slave_threads.result
	new file:   mysql-test/suite/galera/t/MW-336.cnf
	modified:   mysql-test/suite/galera/t/MW-336.test
	modified:   mysql-test/suite/galera/t/galera_kill_applier.test
	modified:   mysql-test/suite/galera/t/galera_parallel_autoinc_largetrx.test
	modified:   mysql-test/suite/galera/t/galera_parallel_autoinc_manytrx.test
	modified:   mysql-test/suite/galera/t/galera_var_slave_threads.test
	modified:   mysql-test/suite/wsrep/disabled.def
	modified:   mysql-test/suite/wsrep/r/variables.result
	modified:   mysql-test/suite/wsrep/t/variables.test
	modified:   sql/mysqld.cc
	modified:   sql/wsrep_mysqld.cc
	modified:   sql/wsrep_mysqld.h
	modified:   sql/wsrep_thd.cc
	modified:   sql/wsrep_var.cc
2019-07-15 10:17:07 +03:00
sysprg
41f4f6bea8 MDEV-18565: Galera mtr-suite fails if galera library is not installed (#1243)
* MDEV-18565: Galera mtr-suite fails if galera library is not installed

Currently, running mtr with an incorrect (for example, new or
obsolete) version of wsrep_provider (for example, with the 26
version of libgalera_smm.so) leads to the failure of tests in
several suites with vague error diagnostics.

As for the galera_3nodes suite, the mtr also does not effectively
check all the prerequisites after merge with MDEV-18426 fixes.
For example, tests that using mariabackup do not check for presence
of ss and socat/nc. This is due to improper handling of relative
paths in mtr scripts.

In addition, some tests in different suites can be run without
setting the environment variables such as MTR_GALERA_TFMT, XBSTREAM,
and so on.

To eliminate all these issues, this patch makes the following changes:

1. Added auxiliary wsrep_mtr_check utility (which located in the
mysql-test/lib/My/SafeProcess subdirectory), which compares the
versions of the wsrep API that used by the server and by the wsrep
provider library, and it does this comparison safely, without
accessing the API if the versions do not match.

2. All checks related to the presence of mariabackup and utilities
that necessary for its operation transferred from the local directories
of different mtr suites (from the suite.pm files) to the main suite.pm
file. This not only reduces the amount of code and eliminates duplication
of identical code fragments, but also avoids problems due to the inability
of mtr to consider relative paths to include files when checking skip
combinations.

3. Setting the values of auxiliary environment variables that
are necessary for Galera, SST scripts and mariabackup (to work
properly) is moved to the main mysql-test-run.pl script, so as
not to duplicate this code in different suites, and to avoid
partial corrections of the same errors for different suites
(while other suites remain uncorrected).

4. Fixed duplication of the have_file_key_management.inc and
have_filekeymanagement.inc files between different suites,
these checks are also transferred to the top level.

https://jira.mariadb.org/browse/MDEV-18565

* Build without additional utility in configurations without wsrep support
2019-07-09 09:25:44 +03:00
Oleksandr Byelkin
f66d1850ac Merge branch '10.3' into 10.4 2019-06-14 22:10:50 +02:00
Oleksandr Byelkin
4a3d51c76c Merge branch '10.2' into 10.3 2019-06-14 07:36:47 +02:00
Jan Lindström
371a8a6615 Galera test cleanup. 2019-06-13 13:18:54 +03:00
Jan Lindström
cf78b8c699 Merge 10.2 into 10.3 2019-06-12 08:26:32 +03:00
Jan Lindström
34b38ad726 MDEV-19736: Galera test failure on
Remove unneeded select to provider name. Provider can have different
names and can be located on different directory on different
environments.
2019-06-12 08:24:30 +03:00
Jan Lindström
d80065c2e4 MDEV-18425: wsrep.mdev_10186: Test failure: "Result length mismatch" (@@GLOBAL.wsrep_provider)
Remove unnecessary select of provider name as it could be anything
and be located on different directories (i.e. it full name could
be different).
2019-05-27 14:18:05 +03:00
Jan Lindström
e10f9e6c81 Adjust wsrep, galera, galera_3nodes, galera_sr and galera_3nodes_sr tests
after commit b5615eff0d
2019-04-02 15:45:31 +03:00
Michael Widenius
b5615eff0d Write information about restart in .result
Idea comes from MySQL which does something similar
2019-04-01 19:47:24 +03:00
Teemu Ollakka
1ef50a34ec 10.4 wsrep group commit fixes (#1224)
* MDEV-16509 Improve wsrep commit performance with binlog disabled

Release commit order critical section early after trx_commit_low() if
binlog is not transaction coordinator. In order to avoid two phase commit,
binlog_hton is not registered for THD during IO_CACHE population.

Implemented a test which verifies that the transactions release
commit order early.

This optimization will change behavior during recovery as the commit
is not two phase when binlog is off. Fixed and recorded wsrep-recover-v25
and wsrep-recover to match the behavior.

* MDEV-18730 Ordering for wsrep binlog group commit

Previously out of order execution was allowed for wsrep commits.
Established proper ordering by populating wait_for_commit
for every wsrep THD and making group commit leader to wait for
prior commits before proceeding to trx_group_commit_leader().

* MDEV-18730 Added a test case to verify correct commit ordering

* MDEV-16509, MDEV-18730 Review fixes

Use WSREP_EMULATE_BINLOG() macro to decide if the binlog_hton
should be registered. Whitespace/syntax fixes and cleanups.

* MDEV-16509 Require binlog for galera_var_innodb_disallow_writes test

If the commit to InnoDB is done in one phase, the native InnoDB behavior
is that the transaction is committed in memory before it is persisted to
disk. This means that the innodb_disallow_writes=ON may not prevent
transaction to become visible to other readers before commit is completely
over. On the other hand, if the commit is two phase (as it is with binlog),
the transaction will be blocked in prepare phase.

Fixed the test to use binlog, which enforces two phase commit, which
in turn makes commit to block before the changes become visible to
other connections. This guarantees that the test produces expected
result.
2019-03-15 07:09:13 +02:00
Marko Mäkelä
e80bcd7f64 Merge 10.3 into 10.4 2019-02-05 12:48:02 +02:00
Marko Mäkelä
ab2458c61f Merge 10.2 into 10.3 2019-02-04 15:12:14 +02:00
Teemu Ollakka
ddfc789098 MDEV-15740 Recorded wsrep-recover-v25 2019-01-27 15:44:35 +02:00
Teemu Ollakka
ce28fa5303 Backported wsrep-recover test from 10.4.
Backported wsrep-recover test from 10.4 to test the wsrep recovery
after database shutdown or crash. Renamed the test to wsrep-recover-v25
to avoid conflicts with existing test in 10.4 and to provide coverage
for wsrep-API v25 compatible behavior.

The test case in 10.2 is simpler because out of order prepare
step cannot happen, the commit order critical section is grabbed
before prepare phase.

Test is not recorded since it does not produce expected result.
2019-01-25 16:03:14 +02:00
Marko Mäkelä
78829a5780 Merge 10.3 into 10.4 2019-01-24 22:42:35 +02:00
Brave Galera Crew
36a2a185fe Galera4 2019-01-23 15:30:00 +04:00
Julius Goryavsky
0e89e90f42 MDEV-17835: Remove wsrep-sst-method=xtrabackup
The second line of changes related to replacing xtrabackup with
mariabackup:

1) All unnecessary references to xtrabackup are removed from
the documentation, from some comments, from the control files
that are used to prepare the packages.

2) Made corrections of the tests from the galera_3nodes suite
that mentioned xtrabackup or the old (associated with xtrabackup)
version of innobackupex.

3) Fixed flaws in the galera_3nodes mtr suite control scripts,
because of which they could not work with mariabackup.

4) Fixed numerous bugs in the SST scripts and in the mtr test
files (galera_3nodes mtr suite) that prevented the use of Galera
with IPv6 addresses.

5) Fixed flaws in tests for rsync and mysqldump (for galera_3nodes
mtr tests suite). These tests were not performed successfully without
these fixes.

https://jira.mariadb.org/browse/MDEV-17835
2019-01-22 13:28:03 +01:00
Monty
8561a0ac9e Disabled some galera tests that always fails on OpenSuse 10.5 2018-12-09 20:49:06 +02:00
Marko Mäkelä
ae9d82c9f8 Merge 10.2 into 10.3 2018-10-11 08:22:08 +03:00
Marko Mäkelä
07815d9555 Merge 10.1 into 10.2 2018-10-11 08:16:08 +03:00
Jan Lindström
e2a1c58582 Fix test failure on wsrep.variables
SLES11 can't build currently latest Galera library version.
2018-10-04 07:13:30 +03:00
Sergei Golubchik
6d2c70bc55 Update test result (after galera library upgrade?) 2018-09-28 16:37:55 +02:00
Sergei Golubchik
57e0da50bb Merge branch '10.2' into 10.3 2018-09-28 16:37:06 +02:00
Sergei Golubchik
5ae8fce50b Merge branch '10.1' into 10.2 2018-09-24 11:46:08 +02:00
Jan Lindström
87dc4e98dd MDEV-17276: Adjust Galera tests after Galera library 25.3.24 2018-09-23 13:53:57 +03:00
Oleksandr Byelkin
28f08d3753 Merge branch '10.1' into 10.2 2018-09-14 08:47:22 +02:00
Oleksandr Byelkin
c9d6728c36 try to fix version detection 2018-09-13 12:46:51 +03:00
Jan Lindström
285969e1c6 Fix result file for wsrep.variables, for some reason had too new
galera library used.
2018-09-07 11:27:15 +03:00
Jan Lindström
fba683c069 MDEV-17062: Test failure on galera.MW-336
MDEV-17058: Test failure on wsrep.variables
MDEV-17060: Test failure on galera.galera_var_slave_threads

Fix incorrect calculation of increased applier (slave) threads.
Note that increase change takes effect "immediately" but we should
use proper wait condition to wait it. Reducing the number of
slave threads is not immediate as thread will only exit after a
replication event.
2018-09-06 16:05:31 +03:00
Jan Lindström
a290b807e8 MDEV-17062: Test failure on galera.MW-336
MDEV-17058: Test failure on wsrep.variables
MDEV-17060: Test failure on galera.galera_var_slave_threads

Fix incorrect calculation of increased applier (slave) threads.
Note that increase change takes effect "immediately" but we should
use proper wait condition to wait it. Reducing the number of
slave threads is not immediate as thread will only exit after a
replication event.
2018-08-27 16:10:33 +03:00
Sergei Golubchik
36e59752e7 Merge branch '10.2' into 10.3 2018-06-30 16:39:20 +02:00
Sergei Golubchik
b942aa34c1 Merge branch '10.1' into 10.2 2018-06-21 23:47:39 +02:00
Vicențiu Ciorbaru
6e55236c0a Merge branch '10.0-galera' into 10.1 2018-06-12 19:39:37 +03:00
Jan Lindström
648cf7176c Merge remote-tracking branch 'origin/5.5-galera' into 10.0-galera 2018-05-07 13:49:14 +03:00
Sergei Golubchik
09b25f8596 only allow SUPER user to modify wsrep_on 2018-03-01 19:32:01 +01:00
Monty
68cd543539 Search for galera libraries also in /usr/lib64/galera-3
This is where Codership's offical rpm's puts them
2017-12-08 11:38:22 +02:00
Monty
61706e61fe Disable some test that fails constantly 2017-11-05 22:23:31 +02:00
Marko Mäkelä
a36c369bda Merge 10.1 into 10.2
For running the Galera tests, the variable my_disable_leak_check
was set to true in order to avoid assertions due to memory leaks
at shutdown.

Some adjustments due to MDEV-13625 (merge InnoDB tests from MySQL 5.6)
were performed. The most notable behaviour changes from 10.0 and 10.1
are the following:

* innodb.innodb-table-online: adjustments for the DROP COLUMN
behaviour change (MDEV-11114, MDEV-13613)

* innodb.innodb-index-online-fk: the removal of a (1,NULL) record
from the result; originally removed in MySQL 5.7 in the
Oracle Bug #16244691 fix
377774689b

* innodb.create-index-debug: disabled due to MDEV-13680
(the MySQL Bug #77497 fix was not merged from 5.6 to 5.7.10)

* innodb.innodb-alter-autoinc: MariaDB 10.2 behaves like MySQL 5.6/5.7,
while MariaDB 10.0 and 10.1 assign different values when
auto_increment_increment or auto_increment_offset are used.
Also MySQL 5.6/5.7 exhibit different behaviour between
LGORITHM=INPLACE and ALGORITHM=COPY, so something needs to be tested
and fixed in both MariaDB 10.0 and 10.2.

* innodb.innodb-wl5980-alter: disabled because it would trigger an
InnoDB assertion failure (MDEV-13668 may need additional effort in 10.2)
2017-08-31 09:30:40 +03:00
Sachin Setiya
5077cc0b1a Fix Merge Error 2017-08-23 16:49:42 +05:30
Jan Lindström
c23efc7d50 Merge remote-tracking branch 'origin/10.0-galera' into 10.1 2017-08-21 13:35:00 +03:00
Jan Lindström
f7e1b99895 Galera test fixes and add remaining test failures as disabled. 2017-08-18 11:31:03 +03:00
Sergei Golubchik
f6633bf058 Merge branch '10.1' into 10.2 2017-07-05 19:08:55 +02:00
Sergei Golubchik
d38b15de65 Merge branch '10.0-galera' into 10.1 2017-06-30 16:33:13 +02:00
Sachin Setiya
de3201df3f Fix MDEV-12758 2017-06-29 23:03:30 +05:30
Sachin Setiya
629c60973d MDEV-12758 wrep.pool_of_threads failed in buildbot with WSREP ...
Problem:- While running tests from wsrep suite , we include file have_wsrep.inc
or have_wsrep_enabled.inc , these file test wsrep plugin is ACTIVE or 'wsrep_on'
is ON. These select does not ensure that whether 'wsrep_ready' is ON , So that
we can process SQL queries. So sometimes we will get error like this
mysqltest: At line 81: query 'call mtr.check_testcase()' failed: 1047: WSREP has
not yet prepared node for application use  not ok

Solution:- In file have_wsrep.inc and have_wsrep_enabled.inc we will include
wait_until_ready.inc , which will wait untill 'wsrep_on' is on
2017-06-29 18:31:42 +05:30
Marko Mäkelä
2d8fdfbde5 Merge 10.1 into 10.2
Replace have_innodb_zip.inc with innodb_page_size_small.inc.
2017-06-08 12:45:08 +03:00
Sachin Setiya
aa0f7e9bd7 Fix galera_defaults test and check_galera_version.inc script
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-05-31 17:53:32 +05:30
Sergei Golubchik
f42e08f951 Merge branch '10.0-galera' into 10.1 2017-05-26 19:21:19 +02:00
Marko Mäkelä
f740d23ce6 Merge 10.1 into 10.2 2017-04-28 12:22:32 +03:00
Sachin Setiya
eb55a9df52 Mdev-12017 Post Fix
Allow setting up binlog_format other then row for session scope for galera/
flashback.

Ref:- Mdev-7322
2017-04-27 21:20:02 +05:30
Marko Mäkelä
3167c91244 Temporarily disable a failing test
On several buildbot machines, the test fails like this:

CURRENT_TEST: wsrep.binlog_format
mysqltest: At line 12: query 'SET binlog_format=STATEMENT' failed:
1231: Variable 'binlog_format' can't be set to the value of 'STATEMENT'
2017-04-27 07:50:56 +03:00
Sachin Setiya
bd2064e820 MW-313 Enforce wsrep_max_ws_rows also when binlog is enabled
Signed-off-by: Sachin Setiya <sachinsetia1001@gmail.com>
2017-04-06 15:41:54 +05:30
Daniel Black
5dca5b8007 MDEV-7560: check_galera_version to account for greater version than specified
Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-04-05 12:06:35 +10:00
Sachin Setiya
5bb7653667 Fix wsrep_affected_rows.
The value of wsrep_affected_rows were not reseted properly for
slave. Now we also wsrep_affected_rows in Xid_log_event::do_apply_event
also , apart from THD::cleanup_after_query().

Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-03-16 02:13:31 +05:30
Elena Stepanova
31031a52da MDEV-11870 Message "MariaDB Galera and flashback does not support"
Fixed the typo, updated result file and suppression in the test
file which did not work anyway
2017-01-23 01:06:31 +02:00
Monty
d75d8631ed [MDEV-10570] Add Flashback support
==== Description ====

Flashback can rollback the instances/databases/tables to an old snapshot.
It's implement on Server-Level by full image format binary logs (--binlog-row-image=FULL), so it supports all engines.
Currently, it’s a feature inside mysqlbinlog tool (with --flashback arguments).

Because the flashback binlog events will store in the memory, you should check if there is enough memory in your machine.

==== New Arguments to mysqlbinlog ====

--flashback (-B)
It will let mysqlbinlog to work on FLASHBACK mode.

==== New Arguments to mysqld ====

--flashback

Setup the server to use flashback. This enables binary log in row mode
and will enable extra logging for DDL's needed by flashback feature

==== Example ====

I have a table "t" in database "test", we can compare the output with "--flashback" and without.

#client/mysqlbinlog /data/mysqldata_10.0/binlog/mysql-bin.000001 -vv -d test -T t --start-datetime="2013-03-27 14:54:00" > /tmp/1.sql
#client/mysqlbinlog /data/mysqldata_10.0/binlog/mysql-bin.000001 -vv -d test -T t --start-datetime="2013-03-27 14:54:00" -B > /tmp/2.sql

Then, importing the output flashback file (/tmp/2.log), it can flashback your database/table to the special time (--start-datetime).
And if you know the exact postion, "--start-postion" is also works, mysqlbinlog will output the flashback logs that can flashback to "--start-postion" position.

==== Implement ====

1. As we know, if binlog_format is ROW (binlog-row-image=FULL in 10.1 and later), all columns value are store in the row event, so we can get the data before mis-operation.

2. Just do following things:

  2.1 Change Event Type, INSERT->DELETE, DELETE->INSERT.
  For example:
    INSERT INTO t VALUES (...)  ---> DELETE FROM t WHERE ...
    DELETE FROM t ... ---> INSERT INTO t VALUES (...)

  2.2 For Update_Event, swapping the SET part and WHERE part.
  For example:
    UPDATE t SET cols1 = vals1 WHERE cols2 = vals2
    --->
    UPDATE t SET cols2 = vals2 WHERE cols1 = vals1

  2.3 For Multi-Rows Event, reverse the rows sequence, from the last row to the first row.
  For example:
    DELETE FROM t WHERE id=1; DELETE FROM t WHERE id=2; ...; DELETE FROM t WHERE id=n;
    --->
    DELETE FROM t WHERE id=n; ...; DELETE FROM t WHERE id=2; DELETE FROM t WHERE id=1;

  2.4 Output those events from the last one to the first one which mis-operation happened.
  For example:
2017-01-20 15:33:28 +02:00
Sergei Golubchik
4a5d25c338 Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
Nirbhay Choubey
2c734e7be3 MDEV-10993: wsrep.mdev_10186 result depends on location of
... galera library

Update test case.
2016-12-19 16:12:26 -05:00
Nirbhay Choubey
07918b48b8 MDEV-10993: wsrep.mdev_10186 result depends on location of galera library
Update test case.
2016-11-02 09:45:43 -04:00
Nirbhay Choubey
e1c6f28f0d Merge branch '10.0-galera' into 10.1 2016-09-28 13:20:02 -04:00
Sergei Golubchik
06b7fce9f2 Merge branch '10.1' into 10.2 2016-09-09 08:33:08 +02:00
Nirbhay Choubey
3dd88fbd11 MDEV-10714: Could not execute Delete_rows event on table; wsrep_max_ws_rows exceeded. Error_Code 1180
The wsrep_max_ws_rows related implementation should be skipped
when server is running with wsrep disabled.
2016-09-01 12:59:11 -04:00
Monty
e139d971ec Fixed compiler warning and failing test suite because system dependency 2016-08-29 13:11:34 +03:00
Nirbhay Choubey
3575618237 Post merge fixes. 2016-08-25 21:28:26 -04:00
Nirbhay Choubey
16702ec95f Record wsrep.variables test result (with non-debug galera library). 2016-08-25 21:19:25 -04:00
Nirbhay Choubey
90266e8a0e Merge branch '10.0-galera' into bb-10.1-serg 2016-08-25 15:39:39 -04:00
Nirbhay Choubey
8b998a48cc Update galera version-dependent tests. 2016-08-21 16:17:04 -04:00
Nirbhay Choubey
90f222ea7d MDEV-10235: Deadlock in CREATE TABLE .. AS SELECT .. if result set is empty in Galera
In CTAS, handlers get registered under statement transaction
(st_transactions::stmt), while ha_fake_trx_id(), used by CTAS,
looked under standard transaction (st_transactions::all) for
registered handlers, and thus it failed to grab a fake transaction
ID. As a result, with no valid transaction ID, wsrep commit failed
with an error.

ha_fake_trx_id() now looks for handlers registered under 'stmt'
in case 'all' is empty. Also modified the logic to print warning
only once if none of the registered handlers have fake_trx_id.
2016-06-27 18:21:00 -04:00
Nirbhay Choubey
ad3584bf72 Test cleanup: Remove unnecessary global suppressions 2016-06-27 18:17:03 -04:00
Nirbhay Choubey
48a0a66ffa MDEV-10186: mysqld crash when runtime setting wsrep_cluster_address without wsrep_on=ON
On wsrep_cluster_address update, node restarts the replication
and attempts to connect to the new address. In this process it
makes a call to wsrep provider's connect API, which could lead
to segfault if wsrep provider is not loaded (wsrep_on=OFF).

Fixed by making sure that it proceeds only if a provider is
loaded.
2016-06-27 18:15:47 -04:00
Nirbhay Choubey
f629f53548 Fix memory leak in XtraDB. 2016-06-27 14:44:07 -04:00
Nirbhay Choubey
94a61838fe Fix galera,wsrep tests. 2016-06-26 21:15:36 -04:00
Nirbhay Choubey
bca5894d51 Adjust warning suppression over a recent change in galera library. 2015-09-27 19:20:43 -04:00
Sergei Golubchik
a5b0a32ac3 Merge branch '10.0-galera' into 10.1 2015-09-03 16:32:00 +02:00
Nirbhay Choubey
f533b2b462 Merge branch '5.5-galera' into 10.0-galera 2015-08-25 11:15:45 -04:00
Nirbhay Choubey
98bebad672 Fix for a typo. 2015-08-18 17:03:28 -04:00
Nirbhay Choubey
c6a0cbdac6 Merge branch '5.5-galera' into 10.0-galera 2015-08-14 14:59:43 -04:00
Nirbhay Choubey
fe757e006c Fix for some failing tests. 2015-08-14 13:45:52 -04:00
Nirbhay Choubey
dced5146bd Merge branch '10.0-galera' into 10.1 2015-07-14 16:05:29 -04:00
Nirbhay Choubey
c8ad5b2f12 MDEV-8151 : wsrep.foreign_key, wsrep.pool_of_threads,
.. wsrep.binlog_format, wsrep.mdev_6832 fail in buildbot

Galera-3.9 logs an additional warning in the error log if
it fails to find gvwstate.dat file. Update wsrep/suite.pm.
2015-05-12 17:15:16 -04:00
Nirbhay Choubey
c6c9a69cce Fix for some more test failures. 2015-05-12 16:56:06 -04:00
Nirbhay Choubey
3331d4e07e Merge galera tests from github.com/codership/mysql-wsrep 2015-05-08 17:43:57 -04:00
Nirbhay Choubey
84a4db263a Merge branch '5.5-galera' into 10.0-galera 2015-03-28 17:29:10 -04:00
Nirbhay Choubey
6a204546ef MDEV-7798: mysql.server init script can't stop mysqld when WSREP is turned off
wsrep threads should be always be checked for existence & stopped on
server shutdown.
2015-03-24 16:41:04 -04:00
Nirbhay Choubey
100249be6a Merge branch '5.5-galera' into 10.0-galera
Conflicts:
	storage/innobase/dict/dict0dict.c
	storage/xtradb/dict/dict0dict.c
2015-03-10 09:23:03 -04:00
Nirbhay Choubey
07ff90e99b Reduce gcache size to cut down disk usage 2015-03-09 22:55:54 -04:00
Nirbhay Choubey
4c191de323 MDEV-7560: wsrep* tests depend on the version of galera library
Added an include file to check galera library version.
2015-02-27 22:16:37 -05:00
Nirbhay Choubey
aa2904a7f4 MDEV-7560: wsrep* tests depend on the version of galera library
Added an include file to check galera library version.
2015-02-27 22:13:37 -05:00
Nirbhay Choubey
16c446235e Changes in wsrep_guess_ip()
* Changed loopback detection to be done via ifa->ifa_flags
* Removed unused function wsrep_guess_address()
2015-02-27 19:16:27 -05:00
Nirbhay Choubey
8ee5668033 Changes in wsrep_guess_ip()
* Changed loopback detection to be done via ifa->ifa_flags
* Removed unused function wsrep_guess_address()
2015-02-27 17:43:10 -05:00
Nirbhay Choubey
4fb2f66907 Changes in wsrep_guess_ip()
* Changed loopback detection to be done via ifa->ifa_flags
* Removed unused function wsrep_guess_address()
2015-02-24 21:55:22 -05:00
Nirbhay Choubey
fcc6e12d69 MDEV-7544: Update global_suppressions to include warning related to "gvwstate.dat" 2015-02-18 19:02:00 -05:00
Nirbhay Choubey
a518cc4470 MDEV-7544: Update global_suppressions to include warning related to "gvwstate.dat" 2015-02-18 18:59:01 -05:00
Jan Lindström
36c1982a19 MDEV-7604: wsrep plugin lists its plugin_maturity as Unknown
Changed wsrep plugin from mysql_plugin to maria_plugin to
set up plugin_maturity to Stable.
2015-02-18 15:23:37 +02:00
Sergei Golubchik
8e7649867f Merge 10.0-galera into 10.1 2015-02-06 16:14:23 +01:00
Nirbhay Choubey
950d69610a MDEV-7322: Option to allow setting the binlog_format with Galera
At session scope, allow binlog_format to be changed to
values other than ROW with a warning.
2015-01-27 16:25:18 -05:00
Nirbhay Choubey
5b6f637caa MDEV-7322: Option to allow setting the binlog_format with Galera
At session scope, allow binlog_format to be changed to
values other than ROW with a warning.
2015-01-27 14:17:40 -05:00
Nirbhay Choubey
ea229eb6bb Minor test modifications. 2015-01-26 22:48:02 -05:00
Nirbhay Choubey
248c662cd7 Minor test modifications. 2015-01-26 22:43:46 -05:00
Nirbhay Choubey
53b9f755af MDEV-7374 : Losing connection to MySQL while running ALTER TABLE
Backport from 10.1.
2015-01-24 18:46:48 -05:00
Nirbhay Choubey
fffc9f585d MDEV-7374 : Losing connection to MySQL while running ALTER TABLE
Backport from 10.1.
2015-01-24 18:39:21 -05:00
Nirbhay Choubey
0105bf349a MDEV-7476: Allow SELECT to succeed even when node is not ready
Added a SESSION-only system variable "wsrep_dirty_reads" to allow SELECT
queries to pass even when the node is not prepared to accept queries
(wsrep_ready=OFF). Added a test case.
2015-01-22 18:00:37 -05:00
Nirbhay Choubey
887628acee Test changes (backported from 10.1). 2015-01-16 13:53:23 -05:00
Nirbhay Choubey
bb93d46241 Test changes (backported from 10.1). 2015-01-16 13:52:30 -05:00
Nirbhay Choubey
aee3ac4877 MDEV-7222: Cluster Node Crash at CREATE DEFINER statement
Check whether the definer host string is not null before
appending it to the specified buffer.
2015-01-02 10:02:04 -05:00
Nirbhay Choubey
61f73d40ca MDEV-7397: SIGSEGV on inserting into a key-less table
When wsrep is enabled, an md5 hash of the entire row is calculated
for tables with no PK. It, however segfaulted as the md5 context
object was not properly constructed.

Fixed by ensuring that the YaSSL's context object gets constructed
explicitly at the specified pre-allocated location (placement)
before its used.

Added a test case.
2014-12-31 19:52:35 -05:00
Nirbhay Choubey
25aaa652c4 MDEV-6832: ER_LOCK_WAIT_TIMEOUT on SHOW STATUS
Synchronous read view should not be needed for
SHOW commands.
2014-12-31 19:46:48 -05:00
Nirbhay Choubey
952b575272 MDEV-6832: ER_LOCK_WAIT_TIMEOUT on SHOW STATUS
Synchronous read view should not be needed for
SHOW commands.
2014-12-31 19:28:20 -05:00
Nirbhay Choubey
3bb02f3e6d bzr merge -rtag:mariadb-10.0.15 maria/10.0 2014-12-05 12:33:02 -05:00
Nirbhay Choubey
369c02674c MDEV-7053: WSREP_STATUS & WSREP_MEMBERSHIP I_S tables
wsrep_info INFORMATION_SCHEMA plugin to provide WSREP_STATUS
and WSREP_MEMBERSHIP tables.
2014-11-22 14:33:51 -05:00
Nirbhay Choubey
6f65d2d114 MDEV-6924 : Server crashed on CREATE TABLE ... SELECT
Do not allow server to start if binlog_format is set
to a format other than ROW. Also restrict the change
of GLOBAL/SESSION binlog_format value at runtime.
2014-11-17 11:56:03 -05:00
Nirbhay Choubey
c68e73b53f MDEV-6924 : Server crashed on CREATE TABLE ... SELECT
Do not allow server to start if binlog_format is set
to a format other than ROW. Also restrict the change
of GLOBAL/SESSION binlog_format value at runtime.
2014-11-17 09:55:53 -05:00
Sergei Golubchik
03ec3511a8 cleanup: galera misc cleanups
also disable galera-specific output in mysql_tzinfo_to_sql,
it'll be enabled later.
2014-10-10 22:27:36 +02:00
Nirbhay Choubey
c768af75b7 Minor modifications
- Simplified test cases in wsrep.variables
- Fixed a condition in wsrep_check_opts.cc
- Fixed an "unbound variable" in wsrep_sst_rsync
2014-10-04 13:53:33 -04:00
Sergei Golubchik
93b50e64a0 cleanup: remove galera/wsrep magic from mtr 2014-10-01 23:38:27 +02:00
Jan Lindström
d0a5f33ccd Remove incorrect test file. 2014-09-11 07:10:37 +03:00
Nirbhay Choubey
76d15afb33 Minor improvements in mtr and wsrep test files. 2014-09-09 19:19:12 -04:00
Nirbhay Choubey
be055b3835 Minor improvements in mtr and wsrep test files. 2014-09-09 19:05:25 -04:00
Jan Lindström
e44751b65f Merge revision 3882 from lp:maria/maria-10.0-galera
MDEV-6656: Test wsrep.variables hangs

  Analysis: wsrep_applier_thread shutdown signaling does not always work
  correctly causing a timing problem where main thread is waiting in a
  condition variable a signal that all worker threads to end.
2014-08-29 10:11:08 +03:00
Jan Lindström
f99f573dc7 MDEV-6656: Test wsrep.variables hangs
Analysis: wsrep_applier_thread shutdown signaling does not always work
correctly causing a timing problem where main thread is waiting in a
condition variable a signal that all worker threads to end.
2014-08-29 09:42:13 +03:00
Jan Lindström
df4dd593f2 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.
2014-08-26 15:43:46 +03:00
Nirbhay Choubey
b77fc5a343 Merge of patch for MDEV#6399. 2014-07-12 18:21:29 -04:00
Nirbhay Choubey
3ce3647055 MDEV#6399 - Make galera test suite run with --parallel
Galera tests used default base/SST ports which led to
failures due to port conflicts when run in parallel.
Fixed by setting them to ones generated by mtr framework.
2014-07-12 18:20:45 -04:00
Nirbhay Choubey
dc377fcbc0 Merge of patch for MDEV-6411 from maria-5.5-galera. 2014-07-09 11:07:23 -04:00
Nirbhay Choubey
40bfd20180 MDEV#6411 - Setting set @@global_wsrep_sst_auth=NULL
causes crash

Fixed by properly handling the NULL values.
2014-07-09 11:04:28 -04:00