Commit 43e07c3b authored by unknown's avatar unknown

BUG#12532: Fix for the case when my_malloc is macro


sql/log_event.cc:
  my_malloc can be a macro
parent 660ca01a
...@@ -1328,14 +1328,19 @@ Query_log_event::Query_log_event(const char* buf, uint event_len, ...@@ -1328,14 +1328,19 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
} }
} }
#if !defined(MYSQL_CLIENT) && defined(HAVE_QUERY_CACHE)
if (!(start= data_buf = (char*) my_malloc(catalog_len + 1 + if (!(start= data_buf = (char*) my_malloc(catalog_len + 1 +
time_zone_len + 1 + time_zone_len + 1 +
data_len + 1 data_len + 1 +
#if !defined(MYSQL_CLIENT) && defined(HAVE_QUERY_CACHE) QUERY_CACHE_FLAGS_SIZE +
+ QUERY_CACHE_FLAGS_SIZE + db_len + 1,
db_len + 1 MYF(MY_WME))))
#else
if (!(start= data_buf = (char*) my_malloc(catalog_len + 1 +
time_zone_len + 1 +
data_len + 1,
MYF(MY_WME))))
#endif #endif
, MYF(MY_WME))))
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
if (catalog_len) // If catalog is given if (catalog_len) // If catalog is given
{ {
......
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