summaryrefslogtreecommitdiff
path: root/sql/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Fix generation of bison output for out-of-source builds.Vladislav Vaintroub2021-09-081-2/+3
| | | | | | Make sure the #line directives contain existing source file sql_yacc.yy. Before the patch #line directive would point out to non-existing path in current build directory.
* need at least Bison 2.4 for `%define api.pure`Sergei Golubchik2021-08-221-1/+1
|
* Merge 10.5 into 10.6Marko Mäkelä2021-06-011-20/+23
|\
| * followup: rename generated files to have distinct namesSergei Golubchik2021-05-271-18/+18
| |
| * MDEV-25726 get rid of cmake comment hack in sql_yacc.yySergei Golubchik2021-05-271-12/+15
| | | | | | | | | | and replace it with equally unsightly %ifdef/%endif hack also, support %else, it's nice
* | Move debug_crash_here to it's own source filesMonty2021-05-191-1/+1
| |
* | Move all ddl log code to ddl_log.cc and ddl_log.hMonty2021-05-191-1/+3
| | | | | | | | | | | | Part of prepration for: MDEV-17567 Atomic DDL No notable code changes except moving code around
* | Windows - Fix CMAKE_INTERPROCEDURAL_OPTIMIZATION build with MSVCVladislav Vaintroub2021-05-091-3/+5
| | | | | | | | | | | | | | | | | | If IPO is enabled, MSVC compiles with /GL which is not compatible with cmake's WINDOWS_EXPORT_ALL_SYMBOLS. Since server.dll can't autoexport symbols from /GL compiled objects, IPO must be disabled for dbug, string,mysys, and sql targets (in case we build "plugin" DLLs that need server.dll's symbols)
* | MDEV-17399 Add support for JSON_TABLE.Alexey Botchkov2021-04-211-0/+1
| | | | | | | | | | The specific table handler for the table functions was introduced, and used to implement JSON_TABLE.
* | Merge 10.5 into 10.6Marko Mäkelä2021-04-151-2/+2
|\ \ | |/
| * Fix cross-compile to consider CMAKE_CROSSCOMPILING_EMULATORbb-10.5-danielblack-pr1805-cross-compileJustin Jagieniak2021-04-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | When CMAKE_CROSSCOMPILING_EMULATOR is defined, a cross-compile can be made, however with native (emulated) execution possible. This commit takes those points in the build system that execute built targets natively and allow these to be executed in a crosscompile if CMAKE_CROSSCOMPILING_EMULATOR is defined. Closes #1805
* | mariadb-tzinfo-to-sql,mariadb-dumpslow as Client componentsDaniel Black2021-03-281-1/+1
| |
* | MDEV-9077 Use sys schema in bootstrapping, incl. mtrVladislav Vaintroub2021-03-181-3/+4
| |
* | Merge 10.5 into 10.6Marko Mäkelä2020-12-211-1/+8
|\ \ | |/
| * cleanup: plugin.cmakeSergei Golubchik2020-12-211-1/+8
| | | | | | | | | | | | list all supported options in the comment. remove wsrep-specific hack of EXPORT_SYMBOLS, wsrep-specific hacks belong to wsrep
* | Merge 10.5 into 10.6bb-10.6-MDEV-24426Marko Mäkelä2020-12-171-4/+13
|\ \ | |/
| * Add build on AIXEtienne Guesnet2020-12-161-4/+13
| |
* | Merge 10.5 into 10.6Marko Mäkelä2020-11-021-1/+1
|\ \ | |/
| * Merge 10.4 into 10.5Marko Mäkelä2020-10-301-1/+1
| |\
| | * Merge 10.3 into 10.4Marko Mäkelä2020-10-291-1/+1
| | |\
| | | * cleanup: use predefined CMAKE_DL_LIBSSergei Golubchik2020-10-231-1/+1
| | | | | | | | | | | | | | | | instead of, say, MY_SEARCH_LIBS(dlopen dl LIBDL)
* | | | Merge branch '10.5' into 10.6Oleksandr Byelkin2020-09-021-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.4 into 10.5Marko Mäkelä2020-08-201-1/+1
| |\ \ \ | | |/ /
| | * | MDEV-23489 Windows zip files 10.4.14 have an embryonic data folderVladislav Vaintroub2020-08-151-4/+0
| | | | | | | | | | | | | | | | Fix : Do not INSTALL anything with cmake from data folder.
* | | | MDEV-23238 - remove async client from server code.Vladislav Vaintroub2020-09-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It is already in libmariadb, and server (also that client in server) does not need it. It does not work in embedded either since it relies on non-blocking sockets
* | | | Merge 10.5 into 10.6Marko Mäkelä2020-08-121-0/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.4' into 10.5Oleksandr Byelkin2020-08-041-0/+1
| |\ \ \ | | |/ /
| | * | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-08-031-0/+1
| | |\ \ | | | |/
| | | * MDEV-19632 Replication aborts with ER_SLAVE_CONVERSION_FAILED upon CREATE ↵Alexander Barkov2020-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... SELECT in ORACLE mode - Adding optional qualifiers to data types: CREATE TABLE t1 (a schema.DATE); Qualifiers now work only for three pre-defined schemas: mariadb_schema oracle_schema maxdb_schema These schemas are virtual (hard-coded) for now, but may turn into real databases on disk in the future. - mariadb_schema.TYPE now always resolves to a true MariaDB data type TYPE without sql_mode specific translations. - oracle_schema.DATE translates to MariaDB DATETIME. - maxdb_schema.TIMESTAMP translates to MariaDB DATETIME. - Fixing SHOW CREATE TABLE to use a qualifier for a data type TYPE if the current sql_mode translates TYPE to something else. The above changes fix the reported problem, so this script: SET sql_mode=ORACLE; CREATE TABLE t2 AS SELECT mariadb_date_column FROM t1; is now replicated as: SET sql_mode=ORACLE; CREATE TABLE t2 (mariadb_date_column mariadb_schema.DATE); and the slave can unambiguously treat DATE as the true MariaDB DATE without ORACLE specific translation to DATETIME. Similar, SET sql_mode=MAXDB; CREATE TABLE t2 AS SELECT mariadb_timestamp_column FROM t1; is now replicated as: SET sql_mode=MAXDB; CREATE TABLE t2 (mariadb_timestamp_column mariadb_schema.TIMESTAMP); so the slave treats TIMESTAMP as the true MariaDB TIMESTAMP without MAXDB specific translation to DATETIME.
| | * | Revert MDEV-20453 (string_view)Marko Mäkelä2020-07-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In fsp_path_to_space_name(), we would access a byte right before the start of the string, tripping AddressSanitizer. This reverts commit d87006a1c1e775ac75b6cc21c8a243b8b4e61571 and commit a7634281aa64a549d19cd20ead7e80d0267271ee.
| | * | MDEV-20453 add class similar to std::string_view (non owning string reference)Eugene Kosov2020-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This version is not optimized yet. It could have bugs because I didn't check it with unit tests. Also, std::char_traits are not really supported. So, now it's not possible to create f.ex. a case insensitive string_view. fil_path_to_space_name(): renamed, moved to another file and refactored to use string_view
* | | | MDEV-23043 Refactor Windows service handlingVladislav Vaintroub2020-07-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removed the existing nt_service classes - they provide little abstraction, and only obscure a relatively simple service handling. This replaces by similar code inspired by MS docs samples. Service handling is now moved into winmain.cc, which contains the main() function for Windows. winmain provides reporting callbacks, which should be used by external code ,to report transitions from starting to running to shutting down to stopped. Removed a do-nothing ServiceMain thread, and the non-working service "pause/continue". Removed a lot of #ifdef __WIN__ code from mysqld.cc
* | | | Merge branch '10.5' into 10.6Vladislav Vaintroub2020-07-041-2/+2
|\ \ \ \ | |/ / /
| * | | Compiling - improve multithreaded buildVladislav Vaintroub2020-05-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In multithreaded build (at least confirmed with Windows ninja and msbuild), at the end of "sql" target compilation, only 2 processors are used, compiling either sql_yacc.cc or sql_yacc_ora.cc. Thus, link of dependent executables or libraries is delayed while build is underusing the CPU. Rearrange the source list to improve parallelism.
* | | | MDEV-22990 Threadpool : Optimize network/named pipe IO for WindowsVladislav Vaintroub2020-06-261-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reduces the overhead of system calls prior to a query, for threadpool. Previously, 3 system calls were done 1. WSARecv() to get notification of input data from client, asynchronous equivalent of select() in one-thread-per-connection 2. recv(4 bytes) - reading packet header length 3. recv(packet payload) Now there will be usually, just WSARecv(), which pre-reads user data into a buffer, so we spared 2 syscalls Profiler shows the most expensive call WSARecv(16%CPU) becomes 4% CPU, after the patch, benchmark results (network heavy ones like point-select) improve by ~20% The buffer management was rather carefully done to keep buffers together, as Windows would keeps the pages pinned in memory for the duration of async calls. At most 1MB memory is used for the buffers, and overhead per-connection is only 256 bytes, which should cover most of the uses. SSL does not yet use the optmization, so far it does not properly use VIO for reads and writes. Neither one-thread-per-connection would get any benefit, but that should be fine, it is not even default on Windows.
* | | MDEV-22454 Allow -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ONVladislav Vaintroub2020-05-041-2/+3
| | | | | | | | | | | | | | | | | | Disable IPO (interprocedural optimization, aka /GL) on Windows on libraries, from which server.dll exports symbols - exporting symbols does not work for objects compiled with /GL.
* | | MDEV-22214 mariadbd.exe calls function mysqld.exe, and crashesVladislav Vaintroub2020-04-101-84/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 postfixesVladislav Vaintroub2020-03-231-3/+3
| | |
* | | MDEV-21303 Make executables MariaDB namedRasmus Johansson2020-03-211-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | To change all executables to have a mariadb name I had to: - Do name changes in every CMakeLists.txt that produces executables - CREATE_MARIADB_SYMLINK was removed and GET_SYMLINK added by Wlad to reuse the function in other places also - The scripts/CMakeLists.txt could make use of GET_SYMLINK instead of introducing redundant code, but I thought I'll leave that for next release - A lot of changes to debian/.install and debian/.links files due to swapping of real executable and symlink. I did not however change the name of the manpages, so the real name is still mysql there and mariadb are symlinks. - The Windows part needed a change now when we made the executables mariadb -named. MSI (and ZIP) do not support symlinks and to not break backward compatibility we had to include mysql named binaries also. Done by Wlad
* | | CMake cleanup - simplify create_initial_db.cmakeVladislav Vaintroub2020-03-111-16/+10
| | | | | | | | | | | | | | | Also make initial_database optional target on non-Windows, as sometimes it can be quite handy to bootstrap without MTR.
* | | MDEV-21689 Add Sql_cmd for GRANT/REVOKE statementsAlexander Barkov2020-02-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewriting GRANT/REVOKE grammar to use more bison stack and use Sql_cmd_ style 1. Removing a few members from LEX: - uint grant, grant_to_col, which_columns - List<LEX_COLUMN> columns - bool all_privileges 2. Adding classes Grand_object_name, Lex_grant_object_name 3. Adding classes Grand_privilege, Lex_grand_privilege 4. Adding struct Lex_column_list_privilege_st, class Lex_column_list_privilege 5. Rewriting the GRANT/REVOKE grammar to use new classes and pass them through bison stack (rather than directly access LEX members) 6. Adding classes Sql_cmd_grant* and Sql_cmd_revoke*, changing GRANT/REVOKE to use LEX::m_sql_cmd. 7. Adding the "sp_handler" grammar rule and removing some duplicate grammar for GRANT/REVOKE for different kinds of SP objects. 8. Adding a new rule comma_separated_ident_list, reusing it in: - with_column_list - colum_list_privilege
* | | MDEV-21548 Explicitly declare sql_bultins library STATIC.Vladislav Vaintroub2020-01-211-1/+1
| | | | | | | | | | | | Someone tried -DBUILD_SHARED_LIBS:BOOL=ON. This did not work well
* | | MDEV-21327 : MDL wait notification for innodb background threadpoolVladislav Vaintroub2020-01-121-6/+3
| | |
* | | Merge 10.4 into 10.5Marko Mäkelä2019-12-271-8/+11
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2019-12-271-8/+11
| |\ \ | | |/
| | * Merge 10.2 into 10.3Marko Mäkelä2019-12-271-8/+11
| | |\
| | | * Merge 10.1 into 10.2Marko Mäkelä2019-12-231-4/+6
| | | |\
| | | | * CMake,Windows - cleanup data directory prior to bootstrap for ↵Vladislav Vaintroub2019-12-121-2/+4
| | | | | | | | | | | | | | | | | | | | nitial_database target
* | | | | dependencies for VSSergei Golubchik2019-12-211-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | item_cmpfunc.h includes pcre2.h, so with the bundled pcre2 it has to be built before anything that includes pcre2.h . And item_cmpfunc.h is indirectly included everywhere, also in many plugins. Somehow Ninja and Makefiles generators can still deduce the correct build dependencies, but Visual Studio generator cannot. Two changes: * move pcre2.h from item_cmpfunc.h to item_cmpfunc.cc * create an explicit dependency on pcre2 for the server
* | | | | MDEV-14024 PCRE2.Alexey Botchkov2019-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | Related changes in the server code.