1. 26 May, 2020 5 commits
  2. 25 May, 2020 4 commits
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · ecc7f305
      Marko Mäkelä authored
      ecc7f305
    • Marko Mäkelä's avatar
      MDEV-17092 use-after-poison around lock_trx_handle_wait_low · 5530a93f
      Marko Mäkelä authored
      There was a race condition where the connection of the
      victim of a KILL statement is disconnected while the
      KILL statement is executing.
      
      As a side effect of this fix, we will make XA PREPARE
      transactions immune to KILL statements.
      
      Starting with MariaDB 10.2, we have a pool of trx_t objects.
      trx_free() would only free memory to the pool. We poison the
      contents of freed objects in the pool in order to catch misuse.
      
      trx_free(): Unpoison also trx->mysql_thd and trx->state.
      This is to counter the poisoning of *trx in trx_pools->mem_free().
      Unpoison only on AddressSanitizer or Valgrind, but not on MemorySanitizer.
      
      Pool: Unpoison allocated objects only on AddressSanitizer or
      Valgrind, but not on MemorySanitizer.
      
      innobase_kill_query(): Properly protect trx, acquiring also
      trx_sys_t::mutex and checking trx_t::mysql_thd and trx_t::state.
      5530a93f
    • Marko Mäkelä's avatar
      MDEV-22545 post-fix: Fix a test result · e2c74938
      Marko Mäkelä authored
      commit cf52dd17 failed to
      adjust the result of the test main.mysqldump.
      e2c74938
    • Varun Gupta's avatar
      MDEV-22461: JOIN::make_aggr_tables_info(): Assertion `select_options & (1ULL << 17)' failed. · 4a6b28c7
      Varun Gupta authored
      A temporary table is needed for window function computation but if only a NAMED WINDOW SPEC
      is used and there is no window function, then there is no need to create a temporary
      table as there is no stage to compute WINDOW FUNCTION
      4a6b28c7
  3. 24 May, 2020 1 commit
  4. 23 May, 2020 2 commits
    • Monty's avatar
      Fixed compiler failure on windows · d8e2fa0c
      Monty authored
      d8e2fa0c
    • Monty's avatar
      Fixed deadlock with LOCK TABLES and ALTER TABLE · be647ff1
      Monty authored
      MDEV-21398 Deadlock (server hang) or assertion failure in
      Diagnostics_area::set_error_status upon ALTER under lock
      
      This failure could only happen if one locked the same table
      multiple times and then did an ALTER TABLE on the table.
      
      Major change is to change all instances of
      table->m_needs_reopen= true;
      to
      table->mark_table_for_reopen();
      
      The main fix for the problem was to ensure that we mark all
      instances of the table in the locked_table_list and when we
      reopen the tables, we first close all tables before reopening
      and locking them.
      
      Other things:
      - Don't call thd->locked_tables_list.reopen_tables if there
        are no tables marked for reopen. (performance)
      be647ff1
  5. 22 May, 2020 5 commits
    • Alexander Barkov's avatar
      MDEV-14221 Assertion `0' failed in Item::field_type_for_temporal_comparison · ea7830ee
      Alexander Barkov authored
      Item_null_result did not override type_handler() because of a wrong merge
      of d8a9b524 (MDEV-14221) from 10.1.
      
      Overriding type_handler().
      
      Removing the old style field_type() method. It's not relevant any more.
      ea7830ee
    • Monty's avatar
      Don't crash if creating sequence under XA · 736ca143
      Monty authored
      MDEV-22002 Assertion `!is_set() || (m_status == DA_OK_BULK &&
      is_bulk_op())' failed upon CREATE TEMPORARY SEQUENCE under XA
      736ca143
    • Alexander Barkov's avatar
      MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets... · 6462af1c
      Alexander Barkov authored
      MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
      
      Additional 10.2 specific tests (with JSON)
      6462af1c
    • Alexander Barkov's avatar
      bdab5b66
    • Alexander Barkov's avatar
      MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets... · cb9c49a9
      Alexander Barkov authored
      MDEV-22111 ERROR 1064 & 1033 and SIGSEGV on CREATE TABLE w/ various charsets on 10.4/5 optimized builds | Assertion `(uint) (table_check_constraints - share->check_constraints) == (uint) (share->table_check_constraints - share->field_check_constraints)' failed
      
      The code incorrectly assumed in multiple places that TYPELIB
      values cannot have 0x00 bytes inside. In fact they can:
      
        CREATE TABLE t1 (a ENUM(0x61, 0x0062) CHARACTER SET BINARY);
      
      Note, the TYPELIB value encoding used in FRM is ambiguous about 0x00.
      
      So this fix is partial.
      
      It fixes 0x00 bytes in many (but not all) places:
      
      - In the middle or in the end of a value:
          CREATE TABLE t1 (a ENUM(0x6100) ...);
          CREATE TABLE t1 (a ENUM(0x610062) ...);
      
      - In the beginning of the first value:
          CREATE TABLE t1 (a ENUM(0x0061));
          CREATE TABLE t1 (a ENUM(0x0061), b ENUM('b'));
      
      - In the beginning of the second (and following) value of the *last* ENUM/SET
        in the table:
      
          CREATE TABLE t1 (a ENUM('a',0x0061));
          CREATE TABLE t1 (a ENUM('a'), b ENUM('b',0x0061));
      
      However, it does not fix 0x00 when:
      
      - 0x00 byte is in the beginning of a value of a non-last ENUM/SET
        causes an error:
      
         CREATE TABLE t1 (a ENUM('a',0x0061), b ENUM('b'));
         ERROR 1033 (HY000): Incorrect information in file: './test/t1.frm'
      
        This is an ambuguous case and will be fixed separately.
        We need a new TYPELIB encoding to fix this.
      
      Details:
      
      - unireg.cc
      
        The function pack_header() incorrectly used strlen() to detect
        a TYPELIB value length. Adding a new function typelib_values_packed_length()
        which uses TYPELIB::type_lengths[n] to detect the n-th value length,
        and reusing the new function in pack_header() and packed_fields_length()
      
      - table.cc
        fix_type_pointers() assumed in multiple places that values cannot have
        0x00 inside and used strlen(TYPELIB::type_names[n]) to set
        the corresponding TYPELIB::type_lengths[n].
      
        Also, fix_type_pointers() did not check the encoded data for consistency.
      
        Rewriting fix_type_pointers() code to populate TYPELIB::type_names[n] and
        TYPELIB::type_lengths[n] at the same time, so no additional loop
        with strlen() is needed any more.
      
        Adding many data consistency tests.
      
        Fixing the main loop in fix_type_pointers() to use memchr() instead of
        strchr() to handle 0x00 properly.
      
        Fixing create_key_infos() to return the result in a LEX_STRING rather
        that in a char*.
      cb9c49a9
  6. 21 May, 2020 1 commit
    • Daniele Sciascia's avatar
      MDEV-22616 CHECK TABLE fails with wsrep_trx_fragment_size > 0 (#1551) · dc22acfd
      Daniele Sciascia authored
      Executing CHECK TABLE  with streaming replication enabled reports
      error "Streaming replication not supported with
      binlog_format=STATEMENT".
      Administrative commands such as CHECK TABLE, are not replicated and
      temporarily set binlog format to statement.
      To avoid the problem, report the error only for active transactions
      for which streaming replication is enabled.
      dc22acfd
  7. 20 May, 2020 20 commits
  8. 19 May, 2020 2 commits