add db in context in old SQL executor
@@ -45,7 +45,6 @@ import com.orientechnologies.orient.core.db.record.OIdentifiable;
import com.orientechnologies.orient.core.db.record.ridbag.ORidBag;
import com.orientechnologies.orient.core.exception.OCommandExecutionException;
import com.orientechnologies.orient.core.exception.OQueryParsingException;
-import com.orientechnologies.orient.core.hook.ORecordHook;
import com.orientechnologies.orient.core.id.OContextualRecordId;
import com.orientechnologies.orient.core.id.ORID;
import com.orientechnologies.orient.core.id.ORecordId;
@@ -1523,6 +1522,7 @@ public class OCommandExecutorSQLSelect extends OCommandExecutorSQLResultsetAbstr
public void initContext() {
if (context == null) {
context = new OBasicCommandContext();
+ ((OBasicCommandContext) context).setDatabase(getDatabase());
}
metricRecorder.setContext(context);
