1. 27 Mar, 2021 1 commit
  2. 26 Mar, 2021 4 commits
    • Michael Okoko's avatar
      Replace mallinfo with mallinfo2 on supported systems · 48141f3c
      Michael Okoko authored
      `mallinfo` is deprecated since glibc 2.33 and has been replaced by mallinfo2.
      The deprecation causes building the server to fail if glibc version is > 2.33.
      
      Check if mallinfo2 exist on the system and use it instead.
      48141f3c
    • Eugene Kosov's avatar
    • Eugene Kosov's avatar
      MDEV-25238 add support for -fsanitize-address-use-after-scope · dfae51de
      Eugene Kosov authored
      Use like this: cmake -DWITH_ASAN=ON -DWITH_ASAN_SCOPE=ON
      dfae51de
    • Marko Mäkelä's avatar
      MDEV-24786: row_upd_clust_step() skips mtr_t::commit() on virtual column error · a6d66fe7
      Marko Mäkelä authored
      The function row_upd_clust_step() is invoking several static functions,
      some of which used to commit the mini-transaction in some cases.
      If innobase_get_computed_value() would fail due to some reason,
      we would fail to invoke mtr_t::commit() and release buffer pool
      page latches. This would likely lead to a hanging server later.
      
      This regression was introduced in
      commit 97db6c15 (MDEV-20618).
      
      row_upd_index_is_referenced(), row_upd_sec_index_entry(),
      row_upd_sec_index_entry(): Cleanup: Replace some ibool with bool.
      
      row_upd_clust_rec_by_insert(), row_upd_clust_rec(): Guarantee that
      the mini-transaction will always remain in active state.
      
      row_upd_del_mark_clust_rec(): Guarantee that
      the mini-transaction will always remain in active state.
      This fixes one "leak" of mini-transaction on DB_COMPUTE_VALUE_FAILED.
      
      row_upd_clust_step(): Use only one return path, which will always
      invoke mtr.commit(). After a failed row_upd_store_row() call, we
      will no longer "leak" the mini-transaction.
      
      This fix was verified by RQG on 10.6 (depending on MDEV-371 that
      was introduced in 10.4). Unfortunately, it is challenging to
      create a regression test for this, and a test case could soon become
      invalid as more bugs in virtual column evaluation are fixed.
      a6d66fe7
  3. 25 Mar, 2021 1 commit
  4. 24 Mar, 2021 3 commits
    • Sergei Golubchik's avatar
      MDEV-25242 Server crashes in check_grant upon invoking function with userstat enabled · 5a798071
      Sergei Golubchik authored
      use check_grant(..., number_of_tables=1, ...) if you only need
      to check privileges for one table
      5a798071
    • Vladislav Vaintroub's avatar
      MDEV-23740 postfix - potentially uninitialized variable passed to vio_socket_io_wait. · cdb86faf
      Vladislav Vaintroub authored
      
      Thanks to Daniel Black for reporting.
      cdb86faf
    • Igor Babaev's avatar
      MDEV-25128 Wrong result from join with materialized semi-join and · 480a0671
      Igor Babaev authored
                 splittable derived
      
      If one of joined tables of the processed query is a materialized derived
      table (or view or CTE) with GROUP BY clause then under some conditions it
      can be subject to split optimization. With this optimization new equalities
      are injected into the WHERE condition of the SELECT that specifies this
      derived table. The injected equalities are generated for all join orders
      with which the split optimization can employed. After the best join order
      has been chosen only certain of this equalities are really needed. The
      others can be safely removed. If it's not done and some of injected
      equalities involve expressions over semi-joins with look-up access then
      the query may return a wrong result set.
      This patch effectively removes equalities injected for split optimization
      that are needed only at the optimization stage and not needed for execution.
      
      Approved by serg@mariadb.com
      480a0671
  5. 23 Mar, 2021 5 commits
  6. 22 Mar, 2021 4 commits
    • Marko Mäkelä's avatar
      MDEV-23076 Misleading "InnoDB: using atomic writes" · 56274bd5
      Marko Mäkelä authored
      As suggested by Vladislav Vaintroub, let us remove misleading
      and malformatted startup messages.
      
      Even if the global variable srv_use_atomic_writes were set, we would
      still invoke my_test_if_atomic_write() to check if writes are atomic
      with a particular page size.
      
      When using the default innodb_page_size=16k, page writes should be
      atomic on NTFS when using ROW_FORMAT=COMPRESSED and KEY_BLOCK_SIZE<=4.
      
      Disabling srv_use_atomic_writes when innodb_file_per_table=OFF does
      not make sense, because that is a dynamic parameter.
      
      We also correct the documentation string of innodb_use_atomic_writes
      and remove the duplicate variable innobase_use_atomic_writes.
      56274bd5
    • Marko Mäkelä's avatar
      MDEV-22653: Remove the useless parameter innodb_simulate_comp_failures · 0f8caadc
      Marko Mäkelä authored
      The debug parameter innodb_simulate_comp_failures injected compression
      failures for ROW_FORMAT=COMPRESSED tables, breaking the pre-existing
      logic that I had implemented in the InnoDB Plugin for MySQL 5.1 to prevent
      compressed page overflows. A much better check is already achieved by
      defining UNIV_ZIP_COPY at the compilation time.
      (Only UNIV_ZIP_DEBUG is part of cmake -DWITH_INNODB_EXTRA_DEBUG=ON.)
      0f8caadc
    • Marko Mäkelä's avatar
      MDEV-24796 Assertion `page_has_next... failed in btr_pcur_store_position() · 61e00db6
      Marko Mäkelä authored
      In commit eaeb8ec4 (MDEV-24653)
      an incorrect debug assertion was introduced.
      
      btr_pcur_store_position(): If the only record in the page is the
      instant ALTER TABLE metadata record, we cannot expect there to be
      a successor page. The situation could be improved by MDEV-24673 later.
      61e00db6
    • Dmitry Shulga's avatar
  7. 21 Mar, 2021 2 commits
  8. 19 Mar, 2021 7 commits
  9. 18 Mar, 2021 10 commits
    • Igor Babaev's avatar
      MDEV-25112 MIN/MAX aggregation over an indexed column may return wrong result · b34bb81e
      Igor Babaev authored
      If a query with implicit grouping contains in MIN/MAX set function in the
      select list over a column that is a part of an index then the query
      might be subject to MIN/MAX optimization. With this optimization the
      server performs a look-up into an index, fetches a value of the column C
      used in the MIN/MAX function and substitute the MIN/MAX expression for this
      value. This allows to eliminate the table containing C from further join
      processing. In order the optimization to be applied the WHERE condition
      must be a conjunction of simple equality/inequality predicates or/and
      BETWEEN predicates.
      The bug fixed in the patch resulted in fetching a wrong value from the
      index used for MIN/MAX optimization. It may happened when a BETWEEN
      predicate containing the MIN/MAX value followed a strict inequality.
      
      Approved by dmitry.shulga@mariadb.com
      b34bb81e
    • Marko Mäkelä's avatar
      MDEV-25125 Assertion failure in fetch_data_into_cache_low() · 867724fd
      Marko Mäkelä authored
      Before MDEV-14638, there was no race condition between the
      execution of fetch_data_into_cache() and transaction commit.
      
      fetch_data_into_cache(): Acquire trx_t::mutex before checking
      trx_t::state, to prevent a concurrent transition from
      TRX_STATE_COMMITTED_IN_MEMORY to TRX_STATE_NOT_STARTED
      in trx_commit_in_memory().
      867724fd
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 19052b6d
      Marko Mäkelä authored
      19052b6d
    • Marko Mäkelä's avatar
      MDEV-10682 Race condition between ANALYZE and STATS_AUTO_RECALC · c557e954
      Marko Mäkelä authored
      ha_innobase::info_low(): While collecting statistics for
      ANALYZE TABLE, ensure that dict_stats_process_entry_from_recalc_pool()
      is not executing on the same table.
      
      We observed result differences for the test innodb.innodb_stats because
      dict_stats_empty_index() was being invoked by the background statistics
      calculation while ha_innobase::analyze() was executing
      dict_stats_analyze_index_level().
      c557e954
    • Marko Mäkelä's avatar
      MDEV-25121: innodb_flush_method=O_DIRECT fails on compressed tables · 6505662c
      Marko Mäkelä authored
      Tests with 4096-byte sector size confirm that it is
      safe to use O_DIRECT with page_compressed tables.
      That had been disabled on Linux, in an attempt to fix MDEV-21584
      which had been filed for the O_DIRECT problems earlier.
      
      The fil_node_t::block_size was being set mostly correctly until
      commit 10dd290b (MDEV-17380)
      introduced a regression in MariaDB Server 10.4.4.
      
      fil_node_t::read_page0(): Initialize fil_node_t::block_size.
      This will probably make similar code in fil_space_extend_must_retry()
      redundant, but we play it safe and will not remove that code.
      
      Thanks to Vladislav Vaintroub for testing this on Microsoft Windows
      using an old-fashioned rotational hard disk with 4KiB sector size.
      
      Reviewed by: Vladislav Vaintroub
      6505662c
    • Vladislav Vaintroub's avatar
      MDEV-21584 - portability fix · 00f620b2
      Vladislav Vaintroub authored
      This patch implements OS_DATA_FILE_NO_O_DIRECT on Windows.
      00f620b2
    • Marko Mäkelä's avatar
      Cleanup: Remove unused OS_DATA_TEMP_FILE · 14a8b700
      Marko Mäkelä authored
      This had been originally added in
      mysql/mysql-server@192bb153b675fe09037a53e456a79eee7211e3a7
      with the motivation to disable O_DIRECT for the dedicated tablespace
      for temporary tables. In MariaDB Server,
      commit 5eb53955 (MDEV-12227)
      should be a better solution.
      
      The code became orphaned later in
      mysql/mysql-server@c61244c0e6c58727cffebfb312ac415a463fa0fe
      and it had been applied to MariaDB Server 10.2.2 in
      commit 2e814d47 and
      commit fec844ac.
      
      Thanks to Vladislav Vaintroub for spotting this.
      14a8b700
    • Jan Lindström's avatar
      MDEV-24916 : Assertion `current_stmt_binlog_format == BINLOG_FORMAT_STMT ||... · c9ba6689
      Jan Lindström authored
      MDEV-24916 : Assertion `current_stmt_binlog_format == BINLOG_FORMAT_STMT || current_stmt_binlog_format == BINLOG_FORMAT_ROW' failed in THD::is_current_stmt_binlog_format_row
      
      Store old value of binlog format before wsrep code so that
      if we bail out because wsrep is not ready for connections
      we can restore binlog format correctly.
      c9ba6689
    • Jan Lindström's avatar
      MDEV-18874 : Galera test MW-286 causes Mutex = TTASEventMutex<GenericPolicy>]:... · f4e14f0e
      Jan Lindström authored
      MDEV-18874 : Galera test MW-286 causes Mutex = TTASEventMutex<GenericPolicy>]: Assertion `!is_owned()' failed. assertion
      
      MDEV-24649 galera.galera_bf_lock_wait MTR failed with sigabrt: Assertion `!is_ow
      ned()' failed in sync0policy.ic on MutexDebug with Mutex = TTASEventMutex<GenericPolicy>
      
      Bug was fixed as part of MDEV-23328, this just adds test cases to
      regression set.
      f4e14f0e
    • Daniel Black's avatar
      mariadb.pc: plugindir is used · 69740581
      Daniel Black authored
      As evidenced by converstation on Zulip,
      knowing where to install a plugin is important too.
      69740581
  10. 17 Mar, 2021 1 commit
  11. 16 Mar, 2021 1 commit
    • Julius Goryavsky's avatar
      MDEV-21039: Server fails to start with unknown mysqld_safe options · bf303e82
      Julius Goryavsky authored
      Adding any unknown option to the "[mysqld_safe]" section makes
      mysqld impossible to start with mysqld_multi. For example, after
      adding the unknown option "numa_interleave" to the "[mysqld_safe]"
      section, mysqld_multi exits with the following diagnostics:
      
      [ERROR] /usr/local/mysql/bin/mysqld: unknown option '--numa_interleave'
      
      To get rid of this behavior, this patch adds the passing of the default
      group suffix from mysqld_multi to the mysqld_safe side.
      bf303e82
  12. 15 Mar, 2021 1 commit