1. 22 Sep, 2020 10 commits
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 55e48b77
      Marko Mäkelä authored
      55e48b77
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · fde3d895
      Marko Mäkelä authored
      fde3d895
    • Marko Mäkelä's avatar
      MDEV-22939: Restore an AUTO_INCREMENT check · 78efa109
      Marko Mäkelä authored
      It turns out that we must check for DISCARD TABLESPACE both
      when the table is being rebuilt and when the AUTO_INCREMENT
      value of the table is being added.
      
      This was caught by the test innodb.alter_missing_tablespace.
      Somehow I failed to run all tests. Sorry!
      78efa109
    • Marko Mäkelä's avatar
      MDEV-22939 Server crashes in row_make_new_pathname() · 3eb81136
      Marko Mäkelä authored
      The statement ALTER TABLE...DISCARD TABLESPACE is problematic,
      because its designed purpose is to break the referential integrity
      of the data dictionary and make a table point to nowhere.
      
      ha_innobase::commit_inplace_alter_table(): Check whether the
      table has been discarded. (This is a bit late to check it, right
      before committing the change.) Previously, we performed this check
      only in a specific branch of the function commit_set_autoinc().
      
      Note: We intentionally allow non-rebuilding ALTER TABLE even if
      the tablespace has been discarded, to remain compatible with MySQL.
      (See the various tests with "wl5522" in the name, such as
      innodb.innodb-wl5522.)
      
      The test case would crash starting with 10.3 only, but it does not hurt
      to minimize the code and test difference between 10.2 and 10.3.
      3eb81136
    • Marko Mäkelä's avatar
      Make DISCARD TABLESPACE more robust · e5e83daf
      Marko Mäkelä authored
      dict_load_table_low(): Copy the 'discarded' flag to file_unreadable.
      This allows to avoid a potentially harmful call to dict_stats_init()
      in ha_innobase::open().
      e5e83daf
    • Marko Mäkelä's avatar
      MDEV-23776: Re-apply the fix and make the test more robust · 2af8f712
      Marko Mäkelä authored
      The test that was added in commit e05650e6
      would break a subsequent run of a test encryption.innodb-bad-key-change
      because some pages in the system tablespace would be encrypted with
      a different key.
      
      The failure was repeatable with the following invocation:
      
      ./mtr --no-reorder \
      encryption.create_or_replace,cbc \
      encryption.innodb-bad-key-change,cbc
      
      Because the crash was unrelated to the code changes that we reverted
      in commit eb38b1f7
      we can safely re-apply those fixes.
      2af8f712
    • Jan Lindström's avatar
      98f03e5a
    • Jan Lindström's avatar
      MDEV-21170 : Galera test failure on galera_sr.GCF-1043[A|B] · 98ac2d42
      Jan Lindström authored
      Add error printout when mysql.wsrep_streaming_log lock
      fails. However, tests are very undeterministic and not
      suitable for mtr environment. Thus, they are removed.
      98ac2d42
    • Marko Mäkelä's avatar
      MDEV-23705 Assertion 'table->data_dir_path || !space' · 732cd7fd
      Marko Mäkelä authored
      After DISCARD TABLESPACE, the tablespace of a table will no longer
      exist, and dict_get_and_save_data_dir_path() would invoke
      dict_get_first_path() to read an entry from SYS_DATAFILES.
      For some reason, DISCARD TABLESPACE would not to remove the entry
      from there.
      
      dict_get_and_save_data_dir_path(): If the tablespace has been
      discarded, do not bother trying to read the name.
      
      Side note: The tables SYS_TABLESPACES and SYS_DATAFILES are
      redundant and subject to removal in MDEV-22343.
      732cd7fd
    • Marko Mäkelä's avatar
      Revert "MDEV-23776 Test encryption.create_or_replace fails with a warning" · eb38b1f7
      Marko Mäkelä authored
      This reverts commit e33f7b6f.
      The change seems to have introduced intermittent failures of the test
      encryption.innodb-bad-key-change on many platforms.
      
      The failure that we were trying to address was not reproduced on 10.2.
      It could be related to commit a7dd7c89
      (MDEV-23651) or de942c9f (MDEV-15983)
      or other changes that reduced contention on fil_system.mutex in 10.3.
      
      The fix that we are hereby reverting from 10.2 seems to work fine
      on 10.3 and 10.4.
      eb38b1f7
  2. 21 Sep, 2020 13 commits
  3. 18 Sep, 2020 2 commits
  4. 17 Sep, 2020 4 commits
  5. 16 Sep, 2020 1 commit
  6. 14 Sep, 2020 5 commits
  7. 11 Sep, 2020 3 commits
  8. 10 Sep, 2020 2 commits
    • Jan Lindström's avatar
      MDEV-23709 : Galera test failure on galera_fk_cascade_delete_debug · 8993e40d
      Jan Lindström authored
      Add wait_condition so that inserts to parent and child are replicated
      and applied before we set debug sync point.
      8993e40d
    • Jan Lindström's avatar
      MDEV-23101 : SIGSEGV in lock_rec_unlock() when Galera is enabled · 224c9504
      Jan Lindström authored
      Remove incorrect BF (brute force) handling from lock_rec_has_to_wait_in_queue
      and move condition to correct callers. Add a function to report
      BF lock waits and assert if incorrect BF-BF lock wait happens.
      
      wsrep_report_bf_lock_wait
      	Add a new function to report BF lock wait.
      
      wsrep_assert_no_bf_bf_wait
      	Add a new function to check do we have a
      	BF-BF wait and if we have report this case
      	and assert as it is a bug.
      
      lock_rec_has_to_wait
      	Use new wsrep_assert_bf_wait to check BF-BF wait.
      
      lock_rec_create_low
      lock_table_create
      	Use new function to report BF lock waits.
      
      lock_rec_insert_by_trx_age
      lock_grant_and_move_on_page
      lock_grant_and_move_on_rec
      	Assert that trx is not Galera as VATS is not compatible
      	with Galera.
      
      lock_rec_add_to_queue
      	If there is conflicting lock in a queue make sure that
      	transaction is BF.
      
      lock_rec_has_to_wait_in_queue
      	Remove incorrect BF handling. If there is conflicting
      	locks in a queue all transactions must wait.
      
      lock_rec_dequeue_from_page
      lock_rec_unlock
      	If there is conflicting lock make sure it is not
      	BF-BF case.
      
      lock_rec_queue_validate
      	Add Galera record locking rules comment and use
      	new function to report BF lock waits.
      
      All attempts to reproduce the original assertion have been
      failed. Therefore, there is no test case on this commit.
      224c9504