Issue 1:
vsersion: sharing proxy 5.0.0-RC

here server.xml:

scaling:
blockQueueSize: 10000
workerThread: 40
clusterAutoSwitchAlgorithm:
type: IDLE
props:
incremental-task-idle-minute-threshold: 30
dataConsistencyCheckAlgorithm:
type: DEFAULT

mode:
type: Cluster
repository:
type: ZooKeeper
props:
namespace: governance_ds
server-lists: local.zookeeper.cn:2181
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
overwrite: false

rules:
- !AUTHORITY
users:
- root@%:123456
- test@%:yunnex
- sharding@:sharding
provider:
type: ALL_PRIVILEGES_PERMITTED

- !TRANSACTION
defaultType: LOCAL

props:
max-connections-size-per-query: 1
kernel-executor-size: 16 # Infinite by default.
proxy-frontend-flush-threshold: 128 # The default value is 128.
proxy-opentracing-enabled: false
proxy-hint-enabled: false
sql-show: false
check-table-metadata-enabled: true
lock-wait-timeout-milliseconds: 50000 # The maximum time to wait for a lock
show-process-list-enabled: true
# Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
# The default value is -1, which means set the minimum value for different JDBC drivers.
proxy-backend-query-fetch-size: -1
check-duplicate-table-enabled: false
sql-comment-parse-enabled: false
proxy-frontend-executor-size: 0 # Proxy frontend executor size. The default value is 0, which means let Netty decide.
# Available options of proxy backend executor suitable: OLAP(default), OLTP. The OLTP option may reduce time cost of writing packets to client, but it may increase the latency of SQL execution
# if client connections are more than proxy-frontend-netty-executor-size, especially executing slow SQL.
proxy-backend-executor-suitable: OLAP
proxy-frontend-max-connections: 20 # Less than or equal to 0 means no limitation.
sql-federation-enabled: false

start log:

[INFO ] 2021-11-04 14:04:13.919 [main-EventThread] o.a.c.f.state.ConnectionStateManager - State change: CONNECTED

[INFO ] 2021-11-04 14:04:14.046 [main-EventThread] o.a.c.framework.imps.EnsembleTracker - New config event received: {}

[INFO ] 2021-11-04 14:04:14.046 [main-EventThread] o.a.c.framework.imps.EnsembleTracker - New config event received: {}

WARNING: An illegal reflective access operation has occurred

WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/Users/Awoo/.m2/repository/org/codehaus/groovy/groovy/2.4.19/groovy-2.4.19-indy.jar) to method java.lang.Object.finalize()

WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass

WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations

WARNING: All illegal access operations will be denied in a future release

Thanks for using Atomikos! Evaluate http://www.atomikos.com/Main/ExtremeTransactions for advanced features and professional support

or register at http://www.atomikos.com/Main/RegisterYourDownload to disable this message and receive FREE tips & advice

Issue 2:
Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Searched open and closed GitHub issues.

Read documentation: ShardingSphere Doc.

Please pay attention on issues you submitted, because we maybe need more details.

If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

5.0.0-beta

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-JDBC

Expected behavior

The query field has a placeholder

for example:

String sql= "select name,? from t_order"

PreparedStatement query1 = connection.prepareStatement(sql);

query.setString(1,"123");

ResultSet rs = query.executeQuery();

Actual behavior

report an error

Reason analyze (If you can)

com.google.common.util.concurrent.UncheckedExecutionException: java.lang.ClassCastException: org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.ParameterMarkerExpressionSegment cannot be cast to org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.simple.LiteralExpressionSegment

at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2218)

at com.google.common.cache.LocalCache.get(LocalCache.java:4147)

at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4151)

at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5140)

at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5146)

at org.apache.shardingsphere.infra.parser.sql.SQLStatementParserEngine.parse(SQLStatementParserEngine.java:48)

at org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse0(ShardingSphereSQLParserEngine.java:67)

at org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:56)

at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.(ShardingSpherePreparedStatement.java:161)

at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.(ShardingSpherePreparedStatement.java:133)

at org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection.prepareStatement(ShardingSphereConnection.java:183)

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

Example codes for reproduce this issue (such as a github link).