Commit 02ebecfc authored by unknown's avatar unknown

query cache code can be excluded from server


sql/mysqld.cc:
  fake query_cache_size parameter if query cache code excluded from server
parent dba9a296
...@@ -6,7 +6,7 @@ path=`dirname $0` ...@@ -6,7 +6,7 @@ path=`dirname $0`
extra_flags="$pentium_cflags $debug_cflags" extra_flags="$pentium_cflags $debug_cflags"
c_warnings="$c_warnings $debug_extra_warnings" c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings" cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs $static_link" extra_configs="$pentium_configs $debug_configs $static_link --without-query-cache"
extra_configs="$extra_configs " extra_configs="$extra_configs "
......
...@@ -36325,6 +36325,8 @@ Following are some performance data for the query cache ...@@ -36325,6 +36325,8 @@ Following are some performance data for the query cache
@item @item
If you want to disable the query cache code set @code{query_cache_size=0}. If you want to disable the query cache code set @code{query_cache_size=0}.
By disabling the query cache code there is no noticeable overhead. By disabling the query cache code there is no noticeable overhead.
(query cache can be excluded from code with help of configure option
@code{--without-query-cache})
@item @item
If all of the queries you're preforming are simple (such as selecting a If all of the queries you're preforming are simple (such as selecting a
row from a table with one row); but still differ so that the queries can row from a table with one row); but still differ so that the queries can
...@@ -48918,6 +48920,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}. ...@@ -48918,6 +48920,8 @@ Our TODO section contains what we plan to have in 4.0. @xref{TODO MySQL 4.0}.
@itemize @bullet @itemize @bullet
@item @item
New configure option --without-query-cache.
@item
Memory allocation strategy for 'root memory' changed. Block size now grows Memory allocation strategy for 'root memory' changed. Block size now grows
with number of allocated blocks. with number of allocated blocks.
@item @item
...@@ -1823,7 +1823,7 @@ AC_ARG_WITH(embedded-server, ...@@ -1823,7 +1823,7 @@ AC_ARG_WITH(embedded-server,
) )
AC_ARG_WITH(query_cache, AC_ARG_WITH(query_cache,
[ --without-query-cache Don not build query cache in embedded server.], [ --without-query-cache Do not build query cache.],
[with_query_cache=$withval], [with_query_cache=$withval],
[with_query_cache=yes] [with_query_cache=yes]
) )
......
...@@ -1023,12 +1023,4 @@ typedef union { ...@@ -1023,12 +1023,4 @@ typedef union {
#define C_MODE_END #define C_MODE_END
#endif #endif
/*
Now if query is taken off then tests with query cache fails
SANJA TODO: remove this when problem with mysql-test will be solved
*/
#if defined(MYSQL_SERVER) && !defined(HAVE_QUERY_CACHE)
#define HAVE_QUERY_CACHE
#endif
#endif /* _global_h */ #endif /* _global_h */
-- source include/have_innodb.inc -- source include/have_innodb.inc
-- source include/have_query_cache.inc
# #
# Without auto_commit. # Without auto_commit.
......
...@@ -291,8 +291,9 @@ ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size, ...@@ -291,8 +291,9 @@ ulong keybuff_size,sortbuff_size,max_item_sort_length,table_cache_size,
ulong com_stat[(uint) SQLCOM_END], com_other; ulong com_stat[(uint) SQLCOM_END], com_other;
ulong slave_net_timeout; ulong slave_net_timeout;
ulong thread_cache_size=0, binlog_cache_size=0, max_binlog_cache_size=0; ulong thread_cache_size=0, binlog_cache_size=0, max_binlog_cache_size=0;
ulong query_cache_size=0;
#ifdef HAVE_QUERY_CACHE #ifdef HAVE_QUERY_CACHE
ulong query_cache_size=0, query_cache_limit=0, query_cache_startup_type=1; ulong query_cache_limit=0, query_cache_startup_type=1;
Query_cache query_cache; Query_cache query_cache;
#endif #endif
...@@ -3048,8 +3049,10 @@ CHANGEABLE_VAR changeable_vars[] = { ...@@ -3048,8 +3049,10 @@ CHANGEABLE_VAR changeable_vars[] = {
#ifdef HAVE_QUERY_CACHE #ifdef HAVE_QUERY_CACHE
{ "query_cache_limit", (long*) &query_cache_limit, { "query_cache_limit", (long*) &query_cache_limit,
1024*1024L, 0, ULONG_MAX, 0, 1}, 1024*1024L, 0, ULONG_MAX, 0, 1},
#endif /*HAVE_QUERY_CACHE*/
{ "query_cache_size", (long*) &query_cache_size, { "query_cache_size", (long*) &query_cache_size,
0, 0, ULONG_MAX, 0, 1}, 0, 0, ULONG_MAX, 0, 1},
#ifdef HAVE_QUERY_CACHE
{ "query_cache_startup_type",(long*) &query_cache_startup_type, { "query_cache_startup_type",(long*) &query_cache_startup_type,
1, 0, 2, 0, 1}, 1, 0, 2, 0, 1},
#endif /*HAVE_QUERY_CACHE*/ #endif /*HAVE_QUERY_CACHE*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment