1. 21 Feb, 2018 5 commits
  2. 20 Feb, 2018 9 commits
    • Vladislav Vaintroub's avatar
      Make possible to use clang on Windows (clang-cl) · 56e7b7ea
      Vladislav Vaintroub authored
      -DWITH_ASAN can be used as well now, on x64
      
      Fix many clang-cl warnings.
      56e7b7ea
    • Galina Shalygina's avatar
      MDEV-14835 Server crashes in Field_iterator_table::create_item when number of · 9d97e601
      Galina Shalygina authored
      elements of BIGINT or YEAR type in the IN list reaches in_predicate_conversion_threshold
      
      The bug appears at the prepare stage when IN-predicate with the long list
      of values is converted into IN-subquery. It happens because values in the
      right operand of the IN-predicate that have BIGINT or YEAR types are converted
      into the Item_int_with_ref.
      To fix it in the procedure Item_func_in::create_value_list_for_tvc
      real_item() is taken for each value in the right operand of the IN-predicate.
      9d97e601
    • Marko Mäkelä's avatar
      MDEV-15158 On commit, do not write to the TRX_SYS page · 947efe17
      Marko Mäkelä authored
      This is based on a prototype by
      Thirunarayanan Balathandayuthapani <thiru@mariadb.com>.
      
      Binlog and Galera write-set replication information was written into
      TRX_SYS page on each commit. Instead of writing to the TRX_SYS during
      normal operation, InnoDB can make use of rollback segment header pages,
      which are already being written to during a commit.
      
      The following list of fields in rollback segment header page are added:
          TRX_RSEG_BINLOG_OFFSET
          TRX_RSEG_BINLOG_NAME (NUL-terminated; empty name = not present)
          TRX_RSEG_WSREP_XID_FORMAT (0=not present; 1=present)
          TRX_RSEG_WSREP_XID_GTRID
          TRX_RSEG_WSREP_XID_BQUAL
          TRX_RSEG_WSREP_XID_DATA
      
      trx_sys_t: Introduce the fields
      recovered_binlog_filename, recovered_binlog_offset, recovered_wsrep_xid.
      
      To facilitate upgrade from older mysql or mariaDB versions, we will read
      the information in TRX_SYS page. It will be overridden by the
      information that we find in rollback segment header pages.
      
      Mariabackup --prepare will read the metadata from the rollback
      segment header pages via trx_rseg_array_init(). It will still
      not read any undo log pages or recover any transactions.
      947efe17
    • Marko Mäkelä's avatar
    • Eugene Kosov's avatar
      remove uint · d4822bef
      Eugene Kosov authored
      d4822bef
    • Marko Mäkelä's avatar
      Fix the Windows build · cd63f43c
      Marko Mäkelä authored
      my_atomic_load32() expects a pointer to non-const on Windows.
      cd63f43c
    • Eugene Kosov's avatar
      ASAN unpoison system versioning related buffer · 8ed9ef54
      Eugene Kosov authored
      Fixes this report:
      ==3165==ERROR: AddressSanitizer: use-after-poison on address 0x61e0000270a0 at pc 0x00000114b78c bp 0x7f15d65fe120 sp 0x7f15d65fd8d0
      WRITE of size 1366 at 0x61e0000270a0 thread T28
          #0 0x114b78b in __asan_memcpy fun/cpp_projects/llvm_toolchain/llvm/projects/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc:23
          #1 0x208208d in TABLE::init(THD*, TABLE_LIST*) work/mariadb/sql/table.cc:4662:3
          #2 0x19df85b in open_table(THD*, TABLE_LIST*, Open_table_context*) work/mariadb/sql/sql_base.cc:1993:10
          #3 0x19eb968 in open_and_process_table(THD*, LEX*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*) work/mariadb/sql/sql_base.cc:3483:14
          #4 0x19e7c05 in open_tables(THD*, DDL_options_st const&, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) work/mariadb/sql/sql_base.cc:4001:14
          #5 0x19f4dac in open_and_lock_tables(THD*, DDL_options_st const&, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) work/mariadb/sql/sql_base.cc:4879:7
          #6 0x1627263 in open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) work/mariadb/sql/sql_base.h:487:10
          #7 0x1c3839c in mysql_execute_command(THD*) work/mariadb/sql/sql_parse.cc:5113:13
          #8 0x1c1b72c in mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool) work/mariadb/sql/sql_parse.cc:7980:18
          #9 0x1c13464 in handle_bootstrap_impl(THD*) work/mariadb/sql/sql_parse.cc:1044:5
          #10 0x1c11ff7 in do_handle_bootstrap(THD*) work/mariadb/sql/sql_parse.cc:1096:3
          #11 0x1c11d14 in handle_bootstrap work/mariadb/sql/sql_parse.cc:1079:3
          #12 0x115a6ae in __asan::AsanThread::ThreadStart(unsigned long, __sanitizer::atomic_uintptr_t*) fun/cpp_projects/llvm_toolchain/llvm/projects/compiler-rt/lib/asan/asan_thread.cc:259
          #13 0x7f15fe1407fb in start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x77fb)
          #14 0x7f15fbb64b5e in clone /build/glibc-itYbWN/glibc-2.26/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:95
      8ed9ef54
    • Marko Mäkelä's avatar
      1fa14a7c
    • Marko Mäkelä's avatar
      Clarify the access to trx_sys.rseg_history_len · 60a68fdf
      Marko Mäkelä authored
      trx_sys_t::rseg_history_len: Make private, and clarify the
      documentation.
      
      trx_sys_t::history_size(): Read rseg_history_len.
      
      trx_sys_t::history_insert(), trx_sys_t::history_remove(),
      trx_sys_t::history_add(): Update rseg_history_len.
      60a68fdf
  3. 19 Feb, 2018 8 commits
  4. 18 Feb, 2018 2 commits
  5. 17 Feb, 2018 5 commits
    • Alexander Barkov's avatar
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · 970ce270
      Marko Mäkelä authored
      Disable the test encryption.innodb_encryption-page-compression
      because the wait_condition would seem to time out deterministically.
      MDEV-14814 has to be addressed in 10.2 separately.
      
      Datafile::validate_first_page(): Do not invoke
      page_size_t::page_size_t(flags) before validating the tablespace flags.
      This avoids a crash in MDEV-15333 innodb.restart test case.
      FIXME: Reduce the number of error messages. The first one is enough.
      970ce270
    • Marko Mäkelä's avatar
      MDEV-15333 MariaDB (still) slow start · 9a46d971
      Marko Mäkelä authored
      This performance regression was introduced in the MariaDB 10.1
      file format incompatibility bug fix MDEV-11623 (MariaDB 10.1.21
      and MariaDB 10.2.4) and partially fixed in MariaDB 10.1.25 in
      MDEV-12610 without adding a regression test case.
      
      On a normal startup (without crash recovery), InnoDB should not read
      every .ibd data file, because this is slow. Like in MySQL, for now,
      InnoDB will still open every data file (without reading), and it
      will read every .ibd file for which an .isl file exists, or the
      DATA DIRECTORY attribute has been specified for the table.
      
      The test case shuts down InnoDB, moves data files, replaces them
      with garbage, and then restarts InnoDB, expecting no messages to
      be issued for the garbage files. (Some messages will for now be
      issued for the table that uses the DATA DIRECTORY attribute.)
      Finally, the test shuts down the server, restores the old data files,
      and restarts again to drop the tables.
      
      fil_open_single_table_tablespace(): Remove the condition on flags,
      and only call fsp_flags_try_adjust() if validate==true
      (reading the first page has been requested). The only caller with
      validate==false is at server startup when we are processing all
      records from SYS_TABLES. The flags passed to this function are
      actually derived from SYS_TABLES.TYPE and SYS_TABLES.N_COLS,
      and there never was any problem with SYS_TABLES in MariaDB 10.1.
      The problem that MDEV-11623 was that incorrect tablespace flags
      were computed and written to FSP_SPACE_FLAGS.
      9a46d971
    • Daniel Black's avatar
      MDEV-10814: Innodb large allocations - madvise - Don't dump · b600f307
      Daniel Black authored
      Note: Linux only
      
      Core dumps of large buffer pool pages take time and space
      and pose potential data expose in scenarios where data-at-rest
      encryption is deployed.
      
      Here we use madvise(MADV_DONT_DUMP) on large memory allocations
      used by the innodb buffer pool, log_sys and recv_sys. The effect
      of this system call is that these memory areas will not appear in
      a core dump. Data from these buffers is rarely useful in fault
      diagnosis.
      
      log_sys and recv_sys structures now use large memory allocations
      for their large buffer.
      
      Debug builds don't include the madvise syscall and as such will
      include full core dumps.
      
      A function, buf_madvise_do_dump, is added but never called. It
      is there to be called from a debugger to re-enable the core
      dumping of all of these pages if for some reason the entire
      contents of these buffers are needed.
      
      Idea thanks to Hartmut Holzgraefe
      b600f307
    • Alexander Kuleshov's avatar
      merge two the same consistently 'if' clauses into one · afc56a50
      Alexander Kuleshov authored
      we have two the same 'if' clauses that check opt_bin_log argument
      in mysqld.cc and both clauses go successively one after another.
      Let's merge them into one
      afc56a50
  6. 16 Feb, 2018 11 commits