// statement was never added
return;
}
IntKeyIntValueHashMap scsMap =
(IntKeyIntValueHashMap) sessionUseMap.get(sid);
if (scsMap == null) {
// statement already removed due to invalidation
return;
}
int sessionUseCount = scsMap.get(csid, 0);
if (sessionUseCount == 0) {
// statement already removed due to invalidation
} else if (sessionUseCount == 1 || freeAll) {
scsMap.remove(csid);
int usecount = useMap.get(csid, 0);
if (usecount == 0) {
// statement already removed due to invalidation
} else if (usecount == 1) {
CompiledStatement cs =
(CompiledStatement) csidMap.remove(csid);
if (cs != null) {
int schemaid = cs.schemaHsqlName.hashCode();
IntValueHashMap sqlMap =
(IntValueHashMap) schemaMap.get(schemaid);
String sql = (String) sqlLookup.remove(csid);
sqlMap.remove(sql);
}
useMap.remove(csid);
} else {
useMap.put(csid, usecount - 1);
}
} else {
scsMap.put(csid, sessionUseCount - 1);
}
}