summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2002-12-19 20:58:07 +0200
committerunknown <heikki@hundin.mysql.fi>2002-12-19 20:58:07 +0200
commit05ef8a612a8a94a0bf64801867b805675192f049 (patch)
treec5f75d33cc6c153975b28188977caa7f7afab54e
parent7a896f369579f459dbef42c46dfef298c71902eb (diff)
downloadmariadb-git-05ef8a612a8a94a0bf64801867b805675192f049.tar.gz
ha_innobase.cc:
Better error message to help users who created tables with < 3.23.54 where MySQL implicitly added a PRIMARY KEY definition sql/ha_innobase.cc: Better error message to help users who created tables with < 3.23.54 where MySQL implicitly added a PRIMARY KEY definition
-rw-r--r--sql/ha_innobase.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index 489c2fafd9b..c5b529a3881 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -1030,7 +1030,14 @@ how you can resolve the problem.\n",
if (primary_key != MAX_KEY) {
fprintf(stderr,
"InnoDB: Error: table %s has no primary key in InnoDB\n"
- "InnoDB: data dictionary, but has one in MySQL!\n", name);
+ "InnoDB: data dictionary, but has one in MySQL!\n"
+ "InnoDB: If you created the table with a MySQL\n"
+ "InnoDB: version < 3.23.54 and did not define a primary\n"
+ "InnoDB: key, but defined a unique key with all non-NULL\n"
+ "InnoDB: columns, then MySQL internally treats that key\n"
+ "InnoDB: as the primary key. You can fix this error by\n"
+ "InnoDB: dump + DROP + CREATE + reimport of the table.\n",
+ name);
}
((row_prebuilt_t*)innobase_prebuilt)