1. 03 Jun, 2020 6 commits
    • Alexander Barkov's avatar
      MDEV-22758 Assertion `!item->null_value' failed in Type_handler_inet6::make_sort_key_part · 839ad5e1
      Alexander Barkov authored
      When some expression of an INET6 data type involves conversion to INET6 from
      other data types, e.g. in:
      
      - CAST:
      
          SELECT CAST(non_inet6_expr AS INET6)
      
      - CASE and hybrid functions:
      
          SELECT CASE WHEN expr THEN inet6_expr ELSE non_inet6_expr END
      
      - UNION:
      
          SELECT inet6_expr UNION SELECT non_inet6_expr
      
      the result column must be fixed as NULL-able even if the non-inet6 expression itself
      is not NULL-able, because at the execution time the conversion can fail.
      
      Details:
      - Forcing NULL-ability if conversion from some data type to INET6 is involved
        (for non-constant or for expensive expressions).
      - Non-expensive constant expressions are tested for NULL-ability at fix_fields() time,
        so things like `CAST('::' AS INET6)` are still detected as NOT NULL.
      - Adding "bool warn" parameter into a few methods, to avoid redundant warnings
        at fix_fields() time when calculating NULL-ability of constant values.
      839ad5e1
    • Marko Mäkelä's avatar
      MDEV-22787 fts_optimize_shutdown() deletes timer prematurely · 5b18ade0
      Marko Mäkelä authored
      fts_optimize_shutdown(): Wait for fts_optimize_callback()
      to terminate before deleting the timer that it uses.
      5b18ade0
    • Marko Mäkelä's avatar
      MDEV-22710 Assertion ...status != buf_page_t::FREED in ibuf_remove_free_page() · 58d2d820
      Marko Mäkelä authored
      The buf_page_free() call that was introduced in MDEV-15528 was
      performed too early in fseg_free_page(), tripping a debug check
      in ibuf_remove_free_page(). In all other callers, we can (and will)
      invoke buf_page_free() right after fseg_free_page(), but in
      ibuf_remove_free_page() we will defer that call to the end of the
      mini-transaction. (That call was already present.)
      58d2d820
    • Daniel Black's avatar
      463a8fc5
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 701efbb2
      Marko Mäkelä authored
      701efbb2
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 80591481
      Marko Mäkelä authored
      80591481
  2. 02 Jun, 2020 7 commits
    • Marko Mäkelä's avatar
      MDEV-22773 Assertion page_get_page_no... in btr_pcur_store_position() · 95ac7902
      Marko Mäkelä authored
      btr_pcur_store_position(): Replace a too strict debug assertion.
      It is possible to have a clustered index B-tree for a logically
      empty table, which will consist of a node pointer from the root
      page to a leaf page that contains the metadata record.
      
      The too strict debug assertion was added in
      commit 0e5a4ac2 (MDEV-15562).
      95ac7902
    • Monty's avatar
      Added larger timeout to backup_stages.test · 457e3128
      Monty authored
      MDEV-21546 main.backup_stages occasionally fails with lock wait timeout
      457e3128
    • Varun Gupta's avatar
      MDEV-22509: Server crashes in Field_inet6::store_inet6_null_with_warn / Field::maybe_null · d5e8b4d7
      Varun Gupta authored
      For field with type INET, during EITS collection the min and max values are store in text
      representation in the statistical table.
      While retrieving the value from the statistical table, the value is stored back in the original
      field using binary form instead of text and this was resulting in the crash.
      
      Introduced 2 functions in the Field structure:
        1) store_to_statistical_minmax_field
        2) store_from_statistical_minmax_field
      d5e8b4d7
    • Marko Mäkelä's avatar
      MDEV-21546 main.backup_stages occasionally reports lock wait timeout · 6df2f2db
      Marko Mäkelä authored
      With MDEV-16678, InnoDB background tasks (most notably, the purge of
      committed transaction history) can acquire metadata locks.
      Because of this, the lock_wait_timeout=0 is too strict and must
      be relaxed.
      
      The test used to fail easily if an extra sleep was added to
      the end of dict_table_close(), before the MDL release. Now,
      with lock_wait_timeout=1, the test passes even with an extra
      0.1-second sleep added to dict_table_close().
      
      Thanks to Monty for providing this fix.
      6df2f2db
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 8300f639
      Marko Mäkelä authored
      8300f639
    • Marko Mäkelä's avatar
      MDEV-22770 trx_undo_report_rename() fails to release page latches · 804761a8
      Marko Mäkelä authored
      commit f74023b9 (MDEV-15090)
      inadvertently removed a mtr_t::commit() call from
      trx_undo_report_rename(), causing an InnoDB hang if
      we failed to log a RENAME operation.
      
      It is unclear whether this condition is possible in practice.
      The test case involved SET GLOBAL innodb_trx_rseg_n_slots_debug=1
      and a failed CREATE TABLE...SELECT, whose error handling would
      internally invoke RENAME in InnoDB.
      804761a8
    • Marko Mäkelä's avatar
      MDEV-22027 Assertion oldest_lsn >= log_sys.last_checkpoint_lsn failed · 0d6d63e1
      Marko Mäkelä authored
      log_buf_pool_get_oldest_modification(): Acquire
      log_sys_t::flush_order_mutex in order to prevent a race condition
      that was introduced in
      commit 1a6f708e (MDEV-15058).
      
      Before that change, log_buf_pool_get_oldest_modification()
      was protected by both log_sys.mutex and log_sys.flush_order_mutex
      like it was supposed to be ever since
      commit a52c4820 (MySQL 5.5.10).
      
      buf_pool_t::get_oldest_modification(): Replaces
      buf_pool_get_oldest_modification(), to emphasize that
      log_sys.flush_order_mutex must be acquired by the caller if needed.
      
      log_close(): Invoke log_buf_pool_get_oldest_modification()
      in order to ensure a clean shutdown.
      
      The scenario of the race condition is as follows:
      
      1. The buffer pool is clean (no writes are pending).
      2. mtr_add_dirtied_pages_to_flush_list() releases log_sys.mutex.
      3. log_buf_pool_get_oldest_modification() observes that the
      buffer pool is clean and returns log_sys.lsn.
      4. log_checkpoint() completes, writing a wrong checkpoint header
      according to which everything up to log_sys.lsn was clean.
      5. mtr_add_dirtied_pages_to_flush_list() completes the execution
      of mtr_memo_note_modifications(), releases the page latches and
      the flush_order_mutex.
      6. On a subsequent log_checkpoint(), the assertion could fail
      if the page modifications had not been flushed yet.
      
      The failing assertion (which is valid) was added in MySQL 5.7
      mysql/mysql-server@5c6c6ec69336369487dfc080a6980089b4e1a3c2
      and merged to MariaDB Server 10.2.2 in
      commit fec844ac.
      0d6d63e1
  3. 01 Jun, 2020 17 commits
  4. 31 May, 2020 3 commits
  5. 30 May, 2020 4 commits
  6. 29 May, 2020 3 commits
    • Monty's avatar
      Fixed wrong length in my_default.c · 043828bd
      Monty authored
      This couldn't cause any bugs as ptr was zero terminated, but still better
      to have the length correct.
      043828bd
    • Monty's avatar
      SHOW TABLE STATUS now shows if an Aria table is transactional or not · df4ab26a
      Monty authored
      This change also affects information_schema.tables
      
      The create table option "transactional=0 | 1" is now always shown for
      storage engines that supports both transactional/crash safe tables and
      non transactional tables.
      
      Before this patch the transactional=... option was only shown if the user
      specified transactional=... in the CREATE TABLE or ALTER TABLE statement.
      The reason for the change was to be able to make it easy to know if an Aria
      table is transactional or not.
      df4ab26a
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · e9aaa10c
      Marko Mäkelä authored
      e9aaa10c