diff options
Diffstat (limited to 'mysql-test/suite/rpl/r/rpl_stm_user_variables.result')
-rw-r--r-- | mysql-test/suite/rpl/r/rpl_stm_user_variables.result | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result index efb0f051fd4..5f31cff94cf 100644 --- a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result +++ b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result @@ -20,7 +20,6 @@ CREATE TABLE t1 (`tinyint` TINYINT, ### a) declarative INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);; ######################################### -#### [ on master ] SELECT * FROM t1; tinyint 127 smallint 32767 @@ -36,7 +35,7 @@ double 1.8446744073709552e19 float 1.84467e19 real 18446744073709552000.00 decimal 18446744073709551615.00 -#### [ on slave ] +connection slave; SELECT * FROM t1; tinyint 127 smallint 32767 @@ -53,8 +52,10 @@ float 1.84467e19 real 18446744073709552000.00 decimal 18446744073709551615.00 ######################################### +connection master; ## assertion: master and slave tables are in sync include/diff_tables.inc [master:t1,slave:t1] +connection master; TRUNCATE t1; ### b) user var INSERT INTO t1 VALUES (@positive, @@ -72,7 +73,6 @@ INSERT INTO t1 VALUES (@positive, @positive, @positive); ######################################### -#### [ on master ] SELECT * FROM t1; tinyint 127 smallint 32767 @@ -88,7 +88,7 @@ double 1.8446744073709552e19 float 1.84467e19 real 18446744073709552000.00 decimal 18446744073709551615.00 -#### [ on slave ] +connection slave; SELECT * FROM t1; tinyint 127 smallint 32767 @@ -105,14 +105,15 @@ float 1.84467e19 real 18446744073709552000.00 decimal 18446744073709551615.00 ######################################### +connection master; ## assertion: master and slave tables are in sync include/diff_tables.inc [master:t1,slave:t1] +connection master; TRUNCATE t1; ### insert min signed ### a) declarative INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);; ######################################### -#### [ on master ] SELECT * FROM t1; tinyint -128 smallint -32768 @@ -128,7 +129,7 @@ double -9.223372036854776e18 float -9.22337e18 real -9223372036854776000.00 decimal -9223372036854775808.00 -#### [ on slave ] +connection slave; SELECT * FROM t1; tinyint -128 smallint -32768 @@ -145,8 +146,10 @@ float -9.22337e18 real -9223372036854776000.00 decimal -9223372036854775808.00 ######################################### +connection master; ## assertion: master and slave tables are in sync include/diff_tables.inc [master:t1,slave:t1] +connection master; TRUNCATE t1; ### b) user var INSERT INTO t1 VALUES (@negative, @@ -164,7 +167,6 @@ INSERT INTO t1 VALUES (@negative, @negative, @negative); ######################################### -#### [ on master ] SELECT * FROM t1; tinyint -128 smallint -32768 @@ -180,7 +182,7 @@ double -9.223372036854776e18 float -9.22337e18 real -9223372036854776000.00 decimal -9223372036854775808.00 -#### [ on slave ] +connection slave; SELECT * FROM t1; tinyint -128 smallint -32768 @@ -197,27 +199,36 @@ float -9.22337e18 real -9223372036854776000.00 decimal -9223372036854775808.00 ######################################### +connection master; ## assertion: master and slave tables are in sync include/diff_tables.inc [master:t1,slave:t1] +connection master; TRUNCATE t1; ## check: contents of both tables master's and slave's +connection master; DROP TABLE t1; +connection slave; include/rpl_reset.inc +connection master; CREATE TABLE t1 ( c INT, PRIMARY KEY (c)) Engine=MyISAM; CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW SET @aux = -1 ; SET @aux = 10294947273192243200; SET @aux1= @aux; INSERT INTO t1 VALUES (@aux) , (@aux1); ERROR 23000: Duplicate entry '2147483647' for key 'PRIMARY' +connection slave; ## assertion: master and slave tables are in sync include/diff_tables.inc [master:t1,slave:t1] +connection master; DROP TRIGGER tr1; DROP TABLE t1; +connection slave; # The GET DIAGNOSTICS itself is not replicated, but it can set # variables which can be used in statements that are replicated. include/rpl_reset.inc +connection master; CREATE TABLE t1 (a INT, b INT); GET DIAGNOSTICS @var1 = NUMBER; INSERT INTO t1 VALUES (@var1, 0), (@var1, 0); @@ -230,12 +241,15 @@ GET DIAGNOSTICS count = ROW_COUNT; INSERT INTO t1 VALUES (1, count); END| CALL p1(); -# On slave, check if the statement was replicated. +connection slave; +connection slave; +# check if the statement was replicated. SELECT * FROM t1 ORDER BY a; a b 0 2 0 2 1 2 +connection master; # Show events and cleanup include/show_binlog_events.inc Log_name Pos Event_type Server_id End_log_pos Info @@ -261,4 +275,5 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (1, NAME_CONST( master-bin.000001 # Query # # COMMIT DROP TABLE t1; DROP PROCEDURE p1; +connection slave; include/rpl_end.inc |