<p dir="auto">when execute sql that likes follow<br>
INSERT INTO stock_age (<br>
tenant_id,<br>
warehouse_no,<br>
sku_no,<br>
lot_no,<br>
package_no,<br>
owner_no,<br>
product_level,<br>
md5_value,<br>
qty<br>
)<br>
VALUES<br>
(<br>
'T123456',<br>
'26',<br>
'S011',<br>
'1',<br>
'1',<br>
'ownerNo',<br>
'1',<br>
'asdsdfdfdfd',<br>
5<br>
)<br>
ON DUPLICATE KEY<br>
UPDATE<br>
qty = IFNULL(qty, 0) + 1</p>
<p dir="auto">report error:</p>
<h3 dir="auto">Cause: java.sql.SQLException: No value specified for parameter 10</h3>
<p dir="auto">; bad SQL grammar []; nested exception is java.sql.SQLException: No value specified for parameter 10<br>
Caused by: java.sql.SQLException: No value specified for parameter 10<br>
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:996)<br>
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:935)<br>
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:924)<br>
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:870)<br>
at com.mysql.jdbc.PreparedStatement.checkAllParametersSet(PreparedStatement.java:2281)<br>
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2261)<br>
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2191)<br>
at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1165)<br>
at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:198)<br>
at org.apache.commons.dbcp2.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:198)<br>
at org.apache.shardingsphere.shardingjdbc.executor.SQLExecuteCallbackFactory$2.executeSQL(SQLExecuteCallbackFactory.java:64)<br>
at org.apache.shardingsphere.shardingjdbc.executor.SQLExecuteCallbackFactory$2.executeSQL(SQLExecuteCallbackFactory.java:60)<br>
at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteCallback.execute0(SQLExecuteCallback.java:79)<br>
at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteCallback.execute(SQLExecuteCallback.java:61)<br>
at org.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.syncGroupExecute(ShardingExecuteEngine.java:125)<br>
at org.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.parallelExecute(ShardingExecuteEngine.java:102)<br>
at org.apache.shardingsphere.core.execute.engine.ShardingExecuteEngine.groupExecute(ShardingExecuteEngine.java:83)<br>
at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteTemplate.executeGroup(SQLExecuteTemplate.java:73)<br>
at org.apache.shardingsphere.core.execute.sql.execute.SQLExecuteTemplate.executeGroup(SQLExecuteTemplate.java:56)<br>
at org.apache.shardingsphere.shardingjdbc.executor.AbstractStatementExecutor.executeCallback(AbstractStatementExecutor.java:140)<br>
at org.apache.shardingsphere.shardingjdbc.executor.PreparedStatementExecutor.execute(PreparedStatementExecutor.java:153)<br>
at org.apache.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:192)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br>
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>
at java.lang.reflect.Method.invoke(Method.java:498)</p>
<p dir="auto">Which version of ShardingSphere did you use?<br>
4.0.1</p>
<p dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?<br>
Sharding-JDBC</p>
<p dir="auto">The sharding-proxy and sharding-scaling  modules are both use MySQL protocol, there are lots of duplicated codes.<br>
It is better to create a new module to process database protocol. The tasks are:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Create shardingsphere-database-protocol module</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Create shardingsphere-mysql-protocol submodule</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Create shardingsphere-postgresql-protocol submodule</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Merge sharding-proxy and sharding-scaling's mysql protocol part.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Move sharding-proxy's postgresql protocol part.</li>
</ul>