summaryrefslogtreecommitdiff
path: root/sql/partition_info.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-03-17 13:06:41 +0100
committerSergei Golubchik <serg@mariadb.org>2019-03-17 13:06:41 +0100
commitb64fde8f38515dc39e019de26db7624cc0ea7046 (patch)
tree0478ea4c3ddeee290f6d381a47efa4f9aded9c0b /sql/partition_info.cc
parenta89ee3cd154a67df2231f034fd8339f9225dbe64 (diff)
parent1f020299f816263e347c852eb2a494b5ef1cbf0d (diff)
downloadmariadb-git-b64fde8f38515dc39e019de26db7624cc0ea7046.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r--sql/partition_info.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc
index 2f021d6118c..34ccdbc1686 100644
--- a/sql/partition_info.cc
+++ b/sql/partition_info.cc
@@ -64,7 +64,7 @@ partition_info *partition_info::get_clone(THD *thd)
if (!part_clone)
DBUG_RETURN(NULL);
- memcpy(part_clone, part, sizeof(partition_element));
+ *part_clone= *part;
part_clone->subpartitions.empty();
while ((subpart= (subpart_it++)))
{
@@ -72,7 +72,7 @@ partition_info *partition_info::get_clone(THD *thd)
if (!subpart_clone)
DBUG_RETURN(NULL);
- memcpy(subpart_clone, subpart, sizeof(partition_element));
+ *subpart_clone= *subpart;
part_clone->subpartitions.push_back(subpart_clone, mem_root);
}
clone->partitions.push_back(part_clone, mem_root);
@@ -1432,12 +1432,11 @@ void partition_info::print_no_partition_found(TABLE *table_arg, myf errflag)
TABLE_LIST table_list;
THD *thd= current_thd;
- bzero(&table_list, sizeof(table_list));
+ table_list.reset();
table_list.db= table_arg->s->db;
table_list.table_name= table_arg->s->table_name;
- if (check_single_table_access(thd,
- SELECT_ACL, &table_list, TRUE))
+ if (check_single_table_access(thd, SELECT_ACL, &table_list, TRUE))
{
my_message(ER_NO_PARTITION_FOR_GIVEN_VALUE,
ER_THD(thd, ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT), errflag);