【测试类型:接口功能】【测试版本:6.0.0】 JDBC调用getObject()/getColumnType()获取cast(负数 as time)值报错
【操作系统和硬件信息】(查询命令: cat /etc/system-release, uname -a):
CentOS Linux release 7.6.1908 (Core)
Linux kwepwebenv03026 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
【测试环境】(单机/1主x备x级联备):单机
【被测功能】:JDBC驱动支持MySQL全量数据类型兼容性测试
【测试类型】:功能测试
【数据库版本】(查询命令: gaussdb -V):
(openGauss 6.0.0 build 4614510e) compiled at 2024-01-17 14:47:18 commit 0 last mr on x86_64-unknown-linux-gnu, compiled by g++ (GCC) 10.3.0, 64-bit
【预置条件】:数据库正常运行,兼容B库已创建
【操作步骤】(请填写详细的操作步骤):
1.编译java脚本(见附件),执行以下sql语句
--step1:建表;expect:成功
drop table if exists t_mediumint0005;
create table t_mediumint0005(
c1 int,
c2 mediumint,
c3 mediumint(1),
c4 mediumint(255),
c5 mediumint default '10',
c6 mediumint auto_increment primary key,
c7 mediumint(1) default 0,
c8 mediumint(10) not null default 99,
c9 mediumint unique);
--step2:插入数据;expect:成功
set @val = '111111';
insert t_mediumint0005 values(
1, @val, @val, @val, @val, @val, @val, @val, @val);
set @val = '990909' + 1;
insert t_mediumint0005 values(
2, @val, @val, @val, @val, @val, @val, @val, @val);
set @val = 202211;
insert t_mediumint0005 values(
3, @val, @val, @val, @val, @val, @val, @val, @val);
set @val = -11;
insert t_mediumint0005 values(
4, @val, @val, @val, @val, @val, @val, @val, @val);
set @val = 11;
insert t_mediumint0005 values(
5, @val, @val, @val, @val, @val, @val, @val, @val);
--step3:查询表数据;expect:成功
select * from t_mediumint0005 order by 1;
select c1, cast(c2 as time), cast(c3 as time), cast(c4 as time), cast(c5 as
time), cast(c6 as time), cast(c7 as time), cast(c8 as time), cast(c9 as time)
from t_mediumint0005 where c1<>2 order by 1;
2.执行java脚本
【预期输出】:
1.执行成功
2.执行成功,输出结果与mysql一致
【实际输出】:
1.执行成功
2.报错、
getObject方法:
mysql
opengauss
getColumnType方法:
msyql
openGauss
getString方法:
mysql
openGauss
【原因分析】:
【日志信息】(请附上日志文件、截图、coredump信息):
【测试代码】:
Hey @ningyali, 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 @ningyali,
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: @Kamus , @vimiix , @汪伟 , @travelliu , @aaronwell , @Loong
if you have any question, please contact the SIG: Connectors.
验收版本:gaussdb (openGauss 6.0.0 build e70c8948) compiled at 2024-03-13 00:10:17 commit 0 last mr
验收结论:验收通过
getObject()
getColumnType()
登录 后才可以发表评论