Skip to content

Commit c427095

Browse files
committed
MariaRocks port: fix rocksdb.rocksdb_checksums to work for MariaDB in the mornings
MySQL's log entries start with log entries like YYYY-MM-DD 08:25:04 ... while MariaDB YYYY-MM-DD 8:25:04 ... note that '08' turns into ' 8'. Made grep pattern to account for this.
1 parent 0f1821d commit c427095

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.test

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ show variables like 'rocksdb_%checksum%';
2222
create table t1 (pk int primary key, a int, b int, key(a), key(b)) engine=rocksdb;
2323
insert into t1 values (1,1,1),(2,2,2),(3,3,3);
2424
check table t1;
25-
--exec grep "^[0-9-]* [0-9:]* [0-9]* \[Note\] CHECKTABLE t1" $MYSQLTEST_VARDIR/log/mysqld.1.err | cut -d] -f2
25+
--exec grep "^[0-9-]* \?[0-9:]* [0-9]* \[Note\] CHECKTABLE t1" $MYSQLTEST_VARDIR/log/mysqld.1.err | cut -d] -f2
2626

2727
drop table t1;
2828

2929
set session rocksdb_store_checksums=on;
3030
create table t2 (pk int primary key, a int, b int, key(a), key(b)) engine=rocksdb;
3131
insert into t2 values (1,1,1),(2,2,2),(3,3,3);
3232
check table t2;
33-
--exec grep "^[0-9-]* [0-9:]* [0-9]* \[Note\] CHECKTABLE t2" $MYSQLTEST_VARDIR/log/mysqld.1.err | cut -d] -f2
33+
--exec grep "^[0-9-]* \?[0-9:]* [0-9]* \[Note\] CHECKTABLE t2" $MYSQLTEST_VARDIR/log/mysqld.1.err | cut -d] -f2
3434

3535
--echo # Now, make a table that has both rows with checksums and without
3636
create table t3 (pk int primary key, a int, b int, key(a), key(b)) engine=rocksdb;
@@ -39,7 +39,7 @@ set session rocksdb_store_checksums=off;
3939
update t3 set b=3 where a=2;
4040
set session rocksdb_store_checksums=on;
4141
check table t3;
42-
--exec grep "^[0-9-]* [0-9:]* [0-9]* \[Note\] CHECKTABLE t3" $MYSQLTEST_VARDIR/log/mysqld.1.err | cut -d] -f2
42+
--exec grep "^[0-9-]* \?[0-9:]* [0-9]* \[Note\] CHECKTABLE t3" $MYSQLTEST_VARDIR/log/mysqld.1.err | cut -d] -f2
4343

4444
set session rocksdb_store_checksums=on;
4545
set session rocksdb_checksums_pct=5;
@@ -56,7 +56,7 @@ while ($i<10000)
5656
}
5757
--enable_query_log
5858
check table t4;
59-
--exec grep "^[0-9-]* [0-9:]* [0-9]* \[Note\] CHECKTABLE t4" $MYSQLTEST_VARDIR/log/mysqld.1.err | cut -d] -f2 > $MYSQL_TMP_DIR/rocksdb_checksums.log
59+
--exec grep "^[0-9-]* \?[0-9:]* [0-9]* \[Note\] CHECKTABLE t4" $MYSQLTEST_VARDIR/log/mysqld.1.err | cut -d] -f2 > $MYSQL_TMP_DIR/rocksdb_checksums.log
6060
--exec perl ../storage/rocksdb/mysql-test/rocksdb/t/rocksdb_checksums.pl $MYSQL_TMP_DIR/rocksdb_checksums.log 10000 5
6161
--remove_file $MYSQL_TMP_DIR/rocksdb_checksums.log
6262
set session rocksdb_checksums_pct=100;

0 commit comments

Comments
 (0)