1. 28 Mar, 2019 5 commits
    • Sergei Petrunia's avatar
      MDEV-18080, part#1: MyRocks is slow with log-bin=off · 8fcd9478
      Sergei Petrunia authored
      The cause for this was fix MDEV-15372, which was trying to speed up
      the parallel slave.
      
      Part#1: Do not attempt the "optimization" for transactions that are not
      replication slave workers.
      8fcd9478
    • Sujatha Sivakumar's avatar
      MDEV-13895: GTID and Master_Delay causes excessive initial delay · e42192d7
      Sujatha Sivakumar authored
      Problem:
      ========
      When attempting to delay a Slave attached with GTID, there appears to be an
      extra delay applied initially. For example, this output reflects a Slave that is
      already delayed by 43200 seconds. When switching to GTID replication,
      replication is paused until SQL_Remaining_Delay counts down to 0:
      
      CHANGE MASTER TO master_use_gtid=current_pos; CHANGE MASTER TO
      MASTER_DELAY=43200;
      
      Seconds_Behind_Master: 44847
      Using_Gtid: Current_Pos
      SQL_Delay: 43200
      SQL_Remaining_Delay: 43089
      Slave_SQL_Running_State: Waiting until MASTER_DELAY seconds after master
      executed event
      
      Analysis:
      =========
      When slave initiates a GTID based connection request to master, the master sends
      two GTID_LIST events.  The first one is actual GTID_LIST event and the second
      one is a fake GTID_LIST event. This is sent by master to provide its current
      binlary log file position. The fake GTID_LIST events will have their ev->when=0.
      'when' (the timestamp) is set to 0 so that slave could distinguish between real
      and fake Rotate events.
      
      On slave side when MASTER_DELAY is configured to "X" the applier will ensure
      that there is a time delay of "X" seconds before the event is applied.
      
      General behaviour of MASTER_DELAY example:-
      
      Master
      timestamp of event e1=10
      timestamp of event e2=11
      
      On slave MASTER_DELAY=5
      Event e1 will be applied at = 15
      e2 will be applied at =16
      
      In bug scenario:-
      
      On Master: With GTIDs
      timestamp of event e1=10
      timestamp of event e2=0
      
      On Slave:
      e1 will be applied at = 10 + 5 =15
      For e2, since "e2->when=0" e2->when is set to current timestamp.
      i.e since the e2->when and current timestamp on slave is the same applier waits
      for additional master_delay=5 seconds. the ev->when contributes to
      "rli->last_master_timestamp".
      
      rli->last_master_timestamp= ev->when + (time_t) ev->exec_time;
      
      Fake events should not update the "ev->when" to "current timestamp" on slave.
      
      Fix:
      ===
      Remove the assignment of current timestamp to "ev->when" when "ev->when=0".
      e42192d7
    • Vladislav Vaintroub's avatar
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-19051 Avoid unnecessary writing MLOG_INDEX_LOAD · 0623cc7c
      Thirunarayanan Balathandayuthapani authored
      1) Avoid writing of MLOG_INDEX_LOAD redo log record during inplace
      alter table when the table is empty and also for spatial index.
      
      2) Avoid creation of temporary merge file for spatial index during
      index creation process.
      0623cc7c
    • Varun Gupta's avatar
      MDEV-18899: Server crashes in Field::set_warning_truncated_wrong_value · 38cad687
      Varun Gupta authored
      To fix the crash there we need to make sure that the
      server while storing the statistical values in statistical tables should do it
      in a multi-byte safe way.
      Also there is no need to throw warnings if there is truncation while storing
      values from statistical fields.
      38cad687
  2. 27 Mar, 2019 3 commits
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 1e9c2b23
      Marko Mäkelä authored
      1e9c2b23
    • Marko Mäkelä's avatar
      Merge 10.0 into 10.1 · a6585d5c
      Marko Mäkelä authored
      a6585d5c
    • Marko Mäkelä's avatar
      MDEV-18417/MDEV-18656/MDEV-18417: Work around compiler ASAN bug · 828cc2ba
      Marko Mäkelä authored
      In a Ubuntu Xenial build environment, the compiler identified as
      g++-5.real (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
      seems to be emitting incorrect code for the compilation unit
      trx0rec.cc, triggering a bogus-looking AddressSanitizer report
      of an invalid read of something in the function trx_undo_rec_get_pars().
      This is potentially affecting any larger tests where the InnoDB
      purge subsystem is being exercised.
      
      When the optimization level of trx0rec.cc is limited to -O1, no
      bogus failure is being reported. With -O2 or -O3, a lot of things
      seemed to be inlined in the function, and the disassembly of the
      generated code did not make sense to me.
      828cc2ba
  3. 26 Mar, 2019 9 commits
  4. 25 Mar, 2019 11 commits
    • Sergey Vojtovich's avatar
      Fixed ps-protocol thread_pool_server_audit failure · e8907112
      Sergey Vojtovich authored
      By applying 7bd258c4.
      e8907112
    • Bernhard M. Wiedemann's avatar
      Fix tests in 2020 · cfe0fe1a
      Bernhard M. Wiedemann authored
      unfortunately, the year 2038 problem prevented me from pushing
      the deadline even further into the future.
      cfe0fe1a
    • Daniel Bartholomew's avatar
      bump the VERSION · b30bbb7d
      Daniel Bartholomew authored
      b30bbb7d
    • Marko Mäkelä's avatar
      Fix the Windows build · 07096ada
      Marko Mäkelä authored
      btr_cur_compress_recommendation(): Backport a change from 10.3.
      
      This is a follow-up to commit 1bd98154.
      07096ada
    • Marko Mäkelä's avatar
      MDEV-19022: InnoDB fails to cleanup useless B-tree pages · 525e79b0
      Marko Mäkelä authored
      The test case for reproducing MDEV-14126 demonstrates that InnoDB can
      end up with an index tree where a non-leaf page has only one child page.
      
      The test case innodb.innodb_bug14676111 demonstrates that such pages
      are sometimes unavoidable, because InnoDB does not implement any sort
      of B-tree rotation.
      
      But, there is no reason to allow a root page with only one child page.
      
      btr_cur_node_ptr_delete(): Replaces btr_node_ptr_delete().
      
      btr_page_get_father(): Declare globally.
      
      btr_discard_only_page_on_level(): Declare with ATTRIBUTE_COLD.
      It turns out that this function is not covered by the
      innodb.innodb_bug14676111 test case after all.
      
      btr_discard_page(): If the root page ends up having only one child
      page, shrink the tree by invoking btr_lift_page_up().
      525e79b0
    • Marko Mäkelä's avatar
      Avoid sign mismatch in comparisons · ade0a0e9
      Marko Mäkelä authored
      This is follow-up to commit 1bd98154.
      ade0a0e9
    • Marko Mäkelä's avatar
      MDEV-14126: Fix type mismatch · 1bd98154
      Marko Mäkelä authored
      Backport some changes to B-tree page accessor functions from 10.3,
      including changing page_get_n_recs() to return uint16_t.
      1bd98154
    • Marko Mäkelä's avatar
      MDEV-14126: Detect unexpected emptying of B-tree pages · 72b934e3
      Marko Mäkelä authored
      If an index page becomes empty, btr_page_empty() should be called.
      72b934e3
    • Marko Mäkelä's avatar
    • Marko Mäkelä's avatar
      MDEV-14126: Remove page_is_root() · b59d4846
      Marko Mäkelä authored
      The predicate page_is_root(), which was added in MariaDB Server 10.2.2,
      is based on a wrong assumption.
      
      Under some circumstances, InnoDB can transform B-trees into a degenerate
      state where a non-leaf page has no sibling pages. Because of this,
      we cannot assume that a page that has no siblings is the root page.
      This bug will be tracked as MDEV-19022.
      
      Because of the bug that may affect many InnoDB data files, we must remove
      and replace the wrong predicate. Using the wrong predicate can cause
      corruption. A leaf page is not allowed to be empty except if it is the
      root page, and the entire table is empty.
      b59d4846
    • Marko Mäkelä's avatar
      MDEV-18090 Assertion failures due to virtual columns after upgrading to 10.2 · 71c781bf
      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.
      
      Similar to what was done in MDEV-18084 and MDEV-18960, we adjust two more
      code paths for the old tables.
      
      ha_innobase::build_template(): Do not invoke
      dict_index_contains_col_or_prefix() for virtual columns if InnoDB
      does not store the metadata.
      
      innobase_build_col_map(): Relax an assertion about the number of columns.
      
      ha_innobase::omits_virtual_cols(): Renamed from omits_virtual_cols().
      71c781bf
  5. 24 Mar, 2019 1 commit
  6. 23 Mar, 2019 2 commits
  7. 22 Mar, 2019 9 commits