diff options
author | Patrick Crews <patrick.crews@sun.com> | 2009-02-19 15:37:40 -0500 |
---|---|---|
committer | Patrick Crews <patrick.crews@sun.com> | 2009-02-19 15:37:40 -0500 |
commit | 79300d6f7fb5cd22b9d3c2d14b6eb443e2ae28ed (patch) | |
tree | 3c5612c250539e8247653a8c257cb8969d10d5bf /mysql-test/t/mysqlbinlog.test | |
parent | ddf6ac40ea0f3290c148b3009069a22f12ab6e70 (diff) | |
download | mariadb-git-79300d6f7fb5cd22b9d3c2d14b6eb443e2ae28ed.tar.gz |
Bug#38831: 11 test cases fail on Windows due to missing commands
Replaced Unix calls with mysql-test-run's built-in functions / SQL manipulation where possible.
Replaced error codes with error names as well.
Disabled two tests on Windows due to more complex Unix command usage
See Bug#41307, Bug#41308
Diffstat (limited to 'mysql-test/t/mysqlbinlog.test')
-rw-r--r-- | mysql-test/t/mysqlbinlog.test | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 5b4a43c8fe8..1f3d0fed334 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -1,7 +1,9 @@ # We are using .opt file since we need small binlog size - -- source include/have_log_bin.inc +# Currently disabling this test on Windows due to use of grep and sed +--source include/not_windows.inc + # we need this for getting fixed timestamps inside of this test set timestamp=1000000000; @@ -174,7 +176,8 @@ delimiter ;// flush logs; call p1(); drop procedure p1; ---error 1305 +--error ER_SP_DOES_NOT_EXIST + call p1(); --replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ --exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000007 @@ -226,7 +229,26 @@ flush logs; INSERT INTO t1 VALUES ('0123456789'); flush logs; DROP TABLE t1; ---exec $MYSQL_BINLOG --hexdump --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000011 | grep 'Query' | sed 's/[0-9]\{1,\}/REMOVED/g' + +# We create a table, patch, and load the output into it +# By using LINES STARTING BY '#' + SELECT WHERE a LIKE 'Query' +# We can easily see if a 'Query' line is missing the '#' character +# as described in the original bug + +--disable_query_log +CREATE TABLE patch (a blob); +--exec $MYSQL_BINLOG --hexdump --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000011 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_tmp.dat +eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/mysqlbinlog_tmp.dat' + INTO TABLE patch FIELDS TERMINATED by '' LINES STARTING BY '#'; +--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_tmp.dat +--enable_query_log + +--echo We expect this value to be 1 +--echo The bug being tested was that 'Query' lines were not preceded by '#' +--echo If the line is in the table, it had to have been preceded by a '#' +--echo +SELECT COUNT(*) AS `BUG#28293_expect_1` FROM patch WHERE a LIKE '%Query%'; +DROP TABLE patch; # # Bug #29928: incorrect connection_id() restoring from mysqlbinlog out |