MDEV-35421 - main.mysql_upgrade fails without unix_socket plugin

Fixed main.mysql_upgrade to pass when unix_socket plugin is unavailable.

Also don't redefine _GNU_SOURCE, which was previously defined by command
line/environment. This fixes silent auth_socket build failure with
MYSQL_MAINTAINER_MODE=ERR.
This commit is contained in:
Sergey Vojtovich
2024-11-15 17:35:57 +04:00
committed by Daniel Black
parent 7f55c61060
commit ed72eadfb8
3 changed files with 5 additions and 3 deletions

View File

@ -1062,7 +1062,7 @@ set global sql_safe_updates=@orig_sql_safe_updates;
# MDEV-32043 Remove plugins previously external that are now built in (unix_socket)
#
INSERT INTO mysql.plugin SELECT 'unix_socket', 'auth_socket.so'
FROM dual WHERE convert(@@version_compile_os using latin1) not in ('Win32', 'Win64', 'Windows');
FROM information_schema.plugins WHERE plugin_name='unix_socket' AND plugin_library IS NULL;
# mariadb-upgrade --force --silent 2>&1
SELECT * FROM mysql.plugin WHERE name='unix_socket';
name dl

View File

@ -500,7 +500,7 @@ set global sql_safe_updates=@orig_sql_safe_updates;
--echo #
INSERT INTO mysql.plugin SELECT 'unix_socket', 'auth_socket.so'
FROM dual WHERE convert(@@version_compile_os using latin1) not in ('Win32', 'Win64', 'Windows');
FROM information_schema.plugins WHERE plugin_name='unix_socket' AND plugin_library IS NULL;
--echo # mariadb-upgrade --force --silent 2>&1
--exec $MYSQL_UPGRADE --force --silent 2>&1
SELECT * FROM mysql.plugin WHERE name='unix_socket';

View File

@ -15,7 +15,9 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA
CHECK_CXX_SOURCE_COMPILES(
"#define _GNU_SOURCE
"#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif
#include <sys/socket.h>
int main() {
struct ucred cred;