1. 16 Jul, 2020 3 commits
    • Julius Goryavsky's avatar
      MDEV-20401: revert unnecessary change · a1e52e7f
      Julius Goryavsky authored
      a1e52e7f
    • Julius Goryavsky's avatar
      MDEV-20401: Server incorrectly auto-sets lower_case_file_system value · b3cae9db
      Julius Goryavsky authored
      Server auto-sets lower_case_file_system value based on default
      datadir's behavior instead of instead of using the directory specified
      by the user through the configuration file or command line options.
      
      This patch fixes this problem.
      b3cae9db
    • 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 3 commits
  3. 14 Jul, 2020 9 commits
  4. 13 Jul, 2020 2 commits
  5. 12 Jul, 2020 1 commit
  6. 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
  7. 09 Jul, 2020 2 commits
  8. 07 Jul, 2020 2 commits
  9. 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
  10. 02 Jul, 2020 4 commits
  11. 01 Jul, 2020 9 commits
    • Marko Mäkelä's avatar
      MDEV-20377: Fix -Wunused-but-set-variable · 69df4f83
      Marko Mäkelä authored
      69df4f83
    • Vladislav Vaintroub's avatar
      MDEV-23067 Windows : manually registered services rejected mysql_upgrade_service · 41b0d98e
      Vladislav Vaintroub authored
      - service not using "--defaults-file" can have any name not just "MySQL"
      - service with "--defaults-file", without datadir in them
      use default datadir (install_root\data)
      41b0d98e
    • Marko Mäkelä's avatar
      be517384
    • Marko Mäkelä's avatar
      MDEV-20377: Make WITH_MSAN more usable · c36834c8
      Marko Mäkelä authored
      MemorySanitizer (clang -fsanitize=memory) requires that all code
      be compiled with instrumentation enabled. The only exception is the
      C runtime library. Failure to use instrumented libraries will cause
      bogus messages about memory being uninitialized.
      
      In WITH_MSAN builds, we must avoid calling getservbyname(),
      because even though it is a standard library function, it is
      not instrumented, not even in clang 10.
      
      Note: Before MariaDB Server 10.5, ./mtr will typically fail
      due to the old PCRE library, which was updated in MDEV-14024.
      
      The following cmake options were tested on 10.5
      in commit 94d0bb4d:
      
      cmake \
      -DCMAKE_C_FLAGS='-march=native -O2' \
      -DCMAKE_CXX_FLAGS='-stdlib=libc++ -march=native -O2' \
      -DWITH_EMBEDDED_SERVER=OFF -DWITH_UNIT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug \
      -DWITH_INNODB_{BZIP2,LZ4,LZMA,LZO,SNAPPY}=OFF \
      -DPLUGIN_{ARCHIVE,TOKUDB,MROONGA,OQGRAPH,ROCKSDB,CONNECT,SPIDER}=NO \
      -DWITH_SAFEMALLOC=OFF \
      -DWITH_{ZLIB,SSL,PCRE}=bundled \
      -DHAVE_LIBAIO_H=0 \
      -DWITH_MSAN=ON
      
      MEM_MAKE_DEFINED(): An alias for VALGRIND_MAKE_MEM_DEFINED()
      and __msan_unpoison().
      
      MEM_GET_VBITS(), MEM_SET_VBITS(): Aliases for
      VALGRIND_GET_VBITS(), VALGRIND_SET_VBITS(), __msan_copy_shadow().
      
      InnoDB: Replace the UNIV_MEM_ macros with corresponding MEM_ macros.
      
      ut_crc32_8_hw(), ut_crc32_64_low_hw(): Use the compiler built-in
      functions instead of inline assembler when building WITH_MSAN.
      This will require at least -msse4.2 when building for IA-32 or AMD64.
      The inline assembler would not be instrumented, and would thus cause
      bogus failures.
      c36834c8
    • Sergei Golubchik's avatar
      MDEV-21222 mariabackup.incremental_backup failed with memory allocation failure · 5a097c55
      Sergei Golubchik authored
      mariabackup tries to allocate a buffer of page_size*page_size/4 size.
      for 64k page it means 1Gb, which doesn't work very well on 32-bit builders.
      
      Skip the 64k page test on 32bit.
      5a097c55
    • Marko Mäkelä's avatar
      9ed50ece
    • Vladislav Vaintroub's avatar
      MDEV-23052 mysql_install_db.exe can run on existing non-empty directory, · fe05c16c
      Vladislav Vaintroub authored
      and remove it on error
      
      Disable existing non-empty datadir for mysql_install_db.exe
      fe05c16c
    • Marko Mäkelä's avatar
      Merge 10.1 into 10.2 · ea2bc974
      Marko Mäkelä authored
      ea2bc974
    • Varun Gupta's avatar
      MDEV-22852: SIGSEGV in sortlength (optimized builds) · fbfb5b5f
      Varun Gupta authored
      The issue here is for a DEPENDENT subquery that has an aggregate function in the ORDER BY clause,
      is wrapped inside an Item_aggregate_ref. For computation of ORDER BY we need to refer to the
      temp table field corresponding to this item. But in the function make_sortorder, we were
      explicitly casting Item_aggrgate_ref to Item_sum, which leads to us not getting the temp
      table field corresponding to the item.
      fbfb5b5f