Skip to content

Column type JSON - IOException  #129

Closed
@krowinski

Description

@krowinski

Hi

Mysql 5.7

I got some problems with json column data decoding.

examples

master.execute("INSERT INTO t1 VALUES (3, '{\"a\":true, \"a\":\"b\", \"c\":\"d\",\"ab\":\"testtest\", \"bc\": [\"x\", \"y\"]}');");

Exception in thread "main" java.io.IOException: The offset for the value in the JSON binary document is 9740, which is larger than the binary form of the JSON document (63 bytes) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parseObject(JsonBinary.java:364) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parse(JsonBinary.java:216) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parse(JsonBinary.java:210) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parse(JsonBinary.java:181) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parseAsString(JsonBinary.java:168)


master.execute("INSERT INTO t1 VALUES (3, '{\"a\":\"b\", \"c\":\"d\",\"ab\":\"LONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONGLONG\", \"bc\": [\"x\", \"y\"]}');");

Exception in thread "main" java.io.EOFException at com.github.shyiko.mysql.binlog.io.ByteArrayInputStream.read(ByteArrayInputStream.java:190) at java.io.InputStream.read(InputStream.java:170) at com.github.shyiko.mysql.binlog.io.ByteArrayInputStream.fill(ByteArrayInputStream.java:96) at com.github.shyiko.mysql.binlog.io.ByteArrayInputStream.read(ByteArrayInputStream.java:89) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parseString(JsonBinary.java:629) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parse(JsonBinary.java:252) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parseObject(JsonBinary.java:398) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parse(JsonBinary.java:216) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parse(JsonBinary.java:210) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parse(JsonBinary.java:181) at com.github.shyiko.mysql.binlog.event.deserialization.json.JsonBinary.parseAsString(JsonBinary.java:168)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions