apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.33k stars 8.78k forks source link

io.seata.common.exception.NotSupportYetException: not support the sql syntax insert with query #4830

Open lvswift opened 2 years ago

lvswift commented 2 years ago

io.seata.common.exception.NotSupportYetException: not support the sql syntax insert with query

INSERT INTO t_data (data_depart_id) SELECT org.id AS data_depart_id from org.org

please see the doc about SQL restrictions https://seata.io/zh-cn/docs/user/sqlreference/dml.html at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:97) at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:59) at sun.reflect.GeneratedMethodAccessor275.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49) at com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor.intercept(PaginationInterceptor.java:162) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62) at com.sun.proxy.$Proxy619.prepare(Unknown Source) at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.prepareStatement(MybatisSimpleExecutor.java:92) at com.baomidou.mybatisplus.core.executor.MybatisSimpleExecutor.doUpdate(MybatisSimpleExecutor.java:53) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:117) at com.baomidou.mybatisplus.core.executor.MybatisCachingExecutor.update(MybatisCachingExecutor.java:83) at sun.reflect.GeneratedMethodAccessor433.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49) at com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor.intercept(OptimisticLockerInterceptor.java:97) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62) at com.sun.proxy.$Proxy618.update(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:194) at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:426) ... 168 common frames omitted

funky-eyes commented 2 years ago

暂不支持该sql,等待后续适配,或者可自己贡献pr适配

lvswift commented 2 years ago

为什么1.3.0是支持这个操作sql的,升级之后为什么不是往前兼容的呢。

funky-eyes commented 2 years ago

为什么1.3.0是支持这个操作sql的,升级之后为什么不是往前兼容的呢。

应该是不兼容的,只不过当时没拦截,存在一致性问题,所以目前不兼容的先拦截掉了

funky-eyes commented 2 years ago

不是sql能发出就是兼容

wangyuewen-china commented 2 years ago

please assign me