1. 24 Apr, 2024 1 commit
  2. 05 Apr, 2024 2 commits
    • Alexander Barkov's avatar
      MDEV-33827 UUID() returns a NULL-able result · 9b02b7c7
      Alexander Barkov authored
      It was wrong to derive Item_func_uuid from Item_func_sys_guid,
      because the former is a function returning the UUID data type,
      while the latter is a string function returning VARCHAR.
      
      As a result of the wrong hierarchy, Item_func_uuid erroneously derived
      Item_str_func::fix_fields(), which contains this code:
      
        /*
          In Item_str_func::check_well_formed_result() we may set null_value
          flag on the same condition as in test() below.
        */
        if (thd->is_strict_mode())
          set_maybe_null();
      
      This code is not relevant to UUID() at all.
      A simple fix would be to set_maybe_null(false) in
      Item_func_uuid::fix_length_and_dec(). However,
      it'd fix only exactly this single consequence of the wrong
      class hierarchy, and similar bugs could appear again in
      the future. Moreover, we're going to add functions UUIDv4()
      and UUIDv7() soon (in 11.6). So it's better to fix the class hierarchy
      in the right way before adding these new functions.
      
      Fix:
      
      - Adding a new abstract class Item_fbt_func in the template
        in sql_type_fixedbin.h
      - Deriving Item_typecast_fbt from Item_fbt_func
      - Deriving Item_func_uuid from Item_fbt_func
      - Adding a new helper class UUIDv1. It derives from UUID, and additionally
        initializes the value to "UUID version 1" right in the constructor.
        Note, the new coming soon SQL functions UUIDv4() and UUIDv7()
        will also have corresponding classes UUIDv4 and UUIDv7.
      
      So now UUID() is a pure "returning UUID" function,
      like CAST(expr AS UUID) used to be, without any unintentional
      artifacts of functions returning VARCHAR/TEXT.
      
      Cleanup:
      - Removing the member Item_func_sys_guid::with_dashes,
        as it's not needed any more:
        * Item_func_sys_guid now does not have any descendants any more
        * Item_func_sys_guid::val_str() itself always displays without dashes
      9b02b7c7
    • Trevor Gross's avatar
      Update doxygen annotations in `plugin.h` · 0c0db46b
      Trevor Gross authored
      Add doxygen markup so comments get picked up. Also fix minor typos and
      expand documentation where relevant.
      Signed-off-by: default avatarTrevor Gross <tmgross@umich.edu>
      0c0db46b
  3. 26 Mar, 2024 1 commit
  4. 25 Mar, 2024 1 commit
  5. 23 Mar, 2024 1 commit
  6. 21 Mar, 2024 5 commits
  7. 18 Mar, 2024 1 commit
    • Vladislav Vaintroub's avatar
      MDEV-33519 Remove WITH_SSL=<custom_location_of_openssl> option · 14ec1536
      Vladislav Vaintroub authored
      This commit removes the WITH_SSL=<custom_location_of_openssl> option,
      leaving only -DWITH_SSL=bundled/system.
      
      The rationale behind this removal is as follows:
      
      1. The WITH_SSL=<custom_location_of_openssl> option is obscure
      and not widely used.
      
      2. There is no added value in this option compared to using
      OPENSSL_ROOT_DIR. In fact, the availability of "helpful" MySQL options
      might discourage users from exploring proper CMake options independently.
      
      3. Users may incorrectly assume full MySQL compatibility even with this
      option, including undocumented behaviors such as MySQL's preference for static libraries
      with WITH_SSL=<custom_location_of_openssl>.
      
      This change simplifies the configuration options and encourages users to
      adopt more standardized and documented practices.
      14ec1536
  8. 12 Mar, 2024 1 commit
    • Alexander Barkov's avatar
      MDEV-33621 Unify duplicate code in my_wildcmp_uca_impl() and my_wildcmp_unicode_impl() · 1e889a6e
      Alexander Barkov authored
      This is a refactoring patch, it does not change the behaviour.
      The MTR tests are being added only to cover the LIKE predicate better.
      (these tests should have been added earlier under terms of MDEV 9711).
      This patch does not need its own specific MTR tests.
      
      Moving the duplicate code into a new shared file ctype-wildcmp.inl
      and including it from multiple places, to define the following functions:
      
      - my_wildcmp_uca_impl(), in ctype-uca.c
      
        For utf8mb3, utf8mb4, ucs2, utf16, utf32, using cs->cset->mb_wc().
        For UCA based collations.
      
      - my_wildcmp_mb2_or_mb4_general_ci_impl(), in ctype-ucs2.c:
      
        For ucs2, utf16, utf32, using cs->cset->mb_wc().
        For general_ci-style collations:
            - xxx_general_ci
            - xxx_general_mysql500_ci
            - xxx_general_nopad_ci
      
      - my_wildcmp_mb2_or_mb4_bin_impl(), in ctype-ucs2.c:
      
        For ucs2, utf16, utf32, using cs->cset->mb_wc().
        For _bin collations:
            - xxx_bin
            - xxx_nopad_bin
      
      - my_wildcmp_utf8mb3_general_ci_impl(), in ctype-utf8.c
      
        Optimized for utf8mb3, using my_mb_wc_utf8mb3_quick().
      
        For general_ci-style collations:
            - utf8mb3_general_ci
            - utf8mb3_general_mysql500_ci
            - utf8mb3_general_nopad_ci
      
      - my_wildcmp_utf8mb4_general_ci_impl(), in ctype-utf8.c
      
        Optimized for utf8mb4, using my_mb_wc_utf8mb4_quick().
      
        For general_ci-style collations:
            - utf8mb4_general_ci
            - utf8mb4_general_nopad_ci
      1e889a6e
  9. 07 Mar, 2024 1 commit
    • Alexander Barkov's avatar
      Extra tests for MDEV-30716 Wrong casefolding in xxx_unicode_520_ci for U+0700..U+07FF · 9e7afa77
      Alexander Barkov authored
      New tests display additional information about characters from the BMP range:
      
      - A summary with a COUNT(*) for all distinct combinations of properties
        telling how the "=" and the "LIKE" predicates compare characters to their
        LOWER() and UPPER() variants.
      
      - A detailed list of trciky characters
        for which the "=" and the "LIKE" predicates compare
        LOWER(c)/UPPER(c) variants as not equal to just "c".
      
      Tricky characters include:
       - Turkish letters: ı - small dotless letter i
       - Croatian letters: precombined contractions for Dž, Dz, Lj, Nj
       - Units of measurement: Ω,K,Å (Ohm, Kelvin, Angstrom)
         These ones look very similar to Greek letter Omega,
         Latin letter Kra, Swedish/Finnish letter A with a ring above.
      9e7afa77
  10. 28 Feb, 2024 5 commits
    • Alexander Barkov's avatar
      MDEV-31531 Remove my_casedn_str() and my_caseup_str() · 929c2e06
      Alexander Barkov authored
      Under terms of MDEV 27490 we'll add support for non-BMP identifiers
      and upgrade casefolding information to Unicode version 14.0.0.
      In Unicode-14.0.0 conversion to lower and upper cases can increase octet length
      of the string, so conversion won't be possible in-place any more.
      
      This patch removes virtual functions performing in-place casefolding:
        - my_charset_handler_st::casedn_str()
        - my_charset_handler_st::caseup_str()
      and fixes the code to use the non-inplace functions instead:
        - my_charset_handler_st::casedn()
        - my_charset_handler_st::caseup()
      929c2e06
    • Vladislav Vaintroub's avatar
      MDEV-32841 Add tests for new counters. · de9c3572
      Vladislav Vaintroub authored
      Only add innodb_async_reads/writes_total_count here.
      For all other counters, writing reproducible tests is rather tricky.
      de9c3572
    • Vladislav Vaintroub's avatar
      MDEV-32841 - review fixes · 59df9f26
      Vladislav Vaintroub authored
      59df9f26
    • Vladislav Vaintroub's avatar
      MDEV-32841 Use chrono::duration<double> instead of chrono::duration<float> · f8bb99bf
      Vladislav Vaintroub authored
      Requested by Marko during review
      f8bb99bf
    • Vladislav Vaintroub's avatar
      MDEV-32841 Provide Innodb async IO statistics · 01466adc
      Vladislav Vaintroub authored
      Provide some statistics about asynchronous IO reads and writes:
       - number of pending operations
       - number of completion callbacks that are currently being executed
       - number of completion callbacks that are currently queued
         (due to restriction on number of IO threads)
       - total number of IOs finished
       - total time to wait for free IO slot
       - total number of completions that were queued.
      
      Also revert tpool InnoDB perfschema instrumentation (MDEV-31048)
      That instrumentation of cache mutex did not bring any revelation (
      the mutex is taken for a couple of instructions), and made it impossible
      to use tpool outside of the server (e.g in mariadbimport/dump)
      01466adc
  11. 21 Feb, 2024 1 commit
    • Yuchen Pei's avatar
      MDEV-28152 Features for sequences · 374783c3
      Yuchen Pei authored
      - Add `as <int_type>` to sequence creation options
        - int_type can be signed or unsigned integer types, including
          tinyint, smallint, mediumint, int and bigint
        - Limitation: when alter sequence as <new_int_type>, cannot have any
          other alter options in the same statement
        - Limitation: increment remains signed longlong, and the hidden
          constraint (cache_size x abs(increment) < longlong_max) stays for
          unsigned types. This means for bigint unsigned, neither
          abs(increment) nor (cache_size x abs(increment)) can be between
          longlong_max and ulonglong_max
      - Truncating maxvalue and minvalue from user input to the nearest max
        or min value of the type, plus or minus 1. When the truncation
        happens, a warning is emitted
      - Information schema table for sequences
      374783c3
  12. 17 Feb, 2024 3 commits
  13. 15 Feb, 2024 1 commit
  14. 14 Feb, 2024 9 commits
    • Sergei Golubchik's avatar
      update 32bit rdiffs · 3ae6680e
      Sergei Golubchik authored
      3ae6680e
    • Yuchen Pei's avatar
      MDEV-33441 Do not deinit plugin variables when retry requested · 068a6819
      Yuchen Pei authored
      After MDEV-31400, plugins are allowed to ask for retries when failing
      initialisation. However, such failures also cause plugin system
      variables to be deleted (plugin_variables_deinit()) before retrying
      and are not re-added during retry.
      
      We fix this by checking that if the plugin has requested a retry the
      variables are not deleted. Because plugin_deinitialize() also calls
      plugin_variables_deinit(), if the retry fails, the variables will
      still be deleted.
      
      Alternatives considered:
      
      - remove the plugin_variables_deinit() from plugin_initialize() error
      handling altogether. We decide to take a more conservative approach
      here.
      
      - re-add the system variables during retry. It is more complicated
      than simply iterating over plugin->system_vars and call
      my_hash_insert(). For example we will need to assign values to
      the test_load field and extract more code from test_plugin_options(),
      if that is possible.
      068a6819
    • Sergei Golubchik's avatar
      MDEV-31857 fix galera.MW-284 · fe07ac31
      Sergei Golubchik authored
      followup for abcd23ad
      fe07ac31
    • Sergei Golubchik's avatar
      MDEV-31857 fix galera.galera_var_notify_ssl_ipv6 · 8dee23cd
      Sergei Golubchik authored
      it was able to enable --ssl-verify-server-cert if explicily requested,
      now it can also disable it, if explicitly requested.
      8dee23cd
    • Monty's avatar
      Improve error message in mysqltest when sync_with_master fails · d6794aa4
      Monty authored
      In case of failure, the something like the following is now printed:
      
      Slave position:  file: binary.000004  position: 3647
      Master position: file: binary.000004  position: 3647
      d6794aa4
    • Monty's avatar
      MDEV-31404 Implement binlog_space_limit · 18dfcfde
      Monty authored
      binlog_space_limit is a variable in Percona server used to limit the total
      size of all binary logs.
      
      This implementation is based on code from Percona server 5.7.
      
      In MariaDB we decided to call the variable max-binlog-total-size to be
      similar to max-binlog-size. This makes it easier to find in the output
      from 'mariadbd --help --verbose'). MariaDB will also support
      binlog_space_limit for compatibility with Percona.
      
      Some internal notes to explain implementation notes:
      
      - When running MariaDB does not delete binary logs that are either
        used by slaves or have active xid that are not yet committed.
      
      Some implementation notes:
      
      - max-binlog-total-size is by default 0 (no limit).
      - max-binlog-total-size can be changed without server restart.
      - Binlog file sizes are checked on startup, or if
        max-binlog-total-size is set to a value > 0, not for every log write.
        The total size of all binary logs is cached and dynamically updated
        when updating the binary log on binary log rotation.
      - max-binlog-total-size is checked against existing log files during
        serverstart, binlog rotation, FLUSH LOGS, when writing to binary log
        or when max-binlog-total-size changes value.
      - Option --slave-connections-needed-for-purge with 1 as default added.
        This allows one to ensure that we do not delete binary logs if there
        is less than 'slave-connections-needed-for-purge' connected.
        Without this option max-binlog-total-size would potentially delete
        binlogs needed by slaves on server startup or when a slave disconnects
        as there are then no connected slaves to protect active binlogs.
      - PURGE BINARY LOGS TO ... will be executed as if
        slave-connectitons-needed-for-purge would be zero. In other words
        it will do the purge even if there is no slaves connected. If there
        are connected slaves working on the logs, these will be protected.
      - If binary log is on and max-binlog-total_size <> 0 then the status
        variable 'Binlog_disk_use' shows the current size of all old binary
        logs + the state of the current one.
      - Removed test of strcmp(log_file_name, log_info.log_file_name) in
        purge_logs_before_date() as this is tested in can_purge_logs()
      - To avoid expensive calls of log_in_use() we cache the result for the
        last log that is in use by a slave. Future calls to can_purge_logs()
        for this binary log will be quickly detected and false will be returned
        until a slave starts working on a new log.
      - Note that after a binary log rotation caused by max_binlog_size,
        the last log will not be purged directly as it is still in use
        internally. The next binary log write will purge binlogs if needed.
      
      Reviewer:Kristian Nielsen <knielsen@knielsen-hq.org>
      18dfcfde
    • Sergei Golubchik's avatar
      update C/C · 9933a8cc
      Sergei Golubchik authored
      9933a8cc
    • Sergei Golubchik's avatar
      fix debian dependencies for mariadb-test · 2c445b59
      Sergei Golubchik authored
      libnet-ssleay-perl wasn't auto-detected
      2c445b59
    • Sergei Golubchik's avatar
      MDEV-33326 Port Spider/ODBC from ES · eeb5cbae
      Sergei Golubchik authored
      Revert "Deb: Stop shipping mariadb-plugin-spider separately, include in server"
      
      This reverts commit 9945d482.
      eeb5cbae
  15. 13 Feb, 2024 1 commit
  16. 12 Feb, 2024 6 commits