private void drop() throws StandardException
{
//
//Like create table we say we are writing before we read the dd
dd.startWriting(lcc);
FileInfoDescriptor fid = getInfo();
if (fid == null)
throw StandardException.newException(SQLState.LANG_FILE_DOES_NOT_EXIST, sqlName,schemaName);
String dbcp_s = PropertyUtil.getServiceProperty(lcc.getTransactionExecute(),Property.DATABASE_CLASSPATH);
if (dbcp_s != null)
{
String[][]dbcp= IdUtil.parseDbClassPath(dbcp_s,
lcc.getIdentifierCasing() != lcc.ANTI_ANSI_CASING );
boolean found = false;
//
//Look for the jar we are dropping on our database classpath.
//We don't concern ourselves with 3 part names since they may
//refer to a jar file in another database and may not occur in
//a database classpath that is stored in the propert congomerate.
for (int ix=0;ix<dbcp.length;ix++)
if (dbcp.length == 2 &&
dbcp[ix][0].equals(schemaName) && dbcp[ix][1].equals(sqlName))
found = true;
if (found)
throw StandardException.newException(SQLState.LANG_CANT_DROP_JAR_ON_DB_CLASS_PATH_DURING_EXECUTION,
IdUtil.mkQualifiedName(schemaName,sqlName),
dbcp_s);
}
try {
notifyLoader(false);
dd.invalidateAllSPSPlans();
DependencyManager dm = dd.getDependencyManager();
dm.invalidateFor(fid, DependencyManager.DROP_JAR, lcc);
dd.dropFileInfoDescriptor(fid);
fr.remove(JarUtil.mkExternalName(schemaName, sqlName, fr.getSeparatorChar()),
fid.getGenerationId());
} finally {
notifyLoader(true);
}
}