summaryrefslogtreecommitdiff
path: root/mysql-test/suite/binlog
Commit message (Collapse)AuthorAgeFilesLines
* never add new error messages to old GA releases!Sergei Golubchik2017-11-192-6/+6
| | | | this fixes aae4932775d
* MDEV-12012/MDEV-11969 Can't remove GTIDs for a stale GTID Domain IDAndrei Elkin2017-11-154-0/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported in MDEV-11969 "there's no way to ditch knowledge" about some domain that is no longer updated on a server. Besides being of annoyance to clutter output in DBA console stale domains can prevent the slave to connect the master as MDEV-12012 witnesses. What domain is obsolete must be evaluated by the user (DBA) according to whether the domain info is still relevant and will the domain ever receive any update. This patch introduces a method to discard obsolete gtid domains from the server binlog state. The removal requires no event group from such domain present in existing binlog files though. If there are any the containing logs must be first PURGEd in order for FLUSH BINARY LOGS DELETE_DOMAIN_ID=(list-of-domains) succeed. Otherwise the command returns an error. The list of obsolete domains can be computed through intersecting two sets - the earliest (first) binlog's Gtid_list and the current value of @@global.gtid_binlog_state - and extracting the domain id components from the intersection list items. The new DELETE_DOMAIN_ID featured FLUSH continues to rotate binlog omitting the deleted domains from the active binlog file's Gtid_list. Notice though when the command is ineffective - that none of requested to delete domain exists in the binlog state - rotation does not occur. Obsolete domain deletion is not harmful for connected slaves as long as master side binlog files *purge* is synchronized with FLUSH-DELETE_DOMAIN_ID. The slaves must have the last event from purged files processed as usual, in order not to bump later into requesting a gtid from a file which was already gone. While the command is not replicated (as ordinary FLUSH BINLOG LOGS is) slaves, even though having extra domains, won't suffer from reconnection errors thanks to master-slave gtid connection protocol allowing the master to be ignorant about a gtid domain. Should at failover such slave to be promoted into master role it may run the ex-master's FLUSH BINARY LOGS DELETE_DOMAIN_ID=(list-of-domains) to clean its own binlog state. NOTES. suite/perfschema/r/start_server_low_digest.result is re-recorded as consequence of internal parser codes changes.
* Merge branch '10.0' into 10.1Sergei Golubchik2017-08-082-22/+22
|\
| * MDEV-12436: binlog.binlog_unsafe - assumed len(hostname) <= 50 (#385)Daniel Black2017-07-152-22/+22
| | | | | | | | | | Increased size in tests to allow for 100 character hostname. Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
| * MDEV-4774: Fix test caseNirbhay Choubey2017-01-302-46/+51
| |
* | MDEV-13248 binlog.binlog_parallel_replication_marks_row fails in buildbotElena Stepanova2017-07-062-6/+0
| | | | | | | | | | | | | | The test did not handle correctly possible difference in system timezone. The fix is to remove non-functional setting of local time_zone and instead allow timestamp replacement to work with any date/time
* | MDEV-8075: DROP TEMPORARY TABLE not marked as ddl, causing optimistic ↵Kristian Nielsen2017-07-034-0/+199
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parallel replication to fail CREATE/DROP TEMPORARY TABLE are not safe to optimistically replicate in parallel with other transactions, so they need to be marked as "ddl" in the binlog. This was already done for stand-alone CREATE/DROP TEMPORARY. But temporary tables can also be created and dropped inside a BEGIN...END transaction, and such transactions were not marked as ddl. Nor was the DROP TEMPORARY TABLE statement emitted implicitly when a client connection is closed. So this patch adds such ddl mark for the missing cases. The difference to Kristian's original patch is mainly a fix in mysql_trans_commit_alter_copy_data() to remember the unsafe_rollback_flags over the temporary commit.
* | MDEV-12612 mysqladmin --local flush... to use FLUSH LOCALSergei Golubchik2017-05-242-0/+24
| | | | | | | | | | | | | | | | Make `mysqladmin --local` use `FLUSH LOCAL` for all flush-* commands, and only do `SET SQL_LOG_BIN=OFF` for create/drop/old_password/password. Additionally, --local is ignored for all commands that never write to binlog, so e.g. `mysqladmin --local version` no longer needs SUPER
* | Mdev-4774- Fix tests casesSachin Setiya2017-01-312-46/+51
| |
* | Merge 10.0 into 10.1Marko Mäkelä2017-01-263-0/+54
|\ \ | |/
| * MDEV-4774 Strangeness with max_binlog_stmt_cache_size SettingsSachin Setiya2017-01-203-0/+54
| | | | | | | | | | | | | | | | | | | | Problem:- When setting max_binlog_stmt_cache_size=18446744073709547520 from either command line or .cnf file, server fails to start. Solution:- Added one more function eval_num_suffix_ull , which uses strtoull to get unsigned ulonglong from string. And getopt_ull calls this function instead of eval_num_suffix. Also changed previous eval_num_suffix to eval_num_suffix_ll to remain consistent.
* | Merge branch '10.0' into 10.1Sergei Golubchik2016-12-111-3/+3
|\ \ | |/
| * Merge branch '5.5' into 10.0Sergei Golubchik2016-12-092-6/+6
| |\
| | * typo fixed: s/MSYQL/MYSQL/Sergei Golubchik2016-12-032-6/+6
| | |
* | | fix binlog_encryption.binlog_incident testSergei Golubchik2016-12-061-1/+0
| | |
* | | MDEV-9038 Binlog encryption testsElena Stepanova2016-12-057-925/+7
| | | | | | | | | | | | | | | | | | | | | - 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
* | | Merge branch '10.0' into 10.1Sergei Golubchik2016-08-252-0/+151
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2016-08-102-0/+149
| |\ \ | | |/
| | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-08-032-0/+149
| | |\ | | | | | | | | | | | | without a fix for Bug#12818255 (MDEV-6581)
| | | * Bug#12818255: READ-ONLY OPTION DOES NOT ALLOWSujatha Sivakumar2016-05-042-0/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | INSERTS/UPDATES ON TEMPORARY TABLES Bug#14294223: CHANGES NOT ALLOWED TO TEMPORARY TABLES ON READ-ONLY SERVERS Problem: ======== Running 5.5.14 in read only we can create temporary tables but can not insert or update records in the table. When we try we get Error 1290 : The MySQL server is running with the --read-only option so it cannot execute this statement. Analysis: ========= This bug is very specific to binlog being enabled and binlog-format being stmt/mixed. Standalone server without binlog enabled or with row based binlog-mode works fine. How standalone server and row based replication work: ===================================================== Standalone server and row based replication mark the transactions as read_write only when they are modifying non temporary tables as part of their current transaction. Because of this when code enters commit phase it checks if a transaction is read_write or not. If the transaction is read_write and global read only mode is enabled those transaction will fail with 'server is read only mode' error. In the case of statement based mode at the time of writing to binary log a binlog handler is created and it is always marked as read_write. In case of temporary tables even though the engine did not mark the transaction as read_write but the new transaction that is started by binlog handler is considered as read_write. Hence in this case when code enters commit phase it finds one handler which has a read_write transaction even when we are modifying temporary table. This causes the server to throw an error when global read-only mode is enabled. Fix: ==== At the time of commit in "ha_commit_trans" if a read_write transaction is found, we should check if this transaction is coming from a handler other than binlog_handler. This will ensure that there is a genuine read_write transaction being sent by the engine apart from binlog_handler and only then it should be blocked.
| | * | MDEV-8859 rpl.rpl_mdev382 sporadically fails to finish due to disappeared ↵Elena Stepanova2016-06-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | expect file The combination of --remove_file and --write_file on .expect file creates a race condition which can be hit by MTR which reads the file in a loop. Instead, .expect file should be changed with --append_file. It was fixed in 10.x, but in 5.5 the sporadic failure still affected buildbot. Fixed 3 test files which use the problematic combination
* | | | skip debug_sync test in release buildsSergei Golubchik2016-05-051-0/+1
| | | |
* | | | MDEV-717 LP:1003679 - Wrong binlog order on concurrent DROP schema andAlexey Botchkov2016-05-052-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | CREATE function. Test case added.
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-05-041-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into 10.0Sergei Golubchik2016-04-261-1/+1
| |\ \ \ | | |/ /
| | * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-04-201-1/+1
| | |\ \ | | | |/
| | | * BUG#20574550 MAIN.MERGE TEST CASE FAILS IF BINLOG_FORMAT=ROWVenkatesh Duggirala2016-02-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main.merge test case was failing when tested using row based binlog format. While analyzing the issue it was found the following issues: a) The server is calling binlog related code even when a statement will not be binlogged; b) The child table list was not present into table structure by the time to generate the create table statement; c) The tables in the child table list will not be opened yet when generating table create info using row based replication; d) CREATE TABLE LIKE TEMP_TABLE does not preserve original table storage engine when using row based replication; This patch addressed all above issues. @ sql/sql_class.h Added a function to determine if the binary log is disabled to the current session. This is related with issue (a) above. @ sql/sql_table.cc Added code to skip binary logging related code if the statement will not be binlogged. This is related with issue (a) above. Added code to add the children to the query list of the table that will have its CREATE TABLE generated. This is related with issue (b) above. Added code to force the storage engine to be generated into the CREATE TABLE. This is related with issue (d) above. @ storage/myisammrg/ha_myisammrg.cc Added a test to skip a table getting info about a child table if the child table is not opened. This is related to issue (c) above.
* | | | Ugly test removed for now.Alexey Botchkov2016-03-242-137/+0
| | | |
* | | | MDEV-717 LP:1003679 - Wrong binlog order on concurrent DROP schema and ↵Alexey Botchkov2016-03-232-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CREATE function. The cause of the issue is when DROP DATABASE takes metadata lock and is in progress through it's execution, a concurrently running CREATE FUNCTION checks for the existence of database which it succeeds and then it waits on the metadata lock. Once DROP DATABASE writes to BINLOG and finally releases the metadata lock on schema object, the CREATE FUNCTION waiting on metadata lock gets in it's code path and succeeds and writes to binlog.
* | | | MDEV-8426 mysqlbinlog: "Corrupted replication event was detected.Monty2015-11-106-909/+909
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not printing the value" with binlog-row-image=minimal" Merged Rows_log_event::print_verbose_one_row() and log_event_print_value() with MySQL 5.7 Added flush after writing of Table_map_log_event() to fix wrong order of lines in output. This causes a lot of changes in some test results.
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2015-10-123-75/+75
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into 10.0Sergei Golubchik2015-10-093-75/+75
| |\ \ \ | | |/ /
| | * | MDEV-8473: mysqlbinlog -v does not properly decode DECIMAL values in an RBR logOleksandr Byelkin2015-09-073-75/+75
| | | | | | | | | | | | | | | | Backport of upstream patch. revno: 5696
* | | | Don't write DROP TEMPORARY TABLE to binary logMonty2015-10-055-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-224-7/+7
| | | | | | | | | | | | | | | | compatibility with MySQL
* | | | MDEV-8466 CAST works differently for DECIMAL/INT vs DOUBLE for empty stringsAlexander Barkov2015-09-172-2/+16
| | | | | | | | | | | | | | | | MDEV-8468 CAST and INSERT work differently for DECIMAL/INT vs DOUBLE for a string with trailing spaces
* | | | MDEV-6066: Merge new defaults from 5.6 and 5.7 (defaults changed, QC can be ↵Oleksandr Byelkin2015-09-0412-6/+14
| | | | | | | | | | | | | | | | stopped with no-zero size)
* | | | Merge branch '10.0' into 10.1Sergei Golubchik2015-09-032-3/+3
|\ \ \ \ | |/ / / | | | | | | | | | | | | referenced_by_foreign_key2(), needed for InnoDB to compile, was taken from 10.0-galera
| * | | Merge commit '96badb16afcf' into 10.0Jan Lindström2015-08-032-3/+3
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: client/mysql_upgrade.c mysql-test/r/func_misc.result mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result mysql-test/suite/innodb/r/innodb-fk.result mysql-test/t/subselect_sj_mat.test sql/item.cc sql/item_func.cc sql/log.cc sql/log_event.cc sql/rpl_utility.cc sql/slave.cc sql/sql_class.cc sql/sql_class.h sql/sql_select.cc storage/innobase/dict/dict0crea.c storage/innobase/dict/dict0dict.c storage/innobase/handler/ha_innodb.cc storage/xtradb/dict/dict0crea.c storage/xtradb/dict/dict0dict.c storage/xtradb/handler/ha_innodb.cc vio/viosslfactories.c
| | * | MDEV-4017 - GET_LOCK() with negative timeouts has strange behaviorSergey Vojtovich2015-07-292-3/+3
| | | | | | | | | | | | | | | | | | | | GET_LOCK() silently accepted negative values and NULL for timeout. Fixed GET_LOCK() to issue a warning and return NULL in such cases.
* | | | Ensure that fields declared with NOT NULL doesn't have DEFAULT values if not ↵Monty2015-08-182-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified and if not timestamp or auto_increment In original code, sometimes one got an automatic DEFAULT value in some cases, in other cases not. For example: create table t1 (a int primary key) - No default create table t2 (a int, primary key(a)) - DEFAULT 0 create table t1 SELECT .... - Default for all fields, even if they where defined as NOT NULL ALTER TABLE ... MODIFY could sometimes add an unexpected DEFAULT value. The patch is quite big because we had some many test cases that used CREATE ... SELECT or CREATE ... (...PRIMARY KEY(xxx)) which doesn't have an automatic DEFAULT anymore. Other things: - Removed warnings from InnoDB when waiting from semaphore (got this when testing things with --big)
* | | | Merge tag 'mariadb-10.0.20' into 10.1Sergei Golubchik2015-06-272-1/+80
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into 10.0Sergei Golubchik2015-06-112-1/+80
| |\ \ \ | | |/ /
| | * | MDEV-7269 mysqlbinlog Don't know how to handle column type=0 meta=0 (0000)#Alexander Barkov2015-06-042-1/+77
| | | | | | | | | | | | | | | | MDEV-8267 Add /*old*/ comment into I_S.COLUMN_TYPE for old DECIMAL
| | * | CRLF->LFSergei Golubchik2015-06-021-2/+2
| | | |
* | | | MDEV-7110 : Add missing MySQL variable log_bin_basename and log_bin_indexNirbhay Choubey2015-06-0912-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add log_bin_index, log_bin_basename and relay_log_basename system variables. Also, convert relay_log_index system variable to NO_CMD_LINE and implement --relay-log-index as a command line option.
* | | | Merge tag 'mariadb-10.0.19' into 10.1Sergei Golubchik2015-06-012-0/+25
|\ \ \ \ | |/ / /
| * | | Merge branch '5.5' into 10.0Sergei Golubchik2015-05-042-0/+25
| |\ \ \ | | |/ /
| | * | MDEV-7938 MariaDB Crashes Suddenly while writing binlogsSergei Golubchik2015-04-272-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | on disconnect THD must clean user_var_events array before dropping temporary tables. Otherwise when binlogging a DROP, it'll access user_var_events, but they were allocated in the already freed memroot.
| * | | MDEV-7802: group commit status variable additionKristian Nielsen2015-04-292-0/+204
| | | | | | | | | | | | | | | | Backport into 10.0