summaryrefslogtreecommitdiff
path: root/storage/xtradb
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-15772 Potential list overrun during XA recoveryThirunarayanan Balathandayuthapani2019-04-245-24/+50
| | | | | | | | | | | | | | | | | InnoDB could return the same list again and again if the buffer passed to trx_recover_for_mysql() is smaller than the number of transactions that InnoDB recovered in XA PREPARE state. We introduce the transaction state TRX_PREPARED_RECOVERED, which is like TRX_PREPARED, but will be set during trx_recover_for_mysql() so that each transaction will only be returned once. Because init_server_components() is invoking ha_recover() twice, we must reset the state of the transactions back to TRX_PREPARED after returning the complete list, so that repeated traversals will see the complete list again, instead of seeing an empty list. Without this tweak, the test main.tc_heuristic_recover would hang in MariaDB 10.1.
* MDEV-18139 ALTER IGNORE ... ADD FOREIGN KEY causes bogus errorMarko Mäkelä2019-04-231-5/+18
| | | | | | | | dict_create_foreign_constraints_low(): Tolerate the keywords IGNORE and ONLINE between the keywords ALTER and TABLE. We should really remove the hacky FOREIGN KEY constraint parser from InnoDB.
* MDEV-18272 InnoDB fails to rollback after exceeding FOREIGN KEY recursion depthMarko Mäkelä2019-03-071-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | row_mysql_handle_errors(): Correct the wrong error handling for the code DB_FOREIGN_EXCEED_MAX_CASCADE that was introduced in https://github.com/mysql/mysql-server/commit/c0923d396aef46799883390e9dcf7bbf173e4a03 commit 35f5429eda94f2ce87e453653cd22298d5851cfa Author: Jimmy Yang <jimmy.yang@oracle.com> Date: Wed Oct 6 06:55:34 2010 -0700 Manual port Bug #Bug #54582 "stack overflow when opening many tables linked with foreign keys at once" from mysql-5.1-security to mysql-5.5-security again. rb://391 approved by Heikki No known test case exists for repeating the bug before MariaDB 10.2. The scenario should be that DB_FOREIGN_EXCEED_MAX_CASCADE is returned, then InnoDB wrongly skips the rollback to the start of the current row operation, and finally the SQL layer commits the transaction. Normally the SQL layer would roll back either the entire transaction or to the start of the statement. In the faulty scenario, InnoDB would leave the transaction in an inconsistent state, and the SQL layer could commit the transaction.
* MDEV-18349 InnoDB file size changes are not safe when file system crashesMarko Mäkelä2019-01-231-1/+3
| | | | | fil_extend_space_to_desired_size(): Invoke fsync() after posix_fallocate() in order to durably extend the file in a crash-safe file system.
* Merge branch 'merge/merge-xtradb-5.5' into 5.5mariadb-5.5.62Sergei Golubchik2018-10-2410-63/+123
|\
| * 5.5.61-38.13Sergei Golubchik2018-10-2412-65/+135
| |
* | (no commit message)mariadb-5.5.61Karthik Kamath2018-07-301-1/+3
| |
* | Merge branch 'merge/merge-xtradb-5.5' into 5.5mariadb-5.5.60Sergei Golubchik2018-04-202-3/+3
|\ \ | |/
| * 5.5.59-38.11Sergei Golubchik2018-04-202-8/+11
| |
* | BUG#27216817: INNODB: FAILING ASSERTION: ↵Sergei Golubchik2018-04-192-0/+12
| | | | | | | | | | | | | | | | | | PREBUILT->TABLE->N_MYSQL_HANDLES_OPENED == 1 disable online alter add primary key for innodb, if the table is opened/locked more than once in the current connection (see assert in ha_innobase::add_index())
* | honor alignment rules and xtradb tooEugene Kosov2018-03-201-0/+5
| |
* | Add ASAN instrumentation (and more strict Valgrind) to InnoDBMarko Mäkelä2018-01-236-24/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mem_heap_free_heap_top(): Remove UNIV_MEM_ASSERT_W() and unpoison the memory region first, because part of it may have been poisoned by an earlier mem_heap_free_top() call. Poison the address range at the end. mem_heap_block_free(): Poison the address range at the end. UNIV_MEM_ASSERT_AND_ALLOC(): Replace with UNIV_MEM_ALLOC(). We want to keep the address ranges poisoned (unaccessible) as long as possible. UNIV_MEM_ASSERT_AND_FREE(): Replace with UNIV_MEM_FREE().
* | Silence -Wimplicit-fallthroughMarko Mäkelä2018-01-231-0/+1
| |
* | improve ASAN instrumentation: InnoDB/XtraDBSergei Golubchik2018-01-221-7/+9
| |
* | MDEV-7049 MySQL#74585 - InnoDB: Failing assertion: *mbmaxlen < 5 in file ↵Marko Mäkelä2018-01-2215-155/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ha_innodb.cc line 1904 InnoDB limited the maximum number of bytes per character to 4. But, the filename character set that was introduced in MySQL 5.1 uses up to 5 bytes per character. To allow InnoDB tables to be created with wider characters, let us split the mbminmaxlen fields into mbminlen, mbmaxlen, and increase the limit to 7 bytes per character. This will increase the payload size of dtype_t and dict_col_t by one bit. The storage size will be unchanged (54 bits and 77 bits will use the same number of bytes as the previous sizes 53 and 76 bits).
* | Merge branch 'merge/merge-xtradb-5.5' into 5.5mariadb-5.5.59Sergei Golubchik2018-01-183-6/+10
|\ \ | |/
| * 5.5.58-38.10Sergei Golubchik2018-01-179-13/+24
| |
* | MDEV-14916 InnoDB reports warning for "Purge reached the head of the history ↵Marko Mäkelä2018-01-111-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | list" The warning was originally added in commit c67663054a7db1c77dd1dbc85b63595667a53500 (MySQL 4.1.12, 5.0.3) to trace claimed undo log corruption that was analyzed in https://lists.mysql.com/mysql/176250 on November 9, 2004. Originally, the limit was 20,000 undo log headers or transactions, but in commit 9d6d1902e091c868bb288e0ccf9f975ccb474db9 in MySQL 5.5.11 it was increased to 2,000,000. The message can be triggered when the progress of purge is prevented by a long-running transaction (or just an idle transaction whose read view was started a long time ago), by running many transactions that UPDATE or DELETE some records, then starting another transaction with a read view, and finally by executing more than 2,000,000 transactions that UPDATE or DELETE records in InnoDB tables. Finally, when the oldest long-running transaction is completed, purge would run up to the next-oldest transaction, and there would still be more than 2,000,000 transactions to purge. Because the message can be triggered when the database is obviously not corrupted, it should be removed. Heavy users of InnoDB should be monitoring the "History list length" in SHOW ENGINE INNODB STATUS; there is no need to spam the error log.
* | MDEV-13814 Extra logging when innodb_log_archive=ONMarko Mäkelä2018-01-101-1/+1
| | | | | | | | | | Backport the fix from 10.0.33 to 5.5, in case someone compiles XtraDB with -DUNIV_LOG_ARCHIVE
* | MDEV-14174 crash on start with innodb-track-changed-pagesMarko Mäkelä2018-01-101-7/+9
| | | | | | | | | | | | | | | | | | The XtraDB option innodb_track_changed_pages causes the function log_group_read_log_seg() to be invoked even when recv_sys==NULL, leading to the SIGSEGV. This regression was caused by MDEV-11027 InnoDB log recovery is too noisy
* | Follow-up to MDEV-14799: Remove bogus debug assertionsMarko Mäkelä2018-01-021-3/+0
| | | | | | | | | | | | | | | | trx_undo_rec_get_partial_row(): When the PRIMARY KEY includes a column prefix of an externally stored column, the already parsed part of the undo log record may contain a reference to an off-page column. This is the case in the bug58912 test in innodb.innodb.
* | MDEV-14799 After UPDATE of indexed columns, old values will not be purged ↵Marko Mäkelä2018-01-023-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | from secondary indexes This is a regression caused by MDEV-14051 'Undo log record is too big.' Purge in the secondary index is wrongly skipped in row_purge_upd_exist_or_extern() because node->row only does not contain all indexed columns. trx_undo_rec_get_partial_row(): Add the parameter for node->update so that the updated columns will be copied from the initial part of the undo log record.
* | MDEV-12569 InnoDB suggests filing bugs at MySQL bug trackerMarko Mäkelä2017-10-2613-21/+21
| | | | | | | | | | Replace all references in InnoDB and XtraDB error log messages to bugs.mysql.com with references to https://jira.mariadb.org/.
* | MDEV-14051 'Undo log record is too big.' error occurring in very narrow ↵bb-5.5-markoMarko Mäkelä2017-10-241-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | range of string lengths InnoDB was writing unnecessary information to the update undo log records. Most notably, if an indexed column is updated, the old value of the column would be logged twice: first as part of the update vector, and then another time because it is an indexed column. Because the InnoDB undo log record must fit in a single page, this would cause unnecessary failure of certain updates. Even after this fix, InnoDB still seems to be unnecessarily logging indexed column values for non-updated columns. It seems that non-updated secondary index columns only need to be logged when a PRIMARY KEY column is updated. To reduce risk, we are not fixing this remaining flaw in GA versions. trx_undo_page_report_modify(): Log updated indexed columns only once.
* | MDEV-13459 Warnings, when compiling with gcc-7.xSergei Golubchik2017-10-176-8/+10
| | | | | | | | mostly caused by -Wimplicit-fallthrough
* | MDEV-13980 InnoDB fails to discard record lock when discarding an index pageMarko Mäkelä2017-10-021-5/+5
| | | | | | | | | | | | | | | | btr_cur_pessimistic_delete(): Discard a possible record lock also in the case when the record was the only one in the page. Failure to do this would corrupt the record lock data structures in a partial rollback (ROLLBACK TO SAVEPOINT or rolling back a row operation due to some error, such as a duplicate key in a unique secondary index).
* | Merge remote-tracking branch 'merge/merge-xtradb-5.5' into 5.5Vicențiu Ciorbaru2017-09-192-2/+2
|\ \ | |/
| * 5.5.57-38.9merge-xtradb-5.5Vicențiu Ciorbaru2017-09-192-2/+2
| |
* | Merge branch 'merge-xtradb-5.5' into 5.5mariadb-5.5.57Sergei Golubchik2017-07-1830-203/+244
|\ \ | |/
| * 5.5.55-38.8Sergei Golubchik2017-07-1835-214/+255
| |
| * 5.5.53-38.5Sergei Golubchik2016-12-221-1/+1
| |
* | MDEV-11626 innodb.innodb-change-buffer-recovery fails for xtradbMarko Mäkelä2017-05-291-6/+0
| | | | | | | | | | | | buf_page_get_gen(): Remove the error log messages about page flushing and eviction when innodb_change_buffering_debug=1 is in effect.
* | MDEV-11027 InnoDB log recovery is too noisyMarko Mäkelä2017-03-083-80/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | MDEV-11520: Retry posix_fallocate() after EINTR.Marko Mäkelä2017-03-032-2/+10
| | | | | | | | | | | | | | 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.
* | MDEV-11520/MDEV-5746 post-fix: Do not posix_fallocate() too much.Marko Mäkelä2017-02-221-6/+5
| | | | | | | | | | | | | | | | 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-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-212-83/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-211-9/+1
| | | | | | | | | | 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-1629-102/+23
| | | | | | | | | | | | These are caused by fact that functions are declared with __attribute__((nonnull)) or left shit like ~0 << macro when ~0U << macro should be used.
* | 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-092-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | 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-031-0/+20
| | | | | | | | | | | | | | 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-236-16/+28
| | | | | | | | | | | | | | | | | | 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.
* | 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-7139: Sporadic failure in innodb.innodb_corrupt_bit on P8Jan Lindström2016-06-082-1/+74
| | | | | | | | | | | | 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.