summaryrefslogtreecommitdiff
path: root/sql/mysqld.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r--sql/mysqld.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 51db77a2f19..159056e3527 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3488,13 +3488,18 @@ static void my_malloc_size_cb_func(long long size, my_bool is_thread_specific)
/* Ensure we don't get called here again */
char buf[50], *buf2;
thd->set_killed(KILL_QUERY);
- my_snprintf(buf, sizeof(buf), "--max-thread-mem-used=%llu",
+ my_snprintf(buf, sizeof(buf), "--max-session-mem-used=%llu",
thd->variables.max_mem_used);
if ((buf2= (char*) thd->alloc(256)))
{
my_snprintf(buf2, 256, ER_THD(thd, ER_OPTION_PREVENTS_STATEMENT), buf);
thd->set_killed(KILL_QUERY, ER_OPTION_PREVENTS_STATEMENT, buf2);
}
+ else
+ {
+ thd->set_killed(KILL_QUERY, ER_OPTION_PREVENTS_STATEMENT,
+ "--max-session-mem-used");
+ }
}
DBUG_ASSERT((longlong) thd->status_var.local_memory_used >= 0 ||
!debug_assert_on_not_freed_memory);