BUG#11754117 - 45670: INTVAR_EVENTS FOR FILTERED-OUT QUERY_LOG_EVENTS ARE EXECUTED
Improved random number filtering verification on rpl_filter_tables_not_exist test.
This commit is contained in:
parent
dde1b32d9e
commit
8bb98d7535
@ -114,17 +114,17 @@ id c
|
||||
3 3
|
||||
[on master]
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
CREATE TABLE test.t5 (a INT AUTO_INCREMENT PRIMARY KEY, b INT, c INT);
|
||||
CREATE TABLE test.t5 (a INT AUTO_INCREMENT PRIMARY KEY, b DECIMAL(20,20), c INT);
|
||||
CREATE TABLE test.t1 (a INT);
|
||||
INSERT INTO test.t1 VALUES(1);
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
CREATE TABLE test.t_slave (a INT AUTO_INCREMENT PRIMARY KEY, b INT, c INT);
|
||||
CREATE TABLE test.t_slave (a INT AUTO_INCREMENT PRIMARY KEY, b DECIMAL(20,20), c INT);
|
||||
CREATE TRIGGER t1_update AFTER UPDATE ON test.t1 FOR EACH ROW
|
||||
INSERT INTO test.t_slave VALUES(NULL, ROUND(RAND() * 1000), @c);
|
||||
INSERT INTO test.t_slave VALUES(NULL, RAND(), @c);
|
||||
SET INSERT_ID=2;
|
||||
SET @c=2;
|
||||
SET @@rand_seed1=10000000, @@rand_seed2=1000000;
|
||||
INSERT INTO t5 VALUES (NULL, ROUND(RAND() * 1000), @c);
|
||||
INSERT INTO t5 VALUES (NULL, RAND(), @c);
|
||||
Warnings:
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
SELECT b into @b FROM test.t5;
|
||||
@ -132,6 +132,7 @@ UPDATE test.t1 SET a=2;
|
||||
SELECT a AS 'ONE' into @a FROM test.t_slave;
|
||||
SELECT c AS 'NULL' into @c FROM test.t_slave;
|
||||
SELECT b into @b FROM test.t_slave;
|
||||
include/assert.inc [Random values from master and slave must be different]
|
||||
drop table test.t5;
|
||||
drop table test.t1;
|
||||
drop table test.t_slave;
|
||||
|
@ -215,21 +215,23 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
# be filtered as well.
|
||||
#
|
||||
connection master;
|
||||
CREATE TABLE test.t5 (a INT AUTO_INCREMENT PRIMARY KEY, b INT, c INT); # ignored on slave
|
||||
# Although RAND() is from 0 to 1.0, DECIMAL(M,D), requires that M must be >= D.
|
||||
CREATE TABLE test.t5 (a INT AUTO_INCREMENT PRIMARY KEY, b DECIMAL(20,20), c INT); # ignored on slave
|
||||
CREATE TABLE test.t1 (a INT); # accepted on slave
|
||||
INSERT INTO test.t1 VALUES(1);
|
||||
|
||||
--sync_slave_with_master
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
CREATE TABLE test.t_slave (a INT AUTO_INCREMENT PRIMARY KEY, b INT, c INT);
|
||||
# Although RAND() is from 0 to 1.0, DECIMAL(M,D), requires that M must be >= D.
|
||||
CREATE TABLE test.t_slave (a INT AUTO_INCREMENT PRIMARY KEY, b DECIMAL(20,20), c INT);
|
||||
CREATE TRIGGER t1_update AFTER UPDATE ON test.t1 FOR EACH ROW
|
||||
INSERT INTO test.t_slave VALUES(NULL, ROUND(RAND() * 1000), @c);
|
||||
INSERT INTO test.t_slave VALUES(NULL, RAND(), @c);
|
||||
|
||||
connection master;
|
||||
SET INSERT_ID=2;
|
||||
SET @c=2;
|
||||
SET @@rand_seed1=10000000, @@rand_seed2=1000000;
|
||||
INSERT INTO t5 VALUES (NULL, ROUND(RAND() * 1000), @c); # to be ignored
|
||||
INSERT INTO t5 VALUES (NULL, RAND(), @c); # to be ignored
|
||||
SELECT b into @b FROM test.t5;
|
||||
--let $b_master=`select @b`
|
||||
UPDATE test.t1 SET a=2; # to run trigger on slave
|
||||
@ -253,10 +255,9 @@ if (`SELECT @a != 2 and @c != NULL`)
|
||||
SELECT b into @b FROM test.t_slave;
|
||||
--let $b_slave=`select @b`
|
||||
|
||||
if (`SELECT $b_slave = $b_master`)
|
||||
{
|
||||
--echo Might be pure coincidence of two randoms from master and slave table. Don not panic yet.
|
||||
}
|
||||
--let $assert_text= Random values from master and slave must be different
|
||||
--let $assert_cond= $b_master != $b_slave
|
||||
--source include/assert.inc
|
||||
|
||||
# cleanup BUG#11754117
|
||||
connection master;
|
||||
|
Loading…
x
Reference in New Issue
Block a user