Skip to content

Commit

Permalink
Fix integer overflow in Query Cache size sysown#2040
Browse files Browse the repository at this point in the history
  • Loading branch information
renecannao committed May 1, 2019
1 parent ff692aa commit b8f6e0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Query_Cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ void * Query_Cache::purgeHash_thread(void *) {
MySQL_Thread * mysql_thr = new MySQL_Thread();
MySQL_Monitor__thread_MySQL_Thread_Variables_version=GloMTH->get_global_version();
mysql_thr->refresh_variables();
max_memory_size=mysql_thread___query_cache_size_MB*1024*1024;
max_memory_size = (uint64_t) mysql_thread___query_cache_size_MB*1024*1024;
while (shutdown==0) {
usleep(purge_loop_time);
unsigned long long t=monotonic_time()/1000;
Expand All @@ -413,7 +413,7 @@ void * Query_Cache::purgeHash_thread(void *) {
if (MySQL_Monitor__thread_MySQL_Thread_Variables_version < glover ) {
MySQL_Monitor__thread_MySQL_Thread_Variables_version=glover;
mysql_thr->refresh_variables();
max_memory_size=mysql_thread___query_cache_size_MB*1024*1024;
max_memory_size = (uint64_t) mysql_thread___query_cache_size_MB*1024*1024;
}
}
unsigned int curr_pct=current_used_memory_pct();
Expand Down

0 comments on commit b8f6e0f

Please sign in to comment.