summaryrefslogtreecommitdiffstats
path: root/sql/sql_profile.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sql/sql_profile.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql/sql_profile.h b/sql/sql_profile.h
index 88136559..c225f617 100644
--- a/sql/sql_profile.h
+++ b/sql/sql_profile.h
@@ -103,6 +103,8 @@ public:
new_item= (struct queue_item *) my_malloc(key_memory_queue_item,
sizeof(struct queue_item), MYF(0));
+ if (!new_item)
+ return;
new_item->payload= payload;
@@ -296,7 +298,11 @@ public:
{
DBUG_ASSERT(!current);
if (unlikely(enabled))
- current= new QUERY_PROFILE(this, initial_state);
+ {
+ QUERY_PROFILE *new_profile= new QUERY_PROFILE(this, initial_state);
+ if (new_profile)
+ current= new_profile;
+ }
}
void discard_current_query();