1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-09-16 19:22:13 +03:00
Commit Graph

158 Commits

Author SHA1 Message Date
Georg Richter
1888c141f7 Manual merge from CONC-325 branch: Initial implementation for binlog/replication API 2018-12-02 18:28:38 +01:00
Georg Richter
f52248881f Fix for ASAN/TSAN build 2018-11-08 15:50:02 +01:00
Sergei Golubchik
0e0bf9aa49 Merge tag 'v3.0.6' into 10.3-server 2018-08-10 15:01:16 +02:00
Georg Richter
eb64582b68 Debian layout changes/fixes 2018-07-25 09:33:53 +02:00
Sergei Golubchik
ed5921ed4f CONC-346 CMake warnings
CMP0026 OLD
CMP0042 OLD
CMP0045 OLD
2018-07-11 11:28:01 +02:00
Lawrin Novitsky
c14a06f1c0 Fix required for ODBC-154
It changes TARGET_LINK_LIBRARIES in versionin script configuration in
cmake for SET_TARGET_PROPERTIES. In this way, if C/C is a sub-project in
other project, version script want go into parent project.
2018-07-04 17:50:32 +02:00
Georg Richter
41cc847c31 Fix for CONC-346:
Removed all OLD cmake policies
- Symlink macro now uses cmake generator expression $<TARGET_FILE_NAME:*>
- Since all plugins are built in the same directory, the location detection was removed for windows packaging
- Installation of the windows *.pdb for libmariadb now also uses a static path.
2018-07-04 07:37:03 +02:00
Georg Richter
50d48e91fa 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]
2018-04-07 07:14:43 +02:00
Georg Richter
e815469f21 Build fix:
When building Connector/C as subproject inside server we need to check additionally if WITH_ETERNAL_ZLIB was specified, since ZLIB_FOUND was already set by parent.
2017-10-12 12:41:36 +02:00
Georg Richter
240df21700 Added missing dependency for zlib (WITH_EXTERNAL_ZLIB=ON)
Added CC_SOURCE_REVISION definition (mariadb_version.h)
2017-10-12 09:58:31 +02:00
Sergei Golubchik
f91561bf54 MDEV-13588 /usr/lib/x86_64-linux-gnu/libmariadbclient.so.18: version `libmariadbclient_18' not found
MDEV-13593 dlopen failure loading after upgrade from 10.2.6 to 10.2.8
MDEV-13619 libmariadb missing version info for libmariadbclient_18
MDEV-13615 MariaDB 10.2 client library (Debian 9/Stretch) not compatible with Perl MySQL DBI module

Debian 9, just for the fun of it, I presume, renamed
version nodes in the libmysqlclient.so, introducing
new incompatible with anything, version
"libmariadbclient_18". This version will supposedly
disappear in Debian 10 (breaking compatibility again).

But libmariadb.so.3 needs to be compatible with
Debian 8 (libmysqlclient_18),
Debian 9 (libmariadbclient_18), and, in the future,
Debian 10 (libmariadb_3?). At the same time!

To achieve this remarkable feat we version old symbols
with libmysqlclient_18, and (!) alias them into
libmariadbclient_18. New symbols are versioned under
libmariadb_3.
2017-09-16 22:51:37 +02:00
Georg Richter
65368bc95c Fix for MDEV-12889:
Added version info for shared object:
libmysqlclient_18 node contains all symbols for libmysql compatibiliry
libmariadb_3 node contains all mariadb specific symbols which are not supported by libmysql
2017-07-01 15:42:59 +02:00
Sergei Golubchik
1c8ccfe68f MDEV-12423 install fails to create/install symlinks to mysqlclient compat libs
restore compat symlinking code that was removed by mistake,
but disable symlinks by default (if built outside of the server).

Also C/C in 10.2.7 is not "beta"
2017-06-24 01:12:18 +02:00
Vladislav Vaintroub
dce70b66c7 On Windows, link static libmariadbclient to shared library, instead of using
object libraries.

Reason - object library unfortunately breaks VS IDE functionality
(not possible to search for function definition etc)
2017-05-26 15:14:29 +00:00
Sergei Golubchik
a40c41a1cb MDEV-11708 cmake -DWITH_ASAN no longer works
when compiling with asan, clang automatically links with
libasan_rt library. But only when for executables.
It does not links with libasan_rt when generating shared libraries.
So, libmariadb.so ends up with lots of undefined __asan_xxx symbols.
2017-02-15 13:08:14 +01:00
Georg Richter
87e861c360 client side implemetation for MDEV-10340:
int STDCALL mysql_reset_connection(MYSQL *mysql)
2016-12-29 19:10:35 +01:00
Georg Richter
ab3ffdc473 removed api function mysql_get_server_status (introduced in last commit). Instead of mariadb_get_infov now supports additional parameters:
* MARIADB_CONNECTION_SERVER_STATUS
* MARIADB_CONNECTION_SERVER_CAPABILITIES
* MARIADB_CONNECTION_EXTENDED_SERVER_CAPABILITIES
* MARIADB_CONNECTION_CLIENT_CAPABILITIES
2016-12-13 07:09:06 +01:00
Georg Richter
7a1e3a699d - Fixed crash in prepared statement: Indicator variable should be checked only if we are in bulk operation mode (=stmt->array_size > 0 and bulk is supported by server
- Added new api function mysql_get_server_status, so client applications no longer need to access members of the mysql structure
2016-12-10 14:09:53 +01:00
Vladislav Vaintroub
e34a595ce2 MDEV-11008 Connector/C integration does not respect INSTALL_LIBDIR
or INSTALL_DOCDIR

Changed C/C to use the same cmake variables for
INSTALL_LIBDIR, INSTALL_BINDIR, INSTALL_INCLUDEDIR, INSTALL_PLUGINDIR


Small cleanups (remove -l/full/path/to/libc.so from mariadb_config output)
2016-10-12 11:58:53 +00:00
Sergei Golubchik
7a787b1e3e C/C integration in MariaDB Server builds
* make is usable as a CMake sub-project
  * put options in a separate namespace
  * but use parent project values when specified
* always specify COMPONENT when INSTALLing
* don't use PROJECT_SOURCE_DIR/PROJECT_BINARY_DIR

Also

* fix out-of-source builds (don't generate files
  in the CMAKE_SOURCE_DIR, always do it in CMAKE_BINARY_DIR)
* make subsequence cmake runs less verbose, use MESSAGE1
  to avoid repeating messages that didn't change
2016-09-05 19:15:58 +02:00
Vladislav Vaintroub
238f769c47 C/C integration, client library versioning 2016-08-18 13:01:18 +02:00
Georg Richter
9207626bb4 10.2-integration
readded api functions
- mysql_debug (dummy)
- mysql_get_parameters
added low level api functions
- mysql_net_field_length
- mysql_net_read
2016-08-18 12:24:32 +02:00
Vladislav Vaintroub
1cefbbecb9 C/C integration 2016-08-12 13:12:49 +02:00
Vladislav Vaintroub
beea350f6f correctly identify multiconfig generator 2016-08-11 19:46:24 +02:00
Vladislav Vaintroub
be73859c83 server integration 2016-08-11 16:35:42 +00:00
Georg Richter
f8aad3d879 Added missing export for mysql_cancel api function 2016-05-25 19:31:25 +02:00
Vladislav Vaintroub
e62a4eac0b Merge pull request #18 from GeorgyKirichenko/master
Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR
2016-05-25 09:52:22 +00:00
Georg Richter
9d51d5e3d6 Fix for CONC-179:
- Fixed offset for warning_count in ps protocol
- Added new api function mysql_stmt_warning_count
- For backwards compatibility we also update the value for
  mysql_warning_count function
2016-05-15 12:04:10 +02:00
GeorgyKirichenko
56505d8fb6 Use PROJECT_SOURCE_DIR instead of CMAKE_SOURCE_DIR. Client library
can be used as subdirectory in another cmake project.
2016-04-27 17:54:07 +03:00
MariaDB
a57406cb3b fix iconv search paths. define LIBICONV_PLUG to workaround GNU iconv.h redefinition of libiconv exports 2016-04-09 01:15:31 +03:00
Georg Richter
b4efe73c9e session tracking implementation (10.2-integration):
- At the moment the following session tracking types are supported:
  SESSION_TRACK_SCHEMA
  SESSION_TRACK_SYSTEM_VARIABLES
  SESSION_TRACK_STATE_CHANGE
  SESSION_TRACK_TRANSACTION_CHARACTERISTICS
- New API functions
  mysql_session_track_get_next
  mysql_session_track_get_first
2016-03-31 08:41:12 +02:00
Georg Richter
4b1e94bccc Since we use TLS and not SSL functions and structures were renamed
from SSL to TLS
2016-03-16 18:20:08 +01:00
Vladislav Vaintroub
f68b89bc46 - Back off CMake version requirements.
- Fix plugin extension on OSX (it is .so, not .dylib)
- add SKIP_TESTS to skip compiling test
2016-03-15 09:01:02 +01:00
Georg Richter
61e2dc2129 Windows build fixes for 10.2-integration
Removed unused functions from ma_dtoa.c
2016-03-11 08:02:19 +01:00
Georg Richter
2f6791115f changed plugin library types from SHARED to MODULE
Fixed float/double/decimal converion for prepared statements:
  since _gcvt (Windows) and gcvt (*nix) deliver different results
  we use now dtoa.c from server package, which is licensed under
  LGPL.
2016-03-11 07:08:34 +01:00
Georg Richter
3cfc5f8654 Removed option WITH_NONBLOCK 2016-03-10 09:51:53 +01:00
Vladislav Vaintroub
33ebe896ec Fix build on OSX 2016-03-02 15:33:30 +02:00
Georg Richter
c433c30271 Added session ticket support for OpenSSL (experimental)
Build fixes:
  - Build requires OpenSSL v. 1.0.1 or higher
  - Fixed win64 build (missing target properties for static lib)
2016-03-01 13:37:55 +01:00
Georg Richter
a1a178e2c8 Fixed missing export symbol for windows build 2016-02-24 08:37:04 +01:00
Georg Richter
d68b48f954 10.2 integration fixes
- changed plugin API to avoid crashes: Oracle/MariaDB changed
    structure several times without updating interface version.
  - ABI fixes: moved additional net items to net->extension (connection
    handler and com_multi buffer)
2016-02-22 11:37:13 +01:00
Georg Richter
56f9809365 10.2-fixes:
export asynchronous version of mysql_list_fields
don't convert days to hours when fetch date in bind with type
MYSQL_TYPE_TIME
2016-02-18 14:03:17 +01:00
Georg Richter
409d673291 10.2 - integration fixes
- enable data truncation reporting for ps by default
- added plugin protoype definitions to mysql.h10.2 - integration fixes
2016-02-18 10:45:26 +01:00
Georg Richter
61daa7ae88 fixed installation of include files 2016-02-08 19:00:54 +01:00
Georg Richter
4ca933bb81 Global cleanup:
removed global locks
  removed dead code and files
  removed dbug
2016-02-08 18:43:02 +01:00
Georg Richter
f3577bab94 Disable dbug by default (to enable it specify cmake option -DWITH_DBUG=ON)
minor fixes for 10.2 integration (windows)
2016-02-05 16:31:49 +01:00
Georg Richter
0c3c789628 More 10.2 windows fixes 2016-02-05 12:19:45 +01:00
Georg Richter
f0b15617d7 More windows fixes for 10.2 integration 2016-02-05 09:54:22 +01:00
Georg Richter
88015678c9 removed my_vsnprintf
removed llstr.c
renamed int2string function with prefix ma_
2016-02-04 14:22:27 +01:00
Georg Richter
5cd3d2d0c9 moved ma_error to errmsg.c and removed my_error.c 2016-02-04 13:43:48 +01:00
Georg Richter
ad58fa7868 More cleanup for 10.2 integration 2016-02-04 13:11:44 +01:00