Commit 2f0d7240 authored by Michael Widenius's avatar Michael Widenius

Don't delete directory mysql-test/var if we use mysql-test-run --vardir=

Fixed error in Maria unittest
Fixes other issues found by test case for lp:700623 "Aria recovery: ma_blockrec.c:3930: _ma_update_at_original_place: Assertion `block->org_bitmap_value == .."
Fixes lp:670356 "Aria table "is marked as crashed and should be repaired"



mysql-test/lib/v1/mysql-test-run.pl:
  Don't delete directory mysql-test/var if we use mysql-test-run --vardir=
mysql-test/mysql-test-run.pl:
  Don't delete directory mysql-test/var if we use mysql-test-run --vardir=
  (Needed to be able to run multiple concurrent mysql-test-run's/randgen on the same server)
  Added extra supression
storage/maria/ma_pagecache.c:
  Removed duplicate DBUG_PRINT information
  Added KEYCACHE_PRINT for printing information that was already printed to DBUG log (to get rid of some duplicated output)
  More comments
  Fixed bug that caused page block to be used by two treads at the same time (with different page information)
  Mark block->status with PCBLOCK_DIRECT_W independent of the block is changed or not. (Safety fix)
storage/maria/maria_chk.c:
  Better --help
storage/maria/unittest/ma_test_recovery.pl:
  Ignore differences in 'recover time'.
  Fixed error in Maria unittest
parent 90741c0d
...@@ -2407,8 +2407,8 @@ sub remove_stale_vardir () { ...@@ -2407,8 +2407,8 @@ sub remove_stale_vardir () {
# Remove the var/ dir in mysql-test dir if any # Remove the var/ dir in mysql-test dir if any
# this could be an old symlink that shouldn't be there # this could be an old symlink that shouldn't be there
mtr_verbose("Removing $default_vardir"); # mtr_verbose("Removing $default_vardir");
mtr_rmtree($default_vardir); # mtr_rmtree($default_vardir);
# Remove the "var" dir # Remove the "var" dir
mtr_verbose("Removing $opt_vardir/"); mtr_verbose("Removing $opt_vardir/");
......
...@@ -2290,10 +2290,10 @@ sub remove_stale_vardir () { ...@@ -2290,10 +2290,10 @@ sub remove_stale_vardir () {
# Running with "var" in some other place # Running with "var" in some other place
# #
# Remove the var/ dir in mysql-test dir if any # Don't remove the var/ dir in mysql-test dir as it may be in
# this could be an old symlink that shouldn't be there # use by another mysql-test-run run with --vardir
mtr_verbose("Removing $default_vardir"); # mtr_verbose("Removing $default_vardir");
rmtree($default_vardir); # rmtree($default_vardir);
# Remove the "var" dir # Remove the "var" dir
mtr_verbose("Removing $opt_vardir/"); mtr_verbose("Removing $opt_vardir/");
...@@ -4315,6 +4315,7 @@ sub extract_warning_lines ($) { ...@@ -4315,6 +4315,7 @@ sub extract_warning_lines ($) {
qr/Plugin 'ndbcluster' will be forced to shutdown/, qr/Plugin 'ndbcluster' will be forced to shutdown/,
qr/InnoDB: Error: in ALTER TABLE `test`.`t[12]`/, qr/InnoDB: Error: in ALTER TABLE `test`.`t[12]`/,
qr/InnoDB: Error: table `test`.`t[12]` does not exist in the InnoDB internal/, qr/InnoDB: Error: table `test`.`t[12]` does not exist in the InnoDB internal/,
qr/InnoDB: Warning: a long semaphore wait:/,
qr/Slave: Unknown table 't1' Error_code: 1051/, qr/Slave: Unknown table 't1' Error_code: 1051/,
qr/Slave SQL:.*(Error_code: [[:digit:]]+|Query:.*)/, qr/Slave SQL:.*(Error_code: [[:digit:]]+|Query:.*)/,
qr/slave SQL thread aborted/, qr/slave SQL thread aborted/,
......
This diff is collapsed.
...@@ -345,9 +345,11 @@ static struct my_option my_long_options[] = ...@@ -345,9 +345,11 @@ static struct my_option my_long_options[] =
&opt_transaction_logging, &opt_transaction_logging, &opt_transaction_logging, &opt_transaction_logging,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"update-state", 'U', {"update-state", 'U',
"Mark tables as crashed if any errors were found and clean if check didn't " "Mark tables as crashed if any errors were found and clean if check "
"find any errors. This allows one to get rid of warnings like 'table not " "didn't find any errors but table was marked as 'not clean' before. This "
"properly closed'", "allows one to get rid of warnings like 'table not properly closed'. "
"If table was updated, update also the timestamp for when check was made. "
"This option is on by default!",
&opt_update_state, &opt_update_state, 0, GET_BOOL, NO_ARG, &opt_update_state, &opt_update_state, 0, GET_BOOL, NO_ARG,
1, 0, 0, 0, 0, 0}, 1, 0, 0, 0, 0, 0},
{"unpack", 'u', {"unpack", 'u',
...@@ -485,7 +487,13 @@ static void usage(void) ...@@ -485,7 +487,13 @@ static void usage(void)
-m, --medium-check Faster than extend-check, but only finds 99.99% of\n\ -m, --medium-check Faster than extend-check, but only finds 99.99% of\n\
all errors. Should be good enough for most cases.\n\ all errors. Should be good enough for most cases.\n\
-T, --read-only Don't mark table as checked.\n\ -T, --read-only Don't mark table as checked.\n\
-U, --update-state Mark tables as crashed if you find any errors.\n\ -U, --update-state Mark tables as crashed if any errors were found and\n\
clean if check didn't find any errors but table was\n\
marked as 'not clean' before. This allows one to get\n\
rid of warnings like 'table not properly closed'. If\n\
table was updated, update also the timestamp for when\n\
the check was made. This option is on by default!\n\
use --skip-update-state to disable.\n\
--warning-for-wrong-transaction-id\n\ --warning-for-wrong-transaction-id\n\
Give a warning if we find a transaction id in the table that is bigger\n\ Give a warning if we find a transaction id in the table that is bigger\n\
than what exists in the control file. Use --skip-... to disable warning\n\ than what exists in the control file. Use --skip-... to disable warning\n\
......
...@@ -114,7 +114,7 @@ sub main ...@@ -114,7 +114,7 @@ sub main
die("can't guess table name"); die("can't guess table name");
} }
$com= "$maria_exe_path/maria_chk$suffix -dvv $table "; $com= "$maria_exe_path/maria_chk$suffix -dvv $table ";
$com.= "| grep -v \"Creation time:\" | grep -v \"file length\" | grep -v \"LSNs:\" | grep -v \"UUID:\""; $com.= "| grep -v \"Creation time:\" | grep -v \"recover time:\" | grep -v \"file length\" | grep -v \"LSNs:\" | grep -v \"UUID:\"";
$com.= "> $tmp/maria_chk_message.good.txt 2>&1"; $com.= "> $tmp/maria_chk_message.good.txt 2>&1";
my_exec($com); my_exec($com);
my $checksum= my_exec("$maria_exe_path/maria_chk$suffix -dss $table"); my $checksum= my_exec("$maria_exe_path/maria_chk$suffix -dss $table");
...@@ -197,7 +197,7 @@ sub main ...@@ -197,7 +197,7 @@ sub main
die("can't guess table name"); die("can't guess table name");
} }
$com= "$maria_exe_path/maria_chk$suffix -dvv $table "; $com= "$maria_exe_path/maria_chk$suffix -dvv $table ";
$com.= "| grep -v \"Creation time:\" | grep -v \"file length\" | grep -v \"LSNs:\" | grep -v \"UUID:\" "; $com.= "| grep -v \"Creation time:\" | grep -v \"recover time:\" | grep -v \"recover time:\" |grep -v \"file length\" | grep -v \"LSNs:\" | grep -v \"UUID:\" ";
$com.= "> $tmp/maria_chk_message.good.txt 2>&1"; $com.= "> $tmp/maria_chk_message.good.txt 2>&1";
$res= my_exec($com); $res= my_exec($com);
print MY_LOG $res; print MY_LOG $res;
...@@ -296,7 +296,7 @@ sub check_table_is_same ...@@ -296,7 +296,7 @@ sub check_table_is_same
print "checking if table $table has changed\n"; print "checking if table $table has changed\n";
} }
$com= "$maria_exe_path/maria_chk$suffix -dvv $table | grep -v \"Creation time:\" "; $com= "$maria_exe_path/maria_chk$suffix -dvv $table | grep -v \"Creation time:\" | grep -v \"recover time:\"";
$com.= "| grep -v \"file length\" | grep -v \"LSNs:\" | grep -v \"UUID:\" > $tmp/maria_chk_message.txt 2>&1"; $com.= "| grep -v \"file length\" | grep -v \"LSNs:\" | grep -v \"UUID:\" > $tmp/maria_chk_message.txt 2>&1";
$res= `$com`; $res= `$com`;
print MY_LOG $res; print MY_LOG $res;
...@@ -415,7 +415,7 @@ sub physical_cmp ...@@ -415,7 +415,7 @@ sub physical_cmp
# save original tables to restore them later # save original tables to restore them later
copy("$table.MAD", "$tmp/before_zerofill$table_no.MAD") || die(); copy("$table.MAD", "$tmp/before_zerofill$table_no.MAD") || die();
copy("$table.MAI", "$tmp/before_zerofill$table_no.MAI") || die(); copy("$table.MAI", "$tmp/before_zerofill$table_no.MAI") || die();
$com= "$maria_exe_path/maria_chk$suffix -ss --zerofill-keep-lsn $table"; $com= "$maria_exe_path/maria_chk$suffix -ss --zerofill-keep-lsn --skip-update-state $table";
$res= `$com`; $res= `$com`;
print MY_LOG $res; print MY_LOG $res;
$table_no= $table_no + 1; $table_no= $table_no + 1;
......
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