summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2020-05-192-45/+58
|\
| * Move c++ code from my_atomic.h to my_atomic_wrapper.hMonty2020-05-192-45/+58
| | | | | | | | | | This is because it breaks code that is using extern "C" when including my_atomic, which is the case with ha_s3.cc
* | Merge 10.4 into 10.5Marko Mäkelä2020-05-183-29/+99
|\ \ | |/
| * MDEV-22456 after-merge fix: introduce Atomic_relaxedMarko Mäkelä2020-05-182-12/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the merge 9e6e43551fc61bc34152f8d60f5d72f0d3814787 we made Atomic_counter a more generic wrapper of std::atomic so that dict_index_t would support the implicit assignment operator. It is better to revert the changes to Atomic_counter and instead introduce Atomic_relaxed as a generic wrapper to std::atomic. Unlike Atomic_counter, we will not define operator++, operator+= or similar, because we want to make the operations more explicit in the users of Atomic_wrapper, because unlike loads and stores, atomic read-modify-write operations always incur some overhead.
| * Merge 10.3 into 10.4Marko Mäkelä2020-05-163-31/+78
| |\ | | | | | | | | | | | | We will expose some more std::atomic internals in Atomic_counter, so that dict_index_t::lock will support the default assignment operator.
| | * Merge 10.2 into 10.3Marko Mäkelä2020-05-152-30/+66
| | |\
| | | * Amend af784385b4a2b286000fa2c658e34283fe7bba60: Avoid vtable overheadMarko Mäkelä2020-05-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | When neither MSAN nor Valgrind are enabled, declare Field::mark_unused_memory_as_defined() as an empty inline function, instead of declaring it as a virtual function.
| | | * span cleanupEugene Kosov2020-05-151-21/+41
| | | |
| | | * Fix for using uninitialized memoryMonty2020-05-151-6/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-22073 MSAN use-of-uninitialized-value in collect_statistics_for_table() Other things: innodb.analyze_table was changed to mainly test statistic collection. Was discussed with Marko.
* | | | Merge mariadb-10.5.3 into 10.5Marko Mäkelä2020-05-124-28/+29
|\ \ \ \
| * \ \ \ Merge branch '10.4' into 10.5Sergei Golubchik2020-05-094-28/+29
| |\ \ \ \ | | |/ / /
| | * | | WolfSSL fixesSergei Golubchik2020-05-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | remove Timeval workaround (not needed anymore). add template workaround. comments.
| | * | | Update WolfSSLVladislav Vaintroub2020-05-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix WolfSSL build: - Do not build with TLSv1.0,it stopped working,at least with SChannel client - Disable a test that depends on TLSv1.0 - define FP_MAX_BITS always, to fix 32bit builds. - Increase MAX_AES_CTX_SIZE, to fix build on Linux
| | * | | MDEV-21794: Optimizer flag rowid_filter leads to long querySergei Petrunia2020-05-071-24/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rowid Filter check is just like Index Condition Pushdown check: before we check the filter, we must check if we have walked out of the range we are scanning. (If we did, we should return, and not continue the scan). Consequences of this: - Rowid filtering doesn't work for keys that have partially-covered blob columns (just like Index Condition Pushdown) - The rowid filter function has three return values: CHECK_POS (passed) CHECK_NEG (filtered out), CHECK_OUT_OF_RANGE. All of the above is implemented in this patch
* | | | | MDEV-22043 Special character leads to assertion in ↵Alexander Barkov2020-05-091-3/+6
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | my_wc_to_printable_generic on 10.5.2 (debug) The code did not take into account that: - U+005C (backslash) can occupy more than mbminlen characters (e.g. in sjis) - Some character sets do not have a code for U+005C (e.g. swe7) Adding a new function my_wc_to_printable into MY_CHARSET_HANDLER to cover all special cases easier.
* | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-055-12/+23
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2020-05-055-12/+23
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-05-045-12/+23
| | |\ \ | | | |/
| | | * Merge branch '10.1' into 10.2Oleksandr Byelkin2020-05-021-5/+5
| | | |\
| | | | * Merge branch '5.5' into 10.1Oleksandr Byelkin2020-04-301-5/+5
| | | | |\
| | | | | * BUG#30301356 - SOME EVENTS ARE DELAYED AFTER DROPPING EVENTSergei Golubchik2020-04-301-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | queues.c cleanup and refactoring. Restore old version of _downhead() (from before cd483c55209) that works well in an average case. Use it for queue_fix(). Move existing specialized version of _downhead() to queue_replace() where it'll be handling the case it was specifically optimized for (moving the element to the end of the queue). And correct it to fix the heap not only down, but also up (this fixes BUG#30301356). Add unit tests. Collateral cosmetic fixes.
| | | * | | add WITH_DBUG_TRACE CMake variableEugene Kosov2020-04-291-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a way do disable DBUG_ENTER()/DBUG_EXIT() stuff which is needed to dbug trace. Those who doesn't need it may avoid tests slowdown with -DWITH_DBUG_TRACE=OFF dbug/tests.c: add define which is neede always in this test innodb.log_file_name_debug.test: do not depend on DBUG trace stuff in test Benchmark results: each test eats less CPU and you can have more parallel jobs in MTR. patched: ./mtr -mem -par=8 -suite=innodb 185.34s user 86.85s system 133% cpu 3:23.27 total ./mtr -mem -par=8 -suite=main 80.96s user 36.01s system 182% cpu 1:04.07 total main.select [ pass ] 1660 main.select [ pass ] 1513 main.select [ pass ] 1543 main.select [ pass ] 1660 main.select [ pass ] 1521 main.select [ pass ] 1511 main.select [ pass ] 1508 main.select [ pass ] 1520 main.select [ pass ] 1514 main.select [ pass ] 1522 vanilla: ./mtr -mem -par=8 -suite=innodb 203.61s user 92.16s system 140% cpu 3:30.16 total ./mtr -mem -par=8 -suite=main 94.11s user 35.51s system 206% cpu 1:02.69 total main.select [ pass ] 2032 main.select [ pass ] 2017 main.select [ pass ] 2040 main.select [ pass ] 2183 main.select [ pass ] 2253 main.select [ pass ] 2075 main.select [ pass ] 2109 main.select [ pass ] 2080 main.select [ pass ] 2098 main.select [ pass ] 2114
| | | * | | MDEV-20685: compile fixes for Solaris/OSX/AIXDaniel Black2020-04-293-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sig_return: Solaris/OSX returns different function ptr Move defination to my_alarm.h as its the only use. prevents compile warnings (copied from 10.3 branch) mysys/my_sync.c:136:19: error: 'cur_dir_name' defined but not used [-Werror=unused-const-variable=] 136 | static const char cur_dir_name[]= {FN_CURLIB, 0}; | ^~~~~~~~~~~~ fix compile error (DEPRECATED) leaked from ssl headers. In file included from /export/home/dan/mariadb-server-10.4/sql/sys_vars.cc:37: /export/home/dan/mariadb-server-10.4/sql/sys_vars.ic:69: error: "DEPRECATED" redefined [-Werror] 69 | #define DEPRECATED(X) X | In file included from /export/home/dan/mariadb-server-10.4/include/violite.h:150, from /export/home/dan/mariadb-server-10.4/sql/sql_class.h:38, from /export/home/dan/mariadb-server-10.4/sql/sys_vars.cc:36: /usr/include/openssl/ssl.h:2356: note: this is the location of the previous definition 2356 | # define DEPRECATED __attribute__((deprecated)) | Avoid Werror condition on non-Linux: plugin/server_audit/server_audit.c:2267:7: error: variable 'db_len_off' set but not used [-Werror=unused-but-set-variable] 2267 | int db_len_off; | ^~~~~~~~~~ plugin/server_audit/server_audit.c:2266:7: error: variable 'db_off' set but not used [-Werror=unused-but-set-variable] 2266 | int db_off; | ^~~~~~ auth_gssapi fix include path for Solaris Consistent with the upstream packaged patch: https://github.com/OpenIndiana/oi-userland/blob/oi/hipster/components/database/mariadb-103/patches/06-gssapi.h.patch compile warnings on Solaris [ 91%] Building C object plugin/server_audit/CMakeFiles/server_audit.dir/server_audit.c.o /plugin/server_audit/server_audit.c: In function 'auditing_v8': /plugin/server_audit/server_audit.c:2194:20: error: unused variable 'db_len_off' [-Werror=unused-variable] 2194 | static const int db_len_off= 128; | ^~~~~~~~~~ /plugin/server_audit/server_audit.c:2193:20: error: unused variable 'db_off' [-Werror=unused-variable] 2193 | static const int db_off= 120; | ^~~~~~ /plugin/server_audit/server_audit.c:2192:20: error: unused variable 'cmd_off' [-Werror=unused-variable] 2192 | static const int cmd_off= 4432; | ^~~~~~~ At top level: /plugin/server_audit/server_audit.c:2192:20: error: 'cmd_off' defined but not used [-Werror=unused-const-variable=] /plugin/server_audit/server_audit.c:2193:20: error: 'db_off' defined but not used [-Werror=unused-const-variable=] 2193 | static const int db_off= 120; | ^~~~~~ /plugin/server_audit/server_audit.c:2194:20: error: 'db_len_off' defined but not used [-Werror=unused-const-variable=] 2194 | static const int db_len_off= 128; | ^~~~~~~~~~ cc1: all warnings being treated as errors tested on: $ uname -a SunOS openindiana 5.11 illumos-b97b1727bc i86pc i386 i86pc
* | | | | | MDEV-22437 make THR_THD* variable thread_localEugene Kosov2020-05-051-15/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now all access goes through _current_thd() and set_current_thd() functions. Some functions like THD::store_globals() can not fail now.
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2020-05-041-1/+7
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-22401: Optimizer trace: multi-component range is not printed correctlySergei Petrunia2020-04-291-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KEY_MULTI_RANGE::range_flag does not have correct flag bits for per-endpoint flags (NEAR_MIN, NEAR_MAX, NO_MIN_RANGE, NO_MAX_RANGE). It only has bits for flags that describe both endpoints. So - Document this. - Switch optimizer trace to using {start|end}_key.flag values, instead. This fixes the bug. - Switch records_in_column_ranges() to doing that too. (This used to work, because KEY_MULTI_RANGE::range_flag had correct flag value for the last key component, and EITS only uses one-component pseudo-indexes)
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2020-04-291-1/+2
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.3 into 10.4Marko Mäkelä2020-04-271-1/+2
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.2 into 10.3Marko Mäkelä2020-04-271-1/+2
| | |\ \ \ \ | | | |/ / /
| | | * | | cleanup THR_KEY_mysysEugene Kosov2020-04-251-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | read TLS with my_thread_var write TLS with set_mysys_var() my_thread_var is no longer __attribute__ ((const)): this attribute is simply incorrect here. Read gcc manual for more information. sql/threadpool_generic.cc fails with that attribute.
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2020-04-253-25/+2
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | The functional changes of commit 5836191c8f0658d5d75484766fdcc3d838b0a5c1 (MDEV-21168) are omitted due to MDEV-742 having addressed the issue.
| * | | | | MDEV-7962 wsrep_on() takes 0.14% in OLTP ROMarko Mäkelä2020-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason why we have wsrep_on() at all is that the macro WSREP(thd) depends on the definition of THD, and that is intentionally an opaque data type for InnoDB. So, we cannot avoid invoking wsrep_on(), but we can evaluate the less expensive conditions thd && WSREP_ON before calling the function. Global_read_lock: Use WSREP_NNULL(thd) instead of wsrep_on(thd) because we not only know the definition of THD but also that the pointer is not null. wsrep_open(): Use WSREP(thd) instead of wsrep_on(thd). InnoDB: Replace thd && wsrep_on(thd) with wsrep_on(thd), now that the condition has been merged to the definition of the macro wsrep_on().
| * | | | | MDEV-22203: WSREP_ON is unnecessarily expensive WITH_WSREP=OFFMarko Mäkelä2020-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the server is compiled WITH_WSREP=OFF, we should avoid evaluating conditions on a global variable that is constant. WSREP_ON_: Renamed from WSREP_ON. Defined only WITH_WSREP=ON. WSREP_ON: Defined as unlikely(WSREP_ON_). wsrep_on(): Defined as WSREP_ON && wsrep_service->wsrep_on_func(). The reason why we have wsrep_on() at all is that the macro WSREP(thd) depends on the definition of THD, and that is intentionally an opaque data type for InnoDB. So, we cannot avoid invoking wsrep_on(), but we can evaluate the less expensive condition WSREP_ON before calling the function.
| * | | | | Shrink my_atomic.h and my_cpu.h scopeSergey Vojtovich2020-04-152-3/+0
| | | | | |
| * | | | | slave_open_temp_tables to Atomic_counterSergey Vojtovich2020-04-151-10/+0
| | | | | |
| * | | | | Relay_log_info::executed_entries to Atomic_counterSergey Vojtovich2020-04-151-10/+0
| | | | | |
* | | | | | MDEV-22214 mariadbd.exe calls function mysqld.exe, and crashesVladislav Vaintroub2020-04-103-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | Fixed centos 6 build failureSergey Vojtovich2020-04-081-0/+1
| | | | | |
* | | | | | my_pagepages: perror -> my_errorDaniel Black2020-04-081-1/+2
| | | | | |
* | | | | | my_largepage: fprintf -> my_{printf_,}errorDaniel Black2020-04-081-1/+2
| | | | | |
* | | | | | add EE_BADMEMORY_RELEASEDaniel Black2020-04-081-1/+2
| | | | | |
* | | | | | HAVE_LARGE_PAGES no longer globalDaniel Black2020-04-051-5/+0
| | | | | |
* | | | | | Simplified away my_get_large_page_size()Sergey Vojtovich2020-04-041-10/+0
| | | | | |
* | | | | | HAVE_LARGE_PAGE_OPTION to HAVE_LARGE_PAGESSergey Vojtovich2020-04-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | It isn't an "option" anymore.
* | | | | | Coding style fixesSergey Vojtovich2020-04-042-5/+6
| | | | | |
* | | | | | my_next_large_page_size() cleanupSergey Vojtovich2020-04-041-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it static, coding style cleanup, declare consistently with all callers (same ifdefs).
* | | | | | Cleanup HAVE_MMAP_ALIGNED: one cmake check lessSergey Vojtovich2020-04-041-1/+1
| | | | | |
* | | | | | Fix CentOS 6 and quantal build failuresSergey Vojtovich2020-04-031-0/+5
| | | | | |
* | | | | | Merge pull request #1221 from ↵Daniel Black2020-04-022-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | grooverdan/10.4-MDEV-18851-multiple-sized-large-page-support MDEV-18851: multiple sized large page support (linux)
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2020-03-302-2/+143
|\ \ \ \ \ \ | |/ / / / /