Commit 7945ea24 authored by unknown's avatar unknown
Browse files

InnoDB: parse CONSTRAINT FOREIGN KEY correctly (Bug #3332)


innobase/dict/dict0dict.c:
  dict_create_foreign_constraints_low(): parse CONSTRAINT FOREIGN KEY correctly
parent 3e15849b
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -2811,8 +2811,15 @@ dict_create_foreign_constraints_low(
	        	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;
	}