1. 20 May, 2024 2 commits
  2. 17 May, 2024 1 commit
    • Robin Newhouse's avatar
      Minimize unsafe C functions with safe_strcpy() · dc38d8ea
      Robin Newhouse authored
      Similar to #2480.
      567b6812 introduced safe_strcpy() to minimize the use of C with
      potentially unsafe memory overflow with strcpy() whose use is
      discouraged.
      Replace instances of strcpy() with safe_strcpy() where possible, limited
      here to files in the `sql/` directory.
      
      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.
      dc38d8ea
  3. 16 May, 2024 1 commit
  4. 15 May, 2024 1 commit
  5. 14 May, 2024 2 commits
    • Sergei Golubchik's avatar
    • Yuchen Pei's avatar
      MDEV-28105 Return error in ha_spider::write_row() if info(HA_STATUS_AUTO) fails · fd767462
      Yuchen Pei authored
      Spider calls info with HA_STATUS_AUTO to update auto increment info,
      which may attempt to connect the data node. If the connection fails,
      it may emit an error and return the same error. This error should not
      be of lower priority than any possible error from the later call to
      handler::update_auto_increment().
      
      Without this change, certain errors from update_auto_increment() such
      as HA_ERR_AUTOINC_ERANGE may get ignored, causing my_insert() to call
      my_ok(), which fails the assertion because the error was emitted in
      the info() call (Diagnostics_area::is_set() returns true).
      fd767462
  6. 12 May, 2024 3 commits
  7. 10 May, 2024 1 commit
  8. 09 May, 2024 1 commit
    • He Guohua's avatar
      MDEV-31566 Fix buffer overrun of column_json function · 86774720
      He Guohua authored
      The accounting of the limit variable that represents the
      amount of space left it the buffer was incorrect.
      
      Also there was 1 or 2 bytes left to write that occured without
      the buffer length being checked.
      
      Review: Sanja Byelkin
      86774720
  9. 08 May, 2024 7 commits
  10. 07 May, 2024 8 commits
    • Sergei Petrunia's avatar
      MDEV-28621: group by optimization incorrectly removing subquery where subject buried in a function · 40b3525f
      Sergei Petrunia authored
      Workaround patch: Do not remove GROUP BY clause when it has
      subquer(ies) in it.
      
      remove_redundant_subquery_clauses() removes redundant GROUP BY clause
      from queries in form:
        expr IN (SELECT no_aggregates GROUP BY ...)
        expr {CMP} {ALL|ANY|SOME} (SELECT no_aggregates GROUP BY ...)
      This hits problems when the GROUP BY clause itself has subquer(y/ies).
      
      This patch is just a workaround: it disables removal of GROUP BY clause
      if the clause has one or more subqueries in it.
      
      Tests:
      - subselect_elimination.test has all known crashing cases.
      - subselect4.result, insert_select.result are updated.
      Note that in some cases results of SELECT are changed too (not just
      EXPLAINs). These are caused by non-deterministic SQL: when running a
      query like:
      
        x > ANY( SELECT col1 FROM t1 GROUP BY constant_expression)
      
      without removing the GROUP BY, the executor is free to pick the value
      of t1.col1 from any row in the GROUP BY group (denote it $COL1_VAL).
      Then, it computes x > ANY(SELECT $COL1_VAL).
      
      When running the same query and removing the GROUP BY:
      
         x > ANY( SELECT col1 FROM t1)
      
      the executor will actually check all rows of t1.
      40b3525f
    • Monty's avatar
      MDEV-34055 Assertion '...' failure or corruption errors upon REPAIR on Aria tables · ec6aa9ac
      Monty authored
      The problem was two fold:
      - REPAIR TABLE t1 USE_FRM did not work for transactional
        Aria tables (Table was thought to be repaired, which it was not) which
        caused issues in later usage of the table.
      - When swapping tmp_data file to data file, sort_info files where not
        updated. This caused problems if there was several unique keys and
        there was a duplicate for the second key.
      ec6aa9ac
    • Galina Shalygina's avatar
      MDEV-23878 Wrong result with semi-join and splittable derived table · 4bc1860e
      Galina Shalygina authored
      Due to this bug a wrong result might be expected from queries with
      an IN subquery predicate in the WHERE clause and a derived table in the
      FROM clause to which split optimization could be applied.
      
      The function JOIN::fix_all_splittings_in_plan() used the value of the
      bitmap JOIN::sjm_lookup_tables() such as it had been left after the
      search for the best plan for the select containing the splittable
      derived table. That value could not be guaranteed to be correct. So the
      recalculation of this bitmap is needed to exclude the plans with key
      accesses from SJM lookup tables.
      
      Approved by Igor Babaev <igor@maridb.com>
      4bc1860e
    • Yuchen Pei's avatar
      MDEV-34036 Reset spider_hton_ptr in spider_db_done() · 10a75992
      Yuchen Pei authored
      Otherwise spider_direct_sql may still think the spider plugin is
      available even after spider_db_done() was called.
      10a75992
    • Sergei Golubchik's avatar
      42c99ef0
    • Sergei Golubchik's avatar
      Revert "MDEV-19949 mariabackup option of '--password' or '-p' without... · 421eeb18
      Sergei Golubchik authored
      Revert "MDEV-19949 mariabackup option of '--password' or '-p' without specifying password in commandline"
      
      This reverts commit 91fb8b7f.
      
      Incompatible change, see tests in the next commit
      421eeb18
    • Jan Lindström's avatar
      MDEV-33898 : Galera test failure on galera.MW-369 · 33e4fbf0
      Jan Lindström authored
      Additional changes for the galera_vote_rejoin_ddl test (for 10.5+).
      Signed-off-by: default avatarJulius Goryavsky <julius.goryavsky@mariadb.com>
      33e4fbf0
    • Yuchen Pei's avatar
      MDEV-34098 source start_slave.inc in spider suites · bca366e4
      Yuchen Pei authored
      The spider suite should --source include/start_slave.inc to make sure
      the slave is up before proceeding.
      bca366e4
  11. 06 May, 2024 13 commits