1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-09-11 08:30:59 +03:00
Commit Graph

14 Commits

Author SHA1 Message Date
Sam James
51b2a621b3 Fix -Wcalloc-transposed-args
Fixes warnings like:
```
unittest/libmariadb/bulk1.c: In function ‘bulk1’:
unittest/libmariadb/bulk1.c:77:43: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args]
   77 |   lengths= (unsigned long *)calloc(sizeof(long), TEST_ARRAY_SIZE);
      |                                           ^~~~
unittest/libmariadb/bulk1.c:77:43: note: earlier argument should specify number of elements, later size of each element
unittest/libmariadb/bulk1.c:78:39: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argu
ment and not in the later argument [-Werror=calloc-transposed-args]
   78 |   vals= (unsigned int *)calloc(sizeof(int), TEST_ARRAY_SIZE);
      |                                       ^~~
```

The calloc prototype is:
```
void *calloc(size_t nmemb, size_t size);
```

So, just swap the number of members and size arguments to match the
prototype, as we're initialising N struct of size Y. GCC then sees we're not
doing anything wrong.

Signed-off-by: Sam James <sam@gentoo.org>
2024-04-29 14:16:15 +02:00
Georg Richter
08fcd797bf Fixed error in naming for static remote_io plugin. 2020-03-16 07:05:02 +01:00
Georg Richter
1218ffac1a Fix for CONC-452 and CONC-453:
Various coverity scan fixes, including CONC-452 and CONC-453.
Special thanks to Lukas Javorsky for fixing numerous covscan
issues (This patch includes part of his pull request #126).

Coverity scan build was using the following cmake parameters:
-WITH_EXTERNAL_ZLIB=ON -DWITH_UNIT_TESTS=OFF.

CWE-416 (use after free) in dtoa.c (from netlib) is still open.
2020-02-14 09:52:21 +01:00
luz.paz
b2e6ed0295 Fixes misc. typos
found via `codespell -q 3`
2018-04-13 07:30:23 +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
6655a8194e Remove unused include file
remove link to mariadbclient library
2017-01-21 19:36:16 +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
4ca933bb81 Global cleanup:
removed global locks
  removed dead code and files
  removed dbug
2016-02-08 18:43:02 +01:00
Georg Richter
8b3099b319 Fix unsresolved external for remoteio plugin (windows) 2016-01-18 13:22:34 +01:00
Georg Richter
b5cf443681 Windows fixes for remote_io plugin 2016-01-04 10:02:10 +01:00
Georg Richter
97a6aeafff - Fixed build errors for remote_io plugin
- Bumped client version number to 10.1.7
2016-01-03 17:29:44 +01:00
Georg Richter
05659c872e More plugin configuration changes (last commit was incomplete) 2015-10-02 10:09:41 +02:00
Georg Richter
f886562fb2 Initial cio implementation 2015-08-06 13:06:54 +02:00
Georg Richter
95724c85a5 Added support for remote files via plugin.
This will allow to read and import data from remote locations, e.g.
LOAD DATA LOCAL INFILE 'htp://www.example.com' or
mysql_options(mysql, MYSQL_READ_DEFAULT_FILE, "http://localhost/test.cnf");
The implementation uses libcurl. For a list of supported URL types
see http://curl.haxx.se/libcurl/
2015-03-18 19:52:51 +01:00