Skip to content

Commit 04f8d49

Browse files
committed
fix bugs exposed by adding array test
1 parent 13648df commit 04f8d49

File tree

1 file changed

+5
-0
lines changed
  • src/main/java/com/github/shyiko/mysql/binlog/event/deserialization/json

1 file changed

+5
-0
lines changed

src/main/java/com/github/shyiko/mysql/binlog/event/deserialization/json/JsonBinary.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ protected void parseObject(boolean small, JsonFormatter formatter)
470470
// checkstyle, please ignore MethodLength for the next line
471471
protected void parseArray(boolean small, JsonFormatter formatter)
472472
throws IOException {
473+
int arrayOffset = this.reader.getPosition();
474+
473475
// Read the header ...
474476
int numElements = readUnsignedIndex(Integer.MAX_VALUE, small, "number of elements in");
475477
int numBytes = readUnsignedIndex(Integer.MAX_VALUE, small, "size of");
@@ -534,6 +536,9 @@ protected void parseArray(boolean small, JsonFormatter formatter)
534536
}
535537
} else {
536538
// Parse the value ...
539+
this.reader.reset();
540+
this.reader.skip(arrayOffset + entry.index);
541+
537542
parse(entry.type, formatter);
538543
}
539544
}

0 commit comments

Comments
 (0)