diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2016-12-19 17:15:25 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2016-12-19 17:15:25 +0200 |
commit | 44da95e5edf6a86846d2ea98247b8cb332ed44fa (patch) | |
tree | 12eddeaaeb1f9c793e17cc7540838334ce784f4d /storage/xtradb | |
parent | 8e198336c20a1bbce561dcdd8080dafcfe130233 (diff) | |
parent | 9f863a15b037c0ddffc2d12c1f7d841466f9f345 (diff) | |
download | mariadb-git-44da95e5edf6a86846d2ea98247b8cb332ed44fa.tar.gz |
Merge branch '10.0' into 10.1
Diffstat (limited to 'storage/xtradb')
-rw-r--r-- | storage/xtradb/dict/dict0dict.cc | 8 | ||||
-rw-r--r-- | storage/xtradb/dict/dict0load.cc | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc index ae928306db2..dc75996ac7b 100644 --- a/storage/xtradb/dict/dict0dict.cc +++ b/storage/xtradb/dict/dict0dict.cc @@ -1643,6 +1643,7 @@ struct dict_foreign_remove_partial if (table != NULL) { table->referenced_set.erase(foreign); } + dict_foreign_free(foreign); } }; @@ -3597,8 +3598,7 @@ dict_foreign_add_to_cache( } if (for_in_cache) { - /* Free the foreign object */ - mem_heap_free(foreign->heap); + dict_foreign_free(foreign); } else { for_in_cache = foreign; } @@ -3622,7 +3622,7 @@ dict_foreign_add_to_cache( " the ones in table."); if (for_in_cache == foreign) { - mem_heap_free(foreign->heap); + dict_foreign_free(foreign); } return(DB_CANNOT_ADD_CONSTRAINT); @@ -3678,7 +3678,7 @@ dict_foreign_add_to_cache( be one */ } - mem_heap_free(foreign->heap); + dict_foreign_free(foreign); } return(DB_CANNOT_ADD_CONSTRAINT); diff --git a/storage/xtradb/dict/dict0load.cc b/storage/xtradb/dict/dict0load.cc index a21a5d5cddc..f10156610b8 100644 --- a/storage/xtradb/dict/dict0load.cc +++ b/storage/xtradb/dict/dict0load.cc @@ -492,7 +492,7 @@ err_len: } /* This recieves a dict_foreign_t* that points to a stack variable. - So mem_heap_free(foreign->heap) is not used as elsewhere. + So dict_foreign_free(foreign) is not used as elsewhere. Since the heap used here is freed elsewhere, foreign->heap is not assigned. */ foreign->id = mem_heap_strdupl(heap, (const char*) field, len); |