Commit 9c1f2f9d authored by Georgi Kodinov's avatar Georgi Kodinov

merged mysql-5.5->mysql-5.5-security

parents ace88ca2 99a8398f
......@@ -369,7 +369,8 @@ int main(int argc,char *argv[])
/* Return 0 if all commands are PING */
for (; argc > 0; argv++, argc--)
{
if (find_type(argv[0], &command_typelib, 2) != ADMIN_PING)
if (find_type(argv[0], &command_typelib, FIND_TYPE_BASIC) !=
ADMIN_PING)
{
error= 1;
break;
......@@ -592,7 +593,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
for (; argc > 0 ; argv++,argc--)
{
switch (find_type(argv[0],&command_typelib,2)) {
switch (find_type(argv[0],&command_typelib, FIND_TYPE_BASIC)) {
case ADMIN_CREATE:
{
char buff[FN_REFLEN+20];
......@@ -931,7 +932,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
if (typed_password[0])
{
bool old= (find_type(argv[0], &command_typelib, 2) ==
bool old= (find_type(argv[0], &command_typelib, FIND_TYPE_BASIC) ==
ADMIN_OLD_PASSWORD);
#ifdef __WIN__
size_t pw_len= strlen(typed_password);
......
/* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -4650,7 +4650,7 @@ static ulong find_set(TYPELIB *lib, const char *x, uint length,
for (; pos != end && *pos != ','; pos++) ;
var_len= (uint) (pos - start);
strmake(buff, start, min(sizeof(buff) - 1, var_len));
find= find_type(buff, lib, var_len);
find= find_type(buff, lib, FIND_TYPE_BASIC);
if (!find)
{
*err_pos= (char*) start;
......
......@@ -8017,7 +8017,7 @@ void get_command_type(struct st_command* command)
save= command->query[command->first_word_len];
command->query[command->first_word_len]= 0;
type= find_type(command->query, &command_typelib, 1+2);
type= find_type(command->query, &command_typelib, FIND_TYPE_NO_PREFIX);
command->query[command->first_word_len]= save;
if (type > 0)
{
......
......@@ -17,7 +17,7 @@
# Global constants, only to be changed between major releases.
#
SET(SHARED_LIB_MAJOR_VERSION "16")
SET(SHARED_LIB_MAJOR_VERSION "18")
SET(PROTOCOL_VERSION "10")
SET(DOT_FRM_VERSION "6")
......
......@@ -308,7 +308,7 @@ SSL::SSL(SSL_CTX* ctx)
SetError(YasslError(err));
return;
}
else if (serverSide) {
else if (serverSide && !(ctx->GetCiphers().setSuites_)) {
// remove RSA or DSA suites depending on cert key type
ProtocolVersion pv = secure_.get_connection().version_;
......
......@@ -227,7 +227,7 @@ typedef struct st_typelib {
extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
extern int find_type_or_exit(const char *x, TYPELIB *typelib,
const char *option);
extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name);
extern int find_type(const char *x, const TYPELIB *typelib, unsigned int flags);
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
......
/* Copyright (C) 2000 MySQL AB
/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -29,7 +29,17 @@ typedef struct st_typelib { /* Different types saved here */
extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
extern int find_type_or_exit(const char *x, TYPELIB *typelib,
const char *option);
extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name);
#define FIND_TYPE_BASIC 0
/** makes @c find_type() require the whole name, no prefix */
#define FIND_TYPE_NO_PREFIX (1 << 0)
/** always implicitely on, so unused, but old code may pass it */
#define FIND_TYPE_NO_OVERWRITE (1 << 1)
/** makes @c find_type() accept a number */
#define FIND_TYPE_ALLOW_NUMBER (1 << 2)
/** makes @c find_type() treat ',' as terminator */
#define FIND_TYPE_COMMA_TERM (1 << 3)
extern int find_type(const char *x, const TYPELIB *typelib, unsigned int flags);
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
......
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --report-features
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=row --vardir=var-row --mysqld=--binlog-format=row
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --mysqld=--binlog-format=row --ps-protocol
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --ps-protocol
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_funcs1 --vardir=var-ps_funcs_1 --suite=funcs_1 --ps-protocol
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=funcs2 --vardir=var-funcs2 --suite=funcs_2
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=partitions --vardir=var-parts --suite=parts
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=stress --vardir=var-stress --suite=stress
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=jp --vardir=var-jp --suite=jp
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist --vardir=var-nist --suite=nist
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --report-features --skip-test-list=collections/disabled-daily.list --unit-tests
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=row --vardir=var-row --mysqld=--binlog-format=row --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_row --vardir=var-ps_row --mysqld=--binlog-format=row --ps-protocol --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=embedded --vardir=var-embedded --embedded --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --ps-protocol --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=funcs_1 --vardir=var-funcs_1 --suite=funcs_1 --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=ps_funcs1 --vardir=var-ps_funcs_1 --suite=funcs_1 --ps-protocol --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=funcs2 --vardir=var-funcs2 --suite=funcs_2 --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=partitions --vardir=var-parts --suite=parts --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=stress --vardir=var-stress --suite=stress --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=jp --vardir=var-jp --suite=jp --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist --vardir=var-nist --suite=nist --skip-test-list=collections/disabled-daily.list
perl mysql-test-run.pl --force --timer --debug-server --parallel=auto --experimental=collections/default.experimental --comment=nist+ps --vardir=var-ps_nist --suite=nist --ps-protocol
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
perl mysql-test-run.pl --timer --force --parallel=auto --comment=n_mix --vardir=var-n_mix --mysqld=--binlog-format=mixed --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list --unit-tests
perl mysql-test-run.pl --timer --force --parallel=auto --comment=ps_row --vardir=var-ps_row --ps-protocol --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
perl mysql-test-run.pl --timer --force --parallel=auto --comment=embedded --vardir=var-emebbed --embedded --experimental=collections/default.experimental --skip-ndb
perl mysql-test-run.pl --timer --force --parallel=auto --comment=rpl_binlog_row --vardir=var-rpl_binlog_row --suite=rpl,binlog --mysqld=--binlog-format=row --experimental=collections/default.experimental --skip-ndb --skip-test-list=collections/disabled-per-push.list
......
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_2_innodb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb funcs_1.myisam_views-big
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=row
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=mixed
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=big-tests --experimental=collections/default.experimental --vardir=var-big-tests --big-test --testcase-timeout=60 --suite-timeout=600 main.alter_table-big main.archive-big main.count_distinct3 main.create-big main.events_stress main.events_time_zone main.information_schema-big main.log_tables-big main.merge-big main.mysqlbinlog_row_big main.read_many_rows_innodb main.ssl-big main.sum_distinct-big main.type_newdecimal-big main.variables-big parts.part_supported_sql_func_innodb parts.partition_alter1_1_2_innodb parts.partition_alter1_2_innodb parts.partition_alter2_1_1_innodb parts.partition_alter2_1_2_innodb parts.partition_alter2_2_2_innodb parts.partition_alter4_innodb funcs_1.myisam_views-big --skip-test-list=collections/disabled-weekly.list
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --skip-test-list=collections/disabled-weekly.list
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-weekly.list
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-myisam-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-myisam-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=myisam --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-weekly.list
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-stmt-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --skip-test-list=collections/disabled-weekly.list
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-row-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-row-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=row --skip-test-list=collections/disabled-weekly.list
perl mysql-test-run.pl --timer --force --debug-server --parallel=auto --comment=eits-rpl-binlog-mixed-tests-innodb-engine --experimental=collections/default.experimental --vardir=var-binlog-mixed-eits-tests-innodb-engine --suite=engines/iuds,engines/funcs --suite-timeout=500 --max-test-fail=0 --retry-failure=0 --mysqld=--default-storage-engine=innodb --mysqld=--innodb --do-test=rpl --mysqld=--binlog-format=mixed --skip-test-list=collections/disabled-weekly.list
......@@ -345,6 +345,7 @@ SHOW SESSION VARIABLES LIKE "%_checks";
--echo # INSERT INTO t1 VALUES(2)
--echo # foreign_key_checks=1 and unique_checks=1
--echo # It should not change current session's variables, even error happens
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
--error 1062
BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
......
......@@ -30,3 +30,30 @@ drop table tt1, t1;
source include/show_binlog_events.inc;
FLUSH STATUS;
--echo #
--echo # Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT
--echo # BASED REPLICATION
--echo #
--disable_warnings
DROP DATABASE IF EXISTS db1;
DROP TABLE IF EXISTS t3;
--enable_warnings
CREATE DATABASE db1;
CREATE TABLE db1.t1 (a INT);
CREATE TABLE db1.t2 (b INT, KEY(b)) engine=innodb;
CREATE TABLE t3 (a INT, KEY (a), FOREIGN KEY(a) REFERENCES db1.t2(b))
engine=innodb;
RESET MASTER;
--error ER_ROW_IS_REFERENCED
DROP DATABASE db1; # Fails because of the fk
SHOW TABLES FROM db1; # t1 was dropped, t2 remains
--source include/show_binlog_events.inc # Check that the binlog drops t1
# Cleanup
DROP TABLE t3;
DROP DATABASE db1;
......@@ -382,6 +382,7 @@ source include/start_slave.inc;
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
connection master;
TRUNCATE t1;
......
......@@ -97,6 +97,7 @@ if (`SELECT @@global.binlog_format != 'ROW' OR @@global.slave_exec_mode = 'STRIC
--disable_query_log
--eval SELECT "$err" as 'Last_SQL_Error (expected "duplicate key" error)'
--enable_query_log
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
SELECT * FROM t1;
......@@ -142,6 +143,7 @@ connection slave;
# replication continues.
if (`SELECT @@global.binlog_format = 'ROW' AND @@global.slave_exec_mode = 'STRICT'`) {
--echo ---- Wait until slave stops with an error ----
call mtr.add_suppression("Slave SQL.*Can.t find record in .t1., Error_code: 1032");
let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND
source include/wait_for_slave_sql_error.inc;
......
......@@ -121,6 +121,13 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
#connection slave;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677");
sync_slave_with_master;
--echo
--echo * Select count and 20 rows from Slave *
......
......@@ -14,6 +14,7 @@
#################################################
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: 1677");
--echo **** Diff Table Def Start ****
......@@ -769,6 +770,10 @@ RESET MASTER;
connection slave;
START SLAVE;
call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051");
call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: 1060");
call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535");
--echo *** Master Data Insert ***
connection master;
set @b1 = 'b1b1b1b1';
......
......@@ -69,6 +69,8 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
save_master_pos;
connection slave;
# 1062 = ER_DUP_ENTRY
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
--let $slave_sql_errno= 1062
--source include/wait_for_slave_sql_error_and_skip.inc
......
......@@ -382,6 +382,9 @@ source include/diff_tables.inc;
connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677");
--let $rpl_only_running_threads= 1
--source include/rpl_reset.inc
......
......@@ -147,6 +147,8 @@ sync_slave_with_master;
connection master;
INSERT INTO t4 VALUES (4);
connection slave;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* Error_code: 1677");
--let $slave_skip_counter= 2
--let $slave_sql_errno= 1677
--let $show_slave_sql_error= 1
......
......@@ -25,6 +25,7 @@ drop table t1;
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* Error_code: 0");
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
--echo Error: "$error" (expected different error codes on master and slave)
......
......@@ -23,6 +23,8 @@ insert into tm set a=null; # to simulate killed status on the slave
commit;
connection slave;
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
call mtr.add_suppression("Slave SQL.*The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed.");
# slave will catch the killed status but won't shut down immediately
# only after the whole group has done (commit)
......
......@@ -125,7 +125,6 @@ INSERT INTO global_suppressions VALUES
("Slave: The incident LOST_EVENTS occured on the master"),
("Slave: Unknown error.* 1105"),
("Slave: Can't drop database.* database doesn't exist"),
("Slave SQL:.*(Error_code: \[\[:digit:\]\]+|Query:.*)"),
("Sort aborted"),
("Time-out in NDB"),
("Warning:\s+One can only use the --user.*root"),
......
......@@ -81,7 +81,7 @@ while (`$_query`)
sleep 0.1;
let $_show_status_value= query_get_value("SHOW $status_type STATUS LIKE '$status_var'", Value, 1);
let $_query= SELECT NOT('$_show_status_value' $_status_var_comparsion '$status_var_value');
if ($is_number)
if ($_is_number)
{
let $_query= SELECT NOT($_show_status_value $_status_var_comparsion $status_var_value);
}
......
......@@ -28,8 +28,6 @@ use My::Platform;
use base qw(Exporter);
our @EXPORT= qw(my_find_bin my_find_dir my_find_file NOT_REQUIRED);
our $vs_config_dir;
my $bin_extension= ".exe" if IS_WINDOWS;
# Helper function to be used for fourth parameter to find functions
......@@ -158,7 +156,8 @@ sub my_find_paths {
# User can select to look in a special build dir
# which is a subdirectory of any of the paths
my @extra_dirs;
my $build_dir= $vs_config_dir || $ENV{MTR_VS_CONFIG} || $ENV{MTR_BUILD_DIR};
my $build_dir= $::opt_config_dir || $ENV{MTR_VS_CONFIG}
|| $ENV{MTR_BUILD_DIR};
push(@extra_dirs, $build_dir) if defined $build_dir;
if (defined $extension){
......
......@@ -32,6 +32,7 @@ our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line
use mtr_match;
use My::Platform;
use POSIX qw[ _exit ];
use IO::Handle qw[ flush ];
require "mtr_io.pl";
my $tot_real_time= 0;
......@@ -72,7 +73,7 @@ sub _mtr_report_test_name ($) {
print _name(). _timestamp();
printf "%-40s ", $tname;
my $worker = $tinfo->{worker};
printf "w$worker " if $worker;
print "w$worker " if defined $worker;
return $tname;
}
......@@ -487,6 +488,7 @@ sub mtr_warning (@) {
# Print error to screen and then exit
sub mtr_error (@) {
IO::Handle::flush(\*STDOUT) if IS_WINDOWS;
print STDERR _name(). _timestamp().
"mysql-test-run: *** ERROR: ". join(" ", @_). "\n";
if (IS_WINDOWS)
......
......@@ -194,6 +194,10 @@ my $opt_debug_common;
our $opt_debug_server;
our @opt_cases; # The test cases names in argv
our $opt_embedded_server;
# -1 indicates use default, override with env.var.
my $opt_ctest= env_or_val(MTR_UNIT_TESTS => -1);
# Unit test report stored here for delayed printing
my $ctest_report;
# Options used when connecting to an already running server
my %opts_extern;
......@@ -493,6 +497,10 @@ sub main {
mtr_error("Not all tests completed");
}
mark_time_used('init');
push @$completed, run_ctest() if $opt_ctest;
mtr_print_line();
if ( $opt_gcov ) {
......@@ -500,6 +508,11 @@ sub main {
$opt_gcov_msg, $opt_gcov_err);
}
if ($ctest_report) {
print "$ctest_report\n";
mtr_print_line();
}
print_total_times($opt_parallel) if $opt_report_times;
mtr_report_stats("Completed", $completed);
......@@ -1055,6 +1068,7 @@ sub command_line_setup {
'max-connections=i' => \$opt_max_connections,
'default-myisam!' => \&collect_option,
'report-times' => \$opt_report_times,
'unit-tests!' => \$opt_ctest,
'help|h' => \$opt_usage,
# list-options is internal, not listed in help
......@@ -1484,6 +1498,14 @@ sub command_line_setup {
if $opt_suites || @opt_cases;
}
# --------------------------------------------------------------------------
# Don't run ctest if tests or suites named
# --------------------------------------------------------------------------
$opt_ctest= 0 if $opt_ctest == -1 && ($opt_suites || @opt_cases);
# Override: disable if running in the PB test environment
$opt_ctest= 0 if $opt_ctest == -1 && defined $ENV{PB2WORKDIR};
# --------------------------------------------------------------------------
# Check use of wait-all
# --------------------------------------------------------------------------
......@@ -5648,6 +5670,78 @@ sub valgrind_exit_reports() {
return $found_err;
}
sub run_ctest() {
my $olddir= getcwd();
chdir ($bindir) or die ("Could not chdir to $bindir");
my $tinfo;
my $no_ctest= (IS_WINDOWS) ? 256 : -1;
my $ctest_vs= "";
# Just ignore if not configured/built to run ctest
if (! -f "CTestTestfile.cmake") {
chdir($olddir);
return;
}
# Add vs-config option if needed
$ctest_vs= "-C $opt_vs_config" if $opt_vs_config;
# Also silently ignore if we don't have ctest and didn't insist
# Special override: also ignore in Pushbuild, some platforms may not have it
# Now, run ctest and collect output
my $ctest_out= `ctest $ctest_vs 2>&1`;
if ($? == $no_ctest && $opt_ctest == -1 && ! defined $ENV{PB2WORKDIR}) {
chdir($olddir);
return;
}
# Create minimalistic "test" for the reporting
$tinfo = My::Test->new
(
name => 'unit_tests',
);
# Set dummy worker id to align report with normal tests
$tinfo->{worker} = 0 if $opt_parallel > 1;
my $ctfail= 0; # Did ctest fail?
if ($?) {
$ctfail= 1;
$tinfo->{result}= 'MTR_RES_FAILED';
$tinfo->{comment}= "ctest failed with exit code $?, see result below";
$ctest_out= "" unless $ctest_out;
}
my $ctfile= "$opt_vardir/ctest.log";
my $ctres= 0; # Did ctest produce report summary?
open (CTEST, " > $ctfile") or die ("Could not open output file $ctfile");
# Put ctest output in log file, while analyzing results
for (split ('\n', $ctest_out)) {
print CTEST "$_\n";
if (/tests passed/) {
$ctres= 1;
$ctest_report .= "\nUnit tests: $_\n";
}
if ( /FAILED/ or /\(Failed\)/ ) {
$ctfail= 1;
$ctest_report .= " $_\n";
}
}
close CTEST;
# Set needed 'attributes' for test reporting
$tinfo->{comment}.= "\nctest did not pruduce report summary" if ! $ctres;
$tinfo->{result}= ($ctres && !$ctfail)
? 'MTR_RES_PASSED' : 'MTR_RES_FAILED';
$ctest_report .= "Report from unit tests in $ctfile";
$tinfo->{failures}= ($tinfo->{result} eq 'MTR_RES_FAILED');
mark_time_used('test');
mtr_report_test($tinfo);
chdir($olddir);
return $tinfo;
}
#
# Usage
#
......@@ -5866,6 +5960,9 @@ Misc options
engine to InnoDB.
report-times Report how much time has been spent on different
phases of test execution.
nounit-tests Do not run unit tests. Normally run if configured
and if not running named tests/suites
unit-tests Run unit tests even if they would otherwise not be run
Some options that control enabling a feature for normal test runs,
can be turned off by prepending 'no' to the option, e.g. --notimer.
......
......@@ -10,6 +10,9 @@ UNINSTALL PLUGIN archive;
INSTALL PLUGIN archive SONAME 'ha_archive.so';
CREATE TABLE t1(a int) ENGINE=ARCHIVE;
DROP TABLE t1;
SELECT 1;
1
1
UNINSTALL PLUGIN archive;
UNINSTALL PLUGIN archive;
ERROR 42000: PLUGIN archive does not exist
......@@ -10,6 +10,9 @@ UNINSTALL PLUGIN blackhole;
INSTALL PLUGIN blackhole SONAME 'ha_blackhole.so';
CREATE TABLE t1(a int) ENGINE=BLACKHOLE;
DROP TABLE t1;
SELECT 1;
1
1
UNINSTALL PLUGIN blackhole;
UNINSTALL PLUGIN blackhole;
ERROR 42000: PLUGIN blackhole does not exist
......@@ -431,6 +431,7 @@ Success: Was able to run 'execute stmt1' under FTWRL.
Success: Was able to run 'execute stmt1' with FTWRL active in another connection.
Success: Was able to run FTWRL while 'execute stmt1' was active in another connection.
deallocate prepare stmt1;
call mtr.add_suppression("Slave SQL.*Can.t execute the query because you have a conflicting read lock., Error_code: 1223");
#
# 9.2.b) EXECUTE for statement which is incompatible with FTWRL
# should be also incompatible.
......
......@@ -123,3 +123,16 @@ CREATE TABLE t2 SELECT 1 FROM t1, t1 t3 GROUP BY t3.a PROCEDURE ANALYSE();
ERROR HY000: Incorrect usage of PROCEDURE and non-SELECT
DROP TABLE t1;
End of 5.0 tests
#
# Bug#11765202: Dbug_violation_helper::~Dbug_violation_helper(): Assertion `!_entered' failed.
#
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE t1 (a VARCHAR(2) CHARSET UTF8 NOT NULL);
INSERT INTO t1 VALUES ('e'),('e'),('e-');
SELECT * FROM t1 PROCEDURE ANALYSE();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
test.t1.a e e- 1 2 0 0 1.3333 NULL ENUM('e','e-') NOT NULL
DROP TABLE t1;
End of 5.1 tests
......@@ -1376,3 +1376,15 @@ NULL 1 NULL
SET storage_engine=NULL;
ERROR 42000: Variable 'storage_engine' can't be set to the value of 'NULL'
#
# Bug #59686 crash in String::copy() with time data type
#
SELECT min(timestampadd(month, 1>'', from_days('%Z')));
min(timestampadd(month, 1>'', from_days('%Z')))
NULL
Warnings:
Warning 1292 Truncated incorrect INTEGER value: '%Z'
create table t1(a time);
insert into t1 values ('00:00:00'),('00:01:00');
select 1 from t1 where 1 < some (select cast(a as datetime) from t1);
1
drop table t1;
......@@ -309,6 +309,10 @@ The following options may be given as the first argument:
max_join_size records return an error
--max-length-for-sort-data=#
Max number of bytes in sorted records
--max-long-data-size=#
The maximum BLOB length to send to server from
mysql_send_long_data API. Deprecated option; use
max_allowed_packet instead.
--max-prepared-stmt-count=#
Maximum number of prepared statements in the server
--max-relay-log-size=#
......@@ -830,6 +834,7 @@ max-error-count 64
max-heap-table-size 16777216
max-join-size 18446744073709551615
max-length-for-sort-data 1024
max-long-data-size 1048576
max-prepared-stmt-count 16382
max-relay-log-size 0
max-seeks-for-key 18446744073709551615
......
......@@ -308,6 +308,10 @@ The following options may be given as the first argument:
max_join_size records return an error
--max-length-for-sort-data=#
Max number of bytes in sorted records
--max-long-data-size=#
The maximum BLOB length to send to server from
mysql_send_long_data API. Deprecated option; use
max_allowed_packet instead.
--max-prepared-stmt-count=#
Maximum number of prepared statements in the server
--max-relay-log-size=#
......@@ -833,6 +837,7 @@ max-error-count 64
max-heap-table-size 16777216
max-join-size 18446744073709551615
max-length-for-sort-data 1024
max-long-data-size 1048576
max-prepared-stmt-count 16382
max-relay-log-size 0
max-seeks-for-key 18446744073709551615
......
......@@ -4629,3 +4629,35 @@ DROP DATABASE `test-database`;
#
# End of 5.1 tests
#
#
# Verify that two modes can be given in --compatible;
# and are reflected in SET SQL_MODE in the mysqldump output.
# Also verify that a prefix of the mode's name is enough.
#
CREATE TABLE t1 (a INT);
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP TABLE IF EXISTS `t1`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
);
/*!40101 SET character_set_client = @saved_cs_client */;
LOCK TABLES `t1` WRITE;
/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
DROP TABLE t1;
drop table if exists t1, t2;
#
# Bug#59297: Can't find record in 'tablename' on update inner join
#
CREATE TABLE t1 (
a char(2) NOT NULL,
b char(2) NOT NULL,
c int(10) unsigned NOT NULL,
d varchar(255) DEFAULT NULL,
e varchar(1000) DEFAULT NULL,
PRIMARY KEY (a, b, c),
KEY (a),
KEY (a, b)
)
/*!50100 PARTITION BY KEY (a)
PARTITIONS 20 */;
INSERT INTO t1 (a, b, c, d, e) VALUES
('07', '03', 343, '1', '07_03_343'),
('01', '04', 343, '2', '01_04_343'),
('01', '06', 343, '3', '01_06_343'),
('01', '07', 343, '4', '01_07_343'),
('01', '08', 343, '5', '01_08_343'),
('01', '09', 343, '6', '01_09_343'),
('03', '03', 343, '7', '03_03_343'),
('03', '06', 343, '8', '03_06_343'),
('03', '07', 343, '9', '03_07_343'),
('04', '03', 343, '10', '04_03_343'),
('04', '06', 343, '11', '04_06_343'),
('05', '03', 343, '12', '05_03_343'),
('11', '03', 343, '13', '11_03_343'),
('11', '04', 343, '14', '11_04_343')
;
UPDATE t1 AS A,
(SELECT '03' AS a, '06' AS b, 343 AS c, 'last' AS d) AS B
SET A.e = B.d
WHERE A.a = '03'
AND A.b = '06'
AND A.c = 343;
DROP TABLE t1;
#
# Bug#57778: failed primary key add to partitioned innodb table
# inconsistent and crashes
#
......
......@@ -7470,4 +7470,34 @@ ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function
DROP TABLE t1,t2;
DROP VIEW v1;
DROP PROCEDURE proc;
# --
# -- Bug 11765684 - 58674: SP-cache does not detect changes in
# -- pre-locking list caused by triggers
# ---
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
DROP PROCEDURE IF EXISTS p1;
CREATE TABLE t1(a INT);
CREATE TABLE t2(a INT);
CREATE TABLE t3(a INT);
CREATE PROCEDURE p1()
INSERT INTO t1(a) VALUES (1);
CREATE TRIGGER t1_ai AFTER INSERT ON t1
FOR EACH ROW
INSERT INTO t2(a) VALUES (new.a);
CALL p1();
CREATE TRIGGER t1_bi BEFORE INSERT ON t1
FOR EACH ROW
INSERT INTO t3(a) VALUES (new.a);
CALL p1();
DROP TABLE t1, t2, t3;
DROP PROCEDURE p1;
# End of 5.5 test
#
# BUG#11760210 - SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS LIKE 'SSL_CIPHER_LIST'"
#
SHOW STATUS LIKE 'Ssl_cipher';
Variable_name Value
Ssl_cipher AES128-SHA
SHOW STATUS LIKE 'Ssl_cipher_list';
Variable_name Value
Ssl_cipher_list AES128-SHA
......@@ -245,3 +245,12 @@ x
NULL
drop procedure p1;
drop tables t1,t2,t3;
#
# Bug#60085 crash in Item::save_in_field() with time data type
#
CREATE TABLE t1(a date, b int, unique(b), unique(a), key(b)) engine=innodb;
INSERT INTO t1 VALUES ('2011-05-13', 0);
SELECT * FROM t1 WHERE b < (SELECT CAST(a as date) FROM t1 GROUP BY a);
a b
2011-05-13 0
DROP TABLE t1;
......@@ -120,7 +120,7 @@ user CREATE TABLE `user` (
`max_updates` int(11) unsigned NOT NULL DEFAULT '0',
`max_connections` int(11) unsigned NOT NULL DEFAULT '0',
`max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
`plugin` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
`plugin` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
`authentication_string` text COLLATE utf8_bin NOT NULL,
PRIMARY KEY (`Host`,`User`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges'
......
......@@ -821,7 +821,6 @@ drop trigger t1_bi;
create trigger t1_bi after insert on t1 for each row insert into t3 values (new.id);
execute stmt1;
call p1();
ERROR 42S02: Table 'test.t3' doesn't exist
deallocate prepare stmt1;
drop procedure p1;
drop table t1, t2, t3;
......
......@@ -303,10 +303,10 @@ CREATE TABLE t1(a DATE, b YEAR, KEY(a));
INSERT INTO t1 VALUES ('2011-01-01',2011);
SELECT b = (SELECT CONVERT(a, DATE) FROM t1 GROUP BY a) FROM t1;
b = (SELECT CONVERT(a, DATE) FROM t1 GROUP BY a)
0
1
SELECT b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE) FROM t1;
b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE)
0
1
DROP TABLE t1;
End of 5.1 tests
#
......
......@@ -1540,6 +1540,9 @@ ERROR HY000: Cannot drop default keycache
SET @@global.key_cache_block_size=0;
Warnings:
Warning 1292 Truncated incorrect key_cache_block_size value: '0'
select @@max_long_data_size;
@@max_long_data_size
1048576
SET @@global.max_binlog_cache_size=DEFAULT;
SET @@global.max_join_size=DEFAULT;
SET @@global.key_buffer_size=@kbs;
......
......@@ -91,6 +91,9 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
';
ERROR HY000: master may suffer from http://bugs.mysql.com/bug.php?id=37426 so slave stops; check error log on slave for more info
drop table t1, char63_utf8, char128_utf8;
call mtr.add_suppression("Slave SQL.*master suffers from this bug: http:..bugs.mysql.com.bug.php.id=37426.* Error_code: 1105");
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.char128_utf8. cannot be converted.* Error_code: 1677");
#
# Bug #54393: crash and/or valgrind errors in
# mysql_client_binlog_statement
......
......@@ -39,6 +39,28 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
FLUSH STATUS;
#
# Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT
# BASED REPLICATION
#
DROP DATABASE IF EXISTS db1;
DROP TABLE IF EXISTS t3;
CREATE DATABASE db1;
CREATE TABLE db1.t1 (a INT);
CREATE TABLE db1.t2 (b INT, KEY(b)) engine=innodb;
CREATE TABLE t3 (a INT, KEY (a), FOREIGN KEY(a) REFERENCES db1.t2(b))
engine=innodb;
RESET MASTER;
DROP DATABASE db1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
SHOW TABLES FROM db1;
Tables_in_db1
t2
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `db1`; drop table `t1`
DROP TABLE t3;
DROP DATABASE db1;
set binlog_format=mixed;
reset master;
create database testing_1;
......@@ -80,6 +102,28 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE `tt1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
FLUSH STATUS;
#
# Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT
# BASED REPLICATION
#
DROP DATABASE IF EXISTS db1;
DROP TABLE IF EXISTS t3;
CREATE DATABASE db1;
CREATE TABLE db1.t1 (a INT);
CREATE TABLE db1.t2 (b INT, KEY(b)) engine=innodb;
CREATE TABLE t3 (a INT, KEY (a), FOREIGN KEY(a) REFERENCES db1.t2(b))
engine=innodb;
RESET MASTER;
DROP DATABASE db1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
SHOW TABLES FROM db1;
Tables_in_db1
t2
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `db1`; drop table `t1`
DROP TABLE t3;
DROP DATABASE db1;
set binlog_format=row;
reset master;
create database testing_1;
......@@ -122,6 +166,28 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `tt1` /* generated by server */
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
FLUSH STATUS;
#
# Bug#11765416 58381: FAILED DROP DATABASE CAN BREAK STATEMENT
# BASED REPLICATION
#
DROP DATABASE IF EXISTS db1;
DROP TABLE IF EXISTS t3;
CREATE DATABASE db1;
CREATE TABLE db1.t1 (a INT);
CREATE TABLE db1.t2 (b INT, KEY(b)) engine=innodb;
CREATE TABLE t3 (a INT, KEY (a), FOREIGN KEY(a) REFERENCES db1.t2(b))
engine=innodb;
RESET MASTER;
DROP DATABASE db1;
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails
SHOW TABLES FROM db1;
Tables_in_db1
t2
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query # # use `db1`; drop table `t1`
DROP TABLE t3;
DROP DATABASE db1;
show databases;
Database
information_schema
......
......@@ -1374,6 +1374,7 @@ unique_checks OFF
# INSERT INTO t1 VALUES(2)
# foreign_key_checks=1 and unique_checks=1
# It should not change current session's variables, even error happens
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
......
......@@ -864,6 +864,7 @@ unique_checks OFF
# INSERT INTO t1 VALUES(2)
# foreign_key_checks=1 and unique_checks=1
# It should not change current session's variables, even error happens
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
......
......@@ -151,6 +151,9 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
drop table t1, char63_utf8, char128_utf8;
call mtr.add_suppression("Slave SQL.*master suffers from this bug: http:..bugs.mysql.com.bug.php.id=37426.* Error_code: 1105");
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.char128_utf8. cannot be converted.* Error_code: 1677");
--echo #
--echo # Bug #54393: crash and/or valgrind errors in
......
......@@ -207,7 +207,7 @@ def mysql user max_questions 37 0 NO int NULL NULL 10 0 NULL NULL int(11) unsign
def mysql user max_updates 38 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references
def mysql user max_user_connections 40 0 NO int NULL NULL 10 0 NULL NULL int(11) unsigned select,insert,update,references
def mysql user Password 3 NO char 41 41 NULL NULL latin1 latin1_bin char(41) select,insert,update,references
def mysql user plugin 41 NO char 60 180 NULL NULL utf8 utf8_bin char(60) select,insert,update,references
def mysql user plugin 41 NO char 64 192 NULL NULL utf8 utf8_bin char(64) select,insert,update,references
def mysql user Process_priv 12 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user References_priv 15 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
def mysql user Reload_priv 10 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') select,insert,update,references
......@@ -516,5 +516,5 @@ NULL mysql user max_questions int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_updates int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_connections int NULL NULL NULL NULL int(11) unsigned
NULL mysql user max_user_connections int NULL NULL NULL NULL int(11) unsigned
3.0000 mysql user plugin char 60 180 utf8 utf8_bin char(60)
3.0000 mysql user plugin char 64 192 utf8 utf8_bin char(64)
1.0000 mysql user authentication_string text 65535 65535 utf8 utf8_bin text
include/master-slave.inc
[connection master]
drop table if exists test.t1;
reset master;
create table test.t1(a int);
drop table test.t1;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
slave-bin.000001 # Query # # use `test`; create table test.t1(a int)
slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
"============ Performance schema on master ============"
select
substring(file_name, locate("master-", file_name)) as FILE_NAME,
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_instance
where file_name like "%master-%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
master-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
master-bin.index wait/io/file/sql/binlog_index NONE MANY NONE MANY
select * from performance_schema.file_summary_by_instance
where file_name like "%slave-%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
"Expect a master binlog + binlog_index"
select
substring(file_name, locate("master-", file_name)) as FILE_NAME,
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_instance
where event_name like "%binlog%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
master-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
master-bin.index wait/io/file/sql/binlog_index NONE MANY NONE MANY
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_event_name
where event_name like "%binlog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/binlog MANY MANY MANY MANY
wait/io/file/sql/binlog_index NONE MANY NONE MANY
select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
"Expect no slave relay log"
select * from performance_schema.file_summary_by_instance
where event_name like "%relaylog%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
select * from performance_schema.file_summary_by_event_name
where event_name like "%relaylog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/relaylog 0 0 0 0
wait/io/file/sql/relaylog_index 0 0 0 0
select * from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
EVENT_NAME COUNT_STAR SUM_TIMER_WAIT MIN_TIMER_WAIT AVG_TIMER_WAIT MAX_TIMER_WAIT
wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond 0 0 0 0 0
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index 0 0 0 0 0
"============ Performance schema on slave ============"
select * from performance_schema.file_summary_by_instance
where file_name like "%master-%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
select
substring(file_name, locate("slave-", file_name)) as FILE_NAME,
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_instance
where file_name like "%slave-%"
and (file_name not like "%slave-relay-bin.0%"
or file_name like "%slave-relay-bin.000001"
or file_name like "%slave-relay-bin.000002")
order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
slave-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
slave-bin.index wait/io/file/sql/binlog_index NONE MANY NONE MANY
slave-relay-bin.000001 wait/io/file/sql/relaylog MANY MANY MANY MANY
slave-relay-bin.000002 wait/io/file/sql/relaylog MANY MANY MANY MANY
slave-relay-bin.index wait/io/file/sql/relaylog_index MANY MANY MANY MANY
"Expect a slave binlog + binlog_index"
select
substring(file_name, locate("slave-", file_name)) as FILE_NAME,
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_instance
where event_name like "%binlog%" order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
slave-bin.000001 wait/io/file/sql/binlog MANY MANY MANY MANY
slave-bin.index wait/io/file/sql/binlog_index NONE MANY NONE MANY
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_event_name
where event_name like "%binlog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/binlog MANY MANY MANY MANY
wait/io/file/sql/binlog_index NONE MANY NONE MANY
select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_BIN_LOG::COND_prep_xids NONE
wait/synch/cond/sql/MYSQL_BIN_LOG::update_cond NONE
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_index MANY
wait/synch/mutex/sql/MYSQL_BIN_LOG::LOCK_prep_xids NONE
"Expect a slave relay log"
select
substring(file_name, locate("slave-", file_name)) as FILE_NAME,
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_instance
where event_name like "%relaylog%"
and (file_name not like "%slave-relay-bin.0%"
or file_name like "%slave-relay-bin.000001"
or file_name like "%slave-relay-bin.000002")
order by file_name;
FILE_NAME EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
slave-relay-bin.000001 wait/io/file/sql/relaylog MANY MANY MANY MANY
slave-relay-bin.000002 wait/io/file/sql/relaylog MANY MANY MANY MANY
slave-relay-bin.index wait/io/file/sql/relaylog_index MANY MANY MANY MANY
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_event_name
where event_name like "%relaylog%" order by event_name;
EVENT_NAME COUNT_READ COUNT_WRITE SUM_NUMBER_OF_BYTES_READ SUM_NUMBER_OF_BYTES_WRITE
wait/io/file/sql/relaylog MANY MANY MANY MANY
wait/io/file/sql/relaylog_index MANY MANY MANY MANY
select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
EVENT_NAME COUNT_STAR
wait/synch/cond/sql/MYSQL_RELAY_LOG::update_cond MANY
wait/synch/mutex/sql/MYSQL_RELAY_LOG::LOCK_index MANY
include/stop_slave.inc
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
# Tests for PERFORMANCE_SCHEMA
--source include/have_log_bin.inc
--source include/not_embedded.inc
--source include/have_perfschema.inc
--source include/master-slave.inc
--disable_warnings
drop table if exists test.t1;
--sync_slave_with_master
reset master;
--enable_warnings
create table test.t1(a int);
drop table test.t1;
--source include/show_binlog_events.inc
# Notes
#
# The point of this test is to make sure code is properly instrumented,
# where instruments have the proper key (binlog or relaylog),
# it is not to dive into statistics for each instruments.
# Different test execution sequence in different platforms do make the
# results vary, making the test results very sensitive to changes.
# To ensure robustness:
# - log file rotation is limited to file .000001 and .000002
# - statistics are normalized to "NONE" or "MANY"
#
connection master;
-- echo "============ Performance schema on master ============"
select
substring(file_name, locate("master-", file_name)) as FILE_NAME,
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_instance
where file_name like "%master-%" order by file_name;
select * from performance_schema.file_summary_by_instance
where file_name like "%slave-%" order by file_name;
-- echo "Expect a master binlog + binlog_index"
select
substring(file_name, locate("master-", file_name)) as FILE_NAME,
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_instance
where event_name like "%binlog%" order by file_name;
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_event_name
where event_name like "%binlog%" order by event_name;
select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
-- echo "Expect no slave relay log"
select * from performance_schema.file_summary_by_instance
where event_name like "%relaylog%" order by file_name;
select * from performance_schema.file_summary_by_event_name
where event_name like "%relaylog%" order by event_name;
select * from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
sync_slave_with_master;
-- echo "============ Performance schema on slave ============"
select * from performance_schema.file_summary_by_instance
where file_name like "%master-%" order by file_name;
select
substring(file_name, locate("slave-", file_name)) as FILE_NAME,
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_instance
where file_name like "%slave-%"
and (file_name not like "%slave-relay-bin.0%"
or file_name like "%slave-relay-bin.000001"
or file_name like "%slave-relay-bin.000002")
order by file_name;
-- echo "Expect a slave binlog + binlog_index"
select
substring(file_name, locate("slave-", file_name)) as FILE_NAME,
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_instance
where event_name like "%binlog%" order by file_name;
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_event_name
where event_name like "%binlog%" order by event_name;
select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_BIN_LOG%" order by event_name;
-- echo "Expect a slave relay log"
select
substring(file_name, locate("slave-", file_name)) as FILE_NAME,
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_instance
where event_name like "%relaylog%"
and (file_name not like "%slave-relay-bin.0%"
or file_name like "%slave-relay-bin.000001"
or file_name like "%slave-relay-bin.000002")
order by file_name;
select
EVENT_NAME,
if (count_read > 0, "MANY", "NONE") as COUNT_READ,
if (count_write > 0,"MANY", "NONE") as COUNT_WRITE,
if (sum_number_of_bytes_read > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_READ,
if (sum_number_of_bytes_write > 0, "MANY", "NONE") as SUM_NUMBER_OF_BYTES_WRITE
from performance_schema.file_summary_by_event_name
where event_name like "%relaylog%" order by event_name;
select
EVENT_NAME,
if (count_star > 0, "MANY", "NONE") as COUNT_STAR
from performance_schema.events_waits_summary_global_by_event_name
where event_name like "%MYSQL_RELAY_LOG%" order by event_name;
--source include/stop_slave.inc
include/master-slave.inc
[connection master]
call mtr.add_suppression('Found invalid event in binary log');
call mtr.add_suppression('Slave SQL.*Relay log read failure: Could not parse relay log event entry.* 1594');
==== Initialize ====
include/stop_slave.inc
RESET SLAVE;
......
include/master-slave.inc
[connection master]
call mtr.add_suppression("Failed during slave I/O thread initialization");
call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* 1593");
include/stop_slave.inc
reset slave;
SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
......
......@@ -5,6 +5,7 @@ include/rpl_init.inc [topology=1->2->3->4->1]
CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=MyISAM;
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;
include/rpl_sync.inc
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
*** Testing schema A->B->C->D->A ***
......@@ -46,6 +47,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
include/start_slave.inc
INSERT INTO t1 VALUES(6,'C',2);
INSERT INTO t1(b,c) VALUES('B',2);
call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* Error_code: 1062");
include/wait_for_slave_sql_error.inc [errno=1062]
INSERT INTO t1(b,c) VALUES('A',2);
INSERT INTO t1(b,c) VALUES('D',2);
......
......@@ -57,6 +57,11 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677");
* Select count and 20 rows from Slave *
......
......@@ -57,6 +57,11 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
call mtr.add_suppression("Slave SQL.*Column 2 of table .test.t1.. cannot be converted from type.* Error_code: 1677");
* Select count and 20 rows from Slave *
......
include/master-slave.inc
[connection master]
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: 1677");
**** Diff Table Def Start ****
*** On Slave ***
STOP SLAVE;
......@@ -461,6 +462,9 @@ c4 BLOB, c5 CHAR(5)) ENGINE='InnoDB';
RESET MASTER;
*** Start Slave ***
START SLAVE;
call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051");
call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: 1060");
call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535");
*** Master Data Insert ***
set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
......
include/master-slave.inc
[connection master]
call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]*. cannot be converted from type.* Error_code: 1677");
**** Diff Table Def Start ****
*** On Slave ***
STOP SLAVE;
......@@ -461,6 +462,9 @@ c4 BLOB, c5 CHAR(5)) ENGINE='MyISAM';
RESET MASTER;
*** Start Slave ***
START SLAVE;
call mtr.add_suppression("Error .Unknown table .t6.. on query.* Error_code: 1051");
call mtr.add_suppression("Error .Duplicate column name .c6.. on query.* Error_code: 1060");
call mtr.add_suppression("Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535");
*** Master Data Insert ***
set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1);
......
......@@ -42,6 +42,7 @@ UPDATE t4 LEFT JOIN (t1, t2, t5) ON (t1.id=t4.id and t2.id=t4.id and t5.id=t4.id
UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id) SET a=0, d=0, f=0, g=0 where t4.id=1;
UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1;
call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* Error_code: 1146");
UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1;
include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1''
......
......@@ -206,6 +206,8 @@ Heartbeat event received
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10), c LONGTEXT);
INSERT INTO t1 VALUES (1, 'on slave', NULL);
INSERT INTO t1 VALUES (1, 'on master', NULL);
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
Heartbeat events are received while sql thread stopped (1 means 'yes'): 1
include/stop_slave.inc
DROP TABLE t1;
......
include/master-slave.inc
[connection master]
call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
call mtr.add_suppression("Slave SQL.*Can.t find record in .t[12].* Error_code: 1032");
call mtr.add_suppression("Slave SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave SQL.*Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
CREATE TABLE t1 (a INT PRIMARY KEY);
CREATE TABLE t2 (a INT);
INSERT INTO t1 VALUES (-1),(-2),(-3);
......
......@@ -113,6 +113,7 @@ show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
set global slave_exec_mode='IDEMPOTENT';
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* Error_code: 1032");
drop table t1, mysqltest2.t2;
drop table t4;
drop database mysqltest2;
......
......@@ -15,6 +15,7 @@ a
2
3
4
call mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master.* 1590");
include/wait_for_slave_sql_error.inc [errno=1590]
Last_SQL_Error = 'The incident LOST_EVENTS occured on the master. Message: <none>'
**** On Slave ****
......
......@@ -6,7 +6,7 @@ SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on
start slave;
include/wait_for_slave_sql_error.inc [errno=1593]
Last_SQL_Error = 'Failed during slave thread initialization'
call mtr.add_suppression("Failed during slave I/O thread initialization");
call mtr.add_suppression("Failed during slave.* thread initialization");
SET GLOBAL debug= "";
reset slave;
SET GLOBAL init_slave= "garbage";
......
......@@ -7,6 +7,7 @@ SELECT * FROM t1;
a b
1 10
2 2
call mtr.add_suppression("Slave SQL.*suffer.*http:..bugs.mysql.com.bug.php.id=24432");
include/wait_for_slave_sql_error.inc [errno=1105]
Last_SQL_Error = 'Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10''
SELECT * FROM t1;
......
......@@ -27,6 +27,8 @@ drop table t3;
create table t1(a int, b int, unique(b));
insert into t1 values(1,10);
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
include/check_slave_no_error.inc
set sql_log_bin=0;
......
......@@ -3,6 +3,7 @@ include/master-slave.inc
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,10);
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
call mtr.add_suppression("Slave SQL.*Fatal error: Not enough memory, Error_code: 1593");
include/wait_for_slave_sql_error_and_skip.inc [errno=1593]
Last_SQL_Error = 'Fatal error: Not enough memory'
DROP TABLE t1;
......
......@@ -131,6 +131,7 @@ include/start_slave.inc
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
TRUNCATE t1;
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
......
......@@ -37,6 +37,7 @@ drop table temp_table, t3;
insert into t2 values(1234);
set insert_id=1234;
insert into t2 values(NULL);
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* Error_code: 1062");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
purge master logs to 'master-bin.000002';
show master logs;
......
......@@ -65,6 +65,7 @@ DROP TABLE t1;
include/rpl_reset.inc
**** On Slave ****
SET GLOBAL QUERY_CACHE_SIZE=0;
call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1.* Error_code: 1032");
**** On Master ****
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
......
......@@ -478,6 +478,9 @@ INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
include/diff_tables.inc [master:t2, slave:t2]
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677");
include/rpl_reset.inc
[expecting slave to replicate correctly]
INSERT INTO t4 VALUES (1, "", 1);
......
......@@ -481,6 +481,9 @@ INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
include/diff_tables.inc [master:t2, slave:t2]
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
call mtr.add_suppression("Slave SQL.*Column 1 of table .test.t.. cannot be converted from type.*, Error_code: 1677");
include/rpl_reset.inc
[expecting slave to replicate correctly]
INSERT INTO t4 VALUES (1, "", 1);
......
......@@ -132,6 +132,7 @@ include/start_slave.inc
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
TRUNCATE t1;
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
......
......@@ -265,6 +265,8 @@ STOP SLAVE;
RESET SLAVE;
RESET MASTER;
START SLAVE;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 0 ...e mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677");
*** Cleanup ***
DROP TABLE IF EXISTS t1;
include/rpl_end.inc
......@@ -23,6 +23,7 @@ a
include/wait_for_slave_sql_error.inc [errno=1062]
Last_SQL_Error (expected "duplicate key" error)
Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos END_LOG_POS
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
SELECT * FROM t1;
a
1
......@@ -49,6 +50,7 @@ SELECT * FROM t1;
a
[on slave]
---- Wait until slave stops with an error ----
call mtr.add_suppression("Slave SQL.*Can.t find record in .t1., Error_code: 1032");
include/wait_for_slave_sql_error.inc [errno=1032]
Last_SQL_Error (expected "duplicate key" error)
Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos END_LOG_POS
......
include/master-slave.inc
[connection master]
call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
call mtr.add_suppression("Can.t find record in .t[12].* Error_code: 1032");
call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
call mtr.add_suppression("Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
set @old_slave_exec_mode= @@global.slave_exec_mode;
set @@global.slave_exec_mode= IDEMPOTENT;
create table ti1 (b int primary key) engine = innodb;
......
......@@ -10,6 +10,7 @@ DROP TABLE t1;
INSERT INTO t1 VALUES (1);
==== Verify error on slave ====
[on slave]
call mtr.add_suppression("Slave SQL.*Error executing row event: .Table .test.t1. doesn.t exist., Error_code: 1146");
include/wait_for_slave_sql_error.inc [errno=1146]
==== Clean up ====
include/stop_slave_io.inc
......
......@@ -117,6 +117,8 @@ a
include/check_slave_is_running.inc
INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4);
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* Error_code: 1677");
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float''
INSERT INTO t9 VALUES (5);
......
......@@ -117,6 +117,8 @@ a
include/check_slave_is_running.inc
INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4);
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Column [0-9] of table .test.t[0-9]. cannot be converted from type.* Error_code: 1677");
include/wait_for_slave_sql_error_and_skip.inc [errno=1677]
Last_SQL_Error = 'Column 0 of table 'test.t4' cannot be converted from type 'int' to type 'float''
INSERT INTO t9 VALUES (5);
......
......@@ -56,6 +56,7 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET SQL_LOG_BIN=1;
call mtr.add_suppression("Slave SQL.*Could not execute .*te_rows event on table test.t.; Duplicate entry.* Error_code: 1062");
CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB;
SHOW CREATE TABLE t1;
Table Create Table
......
......@@ -29,6 +29,7 @@ a b
SELECT * FROM t3 ORDER BY a;
a b
1 ZZ
call mtr.add_suppression("Slave SQL.*Table .test.t3. doesn.t exist.* Error_code: 1146");
include/wait_for_slave_sql_error.inc [errno=1146]
SHOW TABLES LIKE 't%';
Tables_in_test (t%)
......
include/master-slave.inc
[connection master]
SET @@GLOBAL.DEBUG = '+d,remove_slave_load_file_before_write';
create table t1(a int not null auto_increment, b int, primary key(a)) engine=innodb;
start transaction;
insert into t1(b) values (1);
insert into t1(b) values (2);
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
commit;
include/wait_for_slave_sql_to_stop.inc
include/wait_for_slave_sql_error.inc [errno=29, 13]
drop table t1;
include/sync_slave_io_with_master.inc
include/stop_slave_io.inc
RESET SLAVE;
drop table t1;
call mtr.add_suppression("Slave: Can't get stat of .*");
call mtr.add_suppression("Slave SQL: Error .Can.t get stat of.* Error_code: 13");
call mtr.add_suppression("Slave: File.* not found.*");
call mtr.add_suppression("Slave SQL: Error .File.* not found.* Error_code: 29");
SET @@GLOBAL.DEBUG = '';
include/rpl_end.inc
include/master-slave.inc
[connection master]
START SLAVE;
call mtr.add_suppression("Slave SQL.*Unable to use slave.s temporary directory.* Error_code: 12");
include/wait_for_slave_sql_error.inc [errno=12]
include/stop_slave_io.inc
RESET SLAVE;
......
include/master-slave.inc
[connection master]
CALL mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
call mtr.add_suppression("Slave SQL: slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table; waiting for the group completion");
include/stop_slave.inc
SET @old_log_output= @@log_output;
SET GLOBAL log_output= 'TABLE';
......
......@@ -8,6 +8,7 @@ insert into t1 values(1),(2);
ERROR 23000: Duplicate entry '2' for key 'a'
drop table t1;
include/wait_for_slave_sql_to_stop.inc
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* Error_code: 0");
Error: "Query caused different errors on master and slave. Error on master: message (format)='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
Errno: "0" (expected 0)
drop table t1;
......
......@@ -131,6 +131,7 @@ include/start_slave.inc
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
TRUNCATE t1;
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
......
......@@ -18,6 +18,7 @@ a
include/wait_for_slave_sql_error.inc [errno=1062]
Last_SQL_Error (expected "duplicate key" error)
Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)'
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
SELECT * FROM t1;
a
1
......
......@@ -43,6 +43,8 @@ drop table t3;
create table t1(a int, b int, unique(b));
insert into t1 values(1,10);
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
include/check_slave_no_error.inc
set sql_log_bin=0;
......
......@@ -70,5 +70,6 @@ include/start_slave.inc
# Clean up
DROP TABLE t1;
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
include/rpl_end.inc
......@@ -11,6 +11,8 @@ insert into tm set a=null;
Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.
commit;
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
call mtr.add_suppression("Slave SQL.*The slave SQL is stopped, leaving the current group of events unfinished with a non-transaction table changed.");
include/wait_for_slave_sql_to_stop.inc
SELECT "NO" AS Last_SQL_Error, @check as `true`;
Last_SQL_Error true
......
......@@ -75,6 +75,7 @@ include/wait_for_slave_sql_to_start.inc
# Test end
SET GLOBAL debug= '$debug_save';
include/restart_slave.inc
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
[connection master]
DROP TABLE t1, t2;
......@@ -92,6 +93,7 @@ DROP TABLE t1, t2;
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1, 1);
[connection master]
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
[connection slave]
include/restart_slave.inc
......
......@@ -36,6 +36,7 @@ a b
3 3
4 4
include/check_slave_is_running.inc
call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1");
**** On Master ****
DROP TABLE t1;
include/rpl_end.inc
......@@ -534,6 +534,7 @@ BIT(6) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(5) BIT(12) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(12) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DROP TABLE type_conversions;
call mtr.add_suppression("Slave SQL.*Column 0 of table .test.t1. cannot be converted from type.* Error_code: 1677");
DROP TABLE t1;
set global slave_type_conversions = @saved_slave_type_conversions;
include/rpl_end.inc
......@@ -22,7 +22,7 @@ source include/have_debug.inc;
--connection slave
call mtr.add_suppression('Found invalid event in binary log');
call mtr.add_suppression('Slave SQL.*Relay log read failure: Could not parse relay log event entry.* 1594');
#
# BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event
......
......@@ -9,6 +9,7 @@ connection slave;
# Add suppression for expected warnings in slaves error log
call mtr.add_suppression("Failed during slave I/O thread initialization");
call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* 1593");
--source include/stop_slave.inc
reset slave;
......
......@@ -30,6 +30,7 @@ CREATE TABLE t1 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL,
CREATE TABLE t2 (a INT NOT NULL AUTO_INCREMENT, b VARCHAR(100), c INT NOT NULL, PRIMARY KEY(a)) ENGINE=InnoDB;
--source include/rpl_sync.inc
--connection server_4
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
--echo
#
......@@ -85,6 +86,7 @@ INSERT INTO t1(b,c) VALUES('B',2);
# Wait while C will stop.
--connection server_3
# 1062 = ER_DUP_ENTRY
call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* Error_code: 1062");
--let $slave_sql_errno= 1062
--source include/wait_for_slave_sql_error.inc
--connection server_1
......
......@@ -122,6 +122,8 @@ UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id
# if any of the above statement are not ignored, it would cause error
# and stop slave sql thread.
sync_slave_with_master;
connection slave;
call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* Error_code: 1146");
connection master;
# Parameters for include/wait_for_slave_sql_error_and_skip.inc:
......
......@@ -319,6 +319,8 @@ INSERT INTO t1 VALUES (1, 'on slave', NULL);
--connection master
INSERT INTO t1 VALUES (1, 'on master', NULL);
--connection slave
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*slave SQL thread is being stopped in the middle of applying of a group having updated a non-transaction table");
let $slave_errno= ER_DUP_ENTRY
--source include/wait_for_slave_sql_error.inc
let $rcvd_heartbeats_before= query_get_value(SHOW STATUS LIKE 'slave_received_heartbeats', Value, 1);
......
......@@ -4,9 +4,10 @@
source include/master-slave.inc;
# Add suppression for expected warning(s) in slaves error log
call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032");
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
call mtr.add_suppression("Slave SQL.*Can.t find record in .t[12].* Error_code: 1032");
call mtr.add_suppression("Slave SQL.*Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave SQL.*Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
connection master;
CREATE TABLE t1 (a INT PRIMARY KEY);
......
......@@ -125,6 +125,7 @@ show grants for mysqltest4@localhost;
# where mysqltest1 does not exist on slave,
# to succeed on slave the mode is temporarily changed
set global slave_exec_mode='IDEMPOTENT';
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* Error_code: 1032");
connection master;
drop table t1, mysqltest2.t2;
......
......@@ -15,6 +15,7 @@ SELECT * FROM t1;
connection slave;
# Wait until SQL thread stops with error LOST_EVENT on master
call mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master.* 1590");
let $slave_sql_errno= 1590;
let $show_slave_sql_error= 1;
source include/wait_for_slave_sql_error.inc;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment