summaryrefslogtreecommitdiff
path: root/storage
Commit message (Collapse)AuthorAgeFilesLines
* ha_archive::info remove hidden assignmentDaniel Black2017-07-031-1/+0
| | | | | | | max_data_file_size is overwritten in next statement so this assignment didn't ever get used. Found by Coverity (ID 1409644)
* MDEV-11626 innodb.innodb-change-buffer-recovery fails for xtradbMarko Mäkelä2017-05-292-12/+0
| | | | | | buf_page_get_gen(): Remove the error log messages about page flushing and eviction when innodb_change_buffering_debug=1 is in effect.
* Make IF clear.Oleksandr Byelkin2017-05-181-8/+17
|
* MDEV-12230 include/my_sys.h:600:43: error: unknown type name ↵Sergei Golubchik2017-04-202-4/+4
| | | | | | ‘PSI_file_key’" when -DWITHOUT_SERVER=1 cherry-pick 2c2bd8c155 (MDEV-12261 build failure without P_S) from 10.0
* Merge remote-tracking branch 'mysql/5.5' into 5.5mariadb-5.5.55Sergei Golubchik2017-04-112-1/+10
|\
| * Bug #25167032 CRASH WHEN ASSIGNING MY_ERRNO - MISSINGThirunarayanan Balathandayuthapani2017-01-062-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | MY_THREAD_INIT IN BACKGROUND THREAD Description: =========== Add my_thread_init() and my_thread_exit() for background threads which initializes and frees the st_my_thread_var structure. Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com> RB: 15003
* | MDEV-11027 InnoDB log recovery is too noisyMarko Mäkelä2017-03-086-156/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide more useful progress reporting of crash recovery. recv_sys_t::progress_time: The time of the last report. recv_scan_print_counter: Remove. log_group_read_log_seg(): After after each I/O request, report progress if needed. recv_apply_hashed_log_recs(): At the start of each batch, if there are pages to be recovered, issue a message.
* | Fix a compiler warning.Marko Mäkelä2017-03-081-1/+2
| |
* | Fix some GCC 6.3.0 warnings in MyISAM and Maria.Marko Mäkelä2017-03-082-213/+213
| | | | | | | | | | | | The C++ standard does not allow references to be NULL. Assign the return value of THD::alloc() to a pointer, not to a reference.
* | MDEV-11520: Retry posix_fallocate() after EINTR.Marko Mäkelä2017-03-034-4/+20
| | | | | | | | | | | | | | The function posix_fallocate() as well as the Linux system call fallocate() can return EINTR when the operation was interrupted by a signal. In that case, keep retrying the operation, except if InnoDB shutdown has been initiated.
* | bugfix: remove my_delete_with_symlink()Sergei Golubchik2017-02-272-52/+58
| | | | | | | | | | | | it was race condition prone. instead use either a pair of my_delete() calls with already resolved paths, or a safe high-level function my_handler_delete_with_symlink(), like MyISAM and Aria already do.
* | race-condition safe implementation of mi_delete_table/maria_delete_tableSergei Golubchik2017-02-272-39/+6
| |
* | cleanup: remove now-unused argumentSergei Golubchik2017-02-278-26/+24
| |
* | MDEV-11902 mi_open race conditionSergei Golubchik2017-02-273-57/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TOCTOU bug. The path is checked to be valid, symlinks are resolved. Then the resolved path is opened. Between the check and the open, there's a window when one can replace some path component with a symlink, bypassing validity checks. Fix: after we resolved all symlinks in the path, don't allow open() to resolve symlinks, there should be none. Compared to the old MyISAM/Aria code: * fastpath. Opening of not-symlinked files is just one open(), no fn_format() and lstat() anymore. * opening of symlinked tables doesn't do fn_format() and lstat() either. it also doesn't to realpath() (which was lstat-ing every path component), instead if opens every path component with O_PATH. * share->data_file_name stores realpath(path) not readlink(path). So, SHOW CREATE TABLE needs to do lstat/readlink() now (see ::info()), and certain error messages (cannot open file "XXX") show the real file path with all symlinks resolved.
* | cleanup: remove 16-year-old "TODO"Sergei Golubchik2017-02-278-26/+16
| |
* | cleanup: mysys_test_invalid_symlinkSergei Golubchik2017-02-276-24/+6
| | | | | | | | | | Remove maria_test_invalid_symlink() and myisam_test_invalid_symlink(), introduce mysys_test_invalid_symlink(). Other engines might need it too
* | MDEV-12120 tokudb_bugs.xa-N tests fail with timeout on valgrindElena Stepanova2017-02-233-0/+3
| | | | | | | | | | The tests are disabled for valgrind in 5.6/10.x (LP:1549196), so they should be disabled in 5.5 as well
* | MDEV-11520/MDEV-5746 post-fix: Do not posix_fallocate() too much.Marko Mäkelä2017-02-222-12/+10
| | | | | | | | | | | | | | | | Before the MDEV-11520 fixes, fil_extend_space_to_desired_size() in MariaDB Server 5.5 incorrectly passed the desired file size as the third argument to posix_fallocate(), even though the length of the extension should have been passed. This looks like a regression that was introduced in the 5.5 version of MDEV-5746.
* | MDEV-11520 post-fixesMarko Mäkelä2017-02-222-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the unused variable desired_size. Also, correct the expression for the posix_fallocate() start_offset, and actually test that it works with a multi-file system tablespace. Before MDEV-11520, the expression was wrong in both innodb_plugin and xtradb, in different ways. The start_offset formula was tested with the following: ./mtr --big-test --mysqld=--innodb-use-fallocate \ --mysqld=--innodb-data-file-path='ibdata1:5M;ibdata2:5M:autoextend' \ --parallel=auto --force --retry=0 --suite=innodb & ls -lsh mysql-test/var/*/mysqld.1/data/ibdata2
* | MDEV-11520 Extending an InnoDB data file unnecessarily allocatesMarko Mäkelä2017-02-215-166/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a large memory buffer on Windows fil_extend_space_to_desired_size(), os_file_set_size(): Use calloc() for memory allocation, and handle failures. Properly check the return status of posix_fallocate(). On Windows, instead of extending the file by at most 1 megabyte at a time, write a zero-filled page at the end of the file. According to the Microsoft blog post https://blogs.msdn.microsoft.com/oldnewthing/20110922-00/?p=9573 this will physically extend the file by writing zero bytes. (InnoDB never uses DeviceIoControl() to set the file sparse.) For innodb_plugin, port the XtraDB fix for MySQL Bug#56433 (introducing fil_system->file_extend_mutex). The bug was fixed differently in MySQL 5.6 (and MariaDB Server 10.0).
* | Remove a bogus Valgrind "suppression".Marko Mäkelä2017-02-212-18/+2
| | | | | | | | | | fsp_init_file_page_low() does initialize all pages nowadays, even those in the InnoDB system tablespace.
* | Fix gcc 6.3.x compiler warnings.Jan Lindström2017-02-1656-198/+43
| | | | | | | | | | | | These are caused by fact that functions are declared with __attribute__((nonnull)) or left shit like ~0 << macro when ~0U << macro should be used.
* | Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2016-12-221-11/+42
|\ \ | |/
| * Fix Bug#24707869 GCC 5 AND 6 MISCOMPILE MACH_PARSE_COMPRESSEDVasil Dimov2016-10-031-11/+42
| | | | | | | | | | | | | | | | | | | | | | | | Prevent GCC from moving a mach_read_from_4() before we have checked that we have 4 bytes to read. The pointer may only point to a 1, 2 or 3 bytes in which case the code should not read 4 bytes. This is a workaround to a GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77673 Patch submitted by: Laurynas Biveinis <laurynas.biveinis@gmail.com> RB: 14135 Reviewed by: Pawel Olchawa <pawel.olchawa@oracle.com>
| * Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLEJon Olav Hauglid2016-08-193-23/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file with chmod/chown. If a user managed to replace the temporary file before chmod/chown was executed, it was possible to get an arbitrary file with the privileges of the mysql user. This patch fixes the problem by not copying stats from the old file to the new file. This is not needed as the new file was created with the correct stats. This fix only changes server behavior - external utilities such as myisamchk still does chmod/chown. No test case provided since the problem involves synchronization with file system operations.
* | str2decimal: don't return a negative zeroSergei Golubchik2016-12-051-2/+0
| |
* | MDEV-11241 Certain combining marks cause MariaDB to crash when doing ↵Sergei Golubchik2016-12-031-6/+1
| | | | | | | | | | | | | | Full-Text searches Don't assume that a word of n bytes can match a word of at most n * charset->mbmaxlen bytes, always go for the worst.
* | compilation warning after xtradb mergemariadb-5.5.53Sergei Golubchik2016-10-141-1/+1
| |
* | Merge branch 'merge-xtradb-5.5' into 5.5Sergei Golubchik2016-10-1311-50/+179
|\ \
| * | 5.5.52-38.3Sergei Golubchik2016-10-1311-46/+179
| | |
* | | MDEV-10341: InnoDB: Failing assertion: mutex_own(mutex) - mutex_exit_funcmariadb-5.5.51Vicențiu Ciorbaru2016-08-094-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix memory barrier issues on releasing mutexes. We must have a full memory barrier between releasing a mutex lock and reading its waiters. This prevents us from missing to release waiters due to reading the number of waiters speculatively before releasing the lock. If threads try and wait between us reading the waiters count and releasing the lock, those threads might stall indefinitely. Also, we must use proper ACQUIRE/RELEASE semantics for atomic operations, not ACQUIRE/ACQUIRE.
* | | MDEV-10506 Protocol::end_statement(): Assertion `0' failed upon ALTER TABLESergei Golubchik2016-08-071-1/+2
| | | | | | | | | | | | thd->clear_error() destroyed already existing error status
* | | Merge branch 'merge/merge-xtradb-5.5' into 5.5Sergei Golubchik2016-08-034-21/+35
|\ \ \ | |/ /
| * | 5.5.50-38.0Sergei Golubchik2016-08-034-21/+35
| | |
* | | MDEV-10217: innodb.innodb_bug59641 fails sporadically in buildbot: InnoDB: ↵Jan Lindström2016-08-032-0/+40
| | | | | | | | | | | | | | | | | | | | | Failing assertion: current_rec != insert_rec in file page0cur.c line 1052 Added record printout when current_rec == insert_rec with lengths for debug builds.
* | | MDEV-10083: Orphan ibd file when playing with foreign keysJan Lindström2016-06-2312-32/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | Analysis: row_drop_table_for_mysql did not allow dropping referenced table even in case when actual creating of the referenced table was not successfull if foreign_key_checks=1. Fix: Allow dropping referenced table even if foreign_key_checks=1 if actual table create returned error.
* | | MDEV-10247 TokuDB assertion error when building with DEBUGVicențiu Ciorbaru2016-06-171-3/+12
| | | | | | | | | | | | | | | | | | | | | Fix the assertion failure by setting the struct to 0. This can not be done using a macro due to different definitions of mutexes on various OS-es. Afterwards we call toku_mutex_init and completely initialize the locks.
* | | Fix typo bug that cause myisam repair to failmariadb-5.5.50Vicențiu Ciorbaru2016-06-162-3/+3
| | | | | | | | | | | | | | | We need to return TRUE if got_error == 1, not error, which is initialized to FALSE.
* | | Fix compilation failure when compiling with std=c90Vicențiu Ciorbaru2016-06-162-7/+5
| | | | | | | | | | | | Change variable declaration to be before any other statements.
* | | MDEV-9256 : Crashes on Windows x64 with aria_pagecache_buffer_size > 4GBVladislav Vaintroub2016-06-143-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed wrong calculation of buffer sizes. ulong datatype was used wrongly, as were the casts to ulong. Buffer sizes should be of type size_t, not ulong, or bad things happen on 64 bit Windows. This patch changes pagecache struct to use size_t/ssize_t where long/ulong were previously used. Also, removed several casts.
* | | MDEV-10229: TokuDB fails to build with CLangVicențiu Ciorbaru2016-06-145-28/+9
| | | | | | | | | | | | | | | Structure initialization must feature all members present within the struct.
* | | MDEV-10162: Update repair testcaseVicențiu Ciorbaru2016-06-142-15/+6
| | |
* | | Fixed compilation failure using clangVicențiu Ciorbaru2016-06-143-284/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | Both aria and myisam storage engines feature a logic path in thr_find_all_keys that leads to undefined behaviour by bypassing the initialization code of variables after my_thread_init(). By refactoring the nested logic into a separate function, this problem is resolved.
* | | [Code cleanup] Refactor duplicate code within myisam and maria sort.ccVicențiu Ciorbaru2016-06-142-73/+53
| | |
* | | Merge branch 'merge-xtradb-5.5' into 5.5Sergei Golubchik2016-06-145-31/+76
|\ \ \ | |/ /
| * | 5.5.49-37.9Sergei Golubchik2016-06-146-31/+76
| | |
* | | MDEV-9994 - Aria service threads are not "joined"Sergey Vojtovich2016-06-104-61/+26
| | | | | | | | | | | | | | | | | | | | | | | | Aria service threads are created "joinable", but they're not "joined" on completion. This causes memory leaks around thread local storage. Fixed by joining service thread. Simplified relevant code and cleaned up relevant valgrind suppressions.
* | | MDEV-7139: Sporadic failure in innodb.innodb_corrupt_bit on P8Jan Lindström2016-06-084-2/+148
| | | | | | | | | | | | | | | | | | Use direct persistent index corruption set on InnoDB dictionary for this test. Do not allow creating new indexes if one of the existing indexes is already marked as corrupted.
* | | Merge branch 'bb-5.5-serg' into 5.5mariadb-5.5.49Sergei Golubchik2016-04-2011-56/+91
|\ \ \
| * \ \ Merge branch 'merge-xtradb-5.5' into 5.5Sergei Golubchik2016-04-206-27/+60
| |\ \ \ | | |/ /