An error occurred fetching the project authors.
  1. 09 Sep, 2020 2 commits
    • Marko Mäkelä's avatar
      MDEV-23456 fixup: Fix mtr_t::get_fix_count() · c26eae0c
      Marko Mäkelä authored
      Before commit 05fa4558 (MDEV-22110)
      we have slot->type == MTR_MEMO_MODIFY that are unrelated to
      incrementing the buffer-fix count.
      
      FindBlock::operator(): In debug builds, skip MTR_MEMO_MODIFY entries.
      
      Also, simplify the code a little.
      
      This fixes an infinite loop in the tests
      innodb.innodb_defragment and innodb.innodb_wl6326_big.
      c26eae0c
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-23456 fil_space_crypt_t::write_page0() is accessing an uninitialized page · b1009ae5
      Thirunarayanan Balathandayuthapani authored
      buf_page_create() is invoked when page is initialized. So that
      previous contents of the page ignored. In few cases, it calls
      buf_page_get_gen() is called to fetch the page from buffer pool.
      It should take x-latch on the page. If other thread uses the block
      or block io state is different from BUF_IO_NONE then release the
      mutex and check the state and buffer fix count again. For compressed
      page, use the existing free block from LRU list to create new page.
      Retry to fetch the compressed page if it is in flush list
      
      fseg_create(), fseg_create_general(): Introduce block as a parameter
      where segment header is placed. It is used to avoid repetitive
      x-latch on the same page
      
      Change the assert to check whether the page has SX latch and
      X latch in all callee function of buf_page_create()
      
      mtr_t::get_fix_count(): Get the buffer fix count of the given
      block added by the mtr
      
      FindBlock is added to find the buffer fix count of the given
      block acquired by the mini-transaction
      b1009ae5
  2. 20 Jul, 2020 1 commit
    • Marko Mäkelä's avatar
      MDEV-23190 InnoDB data file extension is not crash-safe · 57ec42bc
      Marko Mäkelä authored
      When InnoDB is extending a data file, it is updating the FSP_SIZE
      field in the first page of the data file.
      
      In commit 8451e090 (MDEV-11556)
      we removed a work-around for this bug and made recovery stricter,
      by making it track changes to FSP_SIZE via redo log records, and
      extend the data files before any changes are being applied to them.
      
      It turns out that the function fsp_fill_free_list() is not crash-safe
      with respect to this when it is initializing the change buffer bitmap
      page (page 1, or generally, N*innodb_page_size+1). It uses a separate
      mini-transaction that is committed (and will be written to the redo
      log file) before the mini-transaction that actually extended the data
      file. Hence, recovery can observe a reference to a page that is
      beyond the current end of the data file.
      
      fsp_fill_free_list(): Initialize the change buffer bitmap page in
      the same mini-transaction.
      
      The rest of the changes are fixing a bug that the use of the separate
      mini-transaction was attempting to work around. Namely, we must ensure
      that no other thread will access the change buffer bitmap page before
      our mini-transaction has been committed and all page latches have been
      released.
      
      That is, for read-ahead as well as neighbour flushing, we must avoid
      accessing pages that might not yet be durably part of the tablespace.
      
      fil_space_t::committed_size: The size of the tablespace
      as persisted by mtr_commit().
      
      fil_space_t::max_page_number_for_io(): Limit the highest page
      number for I/O batches to committed_size.
      
      MTR_MEMO_SPACE_X_LOCK: Replaces MTR_MEMO_X_LOCK for fil_space_t::latch.
      
      mtr_x_space_lock(): Replaces mtr_x_lock() for fil_space_t::latch.
      
      mtr_memo_slot_release_func(): When releasing MTR_MEMO_SPACE_X_LOCK,
      copy space->size to space->committed_size. In this way, read-ahead
      or flushing will never be invoked on pages that do not yet exist
      according to FSP_SIZE.
      57ec42bc
  3. 01 Jul, 2020 1 commit
    • Marko Mäkelä's avatar
      MDEV-20377: Make WITH_MSAN more usable · c36834c8
      Marko Mäkelä authored
      MemorySanitizer (clang -fsanitize=memory) requires that all code
      be compiled with instrumentation enabled. The only exception is the
      C runtime library. Failure to use instrumented libraries will cause
      bogus messages about memory being uninitialized.
      
      In WITH_MSAN builds, we must avoid calling getservbyname(),
      because even though it is a standard library function, it is
      not instrumented, not even in clang 10.
      
      Note: Before MariaDB Server 10.5, ./mtr will typically fail
      due to the old PCRE library, which was updated in MDEV-14024.
      
      The following cmake options were tested on 10.5
      in commit 94d0bb4d:
      
      cmake \
      -DCMAKE_C_FLAGS='-march=native -O2' \
      -DCMAKE_CXX_FLAGS='-stdlib=libc++ -march=native -O2' \
      -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug \
      -DWITH_INNODB_{BZIP2,LZ4,LZMA,LZO,SNAPPY}=OFF \
      -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,SPIDER}=NO \
      -DWITH_SAFEMALLOC=OFF \
      -DWITH_{ZLIB,SSL,PCRE}=bundled \
      -DHAVE_LIBAIO_H=0 \
      -DWITH_MSAN=ON
      
      MEM_MAKE_DEFINED(): An alias for VALGRIND_MAKE_MEM_DEFINED()
      and __msan_unpoison().
      
      MEM_GET_VBITS(), MEM_SET_VBITS(): Aliases for
      VALGRIND_GET_VBITS(), VALGRIND_SET_VBITS(), __msan_copy_shadow().
      
      InnoDB: Replace the UNIV_MEM_ macros with corresponding MEM_ macros.
      
      ut_crc32_8_hw(), ut_crc32_64_low_hw(): Use the compiler built-in
      functions instead of inline assembler when building WITH_MSAN.
      This will require at least -msse4.2 when building for IA-32 or AMD64.
      The inline assembler would not be instrumented, and would thus cause
      bogus failures.
      c36834c8
  4. 14 Nov, 2019 1 commit
    • Marko Mäkelä's avatar
      MDEV-12353 preparation: Replace mtr_x_lock() and friends · 3d4a8015
      Marko Mäkelä authored
      Apart from page latches (buf_block_t::lock), mini-transactions
      are keeping track of at most one dict_index_t::lock and
      fil_space_t::latch at a time, and in a rare case, purge_sys.latch.
      
      Let us introduce interfaces for acquiring an index latch
      or a tablespace latch.
      
      In a later version, we may want to introduce mtr_t members
      for holding a latched dict_index_t* and fil_space_t*,
      and replace the remaining use of mtr_t::m_memo
      with std::set<buf_block_t*> or with a map<buf_block_t*,byte*>
      pointing to log records.
      3d4a8015
  5. 13 Nov, 2019 1 commit
  6. 12 Nov, 2019 1 commit
    • Marko Mäkelä's avatar
      MDEV-12353 preparation: Clean up mtr_t · 2570cb8b
      Marko Mäkelä authored
      mtr_t::Impl, mtr_t::Command: Merge to mtr_t.
      
      MTR_MAGIC_N: Remove.
      
      MTR_STATE_COMMITTING: Remove. This state was only being set
      internally during mtr_t::commit().
      
      mtr_t::Command::m_locks_released: Remove (set-and-never-read member).
      
      mtr_t::Command::m_start_lsn: Replaced with the return value of
      finish_write() and a parameter to release_blocks().
      
      mtr_t::Command::m_end_lsn: Removed as a duplicate of mtr_t::m_commit_lsn.
      
      mtr_t::Command::prepare_write(): Replace a switch () with a
      comparison against 0. Only 2 m_log_mode are allowed.
      2570cb8b
  7. 30 Aug, 2019 1 commit
    • Marko Mäkelä's avatar
      MDEV-20425: Fix -Wimplicit-fallthrough · f42a2317
      Marko Mäkelä authored
      With --skip-debug-assert, DBUG_ASSERT(false) will allow execution to
      continue. Hence, we will need /* fall through */ after them.
      
      Some DBUG_ASSERT(0) were replaced by break; when the switch () statement
      was followed by DBUG_ASSERT(0).
      f42a2317
  8. 16 Jun, 2019 2 commits
  9. 07 Feb, 2019 1 commit
    • Marko Mäkelä's avatar
      MDEV-18493 Remove page_size_t · 0a1c3477
      Marko Mäkelä authored
      MySQL 5.7 introduced the class page_size_t and increased the size of
      buffer pool page descriptors by introducing this object to them.
      
      Maybe the intention of this exercise was to prepare for a future
      where the buffer pool could accommodate multiple page sizes.
      But that future never arrived, not even in MySQL 8.0. It is much
      easier to manage a pool of a single page size, and typically all
      storage devices of an InnoDB instance benefit from using the same
      page size.
      
      Let us remove page_size_t from MariaDB Server. This will make it
      easier to remove support for ROW_FORMAT=COMPRESSED (or make it a
      compile-time option) in the future, just by removing various
      occurrences of zip_size.
      0a1c3477
  10. 07 Jan, 2019 1 commit
  11. 27 Dec, 2018 1 commit
  12. 19 Nov, 2018 1 commit
  13. 01 Nov, 2018 1 commit
  14. 11 Sep, 2018 1 commit
    • Marko Mäkelä's avatar
      MDEV-13564: Remove old crash-upgrade logic in 10.4 · 09af00cb
      Marko Mäkelä authored
      Stop supporting the additional *trunc.log files that were
      introduced via MySQL 5.7 to MariaDB Server 10.2 and 10.3.
      
      DB_TABLESPACE_TRUNCATED: Remove.
      
      purge_sys.truncate: A new structure to track undo tablespace
      file truncation.
      
      srv_start(): Remove the call to buf_pool_invalidate(). It is
      no longer necessary, given that we no longer access things in
      ways that violate the ARIES protocol. This call was originally
      added for innodb_file_format, and it may later have been necessary
      for the proper function of the MySQL 5.7 TRUNCATE recovery, which
      we are now removing.
      
      trx_purge_cleanse_purge_queue(): Take the undo tablespace as a
      parameter.
      
      trx_purge_truncate_history(): Rewrite everything mostly in a
      single function, replacing references to undo::Truncate.
      
      recv_apply_hashed_log_recs(): If any redo log is to be applied,
      and if the log_sys.log.subformat indicates that separately
      logged truncate may have been used, refuse to proceed except if
      innodb_force_recovery is set. We will still refuse crash-upgrade
      if TRUNCATE TABLE was logged. Undo tablespace truncation would
      only be logged in undo*trunc.log files, which we are no longer
      checking for.
      09af00cb
  15. 01 May, 2018 1 commit
    • Marko Mäkelä's avatar
      Fix many -Wunused-parameter · 2b27ac82
      Marko Mäkelä authored
      Remove unused InnoDB function parameters and functions.
      
      i_s_sys_virtual_fill_table(): Do not allocate heap memory.
      
      mtr_is_block_fix(): Replace with mtr_memo_contains().
      
      mtr_is_page_fix(): Replace with mtr_memo_contains_page().
      2b27ac82
  16. 30 Apr, 2018 1 commit
  17. 29 Apr, 2018 2 commits
    • Marko Mäkelä's avatar
      MDEV-16045: Allocate log_sys statically · d73a898d
      Marko Mäkelä authored
      There is only one redo log subsystem in InnoDB. Allocate the object
      statically, to avoid unnecessary dereferencing of the pointer.
      
      log_t::create(): Renamed from log_sys_init().
      
      log_t::close(): Renamed from log_shutdown().
      
      log_t::checkpoint_buf_ptr: Remove. Allocate log_t::checkpoint_buf
      statically.
      d73a898d
    • Marko Mäkelä's avatar
      MDEV-12218 Clean up InnoDB parameter validation · 715e4f43
      Marko Mäkelä authored
      Bind more InnoDB parameters directly to MYSQL_SYSVAR and
      remove "shadow variables".
      
      innodb_change_buffering: Declare as ENUM, not STRING.
      
      innodb_flush_method: Declare as ENUM, not STRING.
      
      innodb_log_buffer_size: Bind directly to srv_log_buffer_size,
      without rounding it to a multiple of innodb_page_size.
      
      LOG_BUFFER_SIZE: Remove.
      
      SysTablespace::normalize_size(): Renamed from normalize().
      
      innodb_init_params(): A new function to initialize and validate
      InnoDB startup parameters.
      
      innodb_init(): Renamed from innobase_init(). Invoke innodb_init_params()
      before actually trying to start up InnoDB.
      
      srv_start(bool): Renamed from innobase_start_or_create_for_mysql().
      Added the input parameter create_new_db.
      
      SRV_ALL_O_DIRECT_FSYNC: Define only for _WIN32.
      
      xb_normalize_init_values(): Merge to innodb_init_param().
      715e4f43
  18. 29 Mar, 2018 2 commits
    • Marko Mäkelä's avatar
      MDEV-12266: Change dict_table_t::space to fil_space_t* · 4cad4239
      Marko Mäkelä authored
      InnoDB always keeps all tablespaces in the fil_system cache.
      The fil_system.LRU is only for closing file handles; the
      fil_space_t and fil_node_t for all data files will remain
      in main memory. Between startup to shutdown, they can only be
      created and removed by DDL statements. Therefore, we can
      let dict_table_t::space point directly to the fil_space_t.
      
      dict_table_t::space_id: A numeric tablespace ID for the corner cases
      where we do not have a tablespace. The most prominent examples are
      ALTER TABLE...DISCARD TABLESPACE or a missing or corrupted file.
      
      There are a few functional differences; most notably:
      (1) DROP TABLE will delete matching .ibd and .cfg files,
      even if they were not attached to the data dictionary.
      (2) Some error messages will report file names instead of numeric IDs.
      
      There still are many functions that use numeric tablespace IDs instead
      of fil_space_t*, and many functions could be converted to fil_space_t
      member functions. Also, Tablespace and Datafile should be merged with
      fil_space_t and fil_node_t. page_id_t and buf_page_get_gen() could use
      fil_space_t& instead of a numeric ID, and after moving to a single
      buffer pool (MDEV-15058), buf_pool_t::page_hash could be moved to
      fil_space_t::page_hash.
      
      FilSpace: Remove. Only few calls to fil_space_acquire() will remain,
      and gradually they should be removed.
      
      mtr_t::set_named_space_id(ulint): Renamed from set_named_space(),
      to prevent accidental calls to this slower function. Very few
      callers remain.
      
      fseg_create(), fsp_reserve_free_extents(): Take fil_space_t*
      as a parameter instead of a space_id.
      
      fil_space_t::rename(): Wrapper for fil_rename_tablespace_check(),
      fil_name_write_rename(), fil_rename_tablespace(). Mariabackup
      passes the parameter log=false; InnoDB passes log=true.
      
      dict_mem_table_create(): Take fil_space_t* instead of space_id
      as parameter.
      
      dict_process_sys_tables_rec_and_mtr_commit(): Replace the parameter
      'status' with 'bool cached'.
      
      dict_get_and_save_data_dir_path(): Avoid copying the fil_node_t::name.
      
      fil_ibd_open(): Return the tablespace.
      
      fil_space_t::set_imported(): Replaces fil_space_set_imported().
      
      truncate_t: Change many member function parameters to fil_space_t*,
      and remove page_size parameters.
      
      row_truncate_prepare(): Merge to its only caller.
      
      row_drop_table_from_cache(): Assert that the table is persistent.
      
      dict_create_sys_indexes_tuple(): Write SYS_INDEXES.SPACE=FIL_NULL
      if the tablespace has been discarded.
      
      row_import_update_discarded_flag(): Remove a constant parameter.
      4cad4239
    • Marko Mäkelä's avatar
      MDEV-12266: Add fil_system.sys_space, temp_space · 2ac8b1a9
      Marko Mäkelä authored
      Add fil_system_t::sys_space, fil_system_t::temp_space.
      These will replace lookups for TRX_SYS_SPACE or SRV_TMP_SPACE_ID.
      
      mtr_t::m_undo_space, mtr_t::m_sys_space: Remove.
      
      mtr_t::set_sys_modified(): Remove.
      
      fil_space_get_type(), fil_space_get_n_reserved_extents(): Remove.
      
      fsp_header_get_tablespace_size(), fsp_header_inc_size():
      Merge to the only caller, innobase_start_or_create_for_mysql().
      2ac8b1a9
  19. 29 Jan, 2018 1 commit
  20. 07 Aug, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-13452 Assertion `!recv_no_log_write' failed in log_reserve_and_open() · dcdc1c6d
      Marko Mäkelä authored
      The debug flag recv_no_log_write prohibits writes of redo log records for
      modifying page data. The debug assertion was failing when fil_names_clear()
      was writing the informative MLOG_FILE_NAME and MLOG_CHECKPOINT records
      which do not modify any data.
      
      log_reserve_and_open(), log_write_low(): Remove the debug assertion.
      
      log_pad_current_log_block(), mtr_write_log(),
      mtr_t::Command::prepare_write(): Add the debug assertion.
      dcdc1c6d
  21. 07 Jul, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-13267 At startup with crash recovery: mtr_t::commit_checkpoint(lsn_t,... · 42f657cd
      Marko Mäkelä authored
      MDEV-13267 At startup with crash recovery: mtr_t::commit_checkpoint(lsn_t, bool): Assertion `!recv_no_log_write' failed
      
      This is a bogus debug assertion failure that should be possible
      starting with MariaDB 10.2.2 (which merged WL#7142 via MySQL 5.7.9).
      
      While generating page-change redo log records is strictly out of the
      question during tat certain parts of crash recovery, the
      fil_names_clear() is only emitting informational MLOG_FILE_NAME
      and MLOG_CHECKPOINT records to guarantee that if the server is killed
      during or soon after the crash recovery, subsequent crash recovery
      will be possible.
      
      The metadata buffer that fil_names_clear() is flushing to the redo log
      is being filled by recv_init_crash_recovery_spaces(), right before
      starting to apply redo log, by invoking fil_names_dirty() on every
      discovered tablespace for which there are changes to apply.
      
      When it comes to Mariabackup (xtrabackup --prepare), it is strictly out
      of the question to generate any redo log whatsoever, because that could
      break the restore of incremental backups by causing LSN deviation.
      So, the fil_names_dirty() call must be skipped when restoring backups.
      
      recv_recovery_from_checkpoint_start(): Do not invoke fil_names_clear()
      when restoring a backup.
      
      mtr_t::commit_checkpoint(): Remove the failing assertion. The only
      caller is fil_names_clear(), and it must be called by
      recv_recovery_from_checkpoint_start() for normal server startup to be
      crash-safe. The debug assertion in mtr_t::commit() will still
      catch rogue redo log writes.
      42f657cd
  22. 05 Jul, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-12548 Initial implementation of Mariabackup for MariaDB 10.2 · 8c71c6aa
      Marko Mäkelä authored
      InnoDB I/O and buffer pool interfaces and the redo log format
      have been changed between MariaDB 10.1 and 10.2, and the backup
      code has to be adjusted accordingly.
      
      The code has been simplified, and many memory leaks have been fixed.
      Instead of the file name xtrabackup_logfile, the file name ib_logfile0
      is being used for the copy of the redo log. Unnecessary InnoDB startup and
      shutdown and some unnecessary threads have been removed.
      
      Some help was provided by Vladislav Vaintroub.
      
      Parameters have been cleaned up and aligned with those of MariaDB 10.2.
      
      The --dbug option has been added, so that in debug builds,
      --dbug=d,ib_log can be specified to enable diagnostic messages
      for processing redo log entries.
      
      By default, innodb_doublewrite=OFF, so that --prepare works faster.
      If more crash-safety for --prepare is needed, double buffering
      can be enabled.
      
      The parameter innodb_log_checksums=OFF can be used to ignore redo log
      checksums in --backup.
      
      Some messages have been cleaned up.
      Unless --export is specified, Mariabackup will not deal with undo log.
      The InnoDB mini-transaction redo log is not only about user-level
      transactions; it is actually about mini-transactions. To avoid confusion,
      call it the redo log, not transaction log.
      
      We disable any undo log processing in --prepare.
      
      Because MariaDB 10.2 supports indexed virtual columns, the
      undo log processing would need to be able to evaluate virtual column
      expressions. To reduce the amount of code dependencies, we will not
      process any undo log in prepare.
      
      This means that the --export option must be disabled for now.
      
      This also means that the following options are redundant
      and have been removed:
      	xtrabackup --apply-log-only
      	innobackupex --redo-only
      
      In addition to disabling any undo log processing, we will disable any
      further changes to data pages during --prepare, including the change
      buffer merge. This means that restoring incremental backups should
      reliably work even when change buffering is being used on the server.
      Because of this, preparing a backup will not generate any further
      redo log, and the redo log file can be safely deleted. (If the
      --export option is enabled in the future, it must generate redo log
      when processing undo logs and buffered changes.)
      
      In --prepare, we cannot easily know if a partial backup was used,
      especially when restoring a series of incremental backups. So, we
      simply warn about any missing files, and ignore the redo log for them.
      
      FIXME: Enable the --export option.
      
      FIXME: Improve the handling of the MLOG_INDEX_LOAD record, and write
      a test that initiates a backup while an ALGORITHM=INPLACE operation
      is creating indexes or rebuilding a table. An error should be detected
      when preparing the backup.
      
      FIXME: In --incremental --prepare, xtrabackup_apply_delta() should
      ensure that if FSP_SIZE is modified, the file size will be adjusted
      accordingly.
      8c71c6aa
  23. 27 Jun, 2017 1 commit
    • Marko Mäkelä's avatar
      Fix a merge error in commit 8f643e20 · 3e1d0ff5
      Marko Mäkelä authored
      A merge error caused InnoDB bootstrap to fail when
      innodb_undo_tablespaces was set to more than 2.
      This was because of a bug that was introduced to
      srv_undo_tablespaces_init() by the merge.
      
      Furthermore, some adjustments for Oracle Bug#25551311 aka
      Bug#23517560 changes were forgotten. We must minimize direct
      references to srv_undo_tablespaces_open and use predicates
      instead.
      
      srv_undo_tablespaces_init(): Increment srv_undo_tablespaces_open
      once, not twice, per loop iteration.
      
      is_system_or_undo_tablespace(): Remove (unused function).
      
      is_predefined_tablespace(): Invoke srv_is_undo_tablespace().
      3e1d0ff5
  24. 26 Apr, 2017 1 commit
  25. 17 Mar, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-12271 Port MySQL 8.0 Bug#23150562 REMOVE UNIV_MUST_NOT_INLINE AND UNIV_NONINL · 4e1116b2
      Marko Mäkelä authored
      Also, remove empty .ic files that were not removed by my MySQL commit.
      
      Problem:
      InnoDB used to support a compilation mode that allowed to choose
      whether the function definitions in .ic files are to be inlined or not.
      This stopped making sense when InnoDB moved to C++ in MySQL 5.6
      (and ha_innodb.cc started to #include .ic files), and more so in
      MySQL 5.7 when inline methods and functions were introduced
      in .h files.
      
      Solution:
      Remove all references to UNIV_NONINL and UNIV_MUST_NOT_INLINE from
      all files, assuming that the symbols are never defined.
      Remove the files fut0fut.cc and ut0byte.cc which only mattered when
      UNIV_NONINL was defined.
      4e1116b2
  26. 13 Mar, 2017 1 commit
  27. 07 Mar, 2017 1 commit
    • Marko Mäkelä's avatar
      Fix many -Wconversion warnings. · 89d80c1b
      Marko Mäkelä authored
      Define my_thread_id as an unsigned type, to avoid mismatch with
      ulonglong.  Change some parameters to this type.
      
      Use size_t in a few more places.
      
      Declare many flag constants as unsigned to avoid sign mismatch
      when shifting bits or applying the unary ~ operator.
      
      When applying the unary ~ operator to enum constants, explictly
      cast the result to an unsigned type, because enum constants can
      be treated as signed.
      
      In InnoDB, change the source code line number parameters from
      ulint to unsigned type. Also, make some InnoDB functions return
      a narrower type (unsigned or uint32_t instead of ulint;
      bool instead of ibool).
      89d80c1b
  28. 18 Jan, 2017 1 commit
    • Marko Mäkelä's avatar
      MDEV-11831 Make InnoDB mini-transaction memo checks stricter · 8780b895
      Marko Mäkelä authored
      InnoDB keeps track of buffer-fixed buf_block_t or acquired rw_lock_t
      within a mini-transaction. There are some memo_contains assertions
      in the code that document when certain blocks or rw_locks must be held.
      But, these assertions only check the mini-transaction memo, not the fact
      whether the rw_lock_t are actually being held by the caller.
      
      btr_pcur_store_position(): Remove #ifdef, and assert that the block
      is always buffer-fixed.
      
      rtr_pcur_getnext_from_path(), rtr_pcur_open_low(),
      ibuf_rec_get_page_no_func(), ibuf_rec_get_space_func(),
      ibuf_rec_get_info_func(), ibuf_rec_get_op_type_func(),
      ibuf_build_entry_from_ibuf_rec_func(), ibuf_rec_get_volume_func(),
      ibuf_get_merge_page_nos_func(), ibuf_get_volume_buffered_count_func()
      ibuf_get_entry_counter_low_func(), page_set_ssn_id(),
      row_vers_old_has_index_entry(), row_vers_build_for_consistent_read(),
      row_vers_build_for_semi_consistent_read(),
      trx_undo_prev_version_build():
      Make use of mtr_memo_contains_page_flagged().
      
      mtr_t::memo_contains(): Take a const memo. Assert rw_lock_own().
      
      FindPage, FlaggedCheck: Assert rw_lock_own_flagged().
      8780b895
  29. 09 Dec, 2016 1 commit
    • Marko Mäkelä's avatar
      MDEV-11487 Revert InnoDB internal temporary tables from WL#7682 · c868acdf
      Marko Mäkelä authored
      WL#7682 in MySQL 5.7 introduced the possibility to create light-weight
      temporary tables in InnoDB. These are called 'intrinsic temporary tables'
      in InnoDB, and in MySQL 5.7, they can be created by the optimizer for
      sorting or buffering data in query processing.
      
      In MariaDB 10.2, the optimizer temporary tables cannot be created in
      InnoDB, so we should remove the dead code and related data structures.
      c868acdf
  30. 08 Sep, 2016 1 commit
    • Jan Lindström's avatar
      Merge InnoDB 5.7 from mysql-5.7.14. · fec844ac
      Jan Lindström authored
      Contains also:
             MDEV-10549 mysqld: sql/handler.cc:2692: int handler::ha_index_first(uchar*): Assertion `table_share->tmp_table != NO_TMP_TABLE || m_lock_type != 2' failed. (branch bb-10.2-jan)
             Unlike MySQL, InnoDB still uses THR_LOCK in MariaDB
      
             MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
             enable tests that were fixed in MDEV-10549
      
             MDEV-10548 Some of the debug sync waits do not work with InnoDB 5.7 (branch bb-10.2-jan)
             fix main.innodb_mysql_sync - re-enable online alter for partitioned innodb tables
      fec844ac
  31. 02 Sep, 2016 1 commit
    • Jan Lindström's avatar
      Merge InnoDB 5.7 from mysql-5.7.9. · 2e814d47
      Jan Lindström authored
      Contains also
      
      MDEV-10547: Test multi_update_innodb fails with InnoDB 5.7
      
      	The failure happened because 5.7 has changed the signature of
      	the bool handler::primary_key_is_clustered() const
      	virtual function ("const" was added). InnoDB was using the old
      	signature which caused the function not to be used.
      
      MDEV-10550: Parallel replication lock waits/deadlock handling does not work with InnoDB 5.7
      
      	Fixed mutexing problem on lock_trx_handle_wait. Note that
      	rpl_parallel and rpl_optimistic_parallel tests still
      	fail.
      
      MDEV-10156 : Group commit tests fail on 10.2 InnoDB (branch bb-10.2-jan)
        Reason: incorrect merge
      
      MDEV-10550: Parallel replication can't sync with master in InnoDB 5.7 (branch bb-10.2-jan)
        Reason: incorrect merge
      2e814d47
  32. 21 Jun, 2016 1 commit
  33. 04 May, 2015 2 commits
  34. 26 Feb, 2014 2 commits