]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
sqlite3_exec does not return SQLITE_DONE or SQLITE_ROW plus one forgottten throw 9080/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 4 May 2020 09:08:26 +0000 (11:08 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 4 May 2020 09:08:26 +0000 (11:08 +0200)
conversion

pdns/ssqlite3.cc

index b36a256e6b9fc286ca65beae74ef5ac95aceb718..8fc9466a436fdcc1ce2e10a89885efc95fe2d6e4 100644 (file)
@@ -249,13 +249,11 @@ void SSQLite3::execute(const string& query) {
       if (rc != SQLITE_OK)  {
         errstr2 = errmsg;
         sqlite3_free(errmsg);
-      }
-      if (rc != SQLITE_OK && rc != SQLITE_DONE && rc != SQLITE_ROW) {
         throw SSqlException("Failed to execute query: " + errstr2);
       }
     }
   } else if (rc != SQLITE_OK) {
-    throw("Failed to execute query: " + errstr1);
+    throw SSqlException("Failed to execute query: " + errstr1);
   }
 }