1. 08 Feb, 2024 4 commits
    • Dmitry Shulga's avatar
      MDEV-15703: Crash in EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING DEFAULT · e48bd474
      Dmitry Shulga authored
      This patch fixes the issue with passing the DEFAULT or IGNORE values to
      positional parameters for some kind of SQL statements to be executed
      as prepared statements.
      
      The main idea of the patch is to associate an actual value being passed
      by the USING clause with the positional parameter represented by
      the Item_param class. Such association must be performed on execution of
      UPDATE statement in PS/SP mode. Other corner cases that results in
      server crash is on handling CREATE TABLE when positional parameter
      placed after the DEFAULT clause or CALL statement and passing either
      the value DEFAULT or IGNORE as an actual value for the positional parameter.
      This case is fixed by checking whether an error is set in diagnostics
      area at the function pack_vcols() on return from the function pack_expression()
      e48bd474
    • Dmitry Shulga's avatar
      MDEV-15703: Crash in EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT... · 6b2cd786
      Dmitry Shulga authored
      MDEV-15703: Crash in EXECUTE IMMEDIATE 'CREATE OR REPLACE TABLE t1 (a INT DEFAULT ?)' USING DEFAULT, UBSAN runtime error: member call on null pointer of type 'struct TABLE_LIST' in Item_param::save_in_field
      
      This is the prerequisite patch to refactor the method
        Item_default_value::fix_fields.
      The former implementation of this method was extracted and placed
      into the standalone function make_default_field() and the method
      Item_default_value::tie_field(). The motivation for this modification
      is upcoming changes for core implementation of the task MDEV-15703
      since these functions will be used from several places within
      the source code.
      6b2cd786
    • Marko Mäkelä's avatar
      MDEV-33400 Adaptive hash index corruption after DISCARD TABLESPACE · 85db5347
      Marko Mäkelä authored
      row_discard_tablespace(): Do not invoke dict_index_t::clear_instant_alter()
      because that would corrupt any adaptive hash index entries in the table.
      
      row_import_for_mysql(): Invoke dict_index_t::clear_instant_alter()
      after detaching any adaptive hash index entries.
      85db5347
    • Daniel Bartholomew's avatar
      bump the VERSION · 23101304
      Daniel Bartholomew authored
      23101304
  2. 06 Feb, 2024 1 commit
  3. 05 Feb, 2024 1 commit
    • Otto Kekäläinen's avatar
      Fix commit 179424db: No test file or result files should be executable · 3812e1c9
      Otto Kekäläinen authored
      In commit 179424db the file lowercase_table2.result was made executable
      for no known reason, most likely just a mistake. Test result files
      definitely should not be executable.
      
      All new code of the whole pull request, including one or several files
      that are either new files or modified ones, are contributed under the
      BSD-new license. I am contributing on behalf of my employer Amazon Web
      Services, Inc.
      3812e1c9
  4. 01 Feb, 2024 1 commit
  5. 31 Jan, 2024 3 commits
  6. 30 Jan, 2024 6 commits
  7. 29 Jan, 2024 9 commits
  8. 26 Jan, 2024 2 commits
    • Brandon Nesterenko's avatar
      MDEV-27850: rpl_seconds_behind_master_spike debug_sync fix · 112eb14f
      Brandon Nesterenko authored
      A debug_sync signal could remain for the SQL thread that should have begun
      a wait_for upon seeing a GTID event, but would instead see the old signal
      and continue on without waiting. This broke an "idle" condition in
      SHOW SLAVE STATUS
      which should have automatically negated Seconds_Behind_Master. Instead,
      because the SQL thread had already processed the GTID event, it set
      sql_thread_caught_up to false, and thereby calculated the value of
      Seconds_behind_master, when the test expected 0.
      
      This patch fixes this by resetting the debug_sync state before creating a
      new transaction which sends a GTID event to the replica
      112eb14f
    • Vladislav Vaintroub's avatar
      update C/C · e96a0594
      Vladislav Vaintroub authored
      e96a0594
  9. 25 Jan, 2024 3 commits
    • Vladislav Vaintroub's avatar
      MDEV-26579 fixup · b62f25c6
      Vladislav Vaintroub authored
      b62f25c6
    • Vladislav Vaintroub's avatar
      MDEV-26579 Support minor MSI in Windows installer. · 0f59810b
      Vladislav Vaintroub authored
      With this patch, 4-component MSI version can be used, e.g by setting
      TINY_VERSION variable in CMake, or by adding a string, e.g
      MYSQL_VERSION_EXTRA=-2
      which sets TINY_VERSION to 2, and also changes the package name.
      
      The 4-component MSI versions do not support MSI major upgrades, only minor
      ones, i.e do not reinstall components, just update existing ones based
      on versioning rules.
      
      To support these rules, add DefaultVersion for the files that won't
      otherwise be versioned - headers, static and import libraries,
      pdbs, text - xml, python and perl scripts Also silence WiX warning
      that MSI won't store hashes for those files anymore.
      0f59810b
    • Yuchen Pei's avatar
      MDEV-33191 spider: fix dbton_id when iterating over links · 1070575a
      Yuchen Pei authored
      There are two array fields in spider_share with similar names:
      
      share->use_sql_dbton_ids that maps from i to the i-th dbton used by
      share. Thus it should be used only when i iterates over all distinct
      dbtons used by share.
      
      share->sql_dbton_ids that maps from i to the dbton used by the i-th
      link of the share. Thus it should be used only when i iterates over
      all links of a share.
      
      We correct instances where share->sql_dbton_ids should be used instead
      of share->use_sql_dbton_ids.
      1070575a
  10. 24 Jan, 2024 1 commit
    • Alexander Barkov's avatar
      MDEV-29095 REGEXP_REPLACE treats empty strings different than REPLACE in ORACLE mode · f738cc98
      Alexander Barkov authored
      Turning REGEXP_REPLACE into two schema-qualified functions:
      - mariadb_schema.regexp_replace()
      - oracle_schema.regexp_replace()
      
      Fixing oracle_schema.regexp_replace(subj,pattern,replacement) to treat
      NULL in "replacement" as an empty string.
      
      Adding new classes implementing oracle_schema.regexp_replace():
      - Item_func_regexp_replace_oracle
      - Create_func_regexp_replace_oracle
      
      Adding helper methods:
      - String *Item::val_str_null_to_empty(String *to)
      - String *Item::val_str_null_to_empty(String *to, bool null_to_empty)
      
      and reusing these methods in both Item_func_replace and
      Item_func_regexp_replace.
      f738cc98
  11. 23 Jan, 2024 3 commits
  12. 22 Jan, 2024 5 commits
    • Oleksandr Byelkin's avatar
      15bd7e0b
    • Oleksandr Byelkin's avatar
    • Brandon Nesterenko's avatar
      MDEV-32168: Postpush fix for rpl_domain_id_filter_master_crash · 01ca57ec
      Brandon Nesterenko authored
      While a replica may be reading events from the
      primary, the primary is killed. Left to its own
      devices, the IO thread may or may not stop in
      error, depending on what it is doing when its
      connection to the primary is killed (e.g. a
      failed read results in an error, whereas if the
      IO thread is idly waiting for events when the
      connection dies, it will enter into a reconnect
      loop and reconnect). MDEV-32168 changed the test
      to always wait for the reconnect, thus breaking
      the error case, as the IO thread would be stopped
      at a time of expecting it to be running.
      
      The fix is to manually stop/start the IO thread
      to ensure it is in a consistent state.
      
      Note that rpl_domain_id_filter_master_crash.test
      will need additional changes after fixing MDEV-33268
      
      Reviewed By:
      ============
      Kristian Nielsen <knielsen@knielsen-hq.org>
      01ca57ec
    • Vicențiu Ciorbaru's avatar
      MDEV-14448: Ctrl-C should not exit the client · 3cd88751
      Vicențiu Ciorbaru authored
      This patch introduces the following behaviour for Linux while
      maintaining old behaviour for Windows:
      
      Ctrl + C (sigint) clears the current buffer and redraws the prompt.
      Ctrl-C no longer exits the client if no query is running.
      Ctrl-C kills the current running query if there is one. If there is an
      error communicating with the server while trying to issue a KILL QUERY,
      the client exits. This is in line with the past behaviour of Ctrl-C.
      On Linux Ctrl-D can be used to close the client.
      On Windows Ctrl-C and Ctrl-BREAK still exits the client if no query is running.
      Windows can also exit the client via \q<enter> or exit<enter>.
      
      == Implementation details ==
      The Linux implementation has two corner cases, based on which library is
      used: libreadline or libedit, both are handled in code to achieve the
      same user experience.
      
      Additional code is taken from MySQL, ensuring there is identical
      behaviour on Windows, to MySQL's mysql client implementation for other
      CTRL- related signals.
      
      * The CTRL_CLOSE, CTRL_LOGOFF, CTRL_SHUTDOWN will issue the equivalent
        of CTRL-C and "end" the program. This ensures that the query is killed
        when the client is closed by closing the terminal, logging off the
        user or shutting down the system. The latter two signals are not sent
        for interactive applications, but it handles the case when a user has
        defined a service to use mysql client to issue a command. See
        https://learn.microsoft.com/en-us/windows/console/handlerroutine
      
      This patch is built on top of the initial work done by Anel Husakovic
      <anel@mariadb.org>.
      Closes #2815
      3cd88751
    • Sisi Huang's avatar
      MDEV-32990 federatedx time_zone round trips · 7e8e51eb
      Sisi Huang authored
      Modified `federatedx_io_mysql::actual_query` to set the time zone to '+00:00' only upon establishing a new connection instead of with each query execution.
      7e8e51eb
  13. 19 Jan, 2024 1 commit
    • Igor Babaev's avatar
      MDEV-33270 Failure to call SP invoking another SP with parameter requiring type conversion · e8041c70
      Igor Babaev authored
      This patch corrects the fix for MDEV-32569. The latter has not taken into
      account the fact not each statement uses the SELECT_LEX structure. In
      particular CALL statements do not use such structure. However the parameter
      passed to the stored procedure used in such a statement may require an
      invocation of Type_std_attributes::agg_item_set_converter().
      
      Approved by Oleksandr Byelkin <sanja@mariadb.com>
      e8041c70