summaryrefslogtreecommitdiff
path: root/mysql-test/mysql-test-run.pl
diff options
context:
space:
mode:
authorDaniel Black <danielgb@au.ibm.com>2018-01-28 02:09:35 +1100
committerelenst <elenst@users.noreply.github.com>2018-01-27 17:09:35 +0200
commitac7610744a4e477d0e0b98e915dc43409c8b0997 (patch)
tree742ef4980a2ca48940898af8ff50dfe8265251fb /mysql-test/mysql-test-run.pl
parent524221e7a34d42214e82dd868348b453f2ef1591 (diff)
downloadmariadb-git-ac7610744a4e477d0e0b98e915dc43409c8b0997.tar.gz
mtr: set @skip_auth_anonymous=1 (#538)
Since 736afe868094b9aa24211c3772fb3b297d62d8fc the mysql_system_tables_data.sql only installs the anonymous user if skip_auth_anonymous IS NULL. Its installation is prevented by setting this to 1.
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-xmysql-test/mysql-test-run.pl7
1 files changed, 3 insertions, 4 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 3b1bb0b5cb0..dc83e62bf43 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3198,6 +3198,9 @@ sub mysql_install_db {
mtr_appendfile_to_file("$sql_dir/mysql_performance_tables.sql",
$bootstrap_sql_file);
+ # Don't install anonymous users
+ mtr_tofile($bootstrap_sql_file, "set \@skip_auth_anonymous=1;\n");
+
# Add the mysql system tables initial data
# for a production system
mtr_appendfile_to_file("$sql_dir/mysql_system_tables_data.sql",
@@ -3232,10 +3235,6 @@ sub mysql_install_db {
sql_to_bootstrap($text));
}
- # Remove anonymous users
- mtr_tofile($bootstrap_sql_file,
- "DELETE FROM mysql.user where user= '';\n");
-
# Create mtr database
mtr_tofile($bootstrap_sql_file,
"CREATE DATABASE mtr CHARSET=latin1;\n");