summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.2 into 10.3Marko Mäkelä2020-01-071-0/+190
|\
| * Lets add another intrusive double linked list!Eugene Kosov2020-01-041-0/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Features: * STL-like interface * Fast modification: no branches on insertion or deletion * Fast iteration: one pointer dereference and one pointer comparison * Your class can be a part of several lists Modeled after std::list<T> but currently has fewer methods (not complete yet) For even more performance it's possible to customize list with templates so it won't have size counter variable or won't NULLify unlinked node. How existing lists differ? No existing lists support STL-like interface. I_List: * slower iteration (one more branch on iteration) * element can't be a part of two lists simultaneously I_P_List: * slower modification (branches, except for the fastest push_back() case) * slower iteration (one more branch on iteration) UT_LIST_BASE_NODE_T: * slower modification (branches) Three UT_LISTs were replaced: two in fil_system_t and one in dyn_buf_t.
* | Merge 10.2 into 10.3Marko Mäkelä2019-12-121-1/+1
|\ \ | |/
| * CONC-447 ERROR 2026 (HY000): SSL connection error: Certificate signature ↵Vladislav Vaintroub2019-12-081-1/+1
| | | | | | | | | | | | | | check failed Enable CRL checking on Windows. Enable certificate verification testing in client testing.
| * MDEV-21082: isnan/isinf compilation errors, isfinite warnings on MacOSVlad Lesin2019-11-191-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix consists of three commits backported from 10.3: 1) Cleanup isnan() portability checks (cherry picked from commit 7ffd7fe9627d1f750a3712aebb4503e5ae8aea8e) 2) Cleanup isinf() portability checks Original problem reported by Wlad: re-compilation of 10.3 on top of 10.2 build would cache undefined HAVE_ISINF from 10.2, whereas it is expected to be 1 in 10.3. std::isinf() seem to be available on all supported platforms. (cherry picked from commit bc469a0bdf85400f7a63834f5b7af1a513dcdec9) 3) Use std::isfinite in C++ code This is addition to parent revision fixing build failures. (cherry picked from commit 54999f4e75f42baca484ae436b382ca8817df1dd)
* | MDEV-21167 LF_PINS::stack_ends_here inaccurate, leading to alloca() larger ↵Vladislav Vaintroub2019-11-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | than stack Use my_thread_var::stack_ends_here inside lf_pinbox_real_free() for address where thread stack ends. Remove LF_PINS::stack_ends_here. It is not safe to assume that mysys_var that was used during pin allocation, remains correct during free. E.g with binlog group commit in Innodb, that frees pins for multiple Innodb transactions, it does not work correctly.
* | Merge 10.2 into 10.3Marko Mäkelä2019-11-061-1/+1
|\ \ | |/
| * Merge 10.1 to 10.2Marko Mäkelä2019-11-061-1/+1
| |\
| | * Merge 5.5 into 10.1mariadb-10.1.43Marko Mäkelä2019-11-061-1/+1
| | |\
| | | * MDEV-20971 ASAN heap-use-after-free in list_delete / heap_closeSergei Golubchik2019-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't save/restore HP_INFO as it could be changed by a concurrent thread. different parts of HP_INFO are protected by different mutexes and the mutex that protect most of the HP_INFO does not protect its open_list data. As a bonus, make heap_check_heap() to take const HP_INFO* and not make any changes there whatsoever.
* | | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-10-311-2/+2
|\ \ \ \ | |/ / /
| * | | MDEV-18562 [ERROR] InnoDB: WSREP: referenced FK check fail: Lock wait indexJan Lindström2019-10-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Lock wait can happen on secondary index when doing FK checks for wsrep. We should just return error to upper layer and applier will retry operation when needed.
* | | | Cleanup mman.h includesSergey Vojtovich2019-10-021-2/+0
| | | | | | | | | | | | | | | | As it is included from my_global.h already.
* | | | MDEV-20684: innodb/query cache use madvise CORE/NOCORE on FreeBSDDaniel Black2019-10-021-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This applies to large allocations. This maps to the way Linux does it in MDEV-10814 except FreeBSD uses different constants. Adjust error string to match to implementation. Tested on FreeBSD-12.0
* | | | MDEV-20525 rocksdb debug compilation fails on Windows due to unresolved ↵Marko Mäkelä2019-09-132-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | my_assert variable MYSQL_PLUGIN_IMPORT did not work correctly for the RocksDB helper library rocksdb_aux_lib, because that library was not compiled with -DMYSQL_DYNAMIC_PLUGIN. Fix DBUG such that it does not depend on exported data, only on functions (which do not need MYSQL_PLUGIN_IMPORT decoration) Use a "getter" function _db_my_assert() instead of DLL-exported variable. Also, reduce object code duplication by moving more of the DBUG_ASSERT logic inside the _db_my_assert() function, and add unlikely() and ATTRIBUTE_COLD hints to ensure that the 'assertion failed' code will be separated from the main control flow logic. Thus, the compiler can move the unlikely() code to the end of the compiled function, reachable via a forward conditional branch, which the processor's branch predictor could assume 'not taken'.
* | | | MDEV-20425 Implement Boolean debug build option debug_assertbb-10.3-MDEV-20425Marko Mäkelä2019-08-293-17/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 536215e32fc43aa423684e9807640dcf3453924b in MariaDB Server 10.3.1 introduced the compiler flag (not cmake option) DBUG_ASSERT_AS_PRINTF that converts DBUG_ASSERT in non-debug builds into printouts. For debug builds, it could be useful to be able to convert DBUG_ASSERT into a warning or error printout, to allow execution to continue. This would allow debug builds to be used for reproducing hard failures that occur with release builds. my_assert: A Boolean flag (set by default), tied to the new option debug_assert that is available on debug builds only. When set, DBUG_ASSERT() will invoke assert(), like it did until now. When unset, DBUG_ASSERT() will invoke fprintf(stderr, ...) with the file name, line number and assertion expression.
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-08-291-1/+1
|\ \ \ \ | |/ / /
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-08-281-1/+1
| |\ \ \ | | |/ /
| | * | fix clang warningsEugene Kosov2019-08-281-1/+1
| | | |
* | | | Merge 10.2 to 10.3Marko Mäkelä2019-08-131-2/+9
|\ \ \ \ | |/ / /
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-08-121-1/+8
| |\ \ \ | | |/ /
| | * | Merge 5.5 into 10.1Marko Mäkelä2019-08-121-1/+9
| | |\ \ | | | |/
| | | * Document TRASH_FILL, TRASH_ALLOC, TRASH_FREEMarko Mäkelä2019-08-121-1/+9
| | | |
| | * | imporve clang buildEugene Kosov2019-06-253-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug Maintainer mode makes all warnings errors. This patch fix warnings. Mostly about deprecated `register` keyword. Too much warnings came from Mroonga and I gave up on it.
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-07-021-2/+1
|\ \ \ \ | |/ / /
| * | | Remove the unused function maria_cloneMarko Mäkelä2019-06-241-2/+1
| | | |
* | | | MDEV-19845: Adaptive spin loopsMarko Mäkelä2019-06-271-13/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with the Intel Skylake microarchitecture, the PAUSE instruction latency is about 140 clock cycles instead of earlier 10. On AMD processors, the latency could be 10 or 50 clock cycles, depending on microarchitecture. Because of this big range of latency, let us scale the loops around the PAUSE instruction based on timing results at server startup. my_cpu_relax_multiplier: New variable: How many times to invoke PAUSE in a loop. Only defined for IA-32 and AMD64. my_cpu_init(): Determine with RDTSC the time to run 16 PAUSE instructions in two unrolled loops according, and based on the quicker of the two runs, initialize my_cpu_relax_multiplier. This form of calibration was suggested by Mikhail Sinyavin from Intel. LF_BACKOFF(), ut_delay(): Use my_cpu_relax_multiplier when available. ut_delay(): Define inline in my_cpu.h. UT_COMPILER_BARRIER(): Remove. This does not seem to have any effect, because in our ut_delay() implementation, no computations are being performed inside the loop. The purpose of UT_COMPILER_BARRIER() was to prohibit the compiler from reordering computations. It was not emitting any code.
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-06-191-0/+1
|\ \ \ \ | |/ / /
| * | | MDEV-19750 mysql command wrong encodingVladislav Vaintroub2019-06-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restore the detection of default charset in command line utilities. It worked up to 10.1, but was broken by Connector/C. Moved code for detection of default charset from sql-common/client.c to mysys, and make command line utilities to use this code if charset was not specified on the command line.
* | | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-06-141-0/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-06-131-0/+1
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.1Oleksandr Byelkin2019-06-121-0/+1
| | |\ \ | | | |/
| | | * MDEV-18479 ComplementIgor Babaev2019-05-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch complements the patch that fixes bug MDEV-18479. This patch takes care of possible overflow when calculating the estimated number of rows in a materialized derived table / view.
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-05-291-1/+9
|\ \ \ \ | |/ / /
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-05-281-1/+9
| |\ \ \ | | |/ /
| | * | Merge 5.5 into 10.1Marko Mäkelä2019-05-281-0/+8
| | |\ \ | | | |/
| | | * MDEV-17799 Add ASAN-poisoned redzones for MEM_ROOTSergei Golubchik2019-05-201-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | post-merge changes Closes #954
| | | * MDEV-17799 Add ASAN-poisoned redzones for MEM_ROOT and mem_heap_tEugene Kosov2019-05-201-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is for MEM_ROOT only. In debug mode add 8 byte of poisoned memory before every allocated chunk. On the right of every chunk there will be either 1-7 trailing poisoned bytes, or next chunk's redzone, or poisoned non allocated memory or redzone of a malloc()ed buffer.
* | | | Merge 10.2 into 10.3Marko Mäkelä2019-05-14132-133/+133
|\ \ \ \ | |/ / /
| * | | Merge 10.1 into 10.2Marko Mäkelä2019-05-13133-134/+134
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-11104-104/+104
| | |\ \ | | | |/
| | | * Update FSF AddressVicențiu Ciorbaru2019-05-1183-83/+83
| | | | | | | | | | | | | | | | * Update wrong zip-code
| | * | Update FSF addressVicențiu Ciorbaru2019-05-118-8/+8
| | | |
| | * | Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-1120-21/+21
| | |\ \ | | | |/
| | | * Follow-up to changing FSF addressVicențiu Ciorbaru2019-05-118-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some places didn't match the previous rules, making the Floor address wrong. Additional sed rules: sed -i -e 's/Place.*Suite .*, Boston/Street, Fifth Floor, Boston/g' sed -i -e 's/Suite .*, Boston/Fifth Floor, Boston/g'
| | | * Update FSF addressMichal Schorm2019-05-1011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on the work of Michal Schorm, rebased on the earliest MariaDB version. Th command line used to generate this diff was: find ./ -type f \ -exec sed -i -e 's/Foundation, Inc., 59 Temple Place, Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/Foundation, Inc. 59 Temple Place.* Suite 330, Boston, /Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, /g' {} \; \ -exec sed -i -e 's/MA.*.....-1307.*USA/MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/Foundation, Inc., 59 Temple/Foundation, Inc., 51 Franklin/g' {} \; \ -exec sed -i -e 's/Place, Suite 330, Boston, MA.*02111-1307.*USA/Street, Fifth Floor, Boston, MA 02110-1335 USA/g' {} \; \ -exec sed -i -e 's/MA.*.....-1307/MA 02110-1335/g' {} \;
* | | | Make TRASH_FREED_MEMORY a cmake option, similar to SAFEMALLOCVladislav Vaintroub2019-05-131-1/+1
| | | |
* | | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-05-121-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-05-041-1/+1
| |\ \ \ | | |/ /
| | * | cleanup: make TREE copyableSergei Golubchik2019-04-241-1/+1
| | | | | | | | | | | | | | | | | | | | move per-object TREE::null_element to be one global static null_element.