<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>For English only</strong>, other languages will not accept.</p>
<p dir="auto">Before report a bug, make sure you have:</p>
<ul dir="auto">
<li>Searched open and closed <a href="https://github.com/sharding-sphere/sharding-sphere/issues">GitHub issues</a>.</li>
<li>Read documentation: <a href="http://shardingsphere.io/document/current/en/overview/" rel="nofollow">ShardingSphere Doc</a>.</li>
</ul>
<p dir="auto">Please pay attention on issues you submitted, because we maybe need more details.<br>
If no response <strong>more than 7 days</strong> and we cannot reproduce it on current information, we will <strong>close it</strong>.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">3.1.0</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">Sharding-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">support dynamic parameter on INSERT ON DUPLICATE KEY UPDATE.<br>
for example (mybatis mapper):</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="INSERT INTO BlackMember (memberId, activeId, passiveId, project, platform, source)
      VALUE (#{memberId}, #{activeId}, #{passiveId},#{project}, #{platform}, #{source})
      ON DUPLICATE KEY UPDATE shieldStatus = #{shieldStatus}"><pre class="notranslate"><code class="notranslate">INSERT INTO BlackMember (memberId, activeId, passiveId, project, platform, source)
      VALUE (#{memberId}, #{activeId}, #{passiveId},#{project}, #{platform}, #{source})
      ON DUPLICATE KEY UPDATE shieldStatus = #{shieldStatus}
</code></pre></div>
<h3 dir="auto">Actual behavior</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Cause: java.sql.SQLException: No value specified for parameter 7"><pre class="notranslate"><code class="notranslate">Cause: java.sql.SQLException: No value specified for parameter 7
</code></pre></div>
<h3 dir="auto">Reason analyze (If you can)</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<h3 dir="auto">PS</h3>
<p dir="auto">Although I can find some explanation about why this feature should not be supported <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="345640477" data-permission-text="Title is private" data-url="https://github.com/apache/shardingsphere/issues/1066" data-hovercard-type="issue" data-hovercard-url="/apache/shardingsphere/issues/1066/hovercard" href="https://github.com/apache/shardingsphere/issues/1066">#1066</a> , it's not convictive enough I think. As the official doc says sharding-jdbc is 100% compatible for single-node routing SQL, it will not be true if this issue exists, and I find it's really hard to migrate my projects from Mycat to the Sharding-Sphere since it is common usage in my projects.<br>
So, could you please reconsider the possibility to support this feature.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/1615053/51166056-322a9000-18dd-11e9-91dc-30ba06085892.png"><img src="https://user-images.githubusercontent.com/1615053/51166056-322a9000-18dd-11e9-91dc-30ba06085892.png" alt="image" style="max-width: 100%;"></a></p>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">4.0.0-RC1<br>
jOOQ 3.11.11</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">Sharding-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="select dest_regional_fee_1.LOGNO from dest_regional_fee_1 where dest_regional_fee_1.ID = ?"><pre class="notranslate"><code class="notranslate">select dest_regional_fee_1.LOGNO from dest_regional_fee_1 where dest_regional_fee_1.ID = ?
</code></pre></div>
<h3 dir="auto">Actual behavior</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="select dest_regional_fee.LOGNO from dest_regional_fee_1 where dest_regional_fee_1.ID = ?"><pre class="notranslate"><code class="notranslate">select dest_regional_fee.LOGNO from dest_regional_fee_1 where dest_regional_fee_1.ID = ?
</code></pre></div>
<h3 dir="auto">Reason analyze (If you can)</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<h3 dir="auto">Example codes for reproduce this issue (such as a github link).</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="2019-08-12 23:25:12.950  INFO 2833 --- [           main] ShardingSphere-SQL                       : Logic SQL: select dest_regional_fee.LOGNO from dest_regional_fee where dest_regional_fee.ID = ?
2019-08-12 23:25:12.952  INFO 2833 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds0 ::: select dest_regional_fee.LOGNO from dest_regional_fee_1 where dest_regional_fee_1.ID = ? ::: [100]"><pre class="notranslate"><code class="notranslate">2019-08-12 23:25:12.950  INFO 2833 --- [           main] ShardingSphere-SQL                       : Logic SQL: select dest_regional_fee.LOGNO from dest_regional_fee where dest_regional_fee.ID = ?
2019-08-12 23:25:12.952  INFO 2833 --- [           main] ShardingSphere-SQL                       : Actual SQL: ds0 ::: select dest_regional_fee.LOGNO from dest_regional_fee_1 where dest_regional_fee_1.ID = ? ::: [100]
</code></pre></div>