summaryrefslogtreecommitdiff
path: root/libmysqld
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.5 into 10.6Marko Mäkelä2021-02-171-1/+2
|\
| * Merge branch 'bb-10.4-release' into bb-10.5-releaseSergei Golubchik2021-02-151-1/+2
| |\
| | * Merge branch 'bb-10.3-release' into bb-10.4-releaseSergei Golubchik2021-02-121-1/+2
| | |\ | | | | | | | | | | | | | | | | Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
| | | * Merge branch '10.2' into 10.3Sergei Golubchik2021-02-011-1/+2
| | | |\
| | | | * cleanup: fix and generalize handle_manager threadSergei Golubchik2021-01-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * provide an argument to the callback * don't ignore a callback request if it's already present in the queue * initialize mutex/cond/in_use flag before starting the thread, in case the first callback queueing request arrives before handle_manager had time to initialize * set/check abort_manager under a mutex, otherwise handle_manager thread might destroy LOCK_manager before stop_handle_manager released it * signal COND on queueing a callback, stop cond_wait on callback request * always start the thread, even if flush_time is 0 * but keep the old behavior in embedded (no replication, no galera) * style cleanups (e.g. remove volatile for a variable protected by a mutex)
| | * | | Merge 10.3 into 10.4Marko Mäkelä2020-11-031-1/+2
| | |\ \ \ | | | |/ /
* | | | | Merge 10.5 into 10.6Marko Mäkelä2020-11-022-2/+3
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2020-11-011-1/+2
| |\ \ \ \
| | * \ \ \ Merge branch '10.3' into 10.4Oleksandr Byelkin2020-10-311-1/+2
| | |\ \ \ \ | | | |/ / / | | |/| / / | | | |/ /
| | | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-10-301-1/+2
| | | |\ \ | | | | |/
| | | | * MDEV-19838: followup, fix for PS & embeddedOleksandr Byelkin2020-10-291-1/+2
| | | | | | | | | | | | | | | | | | | | Use 9 byte (min length packet)
| * | | | 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-024-14/+7
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-19275 Provide SQL service to plugins.Alexey Botchkov2020-08-144-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Protocol_local fixed so it can be used now. Some Protocol:: methods made virtual so they can adapt. as well as net_ok and net_send_error functions. execute_sql_string function is exported to the plugins. To be changed with the mysql_use_result.
* | | | | MDEV-23238 - remove async client from server code.Vladislav Vaintroub2020-09-011-77/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | MDEV-21612 - remove COM_MULTI from server and C/CVladislav Vaintroub2020-07-141-3/+2
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | The COM_MULTI did not take off. No connector is using it. Remove related code from server, and client. If anything it is a step simplification of already-bloated dispatch_command(), and related code.
* | | | Merge remote-tracking branch 'origin/10.4' into 10.5Monty2020-07-031-0/+1
|\ \ \ \ | |/ / /
| * | | Merge remote-tracking branch 'origin/10.3' into 10.4Monty2020-07-031-0/+1
| |\ \ \ | | |/ /
| | * | Fixed errors found by MSANMonty2020-07-021-0/+1
| | | |
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-07-021-0/+2
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2020-07-021-0/+2
| | |\ \ | | | |/
| | | * MDEV-20377: Make WITH_MSAN more usableMarko Mäkelä2020-07-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MemorySanitizer (clang -fsanitize=memory) requires that all code be compiled with instrumentation enabled. The only exception is the C runtime library. Failure to use instrumented libraries will cause bogus messages about memory being uninitialized. In WITH_MSAN builds, we must avoid calling getservbyname(), because even though it is a standard library function, it is not instrumented, not even in clang 10. Note: Before MariaDB Server 10.5, ./mtr will typically fail due to the old PCRE library, which was updated in MDEV-14024. The following cmake options were tested on 10.5 in commit 94d0bb4dbeb28a94d1f87fdd55f4297ff3df0157: cmake \ -DCMAKE_C_FLAGS='-march=native -O2' \ -DCMAKE_CXX_FLAGS='-stdlib=libc++ -march=native -O2' \ -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug \ -DWITH_INNODB_{BZIP2,LZ4,LZMA,LZO,SNAPPY}=OFF \ -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,SPIDER}=NO \ -DWITH_SAFEMALLOC=OFF \ -DWITH_{ZLIB,SSL,PCRE}=bundled \ -DHAVE_LIBAIO_H=0 \ -DWITH_MSAN=ON MEM_MAKE_DEFINED(): An alias for VALGRIND_MAKE_MEM_DEFINED() and __msan_unpoison(). MEM_GET_VBITS(), MEM_SET_VBITS(): Aliases for VALGRIND_GET_VBITS(), VALGRIND_SET_VBITS(), __msan_copy_shadow(). InnoDB: Replace the UNIV_MEM_ macros with corresponding MEM_ macros. ut_crc32_8_hw(), ut_crc32_64_low_hw(): Use the compiler built-in functions instead of inline assembler when building WITH_MSAN. This will require at least -msse4.2 when building for IA-32 or AMD64. The inline assembler would not be instrumented, and would thus cause bogus failures.
* | | | MDEV-22887 unresolved symbol crc32c_vpmsum on Ubuntu XenialMarko Mäkelä2020-06-151-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is one more follow-up fix to MDEV-22641. Explicitly specify the dependency of the innobase library on mysys. Also, remove stale references to CRC32_LIBRARY, which should have been removed in commit dec3f8ca69e5eb19a4be7a175d3834874c4d880b.
* | | | MDEV-22437 make THR_THD* variable thread_localEugene Kosov2020-05-051-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Now all access goes through _current_thd() and set_current_thd() functions. Some functions like THD::store_globals() can not fail now.
* | | | MDEV-20377: Make WITH_MSAN more usableMarko Mäkelä2020-03-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MemorySanitizer (clang -fsanitize=memory) requires that all code be compiled with instrumentation enabled. The C runtime library is an exception. Failure to use instrumented libraries will cause bogus messages about memory being uninitialized. In WITH_MSAN builds, we must avoid calling getservbyname(), because even though it is a standard library function, it is not instrumented, not even in clang 10. The following cmake options were tested: -DCMAKE_C_FLAGS='-march=native -O2' -DCMAKE_CXX_FLAGS='-stdlib=libc++ -march=native -O2' -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug -DWITH_INNODB_{BZIP2,LZ4,LZMA,LZO,SNAPPY}=OFF -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,SPIDER}=NO -DWITH_SAFEMALLOC=OFF -DWITH_{ZLIB,SSL,PCRE}=bundled -DHAVE_LIBAIO_H=0 -DWITH_MSAN=ON MEM_MAKE_DEFINED(): An alias for VALGRIND_MAKE_MEM_DEFINED() and in the future, __msan_unpoison(). For now, neither MEM_MAKE_DEFINED() nor MEM_UNDEFINED() perform any action under MSAN. Enabling them will catch more bugs, but will also require some more fixes or work-arounds. Json_writer::add_double(): Work around a frequently occurring failure in optimizer tests, related to EXPLAIN FORMAT=JSON. dtoa(): Disable MSAN altogether. For some reason, this function is triggering a lot of trouble, especially when invoked for DBUG functions. The MDL default timeout is dd=86400 seconds, and for some reason it is claimed to be uninitialized. InnoDB: Define UNIV_DEBUG_VALGRIND also WITH_MSAN. ut_crc32_8_hw(), ut_crc32_64_low_hw(): Use the compiler built-in functions instead of inline assembler when building WITH_MSAN. This will require at least -msse4.2 when building for IA-32 or AMD64. The inline assembler would not be instrumented, and would thus cause bogus failures.
* | | | Added support for replication for S3Monty2020-03-241-116/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-19964 S3 replication support Added new configure options: s3_slave_ignore_updates "If the slave has shares same S3 storage as the master" s3_replicate_alter_as_create_select "When converting S3 table to local table, log all rows in binary log" This allows on to configure slaves to have the S3 storage shared or independent from the master. Other thing: Added new session variable '@@sql_if_exists' to force IF_EXIST to DDL's.
* | | | MDEV-21303 Make executables MariaDB namedRasmus Johansson2020-03-211-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | MDEV-21907: InnoDB: Enable -Wconversion on clang and GCCMarko Mäkelä2020-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -Wconversion in GCC seems to be stricter than in clang. GCC at least since version 4.4.7 issues truncation warnings for assignments to bitfields, while clang 10 appears to only issue warnings when the sizes in bytes rounded to the nearest integer powers of 2 are different. Before GCC 10.0.0, -Wconversion required more casts and would not allow some operations, such as x<<=1 or x+=1 on a data type that is narrower than int. GCC 5 (but not GCC 4, GCC 6, or any later version) is complaining about x|=y even when x and y are compatible types that are narrower than int. Hence, we must rewrite some x|=y as x=static_cast<byte>(x|y) or similar, or we must disable -Wconversion. In GCC 6 and later, the warning for assigning wider to bitfields that are narrower than 8, 16, or 32 bits can be suppressed by applying a bitwise & with the exact bitmask of the bitfield. For older GCC, we must disable -Wconversion for GCC 4 or 5 in such cases. The bitwise negation operator appears to promote short integers to a wider type, and hence we must add explicit truncation casts around them. Microsoft Visual C does not allow a static_cast to truncate a constant, such as static_cast<byte>(1) truncating int. Hence, we will use the constructor-style cast byte(~1) for such cases. This has been tested at least with GCC 4.8.5, 5.4.0, 7.4.0, 9.2.1, 10.0.0, clang 9.0.1, 10.0.0, and MSVC 14.22.27905 (Microsoft Visual Studio 2019) on 64-bit and 32-bit targets (IA-32, AMD64, POWER 8, POWER 9, ARMv8).
* | | | MDEV-21907: Fix some -Wconversion outside InnoDBMarko Mäkelä2020-03-121-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some .c and .cc files are compiled as part of Mariabackup. Enabling -Wconversion for InnoDB would also enable it for Mariabackup. The .h files are being included during InnoDB or Mariabackup compilation. Notably, GCC 5 (but not GCC 4 or 6 or later versions) would report -Wconversion for x|=y when the type is unsigned char. So, we will either write x=(uchar)(x|y) or disable the -Wconversion warning for GCC 5. bitmap_set_bit(), bitmap_flip_bit(), bitmap_clear_bit(), bitmap_is_set(): Always implement as inline functions.
* | | | perfschema memory related instrumentation changesSergei Golubchik2020-03-104-26/+24
| | | |
* | | | MDEV-17832 Protocol: extensions for Pluggable types and JSON, GEOMETRYAlexander Barkov2020-03-105-0/+79
| | | |
* | | | MDEV-21702 Add a data type for privilegesAlexander Barkov2020-02-111-1/+1
| | | |
* | | | MDEV-21689 Add Sql_cmd for GRANT/REVOKE statementsAlexander Barkov2020-02-081-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-21581 Helper functions and methods for CHARSET_INFOAlexander Barkov2020-01-281-4/+4
| | | |
* | | | mysqltest crashes on DebianSergei Golubchik2020-01-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Debian is apparently offended that pcre2-posix implements POSIX API, thus it renames all posix-compatible symbols in libpcre2-posix to have the PCRE2 prefix. But Debian doesn't do anything to pcre2posix.h header, so any unaware application will get POSIX compatible type names and function prototypes from pcre2, but actual symbols will come from libc. To remedy this enormous incongruity we have to redefine POSIX-compatible function names in pcre2posix to match Debian's hack.
* | | | MDEV-21327 : MDL wait notification for innodb background threadpoolVladislav Vaintroub2020-01-121-1/+2
| | | |
* | | | remove pcre, add support for bundled pcre2Sergei Golubchik2019-12-212-2/+2
| | | |
* | | | MDEV-14024 PCRE2.Alexey Botchkov2019-12-212-2/+2
| | | | | | | | | | | | | | | | Related changes in the server code.
* | | | MDEV-20844 RBR from binary(16) to inet6 fails with error 171: The event was ↵Alexander Barkov2019-10-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | corrupt, leading to illegal data being read This patch changes the way how INET6 is packed to the RBR binary log: - from fixed length 16 bytes - to BINARY(16) compatible variable length style with trailing 0x00 byte compression. This is to make INET6 fully compatible with BINARY(16) in RBR binary logs, so RBR replication works in this scenarios: - Old master BINARY(16) -> New slave INET6 - New master INET6 -> Old slave BINARY(16) A new class StringPack was added to share the code between Field_string and Field_inet6.
* | | | MDEV-20768 Turn INET functions into a function collection pluginAlexander Barkov2019-10-071-2/+0
| | | |
* | | | A cleanup for: MDEV-18010 Add classes Inet4 and Inet6Alexander Barkov2019-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moving the implementations of class Inet4 and class Inet6 into separate files sql_type_inet.h and sql_type_inet.cc, in order to reuse them for the INET6 data type and inet function collection. - Adding a warning in the case when IS_IPV4_MAPPED() and IS_IPV4_COMPAT() erroneously gets an IPv4 address instead of the expected IPv6 address.
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-062-4/+15
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Sergei Golubchik2019-09-062-4/+15
| |\ \ \ | | |/ /
| | * | Merge 10.2 (up to commit ef00ac4c86daf3294c46a45358da636763fb0049) into 10.3Alexander Barkov2019-09-041-0/+1
| | |\ \ | | | |/