summaryrefslogtreecommitdiff
path: root/mysql-test/suite/maria/t/maria-recover.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/maria/t/maria-recover.test')
-rw-r--r--mysql-test/suite/maria/t/maria-recover.test17
1 files changed, 13 insertions, 4 deletions
diff --git a/mysql-test/suite/maria/t/maria-recover.test b/mysql-test/suite/maria/t/maria-recover.test
index 63e764a3b0e..b9cec2eadf1 100644
--- a/mysql-test/suite/maria/t/maria-recover.test
+++ b/mysql-test/suite/maria/t/maria-recover.test
@@ -2,6 +2,14 @@
--source include/have_maria.inc
+call mtr.add_suppression("Checking table: '.\/mysqltest\/t_corrupted2'");
+call mtr.add_suppression("Recovering table: '.\/mysqltest\/t_corrupted2'");
+call mtr.add_suppression("Table '.\/mysqltest\/t_corrupted2' is marked as crashed and should be repaired");
+
+# Note: we're setting an environment variable (not prefixing it by $),
+# so that the perl code below can access it.
+let MYSQLD_DATADIR= `select @@datadir`;
+
select @@global.maria_recover;
set global maria_recover=off;
select @@global.maria_recover;
@@ -28,9 +36,9 @@ insert into t1 select concat(a,'b') from t1 limit 1;
# a specific name to do specific detection (don't want to ignore
# any corruption messages of other tests using "t2" as table).
-copy_file $MYSQLTEST_VARDIR/master-data/mysqltest/t1.frm $MYSQLTEST_VARDIR/master-data/mysqltest/t_corrupted2.frm;
-copy_file $MYSQLTEST_VARDIR/master-data/mysqltest/t1.MAD $MYSQLTEST_VARDIR/master-data/mysqltest/t_corrupted2.MAD;
-copy_file $MYSQLTEST_VARDIR/master-data/mysqltest/t1.MAI $MYSQLTEST_VARDIR/master-data/mysqltest/t_corrupted2.MAI;
+copy_file $MYSQLD_DATADIR/mysqltest/t1.frm $MYSQLD_DATADIR/mysqltest/t_corrupted2.frm;
+copy_file $MYSQLD_DATADIR/mysqltest/t1.MAD $MYSQLD_DATADIR/mysqltest/t_corrupted2.MAD;
+copy_file $MYSQLD_DATADIR/mysqltest/t1.MAI $MYSQLD_DATADIR/mysqltest/t_corrupted2.MAI;
# Ruin the index file.
# If maria-block-size is smaller than the default, the corruption
@@ -38,7 +46,7 @@ copy_file $MYSQLTEST_VARDIR/master-data/mysqltest/t1.MAI $MYSQLTEST_VARDIR/maste
perl;
use strict;
use warnings;
- my $fname= "$ENV{'MYSQLTEST_VARDIR'}/master-data/mysqltest/t_corrupted2.MAI";
+ my $fname= "$ENV{'MYSQLD_DATADIR'}/mysqltest/t_corrupted2.MAI";
open(FILE, "+<", $fname) or die;
my $whatever= ("\xAB" x 100);
sysseek (FILE, 8192, 0) or die;
@@ -54,3 +62,4 @@ enable_ps_protocol;
select * from t_corrupted2; # should show just rows
drop database mysqltest;
+set global maria_recover=backup;