summaryrefslogtreecommitdiff
path: root/mysql-test/suite/multi_source
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.10 into 10.11Marko Mäkelä2023-02-162-12/+6
|\
| * MDEV-28839: remove current_pos where not intentionally being testedasklavou2023-02-132-12/+6
| | | | | | | | | | | | | | | | | | | | | | Task: ===== Update tests to reflect MDEV-20122, deprecation of master_use_gtid=current_pos. Change Master (CM) statements were either removed or modified with current_pos --> slave_pos based on original intention of the test. Reviewed by: ============ Brandon Nesterenko <brandon.nesterenko@mariadb.com>
* | Merge branch '10.10' into 10.11Oleksandr Byelkin2022-11-022-0/+13
|\ \ | |/
| * Merge branch '10.9' into 10.10Oleksandr Byelkin2022-11-012-0/+13
| |\
| | * MDEV-27963 multisource_for_channel sometimes fails in bb with result content ↵Monty2022-10-192-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mismatch The problem was that SHOW SLAVE STATUS was exceuted before the slave IO thread had time to create a new relay log Fixed by writing a command on the master and syncing the slave data. This ensures that the slave creates a new relay log.
* | | MDEV-15530: Variable replicate_rewrite_db cannot be found in "show global ↵Anel Husakovic2022-10-218-13/+204
|/ / | | | | | | | | | | | | | | | | | | | | variables" - Add `replicate_rewrite_db` status variable, that may accept comma separated key-value pairs. - Note that option `OPT_REPLICATE_REWRITE_DB` already existed in `mysqld.h` from this commit 23d8586dbfdf Reviewer:Brandon Nesterenko <brandon.nesterenko@mariadb.com>
* | Merge 10.9 into 10.10Marko Mäkelä2022-07-281-0/+1
|\ \ | |/
| * Merge 10.6 into 10.7Marko Mäkelä2022-07-011-0/+1
| |\
| | * Merge 10.5 into 10.6Marko Mäkelä2022-07-011-0/+1
| | |\
| | | * Valgrind: Disable tests that would often time outMarko Mäkelä2022-07-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with 10.5, InnoDB crash recovery tests seem to time out more easily under Valgrind, which emulates multiple threads by interleaving them in a single operating system thread. These tests will still be covered by AddressSanitizer and MemorySanitizer.
* | | | MDEV-20122: Deprecate MASTER_USE_GTID=Current_Pos to favor new ↵Brandon Nesterenko2022-07-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MASTER_DEMOTE_TO_SLAVE option New Feature: ======== This feature adds a safe replacement to the MASTER_USE_GTID=Current_Pos option for CHANGE MASTER TO as MASTER_DEMOTE_TO_SLAVE=<bool>. The use case of Current_Pos is to transition a master to become a slave; however, can break replication state if the slave executes local transactions due to actively updating gtid_current_pos with gtid_binlog_pos and gtid_slave_pos. MASTER_DEMOTE_TO_SLAVE changes this use case by forcing users to set Using_Gtid=Slave_Pos and merging gtid_binlog_pos into gtid_slave_pos once at CHANGE MASTER TO time. Note that if gtid_slave_pos is more recent than gtid_binlog_pos (as in the case of chain replication), the replication state should be preserved. Additionally, deprecate the `Current_Pos` option of MASTER_USE_GTID to suggest the safe alternative option MASTER_DEMOTE_TO_SLAVE=TRUE. Reviewed By: ============ Andrei Elkin <andrei.elkin@mariadb.com>
* | | | MDEV-19801: Change defaults for CHANGE MASTER TO so that GTID-based ↵Brandon Nesterenko2022-07-2614-46/+82
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | replication is used by default if master supports it This commit makes replicas crash-safe by default by changing the Using_Gtid value to be Slave_Pos on a fresh slave start and after RESET SLAVE is issued. If the primary server does not support GTIDs (i.e., version < 10), the replica will fall back to Using_Gtid=No on slave start and after RESET SLAVE. The following additional informational messages/warnings are added: 1. When Using_Gtid is automatically changed. That is, if RESET SLAVE reverts Using_Gtid back to Slave_Pos, or Using_Gtid is inferred to No from a CHANGE MASTER TO given with log coordinates without MASTER_USE_GTID. 2. If options are ignored in CHANGE MASTER TO. If CHANGE MASTER TO is given with log coordinates, yet also specifies MASTER_USE_GTID=Slave_Pos, a warning message is given that the log coordinate options are ignored. Additionally, an MTR macro has been added for RESET SLAVE, reset_slave.inc, which provides modes/options for resetting a slave in log coordinate or gtid modes. When in log coordinates mode, the macro will execute CHANGE MASTER TO MASTER_USE_GTID=No after the RESET SLAVE command. When in GTID mode, an extra parameter, reset_slave_keep_gtid_state, can be set to reset or preserve the value of gtid_slave_pos. Reviewed By: =========== Andrei Elkin <andrei.elkin@mariadb.com>
* | | MDEV-26307 multi-source-replication support mysql syntax(for channel)Monty2021-09-142-0/+795
| | | | | | | | | | | | | | | Author: woqutech Reviewer: monty@mariadb.org
* | | Failed change master could leave around old relay log filesMonty2021-09-142-0/+21
|/ / | | | | | | | | The reason was that there where no cleanup after a failed 'change master'. Fixed by doing a cleanup of created relay log files in remove_master_info()
* | MDEV-24576 Atomic CREATE TABLEMonty2021-05-191-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few different cases to consider Logging of CREATE TABLE and CREATE TABLE ... LIKE - If REPLACE is used and there was an existing table, DDL log the drop of the table. - If discovery of table is to be done - DDL LOG create table else - DDL log create table (with engine type) - create the table - If table was created - Log entry to binary log with xid - Mark DDL log completed Crash recovery: - If query was in binary log do nothing and exit - If discoverted table - Delete the .frm file -else - Drop created table and frm file - If table was dropped, write a DROP TABLE statement in binary log CREATE TABLE ... SELECT required a little more work as when one is using statement logging the query is written to the binary log before commit is done. This was fixed by adding a DROP TABLE to the binary log during crash recovery if the ddl log entry was not closed. In this case the binary log will contain: CREATE TABLE xxx ... SELECT .... DROP TABLE xxx; Other things: - Added debug_crash_here() functionality to Aria to be able to test crash in create table between the creation of the .MAI and the .MAD files.
* | MDEV-23844 Atomic DROP TABLE (single table)Monty2021-05-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logging logic: - Log tables, just before they are dropped, to the ddl log - After the last table for the statement is dropped, log an xid for the whole ddl log event In case of crash: - Remove first any active DROP TABLE events from the ddl log that matches xids found in binary log (this mean the drop was successful and was propery logged). - Loop over all active DROP TABLE events - Ensure that the table is completely dropped - Write a DROP TABLE entry to the binary log with the dropped tables. Other things: - Added code to ha_drop_table() to be able to tell the difference if a get_new_handler() failed because of out-of-memory or because the handler refused/was not able to create a a handler. This was needed to get sequences to work as sequences needs a share object to be passed to get_new_handler() - TC_LOG_BINLOG::recover() was changed to always collect Xid's from the binary log and always call ddl_log_close_binlogged_events(). This was needed to be able to collect DROP TABLE events with embedded Xid's (used by ddl log). - Added a new variable "$grep_script" to binlog filter to be able to find only rows that matches a regexp. - Had to adjust some test that changed because drop statements are a bit larger in the binary log than before (as we have to store the xid) Other things: - MDEV-25588 Atomic DDL: Binlog query event written upon recovery is corrupt fixed (in the original commit).
* | MDEV-16437: merge 5.7 P_S replication instrumentation and tablesSujatha2021-04-163-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | Merge 'replication_applier_status_by_coordinator' table. This table captures SQL_THREAD status in case of both single threaded and multi threaded slave configuration. When multi_source replication is enabled this table will display each source specific SQL_THREAD status. Added new columns for: - LAST_SEEN_TRANSACTION - LAST_TRANS_RETRY_COUNT
* | MDEV-16437: merge 5.7 P_S replication instrumentation and tablesSujatha2021-04-162-14/+421
|/ | | | | | | | | | | | | | | | | | Merge 'replication_connection_configuration' table. Replaced following column: - AUTO_POSITION with USING_GTID Added new columns for: - IGNORE_SERVER_IDS - DO_DOMAIN_IDS - IGNORE_SERVER_IDS Removed following columns as they are not part of mariadb replication connection configuration: - NETWORK_INTERFACE - TLS_VERSION @sql/mysqld.cc Changed "master-retry-count" default value to 100000.
* Merge 10.4 into 10.5Marko Mäkelä2020-08-211-1/+1
|\
| * Merge 10.3 into 10.4Marko Mäkelä2020-08-211-1/+1
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2020-08-211-1/+1
| | |\
| | | * MDEV-23511 shutdown_server 10 times out, causing server kill at shutdownAndrei Elkin2020-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shutdown of mtr tests may be too impatient, esp on CI environment where 10 seconds of `arg` of `shutdown_server arg` may not be enough for the clean shutdown to complete. This is fixed to remove explicit non-zero timeout argument to `shutdown_server` from all mtr tests. mysqltest computes 60 seconds default value for the timeout for the argless `shutdown_server` command. This policy is additionally ensured with a compile time assert.
* | | | perfschema compilation, test and misc fixesSergei Golubchik2020-03-103-12/+12
| | | |
* | | | MDEV-20601: Make REPLICA a synonym for SLAVE in SQL statementsSujatha2020-02-042-0/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: === Add "REPLICA" as an alias for "SLAVE". All commands which use "SLAVE" keyword can be used with new alias "REPLICA". List of commands: On Master: ========= SHOW REPLICA HOSTS <--> SHOW SLAVE HOSTS Privilege "SLAVE" <--> "REPLICA" On Slave: ========= START SLAVE <--> START REPLICA START ALL SLAVES <--> START ALL REPLICAS START SLAVE UNTIL <--> START REPLICA UNTIL STOP SLAVE <--> STOP REPLICA STOP ALL SLAVES <--> STOP ALL REPLICAS RESET SLAVE <--> RESET REPLICA RESET SLAVE ALL <--> RESET REPLICA ALL SLAVE_POS <--> REPLICA_POS
* | | | MDEV-18648: slave_parallel_mode= optimistic default in 10.5Sujatha2019-12-233-13/+13
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description: ============ To change 'CONSERVATIVE' @@global.slave_parallel_mode default to 'OPTIMISTIC' in 10.5. @sql/sys_vars.cc Changed default parallel_mode to 'OPTIMISTIC' @sql/rpl_filter.cc Changed default parallel_mode to 'OPTIMISTIC' @sql/mysqld.cc Removed the initialization of 'SLAVE_PARALLEL_CONSERVATIVE' to 'opt_slave_parallel_mode' variable. @mysql-test/suite/rpl/t/rpl_parallel_mdev6589.test @mysql-test/suite/rpl/t/rpl_mdev6386.test Added 'mtr' suppression to ignore 'ER_PRIOR_COMMIT_FAILED'. In case of 'OPTIMISTIC' mode if a transaction gets killed during "wait_for_prior_commit" it results in above error "1964". Hence suppression needs to be added for this error. @mysql-test/suite/rpl/t/rpl_parallel_conflicts.test Test has a 'slave.opt' which explicitly sets slave_parallel_mode to 'conservative'. When the test ends this mode conflicts with new default mode. Hence check test case reports an error. The 'slave.opt' is removed and options are set and reset within test. @mysql-test/suite/multi_source/info_logs.result @mysql-test/suite/multi_source/reset_slave.result @mysql-test/suite/multi_source/simple.result Result content mismatch in "show slave status" output. This is expected as new slave_parallel_mode='OPTIMISTIC'. @mysql-test/include/check-testcase.test Updated default 'slave_parallel_mode' to 'optimistic'. Refactored rpl_parallel.test into following test cases. Test case 1: @mysql-test/suite/rpl/t/rpl_parallel_domain.test Test case 2: @mysql-test/suite/rpl/t/rpl_parallel_domain_slave_single_grp.test Test case 3: @mysql-test/suite/rpl/t/rpl_parallel_single_grpcmt.test Test case 4: @mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test Test case 5: @mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test Test case 6: @mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test Test case 7: @mysql-test/suite/rpl/t/rpl_parallel_free_deferred_event.test Test case 8: @mysql-test/suite/rpl/t/rpl_parallel_missed_error_handling.test Test case 9: @mysql-test/suite/rpl/t/rpl_parallel_innodb_lock_conflict.test Test case 10: @mysql-test/suite/rpl/t/rpl_parallel_gtid_slave_pos_update_fail.test Test case 11: @mysql-test/suite/rpl/t/rpl_parallel_wrong_exec_master_pos.test Test case 12: @mysql-test/suite/rpl/t/rpl_parallel_partial_binlog_trans.test Test case 13: @mysql-test/suite/rpl/t/rpl_parallel_ignore_error_on_rotate.test Test case 14: @mysql-test/suite/rpl/t/rpl_parallel_wrong_binlog_order.test Test case 15: @mysql-test/suite/rpl/t/rpl_parallel_incorrect_relay_pos.test Test case 16: @mysql-test/suite/rpl/t/rpl_parallel_retry_deadlock.test Test case 17: @mysql-test/suite/rpl/t/rpl_parallel_deadlock_corrupt_binlog.test Test case 18: @mysql-test/suite/rpl/t/rpl_parallel_mode.test Test case 19: @mysql-test/suite/rpl/t/rpl_parallel_analyze_table_hang.test Test case 20: @mysql-test/suite/rpl/t/rpl_parallel_record_gtid_wakeup.test Test case 21: @mysql-test/suite/rpl/t/rpl_parallel_stop_on_con_kill.test Test case 22: @mysql-test/suite/rpl/t/rpl_parallel_rollback_assert.test
* | | Merge commit '43882e764d6867c6855b1ff057758a3f08b25c55' into 10.4Alexander Barkov2019-08-132-1/+2
|\ \ \ | |/ /
| * | MDEV-20101 Assertion failure on select @@global.'m2'.replicate_ignore_table;Alexander Barkov2019-08-051-1/+0
| | | | | | | | | | | | | | | - Removing the wrong assert - Re-enabling multi_source.mdev-8874
| * | MDEV-17544 No warning when trying to name a primary key constraint.Alexey Botchkov2019-07-301-0/+2
| | | | | | | | | | | | Warning added.
* | | Merge 10.3 into 10.4Marko Mäkelä2019-07-254-0/+293
|\ \ \ | |/ /
| * | Disable a test due to MDEV-20101Marko Mäkelä2019-07-191-0/+1
| | |
| * | Merge 10.2 into 10.3Eugene Kosov2019-07-163-0/+292
| |\ \ | | |/
| | * post-merge fixesEugene Kosov2019-07-091-0/+12
| | | | | | | | | | | | rebuild galera.galera_as_slave_gtid and multi_source.mdev-8874
| | * Merge 10.1 into 10.2Eugene Kosov2019-07-093-0/+280
| | |\
| | | * MDEV-8874 Replication filters configured in my.cnf are ignored if slave ↵Sachin2019-06-273-0/+280
| | | | | | | | | | | | | | | | | | | | | | | | reset and reconfigured Don't delete the rpl_filter on RESET SLAVE.
* | | | MDEV-16421 Make system tables crash safeMichael Widenius2018-08-142-8/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make all system tables in mysql directory of type engine=Aria Privilege tables are using transactional=1 Statistical tables are using transactional=0, to allow them to be quickly updated with low overhead. Help tables are also using transactional=0 as these are only updated at init time. Other changes: - Aria store engine is now a required engine - Update comment for Aria tables to reflect their new usage - Fixed that _ma_reset_trn_for_table() removes unlocked table from transaction table list. This was needed to allow one to lock and unlock system tables separately from other tables, for example when reading a procedure from mysql.proc - Don't give a warning when using transactional=1 for engines that is using transactions. This is both logical and also to avoid warnings/errors when doing an alter of a privilege table to InnoDB. - Don't abort on warnings from ALTER TABLE for changes that would be accepted by CREATE TABLE. - New created Aria transactional tables are marked as not movable (as they include create_rename_lsn). - bootstrap.test was changed to kill orignal server, as one can't anymore have two servers started at same time on same data directory and data files. - Disable maria.small_blocksize as one can't anymore change aria block size after system tables are created. - Speed up creation of help tables by using lock tables. - wsrep_sst_resync now also copies Aria redo logs.
* | | Mdev-10664 Add statuses about optimistic parallel replication stallsSachin Setiya2018-04-198-23/+240
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In this commit we are adding three more status variable to SHOW SLAVE STATUS. Slave_DDL_Events and Slave_Non_Transactional_Events. Slave_DDL_Groups:- This status variable counts the occurrence of DDL statements Slave_Non_Transactional_Groups:- This variable count the occurrence of non-transnational event group. Slave_Transactional_Groups:- This variable count the occurrence of transnational event group. Patch Credit:- Kristian Nielsen
* | | Move mysql-test-run/extra/rpl_tests to suite/rpl/includeMichael Widenius2018-03-291-1/+1
| | | | | | | | | | | | | | | Renamed suite/rpl/include/rpl_sync.inc to rpl_sync_test.inc to remove clash with include/rpl_sync.inc
* | | MDEV-12179: Per-engine mysql.gtid_slave_pos tableKristian Nielsen2017-07-034-0/+338
|\ \ \ | |/ / |/| | | | | Merge into MariaDB 10.3.
| * | MDEV-12179: Per-engine mysql.gtid_slave_pos tableKristian Nielsen2017-05-112-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intermediate commit. Update multi_source.gtid_ignore_duplicates test to avoid a sporadic failure following MDEV-12179 functionality. The test case manually messes with the mysql.gtid_slave_pos table. Make sure to clean up that at the end of the test, and suppress the messages from the server about these changes.
| * | MDEV-12179: Per-engine mysql.gtid_slave_pos tableKristian Nielsen2017-05-102-5/+36
| | | | | | | | | | | | | | | | | | | | | Intermediate commit. Fix a couple races in test multi_source.gtid_slave_pos which caused occasional failures.
| * | MDEV-12179: Per-engine mysql.gtid_slave_pos tableKristian Nielsen2017-04-212-0/+297
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Intermediate commit. This commit implements that record_gtid() selects a gtid_slave_posXXX table with a storage engine already in use by current transaction, if any. The default table mysql.gtid_slave_pos is used if no match can be found on storage engine, or for GTID position updates with no specific storage engine. Table discovery of mysql.gtid_slave_pos* happens on initial GTID state load as well as on every START SLAVE. Some effort is made to make this possible without additional locking. New tables are added using lock-free atomics. Removing tables requires stopping all slaves first. A warning is given in the error log when a table is removed but a non-stopped slave still has a reference to it. If multiple mysql.gtid_slave_posXXX tables with same storage engine exist, one is chosen arbitrarily to be used, with a warning in the error log. GTID data from all tables is still read, but only one among redundant tables with same storage engine will be updated.
* | | MDEV-9544 Fix test case for 10.2Sachin Setiya2017-06-101-0/+12
| | |
* | | Merge 10.1 into 10.2Marko Mäkelä2017-06-083-0/+216
|\ \ \ | |/ / |/| / | |/ Replace have_innodb_zip.inc with innodb_page_size_small.inc.
| * MDEV-9544 FLUSH [RELAY] LOGS does not rotate logs for a named slaveSachin Setiya2017-06-053-0/+216
| | | | | | | | | | | | | | | | | | | | Problem:- In the case of multisource replication/named slave when we run "FLUSH LOGS" , it does not flush logs. Solution:- A new function Master_info_index->flush_all_relay_logs() is created which will rotate relay logs for all named slave. This will be called in reload_acl_and_cache function when connection_name.length == 0
* | Merge branch '10.1' into 10.2Sergei Golubchik2016-12-2912-353/+28
|\ \ | |/
| * MDEV-9038 Binlog encryption testsElena Stepanova2016-12-0512-353/+28
| | | | | | | | | | | | | | - created binlog_encryption test suite and added it to the default list - moved some tests from rpl, binlog and multisource suites to extra so that they could be re-used in different suites - made minor changes in include files
* | MDEV-7145: Delayed replicationKristian Nielsen2016-10-164-23/+26
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge feature into 10.2 from feature branch. Delayed replication adds an option CHANGE MASTER TO master_delay=<seconds> Replication will then delay applying events with that many seconds. This creates a replication slave that reflects the state of the master some time in the past. Feature is ported from MySQL source tree. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
| * | MDEV-7145: Delayed replication, fixing test failures.Kristian Nielsen2016-10-144-23/+26
| |/ | | | | | | | | | | | | Two merge error fixed, and testsuite updated to removed some other test failues. Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
* | MDEV-8429: Change binlog_checksum default to match MySQL 5.6.6+Oleksandr Byelkin2016-05-204-15/+15
| |
* | MDEV-6720 - enable connection log in mysqltest by defaultSergey Vojtovich2016-03-3111-0/+188
|/