summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqlcheck.test
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@mysql.com>2010-10-08 12:09:47 +0500
committerAlexey Botchkov <holyfoot@mysql.com>2010-10-08 12:09:47 +0500
commit42dc7264c009fb8f32bce88b80f74bcaae6f63b4 (patch)
tree118721c53ef03f1c9d92ea6b5a9175946397d9c4 /mysql-test/t/mysqlcheck.test
parent754471060b2dfdfd4929f1b04560e3fd66755763 (diff)
downloadmariadb-git-42dc7264c009fb8f32bce88b80f74bcaae6f63b4.tar.gz
Bug#35269 mysqlcheck behaves different depending on order of parameters
Issue an error if user specifies multiple commands to run. Also there was an unnoticed bug that DO_CHECK was actually 0 which lead to wrong actions in some cases. The mysqlcheck.test contained commands with the suspicious meaning for the above reason. Extra commands removed from there. per-file commands: client/mysqlcheck.c Bug#35269 mysqlcheck behaves different depending on order of parameters Drop with an error if multiple commands. mysql-test/r/mysqlcheck.result Bug#35269 mysqlcheck behaves different depending on order of parameters result completed. mysql-test/t/mysqlcheck.test Bug#35269 mysqlcheck behaves different depending on order of parameters testcase added. not-working commands removed from some mysqlcheck calls.
Diffstat (limited to 'mysql-test/t/mysqlcheck.test')
-rw-r--r--mysql-test/t/mysqlcheck.test29
1 files changed, 23 insertions, 6 deletions
diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test
index 831aba72fb5..dd113cb4e74 100644
--- a/mysql-test/t/mysqlcheck.test
+++ b/mysql-test/t/mysqlcheck.test
@@ -23,10 +23,13 @@ drop database if exists client_test_db;
# Bug #13783 mysqlcheck tries to optimize and analyze information_schema
#
--replace_result 'Table is already up to date' OK
---exec $MYSQL_CHECK --all-databases --analyze --optimize
+--exec $MYSQL_CHECK --all-databases --analyze
+--exec $MYSQL_CHECK --all-databases --optimize
--replace_result 'Table is already up to date' OK
---exec $MYSQL_CHECK --analyze --optimize --databases test information_schema mysql
---exec $MYSQL_CHECK --analyze --optimize information_schema schemata
+--exec $MYSQL_CHECK --analyze --databases test information_schema mysql
+--exec $MYSQL_CHECK --optimize --databases test information_schema mysql
+--exec $MYSQL_CHECK --analyze information_schema schemata
+--exec $MYSQL_CHECK --optimize information_schema schemata
#
# Bug #16502: mysqlcheck tries to check views
@@ -34,9 +37,11 @@ drop database if exists client_test_db;
create table t1 (a int);
create view v1 as select * from t1;
--replace_result 'Table is already up to date' OK
---exec $MYSQL_CHECK --analyze --optimize --databases test
+--exec $MYSQL_CHECK --analyze --databases test
+--exec $MYSQL_CHECK --optimize --databases test
--replace_result 'Table is already up to date' OK
---exec $MYSQL_CHECK --all-in-1 --analyze --optimize --databases test
+--exec $MYSQL_CHECK --all-in-1 --analyze --databases test
+--exec $MYSQL_CHECK --all-in-1 --optimize --databases test
drop view v1;
drop table t1;
@@ -113,7 +118,8 @@ show tables;
let $MYSQLD_DATADIR= `select @@datadir`;
--copy_file $MYSQLD_DATADIR/test/v1.frm $MYSQLD_DATADIR/test/v-1.frm
show tables;
---exec $MYSQL_CHECK --check-upgrade --fix-table-names --databases test
+--exec $MYSQL_CHECK --check-upgrade --databases test
+--exec $MYSQL_CHECK --fix-table-names --databases test
show tables;
drop view v1, `v-1`;
drop table t1;
@@ -212,3 +218,14 @@ show tables like 't1-1';
drop table `t1-1`;
--echo End of 5.1 tests
+
+
+--echo #
+--echo # Bug #35269: mysqlcheck behaves different depending on order of parameters
+--echo #
+
+--error 13
+--exec $MYSQL_CHECK -a --fix-table-names test "#mysql50#t1-1"
+--error 1
+--exec $MYSQL_CHECK -aoc test "#mysql50#t1-1"
+