This commit is contained in:
@ -159,16 +159,14 @@ public abstract class AbstractInsertExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkStrictMode() {
|
||||
private void checkStrictMode() throws Exception {
|
||||
// if in strict mode, insert will fail if there are filtered rows
|
||||
if (ctx.getSessionVariable().getEnableInsertStrict()) {
|
||||
if (filteredRows > 0) {
|
||||
ctx.getState().setError(ErrorCode.ERR_FAILED_WHEN_INSERT,
|
||||
"Insert has filtered data in strict mode, tracking_url=" + coordinator.getTrackingUrl());
|
||||
return false;
|
||||
ErrorReport.reportDdlException("Insert has filtered data in strict mode",
|
||||
ErrorCode.ERR_FAILED_WHEN_INSERT);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -178,9 +176,7 @@ public abstract class AbstractInsertExecutor {
|
||||
beforeExec();
|
||||
try {
|
||||
execImpl(executor, jobId);
|
||||
if (!checkStrictMode()) {
|
||||
return;
|
||||
}
|
||||
checkStrictMode();
|
||||
onComplete();
|
||||
} catch (Throwable t) {
|
||||
onFail(t);
|
||||
|
||||
Reference in New Issue
Block a user