Commit 3db6de33 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-17640 UMASK_DIR configuration for mysql_install_db is not applied to mysql database

create mysql and test databases with SQL, not mkdir.
parent 17088dd9
......@@ -7,14 +7,13 @@
@DPATCH@
--- mysql-dfsg-5.1-5.1.23rc.orig/scripts/mysql_install_db.sh 2008-01-29 22:41:20.000000000 +0100
+++ mysql-dfsg-5.1-5.1.23rc/scripts/mysql_install_db.sh 2008-02-28 10:08:11.000000000 +0100
@@ -372,7 +372,7 @@ then
fi
# Create database directories
-for dir in "$ldata" "$ldata/mysql" "$ldata/test"
+for dir in "$ldata" "$ldata/mysql"
do
if test ! -d "$dir"
then
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -36,7 +36,6 @@ in_rpm=0
ip_only=0
cross_bootstrap=0
install_params="create database if not exists mysql;
-create database if not exists test;
use mysql;"
auth_root_authentication_method=normal
auth_root_socket_user='root'
......@@ -35,7 +35,9 @@ force=0
in_rpm=0
ip_only=0
cross_bootstrap=0
install_params=""
install_params="create database if not exists mysql;
create database if not exists test;
use mysql;"
auth_root_authentication_method=normal
auth_root_socket_user='root'
......@@ -431,7 +433,7 @@ then
fi
# Create database directories
for dir in "$ldata" "$ldata/mysql" "$ldata/test"
for dir in "$ldata"
do
if test ! -d "$dir"
then
......@@ -493,7 +495,7 @@ SET @auth_root_socket=NULL;" ;;
SET @skip_auth_root_nopasswd=1;
SET @auth_root_socket='$auth_root_socket_user';" ;;
esac
if { echo "use mysql;$install_params"; cat "$create_system_tables" "$create_system_tables2" "$fill_system_tables"; } | eval "$filter_cmd_line" | mysqld_install_cmd_line > /dev/null
if { echo "$install_params"; cat "$create_system_tables" "$create_system_tables2" "$fill_system_tables"; } | eval "$filter_cmd_line" | mysqld_install_cmd_line > /dev/null
then
s_echo "OK"
else
......
......@@ -53,9 +53,6 @@ if [ $1 = 1 ] ; then
chown -R %{mysqld_user}:%{mysqld_group} $datadir
if [ ! -e $datadir/mysql ]; then
# Create data directory
mkdir -p $datadir/{mysql,test}
# Initiate databases
%{_bindir}/mysql_install_db --rpm --user=%{mysqld_user}
fi
......
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