summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.5 into 10.6Marko Mäkelä2021-04-213-7/+142
|\
| * Merge 10.4 into 10.5Marko Mäkelä2021-04-2132-2901/+6523
| |\
| | * More fixes to variable wsrep_onDaniele Sciascia2021-04-202-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Disallow setting wsrep_on = 1 if wsrep_provider is unset. Also, move wsrep_on_basic from sys_vars to wsrep suite: this test now requires to run with wsrep_provider set * Disallow setting @@session.wsrep_on = 1 when @@global.wsrep_on = 0 * Handle the case where a new connection turns @@global.wsrep_on from off to on. In this case we would miss a call to wsrep_open, causing unexpected states in wsrep::client_state (causing assertions). * Disable wsrep.MDEV-22443 because it is no longer possible to enable wsrep_on, if server is started with wsrep_provider='none' Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| | * MDEV-25423 : Donor node fails to shutdown after mysqldump SSTbb-10.4-MDEV-25423Jan Lindström2021-04-1930-2901/+6388
| | | | | | | | | | | | | | | | | | | | | | | | * Table should have primary key * Enable wsrep_sync_wait before final selects * Enable autocommit before final selects. * Fix joiner monitoring in case of mysqldump. * Add wait_conditions to stabilize
* | | Improve Galera SST testsbb-10.6-MDEV-25359Jan Lindström2021-04-1832-2901/+6426
| | | | | | | | | | | | | | | | | | | | | | | | * Table should have primary key * Enable wsrep_sync_wait before final selects * Enable autocommit before final selects. * Fix joiner monitoring in case of mysqldump. * Add wait_conditions to stabilize
* | | MDEV-25359 : Improve mariabackup SST script compliance with native MariaDB ↵Alexey Yurchenko2021-04-173-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SSL practices and configuration. 1. Pass joiner's authentication information to donor together with address in State Transfer Request. This allows joiner to authenticate donor on connection. Previously joiner would accept data from anywhere. 2. Deprecate custom SSL configuration variables tca, tcert and tkey in favor of more familiar ssl-ca, ssl-cert and ssl-key. For backward compatibility tca, tcert and tkey are still supported. 3. Allow falling back to server-wide SSL configuration in [mysqld] if no SSL configuration is found in [sst] section of the config file. 4. Introduce ssl-mode variable in [sst] section that takes standard values and has following effects: - old-style SSL configuration present in [sst]: no effect otherwise: - ssl-mode=DISABLED or absent: retains old, backward compatible behavior and ignores any other SSL configuration - ssl-mode=VERIFY*: verify joiner's certificate and CN on donor, verify donor's secret on joiner (passed to donor via State Transfer Request) BACKWARD INCOMPATIBLE BEHAVIOR - anything else enables new SSL configuration convetions but does not require verification ssl-mode should be set to VERIFY only in a fully upgraded cluster. Examples: [mysqld] ssl-cert=/path/to/cert ssl-key=/path/to/key ssl-ca=/path/to/ca [sst] -- server-wide SSL configuration is ignored, SST does not use SSL [mysqld] ssl-cert=/path/to/cert ssl-key=/path/to/key ssl-ca=/path/to/ca [sst] ssl-mode=REQUIRED -- use server-wide SSL configuration for SST but don't attempt to verify the peer identity [sst] ssl-cert=/path/to/cert ssl-key=/path/to/key ssl-ca=/path/to/ca ssl-mode=VERIFY_CA -- use SST-specific SSL configuration for SST and require verification on both sides Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | Merge 10.5 into 10.6Marko Mäkelä2021-04-148-8/+53
|\ \ \ | |/ /
| * | Merge 10.4 into 10.5Marko Mäkelä2021-04-147-8/+47
| |\ \ | | |/
| | * Merge 10.3 into 10.4Marko Mäkelä2021-04-147-8/+47
| | |\
| | | * Merge 10.2 into 10.3Marko Mäkelä2021-04-135-8/+16
| | | |\
| | | | * MDEV-21484: galera_sst_mariabackup_encrypt_with_key test failedbb-10.2-MDEV-21484Julius Goryavsky2021-04-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the mtr test galera_sst_mariabackup_encrypt_with_key from the list of disabled tests because the problem with it has already been fixed.
| | | | * MDEV-25307: The value of the auto-increment variables changes during the testbb-10.2-MDEV-25307Julius Goryavsky2021-04-115-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The auto-increment variables may change intermittently during the execution of some tests from the Galera mtr suite, causing these tests to fail. This patch creates conditions in which unpredictable changes to these variables are not possible during the execution of those tests in which this problem is noticed or their values are restored before the end of testing.
| | | * | Merge 10.2 into 10.3Marko Mäkelä2021-04-092-0/+29
| | | |\ \ | | | | |/
| | | | * MDEV-25047: SIGSEGV in mach_read_from_n_little_endianbb-10.2-MDEV-25047mkaruza2021-04-012-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Virtual column fields are not found in prebuilt data type, so we should match InnoDB fields with `get_innobase_type_from_mysql_type` method. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| * | | | MDEV-25307: The value of the auto-increment variables changes during the testbb-10.5-MDEV-25307-part-2Julius Goryavsky2021-04-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part #2, specifically for the 10.5+ branch: The auto-increment parameters can change sporadically during the execution of the mtr test "galera_vote_rejoin_ddl", causing it to fail. This patch creates an environment where unpredictable changes to these auto-increment settings do not occur during the test.
* | | | | MDEV-24966 Galera multi-master regressionsjaakola2021-04-132-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the merging of MDEV-24915, 10.6 branch has regressions with handling of concurrent write load against two or more cluster nodes. These regressions may surface as cluster hanging, node crashes or data inconsistency. With some test scenarios, the only visible symptom could be that the BF victim aborting happens only by innodb lock wait timeout expiration. This would result only to poor performance (by default 50 sec hang for each BF conflict), and could be somewhat difficult to diagnose. This pull request has following fixes to handle concurrent write load from multiple nodes: In lock_wait_wsrep_kill(), the victim trx was expected to be only in TRX_STATE_ACTIVE state. With the delayed BF conflict handling, it can happen that victim has advanced into pre commit state. This was fixed by choosing victim both in TRX_STATE_ACTIVE and TRX_STATE_PREPARED states. Victim transaction may be in several different states at the time of detected lock conflict, and due to delayed BF aborting practice in MDEV-24915, the victim may advance further before the actual BF aborting takes place. The BF aborting in MDEV-24915 did not wake the victim, if it was in the state of waiting for some other lock (than the one that was blocking the high priority thread). This anomaly caused the innodb lock wait timeout expiration delays and poor performance symptom. To fix this, lock_wait_wsrep_kill() now looks if victim is in lock waiting state, and uses lock_cancel_waiting_and_release() to cancel this lock wait. wsrep_bf_abort() checks if the victim has active transaction (in wsrep-lib), and starts a new transaction if there was no active transaction before. Due to late BF aborting, the victim may have e.g. failed in certification and is already aborting or has aborted at this stage. This has caused problems in testing where BF aborter tries to BF abort himself. The fix in wsrep_bf_abort() now skips the BF abort, if victim is aborting or has aborted. Victim may not have started transaction yet in wsrep context, but it may have acquired MDL locks (due to DDL execution), and this has caused BF conflict. Such case does not require aborting in wsrep or replication provider state. BF aborting could cause BF-BF conflict scenario, if victim was already aborted and changed to replayer having high priority as well. This BF-BF conflict scenario is now avoided in lock_wait_wsrep() where we now check if blocking lock holder is also high priority and is ordered before, caller should wait for the lock in this situation. The natural innodb deadlock resolving algorithm could pick BF thread as deadlock victim. This is fixed by giving max weigh to BF threads in Deadlock::report(). MDEV-24341 has changed excution paths in do_command() and this affects BF aborted victim execution. This PR fixes one assert in do_command(): DBUG_ASSERT(!thd->async_state.pending_ops()) Which fired if the thd was BF aborted earlier. This assert is now changed to allow pending_ops() if thd was BF aborted before. With these fixes, long term highly conflicting write load could be run against to node cluster. If binlogging is configured, log_slave_updates should be also set.
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-04-082-0/+103
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.4 into 10.5Marko Mäkelä2021-04-082-0/+103
| |\ \ \ \ | | |/ / /
| | * | | MDEV-25226 Assertion when wsrep_on set OFF with SR transactionDaniele Sciascia2021-04-052-0/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-03-312-0/+3
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-312-0/+3
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.3 into 10.4Marko Mäkelä2021-03-312-0/+3
| | |\ \ \ | | | |/ /
| | | * | Merge 10.2 into 10.3Marko Mäkelä2021-03-312-0/+3
| | | |\ \ | | | | |/
| | | | * Add supression for warning.Jan Lindström2021-03-302-0/+3
| | | | |
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-03-2715-53/+280
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-2715-53/+280
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.3 into 10.4Marko Mäkelä2021-03-2713-53/+153
| | |\ \ \ | | | |/ /
| | | * | Merge 10.2 into 10.3Marko Mäkelä2021-03-2713-49/+142
| | | |\ \ | | | | |/
| | | | * Follow up fixes for making @@wsrep_provider read-onlyDaniele Sciascia2021-03-236-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove usage of wsrep_provider variable in galera_ist_restart_joiner * Rename galera_load_provider.inc and galera_unload_provider.inc to galera_stop_replication.inc and galera_start_replication.inc. Their original names were no longer reflecting what these include files do. followup for ce3a2a688db Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
| | | | * MDEV-22240: don't use pc.splitbrain=true on node2 in ↵Alexey Yurchenko2021-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | galera.galera_gcache_recover
| | | | * MDEV-24903: mariabackup SST fails while adding --log-bin in startup commandJulius Goryavsky2021-03-196-42/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mariabackup SST fails if "--log-bin" option is added with no value to command line parameters at server startup. This is because the SST scripts do not correctly interpret the "--- log-bin" option without a value. This patch adds correct handling of the "--log-bin" parameter without value to the general part of the parameter parsing (for SST scripts) and fixes the problem. Also added a test that checks the correct operation of the server after the fix.
| | * | | MDEV-21697: Galera assertion !wsrep_has_changes(thd) || ↵bb-10.4-MDEV-21697mkaruza2021-03-252-0/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (thd->lex->sql_command == SQLCOM_CREATE_TABLE && !thd->is_current_stmt_binlog_format_row()) Prevent adding WSREP keys with CTAS when table is is not InnoDB. Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-03-193-1/+54
|\ \ \ \ \ | |/ / / /
| * | | | Disable crashing Galera tests: MDEV-18534, MDEV-24485Marko Mäkelä2021-03-191-0/+1
| | | | |
| * | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-193-1/+53
| |\ \ \ \ | | |/ / /
| | * | | Disable failing Galera testsMarko Mäkelä2021-03-191-0/+2
| | | | |
| | * | | Merge 10.3 into 10.4Marko Mäkelä2021-03-193-1/+51
| | |\ \ \ | | | |/ /
| | | * | Merge 10.2 into 10.3Marko Mäkelä2021-03-185-2/+175
| | | |\ \ | | | | |/
| | | | * MDEV-18874 : Galera test MW-286 causes Mutex = ↵Jan Lindström2021-03-183-2/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TTASEventMutex<GenericPolicy>]: Assertion `!is_owned()' failed. assertion MDEV-24649 galera.galera_bf_lock_wait MTR failed with sigabrt: Assertion `!is_ow ned()' failed in sync0policy.ic on MutexDebug with Mutex = TTASEventMutex<GenericPolicy> Bug was fixed as part of MDEV-23328, this just adds test cases to regression set.
| | | | * MDEV-24978 : SIGABRT in __libc_messageJan Lindström2021-03-152-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Keyvalue can be longer than REC_VERSION_56_MAX_INDEX_COL_LEN and this leads out-of-array reference. Use dynamic memory allocation using actual max length of key value.
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-03-182-37/+207
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.4 into 10.5Marko Mäkelä2021-03-182-37/+207
| |\ \ \ \ | | |/ / /
| | * | | MDEV-23851 BF-BF Conflict issue because of UK GAP locksJan Lindström2021-03-172-37/+207
| | | | | | | | | | | | | | | | | | | | Add missing dbug sync point and correct the test case.
* | | | | MDEV-9077 Use sys schema in bootstrapping, incl. mtrVladislav Vaintroub2021-03-181-0/+1
| | | | |
* | | | | MDEV-20715 : Implement system variable to disallow local GTIDs in Galerabb-10.6-MDEV-20715Jan Lindström2021-03-014-0/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a new wsrep_mode feature DISALLOW_LOCAL_GTID for this. Nodes can have GTIDs for local transactions in the following scenarios: A DDL statement is executed with wsrep_OSU_method=RSU set. A DML statement writes to a non-InnoDB table. A DML statement writes to an InnoDB table with wsrep_on=OFF set. If user has set wsrep_mode=DISALLOW_LOCAL_GTID these operations produce a error ERROR HY000: Galera replication not supported
* | | | | MENT-411 : Implement wsrep_replicate_ariaJan Lindström2021-02-2526-258/+1162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduced two new wsrep_mode options * REPLICATE_MYISAM * REPLICATE_ARIA Depracated wsrep_replicate_myisam parameter and we use wsrep_mode = REPLICATE_MYISAM instead. This required small refactoring of wsrep_check_mode_after_open_table so that both MyISAM and Aria are handled on required DML cases. Similarly, added Aria to wsrep_should_replicate_ddl to handle DDL for Aria tables using TOI. Added test cases and improved MyISAM testing. Changed use of wsrep_replicate_myisam to wsrep_mode = REPLICATE_MYISAM
* | | | | Merge 10.5 into 10.6Marko Mäkelä2021-02-2417-23/+91
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.4' into 10.5Sergei Golubchik2021-02-2311-14/+83
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '10.3' into 10.4Sergei Golubchik2021-02-233-3/+28
| | |\ \ \ | | | |/ /
| | | * | Merge branch '10.2' into 10.3Sergei Golubchik2021-02-225-4/+37
| | | |\ \ | | | | |/