1. 25 Jul, 2019 1 commit
  2. 24 Jul, 2019 2 commits
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-19870 gcol.innodb_virtual_debug_purge doesn't fail if... · 8fb39b2c
      Thirunarayanan Balathandayuthapani authored
      MDEV-19870 gcol.innodb_virtual_debug_purge doesn't fail if row_vers_old_has_index_entry gives wrong result
      
      1) Whenever purge thread tries to remove the secondary virtual index
      entry, purge thread acquires metadata lock for the table and release
      dict_operation_lock. After that, it retries the secondary index
      deletion if MDL acquired successfully.
      
      2) Inside row_vers_old_has_index_entry(), Change the safe_to_purge
      to unsafe_to_purge goto statement. So it can be more appropriate to
      return true if it is unsafe_to_purge.
      
      3) Previously, row_vers_old_has_index_entry() returns false if InnoDB
      fetched the MDL on the table for the first time. This check(two cases)
      should checked only during purge thread. In row_purge_poss_sec(), again
      InnoDB checks whether the MDL fetched for the first time. If it is then
      InnoDB retry the secondary index deletion logic. So in that case,
      InnoDB have to clean up the memory used inside row_vers_old_has_index_entry()
      and shouldn't care about return value.
      8fb39b2c
    • Elena Stepanova's avatar
      c22305f0
  3. 23 Jul, 2019 7 commits
  4. 22 Jul, 2019 6 commits
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 60c790d6
      Marko Mäkelä authored
      60c790d6
    • Marko Mäkelä's avatar
      MDEV-20102 Phantom InnoDB table remains after interrupted CREATE...SELECT · a5e268a2
      Marko Mäkelä authored
      This is a regression due to MDEV-16515 that affects some versions in
      the MariaDB 10.1 server series starting with 10.1.35, and possibly
      all versions starting with 10.2.17, 10.3.8, and 10.4.0.
      
      The idea of MDEV-16515 is to allow DROP TABLE to be interrupted,
      in case it was stuck due to some concurrent activity. We already
      made some cases of internal DROP TABLE immune to kill in MDEV-18237,
      MDEV-16647, MDEV-17470. We must include the cleanup of
      CREATE TABLE...SELECT in the list of such internal DROP TABLE.
      
      ha_innobase::delete_table(): Pass create_failed=true if the current
      SQL statement is CREATE, so that the table will be dropped.
      
      row_drop_table_for_mysql(): If create_failed=true, do not allow
      the operation to be interrupted.
      a5e268a2
    • Nikita Malyavin's avatar
      MDEV-17005 ASAN heap-use-after-free in innobase_get_computed_value · 12614af1
      Nikita Malyavin authored
      This is the race between DELETE and INSERT (or other any two operations accessing to the table).
      What should happen in good case:
      1. ALTER TABLE is issued. vc_templ->default_rec is initialized with temporary share's default_fields
      2. temporary share is freed, but datadict is still there, with garbage in vc_templ->default_rec
      3. DELETE is issued. It is first after ALTER TABLE finished.
      4. ha_innobase::open() is called, ib_table->get_ref_count() should be one
      5. we reinitialize vc_templ, so no garbage anymore
      
      What actually happens:
      3. DELETE is issued.
      4. ha_innobase::open() is called and ib_table->get_ref_count() is 1
      5. INSERT (or SELECT etc.) is issued in parallel
      6. ha_innobase::open() is called and ib_table->get_ref_count() is 1
      7. we check ib_table->get_ref_count()  and it is 2 in both threads when we want reinitialize vc_templ
      8. garbage is there
      
      Fix:
      * Do not store pointers to SHARE memory in table dict, copy it instead.
      * But then we don't need to refresh it each time when refcount=1.
      12614af1
    • Nikita Malyavin's avatar
    • Julius Goryavsky's avatar
      The test for the wsrep_info plugin needs the same flexible wsrep version... · f27a0043
      Julius Goryavsky authored
      The test for the wsrep_info plugin needs the same flexible wsrep version checking as the tests for Galera (continuation of MDEV-18565 task)
      f27a0043
  5. 21 Jul, 2019 1 commit
  6. 20 Jul, 2019 1 commit
  7. 19 Jul, 2019 7 commits
  8. 18 Jul, 2019 12 commits
  9. 17 Jul, 2019 1 commit
    • Julius Goryavsky's avatar
      MDEV-18565: Galera mtr-suite fails if galera library is not installed · 4e02e502
      Julius Goryavsky authored
      Currently, running mtr with an incorrect (for example, new or
      obsolete) version of wsrep_provider (for example, with the 26
      version of libgalera_smm.so) leads to the failure of tests in
      several suites with vague error diagnostics.
      
      As for the galera_3nodes suite, the mtr also does not effectively
      check all the prerequisites after merge with MDEV-18426 fixes.
      For example, tests that using mariabackup do not check for presence
      of ss and socat/nc. This is due to improper handling of relative
      paths in mtr scripts.
      
      In addition, some tests in different suites can be run without
      setting the environment variables such as MTR_GALERA_TFMT, XBSTREAM,
      and so on.
      
      To eliminate all these issues, this patch makes the following changes:
      
      1. Added auxiliary wsrep_mtr_check utility (which located in the
      mysql-test/lib/My/SafeProcess subdirectory), which compares the
      versions of the wsrep API that used by the server and by the wsrep
      provider library, and it does this comparison safely, without
      accessing the API if the versions do not match.
      
      2. All checks related to the presence of mariabackup and utilities
      that necessary for its operation transferred from the local directories
      of different mtr suites (from the suite.pm files) to the main suite.pm
      file. This not only reduces the amount of code and eliminates duplication
      of identical code fragments, but also avoids problems due to the inability
      of mtr to consider relative paths to include files when checking skip
      combinations.
      
      3. Setting the values of auxiliary environment variables that
      are necessary for Galera, SST scripts and mariabackup (to work
      properly) is moved to the main mysql-test-run.pl script, so as
      not to duplicate this code in different suites, and to avoid
      partial corrections of the same errors for different suites
      (while other suites remain uncorrected).
      
      4. Fixed duplication of the have_file_key_management.inc and
      have_filekeymanagement.inc files between different suites,
      these checks are also transferred to the top level.
      
      5. Added garbd presence check and garbd path variable.
      
      https://jira.mariadb.org/browse/MDEV-18565
      4e02e502
  10. 16 Jul, 2019 2 commits