Commit 8c83f14b authored by patg@radha.local's avatar patg@radha.local

BUG #12253. Fixed logic the prevented repair when "--fast" was included

in invoking mysqlcheck.
parent 978d67a9
...@@ -575,8 +575,13 @@ static void print_result() ...@@ -575,8 +575,13 @@ static void print_result()
if (status) if (status)
{ {
/*
if there was an error with the table, we have --auto-repair set,
and this isn't a repair op, then add the table to the tables4repair
list
*/
if (found_error && opt_auto_repair && what_to_do != DO_REPAIR && if (found_error && opt_auto_repair && what_to_do != DO_REPAIR &&
(!opt_fast || strcmp(row[3],"OK"))) strcmp(row[3],"OK"))
insert_dynamic(&tables4repair, prev); insert_dynamic(&tables4repair, prev);
found_error=0; found_error=0;
if (opt_silent) if (opt_silent)
...@@ -595,8 +600,8 @@ static void print_result() ...@@ -595,8 +600,8 @@ static void print_result()
strmov(prev, row[0]); strmov(prev, row[0]);
putchar('\n'); putchar('\n');
} }
if (found_error && opt_auto_repair && what_to_do != DO_REPAIR && /* add the last table to be repaired to the list */
!opt_fast) if (found_error && opt_auto_repair && what_to_do != DO_REPAIR)
insert_dynamic(&tables4repair, prev); insert_dynamic(&tables4repair, prev);
mysql_free_result(res); mysql_free_result(res);
} }
......
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