diff options
author | unknown <lars@mysql.com> | 2005-08-19 16:25:55 +0200 |
---|---|---|
committer | unknown <lars@mysql.com> | 2005-08-19 16:25:55 +0200 |
commit | 3e946906272009aac5145f85421992f78ba4eff0 (patch) | |
tree | 97572a30ac65f4c3bd524682762297ace4a1331c | |
parent | 3b422187f6829da234914c713e4e8039c97e7291 (diff) | |
download | mariadb-git-3e946906272009aac5145f85421992f78ba4eff0.tar.gz |
BUG#12532: Added more memory in malloc for slave query cache
sql/log_event.cc:
Added memory to malloc
sql/sql_cache.cc:
Added comment
-rw-r--r-- | sql/log_event.cc | 8 | ||||
-rw-r--r-- | sql/sql_cache.cc | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc index bdf17ba20e3..5b9287f03ac 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -1330,7 +1330,13 @@ Query_log_event::Query_log_event(const char* buf, uint event_len, if (!(start= data_buf = (char*) my_malloc(catalog_len + 1 + time_zone_len + 1 + - data_len + 1, MYF(MY_WME)))) + data_len + 1 + +#ifndef MYSQL_CLIENT +#ifdef HAVE_QUERY_CACHE + QUERY_CACHE_FLAGS_SIZE + +#endif +#endif + db_len + 1, MYF(MY_WME)))) DBUG_VOID_RETURN; if (catalog_len) // If catalog is given { diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 0f4fdd52583..81eed413a8e 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -923,6 +923,10 @@ end: 0 The query was cached and user was sent the result. -1 The query was cached but we didn't have rights to use it. No error is sent to the client yet. + + NOTE + This method requires that sql points to allocated memory of size: + tot_length= query_length + thd->db_length + 1 + QUERY_CACHE_FLAGS_SIZE; */ int |