// ODBC SHORTANSI -- the actual MPLoc is encoded in the schName // using underscore delimiters, i.e. "systemName_volumeName_subvolName". // We make a real MPLoc out of that. NABoolean QualifiedName::applyShortAnsiDefault(NAString& catName, NAString& schName) const { ComMPLoc loc; loc.parse(schName, ComMPLoc::SUBVOL, TRUE/*SHORTANSI*/); if (loc.isValid(ComMPLoc::SUBVOL)) { catName = loc.getSysDotVol(); schName = loc.getSubvolName(); return TRUE; } //else schName actually was a real Ansi schema, //so we return cat & schName unchanged. //## Is this the desired behavior, or does this represent an undetected error? return FALSE; }
CharInfo::Collation CollationDB::insert(ComMPLoc &loc, const ComMPLoc *defaultMPLoc, CollationInfo::CollationFlags flags) { Int32 defaultMatchCount = 0; if (defaultMPLoc) defaultMatchCount = loc.applyDefaults(*defaultMPLoc); CMPASSERT(loc.isValid(ComMPLoc::FILE)); size_t siz[CollationInfo::SIZEARRAY_SIZE]; NAString nam(loc.getMPName(siz)); CMPASSERT(siz[0] == 3 || siz[0] == 4); // was defaulted out to $vol or \sys return insert(nam, siz, flags, defaultMatchCount); }