Commit d4f6c7a4 authored by unknown's avatar unknown
Browse files

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 31280b06
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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,