diff --git a/core/src/main/java/com/orientechnologies/orient/core/sql/query/OSQLSynchQuery.java b/core/src/main/java/com/orientechnologies/orient/core/sql/query/OSQLSynchQuery.java
index <HASH>..<HASH> 100755
--- a/core/src/main/java/com/orientechnologies/orient/core/sql/query/OSQLSynchQuery.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/sql/query/OSQLSynchQuery.java
@@ -84,6 +84,8 @@ public class OSQLSynchQuery<T extends Object> extends OSQLAsynchQuery<T> impleme
         result.add((T) r);

     }

 

+    ((OResultSet) result).setCompleted();

+

     if (!result.isEmpty()) {

       previousQueryParams = new HashMap<Object, Object>(queryParams);

       final ORID lastRid = ((OIdentifiable) result.get(result.size() - 1)).getIdentity();
Fixed issue when query was frozen on sharding