//bug 4579 - gcDuringGetMetaData will be null if this is the first time
//getMetaData call is made.
//Second check - if the statement was revalidated since last getMetaData call,
//then gcDuringGetMetaData wouldn't match with current generated class name
GeneratedClass currAc = null;
ResultDescription resd = null;
synchronized(execp) {
// DERBY-3823 Some other thread may be repreparing
do {
while (!execp.upToDate()) {
execp.rePrepare(lcc);
}
currAc = execp.getActivationClass();
resd = execp.getResultDescription();
} while (currAc == null);
}
if (gcDuringGetMetaData == null ||
!gcDuringGetMetaData.equals(currAc.getName())) {
rMetaData = null;
gcDuringGetMetaData = currAc.getName();
}
if (rMetaData == null && resd != null) {
// Internally, the result description has information
// which is used for insert, update and delete statements