From: Razvan Becheriu Date: Thu, 18 Jul 2024 19:31:38 +0000 (+0300) Subject: [#3505] backport #3436 to Kea-2.6.1 X-Git-Tag: Kea-2.6.1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e6a584eb05e5d486e44405477b0c829b73eb313;p=thirdparty%2Fkea.git [#3505] backport #3436 to Kea-2.6.1 --- diff --git a/src/lib/pgsql/pgsql_exchange.h b/src/lib/pgsql/pgsql_exchange.h index 22ec7afe0c..98a048f2a5 100644 --- a/src/lib/pgsql/pgsql_exchange.h +++ b/src/lib/pgsql/pgsql_exchange.h @@ -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()); } } diff --git a/src/lib/pgsql/tests/pgsql_exchange_unittest.cc b/src/lib/pgsql/tests/pgsql_exchange_unittest.cc index bf79ef851e..6b6200e8b9 100644 --- a/src/lib/pgsql/tests/pgsql_exchange_unittest.cc +++ b/src/lib/pgsql/tests/pgsql_exchange_unittest.cc @@ -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()); }