Skip to content

Commit

Permalink
Merge branch '3.2' into 3.3
Browse files Browse the repository at this point in the history
  • Loading branch information
9EOR9 committed Jan 14, 2022
2 parents ddb031b + c912a46 commit 721a41d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Expand Up @@ -118,6 +118,11 @@ IF(MSVC)
ENDFOREACH()
ENDIF()
ENDIF()
ELSE()
# MDEV-16383
IF(WITH_EMBEDDED_SERVER)
ADD_DEFINITIONS(-DHAVE_EMBEDDED)
ENDIF()
ENDIF(NOT IS_SUBPROJECT)

# Disable dbug information for release builds
Expand Down
1 change: 1 addition & 0 deletions libmariadb/mariadb_lib.c
Expand Up @@ -1804,6 +1804,7 @@ MYSQL *mthd_my_real_connect(MYSQL *mysql, const char *host, const char *user,
SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
goto error;
}
is_maria= mariadb_connection(mysql);
}
end+= strlen(end) + 1;

Expand Down
19 changes: 18 additions & 1 deletion mariadb_config/mariadb_config.c.in
Expand Up @@ -45,6 +45,10 @@ static char *mariadb_progname;
#define PKG_PLUGINDIR "%s/@INSTALL_PLUGINDIR@"
#define PKG_LIBDIR "%s/@INSTALL_LIBDIR@"

#ifdef HAVE_EMBEDDED
#define EMBEDDED_LIBS "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@/ -lmariadbd @extra_dynamic_LDFLAGS@"
#endif

#if defined(SOLARIS) || defined(__sun)
#define OPT_STRING_TYPE (char *)
#else
Expand All @@ -65,6 +69,11 @@ static struct option long_options[]=
{OPT_STRING_TYPE "plugindir", no_argument, 0, 'j'},
{OPT_STRING_TYPE "tlsinfo", no_argument, 0, 'k'},
{OPT_STRING_TYPE "variable", 2, 0, 'm'},
#ifdef HAVE_EMBEDDED
{OPT_STRING_TYPE "libmysqld-libs", no_argument, 0, 'n' },
{OPT_STRING_TYPE "embedded-libs", no_argument, 0, 'n' },
{OPT_STRING_TYPE "embedded", no_argument, 0, 'n' },
#endif
{NULL, 0, 0, 0}
};

Expand Down Expand Up @@ -95,6 +104,9 @@ static const char *values[]=
PLUGIN_DIR,
TLS_LIBRARY_VERSION,
"VAR VAR is one of:"
#ifdef HAVE_EMBEDDED
,EMBEDDED_LIBS
#endif
};

void usage(void)
Expand Down Expand Up @@ -232,7 +244,7 @@ int main(int argc, char **argv)
while(1)
{
int option_index= 0;
c= getopt_long(argc, argv, "abcdefghijkl", long_options, &option_index);
c= getopt_long(argc, argv, "abcdefghijklmno", long_options, &option_index);

switch(c) {
case 'a': /* CFLAGS and Include directories */
Expand Down Expand Up @@ -288,6 +300,11 @@ int main(int argc, char **argv)
}
break;
}
#ifdef HAVE_EMBEDDED
case 'n':
puts(EMBEDDED_LIBS);
break;
#endif
default:
exit((c != -1));
}
Expand Down

0 comments on commit 721a41d

Please sign in to comment.