1. 06 Sep, 2024 3 commits
    • Yuchen Pei's avatar
    • Yuchen Pei's avatar
      MDEV-33858 Assertion `(mem_root->flags & 4) == 0' fails on 2nd execution of PS... · 00cb3440
      Yuchen Pei authored
      MDEV-33858 Assertion `(mem_root->flags & 4) == 0' fails on 2nd execution of PS with -DWITH_PROTECT_STATEMENT_MEMROOT=ON
      
      Simply adding tests as the bug is fixed with a backport of MDEV-34447
      00cb3440
    • Yuchen Pei's avatar
      MDEV-34447: Memory leakage is detected on running the test main.ps against the server 11.1 · 2c3e07df
      Yuchen Pei authored
      The memory leak happened on second execution of a prepared statement
      that runs UPDATE statement with correlated subquery in right hand side of
      the SET clause. In this case, invocation of the method
        table->stat_records()
      could return the zero value that results in going into the 'if' branch
      that handles impossible where condition. The issue is that this condition
      branch missed saving of leaf tables that has to be performed as first
      condition optimization activity. Later the PS statement memory root
      is marked as read only on finishing first time execution of the prepared
      statement. Next time the same statement is executed it hits the assertion
      on attempt to allocate a memory on the PS memory root marked as read only.
      This memory allocation takes place by the sequence of the following
      invocations:
       Prepared_statement::execute
        mysql_execute_command
         Sql_cmd_dml::execute
          Sql_cmd_update::execute_inner
           Sql_cmd_update::update_single_table
            st_select_lex::save_leaf_tables
             List<TABLE_LIST>::push_back
      
      To fix the issue, add the flag SELECT_LEX::leaf_tables_saved to control
      whether the method SELECT_LEX::save_leaf_tables() has to be called or
      it has been already invoked and no more invocation required.
      
      Similar issue could take place on running the DELETE statement with
      the LIMIT clause in PS/SP mode. The reason of memory leak is the same as for
      UPDATE case and be fixed in the same way.
      2c3e07df
  2. 05 Sep, 2024 8 commits
  3. 04 Sep, 2024 1 commit
    • Daniel Black's avatar
      MDEV-34864 SHOW INDEX FROM - SEQ_IN_INDEX to ULong · d1dc7067
      Daniel Black authored
      MySQL-Connector-Net casts SEQ_IN_INDEX to uint and will
      raise an exception if the type is a System.Int64.
      
      As we don't support a huge number of multi-columns in
      an index reducing to a uint is sufficient to represent
      all values and maintain compatibility with MySQL-Connector-Net.
      
      This matches the type (uint) returned by MySQL-8.3 and 8.0.
      
      Reviewer: Alexander Barkov <bar@mariadb.com>
      d1dc7067
  4. 01 Sep, 2024 8 commits
  5. 30 Aug, 2024 2 commits
  6. 29 Aug, 2024 4 commits
  7. 28 Aug, 2024 2 commits
  8. 27 Aug, 2024 2 commits
  9. 26 Aug, 2024 6 commits
  10. 21 Aug, 2024 3 commits
    • Monty's avatar
      MDEV-34043 Drastically slower query performance between CentOS (2sec) and Rocky (48sec) · 1f040ae0
      Monty authored
      One cause of the slowdown is because the ftruncate call can be much
      slower on some systems.  ftruncate() is called by Aria for internal
      temporary tables, tables created by the optimizer, when the upper level
      asks Aria to delete the previous result set. This is needed when some
      content from previous tables changes.
      
      I have now changed Aria so that for internal temporary tables we don't
      call ftruncate() anymore for maria_delete_all_rows().
      
      I also had to update the Aria repair code to use the logical datafile
      size and not the on-disk datafile size, which may contain data from a
      previous result set.  The repair code is called to create indexes for
      the internal temporary table after it is filled.
      I also replaced a call to mysql_file_size() with a pwrite() in
      _ma_bitmap_create_first().
      
      Reviewer: Sergei Petrunia <sergey@mariadb.com>
      Tester: Dave Gosselin <dave.gosselin@mariadb.com>
      1f040ae0
    • Oleksandr Byelkin's avatar
      fix MDEV-34771 & MDEV-34776 · eadf0f63
      Oleksandr Byelkin authored
      removed duplicated methods
      eadf0f63
    • Oleksandr Byelkin's avatar
  11. 20 Aug, 2024 1 commit