Mysql replication invalidating query cache entries Free starte local porn

Paul, please update the release note to: The server unnecessarily acquired a query cache mutex even with the query cache disabled, resulting in a small performance decrement which could show up as threads often in state "invalidating query cache entries (table)", particularly on a replication slave with row-based replication.

This has the implication that the query cache cannot be enabled at runtime.

@ sql/set_var.h * Changed order on how the enumeration is processed.

Sex on chat one on one - Mysql replication invalidating query cache entries

Now if the server is started with query_cache_type set to 0, it does not acquire the query cache mutex.

This has the implication that the query cache cannot be enabled at runtime. After review, it may be pushed to the relevant source trees for release in the next version.

@ sql/share/errmsg-utf8* Added error message for query cache disabled state @ sql/sql_* If the query cache is disabled at start up, shorten the execution path and avoid grabbing the query cache mutex each time the invalidate interface methods are called.

@ sql/sql_cache.h * Added new methods to set the query cache into a disabled state.

Since query_cache_size is protected from any changes by the barrier in Query_cache::resize() we can safely add a test at the begining of the invalidate* functions to avoid having mutexes locked when the query cache is ment to be disabled. After review, it may be pushed to the relevant source trees for release in the next version.

You can access the patch from: 2768 Kristofer Pettersson 2008-10-09 Bug#38551 query cache can still consume [very little] cpu time even when it is off.

You can access the patch from: 2900 Kristofer Pettersson 2009-10-29 Bug#38551 query cache can still consume [very little] cpu time even when it is off.

By using the command line option --query_cache_type=0, the user can disable (backport from mysql-pe) @ mysql-test/t/query_cache_* added test case for bug38551 @ mysql-test/t/query_cache_* added test case for bug38551 @ sql/set_* Added before-trigger to verify that query_cache_type wasn't turned off or on during runtime.

The current code actually locks/unlocks the query_cache lock twice when the query_cache_size is zero! This can all be bypassed if the check for query_cache_size is done without holding the QC lock as in Query_cache::store_query The CPU time wasted is very less, however, in benchmark situations, every cpu cycle counts.

How to repeat: Run a sysbench read-write benchmark with lots of threads.

For example, Query Cache::invalidate() builds up a list of tables used, and calls Query Cache::invalidate_table().

Tags: , ,