1. 25 Nov, 2021 9 commits
  2. 24 Nov, 2021 12 commits
    • Marko Mäkelä's avatar
      MDEV-26674 follow-up: Bless Linux 5.15.3 · de7db551
      Marko Mäkelä authored
      In commit 1193a793 we
      set innodb_use_native_aio=OFF when using io_uring
      on a kernel where write requests could potentially be lost.
      
      The last reproducible issue was fixed in Linux 5.16-rc1
      https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v5.16-rc1&id=d3e3c102d107bb84251455a298cf475f24bab995
      and the fix was backported to 5.15.3.
      
      Hence, using a 5.16 or later kernel should be fine.
      The Debian kernel 5.15.0-1-amd64 (5.15.3-1) was tested.
      On Debian, utsname::release or uname -r does not reflect the
      exact minor version while utsname::version and uname -v does.
      
      On Fedora however the utsname::version is rather different:
      
        $ uname -r
        5.14.20-200.fc34.x86_64
        $ uname -v
        #1 SMP Thu Nov 18 22:03:20 UTC 2021
      
      As such we use the version, but fall back to the release if
      there isn't the beginnings of a kernel version in the version.
      
      Thanks to Daniel Black for reporting the Linux kernel bug and
      Jens Axboe for actually fixing it.
      Co-Authored-By: default avatarDaniel Black <daniel@mariadb.org>
      
      Closes: #1953
      de7db551
    • Robert Bindar's avatar
    • Eric Herman's avatar
      Remove DYNAMIC_ARRAY get_index_dynamic() · 6a282df0
      Eric Herman authored
      The DYNAMIC_ARRAY copies values in and copies values out. Without a
      comparitor function, get_index_dynamic() does not make sense.
      
      This function is not used. If we have a need for a function like it
      in the future, I propose we write a new one with unit tests showing
      how it is used and demostrating that it behaves as expected.
      6a282df0
    • Sergei Krivonos's avatar
      Json_writer_object add integers · cba065f4
      Sergei Krivonos authored
      cba065f4
    • Sergei Krivonos's avatar
    • Marko Mäkelä's avatar
      Cleanup: offsetof instead of my_offsetof · b53ee760
      Marko Mäkelä authored
      Sys_lc_messages, Sys_lc_time_names: Use offsetof(MY_LOCALE, ...)
      because the type has standard layout.
      b53ee760
    • Marko Mäkelä's avatar
      MDEV-26682 fixup: GCC -Wunused-variable · 917b4210
      Marko Mäkelä authored
      917b4210
    • Marko Mäkelä's avatar
      PFS_events_statements cleanup: Use offsetof · 6b2b5108
      Marko Mäkelä authored
      The macro my_offsetof() performs pointer arithmetics that may be
      undefined behavior. As reported in MDEV-26272, it may cause
      clang -fsanitize=undefined to generate invalid memory references.
      
      struct PFS_events_statements: Convert to std::is_standard_layout
      by encapsulating the standard-layout struct PFS_events instead of
      deriving from it, so that the standard macro offsetof() can be used.
      
      PFS_events_statements::copy(): Renamed from copy_events_statements().
      A cast to void* is now needed in memcpy() to avoid GCC -Wclass-memaccess
      "writing to an object ... leaves 64 bytes unchanged".
      6b2b5108
    • Alexander Barkov's avatar
      MDEV-27042 UCA: Resetting contractions to ignorable does not work well · f9ad8072
      Alexander Barkov authored
      The weight scanner routine scanner_next() did not properly handle the cases
      when a contraction produces no weights (is ignorable).
      
      Adding a helper routine my_uca_scanner_set_weight() and using
      it in all cases:
      
      - A single ASCII character
      - A contraction starting with an ASCII character
      - A multi-byte character
      - A contraction starting with a multi-byte character
      
      Also adding two other helper routines:
      
      - my_uca_scanner_next_expansion_weight()
      - my_uca_scanner_set_weight_outside_maxchar()
      
      to avoid using scanner->wbeg directly inside scanner_next().
      This reduces the probability of similar future bugs.
      f9ad8072
    • Alexander Barkov's avatar
      Refactoring for MDEV-27042 and MDEV-27009 · 0a3d1d10
      Alexander Barkov authored
      This patch prepares the code for upcoming changes:
      
      MDEV-27009 Add UCA-14.0.0 collations
      MDEV-27042 UCA: Resetting contractions to ignorable does not work well
      
      1. Adding "const" qualifiers to return type and parameters in functions:
      - my_uca_contraction2_weight()
      - my_wmemcmp()
      - my_uca_contraction_weight()
      - my_uca_scanner_contraction_find()
      - my_uca_previous_context_find()
      - my_uca_context_weight_find()
      
      2. Adding a helper function my_uca_true_contraction_eq()
      
      3. Changing the way how scanner->wbeg is set during context weight handling.
         It was previously set inside functions:
         - my_uca_scanner_contraction_find()
         - my_uca_previous_context_find()
         Now it's set inside scanner_next(), which makes the code more symmetric
         for context-free and context-dependent sequences.
         This makes then upcoming fix for MDEV-27042 simpler.
      0a3d1d10
    • Marko Mäkelä's avatar
      Cleanup: offsetof instead of my_offsetof · 7e7235fa
      Marko Mäkelä authored
      mdl_hash_function(): Use plain offsetof; MDL_key has standard layout.
      7e7235fa
    • Daniel Black's avatar
      Debian: comment default config · 8d398710
      Daniel Black authored
      There's no need for Debian to set config items to their
      default. Left commented user, datadir and tmpdir as
      these may want to be changed. lc-messages and skip-external-locks
      are so infrequently set even listing them looks overly verbose.
      
      socket left uncommented in [client-server] as various client
      implementations may have different defaults compiled in.
      8d398710
  3. 23 Nov, 2021 3 commits
  4. 20 Nov, 2021 1 commit
    • Marko Mäkelä's avatar
      MDEV-27058 fixup: Fix MemorySanitizer, and GCC 4.8.5 ICE on ARMv8 · 9436c778
      Marko Mäkelä authored
      buf_LRU_scan_and_free_block(): It turns out that even with
      -fno-expensive-optimizations, GCC 4.8.5 may fail to split an instruction.
      For the non-embedded server, -O1 would fail and -Og would seem to work,
      while the embedded server build seems to require -O0.
      
      buf_block_init(): Correct the MemorySanitizer instrumentation.
      
      buf_page_get_low(): Do not read dirty data from read-fixed blocks.
      These data races were identified by MemorySanitizer. If a read-fixed
      block is being accessed, we must acquire and release a page latch,
      so that the read-fix (and the exclusive page latch) will be released
      and it will be safe to read the page frame contents if needed,
      even before acquiring the final page latch. We do that in
      buf_read_ahead_linear() and for the allow_ibuf_merge check.
      
      mtr_t::page_lock(): Assert that the block is not read-fixed.
      9436c778
  5. 19 Nov, 2021 9 commits
  6. 18 Nov, 2021 6 commits