summaryrefslogtreecommitdiff
path: root/mysys
Commit message (Collapse)AuthorAgeFilesLines
* Revert "MDEV-9293 Connector/C integration"Vladislav Vaintroub2016-08-193-217/+1
| | | | This reverts commit 7b89b9f5108c80f4f270da922d7e6c182a663719.
* MDEV-9293 Connector/C integrationVladislav Vaintroub2016-08-193-1/+217
|
* MDEV-9872: New Power8 crc32(ieee) optimized functionsDaniel Black2016-08-051-2/+2
| | | | | These are different from the existing crc32 functions which where really crc32c.
* MDEV-9872 - Add common optimized CRC32 function interfaceSergey Vojtovich2016-08-043-24/+7
| | | | | | | | Move crc32-vpmsum to extra. Compile static crc32-vpmsum instead of adding sources directly. Make use of crc32-vpmsum via my_checksum(). Based on contribution by Daniel Black.
* Merge branch '10.1' into 10.2Sergei Golubchik2016-06-308-9/+25
|\
| * Merge branch '10.0' into 10.1Sergei Golubchik2016-06-285-6/+13
| |\
| | * Merge branch '5.5' into bb-10.0Sergei Golubchik2016-06-215-6/+10
| | |\
| | | * MDEV-9433: [PATCH} cppcheck reported a number of minor coding errorsDaniel Black2016-06-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fix cppwarning of va_args being opened but not closed. Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
| | | * MDEV-9433: [PATCH] cppcheck reported a number of minor coding errorsDaniel Black2016-06-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug in testhash.c that caused an out of bounds memory access when command line parameters specified 0 records to be inserted in the hashtable. Signed-off-by: Vicențiu Ciorbaru <vicentiu@mariadb.org>
| | | * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-06-143-4/+6
| | | |\
| | | | * Bug#23251517: SEMISYNC REPLICATION HANGINGmysql-5.5.50Sujatha Sivakumar2016-05-162-16/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert following bug fix: Bug#20685029: SLAVE IO THREAD SHOULD STOP WHEN DISK IS FULL Bug#21753696: MAKE SHOW SLAVE STATUS NON BLOCKING IF IO THREAD WAITS FOR DISK SPACE This fix results in a deadlock between slave IO thread and SQL thread. (cherry picked from commit e3fea6c6dbb36c6ab21c4ab777224560e9608b53)
| | | | * Bug#22897202: RPL_IO_THD_WAIT_FOR_DISK_SPACE HAS OCCASIONALSujatha Sivakumar2016-04-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FAILURES Analysis: ========= Test script is not ensuring that "assert_grep.inc" should be called only after 'Disk is full' error is written to the error log. Test checks for "Queueing master event to the relay log" state. But this state is set before invoking 'queue_event'. Actual 'Disk is full' error happens at a very lower level. It can happen that we might even reset the debug point before even the actual disk full simulation occurs and the "Disk is full" message will never appear in the error log. In order to guarentee that we must have some mechanism where in after we write "Disk is full" error messge into the error log we must signal the test to execute SSS and then reset the debug point. So that test is deterministic. Fix: === Added debug sync point to make script deterministic.
| | | | * BUG#22594514: HANDLE_FATAL_SIGNAL (SIG=11) INNisha Gopalakrishnan2016-03-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNIQUE::~UNIQUE | SQL/UNIQUES.CC:355 Analysis ======== Enabling the sort_buffer_size with a large value can cause operations utilizing the sort buffer like DELETE as mentioned in the bug report to fail. 5.5 and 5.6 versions reports OOM error while in 5.7+, the server crashes. While initializing the mem_root for the sort buffer tree, the block size for the mem_root is determined from the 'sort_buffer_size' value. This unsigned long value is typecasted to unsigned int, hence it becomes zero. Further block_size computation while initializing the mem_root results in a very large block_size value. Hence while trying to allocate a block during the DELETE operation, an OOM error is reported. In case of 5.7+, the PFS instrumentation for memory allocation, overshoots the unsigned value and allocates a block of just one byte. While trying to free the block of the mem_root, the original block_size is used. This triggers the crash since the server tries to free unallocated memory. Fix: ==== In order to restrict usage of such unreasonable sort_buffer_size, the typecast of block size to 'unsigned int' is removed and hence reports OOM error across all versions for sizes exceeding unsigned int range.
| | | | * Bug#20685029: SLAVE IO THREAD SHOULD STOP WHEN DISK ISSujatha Sivakumar2016-03-012-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FULL Bug#21753696: MAKE SHOW SLAVE STATUS NON BLOCKING IF IO THREAD WAITS FOR DISK SPACE Problem: ======== Currently SHOW SLAVE STATUS blocks if IO thread waits for disk space. This makes automation tools verifying server health block on taking relevant action. Finally this will create SHOW SLAVE STATUS piles. Analysis: ========= SHOW SLAVE STATUS hangs on mi->data_lock if relay log write is waiting for free disk space while holding mi->data_lock. mi->data_lock is needed to protect the format description event (mi->format_description_event) which is accessed by the clients running FLUSH LOGS and slave IO thread. Note relay log writes don't need to be protected by mi->data_lock, LOCK_log is used to protect relay log between IO and SQL thread (see MYSQL_BIN_LOG::append_event). The code takes mi->data_lock to protect mi->format_description_event during relay log rotate which might get triggered right after relay log write. Fix: ==== Release the data_lock just for the duration of writing into relay log. Made change to ensure the following lock order is maintained to avoid deadlocks. data_lock, LOCK_log data_lock is held during relay log rotations to protect the description event.
| | | | * Bug#21770366 backport bug#21657078 to 5.5 and 5.6Jon Olav Hauglid2016-01-261-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post-push fix: The problem was that condition variable timeouts could in some cases (slow machines and/or short timeouts) be infinite. When the number of milliseconds to wait is computed, the end time is computed before the now() time. This can result in the now() time being later than the end time, leading to negative timeout. Which after conversion to unsigned becomes ~infinite. This patch fixes the problem by explicitly checking if we get negative timeout and then using 0 if this is the case.
| | * | | MDEV-10001 my_b_seek() may not work correctly after my_b_read() hits EOFSergei Golubchik2016-06-151-0/+3
| | | | | | | | | | | | | | | | | | | | applied the patch from David Gow
| | * | | Merge branch 'mdev9991' into mdev9991-10.0Kristian Nielsen2016-06-081-2/+2
| | |\ \ \ | | | |/ /
| * | | | Merge branch 'mdev9991' into mdev9991-10.1MDEV-8947Kristian Nielsen2016-06-081-2/+2
| |\ \ \ \ | | | |/ / | | |/| |
| | * | | Fix compiler check for stack unwind hintKristian Nielsen2016-06-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The check inserts a DWARF directive to tell stack unwinding that the bottom of the (co-routine) stack has been reached. Without this, stack traces may attempt to continue past the bottom of the stack. The GCC version check was incorrect, and failed to trigger for GCC version 5.[0123].
| * | | | Adding collationsmasterAlexander Barkov2016-05-301-2/+10
| | | | | | | | | | | | | | | | | | | | utf8mb4_thai_520_w2, ucs2_thai_520_w2, utf16_thai_520_w2, utf32_thai_520_w2
| * | | | Multi-level collation in UCA, Thai sorting with contraction for UTF8.pruet2016-05-261-0/+2
| | | | |
| * | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-05-041-1/+0
| |\ \ \ \ | | | |/ / | | |/| |
| | * | | Merge branch '5.5' into 10.0Sergei Golubchik2016-04-261-1/+0
| | |\ \ \ | | | |/ /
| | | * | MDEV-9748 Include Twin (mysys_err.h is included twice in mysys/my_copy.c)Sergei Golubchik2016-04-191-1/+0
| | | | |
* | | | | Fixed compiler warnings and test failures found by buildbotMonty2016-06-244-12/+12
| | | | | | | | | | | | | | | | | | | | Fixed ccfilter to detect errors where the column is included in the error message
* | | | | General spell fixing in comments and stringsOtto Kekäläinen2016-06-081-1/+1
| | | | |
* | | | | MDEV-9857 - CACHE_LINE_SIZE in innodb should be 128 on POWERSergey Vojtovich2016-06-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced hard-coded cache line size. Changes based on Daniel Black's work.
* | | | | Reuse THD for new user connectionsMonty2016-06-042-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - To ensure that mallocs are marked for the correct THD, even if it's allocated in another thread, I added the thread_id to the THD constructor - Added st_my_thread_var to thr_lock_info_init() to avoid a call to my_thread_var - Moved things from THD::THD() to THD::init() - Moved some things to THD::cleanup() - Added THD::free_connection() and THD::reset_for_reuse() - Added THD to CONNECT::create_thd() - Added THD::thread_dbug_id and st_my_thread_var->dbug_id. These are needed to ensure that we have a constant thread_id used for debugging with a THD, even if it changes thread_id (=connection_id) - Set variables.pseudo_thread_id in constructor. Removed not needed sets.
* | | | | MDEV-9154 : Remove workarounds (mainly dynamic function loading)Vladislav Vaintroub2016-06-013-302/+24
| | | | | | | | | | | | | | | | | | | | for running obsolete versions of Windows
* | | | | MDEV-6353 my_ismbchar() and my_mbcharlen() refactoringAlexander Barkov2016-05-171-9/+11
| | | | |
* | | | | CleanupsMonty2016-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Avoid some realloc() during startup - Ensure that file_key_management_plugin frees it's memory early, even if it's linked statically. - Fixed compiler warnings from unused variables and missing destructors - Fixed wrong indentation
* | | | | fix compile error on Windows, intrduced by previous monty's pushVladislav Vaintroub2016-04-061-1/+1
| | | | |
* | | | | Added new range of MariaDB error messages, starting from 3000Monty2016-04-052-11/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by splitting variables.errmsg and locale.errmsg to variables.errmsg_extra and locale.errmsg_extra The ER() macros in unireg.h now looks more complex than before, but this isn't critical as most usage of them are with constants and the compiler will remove most of the test code.
* | | | | MDEV-9811 LOAD DATA INFILE does not work well with gbk in some casesAlexander Barkov2016-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | MDEV-9824 LOAD DATA does not work with multi-byte strings in LINES TERMINATED BY when IGNORE is specified
* | | | | MDEV-8360 Clean-up CHARSET_INFO: strnncollsp: diff_if_only_endspace_differenceAlexander Barkov2016-03-311-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Removing the "diff_if_only_endspace_difference" argument from MY_COLLATION_HANDLER::strnncollsp(), my_strnncollsp_simple(), as well as in the function template MY_FUNCTION_NAME(strnncollsp) in strcoll.ic - Removing the "diff_if_only_space_different" from ha_compare_text(), hp_rec_key_cmp(). - Adding a new function my_strnncollsp_padspace_bin() and reusing it instead of duplicate code pieces in my_strnncollsp_8bit_bin(), my_strnncollsp_latin1_de(), my_strnncollsp_tis620(), my_strnncollsp_utf8_cs(). - Adding more tests for better coverage of the trailing space handling. - Removing the unused definition of HA_END_SPACE_ARE_EQUAL
* | | | | Merge branch '10.1' into 10.2Oleksandr Byelkin2016-03-251-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.0' into 10.1Oleksandr Byelkin2016-03-241-1/+1
| |\ \ \ \ | | |/ / /
| | * | | MDEV-9773: Memory corruption in mariadb_dyncol_unpackOleksandr Byelkin2016-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | Fixed calculating pointer to memory allocated for names in numeric format in unpacking procedure.
* | | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-03-236-7/+14
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-03-216-7/+14
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '5.5' into 10.0Sergei Golubchik2016-03-211-1/+8
| | |\ \ \ | | | |/ /
| | | * | MDEV-9733 Server crashes in lf_pinbox_real_free on replication slavesSergei Golubchik2016-03-171-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | don't allocate all the stack, leave some stack for function calls. To test I added the following line: alloca_size = available_stack_size() - X at X=4096 or less mysqld crashed, at 8192 mtr test passed.
| | * | | Fix spelling: occurred, execute, which etcOtto Kekäläinen2016-03-045-6/+6
| | | | |
* | | | | Fixed compilarion failure on 32bit systemsSergey Vojtovich2016-02-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compile time assertion "sizeof(struct st_irem) % sizeof(double) == 0" started to fail on 32bit systems after my_thread_id was changed from ulong to int64. Fixed by added padding to struct st_irem on 32bit systems.
* | | | | Merge branch '10.1' into 10.2Sergei Golubchik2016-02-257-17/+15
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-02-236-16/+14
| |\ \ \ \ | | |/ / /
| | * | | Merge branch '5.5' into 10.0Sergei Golubchik2016-02-155-12/+14
| | |\ \ \ | | | |/ /
| | | * | fix my_gethwaddr() for solarisSergei Golubchik2016-02-151-1/+1
| | | | | | | | | | | | | | | | | | | | it caused feedback plugin tests to fail
| | | * | Fix memory leak when failing to read config fileVicențiu Ciorbaru2016-02-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | In the case of error during my_load_defaults, we would not free the args array.
| | | * | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-02-092-2/+4
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | reverted about half of commits as either not applicable or outright wrong