1. 13 Jun, 2019 2 commits
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-19435 buf_fix_count > 0 for corrupted page when it exits the LRU list · e9145aab
      Thirunarayanan Balathandayuthapani authored
      Problem:
      =========
      One of the purge thread access the corrupted page and tries to remove from
      LRU list. In the mean time, other purge threads are waiting for same page
      in buf_wait_for_read(). Assertion(buf_fix_count == 0) fails for the
      purge thread which tries to remove the page from LRU list.
      
      Solution:
      ========
      - Set the page id as FIL_NULL to indicate the page is corrupted before
      removing the block from LRU list. Acquire hash lock for the particular
      page id and wait for the other threads to release buf_fix_count
      for the block.
      
      - Added the error check for btr_cur_open() in row_search_on_row_ref().
      e9145aab
    • Jan Lindström's avatar
      Galera test cleanup. · 371a8a66
      Jan Lindström authored
      371a8a66
  2. 12 Jun, 2019 11 commits
    • Marko Mäkelä's avatar
      Clean up the test innodb.innodb-64k-crash · 06be8cd3
      Marko Mäkelä authored
      Before killing the server, ensure that the incomplete state of
      the transaction will be made durable and will be applied and
      rolled back on recovery, so that each time, roughly the same
      amount of work will be done.
      
      Remove DML statements after the recovery, and execute
      CHECK TABLE instead.
      06be8cd3
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 1d31bed2
      Marko Mäkelä authored
      1d31bed2
    • Marko Mäkelä's avatar
      MDEV-16111 encryption.innodb_lotoftables failed in buildbot with wrong result · 56c60b2f
      Marko Mäkelä authored
      Remove the test, because it easily fails with a result difference.
      Analysis by Thirunarayanan Balathandayuthapani:
      
      By default, innodb_encrypt_tables=0.
      1) Test case creates 100 tables in innodb_encrypt_1.
      2) creates another 100 unencrypted tables (encryption=off) in innodb_encrypt_2
      3) creates another 100 encrypted tables (encryption=on) in innodb_encrypt_3
      4) enabling innodb_encrypt_tables=1 and checking that only
      100 encrypted tables exist. (already we have 100 in dictionary)
      5) opening all tables again (no idea why)
      6) After that, set innodb_encrypt_tables=0 and wait for 100 tables
      to be decrypted (already we have 100 unencrypted tables)
      7) dropping all databases
      
      Sporadic failure happens because after step 4, it could encrypt the
      normal table too, because innodb_encryption_threads=4.
      
      This test was added in MDEV-9931, which was about InnoDB startup being
      slow due to all .ibd files being opened. There have been a number of
      later fixes to this problem. Currently the latest one is
      commit cad56fba, in which some tests
      (in particular the test innodb.alter_kill) could fail if all InnoDB
      .ibd files are read during startup. That could make this test redundant.
      
      Let us remove the test, because it is big, slow, unreliable, and
      does not seem to reliably catch the problem that all files are being
      read on InnoDB startup.
      56c60b2f
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 90fec960
      Marko Mäkelä authored
      90fec960
    • Marko Mäkelä's avatar
      MDEV-19740: Remove some broken InnoDB systemd code · 94e66559
      Marko Mäkelä authored
      GCC 9.1.1 noticed that sd_notifyf() was always being invoked with
      str=NULL argument for "%s". This code was added in
      commit 2e814d47
      but not mentioned in the commit comment.
      
      The STATUS messages for systemd matter during startup and shutdown,
      and should not be emitted during normal operation.
      
      ib_senderrf(): Remove the potentially harmful sd_notifyf() calls.
      94e66559
    • sjaakola's avatar
      MDEV-19563 Removed references to deprecated option innodb_locks_unsafe_for_binlog · efc3cb93
      sjaakola authored
      innodb_locks_unsafe_for_binlog variabe removed from wsrep_info test configuration and
      recommendation to use this variable in README-wsrep was removed as well
      
      Also relates to issue: MDEV-19544
      efc3cb93
    • Sergey Vojtovich's avatar
      MDEV-16467 - MariaDB crashes because of "long semaphore wait"after migrating from 10.1 to 10.3 · 9d886de4
      Sergey Vojtovich authored
      This patch fixes 10.2 issue reported in MDEV-16467 by partial backport of
      c2118a08. Specifically "Remove not needed LOCK_thread_count from
      thd_get_error_context_description()".
      9d886de4
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 4bbd8be4
      Marko Mäkelä authored
      4bbd8be4
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-16866 InnoDB fails to start upon crash recovery with "[ERROR] InnoDB:... · b2f76bac
      Thirunarayanan Balathandayuthapani authored
      MDEV-16866 InnoDB fails to start upon crash recovery with "[ERROR] InnoDB: Redo log crypto: failed to decrypt log block"
      
      - Post-push fix to change the copyright of both xtradb and innodb file.
      b2f76bac
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-16866 InnoDB fails to start upon crash recovery with "[ERROR] InnoDB:... · c5fe1b8f
      Thirunarayanan Balathandayuthapani authored
      MDEV-16866 InnoDB fails to start upon crash recovery with "[ERROR] InnoDB: Redo log crypto: failed to decrypt log block"
      
      - If InnoDB encounters garbage or incomplete written log block during
      recovery then don't throw the error. Treat it as end of the log.
      - This kind of incomplete or empty block can be result of killing
      InnoDB when writing the redo log.
      c5fe1b8f
    • Jan Lindström's avatar
      MDEV-19736: Galera test failure on · 34b38ad7
      Jan Lindström authored
      Remove unneeded select to provider name. Provider can have different
      names and can be located on different directory on different
      environments.
      34b38ad7
  3. 10 Jun, 2019 1 commit
    • Marko Mäkelä's avatar
      MDEV-19725 Incorrect error handling in ALTER TABLE · cbac8f93
      Marko Mäkelä authored
      Some I/O functions and macros that are declared in os0file.h used to
      return a Boolean status code (nonzero on success). In MySQL 5.7, they
      were changed to return dberr_t instead. Alas, in MariaDB Server 10.2,
      some uses of functions were not adjusted to the changed return value.
      
      Until MDEV-19231, the valid values of dberr_t were always nonzero.
      This means that some code that was incorrectly checking for a zero
      return value from the functions would never detect a failure.
      
      After MDEV-19231, some tests for ALTER ONLINE TABLE would fail with
      cmake -DPLUGIN_PERFSCHEMA=NO. It turned out that the wrappers
      pfs_os_file_read_no_error_handling_int_fd_func() and
      pfs_os_file_write_int_fd_func() were wrongly returning
      bool instead of dberr_t. Also the callers of these functions were
      wrongly expecting bool (nonzero on success) instead of dberr_t.
      
      This mistake had been made when the addition of these functions was
      merged from MySQL 5.6.36 and 5.7.18 into MariaDB Server 10.2.7.
      
      This fix also reverts commit 40becbc3
      which attempted to work around the problem.
      cbac8f93
  4. 07 Jun, 2019 2 commits
  5. 06 Jun, 2019 5 commits
  6. 05 Jun, 2019 3 commits
  7. 04 Jun, 2019 1 commit
    • Varun Gupta's avatar
      MDEV-18015: Assertion `global_status_var.global_memory_used == 0' failed when... · 7906bee6
      Varun Gupta authored
      MDEV-18015: Assertion `global_status_var.global_memory_used == 0' failed when using UDF , window functions and views
      
      Adding destructor for Group_bound_tracker to free Cached_item_str.
      The Cached_item for window functions are allocated on THD:mem_root
      but the Cached_item_str has value of type string which is allocated on
      the heap, so we need to call free() for it
      7906bee6
  8. 03 Jun, 2019 9 commits
  9. 31 May, 2019 3 commits
    • Alexander Barkov's avatar
      5a19908b
    • Vlad Lesin's avatar
      MDEV-18207: ASAN heap-use-after-free in _ma_get_status upon concurrent operations with sequence · c9b49a4b
      Vlad Lesin authored
      The issue is that two MARIA_HA instances shares the same MARIA_STATUS_INFO
      object during UNION execution, so the second MARIA_HA instance state pointer
      MARIA_HA::state points to the MARIA_HA::state_save of the first MARIA instance.
      
      This happens in
      thr_multi_lock(...) {
      ...
      	for (first_lock=data, pos= data+1 ; pos < end ; pos++)
      	{
      ...
      		if (pos[0]->lock == pos[-1]->lock && pos[0]->lock->copy_status)
      			(pos[0]->lock->copy_status)((*pos)->status_param,
      																	(*first_lock)->status_param);
      ...
      	}
      ...
      }
      
      Usually the state is restored from ha_maria::external_lock(...):
      
      \#0  _ma_update_status (param=0x6290000e6270) at ./storage/maria/ma_state.c:309
      \#1  0x00005555577ccb15 in _ma_update_status_with_lock (info=0x6290000e6270) at ./storage/maria/ma_state.c:361
      \#2  0x00005555577c7dcc in maria_lock_database (info=0x6290000e6270, lock_type=2) at ./storage/maria/ma_locking.c:66
      \#3  0x0000555557802ccd in ha_maria::external_lock (this=0x61d0001b1308, thd=0x62a000048270, lock_type=2) at ./storage/maria/ha_maria.cc:2727
      
      But _ma_update_status() does not take into account the case when
      MARIA_HA::status points to the MARIA_HA::state_save of the other MARIA_HA
      instance.
      
      The fix is to restore MARIA_HA::state in ha_maria::external_lock() after
      maria_lock_database() call for transactional tables.
      c9b49a4b
    • Marko Mäkelä's avatar
      Define page_id_t in buf0types.h · 9d142a89
      Marko Mäkelä authored
      9d142a89
  10. 30 May, 2019 3 commits