]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3505] backport #3436 to Kea-2.6.1
authorRazvan Becheriu <razvan@isc.org>
Thu, 18 Jul 2024 19:31:38 +0000 (22:31 +0300)
committerRazvan Becheriu <razvan@isc.org>
Thu, 18 Jul 2024 19:31:38 +0000 (22:31 +0300)
src/lib/pgsql/pgsql_exchange.h
src/lib/pgsql/tests/pgsql_exchange_unittest.cc

index 22ec7afe0ce278c9f6c10d5af131c090adb314b0..98a048f2a57eb58ae8456c4e58ca4538d7ff8afc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2016-2022 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2016-2024 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -386,7 +386,7 @@ struct PsqlBindArray {
         if (value.unspecified()) {
             addNull();
         } else {
-            add(value);
+            add(value.get());
         }
     }
 
index bf79ef851e82810287f1042775335a5f62d4331b..6b6200e8b99461b61e52518f19301842659d5bd4 100644 (file)
@@ -216,8 +216,8 @@ TEST(PsqlBindArray, addOptionalBool) {
     // Verify contents are correct.
     std::string expected =
         "0 : empty\n"
-        "1 : \"0\"\n"
-        "2 : \"1\"\n";
+        "1 : \"FALSE\"\n"
+        "2 : \"TRUE\"\n";
 
     EXPECT_EQ(expected, b.toText());
 }