Commit 527f80b8 authored by unknown's avatar unknown

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
parent ef12e29e
......@@ -2892,7 +2892,8 @@ dict_create_foreign_constraints_low(
}
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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment