summaryrefslogtreecommitdiff
path: root/cmake/plugin.cmake
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-24292 support semi-independent versioning for sub-packagesSergei Golubchik2021-01-121-0/+1
| | | | | | 3. Embed plugin version into the DEB package version this assumes that -DDEB is only used from within autobake-deb.sh
* MDEV-24292 support semi-independent versioning for sub-packagesSergei Golubchik2021-01-121-1/+5
| | | | | | | 2. Embed plugin version into the RPM package version introduce SERVER_VERSION, because plugins can overwrite VERSION (and columnstore actually does)
* MDEV-24292 support semi-independent versioning for sub-packagesSergei Golubchik2021-01-121-3/+8
| | | | 1. specify plugin version in MYSQL_ADD_PLUGIN
* cleanup: plugin.cmakeSergei Golubchik2020-12-211-8/+8
| | | | | | list all supported options in the comment. remove wsrep-specific hack of EXPORT_SYMBOLS, wsrep-specific hacks belong to wsrep
* Add build on AIXEtienne Guesnet2020-12-161-1/+5
|
* post-fix for #1504Sergei Golubchik2020-06-121-1/+3
|
* MDEV-22214 mariadbd.exe calls function mysqld.exe, and crashesVladislav Vaintroub2020-04-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stop linking plugins to the server executable on Windows. Instead, extract whole server functionality into a large DLL, called server.dll. Link both plugins, and small server "stub" exe to it. This eliminates plugin dependency on the name of the server executable. It also reduces the size of the packages (since tiny mysqld.exe and mariadbd.exe are now both linked to one big DLL) Also, simplify the functionality of exporing all symbols from selected static libraries. Rely on WINDOWS_EXPORT_ALL_SYMBOLS, rather than old self-backed solution. fix compile error replace GetProcAddress(GetModuleHandle(NULL), "variable_name") for server exported data with actual variable names. Runtime loading was never required,was error prone , since symbols could be missing at runtime, and now it actually failed, because we do not export symbols from executable anymore, but from a shared library This did require a MYSQL_PLUGIN_IMPORT decoration for the plugin, but made the code more straightforward, and avoids missing symbols at runtime (as mentioned before). The audit plugin is still doing some dynamic loading, as it aims to work cross-version. Now it won't work cross-version on Windows, as it already uses some symbols that are *not* dynamically loaded, e.g fn_format and those symbols now exported from server.dll , when earlier they were exported by mysqld.exe Windows, fixes for storage engine plugin loading after various rebranding stuff Create server.dll containing functionality of the whole server make mariadbd.exe/mysqld.exe a stub that is only calling mysqld_main() fix build
* MDEV-21303 Use mariadbd as the library plugins link to on non-LinuxDaniel Black2020-04-021-1/+1
| | | | | | | | | | | | | Prevent errors like on FreeBSD [ 56%] Linking CXX shared module ha_test_sql_discovery.so cd /usr/home/dan/build-mariadb-server-10.5/storage/test_sql_discovery && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/test_sql_discovery.dir/link.txt --verbose=1 /usr/bin/c++ -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -O2 -g -DNDEBUG -D_FORTIFY_SOURCE=2 -DDBUG_OFF -shared -o ha_test_sql_discovery.so CMakeFiles/test_sql_discovery.dir/test_sql_discovery.cc.o -lpthread ../../libservices/libmysqlservices.a -lmysqld -lpthread /usr/bin/ld: error: unable to find library -lmysqld Also tested on OpenIndiana successfully. Closes #1480
* Merge branch '10.4' into 10.5Oleksandr Byelkin2020-03-111-1/+0
|\
| * MDEV-16662: cmake remove empty INSTALL_DEBUG_TARGETDaniel Black2020-02-251-1/+0
| | | | | | | | | | | | | | No adverse effects since this was made a null function in 6b53f9d781cc19cbec96c3eb048e6407021685a2. This function had the last remaining cmake CMP0026 violation.
* | Merge 10.4 into 10.5Marko Mäkelä2019-09-061-4/+4
|\ \ | |/
| * Merge 10.2 into 10.3Marko Mäkelä2019-08-211-4/+4
| |\
| | * MDEV-20377: Introduce cmake -DWITH_MSAN:BOOL=ONMarko Mäkelä2019-08-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MemorySanitizer is a compile-time instrumentation layer in clang and GCC. Together with AddressSanitizer mostly makes the run-time instrumentation of Valgrind redundant. It is a little more tricky to set up, because running with uninstrumented libraries will lead into false positives. You will need an instrumented libc++, and you should use -stdlib=libc++ instead of the default libstdc++. To build the instrumented library, you can refer to https://github.com/google/sanitizers/wiki/MemorySanitizerLibcxxHowTo or you can adapt these steps that worked for me, for clang-8 version 8.0.1: cd /mariadb sudo apt source libc++-8-dev cd llvm-toolchain-8-8.0.1 mkdir libc++msan; cd libc++msan cmake ../libcxx -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=Memory \ -DCMAKE_C_COMPILER=clang-8 -DCMAKE_CXX_COMPILER=clang++-8 Then, in your MariaDB build directory, you have to compile with libc++ and bundled libraries, such as WITH_SSL=bundled, WITH_ZLIB=bundled. For uninstrumented system libraries, you will get false positives for uninitialized values. Like this: cmake -DWITH_MSAN=ON -DWITH_SSL=bundled -DWITH_ZLIB=bundled \ -DCMAKE_CXX_FLAGS='-stdlib=libc++' .. Note: you should also add -O2 to the compiler options, or you may get crashes due to stack overflow. Finally, to run tests, you must replace libc++ with the instrumented one: LD_LIBRARY_PATH=/mariadb/llvm-toolchain-8-8.0.1/libc++msan/lib \ MSAN_OPTIONS=abort_on_error=1 \ ./mtr --big-test --parallel=auto --force --retry=0 Failure to do so will report numerous false positives related to operations on std::string and the like. This is work in progress. Some issues will still have to be fixed for WITH_MSAN to be usable. See MDEV-20377 for details.
* | | In case WITH_WSREP is enabled, build wsrep as pluginVladislav Vaintroub2019-06-301-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | If it is not enabled, build wsrep as static "stub" library from wsrep_dummy.cc ´ Allow static plugins to export symbols (on Unix) wsrep_info relies on wsrep defined symbols (e.g LOCK_wsrep_config_state) exported from mysqld
* | | Add new option NOT_EMBEDDED, for pluginsVladislav Vaintroub2019-05-261-5/+17
|/ / | | | | | | Means, plugin will not be available in embedded, even if compiled-in
* | Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
|\ \ | |/
| * Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
| |\
| | * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| | |\
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | * Update wrong zip-code
* | | | Merge branch '10.2' into 10.3Sergei Golubchik2019-03-291-3/+0
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Sergei Golubchik2019-03-291-3/+0
| |\ \ \ | | |/ /
| | * | cmake: remove workarounds for cmake bugs #13248 and #12864Sergei Golubchik2019-03-271-3/+0
| | | | | | | | | | | | | | | | since long we use a different workaround, our own CPackRPM wrapper
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-03-111-2/+2
|\ \ \ \ | |/ / /
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-03-111-1/+1
| |\ \ \ | | |/ /
| | * | MDEV-17703 Add WITH_UBSAN switch to CMake similar to WITH_ASANEugene Kosov2019-03-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be useful: UBSAN_OPTIONS=log_path=/some/path clang users may want to increase stack size in include/my_pthread.h or enable some optimizations
| | * | Fix the WITH_ASAN clang build of dynamic pluginsMarko Mäkelä2019-03-071-1/+1
| | | |
* | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-061-1/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | main.derived_cond_pushdown: Move all 10.3 tests to the end, trim trailing white space, and add an "End of 10.3 tests" marker. Add --sorted_result to tests where the ordering is not deterministic. main.win_percentile: Add --sorted_result to tests where the ordering is no longer deterministic.
| * | | Merge 10.1 into 10.2Marko Mäkelä2018-11-061-1/+2
| |\ \ \ | | |/ /
| | * | Merge branch '10.0' into 10.1Sergei Golubchik2018-10-301-1/+2
| | |\ \
| | | * \ Merge branch '5.5' into 10.0Sergei Golubchik2018-10-271-1/+2
| | | |\ \ | | | | |/
| | | | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-10-231-1/+2
| | | | |\
| | | | | * Bug #26275510 BUNDLED ZLIB DOESN'T INCLUDE FIXES FOR SOME VULNERABILITIESAditya A2018-07-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Upgrading the zlib lib to 1.2.11
* | | | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-09-281-1/+3
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-14560 Extra engines enabled through additional config are not loaded on ↵Sergei Golubchik2018-09-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | first installation RPM solution: Make all server plugins to restart the server when installed. To avoid multiple server restarts, do it only once in posttrans scriptlet. Add support for CPACK_RPM_<component>_POST_TRANS_SCRIPT_FILE
| * | | | | RPM: generate per-plugin.cnf files where git will ignore themSergei Golubchik2018-09-211-1/+1
| | | | | |
* | | | | | Merge bb-10.2-ext into 10.3Marko Mäkelä2018-01-041-1/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-9869 INSTALL SONAME 'ha_connect'Sergei Golubchik2017-12-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix 011497bd603 in RPM and DEB: storage engine packages must require the server package of exactly correct version.
* | | | | | fix TSAN build with ClangEugene Kosov2017-10-061-1/+1
|/ / / / /
* | | | | Merge branch '10.1' into 10.2Vicențiu Ciorbaru2017-09-191-1/+2
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.0' into 10.1Vicențiu Ciorbaru2017-09-191-1/+2
| |\ \ \ \ | | |/ / /
| | * | | Build improvements and cleanups.Vladislav Vaintroub2017-09-081-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - the probably ultimate fix for dependencies on VS - remove some GET_TARGET_PROPERTY(LOCATION ...), they are deprecated in cmake 3.9 - simplify signing targets on Windows. - remove INSTALL_DEBUG_TARGET, we do not mix binaries from different builds in the same package
* | | | | bugfix: don't overwrite tokudb.cnf during the buildSergei Golubchik2017-09-181-3/+5
| | | | |
* | | | | Merge 10.1 into 10.2Marko Mäkelä2017-05-061-1/+3
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | Also, include fixes by Vladislav Vaintroub to the aws_key_management plugin. The AWS C++ SDK specifically depends on OPENSSL_LIBRARIES, not generic SSL_LIBRARIES (such as YaSSL).
| * | | | MDEV-11660 Make encryption plugins "pure"Vladislav Vaintroub2017-04-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not exporting mysqld entry points directly. This is needed for mariabackup, to load encryption plugins on Windows. All plugins are "pure" by default. To mark plugin "impure" it should use RECOMPILE_FOR_EMBEDDED or STORAGE_ENGINE keyword.
* | | | | Fix building aws_key_management on LinuxVladislav Vaintroub2017-04-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in MYSQL_ADD_PLUGIN, do not add TARGET_LINK_LIBRARIES twice for the LINK_LIBRARIES parameter It is usually harmless to add libraries twice. However, aws_key_management uses -Wl,-whole-archive to workaround linker issues on Linux If libraries are added twice with whole-archive, linking will fail complaining about duplicate symbols
* | | | | Merge branch '10.1' into 10.2Vladislav Vaintroub2017-04-061-5/+7
|\ \ \ \ \ | |/ / / /
| * | | | Do not link client plugins to mysqldVladislav Vaintroub2017-04-061-5/+7
| | | | | | | | | | | | | | | | | | | | they might not be able to load after this.
* | | | | Merge 10.1 into 10.2Marko Mäkelä2017-04-061-1/+8
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.0 into 10.1Marko Mäkelä2017-04-061-1/+8
| |\ \ \ \ | | |/ / /
| | * | | Compiling, Windows . Avoid unnecessary rebuilds with MSVC.Vladislav Vaintroub2017-04-031-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To export symbols from the mysqld.exe, use lib.exe with /DEF, rather than pre-link step when building mysqld.exe. This helps to avoid relinking all plugins, if mysqld.exe was recompiled but the list of its exports has not changed. Also removed unnecessary DEPENDS in some ADD_CUSTOM_COMMAND (gen_lex_token, gen_lex_hash etc). They confuse VS generator which tends to recreate headers and do unnecessary recompilations.