<h2 dir="auto">Question</h2>
<p dir="auto">In our application, there are some uses of "select ...... for update", when we use sharding-jdbc, these sqls is routed to the slave datasource, which is set read-only, and thus these sqls cannot be exeucted. We solve the problem by using HintManager and setMasterRouteOnly。</p>
<p dir="auto"><strong>My question is, why sharding-jdbc do not route "select ...... for update" to master datasouce by default?</strong></p>
<p dir="auto">When I insert data into a field of text type in the database, I report the following error. It seems that sharding has rewritten this field. How to solve this problem?</p>
<p dir="auto">java.io.NotSerializableException: java.io.StringReader<br>
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184)<br>
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348)<br>
at com.mysql.jdbc.PreparedStatement.setSerializableObject(PreparedStatement.java:3824)<br>
at io.shardingsphere.shardingjdbc.jdbc.adapter.invocation.JdbcMethodInvocation.invoke(JdbcMethodInvocation.java:47)<br>
at io.shardingsphere.shardingjdbc.jdbc.adapter.AbstractShardingPreparedStatementAdapter.replaySetParameter(AbstractShardingPreparedStatementAdapter.java:264)<br>
at io.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.setParametersForStatements(ShardingPreparedStatement.java:194)<br>
at io.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.initPreparedStatementExecutor(ShardingPreparedStatement.java:189)<br>
at io.shardingsphere.shardingjdbc.jdbc.core.statement.ShardingPreparedStatement.execute(ShardingPreparedStatement.java:136)</p>