Commit ba444096 authored by unknown's avatar unknown

rpl_row_mysqlbinlog.result, rpl_row_mysqlbinlog.test:

  Updated with echos for the results file requested by lars


mysql-test/t/rpl_row_mysqlbinlog.test:
  Updated with echos for the results file requested by lars
mysql-test/r/rpl_row_mysqlbinlog.result:
  Updated with echos for the results file requested by lars
parent 30f92fa7
...@@ -4,11 +4,15 @@ reset master; ...@@ -4,11 +4,15 @@ reset master;
reset slave; reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave; start slave;
---Setup Section --
set timestamp=1000000000; set timestamp=1000000000;
DROP TABLE IF EXISTS t1,t2,t3; DROP TABLE IF EXISTS t1,t2,t3;
CREATE TABLE t1(word VARCHAR(20)); CREATE TABLE t1(word VARCHAR(20));
CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY); CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT); CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
---Test1 check table load --
SELECT COUNT(*) from t1; SELECT COUNT(*) from t1;
COUNT(*) COUNT(*)
351 351
...@@ -72,7 +76,9 @@ c1 c3 c4 c5 ...@@ -72,7 +76,9 @@ c1 c3 c4 c5
insert into t1 values ("Alas"); insert into t1 values ("Alas");
flush logs; flush logs;
--- Dump -- --- Test 1 Dump binlog to file --
--- Test 1 delete tables, clean master and slave --
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
DROP TABLE t3; DROP TABLE t3;
...@@ -80,6 +86,10 @@ stop slave; ...@@ -80,6 +86,10 @@ stop slave;
reset master; reset master;
reset slave; reset slave;
start slave; start slave;
--- Test 1 Load from Dump binlog file --
--- Test 1 Check Load Results --
SELECT COUNT(*) from t1; SELECT COUNT(*) from t1;
COUNT(*) COUNT(*)
352 352
...@@ -141,7 +151,7 @@ c1 c3 c4 c5 ...@@ -141,7 +151,7 @@ c1 c3 c4 c5
4 2006-02-22 00:00:00 Tested in Texas 8.8 4 2006-02-22 00:00:00 Tested in Texas 8.8
5 2006-02-22 00:00:00 Tested in Texas 11 5 2006-02-22 00:00:00 Tested in Texas 11
--- --position -- --- Test 2 position test --
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
use test; use test;
...@@ -155,7 +165,7 @@ CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, ...@@ -155,7 +165,7 @@ CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT,
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- Remote -- --- Test 3 First Remote test --
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
ROLLBACK; ROLLBACK;
...@@ -176,14 +186,14 @@ CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, ...@@ -176,14 +186,14 @@ CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT,
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- LOAD DATA -- --- Test 5 LOAD DATA --
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
# End of log file # End of log file
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- reading stdin -- --- Test 6 reading stdin --
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
ROLLBACK; ROLLBACK;
...@@ -203,6 +213,8 @@ CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, ...@@ -203,6 +213,8 @@ CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT,
# End of log file # End of log file
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- Test 7 reading stdin w/position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
use test; use test;
...@@ -215,6 +227,8 @@ CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, ...@@ -215,6 +227,8 @@ CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT,
# End of log file # End of log file
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- Test 8 switch internal charset --
stop slave; stop slave;
reset master; reset master;
reset slave; reset slave;
...@@ -247,4 +261,6 @@ HEX(f) ...@@ -247,4 +261,6 @@ HEX(f)
select HEX(f) from t5; select HEX(f) from t5;
HEX(f) HEX(f)
835C 835C
--- Test cleanup --
DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;
...@@ -13,6 +13,11 @@ ...@@ -13,6 +13,11 @@
# Setup Section # Setup Section
# we need this for getting fixed timestamps inside of this test # we need this for getting fixed timestamps inside of this test
--disable_query_log
select "---Setup Section --" as "";
--enable_query_log
set timestamp=1000000000; set timestamp=1000000000;
--disable_warnings --disable_warnings
...@@ -51,6 +56,11 @@ while ($count) ...@@ -51,6 +56,11 @@ while ($count)
} }
--enable_query_log --enable_query_log
--disable_query_log
select "---Test1 check table load --" as "";
--enable_query_log
# Lets Check the tables on the Master # Lets Check the tables on the Master
SELECT COUNT(*) from t1; SELECT COUNT(*) from t1;
SELECT COUNT(*) from t2; SELECT COUNT(*) from t2;
...@@ -79,7 +89,7 @@ flush logs; ...@@ -79,7 +89,7 @@ flush logs;
# delimiters are for easier debugging in future # delimiters are for easier debugging in future
--disable_query_log --disable_query_log
select "--- Dump --" as ""; select "--- Test 1 Dump binlog to file --" as "";
--enable_query_log --enable_query_log
# #
...@@ -91,6 +101,9 @@ select "--- Dump --" as ""; ...@@ -91,6 +101,9 @@ select "--- Dump --" as "";
# Now that we have our file, lets get rid of the current database. # Now that we have our file, lets get rid of the current database.
# Cleanup the master and the slave and try to recreate. # Cleanup the master and the slave and try to recreate.
--disable_query_log
select "--- Test 1 delete tables, clean master and slave --" as "";
--enable_query_log
DROP TABLE t1; DROP TABLE t1;
DROP TABLE t2; DROP TABLE t2;
...@@ -114,9 +127,16 @@ show status like 'Slave_running'; ...@@ -114,9 +127,16 @@ show status like 'Slave_running';
connection master; connection master;
# We should be clean at this point, now we will run in the file from above. # We should be clean at this point, now we will run in the file from above.
--disable_query_log
select "--- Test 1 Load from Dump binlog file --" as "";
--enable_query_log
--exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/master.sql" --exec $MYSQL -e "source $MYSQLTEST_VARDIR/tmp/master.sql"
--disable_query_log
select "--- Test 1 Check Load Results --" as "";
--enable_query_log
# Lets Check the tables on the Master # Lets Check the tables on the Master
SELECT COUNT(*) from t1; SELECT COUNT(*) from t1;
SELECT COUNT(*) from t2; SELECT COUNT(*) from t2;
...@@ -144,7 +164,7 @@ connection master; ...@@ -144,7 +164,7 @@ connection master;
# this test for position option # this test for position option
# By setting this position to 412, we should only get the create of t3 # By setting this position to 412, we should only get the create of t3
--disable_query_log --disable_query_log
select "--- --position --" as ""; select "--- Test 2 position test --" as "";
--enable_query_log --enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=412 $MYSQLTEST_VARDIR/log/master-bin.000001 --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=412 $MYSQLTEST_VARDIR/log/master-bin.000001
...@@ -153,7 +173,7 @@ select "--- --position --" as ""; ...@@ -153,7 +173,7 @@ select "--- --position --" as "";
# They should return the same as previous test. # They should return the same as previous test.
--disable_query_log --disable_query_log
select "--- Remote --" as ""; select "--- Test 3 First Remote test --" as "";
--enable_query_log --enable_query_log
# This is broken now # This is broken now
...@@ -162,6 +182,9 @@ select "--- Remote --" as ""; ...@@ -162,6 +182,9 @@ select "--- Remote --" as "";
# This part is disabled due to bug #17654 # This part is disabled due to bug #17654
################### Start Bug 17654 ###################### ################### Start Bug 17654 ######################
#--disable_query_log
#select "--- Test 4 Second Remote test --" as "";
#--enable_query_log
#--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql #--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql
#--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/remote.sql #--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/remote.sql
...@@ -223,7 +246,7 @@ select "--- Remote --" as ""; ...@@ -223,7 +246,7 @@ select "--- Remote --" as "";
# LOAD DATA # LOAD DATA
--disable_query_log --disable_query_log
select "--- LOAD DATA --" as ""; select "--- Test 5 LOAD DATA --" as "";
--enable_query_log --enable_query_log
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002
...@@ -231,15 +254,21 @@ select "--- LOAD DATA --" as ""; ...@@ -231,15 +254,21 @@ select "--- LOAD DATA --" as "";
# Bug#7853 (mysqlbinlog does not accept input from stdin) # Bug#7853 (mysqlbinlog does not accept input from stdin)
--disable_query_log --disable_query_log
select "--- reading stdin --" as ""; select "--- Test 6 reading stdin --" as "";
--enable_query_log --enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form - < $MYSQLTEST_VARDIR/log/master-bin.000001 --exec $MYSQL_BINLOG --short-form - < $MYSQLTEST_VARDIR/log/master-bin.000001
--disable_query_log
select "--- Test 7 reading stdin w/position --" as "";
--enable_query_log
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form --position=412 - < $MYSQLTEST_VARDIR/log/master-bin.000001 --exec $MYSQL_BINLOG --short-form --position=412 - < $MYSQLTEST_VARDIR/log/master-bin.000001
# Bug#16217 (mysql client did not know how not switch its internal charset) # Bug#16217 (mysql client did not know how not switch its internal charset)
--disable_query_log
select "--- Test 8 switch internal charset --" as "";
--enable_query_log
sync_slave_with_master; sync_slave_with_master;
#we expect STOP SLAVE to produce a warning as the slave is stopped #we expect STOP SLAVE to produce a warning as the slave is stopped
...@@ -279,6 +308,9 @@ select HEX(f) from t4; ...@@ -279,6 +308,9 @@ select HEX(f) from t4;
select HEX(f) from t05; select HEX(f) from t05;
select HEX(f) from t5; select HEX(f) from t5;
--disable_query_log
select "--- Test cleanup --" as "";
--enable_query_log
# clean up # clean up
connection master; connection master;
DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5; DROP TABLE IF EXISTS t1, t2, t3, t04, t05, t4, t5;
......
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