diff options
author | unknown <hhunger@hh-nb.hungers> | 2008-02-07 20:31:15 +0100 |
---|---|---|
committer | unknown <hhunger@hh-nb.hungers> | 2008-02-07 20:31:15 +0100 |
commit | 6262c056fa8cff69073d3f9f58692d64ec4d2b60 (patch) | |
tree | 0c9e8af858a60b4a0c24e6579daa625b860c30a1 /mysql-test/t | |
parent | 14d2ebe667de95614b871be48aa14407de92c6c3 (diff) | |
parent | 7fa01f84e389eaa097b6351402321c41ef24677a (diff) | |
download | mariadb-git-6262c056fa8cff69073d3f9f58692d64ec4d2b60.tar.gz |
Merge hh-nb.hungers:/work/trees/mysql-5.1-build-src-clean
into hh-nb.hungers:/work/merge/mysql-5.1-build
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/bdb_notembedded.test | 38 | ||||
-rw-r--r-- | mysql-test/t/binlog_unsafe.test | 18 | ||||
-rw-r--r-- | mysql-test/t/mysqlbinlog.test | 39 | ||||
-rw-r--r-- | mysql-test/t/mysqlbinlog2.test | 2 |
4 files changed, 40 insertions, 57 deletions
diff --git a/mysql-test/t/bdb_notembedded.test b/mysql-test/t/bdb_notembedded.test deleted file mode 100644 index 24e64ebbfb2..00000000000 --- a/mysql-test/t/bdb_notembedded.test +++ /dev/null @@ -1,38 +0,0 @@ --- source include/not_embedded.inc --- source include/have_bdb.inc - -# -# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode -# -set autocommit=1; - -let $VERSION=`select version()`; - -reset master; -create table bug16206 (a int); -insert into bug16206 values(1); -start transaction; -insert into bug16206 values(2); -commit; ---replace_result $VERSION VERSION ---replace_column 1 f 2 n 5 n -show binlog events; -drop table bug16206; - -reset master; -create table bug16206 (a int) engine= bdb; -insert into bug16206 values(0); -insert into bug16206 values(1); -start transaction; -insert into bug16206 values(2); -commit; -insert into bug16206 values(3); ---replace_result $VERSION VERSION ---replace_column 1 f 2 n 5 n -show binlog events; -drop table bug16206; - -set autocommit=0; - - ---echo End of 5.0 tests diff --git a/mysql-test/t/binlog_unsafe.test b/mysql-test/t/binlog_unsafe.test deleted file mode 100644 index f34c22dc5f7..00000000000 --- a/mysql-test/t/binlog_unsafe.test +++ /dev/null @@ -1,18 +0,0 @@ -# Test to check that a warning is generated for unsafe statements -# executed under statement mode logging. - -source include/have_log_bin.inc; - -SET BINLOG_FORMAT=STATEMENT; - -CREATE TABLE t1 (a CHAR(40)); -CREATE TABLE t2 (a INT AUTO_INCREMENT PRIMARY KEY); -CREATE TABLE t3 (b INT AUTO_INCREMENT PRIMARY KEY); -CREATE VIEW v1(a,b) AS SELECT a,b FROM t2,t3; - -INSERT INTO t1 SELECT UUID(); -query_vertical SHOW WARNINGS; - -DROP TABLE t1,t2,t3; - - diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 1afc105e34e..eb364c60e71 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -43,6 +43,7 @@ select "--- Local --" as ""; # --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000001 # this should not fail but shouldn't produce any working statements @@ -50,6 +51,7 @@ select "--- Local --" as ""; select "--- Broken LOAD DATA --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000002 2> /dev/null # this should show almost nothing @@ -57,6 +59,7 @@ select "--- Broken LOAD DATA --" as ""; select "--- --database --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --database=nottest $MYSQLTEST_VARDIR/log/master-bin.000001 2> /dev/null # this test for position option @@ -64,6 +67,7 @@ select "--- --database --" as ""; select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=239 $MYSQLTEST_VARDIR/log/master-bin.000002 # These are tests for remote binlog. @@ -75,6 +79,7 @@ select "--- Remote --" as ""; # This is broken now --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --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.000001 # This is broken too @@ -82,6 +87,7 @@ select "--- Remote --" as ""; select "--- Broken LOAD DATA --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --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 2> /dev/null # And this too ! (altough it is documented) @@ -89,6 +95,7 @@ select "--- Broken LOAD DATA --" as ""; select "--- --database --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT --database=nottest master-bin.000001 2> /dev/null # Strangely but this works @@ -96,6 +103,7 @@ select "--- --database --" as ""; select "--- --position --" as ""; --enable_query_log --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --read-from-remote-server --position=239 --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000002 # Bug#7853 (mysqlbinlog does not accept input from stdin) @@ -103,9 +111,11 @@ select "--- --position --" as ""; select "--- reading stdin --" as ""; --enable_query_log --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form --position=79 - < $MYSQL_TEST_DIR/std_data/trunc_binlog.000001 drop table t1,t2; @@ -169,6 +179,7 @@ call p1(); drop procedure p1; --error 1305 call p1(); +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000008 --exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000008 | $MYSQL call p1(); @@ -204,6 +215,7 @@ select hex(a) from t1; drop table t1; flush logs; --replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000010 # @@ -282,4 +294,31 @@ connection default; DROP DATABASE mysqltest1; DROP USER untrusted@localhost; +--echo BUG#32580: mysqlbinlog cannot read binlog event with user variables + +# Testing that various kinds of events can be read and restored properly. + +connection default; +USE test; +SET BINLOG_FORMAT = STATEMENT; +FLUSH LOGS; +CREATE TABLE t1 (a_real FLOAT, an_int INT, a_decimal DECIMAL(5,2), a_string CHAR(32)); +SET @a_real = rand(20) * 1000; +SET @an_int = 1000; +SET @a_decimal = CAST(rand(19) * 999 AS DECIMAL(5,2)); +SET @a_string = 'Just a test'; +INSERT INTO t1 VALUES (@a_real, @an_int, @a_decimal, @a_string); +FLUSH LOGS; +query_vertical SELECT * FROM t1; +DROP TABLE t1; + +echo >> mysqlbinlog var/log/master-bin.000019 > var/tmp/bug32580.sql; +exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000019 > $MYSQLTEST_VARDIR/tmp/bug32580.sql; +echo >> mysql test < var/tmp/bug32580.sql; +exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug32580.sql; +remove_file $MYSQLTEST_VARDIR/tmp/bug32580.sql; + +query_vertical SELECT * FROM t1; +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test index be9397aafee..2ac16f4c590 100644 --- a/mysql-test/t/mysqlbinlog2.test +++ b/mysql-test/t/mysqlbinlog2.test @@ -42,7 +42,7 @@ select "--- Local --" as ""; # --replace_regex /[[:<:]][0-9]{6} [0-9 ][0-9]:[0-9]{2}:[0-9]{2}[[:>:]]/{yymmdd} {HH:MM:SS}/ /=[0-9]+ /={integer} / /# at [0-9]+/# at {pos}/ /(pos:?) [0-9]+/\1 {pos}/ /binlog v [0-9]+, server v [^ ]* created/binlog v #, server v ## created/ ---exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 +--exec $MYSQL_BINLOG --base64-output=never $MYSQLTEST_VARDIR/log/master-bin.000001 --disable_query_log select "--- offset --" as ""; |