Commit 15f626c2 authored by unknown's avatar unknown

BUG#12532: Fixes after review


sql/log_event.cc:
  Review fixes
sql/sql_parse.cc:
  Review fixes
parent 7271ea25
...@@ -1330,13 +1330,12 @@ Query_log_event::Query_log_event(const char* buf, uint event_len, ...@@ -1330,13 +1330,12 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
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
#ifndef MYSQL_CLIENT #if !defined(MYSQL_CLIENT) && defined(HAVE_QUERY_CACHE)
#ifdef HAVE_QUERY_CACHE + QUERY_CACHE_FLAGS_SIZE +
QUERY_CACHE_FLAGS_SIZE + db_len + 1
#endif
#endif #endif
db_len + 1, MYF(MY_WME)))) , MYF(MY_WME))))
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
if (catalog_len) // If catalog is given if (catalog_len) // If catalog is given
{ {
......
...@@ -1218,7 +1218,8 @@ extern "C" pthread_handler_decl(handle_bootstrap,arg) ...@@ -1218,7 +1218,8 @@ extern "C" pthread_handler_decl(handle_bootstrap,arg)
length--; length--;
buff[length]=0; buff[length]=0;
thd->query_length=length; thd->query_length=length;
thd->query= thd->memdup_w_gap(buff, length+1, thd->db_length+1); thd->query= thd->memdup_w_gap(buff, length+1,
thd->db_length+1+QUERY_CACHE_FLAGS_SIZE);
thd->query[length] = '\0'; thd->query[length] = '\0';
/* /*
We don't need to obtain LOCK_thread_count here because in bootstrap We don't need to obtain LOCK_thread_count here because in bootstrap
......
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