summaryrefslogtreecommitdiff
path: root/innobase/dict
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-03-30 17:26:20 +0300
committerunknown <marko@hundin.mysql.fi>2004-03-30 17:26:20 +0300
commit7945ea24bf9a9f52dd83f788c4e942972b23765c (patch)
tree33f4c355358b6417382b64592478a03c36e26b9c /innobase/dict
parent3e15849bc8cc8c0622f13f8e87cc141ff8e1033f (diff)
downloadmariadb-git-7945ea24bf9a9f52dd83f788c4e942972b23765c.tar.gz
InnoDB: parse CONSTRAINT FOREIGN KEY correctly (Bug #3332)
innobase/dict/dict0dict.c: dict_create_foreign_constraints_low(): parse CONSTRAINT FOREIGN KEY correctly
Diffstat (limited to 'innobase/dict')
-rw-r--r--innobase/dict/dict0dict.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c
index dc19997de72..eb14d8bc80f 100644
--- a/innobase/dict/dict0dict.c
+++ b/innobase/dict/dict0dict.c
@@ -2811,8 +2811,15 @@ loop:
goto loop;
}
- ptr = dict_scan_id(ptr, &constraint_name, &constraint_name_len,
- FALSE);
+ do {
+ ptr++;
+ } while (isspace(*ptr));
+
+ /* read constraint name unless got "CONSTRAINT FOREIGN" */
+ if (ptr != ptr2) {
+ ptr = dict_scan_id(ptr, &constraint_name,
+ &constraint_name_len, FALSE);
+ }
} else {
ptr = ptr2;
}