mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 04:22:27 +01:00
dict0dict.c:
Fix bug #7831: ALTER TABLE ... ADD CONSTRAINT PRIMARY KEY ... complained about bad foreign key definition innobase/dict/dict0dict.c: Fix bug #7831: ALTER TABLE ... ADD CONSTRAINT PRIMARY KEY ... complained about bad foreign key definition
This commit is contained in:
parent
5556f53d09
commit
5e98f462be
1 changed files with 6 additions and 2 deletions
|
@ -2895,9 +2895,9 @@ loop:
|
|||
constraint_name = NULL;
|
||||
|
||||
if (ptr1 < ptr2) {
|
||||
/* The user has specified a constraint name. Pick it so
|
||||
/* The user may have specified a constraint name. Pick it so
|
||||
that we can store 'databasename/constraintname' as the id of
|
||||
the id of the constraint to system tables. */
|
||||
of the constraint to system tables. */
|
||||
ptr = ptr1;
|
||||
|
||||
ptr = dict_accept(ptr, "CONSTRAINT", &success);
|
||||
|
@ -2934,6 +2934,10 @@ loop:
|
|||
|
||||
ptr = dict_accept(ptr, "FOREIGN", &success);
|
||||
|
||||
if (!success) {
|
||||
goto loop;
|
||||
}
|
||||
|
||||
if (!isspace(*ptr)) {
|
||||
goto loop;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue