summaryrefslogtreecommitdiff
path: root/innobase
diff options
context:
space:
mode:
authoraivanov@mysql.com <>2006-01-30 15:17:33 +0300
committeraivanov@mysql.com <>2006-01-30 15:17:33 +0300
commitfe518520be76da7c66f17e497d7824a3850d70b1 (patch)
tree08ba2fde9e3237be148e59033c35f0b139b97a33 /innobase
parent1fa62bdafc241134838301205b1ca99d18587c04 (diff)
downloadmariadb-git-fe518520be76da7c66f17e497d7824a3850d70b1.tar.gz
Fixed BUG#16387.
Applied innodb-4.1-ss17 snapshot. Do not mistake TABLENAME_ibfk_0 for auto-generated id.
Diffstat (limited to 'innobase')
-rw-r--r--innobase/dict/dict0dict.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index 0cdd593b678..093df5118af 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -2755,7 +2755,8 @@ dict_table_get_highest_foreign_id(
if (ut_strlen(foreign->id) > ((sizeof dict_ibfk) - 1) + len
&& 0 == ut_memcmp(foreign->id, table->name, len)
&& 0 == ut_memcmp(foreign->id + len,
- dict_ibfk, (sizeof dict_ibfk) - 1)) {
+ dict_ibfk, (sizeof dict_ibfk) - 1)
+ && foreign->id[len + ((sizeof dict_ibfk) - 1)] != '0') {
/* It is of the >= 4.0.18 format */
id = strtoul(foreign->id + len + ((sizeof dict_ibfk) - 1),