1. 16 Jul, 2020 4 commits
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 054f1036
      Marko Mäkelä authored
      054f1036
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 3280edda
      Marko Mäkelä authored
      3280edda
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 73aa31fb
      Marko Mäkelä authored
      73aa31fb
    • Marko Mäkelä's avatar
      MDEV-21347 innodb_log_optimize_ddl=OFF is not crash safe · 147d4b1e
      Marko Mäkelä authored
      In commit 0f90728b (MDEV-16809)
      we introduced the configuration option innodb_log_optimize_ddl
      for controlling whether native index creation or table-rebuild
      in InnoDB should avoid writing full redo log.
      
      Fungo Wang reported that this option is causing occasional failures.
      The reason is that pages may be written to data files in an
      inconsistent state. Applying log records to such inconsistent pages
      may fail.
      
      The solution is to always invoke PageBulk::finish() before page latches
      may be released, to ensure that the page contents is in a consistent
      state.
      
      Something similar was implemented in MySQL 8.0.13:
      mysql/mysql-server@d1254b947354e0f5b7223b09c521bd85f22e1e31
      
      buf_block_t::skip_flush_check: Remove. Suppressing consistency checks
      is a bad idea.
      
      PageBulk::needs_finish(): New predicate: Determine whether
      PageBulk::finish() must fix up the page.
      
      PageBulk::init(): Clear PAGE_DIRECTION to ensure that needs_finish()
      will hold. We change the field from PAGE_NO_DIRECTION to 0
      and back without writing redo log. This trick avoids the need
      to introduce any new data member to PageBulk.
      
      PageBulk::insert(): Replace some high-level accessors to bypass
      debug assertions related to PAGE_HEAP_TOP that we will be violating
      until finish() has been executed.
      
      PageBulk::finish(): Tolerate m_rec_no==0. We must invoke this also
      on an empty page, to ensure that PAGE_HEAP_TOP is initialized.
      
      PageBulk::commit(): Always invoke finish().
      
      PageBulk::release(), BtrBulk::pageSplit(), BtrBulk::storeExt(),
      BtrBulk::finish(): Invoke PageBulk::finish().
      147d4b1e
  2. 15 Jul, 2020 9 commits
    • Marko Mäkelä's avatar
      Make page validation stricter · fee11c77
      Marko Mäkelä authored
      page_simple_validate_old(), page_simple_validate_new():
      Require PAGE_N_DIR_SLOTS to be at least 2.
      fee11c77
    • Marko Mäkelä's avatar
      MDEV-23183 Infinite loop on page_validate() on corrupted page · 38b4c078
      Marko Mäkelä authored
      MDEV-22721 (commit eba2d10a)
      inadvertently introduced an infinite loop.
      
      page_validate(): Remove the infinite loop.
      38b4c078
    • Daniel Black's avatar
      MDEV-23175: my_timer_milliseconds ftime deprecated - clock_gettime replacement · 20512a68
      Daniel Black authored
      Linux glibc has deprecated ftime resutlting in a compile error on Fedora-32.
      
      Per manual clock_gettime is the suggested replacement. Because my_timer_milliseconds
      is a relative time used by largely the perfomrance schema, CLOCK_MONOTONIC_COARSE
      is used. This has been available since Linux-2.6.32.
      
      The low overhead is shows in the unittest:
      
          $ unittest/mysys/my_rdtsc-t
          1..11
          # ----- Routine ---------------
          # myt.cycles.routine          :             5
          # myt.nanoseconds.routine     :            11
          # myt.microseconds.routine    :            13
          # myt.milliseconds.routine    :            18
          # myt.ticks.routine           :            17
          # ----- Frequency -------------
          # myt.cycles.frequency        :    3596597014
          # myt.nanoseconds.frequency   :    1000000000
          # myt.microseconds.frequency  :       1000000
          # myt.milliseconds.frequency  :          1039
          # myt.ticks.frequency         :           103
          # ----- Resolution ------------
          # myt.cycles.resolution       :             1
          # myt.nanoseconds.resolution  :             1
          # myt.microseconds.resolution :             1
          # myt.milliseconds.resolution :             1
          # myt.ticks.resolution        :             1
          # ----- Overhead --------------
          # myt.cycles.overhead         :           118
          # myt.nanoseconds.overhead    :           234
          # myt.microseconds.overhead   :           222
          # myt.milliseconds.overhead   :            30
          # myt.ticks.overhead          :          4946
          ok 1 - my_timer_init() did not crash
          ok 2 - The cycle timer is strictly increasing
          ok 3 - The cycle timer is implemented
          ok 4 - The nanosecond timer is increasing
          ok 5 - The nanosecond timer is implemented
          ok 6 - The microsecond timer is increasing
          ok 7 - The microsecond timer is implemented
          ok 8 - The millisecond timer is increasing
          ok 9 - The millisecond timer is implemented
          ok 10 - The tick timer is increasing
          ok 11 - The tick timer is implemented
      20512a68
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · e67daa56
      Marko Mäkelä authored
      e67daa56
    • Vladislav Vaintroub's avatar
      Fix compile warning · 9c8420fe
      Vladislav Vaintroub authored
      9c8420fe
    • Marko Mäkelä's avatar
      Revert MDEV-20453 (string_view) · ced3ec4c
      Marko Mäkelä authored
      In fsp_path_to_space_name(), we would access a byte right before
      the start of the string, tripping AddressSanitizer.
      
      This reverts commit d87006a1
      and commit a7634281.
      ced3ec4c
    • Marko Mäkelä's avatar
      Merge 10.3 into 10.4 · 9936cfd5
      Marko Mäkelä authored
      9936cfd5
    • Alexander Barkov's avatar
      MDEV-23162 Improve Protocol performance for numeric data · eb2eaba7
      Alexander Barkov authored
      Avoid character set conversion for numeric data in this scenario:
      
      SET NAMES utf8;
      CREATE OR REPLACE TABLE t1 (a INT);
      INSERT INTO t1 VALUES (1);
      SELECT a FROM t1;
      eb2eaba7
    • Alexander Barkov's avatar
      Preparatory changes for MDEV-23162 Improve Protocol performance for numeric data · be98036f
      Alexander Barkov authored
      - Renaming this virtual method store() to store_str():
          store(const char *str, size_t length, CHARSET_INFO *src_cs, CHARSET_INFO *dst_cs)
        We'll be adding more variants of store*() soon. This change will help to avoid
        ambiguities during overloading.
      
      - Adding a helper method store_ident().
      
      - Renaming store_str(const LEX_CSTRING &s...) to store_lex_cstring(),
        to avoid ambiguties during overloading.
      
      - Adding a helper method store() for backward compatibility, to avoid a lot of
        changes in the code now. But eventually we should replace store() to
        non-ambiguius methods store_str() or store_ident().
      
      - Adding a helper method Protocol::needs_conversion() and reusing it
        in two places.
      be98036f
  3. 14 Jul, 2020 15 commits
  4. 13 Jul, 2020 9 commits
  5. 12 Jul, 2020 1 commit
  6. 11 Jul, 2020 2 commits