summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-03-30 18:52:17 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-03-30 19:07:25 +0300
commit37c14690fc6bc9237bdad9b8e26157d1174a49fc (patch)
tree490ab3103b3f2dbef654fdd860e891ccde87d93c /sql/sql_select.h
parentaae3f921adec9b9d1bff093c9a75a94e44f5c8d4 (diff)
parente2f1f88fa60680cb87833a7cceb172f5d436a804 (diff)
downloadmariadb-git-37c14690fc6bc9237bdad9b8e26157d1174a49fc.tar.gz
Merge 10.4 into 10.5
Diffstat (limited to 'sql/sql_select.h')
-rw-r--r--sql/sql_select.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_select.h b/sql/sql_select.h
index 8b2df74702b..46c84b9df7b 100644
--- a/sql/sql_select.h
+++ b/sql/sql_select.h
@@ -2,7 +2,7 @@
#define SQL_SELECT_INCLUDED
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2008, 2017, MariaDB Corporation.
+ Copyright (c) 2008, 2020, MariaDB Corporation.
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
@@ -1666,6 +1666,9 @@ public:
void copy_ref_ptr_array(Ref_ptr_array dst_arr, Ref_ptr_array src_arr)
{
DBUG_ASSERT(dst_arr.size() >= src_arr.size());
+ if (src_arr.size() == 0)
+ return;
+
void *dest= dst_arr.array();
const void *src= src_arr.array();
memcpy(dest, src, src_arr.size() * src_arr.element_size());