1. 21 May, 2019 23 commits
    • Sergey Vojtovich's avatar
      Simplified away init_new_connection_thread() · 6900aaf4
      Sergey Vojtovich authored
      It was meaningful only for one-thread-per-connection scheduler anyway,
      so call init_new_connection_handler_thread() directly from
      handle_one_connection().
      
      It was somewhat harmful for no-threads scheduler, because it'd attempt to
      detach main thread on AIX_3_2 and Siemens unix (and DEC OSF/1 3.2 too).
      Also it does duplicate my_thread_init() call, which may produce a warning
      under EXTRA_DEBUG_THREADS.
      
      start_wsrep_THD() shouldn't have called it at all: it already detached
      and called my_thread_init().
      
      Part of MDEV-19515 - Improve connect speed
      6900aaf4
    • Sergey Vojtovich's avatar
      Signal COND_thread_cache out of mutex · 8d9d4aa6
      Sergey Vojtovich authored
      Gives ~10% throughput improvemet in sysbench connect benchmark.
      
      Part of MDEV-19515 - Improve connect speed
      8d9d4aa6
    • Sergey Vojtovich's avatar
      Try accept a few times before falling back to poll · 5d183df7
      Sergey Vojtovich authored
      Gives ~3% throughput improvemet in sysbench connect benchmark.
      
      Part of MDEV-19515 - Improve connect speed
      5d183df7
    • Sergey Vojtovich's avatar
      Improved ha_close_connection() scalability · 87775402
      Sergey Vojtovich authored
      Rather than iterating global plugin collection, iterate THD local
      collection. Removes two LOCK_plugin locks per connection.
      
      Part of MDEV-19515 - Improve connect speed
      87775402
    • Sergey Vojtovich's avatar
      Adiue thd_ha_data(), you've broke many hearts · 5e139437
      Sergey Vojtovich authored
      Part of MDEV-19515 - Improve connect speed
      5e139437
    • Sergey Vojtovich's avatar
      Fixed RocksDB to follow THD ha_data protocol · ec926b0f
      Sergey Vojtovich authored
      Use thd_get_ha_data()/thd_set_ha_data() which protect against plugin
      removal until it has THD ha_data.
      
      Do not reset THD ha_data in rocksdb_close_connection(), cleaner approach
      is to let ha_close_connection() do it.
      
      Removed transaction objects cleanup from rocksdb_done_func(). As we lock
      plugin properly, there must be no transaction objects during RocksDB
      shutdown.
      
      Part of MDEV-19515 - Improve connect speed
      ec926b0f
    • Sergey Vojtovich's avatar
      Fixed InnoDB to not use broken thd_ha_data() · 8c8d584f
      Sergey Vojtovich authored
      Part of MDEV-19515 - Improve connect speed
      8c8d584f
    • Sergey Vojtovich's avatar
      Fixed Aria to follow THD ha_data protocol · 5e1b3cc8
      Sergey Vojtovich authored
      Use thd_get_ha_data()/thd_set_ha_data() which protect against plugin
      removal until it has THD ha_data.
      
      Part of MDEV-19515 - Improve connect speed
      5e1b3cc8
    • Sergey Vojtovich's avatar
      Fixed Sphinx to follow THD ha_data protocol · ba59cc0f
      Sergey Vojtovich authored
      Use thd_get_ha_data()/thd_set_ha_data() which protect against plugin
      removal until it has THD ha_data.
      
      Do not reset THD ha_data in sphinx_close_connection(), cleaner approach
      is to let ha_close_connection() do it.
      
      Part of MDEV-19515 - Improve connect speed
      ba59cc0f
    • Sergey Vojtovich's avatar
      Fixed Mroonga to follow THD ha_data protocol · 00e533c7
      Sergey Vojtovich authored
      Use thd_get_ha_data()/thd_set_ha_data() which protect against plugin
      removal until it has THD ha_data.
      
      Do not reset THD ha_data in mrn_close_connection(), cleaner approach
      is to let ha_close_connection() do it.
      
      Part of MDEV-19515 - Improve connect speed
      00e533c7
    • Sergey Vojtovich's avatar
      Fixed Spider to follow THD ha_data protocol · 5c18ba6c
      Sergey Vojtovich authored
      Do not reset THD ha_data in spider_close_connection(), cleaner approach
      is to let ha_close_connection() do it.
      
      Part of MDEV-19515 - Improve connect speed
      5c18ba6c
    • Sergey Vojtovich's avatar
      Fixed FederatedX to follow THD ha_data protocol · 762d2b96
      Sergey Vojtovich authored
      Use thd_get_ha_data()/thd_set_ha_data() which protect against plugin
      removal until it has THD ha_data.
      
      Do not reset THD ha_data in ha_federatedx::disconnect(), cleaner approach
      is to let ha_close_connection() do it.
      
      Part of MDEV-19515 - Improve connect speed
      762d2b96
    • Sergey Vojtovich's avatar
      Moved vio allocation to connection thread · ce30c994
      Sergey Vojtovich authored
      Part of MDEV-19515 - Improve connect speed
      ce30c994
    • Sergey Vojtovich's avatar
      Simplified away CONNECT::real_id · efb61c12
      Sergey Vojtovich authored
      It was wrong anyway, as it may not get updated by the time created thread
      reads it. And it was 0 for cached threads.
      
      Part of MDEV-19515 - Improve connect speed
      efb61c12
    • Sergey Vojtovich's avatar
      Simplified away CONNECT::extra_port · 7192d7b7
      Sergey Vojtovich authored
      Part of MDEV-19515 - Improve connect speed
      7192d7b7
    • Sergey Vojtovich's avatar
      Simplified away CONNECT::host · c90c7698
      Sergey Vojtovich authored
      Part of MDEV-19515 - Improve connect speed
      c90c7698
    • Sergey Vojtovich's avatar
      Removed duplicate thread cache check · 56b1cdde
      Sergey Vojtovich authored
      It may be beneficial for slow-path, where new thread is to be created.
      However it is harmful for fast-path, where thread cache can fulfil
      request: it caused 2 extra loads of write-contended variables.
      
      Also shrink variables scope.
      
      Part of MDEV-19515 - Improve connect speed
      56b1cdde
    • Sergey Vojtovich's avatar
      Optimised fcntl() when accepting connections · 701e2a7e
      Sergey Vojtovich authored
      Removed FD_CLOEXEC setting: already done by mysql_socket_accept().
      
      Moved O_NONBLOCK setting out of accepting loop.
      
      Removed blocking acceptance attempt, which was dead code. It was supposed
      to be executed before the last iteration, however it was actually executed
      during the last iteration. And it is not correct to block on one socket
      leaving other sockets unattended anyway.
      
      Gives ~5% throughput improvemet in sysbench connect benchmark.
      
      Part of MDEV-19515 - Improve connect speed
      701e2a7e
    • Sergey Vojtovich's avatar
      Less shared variables loads under the mutex · 218a68bb
      Sergey Vojtovich authored
      Part of MDEV-19515 - Improve connect speed
      218a68bb
    • Sergey Vojtovich's avatar
      Moved set_timespec out of LOCK_thread_cache mutex · 8268fa88
      Sergey Vojtovich authored
      Part of MDEV-19515 - Improve connect speed
      8268fa88
    • Sergey Vojtovich's avatar
      Cleanup redundant abort_loop checks · ca847584
      Sergey Vojtovich authored
      abort_loop is intended to break accepting connections loop in main thread,
      however it is being used for other purposes.
      
      cache_thread() is governed by kill_cached_threads, no need to check
      abort_loop here.
      
      Check in create_new_thread() is redundant, abort_loop already checked
      by caller.
      
      Part of MDEV-19515 - Improve connect speed
      ca847584
    • Robert Bindar's avatar
      042f5165
    • Gagan Goel's avatar
      MDEV-307 Add functionality for database comments · e9c6d5a1
      Gagan Goel authored
      This commit adds a new feature to the server to add comments at the database
      level. 1024 bytes is the maximum comment length allowed. If the comment length
      exceeds this limit, a new error/warning code 4144 is thrown, based on whether
      thd->is_strict_mode() is true/false. The database comment is also added to the
      db.opt file, as well as to the information_schema.schemata table.
      e9c6d5a1
  2. 16 May, 2019 1 commit
  3. 15 May, 2019 3 commits
  4. 14 May, 2019 4 commits
  5. 13 May, 2019 5 commits
  6. 11 May, 2019 2 commits
    • Varun Gupta's avatar
      MDEV-13628: ORed condition in pushed index condition is not removed from the WHERE · 6a365e0b
      Varun Gupta authored
      So to push index condition for each join tab we have calculate the index condition that can be pushed and then
      remove this index condition from the original condition. This is done through the function make_cond_remainder.
      The problem is the function make_cond_remainder does not remove index condition when there is an OR operator.
      
      Fixed this by making the function make_cond_remainder to keep in mind of the OR operator.
      Also updated results for multiple test files which were incorrectly updated by the commit e0c1b3f2
      
      code which was supposed to remove the condition present in the index
      condition was not getting executed when the condition had OR operator, with AND the pushed
      index condition was getting removed from where.
      
      This problem affects all versions starting from 5.5 but this is a performance improvement, so fixing it in 10.4
      6a365e0b
    • Monty's avatar
      Fixed that storage/funcs tests works with Aria · 9965966a
      Monty authored
      Problem was that SHOW CREATE didn't remove PAGE_CHECKSUM=1
      9965966a
  7. 10 May, 2019 2 commits
    • hygonsoc's avatar
      add Hygon Dhyana support in check-cpu · 6f3b0999
      hygonsoc authored
      Signed-off-by: default avatarhygonsoc <hygonsoc@gmail.com>
      6f3b0999
    • Daniel Black's avatar
      MDEV-8553: Impossible where for a!=a, a<a, a>a · d2fa5f8c
      Daniel Black authored
      For a table column `a`, the above expressions logically
      equate to false in all cases.
      
      With this patch the optimizer knows about this and queries
      like:
      
      SELECT * FROM t1 WHERE a!=a
      
      no longer need to evaluate a!=a for every row.
      
      The same applies if the expression was `a<a`, or `a>a`
      
      An `EXPLAIN SELECT COOUNT(*) FROM t1 WHERE a<a` will show:
      
      id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
      1      SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    Impossible WHERE
      
      Similarly `NOT (a!=a)` is always true.
      
      EXPLAIN SELECT COUNT(*) FROM t1 WHERE not (a!=a);
      id     select_type     table   type    possible_keys   key     key_len ref     rows    Extra
      1      SIMPLE  NULL    NULL    NULL    NULL    NULL    NULL    NULL    Select tables optimized away
      d2fa5f8c