MDEV-14578: mysql_install_db install unix_socket plugin when --auth-root-authentication-method=socket
post-merge fixes
This commit is contained in:
parent
53db5edbcf
commit
1db1340c0c
@ -27,10 +27,10 @@
|
||||
-- Fill "user" table with default users allowing root access
|
||||
-- from local machine if "user" table didn't exist before
|
||||
CREATE TEMPORARY TABLE tmp_user_nopasswd LIKE user;
|
||||
@@ -48,9 +38,6 @@ REPLACE INTO tmp_user_nopasswd VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y'
|
||||
REPLACE INTO tmp_user_nopasswd VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N', '', 0);
|
||||
-- More secure root account using unix sucket auth.
|
||||
INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, 'root'),'','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'unix_socket','','N', 'N','', 0);
|
||||
@@ -51,9 +41,6 @@ INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, 'root'
|
||||
IF @auth_root_socket is not null THEN
|
||||
IF not exists(select 1 from information_schema.plugins where plugin_name='unix_socket') THEN
|
||||
INSTALL SONAME 'auth_socket'; END IF; END IF;
|
||||
--- Anonymous user with no privileges.
|
||||
-INSERT INTO tmp_user_anonymous (host,user) VALUES ('localhost','');
|
||||
-INSERT INTO tmp_user_anonymous (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost';
|
||||
|
@ -174,6 +174,7 @@ IF(INSTALL_LAYOUT MATCHES "STANDALONE")
|
||||
SET(scriptdir ${prefix}/${INSTALL_BINDIR})
|
||||
SET(libexecdir ${prefix}/${INSTALL_SBINDIR})
|
||||
SET(pkgdatadir ${prefix}/${INSTALL_MYSQLSHAREDIR})
|
||||
SET(pkgplugindir ${prefix}/${INSTALL_PLUGINDIR})
|
||||
SET(localstatedir ${prefix}/data)
|
||||
ELSE()
|
||||
SET(prefix "${CMAKE_INSTALL_PREFIX}")
|
||||
@ -182,6 +183,7 @@ ELSE()
|
||||
SET(scriptdir ${INSTALL_BINDIRABS})
|
||||
SET(libexecdir ${INSTALL_SBINDIRABS})
|
||||
SET(pkgdatadir ${INSTALL_MYSQLSHAREDIRABS})
|
||||
SET(pkgplugindir ${INSTALL_PLUGINDIRABS})
|
||||
SET(localstatedir ${MYSQL_DATADIR})
|
||||
ENDIF()
|
||||
|
||||
|
@ -307,7 +307,7 @@ then
|
||||
langdir="$basedir/sql/share/english"
|
||||
srcpkgdatadir="$srcdir/scripts"
|
||||
buildpkgdatadir="$builddir/scripts"
|
||||
plugindir="$builddir/plugin/auth_socket/"
|
||||
plugindir="$builddir/plugin/auth_socket"
|
||||
elif test -n "$basedir"
|
||||
then
|
||||
bindir="$basedir/bin" # only used in the help text
|
||||
@ -336,7 +336,7 @@ then
|
||||
cannot_find_file fill_help_tables.sql @pkgdata_locations@
|
||||
exit 1
|
||||
fi
|
||||
plugindir="$basedir/@INSTALL_PLUGINDIR@"
|
||||
plugindir=`find_in_dirs --dir auth_socket.so $basedir/lib*/plugin $basedir/lib*/mysql/plugin`
|
||||
else
|
||||
basedir="@prefix@"
|
||||
bindir="@bindir@"
|
||||
@ -344,7 +344,7 @@ else
|
||||
mysqld="@libexecdir@/mysqld"
|
||||
srcpkgdatadir="@pkgdatadir@"
|
||||
buildpkgdatadir="@pkgdatadir@"
|
||||
plugindir="@INSTALL_PLUGINDIR@"
|
||||
plugindir="@pkgplugindir@"
|
||||
fi
|
||||
|
||||
# Set up paths to SQL scripts required for bootstrap
|
||||
|
@ -48,11 +48,9 @@ REPLACE INTO tmp_user_nopasswd VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y'
|
||||
REPLACE INTO tmp_user_nopasswd VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'','','N','N', '', 0);
|
||||
-- More secure root account using unix socket auth.
|
||||
INSERT INTO tmp_user_socket VALUES ('localhost',IFNULL(@auth_root_socket, 'root'),'','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'unix_socket','','N', 'N','', 0);
|
||||
-- Need aria support to lookup information_schema.plugins (result is tmptable)
|
||||
IF @auth_root_socket is not null THEN
|
||||
IF exists (SELECT 1 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'aria' AND support IN ('YES', 'DEFAULT', 'ENABLED')) THEN
|
||||
IF not exists(select 1 from information_schema.plugins where plugin_name='unix_socket') THEN
|
||||
INSTALL SONAME 'auth_socket'; END IF; END IF; END IF;
|
||||
IF not exists(select 1 from information_schema.plugins where plugin_name='unix_socket') THEN
|
||||
INSTALL SONAME 'auth_socket'; END IF; END IF;
|
||||
-- Anonymous user with no privileges.
|
||||
INSERT INTO tmp_user_anonymous (host,user) VALUES ('localhost','');
|
||||
INSERT INTO tmp_user_anonymous (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost';
|
||||
|
Loading…
x
Reference in New Issue
Block a user