Commit 33b9f805 authored by Sergei Golubchik's avatar Sergei Golubchik

mysql_install_db: make sure the variable's value is visible

move the assignment out of a function, so that it wouldn't
happen in a subshell
parent 7c8e17b9
...@@ -515,15 +515,15 @@ mysqld_install_cmd_line() ...@@ -515,15 +515,15 @@ mysqld_install_cmd_line()
--net_buffer_length=16K --net_buffer_length=16K
} }
# Use $auth_root_socket_user if explicitly specified.
# Otherwise use the owner of datadir - ${user:-$USER}
# Use 'root' as a fallback
auth_root_socket_user=${auth_root_socket_user:-${user:-${USER:-root}}}
cat_sql() cat_sql()
{ {
echo "use mysql;" echo "use mysql;"
# Use $auth_root_socket_user if explicitly specified.
# Otherwise use the owner of datadir - ${user:-$USER}
# Use 'root' as a fallback
auth_root_socket_user=${auth_root_socket_user:-${user:-${USER:-root}}}
case "$auth_root_authentication_method" in case "$auth_root_authentication_method" in
normal) normal)
echo "SET @auth_root_socket=NULL;" echo "SET @auth_root_socket=NULL;"
......
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