【操作步骤】(请填写详细的操作步骤):
新增了UTF8Encoding进行解析UTF8编码数据,但是考虑不完整会到报错退出。
如系统表pg_catalog.pg_stat_activity 这个本身就会存在utf8/gbk编码共存场景。
因为这个是全局的。如果业务库是gbk那就存的数据是gbk编码。加上自己是utf8就存在数据编码混合出现。
可以直接回退到原始的用java自己的netstring方式。
【预期输出】:
【实际输出】:
【原因分析】:
【日志信息】(请附上日志文件、截图、coredump信息):
【测试代码】:
Hey @travelliu, Welcome to openGauss Community.
All of the projects in openGauss Community are maintained by @opengauss_bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at Here to find the details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
Hi @travelliu,
if you want to get quick review about your issue, please contact the owner in first: @周斌 ,
and then any of the maintainers: @Pike
and then any of the committers: @aaronwell , @Loong , @Kamus , @vimiix , @汪伟 , @travelliu
if you have any question, please contact the SIG: Connectors.
主要引入点
@travelliu 问题已收到,待修复。
必现步骤:
try (Connection conn = TestUtil.openDB(props)) {
conn.setAutoCommit(false);
try (Statement st = con.createStatement()) {
try (ResultSet rs = st.executeQuery("select t.datname, t.query from pg_stat_activity t")) {
while (rs.next()) {
System.out.println(String.format("result:%s %s", rs.getString(1), rs.getString(2)));
}
} finally {
}
}
}
验收日期:2023-11-21
验收版本:compiled at 2023-11-15-00:26:19 build f4e6290
验收结论:通过
验收日期:2024-4-23
验收版本:compiled at 2024-04-17-15:42:00 build fd771c9 (5.0.1B001)
验收结论:本issue相关场景验收通过
除了GBK、UTF8外,SQL_ASCII编码的库存在问题
gsql直连正常查询
登录 后才可以发表评论