summaryrefslogtreecommitdiff
path: root/mysql-test/extra/rpl_tests
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-20953: binlog_encryption.rpl_corruption failed in buildbot due to wrong ↵Sujatha2019-11-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error code Problem: ======== CURRENT_TEST: binlog_encryption.rpl_corruption mysqltest: In included file "./include/wait_for_slave_io_error.inc": ... At line 72: Slave stopped with wrong error code **** Slave stopped with wrong error code: 1743 (expected 1595,1913) **** Analysis: ======== The test emulates the corruption at the various stages of replication for example in binlog file, in network and in relay log etc. It verifies that all corruption cases are handled through appropriate error messages. The test cases which emulate network failure expect following errors. --ER_SLAVE_RELAY_LOG_WRITE_FAILURE (1595) --ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE (1743) Ideally test should expect error codes as 1595 and 1743. But the test actually waits on incorrect error code 1595,1913 Fix: === Added appropriate error code for 'ER_NETWORK_READ_EVENT_CHECKSUM_FAILURE'. Replaced 1913 with 1743.
* MDEV-20091 DROP TEMPORARY table is logged despite no CREATE was loggedSujatha2019-07-251-0/+4
| | | | | | | | | | | | | | | | | | | | MDEV-5589 commit set up a policy to skip DROP TEMPORARY TABLE binary logging in case the target table has not been "CREATEed" in binlog (no CREATE Query-log-event was logged into the binary log). It turns out that 1. the rule did not cover non-existing table DROPped with IF-EXISTS clause. The logged-create knowledge for the non-existing one does not even need MDEV-5589 patch, and 2. connection close disobeys it to trigger automatic DROP-IF-EXISTS binlogging. Either 1 or 2 or even both is/are also responsible for unexpected binlog records observed in MDEV-17863, actually rendering a referred @@global.read_only irrelevant as far as the described stored procedure definition *and* the ROW binlog-format are concerned.
* MDEV-11094: Blackhole table updates on slave fail when row annotation is enabledSujatha2019-05-292-1/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= rpl_blackhole.test fails when executed with following options mysqld=--binlog_annotate_row_events=1, mysqld=--replicate_annotate_row_events=1 Test output: ------------ worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 16000..16019 rpl.rpl_blackhole_bug 'mix' [ pass ] 791 rpl.rpl_blackhole_bug 'row' [ fail ] Replicate_Wild_Ignore_Table Last_Errno 1032 Last_Error Could not execute Update_rows_v1 event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_END_OF_FILE; the event's master log master-bin.000001, end_log_pos 1510 Analysis: ========= Enabling "replicate_annotate_row_events" on slave, Tells the slave to write annotate rows events received from the master to its own binary log. The received annotate events are applied after the Gtid event as shown below. thd->query() will be set to the actual query received from the master, through annotate event. Annotate_rows event should not be deleted after the event is applied as the thd->query will be used to generate new Annotate_rows event during applying the subsequent Rows events. After the last Rows event has been applied, the saved Annotate_rows event (if any) will be deleted. In balckhole engine all the DML operations are noops as they donot store any data. They simply return success without doing any operation. But the existing strictly expects thd->query() to be 'NULL' to identify that row based replication is in use. This assumption will fail when row annotations are enabled as the query is not 'NULL'. Hence various row based operations like 'update', 'delete', 'index lookup' will fail when row annotations are enabled. Fix: === Extend the row based replication check to include row annotations as well. i.e Either the thd->query() is NULL or thd->query() points to query and row annotations are in use.
* Merge branch '10.0' into 10.1Sergei Golubchik2018-10-301-0/+141
|\
| * Merge branch '5.5' into 10.0Sergei Golubchik2018-10-271-0/+141
| |\
| | * MDEV-15919 lower_case_table_names does not behave as expected(nor...Sachin2018-10-171-0/+141
| | | | | | | | | | | | | | | | | | | | | consistently) on Replication Slave lower_case_table_names 0 -> 1 replication works, it's safe as long as mixed case names mapping to the lower case ones is one-to-one
| | * MDEV-6528 review debian patches for mysqlSergei Golubchik2014-10-022-4/+4
| | | | | | | | | | | | and apply whatever was reasonable
| | * Fixed failing test caseMichael Widenius2014-02-111-0/+1
| | |
* | | Merge branch '11.0' into 10.1Oleksandr Byelkin2018-09-061-60/+0
|\ \ \ | |/ /
| * | cleanup: remove extra/rpl_tests/rpl_foreign_key.testSergei Golubchik2018-09-041-62/+0
| | |
* | | Merge branch '10.0' into 10.1Sergei Golubchik2018-05-081-337/+89
|\ \ \ | |/ /
| * | de-obfuscate rpl_*_implicit_commit_binlog testSergei Golubchik2018-05-081-619/+89
| | |
* | | MDEV-10688 rpl.rpl_row_log_innodb failed in buildbotMonty2017-12-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that Binlog_checkpoint can happen at random times. Fixed by not write binlog_checkpoint for the rpl_log test. Other things: - Removed not used variable "$keep_gtid_events" - Added option for show_binlog_events to skip binlog_checkpoint
* | | Merge branch '10.0' into 10.1Sergei Golubchik2017-09-219-9/+10
|\ \ \ | |/ /
| * | include/master-slave.inc must always be included lastSergei Golubchik2017-09-201-1/+1
| | |
* | | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-01-161-1/+1
|\ \ \ | |/ /
* | | Merge branch '10.0' into 10.1Sergei Golubchik2016-12-111-2/+2
|\ \ \ | |/ /
* | | MDEV-11491 binlog_encryption.rpl_checksum fails sporadically in buildbotElena Stepanova2016-12-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | The race condition happened if mark_xid_done was considerably delayed, and an extra Binlog_checkpoint event was written into the binary log which was later indicated in an error message. Fixed by ensuring that the event is written before the binary log is rotated to the one which is used in the output.
* | | fix binlog_encryption.binlog_incident testSergei Golubchik2016-12-061-10/+1
| | |
* | | MDEV-9038 Binlog encryption testsElena Stepanova2016-12-0525-0/+7611
| | | | | | | | | | | | | | | | | | | | | - 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-8502 DECIMAL accepts out of range DEFAULT valuesAlexander Barkov2016-06-271-2/+2
| | | | | | | | | | | | MDEV-10277 Redundant NOTE when inserting '0.00001 ' into a DECIMAL(2,1) column
* | | Merge branch '10.0' into 10.1Sergei Golubchik2016-03-211-1/+1
|\ \ \ | |/ /
| * | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-041-1/+1
| | |
* | | Merge branch '10.0' into 10.1Sergei Golubchik2016-01-251-1/+7
|\ \ \ | |/ /
| * | Fixed bug in semi_sync replication tests.Monty2016-01-031-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was that wait_for_slave_io_to_start reported that the io thread was ready, when it was still initializing. This caused test suite to continue too early, for example before the semi sync plugin was properly enabled. Fixed by introducing a new internal stage: "Preparing". Slave_IO_Running is now set to "Yes" only when all initializing is done and the IO thread is ready to read things from the master. The only test affected by this change is rpl_flsh_tbls, which got stuck in the preparing phase while trying to read the GTID position from a table. Fixed by having this test waiting for Preparing instead of Yes.
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-12-213-24/+4
|\ \ \ | |/ /
| * | after-merge fix replication testsSergei Golubchik2015-12-153-24/+4
| | | | | | | | | | | | | | | * mostly update result files * also updating test/include files to match 5.6
* | | Don't write DROP TEMPORARY TABLE to binary logMonty2015-10-051-3/+3
| | | | | | | | | | | | | | | | | | | | | if we didn't write the CREATE TEMPORARY TABLE statement. - Enable old code from one of my older changesets that didn't make into 10.0 - Fix test cased that failed as they expected DROP TEMPORARY TABLE in the log.
* | | MDEV-3929 Add system variable explicit_defaults_for_timestamp for ↵Alexander Barkov2015-09-221-1/+2
| | | | | | | | | | | | compatibility with MySQL
* | | MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be ↵Oleksandr Byelkin2015-09-041-0/+4
| | | | | | | | | | | | stopped with no-zero size)
* | | [MDEV-6877] Added basic tests for binlog_row_image using minimal and noblob ↵Vicențiu Ciorbaru2015-06-301-0/+241
| | | | | | | | | | | | values
* | | [MDEV-6877] Added tests for binlog_row_image using noblobs switchVicențiu Ciorbaru2015-06-301-0/+179
| | |
* | | Merge branch '10.0' into 10.1Kristian Nielsen2015-04-291-0/+29
|\ \ \ | |/ /
| * | MDEV-7864: Slave SQL: stopping on non-last RBR event with annotations ↵Kristian Nielsen2015-04-281-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | results in SEGV (signal 11) The slave SQL thread was clearing serial_rgi->thd before deleting serial_rgi, which could cause access to NULL THD. The clearing was introduced in commit 2e100cc5a493b6a0f6f907e0483a734c7fee2087 and is just plain wrong. So revert that part (single line) of that commit. Thanks to Daniel Black for bug analysis and test case.
* | | Merge branch '10.0' into bb-10.1-mergeSergei Golubchik2014-12-023-1/+78
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .bzrignore VERSION cmake/plugin.cmake debian/dist/Debian/control debian/dist/Ubuntu/control mysql-test/r/join_outer.result mysql-test/r/join_outer_jcl6.result mysql-test/r/null.result mysql-test/r/old-mode.result mysql-test/r/union.result mysql-test/t/join_outer.test mysql-test/t/null.test mysql-test/t/old-mode.test mysql-test/t/union.test packaging/rpm-oel/mysql.spec.in scripts/mysql_config.sh sql/ha_ndbcluster.cc sql/ha_ndbcluster_binlog.cc sql/ha_ndbcluster_cond.cc sql/item_cmpfunc.h sql/lock.cc sql/sql_select.cc sql/sql_show.cc sql/sql_update.cc sql/sql_yacc.yy storage/innobase/buf/buf0flu.cc storage/innobase/fil/fil0fil.cc storage/innobase/include/srv0srv.h storage/innobase/lock/lock0lock.cc storage/tokudb/CMakeLists.txt storage/xtradb/buf/buf0flu.cc storage/xtradb/fil/fil0fil.cc storage/xtradb/include/srv0srv.h storage/xtradb/lock/lock0lock.cc support-files/mysql.spec.sh
| * | BUG#13627921 - MISSING FLAGS IN SQL_COMMAND_FLAGS MAY LEAD TO REPLICATION ↵Sergei Golubchik2014-09-303-1/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEMS merge from MySQL-5.6, revision: revno: 3677.2.1 committer: Alfranio Correia <alfranio.correia@oracle.com> timestamp: Tue 2012-02-28 16:26:37 +0000 message: BUG#13627921 - MISSING FLAGS IN SQL_COMMAND_FLAGS MAY LEAD TO REPLICATION PROBLEMS Flags in sql_command_flags[command] are not correctly set for the following commands: . SQLCOM_SET_OPTION is missing CF_CAN_GENERATE_ROW_EVENTS; . SQLCOM_BINLOG_BASE64_EVENT is missing CF_CAN_GENERATE_ROW_EVENTS; . SQLCOM_REVOKE_ALL is missing CF_CHANGES_DATA; . SQLCOM_CREATE_FUNCTION is missing CF_AUTO_COMMIT_TRANS; This may lead to a wrong sequence of events in the binary log. To fix the problem, we correctly set the flags in sql_command_flags[command].
* | | Merge 10.0.14 into 10.1Sergei Golubchik2014-10-151-24/+12
|\ \ \ | |/ /
| * | sanitySergei Golubchik2014-08-101-24/+12
| | | | | | | | | | | | | | | mysql-test/mysql-test-run.pl: fix the message
* | | MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)Sergei Golubchik2014-10-1117-1102/+8
|/ / | | | | | | | | | | | | | | | | | | remove: * NDB from everywhere * IM from mtr-v1 * packaging/rpm-oel and packaging/rpm-uln * few unused spec files * plug.in file * .bzrignore
* | MDEV-6153 Trivial Lintian errors in MariaDB sources: spelling errors and ↵Sergei Golubchik2014-05-132-4/+4
| | | | | | | | wrong executable bits
* | merge with 10.0-montySergei Golubchik2014-02-062-1/+10
|\ \
| * \ Automatic mergeMichael Widenius2014-02-052-1/+10
| |\ \
| | * | Replication changes for CREATE OR REPLACE TABLEMichael Widenius2014-02-051-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CREATE TABLE is by default executed on the slave as CREATE OR REPLACE - DROP TABLE is by default executed on the slave as DROP TABLE IF NOT EXISTS This means that a slave will by default continue even if we try to create a table that existed on the slave (the table will be deleted and re-created) or if we try to drop a table that didn't exist on the slave. This should be safe as instead of having the slave stop because of an inconsistency between master and slave, it will fix the inconsistency. Those that would prefer to get a stopped slave instead for the above cases can set slave_ddl_exec_mode to STRICT. - Ensure that a CREATE OR REPLACE TABLE which dropped a table is replicated - DROP TABLE that generated an error on master is handled as an identical DROP TABLE on the slave (IF NOT EXISTS is not added in this case) - Added slave_ddl_exec_mode variable to decide how DDL's are replicated New logic for handling BEGIN GTID ... COMMIT from the binary log: - When we find a BEGIN GTID, we start a transaction and set OPTION_GTID_BEGIN - When we find COMMIT, we reset OPTION_GTID_BEGIN and execute the normal COMMIT code. - While OPTION_GTID_BEGIN is set: - We don't generate implict commits before or after statements - All tables are regarded as transactional tables in the binary log (to ensure things are executed exactly as on the master) - We reset OPTION_GTID_BEGIN also on rollback This will help ensuring that we don't get any sporadic commits (and thus new GTID's) on the slave and will help keep the GTID's between master and slave in sync. mysql-test/extra/rpl_tests/rpl_log.test: Added testing of mode slave_ddl_exec_mode=STRICT mysql-test/r/mysqld--help.result: New help messages mysql-test/suite/rpl/r/create_or_replace_mix.result: Testing of CREATE OR REPLACE TABLE with replication mysql-test/suite/rpl/r/create_or_replace_row.result: Testing of CREATE OR REPLACE TABLE with replication mysql-test/suite/rpl/r/create_or_replace_statement.result: Testing replication of create or replace mysql-test/suite/rpl/r/rpl_gtid_startpos.result: Test must be run in slave_ddl_exec_mode=STRICT as part of the test depends on that DROP TABLE should fail on slave. mysql-test/suite/rpl/r/rpl_row_log.result: Updated result mysql-test/suite/rpl/r/rpl_row_log_innodb.result: Updated result mysql-test/suite/rpl/r/rpl_row_show_relaylog_events.result: Updated result mysql-test/suite/rpl/r/rpl_stm_log.result: Updated result mysql-test/suite/rpl/r/rpl_stm_mix_show_relaylog_events.result: Updated result mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result: Updated result mysql-test/suite/rpl/t/create_or_replace.inc: Testing of CREATE OR REPLACE TABLE with replication mysql-test/suite/rpl/t/create_or_replace_mix.cnf: Testing of CREATE OR REPLACE TABLE with replication mysql-test/suite/rpl/t/create_or_replace_mix.test: Testing of CREATE OR REPLACE TABLE with replication mysql-test/suite/rpl/t/create_or_replace_row.cnf: Testing of CREATE OR REPLACE TABLE with replication mysql-test/suite/rpl/t/create_or_replace_row.test: Testing of CREATE OR REPLACE TABLE with replication mysql-test/suite/rpl/t/create_or_replace_statement.cnf: Testing of CREATE OR REPLACE TABLE with replication mysql-test/suite/rpl/t/create_or_replace_statement.test: Testing of CREATE OR REPLACE TABLE with replication mysql-test/suite/rpl/t/rpl_gtid_startpos.test: Test must be run in slave_ddl_exec_mode=STRICT as part of the test depends on that DROP TABLE should fail on slave. mysql-test/suite/rpl/t/rpl_stm_log.test: Removed some lines mysql-test/suite/sys_vars/r/slave_ddl_exec_mode_basic.result: Testing of slave_ddl_exec_mode mysql-test/suite/sys_vars/t/slave_ddl_exec_mode_basic.test: Testing of slave_ddl_exec_mode sql/handler.cc: Regard all tables as transactional in commit if OPTION_GTID_BEGIN is set. This is to ensure that statments are not commited too early if non transactional tables are used. sql/log.cc: Regard all tables as transactional in commit if OPTION_GTID_BEGIN is set. Also treat 'direct' log events as transactional (to get them logged as they where on the master) sql/log_event.cc: Ensure that the new error from DROP TABLE when trying to drop a view is treated same as the old one. Store error code that slave expects in THD. Set OPTION_GTID_BEGIN if we find a BEGIN. Reset OPTION_GTID_BEGIN if we find a COMMIT. sql/mysqld.cc: Added slave_ddl_exec_mode_options sql/mysqld.h: Added slave_ddl_exec_mode_options sql/rpl_gtid.cc: Reset OPTION_GTID_BEGIN if we record a gtid (safety) sql/sql_class.cc: Regard all tables as transactional in commit if OPTION_GTID_BEGIN is set. sql/sql_class.h: Added to THD: log_current_statement and slave_expected_error sql/sql_insert.cc: Ensure that CREATE OR REPLACE is logged if table was deleted. Don't do implicit commit for CREATE if we are under OPTION_GTID_BEGIN sql/sql_parse.cc: Change CREATE TABLE -> CREATE OR REPLACE TABLE for slaves Change DROP TABLE -> DROP TABLE IF EXISTS for slaves CREATE TABLE doesn't force implicit commit in case of OPTION_GTID_BEGIN Don't do commits before or after any statement if OPTION_GTID_BEGIN was set. sql/sql_priv.h: Added OPTION_GTID_BEGIN sql/sql_show.cc: Enhanced store_create_info() to also be able to handle CREATE OR REPLACE sql/sql_show.h: Updated prototype sql/sql_table.cc: Ensure that CREATE OR REPLACE is logged if table was deleted. sql/sys_vars.cc: Added slave_ddl_exec_mode sql/transaction.cc: Added warning if we got a GTID under OPTION_GTID_BEGIN
| | * | Fixed compiler warningsMichael Widenius2014-01-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Made stopping of slave more robust Fixed tokudb test cases that gave different results between runs Speed up some slow tokudb tests by adding begin ... commit mysql-test/extra/rpl_tests/rpl_stop_slave.test: Ensure that slaves are properly synced before they are stopped. (Otherwise some tests results will be different between runs) storage/innobase/buf/buf0buf.cc: Fixed compiler warning storage/tokudb/mysql-test/tokudb/r/cluster_filter_unpack_varchar_and_int_hidden.result: Test case could be solved with index or range scan. storage/tokudb/mysql-test/tokudb/t/cluster_filter_unpack_varchar_and_int_hidden.test: Test case could be solved with index or range scan. storage/tokudb/mysql-test/tokudb_bugs/r/5733_innodb.result: Speed up test by adding begin...commit storage/tokudb/mysql-test/tokudb_bugs/r/5733_tokudb.result: Speed up test by adding begin...commit storage/tokudb/mysql-test/tokudb_bugs/t/5733_innodb.test: Speed up test by adding begin...commit storage/tokudb/mysql-test/tokudb_bugs/t/5733_tokudb.test: Speed up test by adding begin...commit storage/tokudb/mysql-test/tokudb_mariadb/r/compression.result: Added drop table (safety) storage/tokudb/mysql-test/tokudb_mariadb/t/compression.test: Added drop table (safety)
* | | | fix tests to cleanup after themselvesSergei Golubchik2014-02-061-0/+1
|/ / /
* | | 10.0-base mergeSergei Golubchik2014-02-033-4/+11
|\ \ \ | |/ / |/| |
| * | 5.5 mergeSergei Golubchik2014-02-013-4/+11
| |\ \ | | |/
| | * MySQL-5.5.35 mergeSergei Golubchik2014-01-223-4/+11
| | |\
| | | * BUG#16580366- MTR TESTS FAILING SPORADICALLY ON PB2 (5.5, 5.6 AND 5.7)Shivji Kumar Jha2013-09-273-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DURING INNODB RECOVERY Problem: ======= The connection 'master' is dropped by mysqltest after rpl_end.inc. At this point, dropping temporary tables at the connection 'master' are not synced at slave. So, the temporary tables replicated from master remain on slave leading to an inconsistent close of the test. The following test thus complains about the presence of temporary table(s) left over from the previous test. Fix: === - Put explicit drop commands in replication tests so that the temporary tables are dropped at slave as well. - Added the check for Slave_open_temp_tables in mtr_check.sql to warn about the remaining temporary table, if any, at the close of a test.
* | | | Merge 10.0-base -> 10.0unknown2013-05-037-20/+20
|\ \ \ \ | |/ / /