1. 14 Feb, 2022 1 commit
  2. 12 Feb, 2022 1 commit
  3. 11 Feb, 2022 1 commit
  4. 10 Feb, 2022 16 commits
    • Sergei Golubchik's avatar
      Merge branch '10.7' into 10.8 · 7dade0ad
      Sergei Golubchik authored
      7dade0ad
    • Sergei Golubchik's avatar
      Merge branch '10.6' into 10.7 · 65f60231
      Sergei Golubchik authored
      65f60231
    • Sergei Golubchik's avatar
      Merge branch '10.5 into 10.6 · e3894f5d
      Sergei Golubchik authored
      e3894f5d
    • Sergei Golubchik's avatar
      Merge branch '10.4' into 10.5 · 9aa3564e
      Sergei Golubchik authored
      9aa3564e
    • Sergei Golubchik's avatar
      Merge branch '10.3' into 10.4 · b4477ae7
      Sergei Golubchik authored
      b4477ae7
    • Sergei Golubchik's avatar
      Merge branch '10.2' into 10.3 · a36fc80a
      Sergei Golubchik authored
      a36fc80a
    • Sergei Petrunia's avatar
      MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 · 3a525694
      Sergei Petrunia authored
      The asserion failure was caused by this query
      
        select /*id=1*/ from t1
        where
         col= ( select /*id=2*/ from ... where corr_cond1
                union
                select /*id=4*/ from ... where corr_cond2)
      
      Here,
      - select with id=2 was correlated due to corr_cond1.
      - select with id=4 was initially correlated due to corr_cond2, but then
        the optimizer optimized away the correlation, making the select with id=4
        uncorrelated.
      
      However, since select with id=2 remained correlated, the execution had to
      re-compute the whole UNION. When it tried to execute select with id=4, it
      hit an assertion  (join buffer already free'd).
      
      This is because select with id=4 has freed its execution structures after
      it has been executed once. The select is uncorrelated, so it did not expect
      it would need to be executed for the second time.
      
      Fixed this by adding this logic in
      st_select_lex::optimize_unflattened_subqueries():
      
        If a member of a UNION is correlated, mark all its members as
        correlated, so that they are prepared to be executed multiple times.
      3a525694
    • Vladislav Vaintroub's avatar
      MDEV-27796 Windows - starting server with huge innodb-log-buffer-size may fail · 012e724d
      Vladislav Vaintroub authored
      Fixed tpool::pread() and tpool::pwrite() to return SSIZE_T on Windows,
      so that huge numbers are not converted to negatives.
      
      Also, make sure to never attempt reading/writing more bytes than
      DWORD can accomodate (4G)
      012e724d
    • Sergei Golubchik's avatar
      MDEV-26351 segfault - (MARIA_HA *) 0x0 in ha_maria::extra · 9e2c26b0
      Sergei Golubchik authored
      don't let Aria create a table that it cannot open
      9e2c26b0
    • Sergei Golubchik's avatar
      MDEV-26351 segfault - (MARIA_HA *) 0x0 in ha_maria::extra · 1b8bb441
      Sergei Golubchik authored
      use the correct check. before invoking handler methods we
      need to know that the table was opened, not only created.
      1b8bb441
    • Marko Mäkelä's avatar
      MDEV-27774 Reduce scalability bottlenecks in mtr_t::commit() · a635c406
      Marko Mäkelä authored
      A prominent bottleneck in mtr_t::commit() is log_sys.mutex between
      log_sys.append_prepare() and log_close().
      
      User-visible change: The minimum innodb_log_file_size will be
      increased from 1MiB to 4MiB so that some conditions can be
      trivially satisfied.
      
      log_sys.latch (log_latch): Replaces log_sys.mutex and
      log_sys.flush_order_mutex. Copying mtr_t::m_log to
      log_sys.buf is protected by a shared log_sys.latch.
      Writes from log_sys.buf to the file system will be protected
      by an exclusive log_sys.latch.
      
      log_sys.lsn_lock: Protects the allocation of log buffer
      in log_sys.append_prepare().
      
      sspin_lock: A simple spin lock, for log_sys.lsn_lock.
      
      Thanks to Vladislav Vaintroub for suggesting this idea, and for
      reviewing these changes.
      
      mariadb-backup: Replace some use of log_sys.mutex with recv_sys.mutex.
      
      buf_pool_t::insert_into_flush_list(): Implement sorting of flush_list
      because ordering is otherwise no longer guaranteed. Ordering by LSN
      is needed for the proper operation of redo log checkpoints.
      
      log_sys.append_prepare(): Advance log_sys.lsn and log_sys.buf_free by
      the length, and return the old values. Also increment write_to_buf,
      which was previously done in log_close().
      
      mtr_t::finish_write(): Obtain the buffer pointer from
      log_sys.append_prepare().
      
      log_sys.buf_free: Make the field Atomic_relaxed,
      to simplify log_flush_margin(). Use only loads and stores
      to avoid costly read-modify-write atomic operations.
      
      buf_pool.flush_list_requests: Replaces
      export_vars.innodb_buffer_pool_write_requests
      and srv_stats.buf_pool_write_requests.
      Protected by buf_pool.flush_list_mutex.
      
      buf_pool_t::insert_into_flush_list(): Do not invoke page_cleaner_wakeup().
      Let the caller do that after a batch of calls.
      
      recv_recover_page(): Invoke a minimal part of
      buf_pool.insert_into_flush_list().
      
      ReleaseBlocks::modified: A number of pages added to buf_pool.flush_list.
      
      ReleaseBlocks::operator(): Merge buf_flush_note_modification() here.
      
      log_t::set_capacity(): Renamed from log_set_capacity().
      a635c406
    • Marko Mäkelä's avatar
      MDEV-27787 mariadb-backup --backup is allocating extra memory for log records · 8c7c92ad
      Marko Mäkelä authored
      In commit 685d958e (MDEV-14425),
      the log parsing in mariadb-backup --backup was rewritten.
      The parameter STORE_IF_EXISTS that is being passed to recv_sys.parse_mtr()
      or recv_sys.parse_pmem() instead of STORE_NO caused unnecessary additional
      memory allocation for redo log records.
      8c7c92ad
    • Oleksandr Byelkin's avatar
      MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list · 0168d1ed
      Oleksandr Byelkin authored
      Do not assume that subquery Item always present.
      0168d1ed
    • Sergei Golubchik's avatar
      MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields · 9e39d0ae
      Sergei Golubchik authored
      fix a debug assert to account for not opened temp tables
      9e39d0ae
    • Monty's avatar
      MDEV-27789 mysql_upgrade / mariadb-upgrade in 10.6.6 is putting password in host argument · ad1fb069
      Monty authored
      Removed all dependencies of command line arguments based on positions in
      an array (this kind of code should never have been written).
      Instead use option names, which are stable.
      
      Reviewer: Sergei Golubchik
      ad1fb069
    • Vincent Milum Jr's avatar
      MDEV-27790: Fix mis-matched braces for non-Linux targets · e375f519
      Vincent Milum Jr authored
      Ran into this while compiling on FreeBSD 13.0-RELEASE
      
      After this one change, it compiles and runs just fine on my FreeBSD Aarch64 server.
      e375f519
  5. 09 Feb, 2022 13 commits
  6. 08 Feb, 2022 8 commits
    • Daniel Bartholomew's avatar
      bump the VERSION · ac077490
      Daniel Bartholomew authored
      ac077490
    • Daniel Bartholomew's avatar
      bump the VERSION · 9055db2f
      Daniel Bartholomew authored
      9055db2f
    • Daniel Bartholomew's avatar
      bump the VERSION · fa73117b
      Daniel Bartholomew authored
      fa73117b
    • Daniel Bartholomew's avatar
      bump the VERSION · f7704d74
      Daniel Bartholomew authored
      f7704d74
    • Daniel Bartholomew's avatar
      bump the VERSION · 2f07b21c
      Daniel Bartholomew authored
      2f07b21c
    • Daniel Bartholomew's avatar
      bump the VERSION · 30cc63fa
      Daniel Bartholomew authored
      30cc63fa
    • Daniel Bartholomew's avatar
      bump the VERSION · c0a44ff7
      Daniel Bartholomew authored
      c0a44ff7
    • Monty's avatar
      MDEV-26585 Wrong query results when `using index for group-by` · 38058c04
      Monty authored
      The problem was that "group_min_max optimization" does not work if
      some aggregate functions, like COUNT(*), is used.
      The function get_best_group_min_max() is using the join->sum_funcs
      array to check which aggregate functions are used.
      The bug was that aggregates in HAVING where not yet added to
      join->sum_funcs at the time get_best_group_min_max() was called.
      
      Fixed by populate join->sum_funcs already in prepare, which means that
      all sum functions will be in join->sum_funcs in get_best_group_min_max().
      A benefit of this approach is that we can remove several calls to
      make_sum_func_list() from the code and simplify the function.
      
      I removed some wrong setting of 'sort_and_group'.
      This variable is set when alloc_group_fields() is called, as part
      of allocating the cache needed by end_send_group() and does not need
      to be set by other functions.
      
      One problematic thing was that Spider is using *join->sum_funcs to detect
      at which stage the optimizer is and do internal calculations of aggregate
      functions. Updating join->sum_funcs early caused Spider to fail when trying
      to find min/max values in opt_sum_query().
      Fixed by temporarily resetting sum_funcs during opt_sum_query().
      
      Reviewer: Sergei Petrunia
      38058c04