1. 12 Nov, 2020 4 commits
  2. 11 Nov, 2020 5 commits
    • Marko Mäkelä's avatar
      Merge mariadb-10.5.8 into 10.5 · b4a5ad8d
      Marko Mäkelä authored
      b4a5ad8d
    • Daniel Bartholomew's avatar
      bump the VERSION · fff469db
      Daniel Bartholomew authored
      fff469db
    • Marko Mäkelä's avatar
      MDEV-22343 Remove SYS_TABLESPACES and SYS_DATAFILES · 5407117a
      Marko Mäkelä authored
      The InnoDB internal tables SYS_TABLESPACES and SYS_DATAFILES as well as the
      INFORMATION_SCHEMA views INNODB_SYS_TABLESPACES and INNODB_SYS_DATAFILES
      were introduced in MySQL 5.6 for no good reason in
      mysql/mysql-server/commit/e9255a22ef16d612a8076bc0b34002bc5a784627
      when the InnoDB support for the DATA DIRECTORY attribute was introduced.
      
      The file system should be the authoritative source of information on files.
      Storing information about file system paths in the file system (symlinks,
      or even the .isl files that were unfortunately chosen as the solution) is
      sufficient. If information is additionally stored in some hidden tables
      inside the InnoDB system tablespace, everything unnecessarily becomes
      more complicated, because more copies of data mean more opportunity
      for the copies to be out of sync, and because modifying the data in
      the system tablespace in the desired way might not be possible at all
      without modifying the InnoDB source code. So, the copy in the system
      tablespace basically is a redundant, non-authoritative source of
      information.
      
      We will stop creating or accessing the system tables SYS_TABLESPACES
      and SYS_DATAFILES.
      
      We will also remove the view
      INFORMATION_SCHEMA.INNODB_SYS_DATAFILES along with SYS_DATAFILES.
      
      The view
      INFORMATION_SCHEMA.INNODB_SYS_TABLESPACES will be repurposed
      to directly reflect fil_system.space_list. The column
      PAGE_SIZE, which would always contain the value of
      the GLOBAL read-only variable innodb_page_size, is
      removed. The column ZIP_PAGE_SIZE, which would actually
      contain the physical page size of a page, is renamed to
      PAGE_SIZE. Finally, a new column FILENAME is added, as a
      replacement of SYS_DATAFILES.PATH.
      
      This will also
      address MDEV-21801 (files that were created before upgrading
      to MySQL 5.6 or MariaDB 10.0 or later were never registered
      in SYS_TABLESPACES or SYS_DATAFILES) and
      MDEV-21801 (information about the system tablespace is not stored
      in SYS_TABLESPACES or SYS_DATAFILES).
      5407117a
    • Marko Mäkelä's avatar
      MDEV-23497 Make ROW_FORMAT=COMPRESSED read-only by default · 9bc874a5
      Marko Mäkelä authored
      Let us introduce the parameter innodb_read_only_compressed
      that is ON by default, making any ROW_FORMAT=COMPRESSED tables
      read-only.
      
      I developed the ROW_FORMAT=COMPRESSED format based on
      Heikki Tuuri's rough design between 2005 and 2008. It might
      have been a good idea back then, but no proper benchmarks were
      ever run to validate the design or the implementation.
      
      The format has been more or less obsolete for years.
      It limits innodb_page_size to 16384 bytes (the default),
      and instant ALTER TABLE is not supported.
      
      This is the first step towards deprecating and removing
      write support for ROW_FORMAT=COMPRESSED tables.
      9bc874a5
    • Marko Mäkelä's avatar
      MDEV-24190 Accessing INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION may... · e9b3d44c
      Marko Mäkelä authored
      MDEV-24190 Accessing INFORMATION_SCHEMA.INNODB_TABLESPACES_ENCRYPTION may break innodb_open_files logic
      
      If the function i_s_tablespaces_encryption_fill_table() was not able to
      report all content to the SQL layer, it would fail to decrement
      fil_system.freeze_space_list that it had incremented. This would
      prevent the not-frequently-used logic from working, potentially causing
      frequently used files to be closed and reopened whenever innodb_open_files
      is exceeded.
      
      This regression was caused by
      commit 45ed9dd9 (part of MDEV-23855).
      e9b3d44c
  3. 10 Nov, 2020 3 commits
  4. 09 Nov, 2020 6 commits
    • Marko Mäkelä's avatar
      MDEV-24096 InnoDB assertion 'first_free <= srv_page_size - 8' · a0536d42
      Marko Mäkelä authored
      MDEV-23672 (commit 7eda5561)
      introduced a regression that can corrupt not only undo log pages,
      but anything that resides in the InnoDB buffer pool.
      
      trx_undo_left(): Add debug assertions for the assumptions.
      If the pointer is out of bounds, we will return a positive
      number, not a negative one. Thus, once a page overflow occurs,
      further overflow to adjacent pages will be allowed.
      This allows us to remove some more relaxed debug assertions
      from some callers.
      
      trx_undo_log_v_idx(): Correctly calculate the size limit.
      a0536d42
    • Sergei Golubchik's avatar
      Merge branch '10.2' into 10.3 · 212d92ad
      Sergei Golubchik authored
      212d92ad
    • Igor Babaev's avatar
      MDEV-23811: With large number of indexes optimizer chooses an inefficient plan · bea84aef
      Igor Babaev authored
      This bug could manifest itself for a query with WHERE condition containing
      top level OR formula such that each conjunct contained a single-range
      condition supported by the same index. One of these range conditions must
      be fully covered by another range condition that is used later in the OR
      formula. Additionally at least one of these condition should be ANDed with
      a sargable range condition supported by a different index.
      
      There were several attempts to fix related problems for OR conditions after
      the backport of range optimizer code from MySQL (commit
      0e19f3e3). Unfortunately the first of these
      fixes contained typo remained unnoticed until recently. This typo bug led
      to rejection of valid range accesses. This patch fixed this typo bug.
      The fix revealed another two bugs: one in a constructor for SEL_ARG,
      the other in the function tree_or(). Both are fixed in this patch.
      bea84aef
    • Monty's avatar
      Fixed failing maria.create test · 10b2d572
      Monty authored
      This comes from a wrong merge from 10.3
      10b2d572
    • Sergei Petrunia's avatar
      MDEV-24117: Memory management problem ...: Add a testcase · 1404f3be
      Sergei Petrunia authored
      Add a testcase.
      1404f3be
    • Sergei Petrunia's avatar
      MDEV-24117: Memory management problem in statistics state for ... IN · f81eef62
      Sergei Petrunia authored
      Part#1: Revert the patch that caused it:
      
      commit 291be494
      Author: Igor Babaev <igor@askmonty.org>
      Date:   Thu Sep 24 22:02:00 2020 -0700
      
          MDEV-23811: With large number of indexes optimizer chooses an inefficient plan
      f81eef62
  5. 05 Nov, 2020 3 commits
  6. 04 Nov, 2020 2 commits
    • Marko Mäkelä's avatar
      MDEV-24109 InnoDB hangs with innodb_flush_sync=OFF · 4cbfdeca
      Marko Mäkelä authored
      MDEV-23855 broke the handling of innodb_flush_sync=OFF.
      That parameter is supposed to limit the page write rate
      in case the log capacity is being exceeded and log checkpoints
      are needed.
      
      With this fix, the following should pass:
      ./mtr --mysqld=--loose-innodb-flush-sync=0
      
      One of our best regression tests for page flushing is
      encryption.innochecksum. With innodb_page_size=16k and
      innodb_flush_sync=OFF it would likely hang without this fix.
      
      log_sys.last_checkpoint_lsn: Declare as Atomic_relaxed<lsn_t>
      so that we are allowed to read the value while not holding
      log_sys.mutex.
      
      buf_flush_wait_flushed(): Let the page cleaner perform the flushing
      also if innodb_flush_sync=OFF. After the page cleaner has
      completed, perform a checkpoint if it is needed, because
      buf_flush_sync_for_checkpoint() will not be run if
      innodb_flush_sync=OFF.
      
      buf_flush_ahead(): Simplify the condition. We do not really care
      whether buf_flush_page_cleaner() is running.
      
      buf_flush_page_cleaner(): Evaluate innodb_flush_sync at the low
      level. If innodb_flush_sync=OFF, rate-limit the batches to
      innodb_io_capacity_max pages per second.
      
      Reviewed by: Vladislav Vaintroub
      4cbfdeca
    • Dmitry Shulga's avatar
      7b20aa57
  7. 03 Nov, 2020 10 commits
  8. 02 Nov, 2020 7 commits