注册

shardingsphere+达梦+MP在涉及dmgeo时报错SQLParsingException

DM_083450 2024/06/20 581 6

求助
【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();
报错信息:报错1.png

回答 0
暂无回答
扫一扫
联系客服