summaryrefslogtreecommitdiff
path: root/mysql-test/suite/galera/t
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.1 into 10.2bb-10.2-mergeMarko Mäkelä2020-07-014-0/+7
|\
| * Test fixes.Jan Lindström2020-06-245-0/+9
| |
* | Test case cleanups.Jan Lindström2020-06-232-1/+95
| |
* | MDEV-21759 galera.galera_parallel_autoinc_manytrx sporadic failures.MikkoJaakola2020-06-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The galera.galera_parallel_autoinc_manytrx mtr test opens and runs test scenario through 3 connections to node 1 and one connection to node 2. In the test initialization phase, the test creates two tables 't1' and 'ten' and then creates a stored procedure 'p1' to operate on these tables. These 3 create DDL statements are issued through same connection to node 1. In the next test phase, the mtr script uses send command to launch the call for the p1 stored procedure through all 3 connections to node 1 and through one connection to node 2. As the mtr send command is asynchronous, this test phase is non blocking and fast operation. Now, if the replication between nodes is slow, it may happen that the initialization phase DDL statements have not been received or have not been fully applied in node 2. Therefore there is no guarantee that the test tables and the stored procedure have been created in node 2. Yet, the test is trying to call p1 in node 2. In the failure case error logs, there is error message "MTR failed: query 'reap' failed: 1305: PROCEDURE test.p1 does not exist" The reap command through connection to node 2, is the first place where test execution may observe that test tables and/or stored procedure are not yet created in node 2. The fix in this commit adds a wait condition in connection to node 2, to wait until the stored procedure is created before calling the stored procedure. The wait is implemented by looking in information_schema.routines for the p1 stored procedure.
* | MDEV-22125 : galera.galera_drop_multi MTR failed: InnoDB: MySQL is trying to ↵Jan Lindström2020-06-231-0/+20
| | | | | | | | | | | | | | | | | | drop database `fts`.`` though there are still open handles MDEV-22140 galera.galera_drop_database MTR failed: InnoDB: MySQL is trying to drop database `fts`.`` though there are still open handles Add wait conditions to wait that all operations are done in both nodes.
* | MDEV-20928 : Galera test failure on ↵Jan Lindström2020-06-231-9/+15
| | | | | | | | | | | | galera.galera_var_innodb_disallow_writes: Result length mismatch Add wait_conditions to force desired execution.
* | Add missing include as test requires galera debug libraryJan Lindström2020-06-151-0/+2
| |
* | Merge 10.1 into 10.2Julius Goryavsky2020-06-053-0/+438
|\ \ | |/
| * Added missing include files to check for debug_syncJulius Goryavsky2020-06-032-0/+6
| |
| * MDEV-22763 backporting MDEV-20225 fix into 10.1sjaakola2020-06-033-0/+432
| | | | | | | | | | | | Backported the support for aborting and replaying stored procedure and fix for trigger key assigments from 10.4 version. Backported also two mtr tests: wsrep_sp_bf_abort and MDEV-20225
* | MDEV-18838 : galera.galera_toi_truncate: Test failure: mysqltest: query ↵Jan Lindström2020-05-201-17/+9
| | | | | | | | | | | | 'reap' succeeded - should have failed with errno 1213 Test cleanup.
* | MDEV-21483 : Galera MTR tests failed: galera.MW-328A galera.MW-328BJan Lindström2020-05-084-2/+16
| | | | | | | | | | Enable tests with additional galera output to find out actual reason for test failures.
* | MDEV-21421 : Galera test sporadic failure on ↵Jan Lindström2020-05-081-0/+10
| | | | | | | | | | | | | | galera.galera_as_slave_gtid_myisam: Result length mismatch Add wait_condition so that drop table has time to replicate to Galera cluster.
* | MDEV-21515 : Galera test sporadic failure on ↵Jan Lindström2020-05-061-24/+14
| | | | | | | | | | | | | | galera.galera_wsrep_new_cluster: Result content mismatch Test starts two servers and we do not know order they really start, thus wsrep_local_index can be 1 or 2.
* | MDEV-20916: Galera test failure on galera.galera_parallel_autoinc_largetrx: ↵Jan Lindström2020-04-291-2/+6
| | | | | | | | | | | | | | Result content mismatch Add wait_condition to make sure that node contains all the rows expected.
* | Merge 10.1 into 10.2Marko Mäkelä2020-04-271-0/+1
|\ \ | |/
| * MDEV-22203: WSREP_ON is unnecessarily expensive to evaluateMarko Mäkelä2020-04-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of the applicable part of commit 93475aff8de80a0ef53cbee924bcb70de6e86f2c and commit 2c39f69d34e64a5cf94720e82e78c0ee91bd4649 from 10.4. Before 10.4 and Galera 4, WSREP_ON is a macro that points to a global Boolean variable, so it is not that expensive to evaluate, but we will add an unlikely() hint around it. WSREP_ON_NEW: Remove. This macro was introduced in commit c863159c320008676aff978a7cdde5732678f975 when reverting WSREP_ON to its previous definition. We replace some use of WSREP_ON with WSREP(thd), like it was done in 93475aff8de80a0ef53cbee924bcb70de6e86f2c. Note: the macro WSREP() in 10.1 is equivalent to WSREP_NNULL() in 10.4. Item_func_rand::seed_random(): Avoid invoking current_thd when WSREP is not enabled.
* | MDEV-21807 : galera.galera_slave_replay MTR failed: WSREP: Unknown parameter ↵Jan Lindström2020-04-221-1/+1
| | | | | | | | | | | | | | 'dbug Test do we have galera debug library with debug_sync functionality needs to be earlier.
* | MDEV-22021: Galera database could get inconsistent with rollback to savepointmkaruza2020-03-312-0/+64
| | | | | | | | | | | | When binlog is disabled, WSREP will not behave correctly when SAVEPOINT ROLLBACK is executed since we don't register handlers for such case. Fixed by registering WSREP handlerton for SAVEPOINT related commands.
* | Add galera debug sync to galera_slave_replay test.Jan Lindström2020-03-111-1/+2
| |
* | MDEV-21723 Async slave thread BF abort and replaying fixes (#1448)seppo2020-02-232-0/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If async replication slave thread conflicts with cluster replication, then the async slave transaction should be BF aborted, and depending on the state of async slave transaction execution, potentially also replayed. There were problems in such BF abort implementation and the replaying was not started. This pull request contains fixes which make sure that if async slave thread is marked to abort and replay, it will complete carry out the rollback and release all locks and resources before starting the replaying. After replaying, async slave transactions is treated as successful, so the slave thread will continue as usual, handling next replication event. There is also new mtr test: galera.galera_slave_replay, which stresses both a certification failure for async slave thread and a successful BF abort followed by replaying.
* | MDEV-21591 : galera.galera_rsu_add_pk MTR failed: Result content mismatchJan Lindström2020-02-171-4/+10
| | | | | | | | Add missing wait condition before we check the end database state.
* | MDEV-21488 : Galera test sporadic failure on galera.galera_var_notify_cmdJan Lindström2020-02-143-17/+11
| | | | | | | | Add wait condition and cleanup.
* | MDEV-21515 : Galera test sporadic failure on ↵Jan Lindström2020-02-133-10/+27
| | | | | | | | | | | | | | galera.galera_wsrep_new_cluster: Result content mismatch Use correct configuration and wait for nodes to reach correct state with wait conditions.
* | MDEV-21421 : Galera test sporadic failure on ↵Jan Lindström2020-02-131-0/+1
| | | | | | | | | | | | | | galera.galera_as_slave_gtid_myisam: Result length mismatch In Galera 3 nodes 2 and 3 are galera nodes and node_1 should be non galera.
* | MDEV-21556 : galera.lp1376747-4 MTR failed: Result length mismatchbb-10.2-MDEV-21446Jan Lindström2020-02-121-9/+8
| | | | | | | | Add proper wait condition instead of sleeps.
* | MDEV-21667 : Galera test failure on MW-336Jan Lindström2020-02-091-14/+54
| | | | | | | | | | | | Problem seems to be the fact that we did not enforce correct applier thread numbers after every command that effects them. Test changes only.
* | MDEV-21601 : Cleanup Galera disabled testsJan Lindström2020-02-0912-900/+0
| | | | | | | | | | | | | | | | * 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.
* | MDEV-21532 : galera.galera_rsu_drop_pk MTR failed: Result content mismatchJan Lindström2020-01-201-10/+18
| | | | | | | | | | Add wait conditions to make sure correct number of rows have been replicated.
* | MDEV-21492 : Galera test sporadic failure on galera.galera_events2Jan Lindström2020-01-161-0/+4
| | | | | | | | Add wait condition for event creation.
* | MDEV-19803 Long semaphore wait error on galera.MW-388Daniele Sciascia2020-01-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The long semaphore wait appeared to be the caused by the following pattern in the MTR test: ``` SET DEBUG_SYNC = "now SIGNAL wsrep_after_certification_continue"; SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb; ``` Raising two signals, one right after another, caused one signal to overwrite the other, before the signal was consumed by the thread. This caused one thread to be stuck until the debug sync point would timeout.
* | MDEV-21189 : Dropping partition with 'wsrep_OSU_method=RSU' and 'SESSION ↵Jan Lindström2019-12-231-8/+1
| | | | | | | | | | | | | | sql_log_bin = 0' cases the galera node to hang Test cleanup. Best practice for using RSU, is to isolate the node up-front, so this test did not reflect real world scenario
* | Fortify galera_partition test.Jan Lindström2019-12-181-0/+4
| |
* | MDEV-21189: Dropping partition with 'wsrep_OSU_method=RSU' and 'SESSION ↵Jan Lindström2019-12-092-0/+471
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql_log_bin = 0' cases the galera node to hang Found two bugs (1) have_committing_connections was missing mutex unlock on one exit case. As this function is called on a loop it caused mutex lock when we already owned the mutex. This could cause hang. (2) wsrep_RSU_begin did set up error code when partition to be dropped could not be MDL-locked because of concurrent operations but wrong error code was propagated to upper layer causing error to be ignored. This could have also caused the hang.
* | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-12-034-0/+151
|\ \ | |/
| * MDEV-19572 async slave node fails to apply MyISAM only writes (#1418)seppo2019-11-262-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem happens when MariaDB master replicates writes for only non InnoDB tables (e.g. writes to MyISAM table(s)). Async slave node, in Galera cluster, can apply these writes successfully, but it will, in the end, write gtid position in mysql.gtid_slave_pos table. mysql.gtid_slave_pos table is InnoDB engine, and this write makes innodb handlerton part of the replicated "transaction". Note that wsrep patch identifies that write to gtid_slave_pos should not be replicated and skips appending wsrep keys for these writes. However, as InnoDB was present in the transaction, and there are replication events (for MyISAM table) in transaction cache, but there are no appended keys, wsrep raises an error, and this makes the söave thread to stop. The fix is simply to not treat it as an error if async slave tries to replicate a write set with binlog events, but no keys. We just skip wsrep replication and return successfully. This commit contains also a mtr test which forces mysql.gtid_slave_pos table isto be of InnoDB engine, and executes MyISAM only write through asyn replication. There is additional fix for declaring IO and background slave threads as non wsrep. These threads should not write anything for wsrep replication, and this is just a safeguard to make sure nothing leaks into cluster from these slave threads.
| * Remove excessive sleep from test.Jan Lindström2019-11-181-1/+1
| |
| * MDEV-18497 CTAS async replication from mariadb master crashes galera nodes ↵seppo2019-11-182-0/+80
| | | | | | | | | | | | | | | | | | | | (#1410) This PR contains a mtr test for reproducing a failure with replicating create table as select statement (CTAS) through asynchronous mariadb replication to mariadb galera cluster. The problem happens when CTAS replication contains both create table statement followed by row events for populating the table. In such situation, the galera node operating as mariadb replication slave, will first replicate only the create table part into the cluster, and then perform another replication containing both the create table and row events. This will lead all other nodes to fail for duplicate table create attempt, and crash due to this failure. PR contains also a fix, which identifies the situation when CTAS has been replicated, and makes further scan in async replication stream to see if there are following row events. The slave node will replicate either single TOI in case the CTAS table is empty, or if CTAS table contains rows, then single bundled write set with create table and row events is replicated to galera cluster. This fix should keep master server's GTID's for CTAS replication in sync with GTID's in galera cluster.
* | MDEV-21198 : Galera test failure on galera_var_notify_cmdJan Lindström2019-12-031-4/+4
| | | | | | | | Add proper wsrep sync wait.
* | MDEV-21182: Galera test failure on MW-284Jan Lindström2019-11-3064-109/+325
| | | | | | | | | | galera_2nodes.cnf did not contain wsrep_on=1 on correct places. Fixed restart options to use correct configuration.
* | Fix #2 for galera.MW-336Jan Lindström2019-09-141-2/+3
| |
* | Try to fix galera.MW-336 test case.Jan Lindström2019-09-131-7/+6
| |
* | MDEV-20561 Galera node shutdown fails in non-Primary (#1386)Teemu Ollakka2019-09-131-0/+36
| | | | | | | | | | | | | | | | | | Command COM_SHUTDOWN was rejected in non-Primary because server_command_flags[COM_SHUTDOWN] had value CF_NO_COM_MULTI instead of CF_SKIP_WSREP_CHECK. As a fix removed assignment server_command_flags[CF_NO_COM_MULTI]= CF_NO_COM_MULTI which overwrote server_command_flags[COM_SHUTDOWN].
* | MDEV-20511: Galera replication of events is not consistentJan Lindström2019-09-091-0/+144
| | | | | | | | | | | | | | | | | | After SST from master node (the one where event is ENABLED) - you will end up with the event enabled on two nodes, hence it's now being executed twice. It can be solved by comparing event's originator with server_id. if not equal, then change its status to 'SLAVESIDE_DISABLED' Changes to be committed: new file: mysql-test/suite/galera/r/galera_events2.result new file: mysql-test/suite/galera/t/galera_events2.test modified: sql/events.cc
* | Move MW-328B to big test to avoid test timeout.Jan Lindström2019-09-091-0/+1
| |
* | MDEV-20485: Galera test failure on galera.galera_var_node_addressJan Lindström2019-09-091-11/+11
| | | | | | | | Test changes only.
* | MDEV-19968: Galera test failure on galera_load_dataJan Lindström2019-08-211-11/+31
| | | | | | | | | | Add wait conditions and compare cardinality etc information between nodes and print something only if they differ.
* | MDEV-20185: Windows: Use of uninitialized value $bpath in string eqJulius Goryavsky2019-08-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The execution of mtr in the Windows environment fails due to the fact that the new code from MDEV-18565 does not take into account the need to add the ".exe" extension to the names of executable files when searching for pre-requisites that are needed to run SST scripts (especially when using mariabackup) and when searching paths to some other Galera utilities. This patch fixes this flaw. Also adding paths to the PATH environment variable is now done with the correct delimiter character.
* | MDEV-20324: Galera threads are not registered to performance schemaJan Lindström2019-08-132-0/+59
| | | | | | | | | | | | | | | | | | Galera threads were not registered to performance schema and used pthread_create when mysql_thread_create should have been used. Added test case to verify current galera performance schema instrumentation does work.
* | MDEV-17847 Galera test failure on MW-328[A|B|C]Jan Lindström2019-08-136-18/+33
| | | | | | | | Test changes only.