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