Commit graph

66 commits

Author SHA1 Message Date
Jan Lindström
0174a9ff3d MDEV-30172: Galera test case cleanup
* Delete tests that are not supported and not going to be supported
  any time soon
* Fix result set on tests that are not run on bb
* Fix tests that fail because of auto increment offset
* Make sure that disabled tests have open bug report
2022-12-07 07:33:51 +02:00
Alexander Barkov
289105e282 A cleanup for MDEV-29446 Change SHOW CREATE TABLE to display default collation
Recording test results according to MDEV-29446 changes:

  mysql-test/suite/galera/r/MDEV-25494.result
  mysql-test/suite/galera/r/galera_ctas.result
  mysql-test/suite/galera/r/galera_schema.result
  mysql-test/suite/galera_3nodes/r/galera_wsrep_schema.result
  mysql-test/suite/galera_sr/r/galera_sr_create_drop.result
2022-09-14 08:00:56 +04:00
Sergei Golubchik
a2bcfa64fe galera.MDEV-26575 and galera_sr.galera_sr_shutdown_slave failures 2022-05-16 20:18:18 +02:00
Jan Lindström
6393a2813d Enable fixed test cases 2022-05-03 09:02:13 +03:00
Jan Lindström
088b37b5ea Disable failing Galera tests 2022-03-29 12:07:55 +03:00
Daniele Sciascia
39ed400553 Fixup for MDEV-27553
Update wsrep-lib which contains a fixup introduced with MDEV-27553.
Also, adapt the corresponding test: after apply failure on ROLLBACK,
node will disconnect from cluster

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2022-03-18 08:30:25 +02:00
Daniele Sciascia
12cad0c346 MDEV-27615 Assertion `server_id.is_undefined() == false' failed
Add test case that reproduces the issue and update wsrep-lib submodule
to include the fix.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2022-01-27 09:13:21 +02:00
Jan Lindström
057178072c Add have_debug.inc 2022-01-25 10:53:37 +02:00
Daniele Sciascia
49e3bd2cbc MDEV-27553 Assertion `inited==INDEX' failed: in ha_index_end()
In wsrep_schema code, call ha_index_end() only if the corresponding
ha_index_init() call succeeded.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2022-01-24 09:46:21 +02:00
Monty
ca2ea4ff41 Only apply wsrep_trx_fragment_size to InnoDB tables
MDEV-22617 Galera node crashes when trying to log to slow_log table in
streaming replication mode

Other things:
- Changed name of wsrep_after_row(two arguments) to
  wsrep_after_row_internal(one argument) to not depended on the
  function signature with unused arguments.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
	     Added test case
2021-12-23 11:51:31 +02:00
Jan Lindström
53de922ae5 Enable galera_sr.GCF-1060 test case as it is now fixed. 2021-12-17 09:55:01 +02:00
Jan Lindström
c8c21a4c8f MDEV-26571 : galera_sr.GCF-627 MTR failed: Result length mismatch
Test changes only: do not output mysql.wsrep_streaming_log
contents.
2021-09-23 09:51:24 +03:00
Daniele Sciascia
5527fc5861 MDEV-21613 Failed to open table mysql.wsrep_streaming_log for writing
Fix sporadic failure for MTR test galera_sr.GCF-1018B. The test
sometimes fails due to an error that is logged to the error log
unnecessarily.
A deterministic test case (included in this patch) shows that the
error is loggen when a transaction is BF aborted right before  it
opens the streaming log table to perform fragment removal. When that
happens, the attempt to open the table fails and consequently an error
is logged. There is no need to log this error, as an ER_LOCK_DEADLOCK
error is returned to the client.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-09-14 11:38:03 +03:00
Daniele Sciascia
c3707691c2 MDEV-25718 Assertion `transaction.is_streaming()' failed
* Update wsrep-lib which contains the fix
* Add deterministic test case that reproduces the assertion

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-09-06 08:16:06 +03:00
Daniele Sciascia
ac2857a5fb MDEV-25717 Assertion `owning_thread_id_ == wsrep::this_thread::get_id()'
A test case to reproduce the issue. The actual fix is in galera
library.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-08-18 12:28:11 +03:00
Jan Lindström
88ce7cf744 MDEV-25769 : Galera test failure on galera_sr.GCF-627
Add wait_condition to wait until streaming log is empty.
2021-05-26 09:06:32 +03:00
sjaakola
e212415690 MDEV-25551 applying crash with tables without PK
The underlying problem with MDEV-25551 turned out to be that
transactions having changes for tables with no primary key,
were not safe to apply in parallel. This is due to excessive locking
in innodb side, and even non related row modifications could end up
in lock conflict during applying.

The fix for MDEV-25551 has disabled parallel applying for tables with no PK.
This fix depends on change for wsrep-lib, where a separate PR allows
application to modify transaction flags in wsrep-lib.

This commit has also separate mtr test for verifying that transactions
modifying a table with no primary key, will not apply in parallel.
This test is a modified version of initial test created by Gabor Orosz,
the reporterr of MDEV-25551.
Another mtr test was added in galera_sr suite, for testing if modifying
tables with no primary key would causes issues for streaming replication
use cases.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-05-26 07:41:05 +03:00
Daniele Sciascia
b1b2689f17 MDEV-25553 : Avoid unnecessary rollbacks with SR
This patch changes statement rollback for streaming replication.
Previously, a statement rollback was turned into full transaction
rollback in the case where the transaction had already replicated a
fragment. This was introduced in the initial implementation of
streaming replication due to the fact that we do not have a mechanism
to perform a statement rollback on the applying side.
This policy is however overly pessimistic, causing full rollbacks even
in cases where a local statement rollback, would not require a
statement rollback on the applying side. This happens to be case when
the statement itself has not replicated any fragments.
So the patch changes the condition that determines if a statement
rollback should be turned into a full rollback accordingly.

Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
2021-04-28 12:15:30 +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ä
550cf13eb3 Disable failing Galera tests 2021-03-19 11:53:49 +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
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
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
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
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
Jan Lindström
bec81db1c2 Update Galera global warning ignore list. 2020-07-24 15:17:35 +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
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
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
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
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
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
Jan Lindström
057fbfa356 Disable Galera tests failing on bb and Azure until they are fixed. 2020-01-18 09:38:48 +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
Jan Lindström
a8bf39cc3e Disable failing Galera test cases. 2019-11-29 08:23:15 +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
Jan Lindström
62dce14d15 MDEV-20782 : Galera test failure on galera_sr.galera_sr_mysqldump_sst
Add auto increment offset save and restore as node(s) are restarted.
2019-10-09 11:42:50 +03:00
Jan Lindström
44a11a7c08 MDEV-20780 : Galera test failure on galera_sr.galera_sr_ddl_master
Fix wait_condition and use repeatable read with wsrep_sync at the
end.
2019-10-09 11:41:14 +03:00
Jan Lindström
5a2012d2b3 Fix test failure on galera-features#56
We need to use wsrep_sync_wait=15 before selects to make sure
that node has applied all inserts from other node.
2019-08-15 12:40:27 +03:00
Jan Lindström
ee3ef790ca MDEV-19970 Galera test failure on galera_sr.galera-features#56
Move test to big_test as it takes significant amount of time and
add wait to get slave threads start and setup to replicate.
2019-07-16 09:21:26 +03:00
Daniele Sciascia
4e0c6139b2 Minor Galera MTR test fixes (#1326) 2019-06-07 13:54:16 +03:00
Jan Lindström
fe62ff6e1c MDEV-18265: Replace deprecated variable debug to debug_dbug on Galera tests
deleted:    mysql-test/suite/galera/r/MW-86.result
	deleted:    mysql-test/suite/galera/r/mysql-wsrep#216.result
	modified:   mysql-test/suite/galera/t/GCF-1081.test
	modified:   mysql-test/suite/galera_3nodes_sr/r/GCF-832.result
	modified:   mysql-test/suite/galera_3nodes_sr/t/GCF-810A.test
	modified:   mysql-test/suite/galera_3nodes_sr/t/GCF-810B.test
	modified:   mysql-test/suite/galera_3nodes_sr/t/GCF-810C.test
	modified:   mysql-test/suite/galera_3nodes_sr/t/GCF-832.test
	modified:   mysql-test/suite/galera_sr/r/mysql-wsrep-features#35.result
	modified:   mysql-test/suite/galera_sr/t/mysql-wsrep-features#35.test
2019-04-06 12:26:54 +03:00