diff options
author | Sergei Golubchik <serg@mariadb.org> | 2019-03-15 20:00:28 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2019-03-15 21:00:41 +0100 |
commit | 0508d327aef520d3131ff8a85ed610337149fffc (patch) | |
tree | 7e04769f49b4aded9053adcad442fe00eb487d98 /sql/partition_info.cc | |
parent | bb8c82c66abddf796e8d44f817518e5ab38ae6e4 (diff) | |
parent | 34db9958e28c325b0f708f78b7ff029de810d5ea (diff) | |
download | mariadb-git-0508d327aef520d3131ff8a85ed610337149fffc.tar.gz |
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/partition_info.cc')
-rw-r--r-- | sql/partition_info.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc index d7aec8fd451..3d10166b3d8 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -63,7 +63,7 @@ partition_info *partition_info::get_clone(THD *thd) mem_alloc_error(sizeof(partition_element)); DBUG_RETURN(NULL); } - memcpy(part_clone, part, sizeof(partition_element)); + *part_clone= *part; part_clone->subpartitions.empty(); while ((subpart= (subpart_it++))) { @@ -73,7 +73,7 @@ partition_info *partition_info::get_clone(THD *thd) mem_alloc_error(sizeof(partition_element)); 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); @@ -1627,12 +1627,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.str; table_list.table_name= table_arg->s->table_name.str; - 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); |