summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2019-11-1119-237/+129
|\
| * MDEV-17138 follow-up: Optimize fseg_create()Marko Mäkelä2019-11-113-15/+21
| | | | | | | | | | | | | | | | fseg_create(): Initialize FSEG_FRAG_ARRY by a single MLOG_MEMSET record. flst_zero_addr(), flst_init(): Optimize away redundant writes. fseg_free_page_low(): Write FIL_NULL by MLOG_MEMSET.
| * Merge 10.3 into 10.4Marko Mäkelä2019-11-1117-244/+123
| |\
| | * Merge 10.2 into 10.3Marko Mäkelä2019-11-1118-249/+130
| | |\
| | | * MDEV-21024: Cleanup XDES_CLEAN_BITMarko Mäkelä2019-11-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | The XDES_CLEAN_BIT is always set for every element of the page allocation bitmap in the extent descriptor pages. Do not bother touching it, to avoid redundant writes.
| | | * MDEV-21024: Clean up dict_hdr_create()Marko Mäkelä2019-11-111-3/+2
| | | | | | | | | | | | | | | | The DICT_HDR_MAX_SPACE_ID was already zero-initialized at page allocation.
| | | * MDEV-21024: Clean up IMPORT TABLESPACEMarko Mäkelä2019-11-115-57/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | page_rec_write_field(): Remove. dict_create_index_tree_step(): If the SYS_INDEXES.PAGE does not change, do not update it in the data dictionary. Typically, all index page numbers would be unchanged before and after IMPORT TABLESPACE, except if some secondary indexes were created after loading some data. btr_root_fseg_adjust_on_import(): Remove the redundant mtr_t* parameter. Redo logging is disabled during the page adjustments that IMPORT TABLESPACE is performing.
| | | * MDEV-21024: Clean up btr_root_raise_and_insert()Marko Mäkelä2019-11-111-7/+1
| | | | | | | | | | | | | | | | | | | | The root page must never have any siblings, so it is unnecessary to clear those fields.
| | | * MDEV-21024: Clean up page allocationMarko Mäkelä2019-11-111-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fsp_alloc_seg_inode_page(): Ever since commit 3926673ce7149aa223103126b6aeac819b10fab5 all newly allocated pages are zero-initialized. Assert that this is the case for the FSEG_ID fields.
| | | * MDEV-21024: Optimize writing BTR_EXTERN_LENMarko Mäkelä2019-11-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | btr_store_big_rec_extern_fields(): Remove the redundant initialization of the most significant 32 bits of BTR_EXTERN_LEN. InnoDB never supported BLOBs that are longer than 4GiB. In fact, dtuple_convert_big_rec() would write emit an error message if a clustered index record tuple would exceed 1,000,000,000 bytes in length. The BTR_EXTERN_LEN in the BLOB pointers in clustered index leaf page records is zero-initialized at least since commit 41bb3537ba507799ab0143acd75ccab72192931e
| | | * MDEV-21024: Clean up rtr_adjust_upper_level()Marko Mäkelä2019-11-111-1/+0
| | | | | | | | | | | | | | | | | | | | Remove the unnecessary retrieval and null-modifications of the preceding page.
| | | * Cleanup btr_page_get_prev(), btr_page_get_next()Marko Mäkelä2019-11-1113-145/+89
| | | | | | | | | | | | | | | | | | | | | | | | Remove the redundant parameter mtr_t*. Make use of page_has_prev(), page_has_next() whenever possible.
| | | * MDEV-21024: Clean up rtr_adjust_upper_level()Marko Mäkelä2019-11-111-20/+0
| | | | | | | | | | | | | | | | | | | | Remove the unnecessary retrieval and null-modifications of the preceding page.
| | | * bump the VERSIONDaniel Bartholomew2019-11-081-1/+1
| | | |
| | * | bump the VERSIONDaniel Bartholomew2019-11-081-1/+1
| | | |
| * | | bump the VERSIONDaniel Bartholomew2019-11-081-1/+1
| | | |
* | | | Cleanup: Replace xdes_set_bit()Marko Mäkelä2019-11-081-40/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The XDES_CLEAN_BIT is always set for every element of the page allocation bitmap in the extent descriptor pages. Do not bother touching it, to avoid redundant writes. xdes_set_free<bool free>(): Replaces xdes_set_bit().
* | | | Cleanup: Remove redundant XDES_FREE_BIT parametersMarko Mäkelä2019-11-085-266/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The page allocation bitmaps in the extent descriptor pages contain two bits per page: XDES_FREE_BIT and XDES_CLEAN_BIT, which is unused. Simplify read access. xdes_is_free(descr,mtr): Remove. Use !xdes_get_n_used(descr) instead. xdes_is_free(): Replaces xdes_get_bit(), xdes_mtr_get_bit(). xdes_find_free(): Replaces xdes_find_bit(). fsp_seg_inode_page_get_nth_inode(): Remove the redundant parameters physical_size, mtr. fsp_seg_inode_page_find_used(), fsp_seg_inode_page_find_free(): Remove the redundant parameter mtr.
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-11-081-9/+1
|\ \ \ \ | |/ / /
| * | | MDEV-17138 follow-up: Use MLOG_MEMSET in xdes_init()Marko Mäkelä2019-11-081-9/+1
| | | |
* | | | Use uint16_t for FIL_PAGE_TYPEMarko Mäkelä2019-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | Since commit 5d596064d676ae691d55cae653b1c461ab012e46 fil_page_type_is_index() expects uint16_t, not ulint.
* | | | MDEV-12353 preparation: Remove redundant writesMarko Mäkelä2019-11-082-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fsp_alloc_seg_inode_page(): Ever since commit 3926673ce7149aa223103126b6aeac819b10fab5 all newly allocated pages are zero-initialized. Assert that this is the case for the FSEG_ID fields. (Side note: before that fix, other parts of the pages could contain nonzero garbage.) btr_store_big_rec_extern_fields(): Remove the redundant initialization of the most significant 32 bits of BTR_EXTERN_LEN. InnoDB never supported BLOBs that are longer than 4GiB. In fact, dtuple_convert_big_rec() would write emit an error message if a clustered index record tuple would exceed 1,000,000,000 bytes in length.
* | | | Cleanup: Do not pass mtr_t* as NULLMarko Mäkelä2019-11-081-16/+32
| | | | | | | | | | | | | | | | PageConverter::update_index_page(): Invoke lower-level writes directly.
* | | | Cleanup: Define FIL_PAGE_TYPE constants as constexprMarko Mäkelä2019-11-083-42/+51
| | | |
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-11-0814-145/+50
|\ \ \ \ | |/ / /
| * | | Cleanup: Remove mach_read_ulint()Marko Mäkelä2019-11-0812-129/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function mach_read_ulint() is a wrapper for the lower-level functions mach_read_from_1(), mach_read_from_2(), mach_read_from_8(). Invoke those functions directly, for better readability of the code. mtr_t::read_ulint(), mtr_read_ulint(): Remove. Yes, we will lose the ability to assert that the read is covered by the mini-transaction. We would still check that on writes, and any writes that wrongly bypass mini-transaction logging would likely be caught by stress testing with Mariabackup.
| * | | MDEV-17138 follow-up: Use MLOG_MEMSET for writing FIL_NULLMarko Mäkelä2019-11-083-16/+16
| | | | | | | | | | | | | | | | | | | | Always use the MLOG_MEMSET record for writing FIL_NULL, because it is more compact.
* | | | Compilation fix with partitioning off (MDEV-17553)Aleksey Midenkov2019-11-071-95/+96
| | | |
* | | | MDEV-17553 Enable setting start datetime for interval partitioned history of ↵Aleksey Midenkov2019-11-0711-87/+563
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | system versioned tables * Explicit STARTS syntax * SHOW CREATE * Default STARTS rounding depending on INTERVAL type * Warn when STARTS timestamp is later than query time * Fix uninitialized Lex->create_last_non_select_table under mysql_unpack_partition() Default STARTS rounding depending on INTERVAL type If STARTS clause is omitted, default one is assigned with value derived from query timestamp. The rounding is done on STARTS value depending on INTERVAL type: SECOND: no rounding is done; MINUTE: timestamp seconds is set to 0; HOUR: timestamp seconds and minutes are set to 0; DAY, WEEK, MONTH and YEAR: timestamp seconds, minutes and hours are set to 0 (the date of rotation is kept as current date).
* | | | Merge 10.4 into 10.5Marko Mäkelä2019-11-0727-143/+444
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | A conflict between MDEV-19514 (b42294bc6409794bdbd2051b32fa079d81cea61d) and MDEV-20934 (d7a2401750bb29dfdb45929a536539b9f17b347f) was resolved. We will not invoke the function ibuf_delete_recs() from ibuf_merge_or_delete_for_page(). Instead, we will add that logic to the function ibuf_read_merge_pages().
| * | | Merge 10.3 into 10.4mariadb-10.4.10Marko Mäkelä2019-11-072-0/+8
| |\ \ \ | | |/ /
| | * | MDEV-20934: Make the test more robustmariadb-10.3.20Marko Mäkelä2019-11-062-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to MDEV-12288, the slow shutdown in MariaDB 10.3 will include resetting the DB_TRX_ID for all inserted records. This might cause the 60-second shutdown_server timeout to be exceeded. Let us wait for the purge to complete before initiating slow shutdown.
| * | | Merge 10.3 into 10.4Marko Mäkelä2019-11-0627-123/+429
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2019-11-0624-110/+400
| | |\ \ | | | |/
| | | * Follow-up to 792c9f9a4977ea428537ca34435d39bd17cec5ffmariadb-10.2.29Marko Mäkelä2019-11-064-29/+19
| | | | | | | | | | | | | | | | | | | | | | | | dict_index_add_to_cache(): Make the 'index' a reference to a pointer, so that the caller will avoid the expensive call to dict_index_get_if_in_cache_low().
| | | * Merge 10.1 to 10.2Marko Mäkelä2019-11-0618-58/+257
| | | |\
| | | | * Merge 5.5 into 10.1mariadb-10.1.43Marko Mäkelä2019-11-062-15/+14
| | | | |\
| | | | | * bump the VERSIONDaniel Bartholomew2019-11-051-1/+1
| | | | | |
| | | | | * MDEV-20971 ASAN heap-use-after-free in list_delete / heap_closeSergei Golubchik2019-11-042-15/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't save/restore HP_INFO as it could be changed by a concurrent thread. different parts of HP_INFO are protected by different mutexes and the mutex that protect most of the HP_INFO does not protect its open_list data. As a bonus, make heap_check_heap() to take const HP_INFO* and not make any changes there whatsoever.
| | | | * | MDEV-20987 InnoDB fails to start when fts table has FK relationThirunarayanan Balathandayuthapani2019-11-064-32/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB: Assertion failure in file .../dict/dict0dict.cc line ... InnoDB: Failing assertion: table->can_be_evicted This fixes a regression that was caused by the fix of MDEV-20621 (commit a41d429765c7ddb528b9b438c68b25ff55d3bd55). MySQL 5.6 (and MariaDB 10.0) introduced eviction of tables from the InnoDB data dictionary cache. Tables that are connected to FOREIGN KEY constraints or FULLTEXT INDEX are exempt of the eviction. With the problematic change, a table that would already be exempt from eviction due to FOREIGN KEY would cause the problem if there also was a FULLTEXT INDEX defined on it. dict_load_table(): Only prevent eviction if table->can_be_evicted holds.
| | | | * | bump the VERSIONDaniel Bartholomew2019-11-051-1/+1
| | | | | |
| | | | * | Fix ninja buildVladislav Vaintroub2019-11-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not rely on existence of CMakeFiles/${target}.dir directory existence It is not there for custom targets in Ninja build.
| | | | * | Fix GCC 9.2.1 -Wstringop-truncationMarko Mäkelä2019-11-045-11/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dict_table_rename_in_cache(): Use strcpy() instead of strncpy(), because they are known to be equivalent in this case (the length of old_name was already validated). mariabackup: Invoke strncpy() with one less than the buffer size, and explicitly add NUL as the last byte of the buffer.
| | | | * | Fix build on !glibc/powerpc*pkubaj2019-11-021-1/+1
| | | | | | | | | | | | | | | | | | Do the same that newer branches do and don't include glibc-related headers on non-glibc environment.
| | | | * | MDEV-20424: New default value for optimizer_use_condition-selectivity leads ↵Varun Gupta2019-11-014-0/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to bad plan In the function prev_record_reads where one finds the different row combinations for a subset of partial join, it did not take into account the selectivity of tables involved in the subset of partial join.
| | | | * | MDEV-17896 Assertion `pfs->get_refcount() > 0' failedRobert Bindar2019-11-013-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunate DROP TEMPORARY..IF EXISTS on a regular table may allow subsequent CREATE TABLE statements to steal away the PFS_table_share instance from the dropped table.
| | | | * | List of unstable tests for 10.1.42 releasemariadb-10.1.42Elena Stepanova2019-10-311-123/+81
| | | | | |
| | | * | | MDEV-20934 Infinite loop on innodb_fast_shutdown=0 with inconsistent change ↵Marko Mäkelä2019-11-063-8/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffer Due to a data corruption bug that may have occurred a long time earlier (possibly involving physical backup and MySQL Bug #69122, which was addressed in commit f166ec71b78fdf7a08ba413509cf00ad9e003b3c) it seems possible that the InnoDB change buffer might end up containing entries, while no buffered changes exist according to the change buffer bitmap pages in the .ibd files. ibuf_delete_recs(): New function, to be invoked on slow shutdown only. Remove all buffered changes for a specific page. ibuf_merge_or_delete_for_page(): If the change buffer bitmap is clean and a slow shutdown is in progress, invoke ibuf_delete_recs(). We do not want to do that during normal operation, due to the additional overhead that is involved. The bitmap page should be consistent with the change buffer in the first place.
| | | * | | bump the VERSIONDaniel Bartholomew2019-11-051-1/+1
| | | | | |
| | | * | | cleanup: replace some mtr_read_ulint() with mach_read_from_4()Eugene Kosov2019-11-011-17/+11
| | | | | |