mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Reverting patch for bug30087
This commit is contained in:
@ -566,7 +566,7 @@ select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=1024;
|
||||
Warnings:
|
||||
Warning 1282 Query cache failed to set size 1024 (minimal value: 41297); new query cache size is 0
|
||||
Warning 1282 Query cache failed to set size 1024; new query cache size is 0
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 0
|
||||
@ -574,7 +574,7 @@ select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=10240;
|
||||
Warnings:
|
||||
Warning 1282 Query cache failed to set size 10240 (minimal value: 41297); new query cache size is 0
|
||||
Warning 1282 Query cache failed to set size 10240; new query cache size is 0
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 0
|
||||
@ -582,7 +582,7 @@ select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=20480;
|
||||
Warnings:
|
||||
Warning 1282 Query cache failed to set size 20480 (minimal value: 41297); new query cache size is 0
|
||||
Warning 1282 Query cache failed to set size 20480; new query cache size is 0
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 0
|
||||
@ -590,7 +590,7 @@ select * from t1;
|
||||
a
|
||||
set GLOBAL query_cache_size=40960;
|
||||
Warnings:
|
||||
Warning 1282 Query cache failed to set size 40960 (minimal value: 41297); new query cache size is 0
|
||||
Warning 1282 Query cache failed to set size 40960; new query cache size is 0
|
||||
show global variables like "query_cache_size";
|
||||
Variable_name Value
|
||||
query_cache_size 0
|
||||
|
@ -1046,7 +1046,19 @@ static void fix_net_retry_count(THD *thd __attribute__((unused)),
|
||||
static void fix_query_cache_size(THD *thd, enum_var_type type)
|
||||
{
|
||||
#ifdef HAVE_QUERY_CACHE
|
||||
query_cache_size= query_cache.resize(query_cache_size);
|
||||
ulong new_cache_size= query_cache.resize(query_cache_size);
|
||||
|
||||
/*
|
||||
Note: query_cache_size is a global variable reflecting the
|
||||
requested cache size. See also query_cache_size_arg
|
||||
*/
|
||||
|
||||
if (query_cache_size != new_cache_size)
|
||||
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_WARN_QC_RESIZE, ER(ER_WARN_QC_RESIZE),
|
||||
query_cache_size, new_cache_size);
|
||||
|
||||
query_cache_size= new_cache_size;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -4995,13 +4995,13 @@ ER_WRONG_NAME_FOR_CATALOG 42000
|
||||
spa "Nombre de catalog incorrecto '%-.100s'"
|
||||
swe "Felaktigt katalog namn '%-.100s'"
|
||||
ER_WARN_QC_RESIZE
|
||||
eng "Query cache failed to set size %lu (minimal value: %lu); new query cache size is %lu"
|
||||
ger "<22>nderung der Query-Cache-Gr<47><72>e auf %lu (Minimale Zahl: %lu) fehlgeschlagen; neue Query-Cache-Gr<47><72>e ist %lu"
|
||||
por "Falha em Query cache para configurar tamanho %lu (N<>mero m<>nimo: %lu), novo tamanho de query cache <20> %lu"
|
||||
rus "<22><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %lu (minimal value: %lu), <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - %lu"
|
||||
spa "Query cache fallada para configurar tama<6D>o %lu (N<>mero m<>nimo: %lu), nuevo tama<6D>o de query cache es %lu"
|
||||
swe "Storleken av "Query cache" kunde inte s<>ttas till %lu (minsta v<>rde: %lu); ny storlek <20>r %lu"
|
||||
ukr "<22><><EFBFBD> <20><><EFBFBD><EFBFBD>Ԧ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ͦ<EFBFBD> %lu (minimal value: %lu), <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ͦ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ԧ<EFBFBD> - %lu"
|
||||
eng "Query cache failed to set size %lu; new query cache size is %lu"
|
||||
ger "<22>nderung der Query-Cache-Gr<47><72>e auf %lu fehlgeschlagen; neue Query-Cache-Gr<47><72>e ist %lu"
|
||||
por "Falha em Query cache para configurar tamanho %lu, novo tamanho de query cache <20> %lu"
|
||||
rus "<22><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> %lu, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> - %lu"
|
||||
spa "Query cache fallada para configurar tama<6D>o %lu, nuevo tama<6D>o de query cache es %lu"
|
||||
swe "Storleken av "Query cache" kunde inte s<>ttas till %lu, ny storlek <20>r %lu"
|
||||
ukr "<22><><EFBFBD> <20><><EFBFBD><EFBFBD>Ԧ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ͦ<EFBFBD> %lu, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ͦ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ԧ<EFBFBD> - %lu"
|
||||
ER_BAD_FT_COLUMN
|
||||
eng "Column '%-.192s' cannot be part of FULLTEXT index"
|
||||
ger "Feld '%-.192s' kann nicht Teil eines FULLTEXT-Index sein"
|
||||
|
@ -942,25 +942,18 @@ ulong Query_cache::resize(ulong query_cache_size_arg)
|
||||
} while (block != queries_blocks);
|
||||
}
|
||||
free_cache();
|
||||
query_cache_size= query_cache_size_arg;
|
||||
::query_cache_size= init_cache();
|
||||
|
||||
if (::query_cache_size != query_cache_size_arg)
|
||||
{
|
||||
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
|
||||
ER_WARN_QC_RESIZE, ER(ER_WARN_QC_RESIZE),
|
||||
query_cache_size_arg,
|
||||
get_minimal_size_limit(),
|
||||
::query_cache_size);
|
||||
}
|
||||
query_cache_size= query_cache_size_arg;
|
||||
new_query_cache_size= init_cache();
|
||||
|
||||
STRUCT_LOCK(&structure_guard_mutex);
|
||||
m_cache_status= Query_cache::NO_FLUSH_IN_PROGRESS;
|
||||
pthread_cond_signal(&COND_cache_status_changed);
|
||||
|
||||
if (new_query_cache_size)
|
||||
DBUG_EXECUTE("check_querycache",check_integrity(1););
|
||||
STRUCT_UNLOCK(&structure_guard_mutex);
|
||||
|
||||
DBUG_RETURN(::query_cache_size);
|
||||
DBUG_RETURN(new_query_cache_size);
|
||||
}
|
||||
|
||||
|
||||
@ -1823,24 +1816,6 @@ void Query_cache::init()
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
/**
|
||||
Return the lowest possible query cache size.
|
||||
*/
|
||||
|
||||
ulong Query_cache::get_minimal_size_limit()
|
||||
{
|
||||
ulong approx_additional_data_size= (sizeof(Query_cache) +
|
||||
sizeof(void*)*(def_query_hash_size+
|
||||
def_table_hash_size));
|
||||
|
||||
ulong data_size= (min_allocation_unit << QUERY_CACHE_MEM_BIN_STEP_PWR2 <<
|
||||
QUERY_CACHE_MEM_BIN_FIRST_STEP_PWR2) +
|
||||
ALIGN_SIZE(1) - 1 +
|
||||
(1 << QUERY_CACHE_MEM_BIN_STEP_PWR2) - 1 +
|
||||
(1 << QUERY_CACHE_MEM_BIN_FIRST_STEP_PWR2) - 1;
|
||||
|
||||
return(data_size + approx_additional_data_size);
|
||||
}
|
||||
|
||||
ulong Query_cache::init_cache()
|
||||
{
|
||||
|
@ -282,8 +282,6 @@ private:
|
||||
void free_query_internal(Query_cache_block *point);
|
||||
void invalidate_table_internal(THD *thd, uchar *key, uint32 key_length);
|
||||
|
||||
ulong get_minimal_size_limit();
|
||||
|
||||
protected:
|
||||
/*
|
||||
The following mutex is locked when searching or changing global
|
||||
|
Reference in New Issue
Block a user