summaryrefslogtreecommitdiff
path: root/storage/mroonga
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 /storage/mroonga
parenta89ee3cd154a67df2231f034fd8339f9225dbe64 (diff)
parent1f020299f816263e347c852eb2a494b5ef1cbf0d (diff)
downloadmariadb-git-b64fde8f38515dc39e019de26db7624cc0ea7046.tar.gz
Merge branch '10.2' into 10.3
Diffstat (limited to 'storage/mroonga')
-rw-r--r--storage/mroonga/ha_mroonga.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/storage/mroonga/ha_mroonga.cpp b/storage/mroonga/ha_mroonga.cpp
index a3f34f3cc42..925298c15e8 100644
--- a/storage/mroonga/ha_mroonga.cpp
+++ b/storage/mroonga/ha_mroonga.cpp
@@ -2600,7 +2600,7 @@ ha_mroonga::~ha_mroonga()
}
if (blob_buffers)
{
- ::delete [] blob_buffers;
+ delete [] blob_buffers;
}
grn_obj_unlink(ctx, &top_left_point);
grn_obj_unlink(ctx, &bottom_right_point);
@@ -3001,9 +3001,9 @@ int ha_mroonga::create_share_for_create() const
TABLE_LIST *table_list = MRN_LEX_GET_TABLE_LIST(lex);
MRN_DBUG_ENTER_METHOD();
wrap_handler_for_create = NULL;
- memset(&table_for_create, 0, sizeof(TABLE));
+ table_for_create.reset();
+ table_share_for_create.reset();
memset(&share_for_create, 0, sizeof(MRN_SHARE));
- memset(&table_share_for_create, 0, sizeof(TABLE_SHARE));
if (table_share) {
table_share_for_create.comment = table_share->comment;
table_share_for_create.connect_string = table_share->connect_string;
@@ -4733,11 +4733,8 @@ int ha_mroonga::storage_open_columns(void)
if (table_share->blob_fields)
{
- if (blob_buffers)
- {
- ::delete [] blob_buffers;
- }
- if (!(blob_buffers = ::new String[n_columns]))
+ DBUG_ASSERT(!blob_buffers);
+ if (!(blob_buffers = new (&table->mem_root) String[n_columns]))
{
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
}
@@ -14569,8 +14566,8 @@ enum_alter_inplace_result ha_mroonga::wrapper_check_if_supported_inplace_alter(
) {
DBUG_RETURN(HA_ALTER_ERROR);
}
- memcpy(wrap_altered_table, altered_table, sizeof(TABLE));
- memcpy(wrap_altered_table_share, altered_table->s, sizeof(TABLE_SHARE));
+ *wrap_altered_table= *altered_table;
+ *wrap_altered_table_share= *altered_table->s;
mrn_init_sql_alloc(ha_thd(), &(wrap_altered_table_share->mem_root));
n_keys = ha_alter_info->index_drop_count;