[CONJ-159] Rewrite batch is broken for prepared statements for binary data Created: 2015-05-29 Updated: 2015-06-23 Resolved: 2015-06-23 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 1.1.8 |
| Fix Version/s: | 1.1.9 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Vladislav Vaintroub | Assignee: | Diego Dupin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | 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") converts into |
| Comments |
| Comment by Andy Shulman [ 2015-06-13 ] |
|
How is this issue just buried on the bug tracker with no warnings anywhere else? You have a legitimate data corruption bug. I have over a month's worth of binary data that I cannot recover because I have '0x63's all over the place. "I believe prepared statements can do without rewriteBatch for a while". That may be, but you need to disable rewriteBatch, not just let users data be silently corrupted. |
| Comment by Vladislav Vaintroub [ 2015-06-13 ] |
|
Andy, to avoid misunderstandings, I, the bug reporter, am not on the team for almost 2 years. I can file a bug or two, or might comment on what current team members are doing, but ultimately I have no power to warn users about data corruption issues. |
| Comment by Andy Shulman [ 2015-06-13 ] |
|
My comment was not addressed at you, and I apologize if you felt like it was. Even if you were still actively working on the code, the responsibility would still not be solely yours. |
| Comment by Vladislav Vaintroub [ 2015-06-13 ] |
|
Changing prio to Critical, in attempt to gain some attention from Georg , or Diego |
| Comment by Diego Dupin [ 2015-06-20 ] |
|
This has been seen during correction of |