Comments (7)
使用MySQL原生驱动没有问题,现在看来不着急升级驱动可以正常运行。
4.3,预估在9月底发布GA(一般可用(General availability, 缩写GA))版本。感谢关注。
from oceanbase.
收到,感谢反馈,我们重现一下看。
from oceanbase.
抱歉使用setNull的方式没有重现。
我看到你的描述:“使用原生JDBC代码执行 SELECT * FROM t_user WHERE id = ?,哪怕只有一个预编译参数,只要参数值为null,就会报同样的错。”
看起来已经可以使用JDBC代码来重现,发一下JDBC重现的代码?多谢
from oceanbase.
我们使用mysql-connector-java-8.0.30 重现了这个问题。
可以改用 mysql-connector-java-8.0.20 没有这个问题,可以替换使用这个驱动。
或者使用ob提供的jdbc,我们使用 2410 版本没有问题
from oceanbase.
抱歉使用setNull的方式没有重现。 我看到你的描述:“使用原生JDBC代码执行 SELECT * FROM t_user WHERE id = ?,哪怕只有一个预编译参数,只要参数值为null,就会报同样的错。” 看起来已经可以使用JDBC代码来重现,发一下JDBC重现的代码?多谢
如下所示,原生 JDBC 代码很简单。不过我们使用的不是 setNull
,而是 setObject( index, null )
:
Connection conn = dataSource.getConnection();
try {
PreparedStatement ps = conn.prepareStatement("SELECT id FROM t_user WHERE id = ?");
ps.setObject(1, null); // ps.setNull(1, Types.BIGINT);
ps.execute();
} catch (SQLException e) {
throw new RuntimeException(e);
}
更换驱动版本,多次测试,初步验证出如下结论:
mysql-connector-java-8.0.28
及以下版本不会报错,以上版本就会报错(仅测试了8.0.20
~8.0.33
之间的版本)。- 不管是使用
setNull
还是setObject
,结果都是一样的。 - 不过,如果是连接 MySQL 数据库,不管哪个版本,都不会报错。
from oceanbase.
目前我们有多个环境,并未全部更换为 OceanBase,因此需要在多个环境的 OceanBase 和 MySQL 之间来回测试,以验证兼容性。
所以,目前还是打算使用 MySQL 提供的 JDBC 驱动,暂时还不宜使用 OceanBase 官方提供的 驱动包。
请问,如果使用 OceanBase 官方驱动包,除了更好的兼容性外,在性能方面会有更好的表现么 ?
BTW, 不知道 OceanBase 4.3 大概什么时候能够发布正式版 ?貌似该版本加了不少 OLAP 的新特性,比较眼馋~
from oceanbase.
原因已找到,正在修复。
from oceanbase.
Related Issues (20)
- [Bug]: 设置集群变量progressive_merge_num报错4016 HOT 2
- [Feature]: 【MySQL兼容】【8.0】【obmysql_table】创建分区表,更改分区表分区段列名,ob正常修改,mysql8.0报错不支持更改
- [Feature][mysql][兼容性]:不支持在单个语句中添加列并使其成为外键
- [Bug]: `select count()` 有概率出现预期之外的结果 HOT 1
- [Bug]: `union all` 不同的类型时,`to_base64(NULL)` 有时会得到错误的结果 HOT 1
- [Question]: 求教:为什么OceanBase建议使用业务字段做(联合)主键,不建议使用自增列做主键 ? HOT 12
- [Bug]: only one auto-increment column permitted(ret=-4016)
- [Bug]: `SELECT DISTINCT` `RIGHT` 函数出现预期之外的结果 HOT 1
- [Bug]: 含有 `ORDER BY` 子句时有时没有正确排序 HOT 1
- [Bug]: `ROUND` 的第二个参数为负数时可能导致错误结果 HOT 1
- [Bug]: `sum` 可能导致错误结果 HOT 1
- [Bug]: alter table rowkey column to varchar(10000) is allowed
- 迪聚海思手术麻醉信息系统 HOT 1
- CREATE TABLE / ALTER TABLE 中 auto_increment_cache_size 语法报错 HOT 2
- [Feature]: skyingworking的使用 HOT 19
- [Bug]: confusing error message when load insert into a table with a unique index
- [Feature]: 请问现在OceanBase Oracle模式支持PHP 连接吗,怎么连接 HOT 1
- [Bug]: alter table statement can add a primary key of more than 64 columns to a table
- [Bug] [mysql compatibility]: ob allow changing a partition column type, but mysql 8.0 doesn't
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oceanbase.