apply patch with closing prepared statements

git-svn-id: https://osmand.googlecode.com/svn/trunk@718 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-11-28 23:00:45 +00:00
parent b971af6284
commit e0e262d5a4

View file

@ -1665,7 +1665,9 @@ public class IndexCreator {
private void processingLowLevelWays(IProgress progress) throws SQLException {
restrictionsUse.clear();
mapLowLevelBinaryStat.executeBatch();
pStatements.put(mapLowLevelBinaryStat, 0);
mapLowLevelBinaryStat.close();
pStatements.remove(mapLowLevelBinaryStat);
mapLowLevelBinaryStat = null;
mapConnection.commit();
PreparedStatement startStat = mapConnection.prepareStatement("SELECT id, start_node, end_node, nodes FROM "
@ -1964,6 +1966,10 @@ public class IndexCreator {
writer.endWriteAddressIndex();
writer.flush();
streetstat.close();
if (readWayNodes) {
waynodesStat.close();
}
}
@ -1994,6 +2000,7 @@ public class IndexCreator {
writer.endWriteMapLevelIndex();
}
}
selectData.close();
writer.writeMapEncodingRules(MapRenderingTypes.getEncodingRuleTypes());
writer.endWriteMapIndex();
writer.flush();
@ -2116,6 +2123,7 @@ public class IndexCreator {
}
rs.close();
selectTransportRouteData.close();
selectTransportData.close();
writer.endWriteTransportRoutes();
PreparedStatement selectTransportStop = mapConnection.prepareStatement(
@ -2131,6 +2139,8 @@ public class IndexCreator {
transportRoutes, stringTable);
writer.endWriteTransportTreeElement();
}
selectTransportStop.close();
selectTransportRouteStop.close();
writer.writeTransportStringTable(stringTable);