MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / setInternalFlags

Method setInternalFlags

src/jrd/Mapping.cpp:1362–1390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1360}
1361
1362void Mapping::setInternalFlags()
1363{
1364 internalFlags &= ~(FLAG_DB | FLAG_SEC);
1365
1366 if (!mainDb)
1367 internalFlags |= FLAG_DB;
1368 if (!securityAlias)
1369 internalFlags |= FLAG_SEC;
1370
1371 // detect presence of non-plugin databases mapping in authBlock
1372 // in that case mapUser was already invoked for it
1373 if (authBlock)
1374 {
1375 AuthReader::Info info;
1376 for (AuthReader rdr(*authBlock); rdr.getInfo(info); rdr.moveNext())
1377 {
1378 MAP_DEBUG(fprintf(stderr, "info.plugin=%s info.secDb=%s db=%s securityDb=%s\n",
1379 info.plugin.c_str(), info.secDb.c_str(), mainDb ? mainDb : "NULL", secExpanded.c_str()));
1380
1381 if (info.plugin.isEmpty())
1382 {
1383 if (mainDb && info.secDb == mainDb)
1384 internalFlags |= FLAG_DB;
1385 if (securityAlias && info.secDb == secExpanded.c_str())
1386 internalFlags |= FLAG_SEC;
1387 }
1388 }
1389 }
1390}
1391
1392void Mapping::setSqlRole(const Firebird::string& role)
1393{

Callers

nothing calls this directly

Calls 4

getInfoMethod · 0.45
moveNextMethod · 0.45
c_strMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected