summaryrefslogtreecommitdiff
path: root/storage/innobase/include
Commit message (Collapse)AuthorAgeFilesLines
* Rebuild the InnoDB lexical analyzers with flex 2.6.4Marko Mäkelä2019-04-013-114/+821
| | | | | | | | | | | | | | | InnoDB includes 3 parsers, which use 3 lexical analyzers that are generated with flex. Flex versions before 2.6 emitted the keyword "register", which is deprecated in C++17. The lexical analyzers were regenerated as follows: for s in storage/innobase storage/xtradb do (cd "$s"/pars; ./make_flex.sh) touch "$s"/fts/*.l make -C "$s"/fts -f Makefile.query done
* Revert MDEV-18464 and MDEV-12009Marko Mäkelä2019-03-281-7/+12
| | | | | | | | | | | | | | | 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-18464: Port kill_one_trx fixes from 10.4 to 10.1Jan Lindström2019-03-281-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pushed the decision for innodb transaction and system locking down to lock0lock.cc level. With this, we can avoid releasing these mutexes for executions where these mutexes were acquired upfront. This patch will also fix BF aborting of native threads, e.g. threads which have declared wsrep_on=OFF. Earlier, we have used, for innodb trx locks, was_chosen_as_deadlock_victim flag, for marking inodb transactions, which are victims for wsrep BF abort. With native threads (wsrep_on==OFF), re-using was_chosen_as_deadlock_victim flag may lead to inteference with real deadlock, and to deal with this, the patch has added new flag for marking wsrep BF aborts only: victim=true Similar way if replication decides to abort one of the threads we mark victim by: victim=true innobase_kill_query Remove lock sys and trx mutex handling. wsrep_innobase_kill_one_trx Mark victim trx with victim=true trx0trx.h Remove trx_abort_t type and abort type variable from trx struct. Add victim variable to trx. wsrep_kill_victim Remove abort_type lock_report_waiters_to_mysql Take also trx mutex and mark trx as a victim for replication abort. lock_trx_handle_wait_low New low level function to check whether the transaction has already been rolled back because it was selected as a deadlock victim, or if it has to wait then cancel the wait lock. lock_trx_handle_wait If transaction is not marked as victim take lock sys and trx mutex before calling lock_trx_handle_wait_low and release them after that. row_search_for_mysql Remove lock sys and trx mutex taking and releasing. trx_rollback_to_savepoint_for_mysql_low trx_commit_in_memory Clean up victim variable.
* cmake: re-enable -Werror in the maintainer modeSergei Golubchik2019-03-271-2/+0
| | | | | | 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
* MDEV-13818 CREATE INDEX leaks memory if running out of undo log spaceMarko Mäkelä2019-03-071-1/+2
| | | | | | | | | | | | | | row_merge_create_index_graph(): Relay the internal state from dict_create_index_step(). Our caller should free the index only if it was not copied, added to the cache, and freed. row_merge_create_index(): Free the index template if it was not added to the cache. This is a safer variant of the logic that was introduced in 65070beffd2e9279145b48d1f27c517b6588e543 in 10.2. prepare_inplace_alter_table_dict(): Add additional fault injection to exercise a code path where we have already added an index to the cache.
* MDEV-18659: Fix string truncation/overflow in InnoDB and XtraDBMarko Mäkelä2019-03-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix the warnings issued by GCC 8 -Wstringop-truncation and -Wstringop-overflow in InnoDB and XtraDB. This work is motivated by Jan Lindström. The patch mainly differs from his original one as follows: (1) We remove explicit initialization of stack-allocated string buffers. The minimum amount of initialization that is needed is a terminating NUL character. (2) GCC issues a warning for invoking strncpy(dest, src, sizeof dest) because if strlen(src) >= sizeof dest, there would be no terminating NUL byte in dest. We avoid this problem by invoking strncpy() with a limit that is 1 less than the buffer size, and by always writing NUL to the last byte of the buffer. (3) We replace strncpy() with memcpy() or strcpy() in those cases when the result is functionally equivalent. Note: fts_fetch_index_words() never deals with len==UNIV_SQL_NULL. This was enforced by an assertion that limits the maximum length to FTS_MAX_WORD_LEN. Also, the encoding that InnoDB uses for the compressed fulltext index is not byte-order agnostic, that is, InnoDB data files that use FULLTEXT INDEX are not portable between big-endian and little-endian systems.
* MDEV-18662 ib_wqueue_t has a data raceEugene Kosov2019-02-211-10/+5
| | | | | | ib_wqueue_is_empty(): protect ib_list_is_empty() call Closes #1202
* Merge 10.1 into 10.1Marko Mäkelä2019-02-021-1/+1
|\ | | | | | | This is joint work with Oleksandr Byelkin.
| * Version fix after mergeOleksandr Byelkin2019-01-281-1/+1
| |
| * MDEV-18349 InnoDB file size changes are not safe when file system crashesMarko Mäkelä2019-01-231-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When InnoDB is invoking posix_fallocate() to extend data files, it was missing a call to fsync() to update the file system metadata. If file system recovery is needed, the file size could be incorrect. When the setting innodb_flush_method=O_DIRECT_NO_FSYNC that was introduced in MariaDB 10.0.11 (and MySQL 5.6) is enabled, InnoDB would wrongly skip fsync() after extending files. Furthermore, the merge commit d8b45b0c004edc0b91029b232d7cc9aad02cc822 inadvertently removed XtraDB error checking for posix_fallocate() which this fix is restoring. fil_flush(): Add the parameter bool metadata=false to request that fil_buffering_disabled() be ignored. fil_extend_space_to_desired_size(): Invoke fil_flush() with the extra parameter. After successful posix_fallocate(), invoke os_file_flush(). Note: The bookkeeping for fil_flush() would not be updated the posix_fallocate() code path, so the "redundant" fil_flush() should be a no-op.
* | Merge 10.0 into 10.1Marko Mäkelä2019-01-174-14/+13
|\ \ | |/
| * MDEV-18233 Moving the hash_node_t to improve locality of referenceMarko Mäkelä2019-01-153-7/+7
| |\
| | * MDEV-18233 Moving the hash_node_t to improve locality of referenceEugene Kosov2019-01-143-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | When performing a hash search via HASH_SEARCH we first look at a key of a node and then at its pointer to the next node in chain. If we have those in one cache line instead of a two we reduce memory reads. I found dict_table_t, fil_space_t and buf_page_t suitable for such improvement.
| * | MDEV-17797 Add ASAN poisoning for mem_heap_tMarko Mäkelä2019-01-151-6/+5
| |/ | | | | | | | | | | | | The merge commit d833bb65d53b9a4375fa71cc485b4719fdb0ee53 did not correctly merge the commit 03eb15933da9944e821bc8c787f84de50e823da0. Closes #948
* | Follow-up to MDEV-12112: corruption in encrypted table may be overlookedMarko Mäkelä2018-12-172-22/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The initial fix only covered a part of Mariabackup. This fix hardens InnoDB and XtraDB in a similar way, in order to reduce the probability of mistaking a corrupted encrypted page for a valid unencrypted one. This is based on work by Thirunarayanan Balathandayuthapani. fil_space_verify_crypt_checksum(): Assert that key_version!=0. Let the callers guarantee that. Now that we have this assertion, we also know that buf_page_is_zeroes() cannot hold. Also, remove all diagnostic output and related parameters, and let the relevant callers emit such messages. Last but not least, validate the post-encryption checksum according to the innodb_checksum_algorithm (only accepting one checksum for the strict variants), and no longer try to validate the page as if it was unencrypted. buf_page_is_zeroes(): Move to the compilation unit of the only callers, and declare static. xb_fil_cur_read(), buf_page_check_corrupt(): Add a condition before calling fil_space_verify_crypt_checksum(). This is a non-functional change. buf_dblwr_process(): Validate the page only as encrypted or unencrypted, but not both.
* | Merge 10.0 into 10.1Marko Mäkelä2018-12-132-29/+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.
| * MDEV-17957 Make Innodb_checksum_algorithm stricter for strict_* valuesThirunarayanan Balathandayuthapani2018-12-132-29/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Innodb_checksum_algorithm checks for all checksum algorithm to validate the page checksum even though the algorithm is specified as strict_crc32, strict_innodb, strict_none. Fix: Remove the checks for all checksum algorithm to validate the page checksum if the algo is specified as strict_* values.
* | Merge 10.0 into 10.1Marko Mäkelä2018-11-051-5/+1
|\ \ | |/
| * Revert some InnoDB/XtraDB changesMarko Mäkelä2018-11-051-5/+1
| | | | | | | | | | | | | | | | The relevant InnoDB/XtraDB fixes up to 5.6.42 had already been applied to MariaDB in commit 30c3d6db328d73f1b30be537aceb55d37936fdb9. Revert some changes that appeared in the merge commit 87d852f102a7f733a774252d9a446377ac51a976.
* | Merge branch '10.0' into 10.1Sergei Golubchik2018-10-304-5/+9
|\ \ | |/
| * Merge branch 'merge/merge-innodb-5.6' into 10.0Sergei Golubchik2018-10-281-1/+5
| |\
| | * 5.6.42Sergei Golubchik2018-10-271-1/+5
| | |
| * | MDEV-17533 Merge new release of InnoDB 5.6.42 to 10.0Marko Mäkelä2018-10-251-1/+1
| | | | | | | | | | | | Also, add a test for a bug that does not seem to affect MariaDB.
| * | MDEV-12547: InnoDB FULLTEXT index has too strict ↵Thirunarayanan Balathandayuthapani2018-10-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | MDEV-17313 Data race in ib_counter_tEugene Kosov2018-10-021-19/+27
| | | | | | | | | | | | ib_counter_t: make all reads/writes to m_counter relaxed atomical
* | | compiler warnings (clang 4.0.1 on i386)Sergei Golubchik2018-09-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | extra/mariabackup/fil_cur.cc:361:42: warning: format specifies type 'unsigned long' but the argument has type 'ib_int64_t' (aka 'long long') [-Wformat] extra/mariabackup/fil_cur.cc:376:9: warning: format specifies type 'unsigned long' but the argument has type 'ib_int64_t' (aka 'long long') [-Wformat] sql/handler.cc:6196:45: warning: format specifies type 'unsigned long' but the argument has type 'wsrep_trx_id_t' (aka 'unsigned long long') [-Wformat] sql/log.cc:1681:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] sql/log.cc:1687:16: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] sql/wsrep_sst.cc:1388:86: warning: format specifies type 'long' but the argument has type 'wsrep_seqno_t' (aka 'long long') [-Wformat] sql/wsrep_sst.cc:232:86: warning: format specifies type 'long' but the argument has type 'wsrep_seqno_t' (aka 'long long') [-Wformat] storage/connect/filamdbf.cpp:450:47: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] storage/connect/filamdbf.cpp:970:47: warning: format specifies type 'short' but the argument has type 'int' [-Wformat] storage/connect/inihandl.cpp:197:16: warning: address of array 'key->name' will always evaluate to 'true' [-Wpointer-bool-conversion] storage/innobase/btr/btr0scrub.cc:151:17: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/buf/buf0buf.cc:5085:8: warning: nonnull parameter 'bpage' will evaluate to 'true' on first encounter [-Wpointer-bool-conversion] storage/innobase/fil/fil0crypt.cc:2454:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/handler/ha_innodb.cc:18685:7: warning: format specifies type 'unsigned long' but the argument has type 'wsrep_trx_id_t' (aka 'unsigned long long') [-Wformat] storage/innobase/row/row0mysql.cc:3319:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/innobase/row/row0mysql.cc:3327:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/maria/ma_norec.c:35:10: warning: implicit conversion from 'int' to 'my_bool' (aka 'char') changes value from 131 to -125 [-Wconstant-conversion] storage/maria/ma_norec.c:42:10: warning: implicit conversion from 'int' to 'my_bool' (aka 'char') changes value from 131 to -125 [-Wconstant-conversion] storage/maria/ma_test2.c:1009:12: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] storage/maria/ma_test2.c:1010:12: warning: format specifies type 'unsigned long' but the argument has type 'size_t' (aka 'unsigned int') [-Wformat] storage/mroonga/ha_mroonga.cpp:9189:44: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] storage/mroonga/vendor/groonga/lib/expr.c:4987:22: warning: comparison of constant -1 with expression of type 'grn_operator' is always false [-Wtautological-constant-out-of-range-compare] storage/xtradb/btr/btr0scrub.cc:151:17: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/buf/buf0buf.cc:5047:8: warning: nonnull parameter 'bpage' will evaluate to 'true' on first encounter [-Wpointer-bool-conversion] storage/xtradb/fil/fil0crypt.cc:2454:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/row/row0mysql.cc:3324:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] storage/xtradb/row/row0mysql.cc:3332:5: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] unittest/sql/mf_iocache-t.cc:120:35: warning: format specifies type 'unsigned long' but the argument has type 'int' [-Wformat] unittest/sql/mf_iocache-t.cc:96:35: note: expanded from macro 'INFO_TAIL'
* | | Merge 10.0 into 10.1Marko Mäkelä2018-08-032-1/+12
|\ \ \ | |/ /
| * | Fix -Wclass-memaccess warnings in InnoDB,XtraDBMarko Mäkelä2018-08-032-0/+12
| | |
* | | Merge 10.0 into 10.1Marko Mäkelä2018-08-011-2/+4
|\ \ \ | |/ /
| * | MDEV-16865 InnoDB fts_query() ignores KILLMarko Mäkelä2018-08-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The functions fts_ast_visit() and fts_query() inside InnoDB FULLTEXT INDEX query processing are not checking for THD::killed (trx_is_interrupted()), like anything that potentially takes a long time should do. This is a port of the following change from MySQL 5.7.23, with a completely rewritten test case. commit c58c6f8f66ddd0357ecd0c99646aa6bf1dae49c8 Author: Aakanksha Verma <aakanksha.verma@oracle.com> Date: Fri May 4 15:53:13 2018 +0530 Bug #27155294 MAX_EXECUTION_TIME NOT INTERUPTED WITH FULLTEXT SEARCH USING MECAB
* | | Merge 10.0 into 10.1Marko Mäkelä2018-07-312-18/+8
|\ \ \ | |/ /
| * | MDEV-16855 Fix fts_sync_synchronization in InnoDBMarko Mäkelä2018-07-302-18/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of the following fix from MySQL 5.7.23. Some code refactoring has been omitted, and the test case has been adapted to MariaDB. commit 7a689acaa65e9d602575f7aa53fe36a64a07460f Author: Krzysztof Kapuścik <krzysztof.kapuscik@oracle.com> Date: Tue Mar 13 12:34:03 2018 +0100 Bug#27082268 Invalid FTS sync synchronization The fix closes two issues: Bug #27082268 - INNODB: FAILING ASSERTION: SYM_NODE->TABLE != NULL DURING FTS SYNC Bug #27095935 - DEADLOCK BETWEEN FTS_DROP_INDEX AND FTS_OPTIMIZE_SYNC_TABLE Both issues were related to a FTS cache sync being done during operations that perfomed DDL actions on internal FTS tables (ALTER TABLE, TRUNCATE). In some cases the FTS tables and/or internal cache structures could get removed while still being used to perform FTS synchronization leading to crashes. In other the sync operations could not get finishes as it was waiting for dict lock which was taken by thread waiting for the background sync to be finished. The changes done includes: - Stopping background operations during ALTER TABLE and TRUNCATE. - Removal of unused code in FTS. - Cleanup of FTS sync related code to make it more readable and easier to maintain. RB#18262
* | | Merge branch '10.0' into 10.1Oleksandr Byelkin2018-07-311-1/+1
|\ \ \ | |/ /
| * | Merge InnoDB MySQL 5.6.41 to 10.0Marko Mäkelä2018-07-301-1/+1
| | |
* | | MDEV-16515 InnoDB: Failing assertion: ++retries < 10000 in fileMarko Mäkelä2018-06-261-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dict0dict.cc buf_LRU_drop_page_hash_for_tablespace(): Return whether any adaptive hash index entries existed. If yes, the caller should keep retrying to drop the adaptive hash index. row_import_for_mysql(), row_truncate_table_for_mysql(), row_drop_table_for_mysql(): Ensure that the adaptive hash index was entirely dropped for the table.
* | | MDEV-13103 Deal with page_compressed page corruptionMarko Mäkelä2018-06-145-180/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fil_page_decompress(): Replaces fil_decompress_page(). Allow the caller detect errors. Remove duplicated code. Use the "safe" instead of "fast" variants of decompression routines. fil_page_compress(): Replaces fil_compress_page(). The length of the input buffer always was srv_page_size (innodb_page_size). Remove printouts, and remove the fil_space_t* parameter. buf_tmp_buffer_t::reserved: Make private; the accessors acquire() and release() will use atomic memory access. buf_pool_reserve_tmp_slot(): Make static. Remove the second parameter. Do not acquire any mutex. Remove the allocation of the buffers. buf_tmp_reserve_crypt_buf(), buf_tmp_reserve_compression_buf(): Refactored away from buf_pool_reserve_tmp_slot(). buf_page_decrypt_after_read(): Make static, and simplify the logic. Use the encryption buffer also for decompressing. buf_page_io_complete(), buf_dblwr_process(): Check more failures. fil_space_encrypt(): Simplify the debug checks. fil_space_t::printed_compression_failure: Remove. fil_get_compression_alg_name(): Remove. fil_iterate(): Allocate a buffer for compression and decompression only once, instead of allocating and freeing it for every page that uses compression, during IMPORT TABLESPACE. fil_node_get_space_id(), fil_page_is_index_page(), fil_page_is_lzo_compressed(): Remove (unused code).
* | | Remove traces of the non-working MDEV-6354Marko Mäkelä2018-06-132-7/+3
| | | | | | | | | | | | | | | | | | | | | MariaDB never supported the MySQL 5.7 compression format. FIL_PAGE_TYPE_COMPRESSED: Remove. This was originally added as FIL_PAGE_COMPRESSED.
* | | Correct a typo in a commentMarko Mäkelä2018-06-131-1/+1
| | |
* | | Merge 10.0 to 10.1Marko Mäkelä2018-06-061-4/+0
|\ \ \ | |/ /
| * | MDEV-16124 fil_rename_tablespace() times out and crashes server during ↵Marko Mäkelä2018-06-051-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | table-rebuilding ALTER TABLE InnoDB insisted on closing the file handle before renaming a file. Renaming a file should never be a problem on POSIX systems. Also on Windows it should work if the file was opened in FILE_SHARE_DELETE mode. fil_space_t::stop_ios: Remove. We no longer need to stop file access during rename operations. fil_mutex_enter_and_prepare_for_io(): Remove the wait for stop_ios. fil_rename_tablespace(): Remove the retry logic; do not close the file handle. Remove the unused fault injection that was added along with the DATA DIRECTORY functionality (MySQL WL#5980). os_file_create_simple_func(), os_file_create_func(), os_file_create_simple_no_error_handling_func(): Include FILE_SHARE_DELETE in the share_mode. (We will still prevent multiple InnoDB instances from using the same files by not setting FILE_SHARE_WRITE.)
* | | Remove dead code that was added in MDEV-5834Marko Mäkelä2018-06-052-96/+4
| | | | | | | | | | | | | | | | | | | | | | | | ha_innobase::set_partition_owner_stats(): Remove (unused function). ha_innobase::ha_partition_stats: Remove (the variable is never read). Remove unused ut_timer functions.
* | | MDEV-16283 ALTER TABLE...DISCARD TABLESPACE still takes long on a large ↵Marko Mäkelä2018-05-292-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffer pool Also fixes MDEV-14727, MDEV-14491 InnoDB: Error: Waited for 5 secs for hash index ref_count (1) to drop to 0 by replacing the flawed wait logic in dict_index_remove_from_cache_low(). On DISCARD TABLESPACE, there is no need to drop the adaptive hash index. We must drop it on IMPORT TABLESPACE, and eventually on DROP TABLE or DROP INDEX. As long as the dict_index_t object remains in the cache and the table remains inaccessible, the adaptive hash index entries to orphaned pages would not do any harm. They would be dropped when buffer pool pages are reused for something else. btr_search_drop_page_hash_when_freed(), buf_LRU_drop_page_hash_batch(): Remove the parameter zip_size, and pass 0 to buf_page_get_gen(). buf_page_get_gen(): Ignore zip_size if mode==BUF_PEEK_IF_IN_POOL. buf_LRU_drop_page_hash_for_tablespace(): Drop the adaptive hash index even if the tablespace is inaccessible. buf_LRU_drop_page_hash_for_tablespace(): New global function, to drop the adaptive hash index. buf_LRU_flush_or_remove_pages(), fil_delete_tablespace(): Remove the parameter drop_ahi. dict_index_remove_from_cache_low(): Actively drop the adaptive hash index if entries exist. This should prevent InnoDB hangs on DROP TABLE or DROP INDEX. row_import_for_mysql(): Drop any adaptive hash index entries for the table. row_drop_table_for_mysql(): Drop any adaptive hash index for the table, except if the table resides in the system tablespace. (DISCARD TABLESPACE does not apply to the system tablespace, and we do no want to drop the adaptive hash index for other tables than the one that is being dropped.) row_truncate_table_for_mysql(): Drop any adaptive hash index entries for the table, except if the table resides in the system tablespace.
* | | Merge branch '10.0' into 10.1Sergei Golubchik2018-05-051-1/+1
|\ \ \ | |/ /
| * | Merge branch 'merge-innodb-5.6' into 10.0Sergei Golubchik2018-04-261-1/+1
| |\ \ | | |/
* | | Merge 10.0 into 10.1Marko Mäkelä2018-04-241-0/+2
|\ \ \ | |/ /
| * | Fix -Wimplicit-fallthroughMarko Mäkelä2018-04-231-0/+2
| | |
* | | Revert "MDEV-14705: Do not rollback on InnoDB shutdown"Marko Mäkelä2018-04-101-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 76ec37f5225eda9f8a23760091bfb60287927715. This behaviour change will be done separately in: MDEV-15832 With innodb_fast_shutdown=3, skip the rollback of connected transactions
* | | MDEV-14705: slow innodb startup/shutdown can exceed systemd timeoutDaniel Black2018-04-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use systemd EXTEND_TIMEOUT_USEC to advise systemd of progress Move towards progress measures rather than pure time based measures. Progress reporting at numberious shutdown/startup locations incuding: * For innodb_fast_shutdown=0 trx_roll_must_shutdown() for rolling back incomplete transactions. * For merging the change buffer (in srv_shutdown(bool ibuf_merge)) * For purging history, srv_do_purge Thanks Marko for feedback and suggestions.
* | | MDEV-14705: Do not rollback on InnoDB shutdownMarko Mäkelä2018-04-061-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_undo_step(): If fast shutdown has been requested, abort the rollback of any non-DDL transactions. Starting with MDEV-12323, we aborted the rollback of recovered transactions. These transactions would be rolled back on subsequent server startup. trx_roll_report_progress(): Renamed from trx_roll_must_shutdown(), now that the shutdown check has been moved to the only caller.
* | | MDEV-12396 IMPORT TABLESPACE cleanupMarko Mäkelä2018-03-201-101/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce unnecessary inter-module calls for IMPORT TABLESPACE. Move some IMPORT-related code from fil0fil.cc to row0import.cc. PageCallback: Remove. Make AbstractCallback the base class. PageConverter: Define some member functions inline.