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>
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]
* 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
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.
- 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)
Visual Studio 10 returns error module machine type 'x64' conflicts with
target machine type 'X86' when compiling a library with a resource file
(version info).
To prevent this, the resource file (.rc) must be the first file.
For adding version_info use the macro SET_VERSION_INFO.
The following variable parameters are supported:
TARGET:target_name
SOURCE_FILE:source_file_name
FILE_TYPE:VFT_APP,VFT_Dll or VT_STATIC_LIB
ORIGINAL_FILE_NAME:exe,dll or lib filename
FILE_DESCRIPTION:short description of the file
changed type of length parameter in mysql_stmt_prepare,
mysql_real_query, mysql_stmt_send_long_data (incl. async _start
functions) from unsigned long to size_t.
Fixed warnings