1. 16 Jan, 2020 7 commits
    • Sergei Golubchik's avatar
      fix compilation w/o perfschema · e7558d47
      Sergei Golubchik authored
      followup for 3a3605f4
      e7558d47
    • Sergei Golubchik's avatar
      compatibility with pcre2 < 10.30 · fc5a6a28
      Sergei Golubchik authored
      * It uses stack a lot, limit the recursion depth like
        we used to do for pcre.
      * But don't do that for newer pcre2 that uses stack very little
        (and doesn't support limiting recursion depth anyway).
      * Fix tests to verify only that deep recursion doesn't crash, but
        ignore results and warnings (which depend on pcre2 version)
      * Also different pcre2 versions report different offset in error messages,
        take that into account.
      fc5a6a28
    • Sergei Golubchik's avatar
      mysqltest crashes on Debian · ff5a528f
      Sergei Golubchik authored
      Debian is apparently offended that pcre2-posix implements POSIX API,
      thus it renames all posix-compatible symbols in libpcre2-posix to have the
      PCRE2 prefix. But Debian doesn't do anything to pcre2posix.h header,
      so any unaware application will get POSIX compatible type names
      and function prototypes from pcre2, but actual symbols will come
      from libc.
      
      To remedy this enormous incongruity we have to redefine POSIX-compatible
      function names in pcre2posix to match Debian's hack.
      ff5a528f
    • Sergei Golubchik's avatar
    • Vladislav Vaintroub's avatar
      MDEV-21501 Innodb AIO: release IO slots early in io_callback · 0b8b84d8
      Vladislav Vaintroub authored
      prevent potential stalls for when all slots are used up, and all io threads
      are used up, and io callbacks are slow.
      0b8b84d8
    • Alexander Barkov's avatar
      A cleanup for MDEV-16542 Fix ALTER TABLE FORCE to upgrade temporal types · c32fd509
      Alexander Barkov authored
      Removing redundant space character after the data type comment
      in SHOW CREATE TABLE, so the output changes from e.g.:
      
        a TIME /* mariadb-5.3 */  DEFAULT NULL
      
      to
      
        a TIME /* mariadb-5.3 */ DEFAULT NULL
      
      This is a prerequisite for MDEV-19906.
      c32fd509
    • Alexander Barkov's avatar
      MDEV-21497 Make Field_time, Field_datetime, Field_timestamp abstract · 497ee338
      Alexander Barkov authored
      - Making classes Field_time, Field_datetime, Field_timestamp abstract
      - Adding instantiable Field_time0, Field_datetime0, Field_timestamp0 classes
      - Removing redundant cast in field_conv.cc, item_timefunc.cc, sp.cc in calls for set_time() and get_timestamp()
      - Replacing store_TIME() to store_timestamp() in log.cc and removing redundant cast
      497ee338
  2. 14 Jan, 2020 1 commit
  3. 13 Jan, 2020 1 commit
  4. 12 Jan, 2020 5 commits
  5. 10 Jan, 2020 2 commits
  6. 09 Jan, 2020 3 commits
  7. 08 Jan, 2020 6 commits
  8. 07 Jan, 2020 15 commits
    • Eugene Kosov's avatar
      MDEV-18115 fix counter · 3d9759a9
      Eugene Kosov authored
      3d9759a9
    • Sujatha's avatar
      Merge branch '10.1' into 10.2 · 8317f77c
      Sujatha authored
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events
      
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> reports following assert when ASAN is enabled.
      
      uint32 binlog_get_uncompress_len(const char*):
        Assertion `(buf[0] & 0xe0) == 0x80' failed
      
      Fix:
      ===
      **Part11: Converted debug assert to error handler code**
      8317f77c
    • Sujatha's avatar
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events · cb204e11
      Sujatha authored
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> reports following ASAN error.
      
      AddressSanitizer: heap-buffer-overflow on address
      READ of size 1 at 0x60e00009cf71 thread T28
      #0 0x55e37e034ae2 in net_field_length
      
      Fix:
      ===
      **Part10: Avoid reading out of buffer**
      cb204e11
    • Sujatha's avatar
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events · d05c511d
      Sujatha authored
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> reports following assert when ASAN is enabled.
      
      Query_log_event::Query_log_event(const char*, uint,
          const Format_description_log_event*, Log_event_type):
        Assertion `(pos) + (6) <= (end)' failed
      
      Fix:
      ===
      **Part9: Removed additional DBUG_ASSERT**
      d05c511d
    • Sujatha's avatar
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events · bac33533
      Sujatha authored
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> reports following ASAN error
      
      AddressSanitizer: SEGV on unknown address
      The signal is caused by a READ memory access.
      User_var_log_event::User_var_log_event(char const*, unsigned int,
          Format_description_log_event const*)
      
      Implemented part of upstream patch.
      commit: mysql/mysql-server@a3a497ccf7ecacc900551fb1e47ea4078b45c351
      
      Fix:
      ===
      **Part8: added checks to avoid reading out of buffer limits**
      bac33533
    • Sujatha's avatar
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events · 2187f1c2
      Sujatha authored
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> reports following ASAN error
      "heap-buffer-overflow on address" and some times it asserts.
      
      Table_map_log_event::Table_map_log_event(const char*, uint,
          const Format_description_log_event*)
      Assertion `m_field_metadata_size <= (m_colcnt * 2)' failed.
      
      Fix:
      ===
      **Part7: Avoid reading out of buffer**
      
      
      Converted debug assert to error handler code.
      2187f1c2
    • Sujatha's avatar
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events · d6fa69e4
      Sujatha authored
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> reports following ASAN error
      
      AddressSanitizer: heap-buffer-overflow on address 0x60400002acb8
      Load_log_event::copy_log_event(char const*, unsigned long, int,
          Format_description_log_event const*)
      
      Fix:
      ===
      **Part6: Moved the event_len validation to the begin of copy_log_event function**
      d6fa69e4
    • Sujatha's avatar
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events · 15781283
      Sujatha authored
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> reports following ASAN error
      
      AddressSanitizer: heap-buffer-overflow on address
      String::append(char const*, unsigned int)
      Query_log_event::pack_info(Protocol*)
      
      Fix:
      ===
      **Part5: Added check to catch buffer overflow**
      15781283
    • Sujatha's avatar
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events · a42ef108
      Sujatha authored
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> reports following ASAN error
      
      heap-buffer-overflow within "my_strndup" in Rotate_log_event
      
      my_strndup /mysys/my_malloc.c:254
      Rotate_log_event::Rotate_log_event(char const*, unsigned int,
          Format_description_log_event const*)
      
      Fix:
      ===
      **Part4: Improved the check for event_len validation**
      a42ef108
    • Sujatha's avatar
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events · 5a54e84e
      Sujatha authored
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> reports following crash when ASAN is enabled.
      
      SEGV on unknown address
      in inline_mysql_mutex_destroy
      in my_bitmap_free
      in Update_rows_log_event::~Update_rows_log_event()
      
      Fix:
      ===
      **Part3: Initialize m_cols_ai.bitmap to NULL**
      5a54e84e
    • Sujatha's avatar
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events · 913f405d
      Sujatha authored
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> reports following assert when ASAN is enabled.
      
      Rows_log_event::Rows_log_event(const char*, uint,
          const Format_description_log_event*):
      Assertion `var_header_len >= 2'
      
      Implemented part of upstream patch.
      commit: mysql/mysql-server@a3a497ccf7ecacc900551fb1e47ea4078b45c351
      
      Fix:
      ===
      **Part2: Avoid reading out of buffer limits**
      913f405d
    • Sujatha's avatar
      MDEV-18046: Assortment of crashes, assertion failures and ASAN errors in mysql_show_binlog_events · a6dd827a
      Sujatha authored
      Problem:
      ========
      SHOW BINLOG EVENTS FROM <pos> causes a variety of failures, some of which are
      listed below. It is not a race condition issue, but there is some
      non-determinism in it.
      
      Analysis:
      ========
      "show binlog events from <pos>" code considers the user given position as a
      valid event start position. The code starts reading data from this event start
      position onwards and tries to map it to a set of known events. Each event has
      a specific event structure and asserts have been added to ensure that read
      event data satisfies the event specific requirements. When a random position
      is supplied to "show binlog events command" the event structure specific
      checks will fail and they result in assert.
      
      Fix:
      ====
      The fix is split into different parts. Each part addresses either an ASAN
      issue or an assert/crash.
      
      **Part1: Checksum based position validation when checksum is enabled**
      
      
      Using checksum validate the very first event read at the user specified
      position. If there is a checksum mismatch report an appropriate error for the
      invalid event.
      a6dd827a
    • Marko Mäkelä's avatar
      Fixup MDEV-21429: Correct a definition · 0b4ae672
      Marko Mäkelä authored
      INNOBASE_ALTER_NOVALIDATE: Remove the set of operations
      INNOBASE_ONLINE_CREATE that was accidentally included in the
      definition.
      
      In the merge of 82187a12 to 10.3
      (in commit eda71979) the flags
      were defined correctly.
      
      This bug was caught by the test innodb_zip.index_large_prefix.
      0b4ae672
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 68fe5f53
      Marko Mäkelä authored
      68fe5f53
    • Marko Mäkelä's avatar
      MDEV-20839 encryption.innodb-redo-badkey sporadically fails on buildbot with page dump · d2697dfb
      Marko Mäkelä authored
      The test encryption.innodb-redo-badkey will by design cause access
      to pages that appear corrupted (due to incorrect encryption key).
      Let us disable the page dumps by requiring the test to be run on
      a debug server. Page dumps on debug builds were already disabled
      in MDEV-19766.
      d2697dfb