Skip to content

Commit

Permalink
Long domain name (#9108)
Browse files Browse the repository at this point in the history
  • Loading branch information
shnikd authored Sep 11, 2024
1 parent bea5f8c commit 808cff9
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion ydb/core/kqp/ut/pg/kqp_pg_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4151,7 +4151,34 @@ Y_UNIT_TEST_SUITE(KqpPg) {
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());
CompareYson(R"([])", FormatResultSetYson(result.GetResultSet(0)));
}
}
}

Y_UNIT_TEST(LongDomainName) {
NKikimrConfig::TAppConfig appConfig;
appConfig.MutableTableServiceConfig()->SetEnablePreparedDdl(true);
auto setting = NKikimrKqp::TKqpSetting();
auto serverSettings = TKikimrSettings()
.SetAppConfig(appConfig)
.SetKqpSettings({setting})
.SetDomainRoot(std::string(65, 'a'));
TKikimrRunner kikimr(serverSettings.SetWithSampleTables(false));
auto db = kikimr.GetQueryClient();
auto settings = NYdb::NQuery::TExecuteQuerySettings().Syntax(NYdb::NQuery::ESyntax::Pg);
{
auto result = db.ExecuteQuery(R"(
CREATE TABLE t (id INT PRIMARY KEY, data1 UUID[]);
)", NYdb::NQuery::TTxControl::NoTx(), settings).ExtractValueSync();
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
}

{
const auto query = Q_(R"(
SELECT * FROM t;
)");
auto result = db.ExecuteQuery(query, NYdb::NQuery::TTxControl::BeginTx().CommitTx(), settings).ExtractValueSync();
UNIT_ASSERT_C(result.IsSuccess(), result.GetIssues().ToString());
}
}
}

} // namespace NKqp
Expand Down

0 comments on commit 808cff9

Please sign in to comment.