summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2017-10-26 12:47:24 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-10-26 12:47:24 +0300
commitbd9a2363e58dc6c9bc95fffc697574cbf53fa2cb (patch)
treeab3490667ff152a3ff19d50136fb77ccc044b9f2
parent3b35d745c3245f63fcc9757bfa90392bf923fcc3 (diff)
parent98470fc800fb03cecc101b53e0f2d0bfe653cb7a (diff)
downloadmariadb-git-bd9a2363e58dc6c9bc95fffc697574cbf53fa2cb.tar.gz
Merge branch 'merge-perfschema-5.6' into 10.0
-rw-r--r--storage/perfschema/pfs.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/perfschema/pfs.cc b/storage/perfschema/pfs.cc
index c30ff4b6640..1a3f066bd00 100644
--- a/storage/perfschema/pfs.cc
+++ b/storage/perfschema/pfs.cc
@@ -1,4 +1,4 @@
-/* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -41,6 +41,7 @@
#include "sp_head.h"
#include "pfs_digest.h"
+using std::min;
/**
@page PAGE_PERFORMANCE_SCHEMA The Performance Schema main page
MySQL PERFORMANCE_SCHEMA implementation.
@@ -2018,7 +2019,8 @@ static void set_thread_account_v1(const char *user, int user_len,
DBUG_ASSERT((uint) user_len <= sizeof(pfs->m_username));
DBUG_ASSERT((host != NULL) || (host_len == 0));
DBUG_ASSERT(host_len >= 0);
- DBUG_ASSERT((uint) host_len <= sizeof(pfs->m_hostname));
+
+ host_len= min<size_t>(host_len, sizeof(pfs->m_hostname));
if (unlikely(pfs == NULL))
return;