Commit graph

73 commits

Author SHA1 Message Date
Marko Mäkelä
7b48da4d7e Merge 10.4 into 10.5 2021-04-08 07:47:49 +03:00
Daniele Sciascia
915983e1cc MDEV-25226 Assertion when wsrep_on set OFF with SR transaction
This patch makes the following changes around variable wsrep_on:

1) Variable wsrep_on can no longer be updated from a session that has
an active transaction running. The original behavior allowed cases
like this:

     BEGIN;
     INSERT INTO t1 VALUES (1);
     SET SESSION wsrep_on = OFF;
     INSERT INTO t1 VALUES (2);
     COMMIT;

With regular transactions this would result in no replication
events (not even value 1). With streaming replication it would be
unnecessarily complex to achieve the same behavior. In the above
example, it would be possible for value 1 to be already replicated if
it happened to fill a separate fragment, while value 2 wouldn't.

2) Global variable wsrep_on no longer affects current sessions, only
subsequent ones. This is to avoid a similar case to the above, just
using just by using global wsrep_on instead session wsrep_on:

      --connection conn_1
      BEGIN;
      INSERT INTO t1 VALUES(1);

      --connection conn_2
      SET GLOBAL wsrep_on = OFF;

      --connection conn_1
      INSERT INTO t1 VALUES(2);
      COMMIT;

The above example results in the transaction to be replicated, as
global wsrep_on will only affect the session wsrep_on of new
connections.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-04-05 09:10:23 +03:00
Marko Mäkelä
233c09138f Disable crashing Galera tests: MDEV-18534, MDEV-24485 2021-03-19 13:10:12 +02:00
Marko Mäkelä
be881ec457 Merge 10.4 into 10.5 2021-03-19 13:09:21 +02:00
Marko Mäkelä
550cf13eb3 Disable failing Galera tests 2021-03-19 11:53:49 +02:00
Jan Lindström
30379d906b Update disabled.def in suites
* galera
* galera_sr
* galera_3nodes
2021-01-27 14:16:47 +02:00
Marko Mäkelä
961c7938bb Merge 10.4 into 10.5 2021-01-25 12:44:24 +02:00
Jan Lindström
4afab3c725 MDEV-18542 : galera_sr.galera-features#56: Test failure: signal 6; mysqltest: Can't connect to local MySQL server
Make test faster
2021-01-13 13:08:07 +02:00
Marko Mäkelä
8de233af81 Merge 10.4 into 10.5 2021-01-11 16:29:51 +02:00
Stepan Patryshev
7edbd27258 MDEV-24500: Added wait condition to make sure table t1 is replicated to node_2. 2021-01-04 18:24:06 +02:00
Marko Mäkelä
898521e2dd Merge 10.4 into 10.5 2020-10-30 11:15:30 +02:00
Daniele Sciascia
46c273892e MDEV-23623 - Fix assertion in MTR test galera_sr.GCF-1051
Fix assertion `thd->in_active_multi_stmt_transaction() ||
thd->m_transaction_psi == __null' failed on MTR test
galera_sr.GCF-1051.

Add a new MTR test MDEV-23623 that reproduces the issue
deterministically and update wsrep-lib submodule, containing
the actual fix.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2020-10-28 06:49:56 +02:00
Marko Mäkelä
882ce206db Merge 10.4 into 10.5 2020-09-23 11:32:43 +03:00
Jan Lindström
98f03e5a22 MDEV-23659 : Update Galera disabled.def file 2020-09-22 11:30:37 +03:00
Jan Lindström
98ac2d425e MDEV-21170 : Galera test failure on galera_sr.GCF-1043[A|B]
Add error printout when mysql.wsrep_streaming_log lock
fails. However, tests are very undeterministic and not
suitable for mtr environment. Thus, they are removed.
2020-09-22 11:29:24 +03:00
Jan Lindström
7730b7bace MDEV-23617 : galera_sr.galera_sr_rollback_retry MTR failed: 1213: Deadlock found when trying to get lock
Add corrected wait_condition to wait until rows are in streaming
replication log.
2020-09-14 18:17:07 +03:00
Marko Mäkelä
3421223363 Merge 10.4 into 10.5 2020-09-09 16:57:30 +03:00
Jan Lindström
cf9b3b25b4 MDEV-23608 : galera_sr.GCF-597 MTR failed: query 'ROLLBACK' succeeded - should have failed with errno 1213
Added wait_condition to wait correct streaming state.
2020-09-09 16:31:05 +03:00
Jan Lindström
44e7e1f0d3 MDEV-23611 : galera_sr.galera_sr_kill_query MTR failed: 15 instead of 0 on "SELECT COUNT(*) AS EXPECT_0 FROM mysql.wsrep_streaming_log;"
Add wait_condition to stabilize test.
2020-09-09 16:31:05 +03:00
Jan Lindström
90bea7c32c MDEV-23613 : galera_sr.galera_sr_kill_slave MTR failed: query 'LOCK TABLE t2 WRITE' failed: 1146: Table 'test.t2' doesn't exist
Remove unnecessary sleeps from test and replace them with proper
wait_conditions.
2020-09-09 16:31:05 +03:00
Marko Mäkelä
50a11f396a Merge 10.4 into 10.5 2020-08-01 14:42:51 +03:00
Jan Lindström
bec81db1c2 Update Galera global warning ignore list. 2020-07-24 15:17:35 +03:00
Marko Mäkelä
4a0b56f604 Merge 10.4 into 10.5 2020-05-31 10:28:59 +03:00
Daniele Sciascia
dc22acfdb6
MDEV-22616 CHECK TABLE fails with wsrep_trx_fragment_size > 0 (#1551)
Executing CHECK TABLE  with streaming replication enabled reports
error "Streaming replication not supported with
binlog_format=STATEMENT".
Administrative commands such as CHECK TABLE, are not replicated and
temporarily set binlog format to statement.
To avoid the problem, report the error only for active transactions
for which streaming replication is enabled.
2020-05-21 09:34:03 +03:00
Marko Mäkelä
b30a013142 Merge 10.4 into 10.5 2020-05-13 14:25:06 +03:00
Jan Lindström
057a700a2a MDEV-22466 : Galera missing .test or .result files
Add missing .test and .result files.
2020-05-07 14:23:33 +03:00
Marko Mäkelä
496d0372ef Merge 10.4 into 10.5 2020-04-29 15:40:51 +03:00
Sergei Golubchik
c2db9397c7 MDEV-18565 Galera mtr-suite fails if galera library is not installed
revert/simplify f5390eea9a

remove galera-specific checks from mtr and the main suite
2020-04-27 09:22:36 +02:00
Marko Mäkelä
ccc06931c3 Merge 10.4 into 10.5 2020-04-08 10:36:41 +03:00
Daniele Sciascia
bdcecfa22c MDEV-22021: Galera database could get inconsistent with rollback to savepoint
When binlog is disabled, WSREP will not behave correctly when
SAVEPOINT ROLLBACK is executed and we will not rollback transaction.
2020-03-31 14:18:21 +03:00
Marko Mäkelä
5203bc10f1 Merge 10.4 into 10.5 2020-03-21 11:37:10 +02:00
Daniele Sciascia
9394cc8914
MDEV-21675: Data inconsistency after multirow insert rollback (#1474)
* Remove dead code

* MDEV-21675 Data inconsistency after multirow insert rollback

This patch fixes data inconsistencies that happen after rollback of
multirow inserts, with binlog disabled.
For example, statements such as `INSERT INTO t1 VALUES (1,'a'),(1,'b')`
that fail with duplicate key error. In such cases the whole statement
is rolled back. However, with wsrep_emulate_binlog in effect, the
IO_CACHE would not be truncated, and the pending rows events would be
replicated to the rest of the cluster. In the above example, it would
result in row (1,'a') being replicated, whereas locally the statement
is rolled back entirely. Making the cluster inconsistent.
The patch changes the code so that prior to statement rollback,
pending rows event are removed and the stmt cache reset.
That patch also introduces MTR tests that excercise multirow insert
statements for regular, and streaming replication.
2020-03-21 09:17:28 +02:00
Jan Lindström
e253e3560d MDEV-21601 : Cleanup Galera disabled tests
* Remove those tests that will not be supported on that release.
* Make sure that correct tests are disabled and have MDEVs
* Sort test names
2020-02-21 08:29:01 +02:00
Jan Lindström
77eb22fd58 MDEV-21517 : Galera test galera_sr.GCF-561 failure: Result length mismatch
Add wait conditions.
2020-02-21 08:25:51 +02:00
Jan Lindström
4b99358953 MDEV-21601 : Cleanup Galera disabled tests
* Remove those tests that will not be supported on that release.
* Make sure that correct tests are disabled and have MDEVs
* Sort test names

This should not be merged upwards.
2020-02-21 08:25:20 +02:00
Jan Lindström
1a73b995fc MDEV-21601 : Cleanup Galera disabled tests
* Remove those tests that will not be supported on that release.
* Make sure that correct tests are disabled and have MDEVs
* Sort test names

This should not be merged upwards.
2020-02-16 13:50:18 +02:00
Jan Lindström
7002948bc5 MDEV-21517 : Galera test galera_sr.GCF-561 failure: Result length mismatch
Add wait conditions.
2020-02-16 13:48:34 +02:00
Jan Lindström
5007633c10 MDEV-21601 : Cleanup Galera disabled tests
* Remove those tests that will not be supported on that release.
* Make sure that correct tests are disabled and have MDEVs
* Sort test names

This should not be merged upwards.
2020-02-16 13:48:34 +02:00
Marko Mäkelä
ded128aa9b Merge 10.4 into 10.5 2020-01-20 16:48:56 +02:00
Jan Lindström
057fbfa356 Disable Galera tests failing on bb and Azure until they are fixed. 2020-01-18 09:38:48 +02:00
Marko Mäkelä
28c89b7151 Merge 10.4 into 10.5 2019-12-16 07:47:17 +02:00
Daniele Sciascia
72a5a4f1d5 MDEV-20780 Fixes for failures on galera_sr_ddl_master (#1425)
Test galera_sr_ddl_master would sometimes fail due to leftover
streaming replication fragments. Rollbacker thread would attempt to
open streaming_log table to remove the fragments, but would fail in
check_stack_overrun(). Ultimately the check_stack_overrun() failure
was caused by rollbacker missing to switch the victim's THD thread
stack to rollbacker's thread stack.

Also in this patch:
- Remove duplicate functionality in rollbacker helper functions,
  and extract rollbacker fragment removal into function
  wsrep_remove_streaming_fragments()
- Reuse open_for_write() in wsrep_schema::remove_fragments
- Partially revert changes to galera_sr_ddl_master test from
  commit 44a11a7c08. Removed unnecessary
  wait condition and isolation level setting
2019-12-11 14:08:06 +02:00
Daniele Sciascia
aab6cefe8d MDEV-20848 Fixes for MTR test galera_sr.GCF-1060 (#1421)
This patch contains two fixes:

* wsrep_handle_mdl_conflict(): handle the case where SR transaction
  is in aborting state. Previously, a BF-BF conflict was reported, and
  the process would abort.
* wsrep_thd_bf_abort(): do not restore thread vars after calling
  wsrep_bf_abort(). Thread vars are already restored in wsrep-lib if
  necessary. This also removes the assumption that the caller of
  wsrep_thd_bf_abort() is the given bf_thd, which is not the case.

Also in this patch:

* Remove unnecessary check for active victim transaction in
  wsrep_thd_bf_abort(): the exact same check is performed later in
  wsrep_bf_abort().
* Make wsrep_thd_bf_abort() and wsrep_log_thd() const-correct.
* Change signature of wsrep_abort_thd() to take THD pointers instead
  of void pointers.
2019-12-04 09:21:14 +02:00
Marko Mäkelä
5a00792c69 Merge 10.4 into 10.5 2019-11-29 11:25:40 +02:00
Jan Lindström
a8bf39cc3e Disable failing Galera test cases. 2019-11-29 08:23:15 +02:00
Marko Mäkelä
613e9e7d4d MDEV-20907 Set innodb_log_files_in_group=1 by default
Historically, InnoDB split the redo log into at least 2 files.
MDEV-12061 allowed the minimum to be innodb_log_files_in_group=1,
but it kept the default at innodb_log_files_in_group=2.

Because performance seems to be slightly better with only one log file,
and because implementing an append-only variant of the log would require
a single file, let us define the default to be 1, and have
innodb_log_file_size=96M, to retain the same default total size.
2019-10-28 17:11:10 +02:00
Marko Mäkelä
3043f38436 Merge 10.4 into 10.5 2019-10-28 17:10:34 +02:00
Jan Lindström
9afbb1069a Add wait_condition to stabilize. 2019-10-25 12:32:11 +03:00
Jan Lindström
1036886b70 Stabilize tests.
Changes to be committed:
	modified:   mysql-test/suite/galera_sr/disabled.def
	modified:   mysql-test/suite/galera_sr/r/GCF-561.result
	modified:   mysql-test/suite/galera_sr/r/galera_sr_ddl_master.result
	modified:   mysql-test/suite/galera_sr/r/galera_sr_kill_query.result
	modified:   mysql-test/suite/galera_sr/r/galera_sr_shutdown_slave.result
	new file:   mysql-test/suite/galera_sr/suite.pm
	modified:   mysql-test/suite/galera_sr/t/GCF-561.test
	modified:   mysql-test/suite/galera_sr/t/galera_sr_ddl_master.test
	modified:   mysql-test/suite/galera_sr/t/galera_sr_kill_query.test
	modified:   mysql-test/suite/galera_sr/t/galera_sr_shutdown_slave.test
2019-10-23 10:12:53 +03:00
Marko Mäkelä
d04f2de80a Merge 10.4 into 10.5 2019-10-11 08:41:36 +03:00