From 3ce9a9a3930f5a59442af87d4ac31d0829f337ce Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 23 Jun 2020 05:49:50 +0000 Subject: [PATCH] [core] fix long sql stmts may be skipped, introduced in 2e88c67c9de5452c7e442d8e7fd35ca0172ad569 in 2009 --- src/switch_core_sqldb.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c index 7bf612b7d5..3ce7fae8fb 100644 --- a/src/switch_core_sqldb.c +++ b/src/switch_core_sqldb.c @@ -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; }