Lines Matching defs:db
343 dbinstance_t *db = NULL;
349 db = isc_mem_get(mctx, sizeof(dbinstance_t));
350 if (db == NULL) {
357 memset(db, 0, sizeof(dbinstance_t));
358 db->dbconn = NULL;
359 db->client = NULL;
360 db->record = NULL;
361 db->zone = NULL;
362 db->mctx = NULL;
363 db->query_buf = NULL;
364 db->allnodes_q = NULL;
365 db->allowxfr_q = NULL;
366 db->authority_q = NULL;
367 db->findzone_q = NULL;
368 db->countzone_q = NULL;
369 db->lookup_q = NULL;
372 isc_mem_attach(mctx, &db->mctx);
375 result = isc_mutex_init(&db->instance_lock);
384 result = build_querylist(mctx, allnodes_str, &db->zone,
385 &db->record, &db->client,
386 &db->allnodes_q, SDLZH_REQUIRE_ZONE);
396 result = build_querylist(mctx, allowxfr_str, &db->zone,
397 &db->record, &db->client,
398 &db->allowxfr_q,
409 result = build_querylist(mctx, authority_str, &db->zone,
410 &db->record, &db->client,
411 &db->authority_q, SDLZH_REQUIRE_ZONE);
421 result = build_querylist(mctx, findzone_str, &db->zone,
422 &db->record, &db->client,
423 &db->findzone_q, SDLZH_REQUIRE_ZONE);
433 result = build_querylist(mctx, countzone_str, &db->zone,
434 &db->record, &db->client,
435 &db->countzone_q, SDLZH_REQUIRE_ZONE);
445 result = build_querylist(mctx, lookup_str, &db->zone,
446 &db->record, &db->client,
447 &db->lookup_q, SDLZH_REQUIRE_RECORD);
456 /* pass back the db instance */
457 *dbi = (dbinstance_t *) db;
463 /* destroy whatever was build of the db instance */
464 destroy_sqldbinstance(db);