diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-02-21 16:54:31 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-02-21 16:54:31 +0100 |
commit | 33b9f80595d3dad74bd16e8ac430a93aecf8eddf (patch) | |
tree | 64901e7561c7fb1eab8f502be40191898cb0a653 /scripts/mysql_install_db.sh | |
parent | 7c8e17b9312e15f3352e3a4a65962c09fcf29c21 (diff) | |
download | mariadb-git-33b9f80595d3dad74bd16e8ac430a93aecf8eddf.tar.gz |
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
Diffstat (limited to 'scripts/mysql_install_db.sh')
-rw-r--r-- | scripts/mysql_install_db.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 34f27ad5614..59607d7f508 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -515,15 +515,15 @@ mysqld_install_cmd_line() --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() { 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 normal) echo "SET @auth_root_socket=NULL;" |