1. 10 Aug, 2022 7 commits
  2. 09 Aug, 2022 3 commits
  3. 08 Aug, 2022 3 commits
  4. 04 Aug, 2022 5 commits
  5. 03 Aug, 2022 5 commits
    • Oleksandr Byelkin's avatar
      Merge branch '10.3' into 10.4 · e5090652
      Oleksandr Byelkin authored
      e5090652
    • Sergei Petrunia's avatar
      MDEV-23809: Server crash in JOIN_CACHE::free ...: part #2 · 37a3d446
      Sergei Petrunia authored
      Part #2: make sure we allocate space for two JOIN_TABs that
      use temporary tables.
      The dbug_join_tab_array_size is still set to catch cases where
      we try to access more JOIN_TAB object than we thought we would have.
      37a3d446
    • Sergei Petrunia's avatar
      MDEV-23809: Server crash in JOIN_CACHE::free or ... · 2cd98c95
      Sergei Petrunia authored
      The problem was caused by use of COLLATION(AVG('x')). This is an
      item whose value is a constant.
      Name Resolution code called convert_const_to_int() which removed AVG('x').
      However, the item representing COLLATION(...) still had with_sum_func=1.
      
      This inconsistent state confused the code that handles grouping and
      DISTINCT: JOIN::get_best_combination() decided to use one temporary
      table and allocated one JOIN_TAB for it, but then
      JOIN::make_aggr_tables_info() attempted to use two and made writes
      beyond the end of the JOIN::join_tab array.
      
      The fix:
      - Do not replace constant expressions which contain aggregate functions.
      - Add JOIN::dbug_join_tab_array_size to catch attempts to use more
        JOIN_TAB objects than we've allocated.
      2cd98c95
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-27282 InnoDB: Failing assertion: !query->intersection · f9ec9b6a
      Thirunarayanan Balathandayuthapani authored
      - query->intersection fails to get freed if the query exceeds
      innodb_ft_result_cache_limit
      
      - errors from init_ftfuncs were not propogated by delete command
      
      This is taken from percona/percona-server@ef2c0bcb9a34aeb06de0058d7c2a2969416b35a7
      f9ec9b6a
    • Oleksandr Byelkin's avatar
      Fix Oracle parser. · 8fd8a81a
      Oleksandr Byelkin authored
      8fd8a81a
  6. 02 Aug, 2022 7 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
    • Oleksandr Byelkin's avatar
      Merge branch '10.3' into 10.4 · 48e35b8c
      Oleksandr Byelkin authored
      48e35b8c
    • 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
  7. 01 Aug, 2022 7 commits
    • Aleksey Midenkov's avatar
      MDEV-28727 ALTER TABLE ALGORITHM=NOCOPY does not work after upgrade · 1ea5e402
      Aleksey Midenkov authored
      MDEV-20704 changed the rules of how (HA_BINARY_PACK_KEY |
      HA_VAR_LENGTH_KEY) flags are added. Older FRMs before that fix had
      these flags for DOUBLE index. After that fix when ALTER sees such old
      FRM it thinks it cannot do instant alter because of failed
      compare_keys_but_name(): it compares flags against tmp table created
      by ALTER.
      
      MDEV-20704 fix was actually not about DOUBLE type but about
      FIELDFLAG_BLOB which affected DOUBLE. So there is no direct knowledge
      that any other types were not affected.
      
      The proposed fix under CHECK TABLE checks if FRM has
      (HA_BINARY_PACK_KEY | HA_VAR_LENGTH_KEY) flags and was created prior
      MDEV-20704 and if so issues "needs upgrade". When mysqlcheck and
      mysql_upgrade see such status they issue ALTER TABLE FORCE and upgrade
      the table to the version of server.
      1ea5e402
    • Aleksey Midenkov's avatar
      MDEV-21540 Initialization of already inited long unique index on reorganize partition · 231feabd
      Aleksey Midenkov authored
      Handler for existing partition was already index-inited at the
      beginning of copy_partitions().
      
      In the case of REORGANIZE PARTITION we fill new partition by calling
      its ha_write_row() (handler is storage engine of new partition). From
      that we go through the below conditions:
      
          if (this->inited == RND)
            table->clone_handler_for_update();
          handler *h= table->update_handler ? table->update_handler : table->file;
      
      First, the above misses the meaning of this->inited check. Now it is
      new partition and this handler is not inited. So, we assign
      table->file which is ha_partition and is really not known to be inited
      or not. It is supposed (this == table->file), otherwise we are
      out of the logic for using update_handler. This patch adds DBUG_ASSERT
      for that.
      
      Second, we call check_duplicate_long_entries() for table->file and
      that calls ha_partition::index_init() which calls index_init() for
      each partition's handler. But the existing parititions' handlers was
      already inited in copy_partitions() and we fail on assertion.
      
      The fix implies that we don't need check_duplicate_long_entries()
      per-partition as we've already done check_duplicate_long_entries() for
      ha_partition. For REORGANIZE PARTITION that means existing row was
      already checked at previous INSERT/UPDATE commands, so no need to
      check it again (see NOTE in handler::ha_write_row()).
      
      The fix also optimizes ha_update_row() so
      check_duplicate_long_entries_update() is not called per-partition
      considering it was already called for ha_partition. Besides,
      per-partition duplicate check is not really usable.
      231feabd
    • 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
  8. 29 Jul, 2022 3 commits