<p dir="auto"><strong>When only use  shardingsphere  ： sharding is OK （only choise one db and one table）</strong></p>
<p dir="auto"><strong>When only use  shardingsphere  with seata ： sharding is ERROR（Scan all db and table） like</strong><br>
15:16:15.370 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_0</code> LIMIT 1<br>
15:16:15.370 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_1</code> LIMIT 1<br>
15:16:15.370 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_2</code> LIMIT 1<br>
15:16:15.370 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_3</code> LIMIT 1<br>
15:16:15.370 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_4</code> LIMIT 1<br>
15:16:15.370 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_5</code> LIMIT 1<br>
15:16:15.370 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_6</code> LIMIT 1<br>
15:16:15.370 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_7</code> LIMIT 1<br>
15:16:15.370 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_8</code> LIMIT 1<br>
15:16:15.370 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_9</code> LIMIT 1<br>
15:16:15.371 INFO  [main]  ShardingSphere-SQL  - Actual SQL: bookshelf_0 ::: SELECT * FROM <code class="notranslate">shelf_book_key_10</code> LIMIT 1<br>
......<br>
<strong><em>sharding-transaction-base-seata-at</em>   It doesn't help.</strong></p>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="	&lt;dependency&gt;
		&lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt;
		&lt;artifactId&gt;sharding-jdbc-spring-boot-starter&lt;/artifactId&gt;
                   &lt;version&gt;4.1.1&lt;/version&gt;
	&lt;/dependency&gt;
	&lt;dependency&gt;
		&lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt;
		&lt;artifactId&gt;sharding-jdbc-spring-namespace&lt;/artifactId&gt;
                   &lt;version&gt;4.1.1&lt;/version&gt;
	&lt;/dependency&gt;

	&lt;dependency&gt;
		&lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt;
		&lt;artifactId&gt;sharding-transaction-base-seata-at&lt;/artifactId&gt;
		&lt;version&gt;4.1.2&lt;/version&gt;
	&lt;/dependency&gt;

          notice ：4.1.2 is my version be used for fix SeataATShardingTransactionManager can't read seata.conf

	&lt;dependency&gt;
		&lt;groupId&gt;io.seata&lt;/groupId&gt;
		&lt;artifactId&gt;seata-spring-boot-starter&lt;/artifactId&gt;
		&lt;version&gt;1.3.0&lt;/version&gt;
	&lt;/dependency&gt;"><pre class="notranslate"><code class="notranslate">	&lt;dependency&gt;
		&lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt;
		&lt;artifactId&gt;sharding-jdbc-spring-boot-starter&lt;/artifactId&gt;
                   &lt;version&gt;4.1.1&lt;/version&gt;
	&lt;/dependency&gt;
	&lt;dependency&gt;
		&lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt;
		&lt;artifactId&gt;sharding-jdbc-spring-namespace&lt;/artifactId&gt;
                   &lt;version&gt;4.1.1&lt;/version&gt;
	&lt;/dependency&gt;

	&lt;dependency&gt;
		&lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt;
		&lt;artifactId&gt;sharding-transaction-base-seata-at&lt;/artifactId&gt;
		&lt;version&gt;4.1.2&lt;/version&gt;
	&lt;/dependency&gt;

          notice ：4.1.2 is my version be used for fix SeataATShardingTransactionManager can't read seata.conf

	&lt;dependency&gt;
		&lt;groupId&gt;io.seata&lt;/groupId&gt;
		&lt;artifactId&gt;seata-spring-boot-starter&lt;/artifactId&gt;
		&lt;version&gt;1.3.0&lt;/version&gt;
	&lt;/dependency&gt;
</code></pre></div>
<p dir="auto">two kind of oracle batch insert didn't work.</p>
<p dir="auto">version</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;groupId&gt;org.apache.shardingsphere&lt;/groupId&gt;
&lt;artifactId&gt;shardingsphere-jdbc-core-spring-boot-starter&lt;/artifactId&gt;
&lt;version&gt;5.1.1&lt;/version&gt;"><pre class="notranslate">&lt;<span class="pl-ent">groupId</span>&gt;org.apache.shardingsphere&lt;/<span class="pl-ent">groupId</span>&gt;
&lt;<span class="pl-ent">artifactId</span>&gt;shardingsphere-jdbc-core-spring-boot-starter&lt;/<span class="pl-ent">artifactId</span>&gt;
&lt;<span class="pl-ent">version</span>&gt;5.1.1&lt;/<span class="pl-ent">version</span>&gt;</pre></div>
<p dir="auto">testcase</p>
<div class="highlight highlight-source-groovy notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    def &quot;testOracleInsertAll&quot;(){
        when: &quot;insert all case 1&quot;
        def insert_all_sql = &quot;&quot;&quot;
insert all into t_user( usename )  values ( ? ) select 1 from dual
&quot;&quot;&quot;
        prepareStatement(insert_all_sql)
        then:
        thrown NullPointerException

        when: &quot;insert all case 2&quot;
        def insert_all_sql2 = &quot;&quot;&quot;
insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE)
          select ?, ?, ?, 1 from dual union all
          select ?, ?, ?, 1 from dual
&quot;&quot;&quot;
        prepareStatement(insert_all_sql2)
        then:
        thrown ClassCastException
    }

    private void prepareStatement(def sql) {
        try (def connection = sqlSessionFactory.openSession().getConnection()) {
            connection.prepareStatement(sql)
        }
    }
"><pre class="notranslate">    <span class="pl-k">def</span> <span class="pl-s"><span class="pl-pds">"</span>testOracleInsertAll<span class="pl-pds">"</span></span>(){
        <span class="pl-c1">when</span>: <span class="pl-s"><span class="pl-pds">"</span>insert all case 1<span class="pl-pds">"</span></span>
        <span class="pl-k">def</span> insert_all_sql <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"""</span></span>
<span class="pl-s">insert all into t_user( usename )  values ( ? ) select 1 from dual</span>
<span class="pl-s"><span class="pl-pds">"""</span></span>
        prepareStatement(insert_all_sql)
        <span class="pl-c1">then</span>:
        thrown <span class="pl-k">NullPointerException</span>

        <span class="pl-c1">when</span>: <span class="pl-s"><span class="pl-pds">"</span>insert all case 2<span class="pl-pds">"</span></span>
        <span class="pl-k">def</span> insert_all_sql2 <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">"""</span></span>
<span class="pl-s">insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE)</span>
<span class="pl-s">          select ?, ?, ?, 1 from dual union all</span>
<span class="pl-s">          select ?, ?, ?, 1 from dual</span>
<span class="pl-s"><span class="pl-pds">"""</span></span>
        prepareStatement(insert_all_sql2)
        <span class="pl-c1">then</span>:
        thrown <span class="pl-k">ClassCastException</span>
    }

    <span class="pl-k">private</span> <span class="pl-k">void</span> <span class="pl-en">prepareStatement</span>(<span class="pl-k">def</span> <span class="pl-v">sql</span>) {
        <span class="pl-k">try</span> (<span class="pl-k">def</span> connection <span class="pl-k">=</span> sqlSessionFactory<span class="pl-k">.</span>openSession()<span class="pl-k">.</span>getConnection()) {
            connection<span class="pl-k">.</span>prepareStatement(sql)
        }
    }
</pre></div>
<p dir="auto">detail of exception</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Caused by: java.lang.NullPointerException
	at org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext.&lt;init&gt;(InsertStatementContext.java:94)
	at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.getDMLStatementContext(SQLStatementContextFactory.java:155)
	at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.newInstance(SQLStatementContextFactory.java:129)
	at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.newInstance(SQLStatementContextFactory.java:114)
	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.&lt;init&gt;(ShardingSpherePreparedStatement.java:181)
	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.&lt;init&gt;(ShardingSpherePreparedStatement.java:149)
	at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:80)

Caused by: java.lang.ClassCastException: class org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to class org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment (org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ParameterMarkerExpressionSegment and org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment are in unnamed module of loader 'app')
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.createProjection(OracleDMLStatementSQLVisitor.java:754)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectProjection(OracleDMLStatementSQLVisitor.java:700)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectProjection(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectProjectionContext.accept(OracleStatementParser.java:10829)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectList(OracleDMLStatementSQLVisitor.java:670)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectList(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectListContext.accept(OracleStatementParser.java:10507)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitQueryBlock(OracleDMLStatementSQLVisitor.java:503)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitQueryBlock(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$QueryBlockContext.accept(OracleStatementParser.java:4790)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectSubquery(OracleDMLStatementSQLVisitor.java:488)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectSubquery(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectSubqueryContext.accept(OracleStatementParser.java:4501)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsertSingleTable(OracleDMLStatementSQLVisitor.java:188)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsertSingleTable(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$InsertSingleTableContext.accept(OracleStatementParser.java:1548)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsert(OracleDMLStatementSQLVisitor.java:173)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsert(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$InsertContext.accept(OracleStatementParser.java:1469)
	at org.apache.shardingsphere.sql.parser.api.SQLVisitorEngine.visit(SQLVisitorEngine.java:55)
	at org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:48)
	at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:41)
	at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:30)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
	... 11 more"><pre lang="log" class="notranslate"><code class="notranslate">Caused by: java.lang.NullPointerException
	at org.apache.shardingsphere.infra.binder.statement.dml.InsertStatementContext.&lt;init&gt;(InsertStatementContext.java:94)
	at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.getDMLStatementContext(SQLStatementContextFactory.java:155)
	at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.newInstance(SQLStatementContextFactory.java:129)
	at org.apache.shardingsphere.infra.binder.SQLStatementContextFactory.newInstance(SQLStatementContextFactory.java:114)
	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.&lt;init&gt;(ShardingSpherePreparedStatement.java:181)
	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.&lt;init&gt;(ShardingSpherePreparedStatement.java:149)
	at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:80)

Caused by: java.lang.ClassCastException: class org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to class org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment (org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ParameterMarkerExpressionSegment and org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment are in unnamed module of loader 'app')
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.createProjection(OracleDMLStatementSQLVisitor.java:754)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectProjection(OracleDMLStatementSQLVisitor.java:700)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectProjection(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectProjectionContext.accept(OracleStatementParser.java:10829)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectList(OracleDMLStatementSQLVisitor.java:670)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectList(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectListContext.accept(OracleStatementParser.java:10507)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitQueryBlock(OracleDMLStatementSQLVisitor.java:503)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitQueryBlock(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$QueryBlockContext.accept(OracleStatementParser.java:4790)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectSubquery(OracleDMLStatementSQLVisitor.java:488)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitSelectSubquery(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$SelectSubqueryContext.accept(OracleStatementParser.java:4501)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsertSingleTable(OracleDMLStatementSQLVisitor.java:188)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsertSingleTable(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$InsertSingleTableContext.accept(OracleStatementParser.java:1548)
	at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsert(OracleDMLStatementSQLVisitor.java:173)
	at org.apache.shardingsphere.sql.parser.oracle.visitor.statement.impl.OracleDMLStatementSQLVisitor.visitInsert(OracleDMLStatementSQLVisitor.java:162)
	at org.apache.shardingsphere.sql.parser.autogen.OracleStatementParser$InsertContext.accept(OracleStatementParser.java:1469)
	at org.apache.shardingsphere.sql.parser.api.SQLVisitorEngine.visit(SQLVisitorEngine.java:55)
	at org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:48)
	at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:41)
	at org.apache.shardingsphere.infra.parser.cache.SQLStatementCacheLoader.load(SQLStatementCacheLoader.java:30)
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3533)
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2282)
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2159)
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2049)
	... 11 more
</code></pre></div>