1. 03 May, 2019 13 commits
    • Sergey Vojtovich's avatar
      Adieu find_sys_var_ex() · 894df7ed
      Sergey Vojtovich authored
      Only take LOCK_plugin for plugin system variables.
      
      Reverted optimisation that was originally done for session tracker: it
      makes much less sense now. Specifically only if connections would want to
      track plugin session variables changes and these changes would actually
      happen frequently. If this ever becomes an issue, there're much better
      ways to optimise this workload.
      
      Part of MDEV-14984 - regression in connect performance
      894df7ed
    • Sergey Vojtovich's avatar
      Make connect speed great again · 53671a1f
      Sergey Vojtovich authored
      Rather than parsing session_track_system_variables when thread starts, do
      it when first trackable event occurs.
      
      Benchmarked on a 2socket/20core/40threads Broadwell system using sysbench
      connect brencmark @40 threads (with select 1 disabled):
      101379.77 -> 143016.68 CPS, whereas 10.2 is currently at 137766.31 CPS.
      
      Part of MDEV-14984 - regression in connect performance
      53671a1f
    • Sergey Vojtovich's avatar
      Safe session_track_system_variables snapshot · 1b5cf2f7
      Sergey Vojtovich authored
      When enabling system variables tracker, make a copy of
      global_system_variables.session_track_system_variables
      under LOCK_global_system_variables. This protects from concurrent variable
      updates and potential freed memory access, as well as from variable
      reconstruction (which was previously protected by LOCK_plugin).
      
      We can also use this copy as a session variable pointer, so that we don't
      have to allocate memory and reconstruct it every time it is referenced.
      
      For this very reason we don't need buffer_length stuff anymore.
      
      As well as don't we need to take LOCK_plugin early in ::enable().
      Unified ::parse_var_list() to acquire LOCK_plugin unconditionally.
      For no apparent reason it wasn't previously acquired for global
      variable update.
      
      Part of MDEV-14984 - regression in connect performance
      1b5cf2f7
    • Sergey Vojtovich's avatar
      Allocate Session_sysvars_tracker statically · 554ac6f3
      Sergey Vojtovich authored
      One less new/delete per connection.
      
      Removed m_mem_flag since most allocs are thread specific. The only
      exception are allocs performed during initialization.
      
      Removed State_tracker and Session_tracker constructors as they don't make
      sense anymore.
      
      No reason to access session_sysvars_tracker via get_tracker(), so access
      it directly instead.
      
      Part of MDEV-14984 - regression in connect performance
      554ac6f3
    • Sergey Vojtovich's avatar
      Allocate Transaction_state_tracker statically · a7adc2ce
      Sergey Vojtovich authored
      One less new/delete per connection.
      
      Part of MDEV-14984 - regression in connect performance
      a7adc2ce
    • Sergey Vojtovich's avatar
      Static current schema and state change trackers · 47bd06d5
      Sergey Vojtovich authored
      Saves 2 new/delete per connection.
      
      Part of MDEV-14984 - regression in connect performance
      47bd06d5
    • Sergey Vojtovich's avatar
      Allocate orig_list statically · 01e8f3c5
      Sergey Vojtovich authored
      tool_list is a temporary list needed only for SET SESSION
      session_track_system_variables, so allocate it on stack instead.
      
      Sane reinit() calls.
      
      Saves 2 new/delete per connection.
      
      Part of MDEV-14984 - regression in connect performance
      01e8f3c5
    • Sergey Vojtovich's avatar
      Get rid of not implemented SESSION_GTIDS_TRACKER · 55bdd7f7
      Sergey Vojtovich authored
      One less new/delete per connection.
      
      Part of MDEV-14984 - regression in connect performance
      55bdd7f7
    • Sergey Vojtovich's avatar
      Cleanup session tracker API · 2be28a91
      Sergey Vojtovich authored
      - Session_sysvars_tracker::server_init_check() -> sysvartrack_validate_value()
      - Session_sysvars_tracker::check_var_list()    -> sysvartrack_validate_value()
      
      - Session_sysvars_tracker::server_init_process() -> sysvartrack_global_update()
      - sysvartrack_reprint_value()                    -> sysvartrack_global_update()
      
      - sysvartrack_value_len()       -> sysvartrack_session_value_ptr()
      - sysvartrack_value_construct() -> sysvartrack_session_value_ptr()
      
      - sysvartrack_update() -> Session_sysvars_tracker::update()
      - Session_tracker::server_boot_verify() -> session_tracker_init()
      - sysvar_tracker() -> /dev/null
      
      Part of MDEV-14984 - regression in connect performance
      2be28a91
    • Sergey Vojtovich's avatar
      Cleanup session tracker redundancy · 19d5ddcc
      Sergey Vojtovich authored
      - m_enabled is initialised by the base class constructor
      - removed unused schema_track_inited
      - moved Transaction_state_tracker constructor to declaration
      - common enable()
      - removed unused Session_sysvars_tracker::check_str()
      - classes are "private" by default
      - don't even try to compile for embedded
      
      Part of MDEV-14984 - regression in connect performance
      19d5ddcc
    • Sergey Vojtovich's avatar
      Session_sysvars_tracker::vars_list cleanups · 8f594b33
      Sergey Vojtovich authored
      - return proper type
      - removed useless node argument
      - removed useless mem_flag
      - classes are "private" by default
      - simplified iterators
      
      Part of MDEV-14984 - regression in connect performance
      8f594b33
    • Sergey Vojtovich's avatar
      A proper State_tracker::m_changed enacpsulation · 0e91e0c3
      Sergey Vojtovich authored
      Note: preserved original behaviour, where remaining trackers are not reset
      on error from store(). This effectively means subsequent statements will
      start tracking from unclean state.
      
      Part of MDEV-14984 - regression in connect performance
      0e91e0c3
    • Varun Gupta's avatar
      MDEV-18943: Group Concat with limit not working with views · 879878e4
      Varun Gupta authored
      Adjusted the Item_func_group_concat::print function to take into account
      limit if present with GROUP_CONCAT
      879878e4
  2. 02 May, 2019 6 commits
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 51823483
      Marko Mäkelä authored
      51823483
    • Marko Mäkelä's avatar
      Merge 10.2 into 10.3 · 158247d3
      Marko Mäkelä authored
      158247d3
    • Monty's avatar
      Fixed some compilation warnings/errors · 0d6fb43e
      Monty authored
      0d6fb43e
    • Thirunarayanan Balathandayuthapani's avatar
      MDEV-14398 innodb_encryption_rotate_key_age=0 causes innodb_encrypt_tables to be ignored · ada1074b
      Thirunarayanan Balathandayuthapani authored
      The statement
      
      SET GLOBAL innodb_encryption_rotate_key_age=0;
      
      would have the unwanted side effect that ENCRYPTION=DEFAULT tablespaces
      would no longer be encrypted or decrypted according to the setting of
      innodb_encrypt_tables.
      
      We implement a trigger, so that whenever one of the following is executed:
      
      SET GLOBAL innodb_encrypt_tables=OFF;
      SET GLOBAL innodb_encrypt_tables=ON;
      SET GLOBAL innodb_encrypt_tables=FORCE;
      
      all wrong-state ENCRYPTION=DEFAULT tablespaces will be added to
      fil_system_t::rotation_list, so that the encryption will be added
      or removed.
      
      Note: This will *NOT* happen automatically after a server restart.
      Before reading the first page of a data file, InnoDB cannot know
      the encryption status of the data file. The statement
      SET GLOBAL innodb_encrypt_tables will have the side effect that
      all not-yet-read InnoDB data files will be accessed in order to
      determine the encryption status.
      
      innodb_encrypt_tables_validate(): Stop disallowing
      SET GLOBAL innodb_encrypt_tables when innodb_encryption_rotate_key_age=0.
      This reverts part of commit 50eb40a2
      that addressed MDEV-11738 and MDEV-11581.
      
      fil_system_t::read_page0(): Trigger a call to fil_node_t::read_page0().
      Refactored from fil_space_get_space().
      
      fil_crypt_rotation_list_fill(): If innodb_encryption_rotate_key_age=0,
      initialize fil_system->rotation_list. This is invoked both on
      SET GLOBAL innodb_encrypt_tables and
      on SET GLOBAL innodb_encryption_rotate_key_age=0.
      
      fil_space_set_crypt_data(): Remove.
      
      fil_parse_write_crypt_data(): Simplify the logic.
      
      This is joint work with Marko Mäkelä.
      ada1074b
    • Aleksey Midenkov's avatar
    • Varun Gupta's avatar
      Adjust the result for join_cache.test · 0fd5ecb0
      Varun Gupta authored
      0fd5ecb0
  3. 01 May, 2019 3 commits
    • Anel Husakovic's avatar
      MDEV-17654 Incorrect syntax returned for column with CHECK constraint in the... · 2370eeb0
      Anel Husakovic authored
      MDEV-17654 Incorrect syntax returned for column with CHECK constraint in the "SHOW CREATE TABLE ..." result
      
      Prepend COMMENT before CHECK constraint in SHOW CREATE
      
      Closes #924
      2370eeb0
    • Daniel Black's avatar
      MDEV-15051: signal handler - output information about the core generation · dc8e15db
      Daniel Black authored
      The working directory, resource limits and core pattern will
      aid the user finding a core file in the case of failure.
      
      While the core file size is most relevant however other resource
      limits may give a clue as the the cause of the fatal signal so
      include them also.
      
      As signal handler functions are limited, proc filesystem reads/
      readlink calls are used instead of the more obvious getcwd/getrlimits
      functions which aren't listed as signal safe.
      
      Results in output of the form:
      
      Writing a core file: working directory at /tmp/datadir
      Resource Limits:
      Limit                     Soft Limit           Hard Limit Units
      Max cpu time              unlimited            unlimited seconds
      Max file size             unlimited            unlimited bytes
      Max data size             unlimited            unlimited bytes
      Max stack size            8388608              unlimited bytes
      Max core file size        unlimited            unlimited bytes
      Max resident set          unlimited            unlimited bytes
      Max processes             47194                47194 processes
      Max open files            1024                 4096 files
      Max locked memory         65536                65536 bytes
      Max address space         unlimited            unlimited bytes
      Max file locks            unlimited            unlimited locks
      Max pending signals       47194                47194 signals
      Max msgqueue size         819200               819200 bytes
      Max nice priority         0                    0
      Max realtime priority     0                    0
      Max realtime timeout      unlimited            unlimited            us
      Core pattern: |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I
      
      Segmentation fault (core dumped)
      
      Closes #537
      dc8e15db
    • Sergei Golubchik's avatar
      compilation fixes for VS 2019 · b953bf7e
      Sergei Golubchik authored
      b953bf7e
  4. 30 Apr, 2019 3 commits
  5. 29 Apr, 2019 11 commits
  6. 28 Apr, 2019 3 commits
  7. 27 Apr, 2019 1 commit