Commit 535b514e authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-8123 mysqlcheck: new --process-views option conflicts with --quick, --extended and such

parent 64569fa8
......@@ -861,11 +861,19 @@ static int handle_request_for_tables(char *tables, size_t length, my_bool view)
switch (what_to_do) {
case DO_CHECK:
op = "CHECK";
if (opt_quick) end = strmov(end, " QUICK");
if (opt_fast) end = strmov(end, " FAST");
if (opt_medium_check) end = strmov(end, " MEDIUM"); /* Default */
if (opt_extended) end = strmov(end, " EXTENDED");
if (opt_check_only_changed) end = strmov(end, " CHANGED");
if (view)
{
if (opt_fast || opt_check_only_changed)
DBUG_RETURN(0);
}
else
{
if (opt_quick) end = strmov(end, " QUICK");
if (opt_fast) end = strmov(end, " FAST");
if (opt_extended) end = strmov(end, " EXTENDED");
if (opt_medium_check) end = strmov(end, " MEDIUM"); /* Default */
if (opt_check_only_changed) end = strmov(end, " CHANGED");
}
if (opt_upgrade) end = strmov(end, " FOR UPGRADE");
break;
case DO_REPAIR:
......
......@@ -316,3 +316,17 @@ CREATE TABLE test.`t.1` (id int);
mysqlcheck test t.1
test.t.1 OK
drop table test.`t.1`;
create view v1 as select 1;
mysqlcheck --process-views test
test.v1 OK
mysqlcheck --process-views --extended test
test.v1 OK
mysqlcheck --process-views --fast test
mysqlcheck --process-views --quick test
test.v1 OK
mysqlcheck --process-views --check-only-changed test
mysqlcheck --process-views --medium-check test
test.v1 OK
mysqlcheck --process-views --check-upgrade test
test.v1 OK
drop view v1;
......@@ -323,3 +323,24 @@ CREATE TABLE test.`t.1` (id int);
--exec $MYSQL_CHECK test t.1
drop table test.`t.1`;
#
# MDEV-8123 mysqlcheck: new --process-views option conflicts with --quick, --extended and such
#
create view v1 as select 1;
--echo mysqlcheck --process-views test
--exec $MYSQL_CHECK --process-views test
--echo mysqlcheck --process-views --extended test
--exec $MYSQL_CHECK --process-views --extended test
--echo mysqlcheck --process-views --fast test
--exec $MYSQL_CHECK --process-views --fast test
--echo mysqlcheck --process-views --quick test
--exec $MYSQL_CHECK --process-views --quick test
--echo mysqlcheck --process-views --check-only-changed test
--exec $MYSQL_CHECK --process-views --check-only-changed test
--echo mysqlcheck --process-views --medium-check test
--exec $MYSQL_CHECK --process-views --medium-check test
--echo mysqlcheck --process-views --check-upgrade test
--exec $MYSQL_CHECK --process-views --check-upgrade test
drop view v1;
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