mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-09-02 15:05:16 +00:00
[481-er-foreign-duplicate-key-with-child-info] Made ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO optional
This commit is contained in:
@@ -478,8 +478,13 @@ public:
|
|||||||
|
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
// Failure: check for the special case of duplicate entry.
|
// Failure: check for the special case of duplicate entry.
|
||||||
if ((mysql_errno(mysql_) == ER_DUP_ENTRY) ||
|
if ((mysql_errno(mysql_) == ER_DUP_ENTRY)
|
||||||
(mysql_errno(mysql_) == ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO)) {
|
#if defined(ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO) && \
|
||||||
|
(ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO != ER_DUP_ENTRY)
|
||||||
|
|
||||||
|
|| (mysql_errno(mysql_) == ER_FOREIGN_DUPLICATE_KEY_WITH_CHILD_INFO)
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
isc_throw(DuplicateEntry, "Database duplicate entry error");
|
isc_throw(DuplicateEntry, "Database duplicate entry error");
|
||||||
}
|
}
|
||||||
checkError(status, index, "unable to execute");
|
checkError(status, index, "unable to execute");
|
||||||
|
Reference in New Issue
Block a user