diff options
author | Eugene Kosov <claprix@yandex.ru> | 2017-09-12 15:49:23 +0300 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2017-09-14 22:54:04 +0400 |
commit | c8cba4af553d863a937a168bd83ad302b64dae53 (patch) | |
tree | a84f66ba0ba919c461c136f75c6f5085fc179d77 /sql/ha_partition.h | |
parent | 46cf221815e4d0ddc708270a99c1b9e952016011 (diff) | |
download | mariadb-git-c8cba4af553d863a937a168bd83ad302b64dae53.tar.gz |
remove unneeded allocation
Diffstat (limited to 'sql/ha_partition.h')
-rw-r--r-- | sql/ha_partition.h | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 6c2c10c059e..c8aa09c23b7 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -48,10 +48,8 @@ public: { uint i; for (i= 0; i < num_parts; i++) - if (ha_shares[i]) - delete ha_shares[i]; - if (ha_shares) - delete [] ha_shares; + delete ha_shares[i]; + delete[] ha_shares; } bool init(uint arg_num_parts) { @@ -86,7 +84,7 @@ public: bool partition_name_hash_initialized; HASH partition_name_hash; /** Storage for each partitions Handler_share */ - Parts_share_refs *partitions_share_refs; + Parts_share_refs partitions_share_refs; Partition_share() {} ~Partition_share() { @@ -94,8 +92,6 @@ public: mysql_mutex_destroy(&auto_inc_mutex); if (partition_name_hash_initialized) my_hash_free(&partition_name_hash); - if (partitions_share_refs) - delete partitions_share_refs; DBUG_VOID_RETURN; } bool init(uint num_parts); |