/**
* 判断一下是否采用ROW模式
*/
private void checkBinlogFormat() throws IOException {
ResultSetPacket rs = query("show variables like 'binlog_format'");
List<String> columnValues = rs.getFieldValues();
if (columnValues == null || columnValues.size() != 2
|| !StringUtils.equalsIgnoreCase("row", columnValues.get(1))) {
logger.warn("unexpected binlog format query result, this may cause unexpected result, so throw exception to request network to io shutdown.");
throw new IllegalStateException("unexpected binlog format query result:" + rs.getFieldValues());
}
}