1. 18 Oct, 2018 1 commit
  2. 17 Oct, 2018 5 commits
  3. 16 Oct, 2018 4 commits
  4. 15 Oct, 2018 1 commit
  5. 14 Oct, 2018 2 commits
    • Igor Babaev's avatar
      MDEV-17222 Reproducible server crash in String_list::append_str or · 103b1df5
      Igor Babaev authored
                 in Field_iterator_table::create_item
      
      When IN predicate is converted to IN subquery we have to ensure that
      any item from the select list of the subquery has some name and this name
      is unique across the select list.
      This was not guaranteed by the code before the patch for MDEV-17222.
      If the name of an item of the select list was not set, and this happened
      for binary constants, then the server crashed. If the first row in the IN
      list contained the same constant in two different positions then the server
      returned an error message.
      This was fixed by providing all constants in the first row of the IN list
      with generated names.
      103b1df5
    • Alexander Barkov's avatar
  6. 13 Oct, 2018 3 commits
  7. 12 Oct, 2018 4 commits
  8. 11 Oct, 2018 12 commits
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 7e869a27
      Marko Mäkelä authored
      7e869a27
    • Marko Mäkelä's avatar
      MDEV-17433 Allow InnoDB start up with empty ib_logfile0 from mariabackup --prepare · 81a5b6cc
      Marko Mäkelä authored
      A prepared backup from Mariabackup does not really need to contain any
      redo log file, because all log will have been applied to the data files.
      
      When the user copies a prepared backup to a data directory (overwriting
      existing files), it could happen that the data directory already contained
      redo log files from the past. mariabackup --copy-back) would delete the
      old redo log files, but a user’s own copying script might not do that.
      To prevent corruption caused by mixing an old redo log file with data
      files from a backup, starting with MDEV-13311, Mariabackup would create
      a zero-length ib_logfile0 that would prevent startup.
      
      Actually, there is no need to prevent InnoDB from starting up when a
      single zero-length file ib_logfile0 is present. Only if there exist
      multiple data files of different lengths, then we should refuse to
      start up due to inconsistency. A single zero-length ib_logfile0 should
      be treated as if the log files were missing: create new log files
      according to the configuration.
      
      open_log_file(): Remove. There is no need to open the log files
      at this point, because os_file_get_status() already determined
      the size of the file.
      
      innobase_start_or_create_for_mysql(): Move the creation of new
      log files a little later, not when finding out that the first log
      file does not exist, but after finding out that it does not exist
      or it exists as a zero-length file.
      81a5b6cc
    • Eugene Kosov's avatar
      be31c18e
    • Marko Mäkelä's avatar
      Fix a sign mismatch · b8944e89
      Marko Mäkelä authored
      b8944e89
    • Marko Mäkelä's avatar
      MDEV-13564: Replace innodb_unsafe_truncate with innodb_safe_truncate · 6319c0b5
      Marko Mäkelä authored
      Rename the 10.2-specific configuration option innodb_unsafe_truncate
      to innodb_safe_truncate, and invert its value.
      
      The default (for now) is innodb_safe_truncate=OFF, to avoid
      disrupting users with an undo and redo log format change within
      a Generally Available (GA) release series.
      6319c0b5
    • Eugene Kosov's avatar
      MDEV-17313 Data race in ib_counter_t · f9547748
      Eugene Kosov authored
      ib_counter_t: make all reads/writes to m_counter relaxed atomical
      f9547748
    • Alexander Barkov's avatar
    • Marko Mäkelä's avatar
      MDEV-13564: Null-merge 10.2 into 10.3 · 30629e19
      Marko Mäkelä authored
      We keep the MySQL 5.7 backup-incompatible TRUNCATE TABLE
      only in MariaDB Server 10.2. In 10.3 and later releases,
      only the backup-friendly TRUNCATE will be available.
      30629e19
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · ae9d82c9
      Marko Mäkelä authored
      ae9d82c9
    • Marko Mäkelä's avatar
      MDEV-13564: Implement innodb_unsafe_truncate=ON for compatibility · 3448ceb0
      Marko Mäkelä authored
      While MariaDB Server 10.2 is not really guaranteed to be compatible
      with Percona XtraBackup 2.4 (for example, the MySQL 5.7 undo log format
      change that could be present in XtraBackup, but was reverted from
      MariaDB in MDEV-12289), we do not want to disrupt users who have
      deployed xtrabackup and MariaDB Server 10.2 in their environments.
      
      With this change, MariaDB 10.2 will continue to use the backup-unsafe
      TRUNCATE TABLE code, so that neither the undo log nor the redo log
      formats will change in an incompatible way.
      
      Undo tablespace truncation will keep using the redo log only. Recovery
      or backup with old code will fail to shrink the undo tablespace files,
      but the contents will be recovered just fine.
      
      In the MariaDB Server 10.2 series only, we introduce the configuration
      parameter innodb_unsafe_truncate and make it ON by default. To allow
      MariaDB Backup (mariabackup) to work properly with TRUNCATE TABLE
      operations, use loose_innodb_unsafe_truncate=OFF.
      
      MariaDB Server 10.3.10 and later releases will always use the
      backup-safe TRUNCATE TABLE, and this parameter will not be
      added there.
      
      recv_recovery_rollback_active(): Skip row_mysql_drop_garbage_tables()
      unless innodb_unsafe_truncate=OFF. It is too unsafe to drop orphan
      tables if RENAME operations are not transactional within InnoDB.
      
      LOG_HEADER_FORMAT_10_3: Replaces LOG_HEADER_FORMAT_CURRENT.
      
      log_init(), log_group_file_header_flush(),
      srv_prepare_to_delete_redo_log_files(),
      innobase_start_or_create_for_mysql(): Choose the redo log format
      and subformat based on the value of innodb_unsafe_truncate.
      3448ceb0
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 07815d95
      Marko Mäkelä authored
      07815d95
    • Marko Mäkelä's avatar
      940f0c78
  9. 10 Oct, 2018 8 commits
    • Sergei Petrunia's avatar
      MDEV-17181: rocksdb.allow_to_start_after_corruption fails on current 10.2 · 8d116d16
      Sergei Petrunia authored
      The test needs to be run with rocksdb_flush_log_at_trx_commit=1, otherwise
      the changes do not survive a crash.
      8d116d16
    • Marko Mäkelä's avatar
      MDEV-15562: Remove dict_table_t::rollback_instant(unsigned n) · f545e3cf
      Marko Mäkelä authored
      On the rollback of changes to SYS_COLUMNS, MDEV-15562 will
      break the assumption that the only instantaneous changes to columns
      are the addition to the end of the column list.
      
      The function dict_table_t::rollback_instant(unsigned n)
      is inherently incompatible with instantly dropping or reordering
      columns.
      
      When a change to SYS_COLUMNS is rolled back, we must simply evict
      the affected table definition, at the end of the rollback. We cannot
      free the table object immediately, because the current transaction
      that is being rolled back may be holding a lock on the table and
      its metadata record.
      
      dict_table_remove_from_cache_low(): Replaced
      by dict_table_remove_from_cache().
      
      dict_table_remove_from_cache(): Add a third parameter keep=false,
      so that the table can be freed by the caller.
      
      trx_lock_t::evicted_tables: List of tables on which trx_t::evict_table()
      was invoked.
      
      trx_t::evict_table(): Evict a table definition during rollback.
      
      trx_commit_in_memory(): Empty the trx->lock.evicted_tables list
      after the locks were released, by freeing the table objects.
      
      row_undo_ins_remove_clust_rec(), row_undo_mod_clust_low():
      Invoke trx_t::evict_table() on the affected table if a change to
      SYS_COLUMNS is being rolled back.
      f545e3cf
    • Marko Mäkelä's avatar
      MDEV-15562: Simplify FOREIGN KEY error handling on DDL · f58a0b3a
      Marko Mäkelä authored
      The error handling for ALTER TABLE…ALGORITHM=COPY as well as
      CREATE TABLE used to commit the CREATE TABLE transaction and then
      issue DROP TABLE in a separate transaction. This is unnecessarily
      breaking atomicity during DDL operations. Let us revise it so
      that the DROP TABLE will be executed within the same transaction,
      which will finally be rolled back.
      
      FIXME: Introduce an undo log record so that the data file would be
      deleted on rollback and no DROP TABLE would be needed at all.
      
      FIXME: Avoid unnecessary access to per-table tablespace during DROP TABLE.
      If the .ibd file is going to be deleted anyway, we should not bother
      to mark the pages free.
      
      dict_create_add_foreigns_to_dictionary(): Do not commit the transaction.
      We want simple rollback in case dict_load_foreigns() would fail.
      
      create_table_info_t::create_table(), row_create_index_for_mysql(),
      row_table_add_foreign_constraints(): Before invoking rollback, drop
      the table. Rollback would invoke trx_t::evict_table(), and after that
      dropping the table would be a no-op.
      
      ha_innobase::create(): Before rollback, drop the table. If the SQL
      layer invoked ha_innobase::delete_table() later, it would be a no-op
      because the rollback would have invoked trx_t::evict_table().
      f58a0b3a
    • Marko Mäkelä's avatar
      MDEV-15562: Add dict_index_t::first_user_field() · cd081734
      Marko Mäkelä authored
      dict_index_t::first_user_field(): Return the first data field in
      a clustered index, that is, the field after the PRIMARY KEY and
      the two system columns DB_TRX_ID, DB_ROLL_PTR.
      
      dtuple_convert_big_rec(): Remove some local variables.
      cd081734
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 2a955c7a
      Marko Mäkelä authored
      2a955c7a
    • Jan Lindström's avatar
      MDEV-17403: Test failure on galera.galera_enum · 3c3c4ae2
      Jan Lindström authored
      Add wait on second node.
      3c3c4ae2
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 61b32df9
      Marko Mäkelä authored
      61b32df9
    • Marko Mäkelä's avatar
      MDEV-16946 innodb.alter_kill failed in buildbot with wrong result · 00b6c7d8
      Marko Mäkelä authored
      Ensure that no redo log checkpoint occurs in a critical section
      of a recovery test.
      00b6c7d8