diff options
author | unknown <heikki@hundin.mysql.fi> | 2004-05-17 17:27:25 +0300 |
---|---|---|
committer | unknown <heikki@hundin.mysql.fi> | 2004-05-17 17:27:25 +0300 |
commit | d4f6c7a4c7e836fb81bd4b21a1ea8b1e69d0c917 (patch) | |
tree | 1c00e47f1cbfd1b80cabc2317ed6975e93f74692 /innobase/dict/dict0dict.c | |
parent | 31280b062439846f9d64c26817372deea7bb8c54 (diff) | |
download | mariadb-git-d4f6c7a4c7e836fb81bd4b21a1ea8b1e69d0c917.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
innobase/dict/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/dict0dict.c')
-rw-r--r-- | innobase/dict/dict0dict.c | 3 |
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, |