Commit 09241387 authored by Michael Widenius's avatar Michael Widenius

Fixed test failures (bugs in test suite)


mysql-test/suite/percona/percona_log_slow_slave_statements.test:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-control_global_slow.result:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-control_global_slow.test:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.result:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-log_slow_filter.test:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.result:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-log_slow_verbosity.test:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-long_query_time.result:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-long_query_time.test:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.result:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-microseconds_in_slow_query_log.test:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.result:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-min_examined_row_limit.test:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.result:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/percona/percona_slow_query_log-use_global_long_query_time.test:
  Replaced 'grep | wc -l' with 'grep -c' as output of wc -l is not portable (for example on Mac)
mysql-test/suite/rpl/r/rpl_stm_until.result:
  Updated results
mysql-test/suite/rpl/t/rpl_stm_until.test:
  Fixed random failure in test suite: master could be reading data from master-bin.00001 at the same time as test suite was changing it.
parent 1f5b93e7
......@@ -126,10 +126,10 @@ let $sync_result = `SELECT MASTER_POS_WAIT('$binlog_file',$binlog_position)`;
-- echo # Analyse master slow_query_log
let $i=7;
let $k=1;
let $cmd=cat $MASTER_DATADIR/percona_log_slow_slave_statements-master.log | grep;
let $cmd=cat $MASTER_DATADIR/percona_log_slow_slave_statements-master.log | grep -c;
while($i)
{
let $current_cmd = $cmd "INSERT INTO t VALUES ($k)" | wc -l;
let $current_cmd = $cmd "INSERT INTO t VALUES ($k)";
exec $current_cmd;
dec $i;
inc $k;
......@@ -138,10 +138,10 @@ while($i)
-- echo # Analyse slave slow_query_log
let $i=7;
let $k=1;
let $cmd=cat $SLAVE_DATADIR/percona_log_slow_slave_statements-slave.log | grep;
let $cmd=cat $SLAVE_DATADIR/percona_log_slow_slave_statements-slave.log | grep -c;
while($i)
{
let $current_cmd = $cmd "INSERT INTO t VALUES ($k)" | wc -l;
let $current_cmd = $cmd "INSERT INTO t VALUES ($k)";
exec $current_cmd;
dec $i;
inc $k;
......
......@@ -8,5 +8,5 @@ sleep(2)
0
set global use_global_log_slow_control=none;
set global log_slow_verbosity=microtime;
cat MYSQLD_DATADIR/percona_slow_query_log-control_global_slow.log | grep "No InnoDB statistics available for this query" | wc -l
cat MYSQLD_DATADIR/percona_slow_query_log-control_global_slow.log | grep -c "No InnoDB statistics available for this query"
1
......@@ -6,7 +6,7 @@ SELECT sleep(2);
set global use_global_log_slow_control=none;
set global log_slow_verbosity=microtime;
let $MYSQLD_DATADIR= `select @@datadir`;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-control_global_slow.log | grep "No InnoDB statistics available for this query" | wc -l;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-control_global_slow.log | grep -c "No InnoDB statistics available for this query";
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
exec echo '$cmd';
exec $cmd;
......@@ -21,5 +21,5 @@ SELECT sleep(2);
sleep(2)
0
drop table if exists t;
cat MYSQLD_DATADIR/percona_slow_query_log-log_slow_filter.log | grep Query_time | wc -l
cat MYSQLD_DATADIR/percona_slow_query_log-log_slow_filter.log | grep -c Query_time
2
......@@ -27,7 +27,7 @@ drop table if exists t;
--enable_warnings
let $MYSQLD_DATADIR= `select @@datadir`;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-log_slow_filter.log | grep Query_time | wc -l;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-log_slow_filter.log | grep -c Query_time;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
exec echo '$cmd';
exec $cmd;
......@@ -5,5 +5,5 @@ set log_slow_verbosity=innodb;
SELECT sleep(2);
sleep(2)
0
cat MYSQLD_DATADIR/percona_slow_query_log-log_slow_verbosity.log | grep "No InnoDB statistics available for this query" | wc -l
cat MYSQLD_DATADIR/percona_slow_query_log-log_slow_verbosity.log | grep -c "No InnoDB statistics available for this query"
1
......@@ -7,7 +7,7 @@ set log_slow_verbosity=innodb;
SELECT sleep(2);
let $MYSQLD_DATADIR= `select @@datadir`;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-log_slow_verbosity.log | grep "No InnoDB statistics available for this query" | wc -l;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-log_slow_verbosity.log | grep -c "No InnoDB statistics available for this query";
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
exec echo '$cmd';
exec $cmd;
......@@ -18,5 +18,5 @@ SELECT sleep(5);
sleep(5)
0
set long_query_time=2;
cat MYSQLD_DATADIR/percona_slow_query_log-long_query_time.log | grep Query_time | wc -l
cat MYSQLD_DATADIR/percona_slow_query_log-long_query_time.log | grep -c Query_time
3
......@@ -13,7 +13,7 @@ SELECT sleep(5);
set long_query_time=2;
let $MYSQLD_DATADIR= `select @@datadir`;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-long_query_time.log | grep Query_time | wc -l;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-long_query_time.log | grep -c Query_time;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
exec echo '$cmd';
exec $cmd;
......@@ -6,7 +6,7 @@ SELECT sleep(2);
sleep(2)
0
set global slow_query_log_microseconds_timestamp=OFF;
cat MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+.[0-9]+' | wc -l
cat MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+.[0-9]+'
1
cat MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+' | wc -l
cat MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+'
2
......@@ -9,12 +9,12 @@ SELECT sleep(2);
set global slow_query_log_microseconds_timestamp=OFF;
let $MYSQLD_DATADIR= `select @@datadir`;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+.[0-9]+' | wc -l;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+.[0-9]+';
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
exec echo "$cmd";
exec $cmd;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+' | wc -l;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-microseconds_in_slow_query_log.log | grep -E -c '# Time: [0-9]+[ ]+[0-9]+:[0-\9]+:[0-9]+';
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
exec echo "$cmd";
exec $cmd;
......@@ -21,5 +21,5 @@ SELECT sleep(2);
sleep(2)
0
drop table if exists t;
cat MYSQLD_DATADIR/percona_slow_query_log-min_examined_row_limit.log | grep Query_time | wc -l
cat MYSQLD_DATADIR/percona_slow_query_log-min_examined_row_limit.log | grep -c Query_time
2
......@@ -27,7 +27,7 @@ drop table if exists t;
--enable_warnings
let $MYSQLD_DATADIR= `select @@datadir`;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-min_examined_row_limit.log | grep Query_time | wc -l;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-min_examined_row_limit.log | grep -c Query_time;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
exec echo '$cmd';
exec $cmd;
......@@ -20,5 +20,5 @@ sleep(5)
0
set global long_query_time=2;
set global use_global_long_query_time=0;
cat MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time.log | grep Query_time | wc -l
cat MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time.log | grep -c Query_time
3
......@@ -15,7 +15,7 @@ set global long_query_time=2;
set global use_global_long_query_time=0;
let $MYSQLD_DATADIR= `select @@datadir`;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time.log | grep Query_time | wc -l;
let $cmd = cat $MYSQLD_DATADIR/percona_slow_query_log-use_global_long_query_time.log | grep -c Query_time;
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
exec echo '$cmd';
exec $cmd;
......@@ -93,8 +93,9 @@ start slave;
drop table if exists t1;
Warnings:
Note 1051 Unknown table 't1'
flush logs;
stop slave;
flush logs;
flush logs;
reset slave;
start slave until master_log_file='master-bin.000001', master_log_pos=294 /* to stop right before DROP */;
show tables /* t1 must exist */;
......
......@@ -196,13 +196,18 @@ sync_with_master;
connection master;
drop table if exists t1; # there is create table t1 in bug47142_master-bin.000001
sync_slave_with_master;
connection slave;
stop slave;
connection master;
flush logs;
let $MYSQLD_DATADIR= `select @@datadir`;
--remove_file $MYSQLD_DATADIR/master-bin.000001
--copy_file $MYSQL_TEST_DIR/std_data/bug47142_master-bin.000001 $MYSQLD_DATADIR/master-bin.000001
flush logs;
connection slave;
stop slave;
reset slave;
start slave until master_log_file='master-bin.000001', master_log_pos=294 /* to stop right before DROP */;
--source include/wait_for_slave_sql_to_stop.inc
......
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