1. 03 Jun, 2023 1 commit
    • Marko Mäkelä's avatar
      MDEV-31343 Another server hang with innodb_undo_log_truncate=ON · e89bd39c
      Marko Mäkelä authored
      trx_purge_truncate_history(): While waiting for a write-fixed block
      to become available, simply wait for an exclusive latch on it.
      Also, simplify the iteration: first check for oldest_modification>2
      (to ignore clean pages or pages belonging to the temporary tablespace)
      and then compare the tablespace identifier.
      
      Before releasing buf_pool.flush_list_mutex we will buffer-fix the block
      of interest. In that way, buf_page_t::can_relocate() will not hold on
      the block and it must remain in the buffer pool until we have acquired
      an exclusive latch on it. If the block is still dirty, we will register
      it with the tablespace truncation mini-transaction; else, we will simply
      release the latch and buffer-fix and move to the next block.
      
      This also reverts commit c4d79399
      because that fix should no longer be necessary; the wait for an
      exclusive block latch should allow buf_pool_t::release_freed_page()
      on the same block to proceed.
      
      Tested by: Axel Schwenke, Matthias Leich
      e89bd39c
  2. 05 May, 2023 4 commits
    • Sergei Petrunia's avatar
      MDEV-31199: Assertion `field->table->stats_is_read' fails with hash_join_cardinality=on · a24f2bb5
      Sergei Petrunia authored
      Derived table creation code would call Field::make_new_field() which would
      memcpy the Field object from the source table, including Field::read_stats.
      
      But the temp. table as a whole had table->stats_is_read=false. Which was
      correct but not consistent with Field::read_stats and caused an assertion.
      
      Fixed by making sure that Field::read_stats=NULL for fields in the new
      temporary (i.e. work) tables.
      a24f2bb5
    • Oleksandr Byelkin's avatar
      Merge branch '10.5' into 10.6 · 1c394795
      Oleksandr Byelkin authored
      1c394795
    • Oleksandr Byelkin's avatar
      Merge branch '10.4' into 10.5 · b735ca47
      Oleksandr Byelkin authored
      b735ca47
    • Sergei Petrunia's avatar
      MDEV-31194: Server crash or assertion failure with join_cache_level=4 · 2594da7a
      Sergei Petrunia authored
      The problem, introduced in patch for MDEV-26301:
      
      When check_join_cache_usage() decides not to use join buffer, it must
      adjust the access method accordingly. For BNL-H joins this means switching
      from pseudo-"ref access"(with index=MAX_KEY) to some other access method.
      
      Failing to do this will cause assertions down the line when code that is
      not aware of BNL-H will try to initialize index use for ref access with
      index=MAX_KEY.
      
      The fix is to follow the regular code path to disable the join buffer for
      the join_tab ("goto no_join_cache") instead of just returning from
      check_join_cache_usage().
      2594da7a
  3. 04 May, 2023 10 commits
  4. 03 May, 2023 8 commits
  5. 02 May, 2023 13 commits
  6. 30 Apr, 2023 1 commit
    • Igor Babaev's avatar
      MDEV-31143 Crash for query using ROWNUM() over view with ORDER BY · 7e2e9689
      Igor Babaev authored
      When processing a query over a mergeable view at some conditions checked
      at prepare stage it may be decided to materialize the view rather than
      to merge it. Before this patch in such case the field 'derived' of the
      TABLE_LIST structure created for the view remained set to 0. As a result
      the guard condition preventing range analysis for materialized views did
      not work properly. This led to a call of some handler method for the
      temporary table created to contain the view's records that was supposed
      to be used only for opened tables. However temporary tables created for
      materialization of derived tables or views are not opened yet when range
      analysis is performed.
      
      Approved by Oleksandr Byelkin <sanja@mariadb.com>
      7e2e9689
  7. 29 Apr, 2023 2 commits
  8. 28 Apr, 2023 1 commit