1. 13 May, 2015 11 commits
    • Sergei Golubchik's avatar
      MDEV-7993 file_key_management_filekey doesn't work as expected with FILE: · 66380916
      Sergei Golubchik authored
      chomp the secret, as read from the file. remove trailing
      CR and LF bytes.
      66380916
    • Sergei Golubchik's avatar
      MDEV-8040 make aria encryption use real keys · a35b538b
      Sergei Golubchik authored
      applied upstream patch
      a35b538b
    • Sergei Golubchik's avatar
      move encryption tests to a dedicate suite · ab8415d9
      Sergei Golubchik authored
      remove few tests for variables that never existed (merge error)
      ab8415d9
    • Sergey Vojtovich's avatar
      MDEV-7943 - pthread_getspecific() takes 0.76% in OLTP RO · b2295990
      Sergey Vojtovich authored
      Added THD argument to select_result and all derivative classes.
      This reduces number of pthread_getspecific calls from 796 to 776 per OLTP RO
      transaction.
      b2295990
    • Alexander Barkov's avatar
      MDEV-8152 is_columns_is_embedded test fails · 8345bc69
      Alexander Barkov authored
      Recording --ps and --embedded tests (a postfix for MDEV-7807)
      8345bc69
    • Sergey Vojtovich's avatar
      MDEV-8001 - mysql_reset_thd_for_next_command() takes 0.04% in OLTP RO · 9851a819
      Sergey Vojtovich authored
      Removed yet more mysql_reset_thd_for_next_command(). Call
      THD::reset_for_next_command() directly instead.
      9851a819
    • Sergey Vojtovich's avatar
      MDEV-7951 - sql_alloc() takes 0.25% in OLTP RO · 4d1ccc42
      Sergey Vojtovich authored
      sql_alloc() has additional costs compared to direct mem_root allocation:
      - function call: it is defined in a separate translation unit and can't be
        inlined
      - it needs to call pthread_getspecific() to get THD::mem_root
      
      It is called dozens of times implicitely at least by:
      - List<>::push_back()
      - List<>::push_front()
      - new (for Sql_alloc derived classes)
      - sql_memdup()
      
      Replaced lots of implicit sql_alloc() calls with direct mem_root allocation,
      passing through THD pointer whenever it is needed.
      
      Number of sql_alloc() calls reduced 345 -> 41 per OLTP RO transaction.
      pthread_getspecific() overhead dropped 0.76 -> 0.59
      sql_alloc() overhed dropped 0.25 -> 0.06
      4d1ccc42
    • Sergey Vojtovich's avatar
      MDEV-7964 - delete_dynamic() takes 0.12% in OLTP RO · c4d2c4e8
      Sergey Vojtovich authored
      delete_dynamic() was called 9-11x per OLTP RO query + 3x per BEGIN/COMMIT.
      
      3 calls were performed by LEX_MASTER_INFO. Added condition to call those only
      for CHANGE MASTER.
      
      1 call was performed by lock_table_names()/Hash_set/my_hash_free(). Hash_set was
      supposed to be used for DDL and LOCK TABLES to gather database names, while it
      was initialized/freed for DML too. In fact Hash_set didn't do any useful job
      here. Hash_set was removed and MDL requests are now added directly to the list.
      
      The rest 5-7 calls are done by optimizer, mostly by Explain_query and friends.
      Since dynamic arrays are used in most cases, they can hardly be optimized.
      
      my_hash_free() overhead dropped 0.02 -> out of radar.
      delete_dynamic() overhead dropped 0.12 -> 0.04.
      c4d2c4e8
    • Sergey Vojtovich's avatar
      MDEV-8001 - mysql_reset_thd_for_next_command() takes 0.04% in OLTP RO · 7cfa803d
      Sergey Vojtovich authored
      Removed mysql_reset_thd_for_next_command(). Call THD::reset_for_next_command()
      directly instead.
      
      mysql_reset_thd_for_next_command() overhead dropped 0.04% -> out of radar.
      THD::reset_for_next_command() overhead didn't increase.
      7cfa803d
    • Sergey Vojtovich's avatar
      MDEV-7999 - PROFILING routines take 0.2% when profiling disabled · 5cfb6b47
      Sergey Vojtovich authored
      PROFILING::start_new_query() optimizations:
      - no need to check "current": added assertion instead
      - "enabled" now means "is enabled currently" instead of "was enabled at query
        start". Old meaning was useless, new meaning echoes OPTION_PROFILING so
        that start_new_query() can be defined in sql_profile.h.
      - remnants of start_new_query() moved to sql_profile.h so it can be inlined
      
      PROFILING::start_new_query() overhead dropped 0.08% -> out of radar.
      
      PROFILING::set_query_source() optimizations:
      - no need to check "enabled": !enabled && current is impossible
      - remnants of set_query_source() moved to sql_profile.h so it can be inlined
      
      PROFILING::set_query_source() overhead dropped 0.02% -> out of radar.
      
      PROFILING::finish_current_query() optimizations:
      - moved "current" check out to sql_profile.h so it can be inlined
      
      PROFILING::finish_current_query() overhead dropped 0.10% -> out of radar.
      5cfb6b47
    • Sergey Vojtovich's avatar
      MDEV-7945 - THD::enter_stage() takes 0.48% in OLTP RO · 55d5af73
      Sergey Vojtovich authored
      THD::enter_stage() optimizations:
      - stage backup code moved to THD::backup_stage(), saves one condition
      - moved check for "new_stage" out to callers that actually need it
      - remnants of enter_stage() moved to sql_class.h so it can be inlined
      
      THD::enter_stage() overhead dropped 0.48% -> 0.07%.
      
      PROFILING::status_change() optimizations:
      - "status_arg" is now checked by QUERY_PROFILE::new_status()
      - no need to check "enabled": !enabled && current is impossible
      - remnants of status_change() moved to sql_profile.h so it can be inlined
      
      PROFILING::status_change() overhead dropped 0.1% -> out of radar.
      55d5af73
  2. 12 May, 2015 2 commits
    • Nirbhay Choubey's avatar
      MDEV-8151 : wsrep.foreign_key, wsrep.pool_of_threads, · c8ad5b2f
      Nirbhay Choubey authored
      .. wsrep.binlog_format, wsrep.mdev_6832 fail in buildbot
      
      Galera-3.9 logs an additional warning in the error log if
      it fails to find gvwstate.dat file. Update wsrep/suite.pm.
      c8ad5b2f
    • Alexey Botchkov's avatar
      MDEV-7926 Server crashes in get_geometry_column_record on concurrent SELECT... · 8c54182e
      Alexey Botchkov authored
      MDEV-7926 Server crashes in get_geometry_column_record on concurrent SELECT FROM I_S.GEOMETRY_COLUMNS with join and DDL.
               The bug was that open_tables() returned error in case of
              thd->killed() without properly calling thd->send_kill_message()
              to set the correct error. This was fixed already in get_schema_column_record,
              so the code was just copied to get_geometry_column_record.
      8c54182e
  3. 11 May, 2015 4 commits
    • Jan Lindström's avatar
      MDEV-7942: InnoDB: abuse of UNIV_LIKELY()/UNIV_UNLIKELY() · 58e8db2e
      Jan Lindström authored
      UNIV_LIKELY()/UNIV_UNLIKELY() hints are supposed to improve branch prediction.
      Currently, they're expected to work only if cond evaluates to TRUE or FALSE.
      
      However there're a few conditions that may evaluate to different values, e.g.:
      
      page/page0zip.cc:		if (UNIV_LIKELY(c_stream->avail_in)) {
      page/page0zip.cc:			if (UNIV_LIKELY(c_stream->avail_in)) {
      dict/dict0mem.cc:		if (UNIV_LIKELY(i) && UNIV_UNLIKELY(!table->col_names)) {
      
      Fixed these conditions so that they evaluate TRUE/FALSE.
      58e8db2e
    • Kristian Nielsen's avatar
      6e492016
    • Kristian Nielsen's avatar
      MDEV-8113: Parallel slave: slave hangs on ALTER TABLE (or other DDL) as the... · 8bedb638
      Kristian Nielsen authored
      MDEV-8113: Parallel slave: slave hangs on ALTER TABLE (or other DDL) as the first event after slave start
      
      In optimistic parallel replication, it is not safe to try to run a following
      transaction in parallel with a DDL statement, and there is code to prevent
      this.
      
      However, the code was missing the case where the DDL is the very first event
      after slave start. In this case, following transactions could run in
      parallel with the DDL, which can cause the slave to hang or even corrupt
      slave in unlucky cases.
      8bedb638
    • Jan Lindström's avatar
      MDEV-8129: Compilation warnings in log0crypt.cc · ecfc3de5
      Jan Lindström authored
      Fix incorrect types and compiler warnings.
      ecfc3de5
  4. 09 May, 2015 2 commits
  5. 08 May, 2015 2 commits
  6. 07 May, 2015 4 commits
  7. 06 May, 2015 5 commits
  8. 05 May, 2015 1 commit
    • Alexander Barkov's avatar
      - Moving Item_func_spatial_mbr_rel from Item_bool_func2 to Item_bool_func, · 539b3ca8
      Alexander Barkov authored
        as Item_func_spatial_mbr_rel needs nothing from Item_bool_func2.
      - Renaming Item_func_spacial_rel (the class that implements precise spacial
        relations) to Item_func_spatial_precise_rel
      - Adding a new abstract class Item_func_spatial_rel as a common parent
        for Item_func_spatial_precise_rel and Item_func_spatial_mbr_rel.
      539b3ca8
  9. 04 May, 2015 3 commits
    • Alexander Barkov's avatar
      MDEV-7950 Item_func::type() takes 0.26% in OLTP RO · 2fe4d0e6
      Alexander Barkov authored
      Step #3: Splitting the function check_equality() into a method in Item.
      Implementing Item::check_equality() and Item_func_eq::check_equality().
      Implement Item_func_eq::build_equal_items() in addition to
      Item_func::build_equal_items() and moving the call for check_equality()
      from Item_func::build_equal_items() to Item_func_eq::build_equal_items().
      2fe4d0e6
    • Alexander Barkov's avatar
      Adding a test for Item_default_value in WHERE condition: · 9090c3ef
      Alexander Barkov authored
        WHERE DEFAULT(col)
      It seems this was not covered yet.
      9090c3ef
    • Alexander Barkov's avatar
      MDEV-7950 Item_func::type() takes 0.26% in OLTP RO · 462bca36
      Alexander Barkov authored
      Step 2c:
      
      After discussion with Igor, it appeared that Item_field and Item_ref
      could not appear in this context in the old function build_equal_item_for_cond:
      
        else if (cond->type() == Item::FUNC_ITEM ||
                 cond->real_item()->type() == Item::FIELD_ITEM)
      
      The part of the condition checking for Item_field::FIELD_ITEM was a dead code.
      - Moving implementation of Item_ident_or_func_or_sum::build_equal_items()
      to Item_func::build_equal_items()
      - Restoring deriving of Item_ident and Item_sum_or_func from Item_result_field.
        Removing Item_ident_or_func_or_sum.
      462bca36
  10. 01 May, 2015 1 commit
  11. 30 Apr, 2015 1 commit
  12. 29 Apr, 2015 3 commits
    • Alexander Barkov's avatar
      A clean-up for c8141f53 · 499deca7
      Alexander Barkov authored
      MDEV-7950 Item_func::type() takes 0.26% in OLTP RO (Step#2)
      
      - Item_ref was doing unnecessary extra job after the "MDEV-7950 Step#2" patch.
        Fallback to Item::build_equal_items() if real_type() is not FIELD_ITEM.
        Note, Item_ref::build_equal_items() will most likely be further simplified.
        Waiting for Sanja and Igor to check a possibly dead code.
      
      - Safety: Adding Item_sum::build_equal_items() with ASSERT, as Item_sum
        should never appear in build_equal_items() context.
      499deca7
    • Kristian Nielsen's avatar
      Merge branch '10.0' into 10.1 · 9cdf5c2b
      Kristian Nielsen authored
      9cdf5c2b
    • Kristian Nielsen's avatar
      MDEV-7802: group commit status variable addition · 9088f26f
      Kristian Nielsen authored
      Backport into 10.0
      9088f26f
  13. 28 Apr, 2015 1 commit
    • Alexander Barkov's avatar
      MDEV-7950 Item_func::type() takes 0.26% in OLTP RO · c8141f53
      Alexander Barkov authored
      Step#2:
      
      1. Removes the function build_equal_items_for_cond() and
         introduces a new method Item::build_equal_items() instead,
         with specific implementations in the following Items:
      
         Item  (the default implementation)
         Item_ident_or_func_or_sum
         Item_cond
         Item_cond_and
      
      2. Adds a new abstract class Item_ident_or_func_or_sum,
         a common parent for Item_ident and Item_func_or_sum,
         as they have exactly the same build_equal_items().
      
      3. Renames Item_cond_and::cond_equal to Item_cond_and::m_cond_equal,
         to avoid confusion between the member and local variables named
         "cond_equal".
      c8141f53