-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Open
Description
Search before asking
- I had searched in the issues and found no similar issues.
Version
2.1.11
What's Wrong?
我们一直使用embulk-input-mysql组件抽取doris数据到hdfs,近期将doris从2.0.7升级到2.1.11后,此功能全部出错。报错显示PreparedStatement.getMetaData()返回null。
经过调试源码,发现可能与数据库useCursorFetch、useServerPrepStmts行为有关,以下Java代码可以复现该问题:
public class Aaa {
public static void main(String[] args) throws Exception {
Properties props = new Properties();
props.put("characterEncoding", "UTF-8");
props.put("useServerPrepStmts", "false");
props.put("useCursorFetch", "true"); // 关键点
props.put("useSSL", "false");
props.put("useUnicode", "true");
props.put("serverTimezone", "Asia/Shanghai");
props.put("user", "bdp");
props.put("password", "bdp");
Connection con1 = DriverManager.getConnection("jdbc:mysql://10.66.224.223:9030/clw", props);
Connection con2 = DriverManager.getConnection("jdbc:mysql://10.66.110.166:19030/clw", props);
Connection con3 = DriverManager.getConnection("jdbc:mysql://10.66.110.16:9030/db_es", props);
System.out.println(con1.prepareStatement("select 1").getMetaData() == null); // doris-2.1.11 true
System.out.println(con2.prepareStatement("select 1").getMetaData() == null); // doris-2.0.7 false
System.out.println(con3.prepareStatement("select 1").getMetaData() == null); // doris-4.0.1 false
}
}What You Expected?
定位错误并解决
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
No labels