1. 18 May, 2017 1 commit
    • Jan Lindström's avatar
      MDEV-12593: InnoDB page compression should use lz4_compress_default if · f302a3cf
      Jan Lindström authored
      available
      
      lz4.cmake: Check if shared or static lz4 library has LZ4_compress_default
      function and if it has define HAVE_LZ4_COMPRESS_DEFAULT.
      
      fil_compress_page: If HAVE_LZ4_COMPRESS_DEFAULT is defined use
      LZ4_compress_default function for compression if not use
      LZ4_compress_limitedOutput function.
      
      Introduced a innodb-page-compression.inc file for page compression
      tests that will also search .ibd file to verify that pages
      are compressed (i.e. used search string is not found). Modified
      page compression tests to use this file.
      
      Note that snappy method is not included because of MDEV-12615
      InnoDB page compression method snappy mostly does not compress pages
      that will be fixed on different commit.
      f302a3cf
  2. 17 May, 2017 3 commits
  3. 12 May, 2017 2 commits
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · 03dca7a3
      Marko Mäkelä authored
      03dca7a3
    • Marko Mäkelä's avatar
      MDEV-12674 Innodb_row_lock_current_waits has overflow · ff166093
      Marko Mäkelä authored
      There is a race condition related to the variable
      srv_stats.n_lock_wait_current_count, which is only
      incremented and decremented by the function lock_wait_suspend_thread(),
      
      The incrementing is protected by lock_sys->wait_mutex, but the
      decrementing does not appear to be protected by anything.
      This mismatch could allow the counter to be corrupted when a
      transactional InnoDB table or record lock wait is terminating
      roughly at the same time with the start of a wait on a
      (possibly different) lock.
      
      ib_counter_t: Remove some unused methods. Prevent instantiation for N=1.
      Add an inc() method that takes a slot index as a parameter.
      
      single_indexer_t: Remove.
      
      simple_counter<typename Type, bool atomic=false>: A new counter wrapper.
      Optionally use atomic memory operations for modifying the counter.
      Aligned to the cache line size.
      
      lsn_ctr_1_t, ulint_ctr_1_t, int64_ctr_1_t: Define as simple_counter<Type>.
      These counters are either only incremented (and we do not care about
      losing some increment operations), or the increment/decrement operations
      are protected by some mutex.
      
      srv_stats_t::os_log_pending_writes: Document that the number is protected
      by log_sys->mutex.
      
      srv_stats_t::n_lock_wait_current_count: Use simple_counter<ulint, true>,
      that is, atomic inc() and dec() operations.
      
      lock_wait_suspend_thread(): Release the mutexes before incrementing
      the counters. Avoid acquiring the lock mutex if the lock wait has
      already been resolved. Atomically increment and decrement
      srv_stats.n_lock_wait_current_count.
      
      row_insert_for_mysql(), row_update_for_mysql(),
      row_update_cascade_for_mysql(): Use the inc() method with the trx->id
      as the slot index. This is a non-functional change, just using
      inc() instead of add(1).
      
      buf_LRU_get_free_block(): Replace the method add(index, n) with inc().
      There is no slot index in the simple_counter.
      ff166093
  4. 09 May, 2017 4 commits
  5. 08 May, 2017 5 commits
  6. 05 May, 2017 6 commits
  7. 03 May, 2017 1 commit
  8. 02 May, 2017 6 commits
  9. 30 Apr, 2017 3 commits
  10. 29 Apr, 2017 2 commits
  11. 28 Apr, 2017 2 commits
    • Sergei Golubchik's avatar
      Merge branch '10.0' 10.1 · e74f2e2b
      Sergei Golubchik authored
      e74f2e2b
    • Marko Mäkelä's avatar
      MDEV-12602 InnoDB: Failing assertion: space->n_pending_ops == 0 · b82c602d
      Marko Mäkelä authored
      This fixes a regression caused by MDEV-12428.
      When we introduced a variant of fil_space_acquire() that could
      increment space->n_pending_ops after space->stop_new_ops was set,
      the logic of fil_check_pending_operations() was broken.
      
      fil_space_t::n_pending_ios: A new field to track read or write
      access from the buffer pool routines immediately before a block
      write or after a block read in the file system.
      
      fil_space_acquire_for_io(), fil_space_release_for_io(): Similar
      to fil_space_acquire_silent() and fil_space_release(), but
      modify fil_space_t::n_pending_ios instead of fil_space_t::n_pending_ops.
      
      Adjust a number of places accordingly, and remove some redundant
      tablespace lookups.
      
      The following parts of this fix differ from the 10.2 version of this fix:
      
      buf_page_get_corrupt(): Add a tablespace parameter.
      
      In 10.2, we already had a two-phase process of freeing fil_space objects
      (first, fil_space_detach(), then release fil_system->mutex, and finally
      free the fil_space and fil_node objects).
      
      fil_space_free_and_mutex_exit(): Renamed from fil_space_free().
      Detach the tablespace from the fil_system cache, release the
      fil_system->mutex, and then wait for space->n_pending_ios to reach 0,
      to avoid accessing freed data in a concurrent thread.
      During the wait, future calls to fil_space_acquire_for_io() will
      not find this tablespace, and the count can only be decremented to 0,
      at which point it is safe to free the objects.
      
      fil_node_free_part1(), fil_node_free_part2(): Refactored from
      fil_node_free().
      b82c602d
  12. 27 Apr, 2017 5 commits