-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blob处理有有缺陷 #1192
Comments
可以提供完整的复现场景? |
很容易的。建立一个table,有一列是blob,存储一个png图像。然后就可以重现了。
|
用X'十六进制' 这种形式可以 或者使用1.6的server端预编译 |
预编译怎么处理?能否详细告知一下。 |
谢谢楼上各位。 |
希望能有志愿者来实现 |
预编译只是一个全局的开关 开启即可 比如jdbc'就是url里加个参数 |
这个问题也可以把 blob 使用 base64 编码一下再存储,就可以绕开这个 bug |
您好,请问一下,activiti和mycat出现的Blob问题,您解决了吗?解决的话,求指教~~~ |
JDBCURL中增加 useServerPrepStmts=true |
在存储blob数据的时候,mycat先将byte[]转行为utf8 string,然后再转换为byte[],如果blob中存在特殊字符,如byte=-119,转行为string,然后再转换为byte的时候,byte的字节长度为3了。
byte[] data = new byte[]{-119};
String s = new String(data,"utf-8");
System.out.println(s);
byte[] ndata = s.getBytes("utf-8");
System.out.println("weird:"+data.length+" : "+ndata.length);
String s1 = new String(ndata,"utf-8");
System.out.println(s1);
这样导致存储到数据库中的数据库错误。读出来也是错误的。
The text was updated successfully, but these errors were encountered: