From 85a8f75a7d52e9c37f787a2dbea496e73a2e0043 Mon Sep 17 00:00:00 2001
From: unknown <heikki@donna.mysql.fi>
Date: Fri, 14 Dec 2001 19:35:31 +0200
Subject: [PATCH] dict0crea.c:   Add diagnostic code to find out why foreign
 key constraint creation sometimes fails

innobase/dict/dict0crea.c:
  Add diagnostic code to find out why foreign key constraint creation sometimes fails
---
 innobase/dict/dict0crea.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/innobase/dict/dict0crea.c b/innobase/dict/dict0crea.c
index b3bf9157e18..f60db829380 100644
--- a/innobase/dict/dict0crea.c
+++ b/innobase/dict/dict0crea.c
@@ -1234,9 +1234,12 @@ dict_create_add_foreigns_to_dictionary(
 	que_graph_free(graph);
 
 	if (error != DB_SUCCESS) {
+	        fprintf(stderr,
+			"InnoDB: foreign constraint creation failed;\n"
+			"InnoDB: internal error number %lu\n", error);
+
 		ut_a(error == DB_OUT_OF_FILE_SPACE);
 
-		fprintf(stderr, "InnoDB: foreign constraint creation failed\n");
 		fprintf(stderr, "InnoDB: tablespace is full\n");
 
 		trx_general_rollback_for_mysql(trx, FALSE, NULL);
-- 
2.30.9