Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
1.1.8
-
None
Description
Rewrite batch is broken for prepared statements. It is broken because it uses toSQL(), which is broken because it does corrupt binary data, they are not encoded as UTF8, and thus can not be converted to string easily.
I believe prepared statements can do without rewriteBatch for a while, and also that toSQL() in its current form needs to go (it will blow memory with streams and blobs)
. A cleaner alternative for prepared batching , perhaps or the future, is to combine multiple prepared statements into large one, e.g
st1 :insert into t values( ? ) , ps.setString(1,"a")
st2 : insert into t values( ? ), ps.setString(1,"b")
converts into
insert into t values( ? ),( ? ) ; ps.setString(1,"a"); ps.setString(2,"b")