1. 03 May, 2019 1 commit
  2. 02 May, 2019 3 commits
    • Monty's avatar
      Fixed deadlock in main.flush_read_lock · 18663539
      Monty authored
      local_global_read_lock did release all HANDLER's before taking its
      MDL_BACKUP_FTWRL# locks. This had a potential race condition if
      there was a waiting LOCK TABLE for one of the freed handlers.
      
      Fixed by moving the release of HANDLER's to after the backup locks are
      taken.
      
      After commit 8cf7e345 it's not anymore critical to free HANDLER's in
      FTWRL, but we will keep the mysql_ha_cleanup_no_free() call until 10.5
      to not cause any issues with 10.4 just before it's going GA.
      18663539
    • Monty's avatar
      Enable mysqlcheck and flush_read_lock tests · 0cc7c608
      Monty authored
      - Updated results
      - Run mysqlcheck without --user-stat-tables=PREFERABLY to keep results
        consistent
      - Don't allow one to run analyze table under FTWRL as analyze table
        nowadays has to update status tables.
      0cc7c608
    • Igor Babaev's avatar
      MDEV-19363 Assertion `select_lex' failed in LEX::pop_select · 2b7e080f
      Igor Babaev authored
      This patch corrects the patch for MDEV-19324. The latter did not
      work properly in the cases when the transformation
        (SELECT ... ORDER BY ...) LIMIT ... =>
         SELECT ... ORDER BY ... LIMIT ...
      was applied to the operands of a set operation.
      2b7e080f
  3. 01 May, 2019 1 commit
  4. 30 Apr, 2019 1 commit
  5. 29 Apr, 2019 7 commits
  6. 27 Apr, 2019 2 commits
    • Marko Mäkelä's avatar
      Adjust perfschema.privilege_table_io result · 81f6a3b0
      Marko Mäkelä authored
      This is fixup for the merge commit e6bdf77e
      
      FIXME: Find out why the results differ between release and debug builds.
      81f6a3b0
    • Igor Babaev's avatar
      MDEV-19324 Wrong results from query, using brackets with ORDER BY ..LIMIT · 5dee4a99
      Igor Babaev authored
      If a select query was of the form (SELECT ... ORDER BY ...) LIMIT ...
      then in most cases it returned incorrect result. It happened because
      SELECT ... ORDER BY ... was wrapped into a select with materialized
      derived table:
        SELECT ... ORDER BY ... =>
        SELECT * FROM (SELECT ... ORDER BY ...) dt.
      Yet for any materialized derived table ORDER BY without LIMIT is ignored.
      This patch resolves the problem by the conversion
        (SELECT ... ORDER BY ...) LIMIT ... =>
        SELECT ... ORDER BY ... LIMIT ...
      at the parser stage.
      
      Similarly
        ((SELECT ... UNION ...) ORDER BY ...) LIMIT ...
      is converted to
        (SELECT ... UNION ...) ORDER BY ... LIMIT ...
      This conversion optimizes execution of the query because the result of
      (SELECT ... UNION ...) ORDER BY ... is not materialized into a temporary
      table anymore.
      5dee4a99
  7. 26 Apr, 2019 1 commit
  8. 25 Apr, 2019 14 commits
  9. 24 Apr, 2019 5 commits
    • Marko Mäkelä's avatar
      Merge 5.5 into 10.1 · bfb0726f
      Marko Mäkelä authored
      bfb0726f
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-15772 Potential list overrun during XA recovery · d5da8ae0
      Thirunarayanan Balathandayuthapani authored
      InnoDB could return the same list again and again if the buffer
      passed to trx_recover_for_mysql() is smaller than the number of
      transactions that InnoDB recovered in XA PREPARE state.
      
      We introduce the transaction state TRX_PREPARED_RECOVERED, which
      is like TRX_PREPARED, but will be set during trx_recover_for_mysql()
      so that each transaction will only be returned once.
      
      Because init_server_components() is invoking ha_recover() twice,
      we must reset the state of the transactions back to TRX_PREPARED
      after returning the complete list, so that repeated traversals
      will see the complete list again, instead of seeing an empty list.
      Without this tweak, the test main.tc_heuristic_recover would hang
      in MariaDB 10.1.
      d5da8ae0
    • Varun Gupta's avatar
      MDEV-15837: Assertion `item1->type() == Item::FIELD_ITEM && item2->type() == Item::FIELD_ITEM' · 1f1a61cf
      Varun Gupta authored
                  failed in compare_order_elements function
      
      The issue here is the function compare_order_lists() is called for the order by list of the window functions
      so that those window function that can be computed together are adjacent.
      So in the function compare_order_list we iterate over all the elements in the order list of the two functions and
      compare the items in their order by clause.
      The function compare_order_elements() is called for each item in the
      order by clause. This function assumes that all the items that are in the order by list would be of the type
      Item::FIELD_ITEM.
      
      The case we have is that we have constants in the order by clause. We should ignore the constant and only compare
      items of the type Item::FIELD_ITEM in compare_order_elements()
      1f1a61cf
    • Sujatha Sivakumar's avatar
      MDEV-17260: Memory leaks in mysqlbinlog · cb8d888c
      Sujatha Sivakumar authored
      Problem:
      ========
      The mysqlbinlog tool is leaking memory, causing failures in various tests when
      compiling and testing with AddressSanitizer or LeakSanitizer like this:
      
      cmake -DCMAKE_BUILD_TYPE=Debug -DWITH_ASAN:BOOL=ON /path/to/source
      make -j$(nproc)
      cd mysql-test
      ASAN_OPTIONS=abort_on_error=1 ./mtr --parallel=auto rpl.rpl_row_mysqlbinlog
      
      CURRENT_TEST: rpl.rpl_row_mysqlbinlog
      
      Direct leak of 112 byte(s) in 1 object(s) allocated from:
      #0 0x4eff87 in __interceptor_malloc (/dev/shm/5.5/client/mysqlbinlog+0x4eff87)
      #1 0x60eaab in my_malloc /mariadb/5.5/mysys/my_malloc.c:41:10
      #2 0x5300dd in Log_event::read_log_event(char const*, unsigned int, char const**,
         Format_description_log_event const*, char) /mariadb/5.5/sql/log_event.cc:1568:
      #3 0x564a9c in dump_remote_log_entries(st_print_event_info*, char const*)
      /mariadb/5.5/client/mysqlbinlog.cc:1978:17
      
      Analysis:
      ========
      'mysqlbinlog' tool is being used to read binary log events from a remote server.
      While reading binary log, if a fake rotate event is found following actions are
      taken.
      
      If 'to-last-log' option is specified, then fake rotate event is processed.
      In the absence of 'to-last-log' skip the fake rotate event.
      
      In this skipped case the fake rotate event object is not getting cleaned up
      resulting in memory leak.
      
      Fix:
      ===
      Cleanup the fake rotate event.
      
      This issues is already fixed in MariaDB 10.0.23 and higher versions as part of
      commit c3018b0f
      cb8d888c
    • Igor Babaev's avatar
      MDEV-17796 WHERE filter is ignored by DISTINCT IFNULL(GROUP_CONCAT(X), Y) · 5fc8dd8b
      Igor Babaev authored
                 with GROUP BY + ORDER BY
      
      The method JOIN::create_postjoin_aggr_table() should not call
      call JOIN::add_sorting_to_table() unless the first non-constant join
      table is passed as the first parameter to the method.
      5fc8dd8b
  10. 23 Apr, 2019 5 commits