summaryrefslogtreecommitdiff
path: root/sql/sql_string.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_string.cc')
-rw-r--r--sql/sql_string.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index ff81a5f5ca4..991b65ef4b2 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -1,5 +1,5 @@
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2016, 2020, MariaDB
+ Copyright (c) 2016, 2021, MariaDB
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
@@ -447,8 +447,8 @@ bool String::copy(const char *str, size_t arg_length,
{
uint32 offset;
- DBUG_ASSERT(!str || str != Ptr);
-
+ DBUG_ASSERT(!str || str != Ptr || !is_alloced());
+
if (!needs_conversion(arg_length, from_cs, to_cs, &offset))
{
*errors= 0;