[core] fix long sql stmts may be skipped, introduced in 2e88c67c9d in 2009

This commit is contained in:
Anthony Minessale
2020-06-23 05:49:50 +00:00
committed by Andrey Volk
parent 2bdefa3532
commit 3ce9a9a393
+1 -5
View File
@@ -790,12 +790,8 @@ static switch_status_t switch_cache_db_execute_sql_chunked(switch_cache_db_handl
p--;
}
if (p <= s)
break;
status = switch_cache_db_execute_sql_real(dbh, s, err);
if (status != SWITCH_STATUS_SUCCESS || (err && *err)) {
if (p <= s || status != SWITCH_STATUS_SUCCESS || (err && *err)) {
break;
}