1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 1996,2008 Oracle. All rights reserved. 5 * 6 * $Id: hash_stub.c,v 12.19 2008/01/30 12:18:22 mjc Exp $ 7 */ 8 9#ifndef HAVE_HASH 10#include "db_config.h" 11 12#include "db_int.h" 13#include "dbinc/db_page.h" 14#include "dbinc/hash.h" 15 16/* 17 * If the library wasn't compiled with the Hash access method, various 18 * routines aren't available. Stub them here, returning an appropriate 19 * error. 20 */ 21 22/* 23 * __db_nohasham -- 24 * Error when a Berkeley DB build doesn't include the access method. 25 * 26 * PUBLIC: int __db_no_hash_am __P((ENV *)); 27 */ 28int 29__db_no_hash_am(env) 30 ENV *env; 31{ 32 __db_errx(env, 33 "library build did not include support for the Hash access method"); 34 return (DB_OPNOTSUP); 35} 36 37int 38__ham_30_hashmeta(dbp, real_name, obuf) 39 DB *dbp; 40 char *real_name; 41 u_int8_t *obuf; 42{ 43 COMPQUIET(real_name, NULL); 44 COMPQUIET(obuf, NULL); 45 return (__db_no_hash_am(dbp->env)); 46} 47 48int 49__ham_30_sizefix(dbp, fhp, realname, metabuf) 50 DB *dbp; 51 DB_FH *fhp; 52 char *realname; 53 u_int8_t *metabuf; 54{ 55 COMPQUIET(fhp, NULL); 56 COMPQUIET(realname, NULL); 57 COMPQUIET(metabuf, NULL); 58 return (__db_no_hash_am(dbp->env)); 59} 60 61int 62__ham_31_hash(dbp, real_name, flags, fhp, h, dirtyp) 63 DB *dbp; 64 char *real_name; 65 u_int32_t flags; 66 DB_FH *fhp; 67 PAGE *h; 68 int *dirtyp; 69{ 70 COMPQUIET(real_name, NULL); 71 COMPQUIET(flags, 0); 72 COMPQUIET(fhp, NULL); 73 COMPQUIET(h, NULL); 74 COMPQUIET(dirtyp, NULL); 75 return (__db_no_hash_am(dbp->env)); 76} 77 78int 79__ham_31_hashmeta(dbp, real_name, flags, fhp, h, dirtyp) 80 DB *dbp; 81 char *real_name; 82 u_int32_t flags; 83 DB_FH *fhp; 84 PAGE *h; 85 int *dirtyp; 86{ 87 COMPQUIET(real_name, NULL); 88 COMPQUIET(flags, 0); 89 COMPQUIET(fhp, NULL); 90 COMPQUIET(h, NULL); 91 COMPQUIET(dirtyp, NULL); 92 return (__db_no_hash_am(dbp->env)); 93} 94 95int 96__ham_46_hash(dbp, real_name, flags, fhp, h, dirtyp) 97 DB *dbp; 98 char *real_name; 99 u_int32_t flags; 100 DB_FH *fhp; 101 PAGE *h; 102 int *dirtyp; 103{ 104 COMPQUIET(real_name, NULL); 105 COMPQUIET(flags, 0); 106 COMPQUIET(fhp, NULL); 107 COMPQUIET(h, NULL); 108 COMPQUIET(dirtyp, NULL); 109 return (__db_no_hash_am(dbp->env)); 110} 111 112int 113__ham_46_hashmeta(dbp, real_name, flags, fhp, h, dirtyp) 114 DB *dbp; 115 char *real_name; 116 u_int32_t flags; 117 DB_FH *fhp; 118 PAGE *h; 119 int *dirtyp; 120{ 121 COMPQUIET(real_name, NULL); 122 COMPQUIET(flags, 0); 123 COMPQUIET(fhp, NULL); 124 COMPQUIET(h, NULL); 125 COMPQUIET(dirtyp, NULL); 126 return (__db_no_hash_am(dbp->env)); 127} 128 129int 130__hamc_count(dbc, recnop) 131 DBC *dbc; 132 db_recno_t *recnop; 133{ 134 COMPQUIET(recnop, NULL); 135 return (__db_no_hash_am(dbc->env)); 136} 137 138int 139__hamc_dup(orig_dbc, new_dbc) 140 DBC *orig_dbc, *new_dbc; 141{ 142 COMPQUIET(new_dbc, NULL); 143 return (__db_no_hash_am(orig_dbc->env)); 144} 145 146int 147__hamc_init(dbc) 148 DBC *dbc; 149{ 150 return (__db_no_hash_am(dbc->env)); 151} 152 153int 154__ham_db_close(dbp) 155 DB *dbp; 156{ 157 COMPQUIET(dbp, NULL); 158 return (0); 159} 160 161int 162__ham_db_create(dbp) 163 DB *dbp; 164{ 165 COMPQUIET(dbp, NULL); 166 return (0); 167} 168 169int 170__ham_init_print(env, dtabp) 171 ENV *env; 172 DB_DISTAB *dtabp; 173{ 174 COMPQUIET(env, NULL); 175 COMPQUIET(dtabp, NULL); 176 return (0); 177} 178 179int 180__ham_init_recover(env, dtabp) 181 ENV *env; 182 DB_DISTAB *dtabp; 183{ 184 COMPQUIET(env, NULL); 185 COMPQUIET(dtabp, NULL); 186 return (0); 187} 188 189int 190__ham_meta2pgset(dbp, vdp, hmeta, flags, pgset) 191 DB *dbp; 192 VRFY_DBINFO *vdp; 193 HMETA *hmeta; 194 u_int32_t flags; 195 DB *pgset; 196{ 197 COMPQUIET(vdp, NULL); 198 COMPQUIET(hmeta, NULL); 199 COMPQUIET(flags, 0); 200 COMPQUIET(pgset, NULL); 201 return (__db_no_hash_am(dbp->env)); 202} 203 204int 205__ham_metachk(dbp, name, hashm) 206 DB *dbp; 207 const char *name; 208 HMETA *hashm; 209{ 210 COMPQUIET(name, NULL); 211 COMPQUIET(hashm, NULL); 212 return (__db_no_hash_am(dbp->env)); 213} 214 215int 216__ham_metagroup_42_recover(env, dbtp, lsnp, op, info) 217 ENV *env; 218 DBT *dbtp; 219 DB_LSN *lsnp; 220 db_recops op; 221 void *info; 222{ 223 COMPQUIET(dbtp, NULL); 224 COMPQUIET(lsnp, NULL); 225 COMPQUIET(op, 0); 226 COMPQUIET(info, NULL); 227 return (__db_no_hash_am(env)); 228} 229 230int 231__ham_mswap(env, pg) 232 ENV *env; 233 void *pg; 234{ 235 COMPQUIET(pg, NULL); 236 return (__db_no_hash_am(env)); 237} 238 239int 240__ham_groupalloc_42_recover(env, dbtp, lsnp, op, info) 241 ENV *env; 242 DBT *dbtp; 243 DB_LSN *lsnp; 244 db_recops op; 245 void *info; 246{ 247 COMPQUIET(dbtp, NULL); 248 COMPQUIET(lsnp, NULL); 249 COMPQUIET(op, 0); 250 COMPQUIET(info, NULL); 251 return (__db_no_hash_am(env)); 252} 253 254int 255__ham_new_file(dbp, ip, txn, fhp, name) 256 DB *dbp; 257 DB_THREAD_INFO *ip; 258 DB_TXN *txn; 259 DB_FH *fhp; 260 const char *name; 261{ 262 COMPQUIET(ip, NULL); 263 COMPQUIET(txn, NULL); 264 COMPQUIET(fhp, NULL); 265 COMPQUIET(name, NULL); 266 return (__db_no_hash_am(dbp->env)); 267} 268 269int 270__ham_new_subdb(mdbp, dbp, ip, txn) 271 DB *mdbp, *dbp; 272 DB_THREAD_INFO *ip; 273 DB_TXN *txn; 274{ 275 COMPQUIET(dbp, NULL); 276 COMPQUIET(txn, NULL); 277 COMPQUIET(ip, NULL); 278 return (__db_no_hash_am(mdbp->env)); 279} 280 281int 282__ham_open(dbp, ip, txn, name, base_pgno, flags) 283 DB *dbp; 284 DB_THREAD_INFO *ip; 285 DB_TXN *txn; 286 const char *name; 287 db_pgno_t base_pgno; 288 u_int32_t flags; 289{ 290 COMPQUIET(ip, NULL); 291 COMPQUIET(txn, NULL); 292 COMPQUIET(name, NULL); 293 COMPQUIET(base_pgno, 0); 294 COMPQUIET(flags, 0); 295 return (__db_no_hash_am(dbp->env)); 296} 297 298int 299__ham_pgin(dbp, pg, pp, cookie) 300 DB *dbp; 301 db_pgno_t pg; 302 void *pp; 303 DBT *cookie; 304{ 305 COMPQUIET(pg, 0); 306 COMPQUIET(pp, NULL); 307 COMPQUIET(cookie, NULL); 308 return (__db_no_hash_am(dbp->env)); 309} 310 311int 312__ham_pgout(dbp, pg, pp, cookie) 313 DB *dbp; 314 db_pgno_t pg; 315 void *pp; 316 DBT *cookie; 317{ 318 COMPQUIET(pg, 0); 319 COMPQUIET(pp, NULL); 320 COMPQUIET(cookie, NULL); 321 return (__db_no_hash_am(dbp->env)); 322} 323 324void 325__ham_print_cursor(dbc) 326 DBC *dbc; 327{ 328 (void)__db_no_hash_am(dbc->env); 329} 330 331int 332__ham_quick_delete(dbc) 333 DBC *dbc; 334{ 335 return (__db_no_hash_am(dbc->env)); 336} 337 338int 339__ham_reclaim(dbp, ip, txn) 340 DB *dbp; 341 DB_THREAD_INFO *ip; 342 DB_TXN *txn; 343{ 344 COMPQUIET(txn, NULL); 345 COMPQUIET(ip, NULL); 346 return (__db_no_hash_am(dbp->env)); 347} 348 349int 350__ham_salvage(dbp, vdp, pgno, h, handle, callback, flags) 351 DB *dbp; 352 VRFY_DBINFO *vdp; 353 db_pgno_t pgno; 354 PAGE *h; 355 void *handle; 356 int (*callback) __P((void *, const void *)); 357 u_int32_t flags; 358{ 359 COMPQUIET(vdp, NULL); 360 COMPQUIET(pgno, 0); 361 COMPQUIET(h, NULL); 362 COMPQUIET(handle, NULL); 363 COMPQUIET(callback, NULL); 364 COMPQUIET(flags, 0); 365 return (__db_no_hash_am(dbp->env)); 366} 367 368int 369__ham_stat(dbc, spp, flags) 370 DBC *dbc; 371 void *spp; 372 u_int32_t flags; 373{ 374 COMPQUIET(spp, NULL); 375 COMPQUIET(flags, 0); 376 return (__db_no_hash_am(dbc->env)); 377} 378 379int 380__ham_stat_print(dbc, flags) 381 DBC *dbc; 382 u_int32_t flags; 383{ 384 COMPQUIET(flags, 0); 385 return (__db_no_hash_am(dbc->env)); 386} 387 388int 389__ham_truncate(dbc, countp) 390 DBC *dbc; 391 u_int32_t *countp; 392{ 393 COMPQUIET(dbc, NULL); 394 COMPQUIET(countp, NULL); 395 return (__db_no_hash_am(dbc->env)); 396} 397 398int 399__ham_vrfy(dbp, vdp, h, pgno, flags) 400 DB *dbp; 401 VRFY_DBINFO *vdp; 402 PAGE *h; 403 db_pgno_t pgno; 404 u_int32_t flags; 405{ 406 COMPQUIET(vdp, NULL); 407 COMPQUIET(h, NULL); 408 COMPQUIET(pgno, 0); 409 COMPQUIET(flags, 0); 410 return (__db_no_hash_am(dbp->env)); 411} 412 413int 414__ham_vrfy_hashing(dbp, nentries, m, thisbucket, pgno, flags, hfunc) 415 DB *dbp; 416 u_int32_t nentries; 417 HMETA *m; 418 u_int32_t thisbucket; 419 db_pgno_t pgno; 420 u_int32_t flags; 421 u_int32_t (*hfunc) __P((DB *, const void *, u_int32_t)); 422{ 423 COMPQUIET(nentries, 0); 424 COMPQUIET(m, NULL); 425 COMPQUIET(thisbucket, 0); 426 COMPQUIET(pgno, 0); 427 COMPQUIET(flags, 0); 428 COMPQUIET(hfunc, NULL); 429 return (__db_no_hash_am(dbp->env)); 430} 431 432int 433__ham_vrfy_meta(dbp, vdp, m, pgno, flags) 434 DB *dbp; 435 VRFY_DBINFO *vdp; 436 HMETA *m; 437 db_pgno_t pgno; 438 u_int32_t flags; 439{ 440 COMPQUIET(vdp, NULL); 441 COMPQUIET(m, NULL); 442 COMPQUIET(pgno, 0); 443 COMPQUIET(flags, 0); 444 return (__db_no_hash_am(dbp->env)); 445} 446 447int 448__ham_vrfy_structure(dbp, vdp, meta_pgno, flags) 449 DB *dbp; 450 VRFY_DBINFO *vdp; 451 db_pgno_t meta_pgno; 452 u_int32_t flags; 453{ 454 COMPQUIET(vdp, NULL); 455 COMPQUIET(meta_pgno, 0); 456 COMPQUIET(flags, 0); 457 return (__db_no_hash_am(dbp->env)); 458} 459#endif /* !HAVE_HASH */ 460