1. 08 Nov, 2019 10 commits
    • Marko Mäkelä's avatar
      Cleanup: Remove redundant XDES_FREE_BIT parameters · 5ed54e78
      Marko Mäkelä authored
      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.
      5ed54e78
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 74b7d018
      Marko Mäkelä authored
      74b7d018
    • Marko Mäkelä's avatar
      Use uint16_t for FIL_PAGE_TYPE · b5ef7ffa
      Marko Mäkelä authored
      Since commit 5d596064
      fil_page_type_is_index() expects uint16_t, not ulint.
      b5ef7ffa
    • Marko Mäkelä's avatar
      15b713ca
    • Marko Mäkelä's avatar
      MDEV-12353 preparation: Remove redundant writes · a6d614fb
      Marko Mäkelä authored
      fsp_alloc_seg_inode_page(): Ever since
      commit 3926673c
      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.
      a6d614fb
    • Marko Mäkelä's avatar
      Cleanup: Do not pass mtr_t* as NULL · 5b72e813
      Marko Mäkelä authored
      PageConverter::update_index_page(): Invoke lower-level writes directly.
      5b72e813
    • Marko Mäkelä's avatar
      5d596064
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 52246dff
      Marko Mäkelä authored
      52246dff
    • Marko Mäkelä's avatar
      Cleanup: Remove mach_read_ulint() · 78d0d2cd
      Marko Mäkelä authored
      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.
      78d0d2cd
    • Marko Mäkelä's avatar
      MDEV-17138 follow-up: Use MLOG_MEMSET for writing FIL_NULL · 8a5eb414
      Marko Mäkelä authored
      Always use the MLOG_MEMSET record for writing FIL_NULL,
      because it is more compact.
      8a5eb414
  2. 07 Nov, 2019 5 commits
    • Aleksey Midenkov's avatar
      db565439
    • Aleksey Midenkov's avatar
      MDEV-17553 Enable setting start datetime for interval partitioned history of... · 1e73d7d6
      Aleksey Midenkov authored
      MDEV-17553 Enable setting start datetime for interval partitioned history of 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).
      1e73d7d6
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 77e8a311
      Marko Mäkelä authored
      A conflict between MDEV-19514 (b42294bc)
      and MDEV-20934 (d7a24017)
      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().
      77e8a311
    • Oleksandr Byelkin's avatar
      Merge 10.4 into 10.5 · 3ad37ed0
      Oleksandr Byelkin authored
      3ad37ed0
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · c24ec3ce
      Marko Mäkelä authored
      c24ec3ce
  3. 06 Nov, 2019 8 commits
    • Marko Mäkelä's avatar
      MDEV-20934: Make the test more robust · 352e7667
      Marko Mäkelä authored
      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.
      352e7667
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 928abd69
      Marko Mäkelä authored
      928abd69
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 908ca466
      Marko Mäkelä authored
      908ca466
    • Marko Mäkelä's avatar
      Follow-up to 792c9f9a · 90451a59
      Marko Mäkelä authored
      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().
      90451a59
    • Marko Mäkelä's avatar
      Merge 10.1 to 10.2 · 8688ef22
      Marko Mäkelä authored
      8688ef22
    • Marko Mäkelä's avatar
      MDEV-20934 Infinite loop on innodb_fast_shutdown=0 with inconsistent change buffer · d7a24017
      Marko Mäkelä authored
      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 f166ec71)
      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.
      d7a24017
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.1 · 4e99e67c
      Marko Mäkelä authored
      4e99e67c
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-20987 InnoDB fails to start when fts table has FK relation · 5c3bbbd8
      Thirunarayanan Balathandayuthapani authored
      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 a41d4297).
      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.
      5c3bbbd8
  4. 05 Nov, 2019 8 commits
  5. 04 Nov, 2019 8 commits
    • Vladislav Vaintroub's avatar
      Fix ninja build · dc771113
      Vladislav Vaintroub authored
      Do not rely on existence of CMakeFiles/${target}.dir directory existence
      It is not there for custom targets in Ninja build.
      dc771113
    • Sergei Golubchik's avatar
      MDEV-20971 ASAN heap-use-after-free in list_delete / heap_close · cd156e2c
      Sergei Golubchik authored
      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.
      cd156e2c
    • Marko Mäkelä's avatar
      MDEV-19586: Restore pointer indirection for recv_t::data · 51fb39bf
      Marko Mäkelä authored
      Something was wrong with the removal of pointer indirection,
      because on 32-bit Windows we got crash recovery failures.
      Curiously, WITH_ASAN of a 32-bit debug build did not notice anything.
      
      This reverts a part of commit b7fc2c89.
      
      We have a 2MiB recv_sys.buf for the initial buffering. The minimum size
      of log_sys.buf would be 16MiB, and that buffer should be practically
      unused during recovery. If the buffer pool size is measured in gigabytes,
      it would indeed make sense to use the buffer pool for the recovered log
      records, perhaps after we have run out of log_sys.buf.
      
      FIXME: allow the entire buf_block_t::frame to be used for buffered
      log records, and remove MEM_HEAP_FOR_RECV_SYS. For example, use
      buf_page_t::list or buf_page_t::LRU for keeping track of memory that
      was allocated for recovery? Most members of buf_block_t
      (except buf_block_t::frame) are unused when
      block->page.state == BUF_BLOCK_MEMORY.
      51fb39bf
    • Marko Mäkelä's avatar
      Fix GCC 9.2.1 -Wstringop-truncation · 5164f8c2
      Marko Mäkelä authored
      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.
      5164f8c2
    • Marko Mäkelä's avatar
      MDEV-18115: Remove a unused variable · f89436b5
      Marko Mäkelä authored
      f89436b5
    • Marko Mäkelä's avatar
      Fix -Wmaybe-uninitialized · 8f40c029
      Marko Mäkelä authored
      Follow-up to commit 8965ae27:
      always initialize found_group.
      8f40c029
    • Marko Mäkelä's avatar
      MDEV-19586: Clean up recv_t a little · 541b00a3
      Marko Mäkelä authored
      recv_t, recv_t::data_t: Define constructors that copy the log records
      
      Ideally, we should remove recv_sys.buf, RECV_DATA_BLOCK_SIZE,
      and recv_sys_justify_left_parsing_buf(), and let the
      recv_sys.pages point directly to a buffer of parsed redo log
      records.
      
      The RECV_PARSING_BUF_SIZE (size of recv_sys.buf) is only 2MiB,
      while the minimum innodb_log_buffer_size (size of log_sys.buf) is 16MiB,
      and log_sys.buf is unused during redo log apply!
      541b00a3
    • Marko Mäkelä's avatar
      MDEV-19586: Add const qualifiers · 64a02e4f
      Marko Mäkelä authored
      Except for fil_name_process(), which invokes os_normalize_path(),
      the redo log record parser will not modify the redo log records.
      Add const qualifiers accordingly.
      64a02e4f
  6. 03 Nov, 2019 1 commit