]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[master] Fixed #481 merge error
authorFrancis Dupont <fdupont@isc.org>
Wed, 13 Mar 2019 10:47:56 +0000 (11:47 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 13 Mar 2019 10:47:56 +0000 (11:47 +0100)
src/lib/mysql/mysql_connection.h

index 2b59d8dbbbfc387b346ed0324f1cb01efbd443c6..f5841999afe087eeb3cb065c77d2b57eb4afe619 100644 (file)
@@ -478,7 +478,8 @@ public:
 
         if (status != 0) {
             // 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)) {
                 isc_throw(DuplicateEntry, "Database duplicate entry error");
             }
             checkError(status, index, "unable to execute");