1. 17 Jul, 2020 1 commit
  2. 16 Jul, 2020 2 commits
    • 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
  3. 15 Jul, 2020 3 commits
  4. 14 Jul, 2020 10 commits
  5. 13 Jul, 2020 2 commits
  6. 12 Jul, 2020 1 commit
  7. 10 Jul, 2020 1 commit
    • Rucha Deodhar's avatar
      MDEV-19119: main.ssl_crl fails in buildbot with wrong error code · f81ff932
      Rucha Deodhar authored
      The client can only find out if the server has disconnected when it tries to
      read or send something. If the server gets disconnected before
      send_client_reply_packet(), the client will try sending authentication
      information but it will fail. But, if the client is fast enough to send
      autentication information before disconnecting, it will notice that when
      reading the ok packet. So the client can fail on read or on write.
      It is unpredictable because, the process are unsynchronized and this
      could happen in any order.
      f81ff932
  8. 09 Jul, 2020 2 commits
  9. 07 Jul, 2020 2 commits
  10. 06 Jul, 2020 4 commits
    • Rucha Deodhar's avatar
      MDEV-22654: Assertion `!is_set() || (m_status == DA_OK_BULK && is_bulk_op())' · a5366255
      Rucha Deodhar authored
      failed in Diagnostics_area::set_ok_status on FUNCTION replace
      
      When there is REPLACE in the statement, sp_drop_routine_internal() returns
      0 (SP_OK) on success which is then assigned to ret. So ret becomes false
      and the error state is lost. The expression inside DBUG_ASSERT()
      evaluates to false and thus the assertion failure.
      a5366255
    • Vladislav Vaintroub's avatar
      MDEV-23098 mariadb-upgrade-service.exe does not work on WAMPServer · cad9a9b1
      Vladislav Vaintroub authored
      While trying to detect datadir, take into account that one can use
      Windows service name as section name in options file, for Windows service.
      
      The historical obscurity is being used by WAMP installations.
      cad9a9b1
    • Varun Gupta's avatar
      MDEV-22390: Assertion `m_next_rec_ptr >= m_rawmem' failed in... · 6163af93
      Varun Gupta authored
      MDEV-22390: Assertion `m_next_rec_ptr >= m_rawmem' failed in Filesort_buffer::spaceleft | SIGSEGV in __memmove_avx_unaligned_erms from my_b_write
      
      Make sure that the sort_buffer that is allocated has atleast space for MERGEBUFF2 keys.
      The issue here was that the record length is quite high and sort buffer size is very small,
      due to which we end up with zero number of keys in the sort buffer. The Sort_param::max_keys_per_buffer
      was zero in such a case, due to which we were flushing empty sort_buffer to the disk.
      6163af93
    • Daniel Black's avatar
      MDEV-22173: socket accept - test for failure · 3efdac20
      Daniel Black authored
      accept might return an error, including SOCKET_EAGAIN/
      SOCKET_EINTR. The caller, usually handle_connections_sockets
      can these however and invalid file descriptor isn't something
      to call fcntl on.
      
      Thanks to Etienne Guesnet (ATOS) for diagnosis,
      sample patch description and testing.
      3efdac20
  11. 05 Jul, 2020 1 commit
    • Marko Mäkelä's avatar
      One more ASAN/MSAN cleanup · f3f23b5c
      Marko Mäkelä authored
      commit 48493132 included a
      workaround for a 10.5 merge issue that should now be properly
      addressed in commit ab406990.
      
      buf_chunk_init(): Remove an unnecessary MEM_MAKE_ADDRESSABLE().
      We might invoke MEM_UNDEFINED() here, but actually the allocated
      memory ought to be guaranteed to be zero-initialized.
      f3f23b5c
  12. 04 Jul, 2020 1 commit
    • Marko Mäkelä's avatar
      Fixup the parent commit for MSAN and Valgrind · 453dc4b3
      Marko Mäkelä authored
      commit 48493132 was a necessary
      fix for the buffer pool resizing tests in 10.5 in
      AddressSanitizer. However, that change would break the tests
      innodb.innodb_buffer_pool_resize and
      innodb.innodb_buffer_pool_resize_with_chunks
      when run in MemorySanitizer, or presumably in Valgrind as well.
      (Those tests run "forever" in Valgrind.)
      
      buf_pool_resize(): Cancel the effect of MEM_NOACCESS() in Valgrind
      and ASAN. In MSAN, MEM_NOACCESS() is a no-op, and hence we must do
      nothing special here.
      
      MEM_MAKE_ADDRESSABLE() would declare the memory contents undefined.
      In this particular case, we must actually declare the contents
      defined for Valgrind.
      453dc4b3
  13. 03 Jul, 2020 1 commit
  14. 02 Jul, 2020 9 commits
    • Monty's avatar
      6e81ba0c
    • Monty's avatar
      Fixed errors found by MSAN · 53ecc354
      Monty authored
      53ecc354
    • Marko Mäkelä's avatar
      MDEV-20377 post-fix: Introduce MEM_MAKE_ADDRESSABLE · b6ec1e8b
      Marko Mäkelä authored
      In AddressSanitizer, we only want memory poisoning to happen
      in connection with custom memory allocation or freeing.
      
      The primary use of MEM_UNDEFINED is for declaring memory uninitialized
      in Valgrind or MemorySanitizer. We do not want MEM_UNDEFINED to
      have the unwanted side effect that AddressSanitizer would no longer
      be able to complain about accessing unallocated memory.
      
      MEM_UNDEFINED(): Define as no-op for AddressSanitizer.
      
      MEM_MAKE_ADDRESSABLE(): Define as MEM_UNDEFINED() or
      ASAN_UNPOISON_MEMORY_REGION().
      
      MEM_CHECK_ADDRESSABLE(): Wrap also __asan_region_is_poisoned().
      b6ec1e8b
    • Monty's avatar
      Fixed bugs found by valgrind · 65f831d1
      Monty authored
      - Some of the bug fixes are backports from 10.5!
      - The fix in innobase/fil/fil0fil.cc is just a backport to get less
        error messages in mysqld.1.err when running with valgrind.
      - Renamed HAVE_valgrind_or_MSAN to HAVE_valgrind
      65f831d1
    • Monty's avatar
      Don't copy uninitialized bytes when copying varstrings · 29f9e679
      Monty authored
      When using field_conv(), which is called in case of field1=field2 copy in
      fill_records(), full varstring's was copied, including unitialized bytes.
      This caused valgrind to compilain about usage of unitialized bytes when
      using Aria static length records.
      Fixed by not using memcpy when copying varstrings but instead just copy
      the real bytes.
      29f9e679
    • Monty's avatar
      MDEV-22535 TABLE::initialize_quick_structures() takes 0.5% in oltp_read_only · 3f2044ae
      Monty authored
      - Removed not needed bzero in void TABLE::initialize_quick_structures().
      - Replaced bzero with TRASH_ALLOC() to have this change verfied with
        memory checkers
      - Added missing table->quick_keys.is_set in table_cond_selectivity()
      3f2044ae
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 1df1a639
      Marko Mäkelä authored
      1df1a639
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · dba7e1e8
      Marko Mäkelä authored
      dba7e1e8
    • Marko Mäkelä's avatar
      Revert "Fix result of merge." · c43a6666
      Marko Mäkelä authored
      This reverts commit e0793d38.
      
      In idiomatic C++, accessor functions should not discard qualifiers.
      c43a6666