1. 22 Mar, 2019 12 commits
  2. 21 Mar, 2019 12 commits
  3. 20 Mar, 2019 4 commits
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · f4116613
      Marko Mäkelä authored
      f4116613
    • Marko Mäkelä's avatar
      MDEV-18981 Possible corruption when using FOREIGN KEY with virtual columns · 630199e7
      Marko Mäkelä authored
      row_ins_foreign_fill_virtual(): Construct update->old_vrow
      with ROW_COPY_DATA instead of ROW_COPY_POINTERS. With the latter,
      the object would be pointing to a buffer pool page frame. That page
      frame can become stale and invalid as soon as
      row_ins_foreign_check_on_constraint() invokes mtr_t::commit().
      
      Most of the time, the pointer target is not going to be overwritten
      by anything, and everything appears to work correctly.
      Buffer pool page replacement is highly unlikely, and any pessimistic
      operation that would overwrite the old location of the record is only
      slightly more likely. It is not known whether there is an actual bug.
      This came up while diagnosing MDEV-18879 in MariaDB 10.3.
      630199e7
    • Marko Mäkelä's avatar
      MDEV-18879/MDEV-18972 Corrupted record inserted by FOREIGN KEY operation · b47cec6c
      Marko Mäkelä authored
      row_ins_foreign_check_on_constraint(): When constructing
      cascade->historical_row for tables WITH SYSTEM VERSIONING,
      use the appropriate mode ROW_COPY_DATA, because the pointers
      will be stale after mtr_commit() is invoked.
      b47cec6c
    • Alexander Barkov's avatar
      Fixing "mtr func_math" failure in the test for MDEV-17643 · ef81d2ea
      Alexander Barkov authored
      Adding an intermediate volatile variable to avoid using co-processor registers
      on some platforms (e.g. 32-bit x86).
      This change makes test results stable accross all platforms.
      ef81d2ea
  4. 19 Mar, 2019 7 commits
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 117291db
      Marko Mäkelä authored
      117291db
    • Marko Mäkelä's avatar
      trx_purge_rseg_get_next_history_log(): Remove a parameter · 26e5bff0
      Marko Mäkelä authored
      Access purge_sys.rseg directly, instead of obscuring it with a parameter.
      26e5bff0
    • Marko Mäkelä's avatar
      MDEV-18084: Crash on UPDATE after upgrade from 10.0 or 10.1 · a77e2668
      Marko Mäkelä authored
      MariaDB Server 10.0 and 10.1 support non-indexed virtual columns,
      which are hidden from the storage engine. Starting with MDEV-5800
      in MariaDB 10.2.2, the virtual columns are visible to storage engines.
      
      calc_row_difference(): Follow up the MDEV-17199 fix, which forgot
      to increment num_v when skipping virtual columns in tables that
      were created before MariaDB 10.2.2. This caused a corruption of
      the update vector when an updated persistent column is preceded
      by virtual columns.
      a77e2668
    • Marko Mäkelä's avatar
      Replace innobase_is_v_fld() with Field::stored_in_db() · 1efda582
      Marko Mäkelä authored
      The macro innobase_is_v_fld() turns out to be equivalent with
      the opposite of Field::stored_in_db(). Remove the macro and
      invoke the member function directly.
      
      innodb_base_col_setup_for_stored(): Simplify a condition to only
      check Field::vcol_info.
      
      innobase_create_index_def(): Replace some redundant code with
      DBUG_ASSERT().
      1efda582
    • Marko Mäkelä's avatar
      MDEV-18960: Assertion !omits_virtual_cols(*form->s) on TRUNCATE · 9471dbaf
      Marko Mäkelä authored
      MariaDB before MDEV-5800 in version 10.2.2 did not support
      indexed virtual columns. Non-persistent virtual columns were
      hidden from storage engines. Only starting with MDEV-5800, InnoDB
      would create internal metadata on virtual columns.
      
      On TRUNCATE TABLE, an old .frm file from before MDEV-5800 may be
      used as the table schema. When the table is being re-created by
      InnoDB, the old schema must be used. That is, we may hide
      the existence of virtual columns from InnoDB.
      
      create_table_check_doc_id_col(): Remove the assertion that failed.
      This function can actually correctly deal with virtual columns
      that could have been created before MariaDB 10.2.2 introduced MDEV-5800.
      
      create_table_info_t::create_table_def(): Do not create metadata for
      virtual columns if the table definition was created before MariaDB 10.2.2.
      9471dbaf
    • Marko Mäkelä's avatar
      MDEV-18966 Transaction recovery may be broken after upgrade to 10.3 · cdb2208c
      Marko Mäkelä authored
      This bug was introduced by MDEV-12288, which made InnoDB use
      a single undo log for persistent transactions, instead of
      maintaining separate insert_undo and update_undo logs.
      
      trx_undo_reuse_cached(): Initialize the TRX_UNDO_PAGE_TYPE
      after reusing a cached undo log page for undo log.
      Failure to do so can cause trx_undo_mem_create_at_db_start()
      to misclassify new undo log records as TRX_UNDO_INSERT.
      This in turn would trigger an assertion failure in
      trx_roll_pop_top_rec_of_trx() due to undo==insert.
      cdb2208c
    • Marko Mäkelä's avatar
      trx_purge_add_undo_to_history(): Non-functional cleanup · 6893e994
      Marko Mäkelä authored
      Simplify the debug code, and use mach_read_from_4() instead of
      the wrapper function mtr_read_ulint().
      6893e994
  5. 18 Mar, 2019 5 commits