summaryrefslogtreecommitdiff
path: root/sql/sql_select.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-03-30 11:12:56 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-03-30 11:12:56 +0300
commit1a9b6c4c7f817155f5ce8b1a6062d0eccbfd10ec (patch)
treec1da70f7f990dae02c5dfe70fd75299ced68873c /sql/sql_select.h
parent0fb84216a35046a4574dec214dcce03130a797c1 (diff)
parentb11ff3d49581d9e7b6f8b990f08e85e4d6384418 (diff)
downloadmariadb-git-1a9b6c4c7f817155f5ce8b1a6062d0eccbfd10ec.tar.gz
Merge 10.2 into 10.3
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 abcf9764009..2f23a8b0d0d 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
@@ -1633,6 +1633,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());