message: More test cases for prepared statements and subqueries
diff: @@ -72,6 +72,18 @@ TEST_CASE("Prepared statements and subqueries", "[prepared]") {
  result = con.Query("EXECUTE v2(42)");
  REQUIRE(CHECK_COLUMN(result, 0, {}));
  +
  + // prepared statement in correlated scalar subquery
  + REQUIRE_NO_FAIL(con.Query("PREPARE v3 AS SELECT (SELECT $1::INT+sq1.i) FROM (SELECT 42 AS i) sq1;"));
  +
  + result = con.Query("EXECUTE v3(42)");
  + REQUIRE(CHECK_COLUMN(result, 0, {84}));
  +
  + // prepared statement in nested correlated scalar subquery
  + REQUIRE_NO_FAIL(con.Query("PREPARE v4 AS SELECT (SELECT (SELECT $1::INT+sq1.i)+$2::INT+sq1.i) FROM (SELECT 42 AS i) sq1;"));
  +
  + result = con.Query("EXECUTE v4(20, 20)");
  + REQUIRE(CHECK_COLUMN(result, 0, {124}));
  }
  TEST_CASE("PREPARE for SELECT clause", "[prepared]") {
  