1. 13 May, 2015 1 commit
    • 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 2 commits
    • 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
    • Kristian Nielsen's avatar
      MDEV-7864: Slave SQL: stopping on non-last RBR event with annotations results in SEGV (signal 11) · ed701c6a
      Kristian Nielsen authored
      The slave SQL thread was clearing serial_rgi->thd before deleting
      serial_rgi, which could cause access to NULL THD.
      
      The clearing was introduced in commit
      2e100cc5 and is just plain wrong. So revert
      that part (single line) of that commit.
      
      Thanks to Daniel Black for bug analysis and test case.
      ed701c6a
  14. 27 Apr, 2015 1 commit
  15. 25 Apr, 2015 1 commit
  16. 24 Apr, 2015 3 commits
  17. 23 Apr, 2015 2 commits
    • Kristian Nielsen's avatar
      Merge MDEV-8031 into 10.1 · c2dd88ac
      Kristian Nielsen authored
      c2dd88ac
    • Kristian Nielsen's avatar
      MDEV-8031: Parallel replication stops on "connection killed" error (probably... · b616991a
      Kristian Nielsen authored
      MDEV-8031: Parallel replication stops on "connection killed" error (probably incorrectly handled deadlock kill)
      
      There was a rare race, where a deadlock error might not be correctly
      handled, causing the slave to stop with something like this in the error
      log:
      
      150423 14:04:10 [ERROR] Slave SQL: Connection was killed, Gtid 0-1-2, Internal MariaDB error code: 1927
      150423 14:04:10 [Warning] Slave: Connection was killed Error_code: 1927
      150423 14:04:10 [Warning] Slave: Deadlock found when trying to get lock; try restarting transaction Error_code: 1213
      150423 14:04:10 [Warning] Slave: Connection was killed Error_code: 1927
      150423 14:04:10 [Warning] Slave: Connection was killed Error_code: 1927
      150423 14:04:10 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'master-bin.000001 position 1234
      
      The problem was incorrect error handling. When a deadlock is detected, it
      causes a KILL CONNECTION on the offending thread. This error is then later
      converted to a deadlock error, and the transaction is retried.
      
      However, the deadlock error was not cleared at the start of the retry, nor
      was the lingering kill signal. So it was possible to get another deadlock
      kill early during retry. If this happened with particular thread
      scheduling/timing, it was possible that the new KILL CONNECTION error was
      masked by the earlier deadlock error, so that the second kill was not
      properly converted into a deadlock error and retry.
      
      This patch adds code that clears the old error and killed flag before
      starting the retry. It also adds code to handle a deadlock kill caught in a
      couple of places where it was not handled before.
      b616991a
  18. 22 Apr, 2015 1 commit
  19. 21 Apr, 2015 1 commit