summaryrefslogtreecommitdiff
path: root/innobase/dict
diff options
context:
space:
mode:
authorheikki@hundin.mysql.fi <>2004-05-17 17:27:25 +0300
committerheikki@hundin.mysql.fi <>2004-05-17 17:27:25 +0300
commit7ff94b3808d45c12e1216b102c5af3933d156282 (patch)
tree1c00e47f1cbfd1b80cabc2317ed6975e93f74692 /innobase/dict
parentde76ef323ac45715e734e2d02b434089a7180cb5 (diff)
downloadmariadb-git-7ff94b3808d45c12e1216b102c5af3933d156282.tar.gz
dict0dict.c:
Allocate the table name buffer from the mem heap of a foreign key object rather than pointing to the name buffer in the table object; even though this apparently caused no bugs in RENAME, DROP, ALTER TABLE, or elsewhere, this convention was very prone to memory allocation bugs
Diffstat (limited to 'innobase/dict')
-rw-r--r--innobase/dict/dict0dict.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index 51e92a9900f..0fc4ac2b687 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -2892,7 +2892,8 @@ col_loop1:
}
foreign->foreign_table = table;
- foreign->foreign_table_name = table->name;
+ foreign->foreign_table_name = mem_heap_strdup(foreign->heap,
+ table->name);
foreign->foreign_index = index;
foreign->n_fields = i;
foreign->foreign_col_names = mem_heap_alloc(foreign->heap,