<h3 dir="auto">Error updating database.  Cause: java.sql.SQLException: Field 'id' doesn't have a default value</h3>
<h3 dir="auto">The error may involve com.demo.test.project.mapper.TestRecordMapper.add-Inline</h3>
<h3 dir="auto">The error occurred while setting parameters</h3>
<h3 dir="auto">SQL: insert into test_record(point_id,str,<code class="notranslate">time</code>)values(?,?,?) on duplicate key update str = value(str)</h3>
<h3 dir="auto">Cause: java.sql.SQLException: Field 'id' doesn't have a default value</h3>
<p dir="auto">; Field 'id' doesn't have a default value; nested exception is java.sql.SQLException: Field 'id' doesn't have a default value</p>
<h2 dir="auto">Bug Report</h2>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">4.0.0.M1</p>
<h3 dir="auto">Which project did you use? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">sharding-proxy</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">sql：</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" select * from customer t where party_id in(8001,8002,8003,8004);"><pre class="notranslate"><code class="notranslate"> select * from customer t where party_id in(8001,8002,8003,8004);
</code></pre></div>
<p dir="auto">config：</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="customer:
  actualDataNodes: ds_0.customer_000${0..1},ds_1.customer_000${2..3}
  databaseStrategy:
    inline:
      shardingColumn: party_id
      algorithmExpression: ds_${(party_id % 4).intdiv(2)}
  tableStrategy:
    inline:
      shardingColumn: party_id
      algorithmExpression: customer_${&quot;000&quot; + (party_id % 4)}"><pre class="notranslate"><code class="notranslate">customer:
  actualDataNodes: ds_0.customer_000${0..1},ds_1.customer_000${2..3}
  databaseStrategy:
    inline:
      shardingColumn: party_id
      algorithmExpression: ds_${(party_id % 4).intdiv(2)}
  tableStrategy:
    inline:
      shardingColumn: party_id
      algorithmExpression: customer_${"000" + (party_id % 4)}
</code></pre></div>
<p dir="auto">route result error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" ds_0 ::: select * from customer_0000 t where party_id in(8001,8002,8003,8004);
 ds_0 ::: select * from customer_0001 t where party_id in(8001,8002,8003,8004);
 ds_0 ::: select * from customer_0002 t where party_id in(8001,8002,8003,8004);
 ds_0 ::: select * from customer_0003 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0000 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0001 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0002 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0003 t where party_id in(8001,8002,8003,8004);"><pre class="notranslate"><code class="notranslate"> ds_0 ::: select * from customer_0000 t where party_id in(8001,8002,8003,8004);
 ds_0 ::: select * from customer_0001 t where party_id in(8001,8002,8003,8004);
 ds_0 ::: select * from customer_0002 t where party_id in(8001,8002,8003,8004);
 ds_0 ::: select * from customer_0003 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0000 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0001 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0002 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0003 t where party_id in(8001,8002,8003,8004);
</code></pre></div>
<p dir="auto">The correct routing result should be as follows：</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=" ds_0 ::: select * from customer_0000 t where party_id in(8001,8002,8003,8004);
 ds_0 ::: select * from customer_0001 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0002 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0003 t where party_id in(8001,8002,8003,8004);"><pre class="notranslate"><code class="notranslate"> ds_0 ::: select * from customer_0000 t where party_id in(8001,8002,8003,8004);
 ds_0 ::: select * from customer_0001 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0002 t where party_id in(8001,8002,8003,8004);
 ds_1 ::: select * from customer_0003 t where party_id in(8001,8002,8003,8004);
</code></pre></div>