1. 17 Feb, 2020 3 commits
  2. 16 Feb, 2020 1 commit
  3. 09 Feb, 2020 18 commits
  4. 08 Feb, 2020 5 commits
    • Alexander Barkov's avatar
      MDEV-21689 Add Sql_cmd for GRANT/REVOKE statements · 77c63823
      Alexander Barkov authored
      Rewriting GRANT/REVOKE grammar to use more bison stack and use Sql_cmd_ style
      
      1. Removing a few members from LEX:
         - uint grant, grant_to_col, which_columns
         - List<LEX_COLUMN> columns
         - bool all_privileges
      2. Adding classes Grand_object_name, Lex_grant_object_name
      3. Adding classes Grand_privilege, Lex_grand_privilege
      4. Adding struct Lex_column_list_privilege_st, class Lex_column_list_privilege
      5. Rewriting the GRANT/REVOKE grammar to use new classes and pass them through
         bison stack (rather than directly access LEX members)
      6. Adding classes Sql_cmd_grant* and Sql_cmd_revoke*,
         changing GRANT/REVOKE to use LEX::m_sql_cmd.
      7. Adding the "sp_handler" grammar rule and removing some duplicate grammar
         for GRANT/REVOKE for different kinds of SP objects.
      8. Adding a new rule comma_separated_ident_list, reusing it in:
         - with_column_list
         - colum_list_privilege
      77c63823
    • Marko Mäkelä's avatar
      Cleanup: Aligned InnoDB index page header access · 06b0623a
      Marko Mäkelä authored
      ut_align_down(): Preserve the const qualifier. Use C++ casts.
      
      ha_delete_hash_node(): Correct an assertion expression.
      
      fil_page_get_type(): Perform an assumed-aligned read.
      
      page_align(): Preserve the const qualifier. Assume (some) alignment.
      
      page_get_max_trx_id(): Check the index page type.
      
      page_header_get_field(): Perform an assumed-aligned read.
      
      page_get_autoinc(): Perform an assumed-aligned read.
      
      page_dir_get_nth_slot(): Perform an assumed-aligned read.
      Preserve the const qualifier.
      06b0623a
    • Marko Mäkelä's avatar
      MDEV-21351: Allocate aligned memory · c5856b0a
      Marko Mäkelä authored
      recv_sys_t::ALIGNMENT: The recv_sys_t::alloc() alignment
      c5856b0a
    • Marko Mäkelä's avatar
      6eed99f1
    • Martin Liska's avatar
      MDEV-21248: Prevent optimizing out buf argument in check_stack_overrun. · 35c27785
      Martin Liska authored
      When using LTO, one can see optimization of stack variables that
      are passed to check_stack_overrun as argument buf. That prevents
      proper stack overrun detection.
      35c27785
  5. 07 Feb, 2020 6 commits
    • Marko Mäkelä's avatar
      One more fixup for sizeof(mtr_t) reduction · 0d1ca193
      Marko Mäkelä authored
      Add explicit casts when assigning ulint to m_user_space_id.
      0d1ca193
    • Marko Mäkelä's avatar
      mtr_t::get_log_mode(): Remove a redundant assertion · 91e7b443
      Marko Mäkelä authored
      mtr_log_t and mtr_t::m_log_mode have the same range 0 to 3.
      91e7b443
    • Marko Mäkelä's avatar
      Fixup the parent commit · 2b260f2d
      Marko Mäkelä authored
      mtr_t::get_log_mode(): Use equivalent static_assert().
      
      mtr_t::m_n_log_recs: Do not exceed the number of bits in uint16_t.
      2b260f2d
    • Marko Mäkelä's avatar
      Cleanup: Recude sizeof(mtr_t) · 9a999469
      Marko Mäkelä authored
      Use bit-fields for some mtr_t members to improve locality of reference.
      Because mtr_t is never shared between threads, there are no considerations
      regarding concurrent access.
      9a999469
    • Marko Mäkelä's avatar
      Merge 10.4 into 10.5 · 8b6cfda6
      Marko Mäkelä authored
      8b6cfda6
    • Marko Mäkelä's avatar
      MDEV-21674 purge_sys.stop() fails to wait for purge workers to complete · 8b97eba3
      Marko Mäkelä authored
      Since commit 5e62b6a5 (MDEV-16264),
      purge_sys_t::stop() no longer waited for all purge activity to stop.
      
      This caused problems on FLUSH TABLES...FOR EXPORT because of
      purge running concurrently with the buffer pool flush.
      The assertion at the end of buf_flush_dirty_pages() could fail.
      
      The, implemented by Vladislav Vaintroub, aims to eliminate race
      conditions when stopping or resuming purge:
      
      waitable_task::disable(): Wait for the task to complete, then replace
      the task callback function with noop.
      
      waitable_task::enable(): Restore the original task callback function
      after disable().
      
      purge_sys_t::stop(): Invoke purge_coordinator_task.disable().
      
      purge_sys_t::resume(): Invoke purge_coordinator_task.enable().
      
      purge_sys_t::running(): Add const qualifier, and clarify the comment.
      The purge coordinator task will remain active as long as any purge
      worker task is active.
      
      purge_worker_callback(): Assert purge_sys.running().
      
      srv_purge_wakeup(): Merge with the only caller purge_sys_t::resume().
      
      purge_coordinator_task: Use static linkage.
      8b97eba3
  6. 06 Feb, 2020 2 commits
    • Marko Mäkelä's avatar
      MDEV-18582: Fix a race condition · cd3bdc09
      Marko Mäkelä authored
      srv_export_innodb_status(): While gathering
      innodb_mem_adaptive_hash, acquire btr_search_latches[i]
      in order to prevent a race condition with buffer pool resizing.
      cd3bdc09
    • Marko Mäkelä's avatar
      MDEV-21351: Free processed recv_sys_t::blocks · 6d214415
      Marko Mäkelä authored
      Release memory as soon as redo log records are processed.
      
      Because the memory allocation and deallocation of parsed redo log
      records must be protected by recv_sys.mutex, it is better to avoid
      using a std::atomic field for bookkeeping.
      
      buf_page_t::access_time: Keep track of the recv_sys.pages record
      allocations. The most significant 16 bits will count allocated
      blocks (which were previously counted by buf_page_t::buf_fix_count
      in the debug version), and the least significant 16 bits indicate
      the number of allocated bytes in the block (which was previously
      managed in buf_block_t::modify_clock), which must be a positive
      number, up to innodb_page_size. The byte offset 65536 is represented
      as the value 0.
      
      recv_recover_page(): Let the caller erase the log.
      
      recv_validate_tablespace(): Acquire recv_sys_t::mutex.
      6d214415
  7. 05 Feb, 2020 3 commits
  8. 04 Feb, 2020 2 commits
    • Sergey Vojtovich's avatar
      libpmem cmake macros · daaa881c
      Sergey Vojtovich authored
      Also added support for MAP_SYNC. It allows to achieve decent performance
      with DAX devices even when libpmem is unavailable.
      
      Fixed Windows version of my_msync(): according to manual FlushViewOfFile()
      may return before flush is actually completed. It is advised to issue
      FlushFileBuffers() after FlushViewOfFile().
      daaa881c
    • Marko Mäkelä's avatar
      MDEV-21645 SIGSEGV in innobase_get_computed_value · a56f7824
      Marko Mäkelä authored
      ha_innobase::commit_inplace_alter_table(): After
      ALTER_STORED_COLUMN_ORDER, ensure that the virtual column metadata
      will be reloaded also when the table is not being rebuilt.
      a56f7824