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

Reworked plugin interface

Plugin configuration happens now in CMakeLists.txt files in corresponding plugin directories.

plugins.cmake now contains REGISTER_PLUGIN_FUNCTION which accepts the following parameters:
  - TARGET: the name of the plugin (dynamic plugins will be named ${TARGET}.so (or .dll)
  - SOURCES: source files
  - LIBRARIES: additional libraries for linking
  - INCLUDES: include directories
  - CONFIGURATIONS: possible plugin configurations: valid arguments are DYNAMIC, STATIC, OFF
  - DEFAULT: default configuration (see CONFIGURATIONS)
  - COMPILE_OPTIONS: compiler flags

The default plugin configuration can be specified via cmake parameter -DCLIENT_PLUGIN_${TARGET}=[DYNAMIC|STATIC|OFF]
This commit is contained in:
Georg Richter
2018-02-26 19:15:55 +01:00
parent 6e1dd7a41f
commit 50d48e91fa
25 changed files with 269 additions and 353 deletions

View File

@@ -707,6 +707,9 @@ static int test_wl4284_1(MYSQL *mysql)
MYSQL_ROW row;
MYSQL_RES *result;
diag("Test temporarily disabled");
return SKIP;
if (mysql_get_server_version(mysql) < 60000) {
diag("Test requires MySQL Server version 6.0 or above");
return SKIP;
@@ -1088,7 +1091,7 @@ static int test_mdev12965(MYSQL *unused __attribute__((unused)))
fprintf(fp, "[client]\ndefault-character-set=latin2\nreconnect=1\n");
fclose(fp);
mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, "client");
mysql_options(mysql, MYSQL_READ_DEFAULT_GROUP, "");
my_test_connect(mysql, hostname, username, password,
schema, 0, socketname, 0);

View File

@@ -525,8 +525,13 @@ MYSQL *my_test_connect(MYSQL *mysql,
unsigned long clientflag)
{
if (force_tls)
mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &force_tls);
mysql= mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, clientflag);
mysql_options(mysql, MYSQL_OPT_SSL_ENFORCE, &force_tls);
if (!mysql_real_connect(mysql, host, user, passwd, db, port, unix_socket, clientflag))
{
diag("error: %s", mysql_error(mysql));
return NULL;
}
if (mysql && force_tls && !mysql_get_ssl_cipher(mysql))
{
diag("Error: TLS connection not established");