1. 20 Feb, 2017 3 commits
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 3c47ed48
      Marko Mäkelä authored
      3c47ed48
    • Marko Mäkelä's avatar
      MDEV-11802 innodb.innodb_bug14676111 fails · 13493078
      Marko Mäkelä authored
      The function trx_purge_stop() was calling os_event_reset(purge_sys->event)
      before calling rw_lock_x_lock(&purge_sys->latch). The os_event_set()
      call in srv_purge_coordinator_suspend() is protected by that X-latch.
      
      It would seem a good idea to consistently protect both os_event_set()
      and os_event_reset() calls with a common mutex or rw-lock in those
      cases where os_event_set() and os_event_reset() are used
      like condition variables, tied to changes of shared state.
      
      For each os_event_t, we try to document the mutex or rw-lock that is
      being used. For some events, frequent calls to os_event_set() seem to
      try to avoid hangs. Some events are never waited for infinitely, only
      timed waits, and os_event_set() is used for early termination of these
      waits.
      
      os_aio_simulated_put_read_threads_to_sleep(): Define as a null macro
      on other systems than Windows. TODO: remove this altogether and disable
      innodb_use_native_aio on Windows.
      
      os_aio_segment_wait_events[]: Initialize only if innodb_use_native_aio=0.
      13493078
    • Marko Mäkelä's avatar
      Revert the MDEV-4396 tweak to innodb.innodb_bug14676111. · 72994d64
      Marko Mäkelä authored
      MDEV-11802 aims to fix the root cause instead.
      72994d64
  2. 19 Feb, 2017 3 commits
    • Elena Stepanova's avatar
      MDEV-10631 rpl.rpl_mdev6386 failed in buildbot · 343ba585
      Elena Stepanova authored
      The failure happens due to a race condition between processing
      a row event (INSERT) and an automatically generated event
      DROP TEMPORARY TABLE. Even though DROP has a higher GTID, it can
      become visible in @@gtid_slave_pos before the row event with
      a lower GTID has been committed. Since the test makes the slave
      to synchronize with the master using GTID, the waiting stops
      as soon as GTID of the DROP TEMPORARY TABLE becomes visible,
      and if changes from the previous event haven't been applied yet,
      the error occurs.
      
      According to Kristian (see the comment to MDEV-10631), the real
      problem is that DROP TEMPORARY TABLE is logged in the row mode
      at all. For this particular test, since DROP does not do anything,
      nothing prevents it from competing with the prior transaction.
      
      The workaround for the test is to add a meaningful event
      after DROP TEMPORARY TABLE, so that the slave would wait on its
      GTID instead of the one from DROP.
      
      Additionally (unrelated to this problem) removed FLUSH TABLES,
      which, as the comment stated, should have been removed after
      MDEV-6403 was fixed.
      343ba585
    • Elena Stepanova's avatar
      MDEV-11766 Tests failed in buildbot with semaphore waiting warnings · 72a822f2
      Elena Stepanova authored
      The standalone warning is not a sign of a problem, just of slowness,
      so it should be added to global suppressions. If a real problem
      happens, there will be other errors
      72a822f2
    • Daniel Black's avatar
      MDEV-11619: mtr --mem and $MTR_MEM support in sane and consistent manner (10.0) (#289) · 5e42c958
      Daniel Black authored
      * Revert "Make --mem a pure flag. If there is need to specifically set the location"
      
      This reverts commit 716621db.
      
      * MDEV-11619: mtr: when --mem is pure flag, conflicts with $MTR_MEM
      
      Conflicts occurs when MTR_MEM=/xxx/yy ./mtr --mem is invoked. Here
      the --mem option overrides opt_mem leaving the default path to be chosen.
      
      This change makes when MTR_MEM set, opt_mem, the flag, is also
      set. Both the environment and flag can no be set without conflicting.
      Signed-off-by: default avatarDaniel Black <daniel.black@au.ibm.com>
      
      * MDEV-11619: if opt_mem is a path include it first
      
      * MDEV-11619: MTR_MEM locations - don't follow symlinks
      
      From Bjorn Munch it seems symlinks can confuse some
      tests. Lets just avoid those.
      
      (ref: https://github.com/mysql/mysql-server/pull/116#issuecomment-268479774)
      Signed-off-by: default avatarDaniel Black <daniel.black@au.ibm.com>
      5e42c958
  3. 17 Feb, 2017 1 commit
  4. 16 Feb, 2017 2 commits
  5. 13 Feb, 2017 1 commit
  6. 10 Feb, 2017 3 commits
  7. 09 Feb, 2017 5 commits
  8. 08 Feb, 2017 7 commits
  9. 07 Feb, 2017 2 commits
  10. 06 Feb, 2017 2 commits
    • Jan Lindström's avatar
      MDEV-11707: Fix incorrect memset() for structures containing · e53dfb24
      Jan Lindström authored
      dynamic class GenericPolicy<TTASEventMutex<GenericPolicy> >'; vtable
      
      Instead using mem_heap_alloc and memset, use mem_heap_zalloc
      directly.
      e53dfb24
    • Jan Lindström's avatar
      MDEV-11759: Encryption code in MariaDB 10.1/10.2 causes · ddf2fac7
      Jan Lindström authored
      compatibility problems
      
      Pages that are encrypted contain post encryption checksum on
      different location that normal checksum fields. Therefore,
      we should before decryption check this checksum to avoid
      unencrypting corrupted pages. After decryption we can use
      traditional checksum check to detect if page is corrupted
      or unencryption was done using incorrect key.
      
      Pages that are page compressed do not contain any checksum,
      here we need to fist unencrypt, decompress and finally
      use tradional checksum check to detect page corruption
      or that we used incorrect key in unencryption.
      
      buf0buf.cc: buf_page_is_corrupted() mofified so that
      compressed pages are skipped.
      
      buf0buf.h, buf_block_init(), buf_page_init_low():
      removed unnecessary page_encrypted, page_compressed,
      stored_checksum, valculated_checksum fields from
      buf_page_t
      
      buf_page_get_gen(): use new buf_page_check_corrupt() function
      to detect corrupted pages.
      
      buf_page_check_corrupt(): If page was not yet decrypted
      check if post encryption checksum still matches.
      If page is not anymore encrypted, use buf_page_is_corrupted()
      traditional checksum method.
      
      If page is detected as corrupted and it is not encrypted
      we print corruption message to error log.
      If page is still encrypted or it was encrypted and now
      corrupted, we will print message that page is
      encrypted to error log.
      
      buf_page_io_complete(): use new buf_page_check_corrupt()
      function to detect corrupted pages.
      
      buf_page_decrypt_after_read(): Verify post encryption
      checksum before tring to decrypt.
      
      fil0crypt.cc: fil_encrypt_buf() verify post encryption
      checksum and ind fil_space_decrypt() return true
      if we really decrypted the page.
      
      fil_space_verify_crypt_checksum(): rewrite to use
      the method used when calculating post encryption
      checksum. We also check if post encryption checksum
      matches that traditional checksum check does not
      match.
      
      fil0fil.ic: Add missed page type encrypted and page
      compressed to fil_get_page_type_name()
      
      Note that this change does not yet fix innochecksum tool,
      that will be done in separate MDEV.
      
      Fix test failures caused by buf page corruption injection.
      ddf2fac7
  11. 05 Feb, 2017 1 commit
    • Marko Mäkelä's avatar
      Rewrite the innodb.log_file_size test with DBUG_EXECUTE_IF. · f1627045
      Marko Mäkelä authored
      Remove the debug parameter innodb_force_recovery_crash that was
      introduced into MySQL 5.6 by me in WL#6494 which allowed InnoDB
      to resize the redo log on startup.
      
      Let innodb.log_file_size actually start up the server, but ensure
      that the InnoDB storage engine refuses to start up in each of the
      scenarios.
      f1627045
  12. 04 Feb, 2017 2 commits
    • Marko Mäkelä's avatar
      MDEV-11985 Make innodb_read_only shutdown more robust · 20e83474
      Marko Mäkelä authored
      If InnoDB is started in innodb_read_only mode such that
      recovered incomplete transactions exist at startup
      (but the redo logs are clean), an assertion will fail at shutdown,
      because there would exist some non-prepared transactions.
      
      logs_empty_and_mark_files_at_shutdown(): Do not wait for incomplete
      transactions to finish if innodb_read_only or innodb_force_recovery>=3.
      Wait for purge to finish in only one place.
      
      trx_sys_close(): Relax the assertion that would fail first.
      
      trx_free_prepared(): Also free recovered TRX_STATE_ACTIVE transactions
      if innodb_read_only or innodb_force_recovery>=3.
      20e83474
    • Marko Mäkelä's avatar
      MDEV-11947 InnoDB purge workers fail to shut down · 9f0dbb31
      Marko Mäkelä authored
      srv_release_threads(): Actually wait for the threads to resume
      from suspension. On CentOS 5 and possibly other platforms,
      os_event_set() may be lost.
      
      srv_resume_thread(): A counterpart of srv_suspend_thread().
      Optionally wait for the event to be set, optionally with a timeout,
      and then release the thread from suspension.
      
      srv_free_slot(): Unconditionally suspend the thread. It is always
      in resumed state when this function is entered.
      
      srv_active_wake_master_thread_low(): Only call os_event_set().
      
      srv_purge_coordinator_suspend(): Use srv_resume_thread() instead
      of the complicated logic.
      9f0dbb31
  13. 03 Feb, 2017 1 commit
  14. 01 Feb, 2017 4 commits
  15. 31 Jan, 2017 3 commits