1. 17 Jan, 2018 2 commits
    • Marko Mäkelä's avatar
      Follow-up fix to MDEV-14585 Automatically remove #sql- tables in InnoDB dictionary during recovery · 656f66de
      Marko Mäkelä authored
      If InnoDB is killed while ALTER TABLE...ALGORITHM=COPY is in progress,
      after recovery there could be undo log records some records that were
      inserted into an intermediate copy of the table. Due to these undo log
      records, InnoDB would resurrect locks at recovery, and the intermediate
      table would be locked while we are trying to drop it. This would cause
      a call to row_rename_table_for_mysql(), either from
      row_mysql_drop_garbage_tables() or from the rollback of a RENAME
      operation that was part of the ALTER TABLE.
      
      row_rename_table_for_mysql(): Do not attempt to parse FOREIGN KEY
      constraints when renaming from #sql-something to #sql-something-else,
      because it does not make any sense.
      
      row_drop_table_for_mysql(): When deferring DROP TABLE due to locks,
      do not rename the table if its name already starts with the #sql-
      prefix, which is what row_mysql_drop_garbage_tables() uses.
      Previously, the too strict prefix #sql-ib was used, and some
      tables were renamed unnecessarily.
      656f66de
    • Marko Mäkelä's avatar
      Do not define unused function mark_blocks_free() · 04eef79b
      Marko Mäkelä authored
      Follow-up to commit 9ec19b9b
      04eef79b
  2. 16 Jan, 2018 2 commits
  3. 15 Jan, 2018 11 commits
  4. 14 Jan, 2018 1 commit
    • Eugene Kosov's avatar
      Compilation speed (#546) · 72136ae7
      Eugene Kosov authored
      Speed up compilation
      
      Standard C++ headers contribute a lot to compilation time. Avoid algorithm
      and sstream in frequently used headers.
      72136ae7
  5. 13 Jan, 2018 5 commits
  6. 12 Jan, 2018 6 commits
  7. 11 Jan, 2018 11 commits
    • Andrei Elkin's avatar
      Added checking that row events ends with a proper end block · 3dc3ab1a
      Andrei Elkin authored
      Problems --------
      
      The slave io thread did not conduct integrity check
      for a group of row-based events. Specifically it tolerates missed
      terminal block event that must be flagged with STMT_END. Failure to
      react on its loss can confuse the applier thread in various ways.
      Another potential issue was that there were no check of impossible
      second in row Gtid-log-event while the slave io thread is receiving
      to be skipped events after reconnect.
      
      Fixes
      -----
      The slave io thread is made by this patch to track the rows event
      STMT_END status.
      Whenever at next event reading the IO thread finds out that a preceding
      Rows event did not actually had the flag, an
      explicit error is issued.
      
      Replication can be resumed after the source of failure is eliminated,
      see a provided test.
      
      Note that currently the row-based group integrity check excludes
      the compressed version 2 Rows events (which are not generated by MariaDB
      master).
      Its uncompressed counterpart is manually tested.
      
      The 2nd issue is covered to produce an error in case the io thread
      receives a successive Gtid_log_event while it is post-reconnect
      skipping.
      3dc3ab1a
    • Monty's avatar
      5fce14da
    • Marko Mäkelä's avatar
      Merge 10.2 into bb-10.2-ext · cca611d1
      Marko Mäkelä authored
      cca611d1
    • Monty's avatar
      Removed duplicated copyright message · bf771911
      Monty authored
      bf771911
    • Marko Mäkelä's avatar
      MDEV-14824 Assertion `!trx_is_started(trx)' failed in innobase_start_trx_and_assign_read_view · 773c3ceb
      Marko Mäkelä authored
      In CREATE SEQUENCE or CREATE TEMPORARY SEQUENCE, we should not start
      an InnoDB transaction for inserting the sequence status record into
      the underlying no-rollback table. Because we did this, a debug assertion
      failure would fail in START TRANSACTION WITH CONSISTENT SNAPSHOT after
      CREATE TEMPORARY SEQUENCE was executed.
      
      row_ins_step(): Do not start the transaction. Let the caller do that.
      
      que_thr_step(): Start the transaction before calling row_ins_step().
      
      row_ins_clust_index_entry(): Skip locking and undo logging for no-rollback
      tables, even for temporary no-rollback tables.
      
      row_ins_index_entry(): Allow trx->id==0 for no-rollback tables.
      
      row_insert_for_mysql(): Do not start a transaction for no-rollback tables.
      773c3ceb
    • Marko Mäkelä's avatar
      Fix compilation warnings for libmariadb · 30ecd288
      Marko Mäkelä authored
      30ecd288
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · e9842de2
      Marko Mäkelä authored
      e9842de2
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · c15b3d2d
      Marko Mäkelä authored
      c15b3d2d
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.0 · 4c147954
      Marko Mäkelä authored
      4c147954
    • Marko Mäkelä's avatar
      MDEV-14916 InnoDB reports warning for "Purge reached the head of the history list" · bdcd7f79
      Marko Mäkelä authored
      The warning was originally added in
      commit c6766305
      (MySQL 4.1.12, 5.0.3) to trace claimed undo log corruption that
      was analyzed in https://lists.mysql.com/mysql/176250
      on November 9, 2004.
      
      Originally, the limit was 20,000 undo log headers or transactions,
      but in commit 9d6d1902
      in MySQL 5.5.11 it was increased to 2,000,000.
      
      The message can be triggered when the progress of purge is prevented
      by a long-running transaction (or just an idle transaction whose
      read view was started a long time ago), by running many transactions
      that UPDATE or DELETE some records, then starting another transaction
      with a read view, and finally by executing more than 2,000,000
      transactions that UPDATE or DELETE records in InnoDB tables. Finally,
      when the oldest long-running transaction is completed, purge would
      run up to the next-oldest transaction, and there would still be more
      than 2,000,000 transactions to purge.
      
      Because the message can be triggered when the database is obviously
      not corrupted, it should be removed. Heavy users of InnoDB should be
      monitoring the "History list length" in SHOW ENGINE INNODB STATUS;
      there is no need to spam the error log.
      bdcd7f79
  8. 10 Jan, 2018 2 commits