From 5cf49cdf92bb57c2e20f72422a22768be8c7a8a8 Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Fri, 15 Jul 2016 23:51:30 +0300 Subject: MDEV-10248 Cannot Remove Test Tables While dropping the test database, use IF EXISTS to avoid bogus errors --- scripts/mysql_secure_installation.pl.in | 2 +- scripts/mysql_secure_installation.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/mysql_secure_installation.pl.in b/scripts/mysql_secure_installation.pl.in index 188a6bd7104..32331c3d601 100644 --- a/scripts/mysql_secure_installation.pl.in +++ b/scripts/mysql_secure_installation.pl.in @@ -217,7 +217,7 @@ sub remove_remote_root { sub remove_test_database { print " - Dropping test database...\n"; - if (do_query("DROP DATABASE test;")) { + if (do_query("DROP DATABASE IF EXISTS test;")) { print " ... Success!\n"; } else { print " ... Failed! Not critical, keep moving...\n"; diff --git a/scripts/mysql_secure_installation.sh b/scripts/mysql_secure_installation.sh index 9e9bce9fa87..7fb8b73ef8f 100644 --- a/scripts/mysql_secure_installation.sh +++ b/scripts/mysql_secure_installation.sh @@ -324,7 +324,7 @@ remove_remote_root() { remove_test_database() { echo " - Dropping test database..." - do_query "DROP DATABASE test;" + do_query "DROP DATABASE IF EXISTS test;" if [ $? -eq 0 ]; then echo " ... Success!" else -- cgit v1.2.1