求助
【DM版本】:达梦8
【操作系统】:数据库服务端:windows 10
【CPU】:i5-13600k
java版本1.8
达梦8,数据库驱动DmJdbcDriver18:8.1.2.192
shardingsphere版本:5.2.0
【问题描述】*:
sql:update space_file_action_5 set location_point = dmgeo.ST_POINTFROMTEXT('POINT(114 22)', 4326) where id = 1759137021849341953;
从mysql中迁移项目到达梦,在达梦管理工具中执行没有问题,但是在idea里面执行就会报shardingsphere的sql解析器错误,之前为了适配mybatis和shardingsphere,参考百度修改了shardingsphere的源码,让mybatis使用mysql的parser去解析sql。
样例代码
SqlSessionFactory sqlSessionFactory = sqlSessionTemplate.getSqlSessionFactory();
String sql1 = "update space_file_action_5 set location_point = dmgeo.ST_POINTFROMTEXT('POINT(114 22)', 4326) where id = 1759137021849341953;";
SqlSession sqlSession = sqlSessionFactory.openSession();
try {
sqlSession.getConnection().prepareStatement(sql1);
} catch (SQLException throwables) {
throwables.printStackTrace();
}
sqlSession.close();
报错信息:
您好 当前数据库版本跟驱动是一致的吗,可以开启下jdbc log 看看详细记录
https://eco.dameng.com/community/post/20230205093254T530ZZ0HJVU3RM2YPW
顶顶