summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* fix clang warningsEugene Kosov2019-08-281-1/+1
|
* 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 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 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 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' {} \;
* | cleanup: make TREE copyableSergei Golubchik2019-04-241-1/+1
| | | | | | | | | | move per-object TREE::null_element to be one global static null_element.
* | Revert MDEV-18464 and MDEV-12009Marko Mäkelä2019-03-281-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 21b2fada7ab7f35c898c02d2f918461409cc9c8e and commit 81d71ee6b21870772c336bff15b71904914f146a. The MDEV-18464 change introduces a few data race issues. Contrary to the documentation, the field trx_t::victim is not always being protected by lock_sys_t::mutex and trx_t::mutex. Most importantly, it seems that KILL QUERY could wrongly avoid acquiring both mutexes when invoking lock_trx_handle_wait_low(), in case another thread had already set trx->victim=true. We also revert MDEV-12009, because it should depend on the MDEV-18464 fix being present.
* | MDEV-12009: Allow to force kill user threads/query which are flagged as high ↵Jan Lindström2019-03-281-0/+3
| | | | | | | | | | | | | | | | | | | | priority by Galera As noted on kill_one_thread SUPER should be able to kill even system threads i.e. threads/query flagged as high priority or wsrep applier thread. Normal user, should not able to kill threads/query flagged as high priority (BF) or wsrep applier thread.
* | cmake: re-enable -Werror in the maintainer modeSergei Golubchik2019-03-271-12/+14
| | | | | | | | | | | | now we can afford it. Fix -Werror errors. Note: * old gcc is bad at detecting uninit variables, disable it. * time_t is int or long, cast it for printf's
* | cleanup: miscSergei Golubchik2019-03-121-4/+4
| |
* | ASAN loves stack, give it someSergei Golubchik2019-03-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes these test failures in ASAN builds (in 10.1 and 10.4): * main.signal_demo3 * main.sp * sys_vars.max_sp_recursion_depth_func * mroonga/storage.foreign_key_delete_existent * mroonga/storage.foreign_key_delete_nonexistent * mroonga/storage.foreign_key_insert_existent * mroonga/storage.foreign_key_update_existent * mroonga/storage.foreign_key_update_nonexistent * mroonga/storage.function_command_auto-escape * mroonga/storage.function_command_select * mroonga/storage.variable_enable_operations_recording_insert
* | MDEV-9519: Data corruption will happen on the Galera cluster size changeJulius Goryavsky2019-02-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a 2+ node cluster which is replicating from an async master and the binlog_format is set to STATEMENT and multi-row inserts are executed on a table with an auto_increment column such that values are automatically generated by MySQL, then the server node generates wrong auto_increment values, which are different from what was generated on the async master. In the title of the MDEV-9519 it was proposed to ban start slave on a Galera if master binlog_format = statement and wsrep_auto_increment_control = 1, but the problem can be solved without such a restriction. The causes and fixes: 1. We need to improve processing of changing the auto-increment values after changing the cluster size. 2. If wsrep auto_increment_control switched on during operation of the node, then we should immediately update the auto_increment_increment and auto_increment_offset global variables, without waiting of the next invocation of the wsrep_view_handler_cb() callback. In the current version these variables retain its initial values if wsrep_auto_increment_control is switched on during operation of the node, which leads to inconsistent results on the different nodes in some scenarios. 3. If wsrep auto_increment_control switched off during operation of the node, then we must return the original values of the auto_increment_increment and auto_increment_offset global variables, as the user has set. To make this possible, we need to add a "shadow copies" of these variables (which stores the latest values set by the user). https://jira.mariadb.org/browse/MDEV-9519
* | Merge 10.1 into 10.1Marko Mäkelä2019-02-023-4/+4
|\ \ | | | | | | | | | This is joint work with Oleksandr Byelkin.
| * \ Merge branch '5.5' into 10.0Oleksandr Byelkin2019-01-282-2/+2
| |\ \ | | |/
| | * Crude "auto-load-data-local-infile" modemariadb-5.5.63Sergei Golubchik2019-01-272-2/+2
| | | | | | | | | | | | | | | | | | | | | Disable LOAD DATA LOCAL INFILE suport by default and auto-enable it for the duration of one query, if the query string starts with the word "load". In all other cases the application should enable LOAD DATA LOCAL INFILE support explicitly.
| * | Merge branch '5.5' into 10.0Oleksandr Byelkin2019-01-281-2/+2
| |\ \ | | |/
| | * Avoid noisy Clang 7 warning about unused variable.Vladislav Vaintroub2019-01-191-2/+2
| | | | | | | | | | | | Patch by Eugene Kosov.
| | * MDEV-17248 Improve ASAN memory pool instrumentationEugene Kosov2018-09-211-2/+2
| | | | | | | | | | | | | | | alloc_root(): unpoison only requested amount of bytes instead of a possible bigger aligned-sized buffer.
* | | MDEV-10963 Fragmented BINLOG queryAndrei Elkin2019-01-241-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem was originally stated in http://bugs.mysql.com/bug.php?id=82212 The size of an base64-encoded Rows_log_event exceeds its vanilla byte representation in 4/3 times. When a binlogged event size is about 1GB mysqlbinlog generates a BINLOG query that can't be send out due to its size. It is fixed with fragmenting the BINLOG argument C-string into (approximate) halves when the base64 encoded event is over 1GB size. The mysqlbinlog in such case puts out SET @binlog_fragment_0='base64-encoded-fragment_0'; SET @binlog_fragment_1='base64-encoded-fragment_1'; BINLOG @binlog_fragment_0, @binlog_fragment_1; to represent a big BINLOG. For prompt memory release BINLOG handler is made to reset the BINLOG argument user variables in the middle of processing, as if @binlog_fragment_{0,1} = NULL is assigned. Notice the 2 fragments are enough, though the client and server still may need to tweak their @@max_allowed_packet to satisfy to the fragment size (which they would have to do anyway with greater number of fragments, should that be desired). On the lower level the following changes are made: Log_event::print_base64() remains to call encoder and store the encoded data into a cache but now *without* doing any formatting. The latter is left for time when the cache is copied to an output file (e.g mysqlbinlog output). No formatting behavior is also reflected by the change in the meaning of the last argument which specifies whether to cache the encoded data. Rows_log_event::print_helper() is made to invoke a specialized fragmented cache-to-file copying function which is copy_cache_to_file_wrapped() that takes care of fragmenting also optionally wraps encoded strings (fragments) into SQL stanzas. my_b_copy_to_file() is refactored to into my_b_copy_all_to_file(). The former function is generalized to accepts more a limit argument to constraint the copying and does not reinitialize anymore the cache into reading mode. The limit does not do any effect on the fully read cache.
* | | Merge 10.0 into 10.1Marko Mäkelä2018-12-131-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, apply the MDEV-17957 changes to encrypted page checksums, and remove error message output from the checksum function, because these messages would be useless noise when mariabackup is retrying reads of corrupted-looking pages, and not that useful during normal server operation either. The error messages in fil_space_verify_crypt_checksum() should be refactored separately.
| * | Fix UNICODE issue of dlerrorJiaye Wu2018-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | Current implementation is conflicting. If UNICODE is defined, FormatMessage() will be FormatMessageW(), and variable win_errormsg with type char can not be passed to it, which should be changed to TCHAR instead. Since we don't use UNICODE here, we can use FormatMessageA() directly to avoid conversion error. ``` my_global.h(1092): error C2664: 'DWORD FormatMessageW(D WORD,LPCVOID,DWORD,DWORD,LPWSTR,DWORD,va_list *)' : cannot convert argument 5 from 'char [2048]' to 'LPWSTR' ```
* | | Merge 10.0 into 10.1Marko Mäkelä2018-11-051-2/+2
|\ \ \ | |/ /
| * | Remove dead code is_thd_killed()Marko Mäkelä2018-11-021-2/+2
| | |
* | | Merge branch '10.0' into 10.1Sergei Golubchik2018-10-302-4/+16
|\ \ \ | |/ /
| * | MDEV-17358 my_reverse_bits() is incorrect due to UBEugene Kosov2018-10-161-4/+4
| | | | | | | | | | | | my_reverse_bits(): add a cast to fix a bit shift
| * | MDEV-12547: InnoDB FULLTEXT index has too strict ↵Thirunarayanan Balathandayuthapani2018-10-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | innodb_ft_result_cache_limit max limit - Backported the MYSQL_SYSVAR_SIZE_T to 10.0 - The parameter innodb_ft_result_cache_limit was only 32 bits wide also on 64-bit systems. Make it size_t, so that it will be 64 bits on 64-bit systems. - Added a test case that show how innodb_ft_result_cache_limit variables behaves in 32bit and 64 bit system.
* | | wsrep: create a macro for the error: labelSergei Golubchik2018-10-241-5/+6
| | | | | | | | | | | | | | | that is used by WSREP_TO_ISOLATION_BEGIN and other galera macros, to avoid the need for wrapping this label in #ifdef WITH_WSREP/#endif
* | | MDEV-17200 - pthread_detach called for already detached threadsSergey Vojtovich2018-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pthread_detach_this_thread() was intended to be defined to something meaningful only on some ancient unixes, which don't have pthread_attr_setdetachstate() defined. Otherwise, on normal unixes, threads are created detached in the first place. This was broken in 0f01bf267680244ec488adaf65a42838756ed48e so that we started calling pthread_detach() for already detached threads. Intention was to detach aria checkpoint thread. However in 87007dc2f71634cc460271eb277ad851ec69c04b aria service threads were made joinable with appropriate handling, which makes breaking revision unneccessary. Revert remnants of 0f01bf267680244ec488adaf65a42838756ed48e, so that pthread_detach_this_thread() is meaningful only on some ancient unixes again.
* | | Merge branch '10.0-galera' into 10.1Sergei Golubchik2018-09-071-0/+5
|\ \ \
| * \ \ Merge tag 'mariadb-10.0.36' into 10.0-galeraJan Lindström2018-08-022-14/+16
| |\ \ \ | | |/ /
* | | | fix failures of innodb_plugin tests in --embeddedSergei Golubchik2018-09-042-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Post-fix for 7e8ed15b95b Also, apply the same innodb fix to xtradb.
* | | | MDEV-9627 clang builds fail on i386Sergei Golubchik2018-09-041-1/+1
| | | | | | | | | | | | | | | | don't use C11 atomics unless HAVE_GCC_C11_ATOMICS is defined
* | | | Merge branch '10.0' into 10.1Oleksandr Byelkin2018-07-311-1/+1
|\ \ \ \ | | |/ / | |/| |
| * | | Merge 5.5 into 10.0Marko Mäkelä2018-07-301-1/+1
| |\ \ \ | | | |/ | | |/|
| | * | Merge remote-tracking branch 'mysql/5.5' into 5.5Oleksandr Byelkin2018-07-291-1/+1
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not accept: 1. We did not have this problem (fixed earlier and better) d982e717aba67227ec40761a21a4211db91aa0e2 Bug#27510150: MYSQLDUMP FAILS FOR SPECIFIC --WHERE CLAUSES 2. We do not have such options (an DBUG_ASSERT put just in case) bbc2e37fe4e0ca3a7cfa1437a763dc43829e98e2 Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7 3. Serg fixed it in other way in this release: e48d775c6f066add457fa8cfb2ebc4d5ff0c7613 Bug#27980823: HEAP OVERFLOW VULNERABILITIES IN MYSQL CLIENT LIBRARY
| | | * | Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7Arun Kuruvila2018-05-141-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Description:- Client applications establishes connection to server, which does not support SSL, via TCP even when SSL is enforced via MYSQL_OPT_SSL_MODE or MYSQL_OPT_SSL_ENFORCE or MYSQL_OPT_SSL_VERIFY_SERVER_CERT. Analysis:- There exist no error handling for catching client applications which enforces SSL connection to connect to a server which does not support SSL. Fix:- Error handling is done to catch above mentioned scenarios.
* | | | | Merge branch '10.0' into bb-10.1-merge-sanjaOleksandr Byelkin2018-07-251-13/+15
|\ \ \ \ \ | |/ / / /
| * | | | Simplify caseup() and casedn() in charsetsAlexander Barkov2018-07-191-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After the MDEV-13118 fix there's no code in the server that wants caseup/casedn to change the argument in place for simple charsets. Let's remove this logic and always return the result in a new string for all charsets, both simple and complex. 1. Removing the optimization that *some* character sets used in casedn() and caseup(), which allowed (and required) to change the case in-place, overwriting the string passed as the "src" argument. Now all CHARSET_INFO's work in the same way: non of them change the source string in-place, all of them now convert case from the source string to the destination string, leaving the source string untouched. 2. Adding "const" qualifier to the "char *src" parameter to caseup() and casedn(). 3. Removing duplicate implementations in ctype-mb.c. Now both caseup() and casedn() implementations for all CJK character sets use internally the same function my_casefold_mb() (the former my_casefold_mb_varlen()). 4. Removing the "unused" attribute from parameters of some my_case{up|dn}_xxx() implementations, as the affected parameters are now *used* in the code. Previously these parameters were used only in DBUG_ASSERT().
* | | | | MDEV-13577 slave_parallel_mode=optimistic should not report the mode's ↵Sergei Golubchik2018-06-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specific temporary errors Revert 7bbe324fc17 Fix the bug differently (in log_event.cc) Fix the test case to actually fail without the bug fix
* | | | | Merge branch '10.0-galera' into 10.1Vicențiu Ciorbaru2018-06-122-0/+8
|\ \ \ \ \ | | |_|_|/ | |/| | |