1. 02 Aug, 2022 6 commits
    • Igor Babaev's avatar
      MDEV-28617 Crash with INSERT...SELECT using derived table in GROUP BY clause · c2300d06
      Igor Babaev authored
      This bug manifested itself for INSERT...SELECT and DELETE statements whose
      WHERE condition used an IN/ANY/ALL predicand or a EXISTS predicate with
      such grouping subquery that:
       - its GROUP BY clause could be eliminated,
       - the GROUP clause contained a subquery over a mergeable derived table
         referencing the updated table.
      
      The bug ultimately caused a server crash when the prepare phase of the
      statement processing was executed. This happened after removal redundant
      subqueries used in the eliminated GROUP BY clause from the statement tree.
      The function that excluded the subqueries from the did not do it properly.
      As a result the specification of any derived table contained in a removed
      subquery was not marked as excluded.
      
      Approved by Oleksandr Byelkin <sanja@mariadb.com>
      c2300d06
    • Sergei Golubchik's avatar
      MDEV-23097 heap-use-after-free in mysqlimport · 07a670b8
      Sergei Golubchik authored
      mysqlimport starts many worker threads. when one of the worker
      encounters an error, it frees global memory and calls exit().
      
      it suppresses memory leak detector, because, as the comment says
      "dirty exit, some threads are still running", indeed, it cannot
      free the memory from other threads.
      
      but precisely because some threads are still running, they
      might use this global memory, so it cannot be freed.
      
      fix: if we know that some threads are still running and accept
      that we cannot free all memory anyway, let's not free global
      allocations either
      07a670b8
    • Daniel Black's avatar
      MDEV-26447: mysqldump to use temporary view instead of tables. · 92b0a367
      Daniel Black authored
      This is particularly important for Azure where there is no
      MyISAM support in their MariaDB cloud product.
      
      Like mysqldumper does, a view can satisfy the requirement
      like a table, without constraints. The views in frm files are
      text form and don't have column limits.
      
      Thanks Thomas Casteleyn for the suggestion.
      92b0a367
    • Mike Griffin's avatar
      MDEV-18702 mysqldump: add variable 'max-statement-time' · 53c4e4d0
      Mike Griffin authored
      With a global non-default max-statement-time of a time interval that exceed
      the query time mysqldump queries when doing a backup.
      
      To solve both, add a max-statement-time option, defaulting to 0 (unlimited time).
      
      Also like mariabackup, set the session wait_timeout=DEFAULT (28800). The
      time/processing between mysqldump times isn't expected to get that
      close ever, but let's adopt the standard of mariabackup as no-one has
      challenged it has having a detrimental effect.
      
      Reviewer and test case author Daniel Black
      53c4e4d0
    • Oleksandr Byelkin's avatar
    • Daniel Black's avatar
  2. 01 Aug, 2022 5 commits
    • Julius Goryavsky's avatar
      MDEV-28758: Mariabackup copies binary logs to backup directory · 7fb1f919
      Julius Goryavsky authored
      This commit restores defaults and functionality regarding binlogs
      to the way it was prior to MDEV-27524. The mariabackup utility no
      longer saves binlogs files as part of a backup without the --galera-info
      option. However, since we use --galera-info during SST, the behavior
      of mariabackup changes and, in combination with GTIDs support enabled,
      mariabackup transfers one (most recent) binlog file obtained after
      FLUSH BINARY LOGS. In other cases, binlogs are not transferred during
      SST in mariabackup mode. As for SST in the rsync mode, it works the
      same way as before MDEV-27524 - by default it transfers one last
      binlog file.
      
      The --sst-max-binlogs option for mariabackup and the sst_max_binlogs
      parameter in the [sst] / server sections are no longer supported for
      SST via mariabackup.
      7fb1f919
    • Sergei Golubchik's avatar
      only copy buffer pool dump in SST galera mode · 5b415437
      Sergei Golubchik authored
      and then only into the default name, so that the joiner could find it
      5b415437
    • Sergei Golubchik's avatar
      5197519f
    • Marko Mäkelä's avatar
      MDEV-14804 innodb.update_time occasionally fails · 6a3fbfdb
      Marko Mäkelä authored
      Let simplify the test.
      The update_time is stored in the table metadata (dict_table_t);
      it has nothing to do with buffer pool page eviction or replacement.
      6a3fbfdb
    • Sergei Golubchik's avatar
      in INFORMATION_SCHEMA.ALL_PLUGINS match installed plugins better · 40c2460d
      Sergei Golubchik authored
      look for an installed plugin with the same name _and the same type_
      (in case there are many plugins with the same name and different type,
      which is, technically, possible for built-in plugins).
      40c2460d
  3. 29 Jul, 2022 5 commits
  4. 28 Jul, 2022 1 commit
  5. 27 Jul, 2022 4 commits
    • Oleksandr Byelkin's avatar
      MDEV-26647 (simple_password_check) Include password validation plugin... · 15a2ff12
      Oleksandr Byelkin authored
      MDEV-26647 (simple_password_check) Include password validation plugin information in the error message if the SQL statement is not satisfied password policy
      
      Make the plugin reporting cause of the error.
      15a2ff12
    • Oleksandr Byelkin's avatar
      MDEV-26647 (plugin name) Include password validation plugin information in the... · cc6bba00
      Oleksandr Byelkin authored
      MDEV-26647 (plugin name) Include password validation plugin information in the error message if the SQL statement is not satisfied password policy
      
      Add plugin name to the error message.
      cc6bba00
    • Marko Mäkelä's avatar
      MDEV-28495 InnoDB corruption due to lack of file locking · 0ee1082b
      Marko Mäkelä authored
      Starting with commit da094188 (MDEV-24393),
      MariaDB will no longer acquire advisory file locks on InnoDB data
      files by default, because it would create a large number of
      entries in Linux /proc/locks.
      
      The motivation for acquiring the file locks is to prevent accidental
      concurrent startup of multiple server processes on the same data files.
      Such mistake still turns out to be relatively common, based on
      corruption bug reports from the community.
      
      To prevent corruption due to concurrent startup attempts, the
      Aria storage engine would unconditionally acquire an advisory lock
      on one of its log files.
      
      Solution: InnoDB will always lock its system tablespace files.
      (Ever since commit 685d958e
      the InnoDB log file will not necessarily be open while the
      server is running, because it can be accessed via memory-mapped I/O.)
      
      If more protection is desired, then the option --external-locking
      can be used.
      
      The mandatory advisory lock also fixes intermittent failures of
      some crash recovery tests. It turns out that when the mtr test harness
      kills and restarts the server, it will not actually ensure that the
      old process has terminated before starting the new one.
      0ee1082b
    • Igor Babaev's avatar
      MDEV-29139 Crash when using ANY predicand with redundant subquery in GROUP BY clause · bd935a41
      Igor Babaev authored
      This bug could cause a crash of the server when executing queries containing
      ANY/ALL predicands with redundant subqueries in GROUP BY clauses.
      These subqueries are eliminated by remove_redundant_subquery_clause()
      together with elimination of GROUP BY list containing these subqueries.
      However the references to the elements of the GROUP BY remained in the
      JOIN::all_fields list of the right operand of of the ALL/ANY predicand.
      Later these references confused make_aggr_tables_info() when forming
      proper execution structures after ALL/ANY predicands had been replaced
      with expressions containing MIN/MAX set functions.
      The patch just removes these references from JOIN::all_fields list used
      by the subquery of the ALL/ANY predicand when its GROUP BY clause is
      eliminated.
      
      Approved by Oleksandr Byelkin <sanja@mariadb.com>
      bd935a41
  6. 26 Jul, 2022 10 commits
  7. 25 Jul, 2022 5 commits
    • Brandon Nesterenko's avatar
      MDEV-21087/MDEV-21433: ER_SLAVE_INCIDENT arrives at slave without failure specifics · 555c12a5
      Brandon Nesterenko authored
      Problem:
      =======
      
      This patch addresses two issues:
      
       1. An incident event can be incorrectly reported for transactions
      which are rolled back successfully. That is, an incident event
      should only be generated for failed “non-transactional transactions”
      (i.e., those which modify non-transactional tables) because they
      cannot be rolled back.
      
       2. When the mariadb slave (error) stops at receiving the incident
      event there's no description of what led to it. Neither in the event
      nor in the master's error log.
      
      Solution:
      ========
      
      Before reporting an incident event for a transaction, first validate
      that it is “non-transactional” (i.e. cannot be safely rolled back).
      To determine if a transaction is non-transactional,
        lex->stmt_accessed_table(LEX::STMT_WRITES_NON_TRANS_TABLE)
      is used because it is set previously in
      THD::decide_logging_format().
      
      Additionally, when an incident event is written, write an error
      message to the server’s error log to indicate the underlying issue.
      
      Reviewed by:
      ===========
      Andrei Elkin <andrei.elkin@mariadb.com>
      555c12a5
    • Rucha Deodhar's avatar
      This commit is a fixup for MDEV-28762 · 46ff6608
      Rucha Deodhar authored
      46ff6608
    • Marko Mäkelä's avatar
      Fix DBUG_ENTER/return mismatch · f1c8749f
      Marko Mäkelä authored
      Spotted by Thirunarayanan Balathandayuthapani.
      f1c8749f
    • Marko Mäkelä's avatar
      MDEV-28980 InnoDB: Failing assertion: len <= MAX_TABLE_NAME_LEN · 8aa37c26
      Marko Mäkelä authored
      dict_load_foreigns(): Use a correctly sized buffer for the maximum-length
      SYS_FOREIGN.ID. In case of overflow, do not crash the server but instead
      return DB_CORRUPTION.
      8aa37c26
    • Brad Smith's avatar
  8. 23 Jul, 2022 1 commit
  9. 22 Jul, 2022 3 commits