Browse Source

fixed json type cast exception

agapple 8 years ago
parent
commit
ad2a96b3f1

+ 1 - 2
dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/RowsLogBuffer.java

@@ -957,11 +957,10 @@ public final class RowsLogBuffer {
                 jsonValue.toJsonString(builder);
                 jsonValue.toJsonString(builder);
                 value = builder.toString();
                 value = builder.toString();
                 buffer.position(position + len);
                 buffer.position(position + len);
-
                 // byte[] binary = new byte[len];
                 // byte[] binary = new byte[len];
                 // buffer.fillBytes(binary, 0, len);
                 // buffer.fillBytes(binary, 0, len);
                 // value = binary;
                 // value = binary;
-                javaType = Types.VARBINARY;
+                javaType = Types.VARCHAR;
                 length = len;
                 length = len;
                 break;
                 break;
             }
             }