fix load data hang (#2323)

This commit is contained in:
Collapsar
2020-11-25 19:05:49 +08:00
committed by GitHub
parent a31dc696bd
commit 9cbd98516c
2 changed files with 6 additions and 3 deletions
@@ -617,8 +617,9 @@ public class MySQLResponseService extends VariablesService {
if (synSQL != null) {
sendQueryCmd(synSQL.toString(), service.getCharset());
}
prepareOK = originPacket[4] == MySQLPacket.COM_STMT_PREPARE;
if (originPacket.length > 4) {
prepareOK = originPacket[4] == MySQLPacket.COM_STMT_PREPARE;
}
writeDirectly(originPacket);
}
}
@@ -87,7 +87,9 @@ public class RWSplitService extends BusinessService {
protected void handleInnerData(byte[] data) {
// if the statement is load data, directly push down
if (inLoadData) {
session.execute(true, data, null);
session.execute(true, data, (isSuccess, rwSplitService) -> {
rwSplitService.setInLoadData(false);
});
return;
}