diff options
author | Shishir Jaiswal <shishir.j.jaiswal@oracle.com> | 2015-10-29 13:35:32 +0530 |
---|---|---|
committer | Shishir Jaiswal <shishir.j.jaiswal@oracle.com> | 2015-10-29 13:35:32 +0530 |
commit | 1942506b82897e498493cc3ec274a2b402c4d105 (patch) | |
tree | fe010c575f6c436a997c5076ac36c0e151a62faa /mysql-test | |
parent | a60740607c9581ed2bf92bdd087139ea8d872484 (diff) | |
download | mariadb-git-1942506b82897e498493cc3ec274a2b402c4d105.tar.gz |
DESCRIPTION
===========
When doing an upgrade, you execute mysql_upgrade. If
mysql_upgrade fails to connect or it connects with a user
without the proper privileges, it will return the error:
FATAL ERROR: Upgrade failed
which is not very informative.
ANALYSIS
========
In main() and check_version_match(), the condition for
errors are clubbed together and throw the same error msg.
The functions need to be splitted up and the corresponding
error msgs have to be displayed.
FIX
===
Splitted the functions and added the specific error msg.
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/mysql_upgrade.result | 8 | ||||
-rw-r--r-- | mysql-test/t/mysql_upgrade.test | 9 |
2 files changed, 16 insertions, 1 deletions
diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result index 8ce3f426375..6ba874f327a 100644 --- a/mysql-test/r/mysql_upgrade.result +++ b/mysql-test/r/mysql_upgrade.result @@ -86,7 +86,7 @@ mysql.user OK DROP USER mysqltest1@'%'; Run mysql_upgrade with a non existing server socket mysqlcheck: Got error: 2005: Unknown MySQL server host 'not_existing_host' (errno) when trying to connect -FATAL ERROR: Upgrade failed +FATAL ERROR: Error during call to mysql_check for fixing the db/tables names. set GLOBAL sql_mode='STRICT_ALL_TABLES,ANSI_QUOTES,NO_ZERO_DATE'; mtr.global_suppressions OK mtr.test_suppressions OK @@ -226,4 +226,10 @@ mysql.time_zone_name OK mysql.time_zone_transition OK mysql.time_zone_transition_type OK mysql.user OK +# +# Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR +# +Run mysql_upgrade with unauthorized access +Error: Failed while fetching Server version! Could be due to unauthorized access. +FATAL ERROR: Upgrade failed End of tests diff --git a/mysql-test/t/mysql_upgrade.test b/mysql-test/t/mysql_upgrade.test index c52a328c28b..faf7ed21a28 100644 --- a/mysql-test/t/mysql_upgrade.test +++ b/mysql-test/t/mysql_upgrade.test @@ -124,4 +124,13 @@ let $MYSQLD_DATADIR= `select @@datadir`; # so the following command should never fail. --remove_file $MYSQLD_DATADIR/mysql_upgrade_info + +--echo # +--echo # Bug #21489398: MYSQL_UPGRADE: FATAL ERROR: UPGRADE FAILED - IMPROVE ERROR +--echo # + +--echo Run mysql_upgrade with unauthorized access +--error 1 +--exec $MYSQL_UPGRADE --skip-verbose --user=root --password=wrong_password 2>&1 + --echo End of tests |