1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Merge branch '3.1' into 3.2

This commit is contained in:
Georg Richter
2022-01-14 20:09:28 +01:00
3 changed files with 24 additions and 1 deletions

View File

@@ -118,6 +118,11 @@ IF(MSVC)
ENDFOREACH() ENDFOREACH()
ENDIF() ENDIF()
ENDIF() ENDIF()
ELSE()
# MDEV-16383
IF(WITH_EMBEDDED_SERVER)
ADD_DEFINITIONS(-DHAVE_EMBEDDED)
ENDIF()
ENDIF(NOT IS_SUBPROJECT) ENDIF(NOT IS_SUBPROJECT)
# Disable dbug information for release builds # Disable dbug information for release builds

View File

@@ -1563,6 +1563,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); SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0);
goto error; goto error;
} }
is_maria= mariadb_connection(mysql);
} }
end+= strlen(end) + 1; end+= strlen(end) + 1;

View File

@@ -45,6 +45,10 @@ static char *mariadb_progname;
#define PKG_PLUGINDIR "%s/@INSTALL_PLUGINDIR@" #define PKG_PLUGINDIR "%s/@INSTALL_PLUGINDIR@"
#define PKG_LIBDIR "%s/@INSTALL_LIBDIR@" #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) #if defined(SOLARIS) || defined(__sun)
#define OPT_STRING_TYPE (char *) #define OPT_STRING_TYPE (char *)
#else #else
@@ -65,6 +69,11 @@ static struct option long_options[]=
{OPT_STRING_TYPE "plugindir", no_argument, 0, 'j'}, {OPT_STRING_TYPE "plugindir", no_argument, 0, 'j'},
{OPT_STRING_TYPE "tlsinfo", no_argument, 0, 'k'}, {OPT_STRING_TYPE "tlsinfo", no_argument, 0, 'k'},
{OPT_STRING_TYPE "variable", 2, 0, 'm'}, {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} {NULL, 0, 0, 0}
}; };
@@ -95,6 +104,9 @@ static const char *values[]=
PLUGIN_DIR, PLUGIN_DIR,
TLS_LIBRARY_VERSION, TLS_LIBRARY_VERSION,
"VAR VAR is one of:" "VAR VAR is one of:"
#ifdef HAVE_EMBEDDED
,EMBEDDED_LIBS
#endif
}; };
void usage(void) void usage(void)
@@ -232,7 +244,7 @@ int main(int argc, char **argv)
while(1) while(1)
{ {
int option_index= 0; 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) { switch(c) {
case 'a': /* CFLAGS and Include directories */ case 'a': /* CFLAGS and Include directories */
@@ -288,6 +300,11 @@ int main(int argc, char **argv)
} }
break; break;
} }
#ifdef HAVE_EMBEDDED
case 'n':
puts(EMBEDDED_LIBS);
break;
#endif
default: default:
exit((c != -1)); exit((c != -1));
} }