1/*- 2 * See the file LICENSE for redistribution information. 3 * 4 * Copyright (c) 1996-2009 Oracle. All rights reserved. 5 * 6 * $Id$ 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_cmp(dbc, other_dbc, result) 131 DBC *dbc, *other_dbc; 132 int *result; 133{ 134 COMPQUIET(other_dbc, NULL); 135 COMPQUIET(result, NULL); 136 return (__db_no_hash_am(dbc->env)); 137} 138 139int 140__hamc_count(dbc, recnop) 141 DBC *dbc; 142 db_recno_t *recnop; 143{ 144 COMPQUIET(recnop, NULL); 145 return (__db_no_hash_am(dbc->env)); 146} 147 148int 149__hamc_dup(orig_dbc, new_dbc) 150 DBC *orig_dbc, *new_dbc; 151{ 152 COMPQUIET(new_dbc, NULL); 153 return (__db_no_hash_am(orig_dbc->env)); 154} 155 156int 157__hamc_init(dbc) 158 DBC *dbc; 159{ 160 return (__db_no_hash_am(dbc->env)); 161} 162 163int 164__ham_db_close(dbp) 165 DB *dbp; 166{ 167 COMPQUIET(dbp, NULL); 168 return (0); 169} 170 171int 172__ham_db_create(dbp) 173 DB *dbp; 174{ 175 COMPQUIET(dbp, NULL); 176 return (0); 177} 178 179int 180__ham_init_print(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_init_recover(env, dtabp) 191 ENV *env; 192 DB_DISTAB *dtabp; 193{ 194 COMPQUIET(env, NULL); 195 COMPQUIET(dtabp, NULL); 196 return (0); 197} 198 199int 200__ham_meta2pgset(dbp, vdp, hmeta, flags, pgset) 201 DB *dbp; 202 VRFY_DBINFO *vdp; 203 HMETA *hmeta; 204 u_int32_t flags; 205 DB *pgset; 206{ 207 COMPQUIET(vdp, NULL); 208 COMPQUIET(hmeta, NULL); 209 COMPQUIET(flags, 0); 210 COMPQUIET(pgset, NULL); 211 return (__db_no_hash_am(dbp->env)); 212} 213 214int 215__ham_metachk(dbp, name, hashm) 216 DB *dbp; 217 const char *name; 218 HMETA *hashm; 219{ 220 COMPQUIET(name, NULL); 221 COMPQUIET(hashm, NULL); 222 return (__db_no_hash_am(dbp->env)); 223} 224 225int 226__ham_metagroup_42_recover(env, dbtp, lsnp, op, info) 227 ENV *env; 228 DBT *dbtp; 229 DB_LSN *lsnp; 230 db_recops op; 231 void *info; 232{ 233 COMPQUIET(dbtp, NULL); 234 COMPQUIET(lsnp, NULL); 235 COMPQUIET(op, (db_recops)0); 236 COMPQUIET(info, NULL); 237 return (__db_no_hash_am(env)); 238} 239 240int 241__ham_mswap(env, pg) 242 ENV *env; 243 void *pg; 244{ 245 COMPQUIET(pg, NULL); 246 return (__db_no_hash_am(env)); 247} 248 249int 250__ham_groupalloc_42_recover(env, dbtp, lsnp, op, info) 251 ENV *env; 252 DBT *dbtp; 253 DB_LSN *lsnp; 254 db_recops op; 255 void *info; 256{ 257 COMPQUIET(dbtp, NULL); 258 COMPQUIET(lsnp, NULL); 259 COMPQUIET(op, (db_recops)0); 260 COMPQUIET(info, NULL); 261 return (__db_no_hash_am(env)); 262} 263 264int 265__ham_new_file(dbp, ip, txn, fhp, name) 266 DB *dbp; 267 DB_THREAD_INFO *ip; 268 DB_TXN *txn; 269 DB_FH *fhp; 270 const char *name; 271{ 272 COMPQUIET(ip, NULL); 273 COMPQUIET(txn, NULL); 274 COMPQUIET(fhp, NULL); 275 COMPQUIET(name, NULL); 276 return (__db_no_hash_am(dbp->env)); 277} 278 279int 280__ham_new_subdb(mdbp, dbp, ip, txn) 281 DB *mdbp, *dbp; 282 DB_THREAD_INFO *ip; 283 DB_TXN *txn; 284{ 285 COMPQUIET(dbp, NULL); 286 COMPQUIET(txn, NULL); 287 COMPQUIET(ip, NULL); 288 return (__db_no_hash_am(mdbp->env)); 289} 290 291int 292__ham_open(dbp, ip, txn, name, base_pgno, flags) 293 DB *dbp; 294 DB_THREAD_INFO *ip; 295 DB_TXN *txn; 296 const char *name; 297 db_pgno_t base_pgno; 298 u_int32_t flags; 299{ 300 COMPQUIET(ip, NULL); 301 COMPQUIET(txn, NULL); 302 COMPQUIET(name, NULL); 303 COMPQUIET(base_pgno, 0); 304 COMPQUIET(flags, 0); 305 return (__db_no_hash_am(dbp->env)); 306} 307 308int 309__ham_pgin(dbp, pg, pp, cookie) 310 DB *dbp; 311 db_pgno_t pg; 312 void *pp; 313 DBT *cookie; 314{ 315 COMPQUIET(pg, 0); 316 COMPQUIET(pp, NULL); 317 COMPQUIET(cookie, NULL); 318 return (__db_no_hash_am(dbp->env)); 319} 320 321int 322__ham_pgout(dbp, pg, pp, cookie) 323 DB *dbp; 324 db_pgno_t pg; 325 void *pp; 326 DBT *cookie; 327{ 328 COMPQUIET(pg, 0); 329 COMPQUIET(pp, NULL); 330 COMPQUIET(cookie, NULL); 331 return (__db_no_hash_am(dbp->env)); 332} 333 334void 335__ham_print_cursor(dbc) 336 DBC *dbc; 337{ 338 (void)__db_no_hash_am(dbc->env); 339} 340 341int 342__ham_quick_delete(dbc) 343 DBC *dbc; 344{ 345 return (__db_no_hash_am(dbc->env)); 346} 347 348int 349__ham_reclaim(dbp, ip, txn) 350 DB *dbp; 351 DB_THREAD_INFO *ip; 352 DB_TXN *txn; 353{ 354 COMPQUIET(txn, NULL); 355 COMPQUIET(ip, NULL); 356 return (__db_no_hash_am(dbp->env)); 357} 358 359int 360__ham_salvage(dbp, vdp, pgno, h, handle, callback, flags) 361 DB *dbp; 362 VRFY_DBINFO *vdp; 363 db_pgno_t pgno; 364 PAGE *h; 365 void *handle; 366 int (*callback) __P((void *, const void *)); 367 u_int32_t flags; 368{ 369 COMPQUIET(vdp, NULL); 370 COMPQUIET(pgno, 0); 371 COMPQUIET(h, NULL); 372 COMPQUIET(handle, NULL); 373 COMPQUIET(callback, NULL); 374 COMPQUIET(flags, 0); 375 return (__db_no_hash_am(dbp->env)); 376} 377 378int 379__ham_stat(dbc, spp, flags) 380 DBC *dbc; 381 void *spp; 382 u_int32_t flags; 383{ 384 COMPQUIET(spp, NULL); 385 COMPQUIET(flags, 0); 386 return (__db_no_hash_am(dbc->env)); 387} 388 389int 390__ham_stat_print(dbc, flags) 391 DBC *dbc; 392 u_int32_t flags; 393{ 394 COMPQUIET(flags, 0); 395 return (__db_no_hash_am(dbc->env)); 396} 397 398int 399__ham_truncate(dbc, countp) 400 DBC *dbc; 401 u_int32_t *countp; 402{ 403 COMPQUIET(dbc, NULL); 404 COMPQUIET(countp, NULL); 405 return (__db_no_hash_am(dbc->env)); 406} 407 408int 409__ham_vrfy(dbp, vdp, h, pgno, flags) 410 DB *dbp; 411 VRFY_DBINFO *vdp; 412 PAGE *h; 413 db_pgno_t pgno; 414 u_int32_t flags; 415{ 416 COMPQUIET(vdp, NULL); 417 COMPQUIET(h, NULL); 418 COMPQUIET(pgno, 0); 419 COMPQUIET(flags, 0); 420 return (__db_no_hash_am(dbp->env)); 421} 422 423int 424__ham_vrfy_hashing(dbc, nentries, m, thisbucket, pgno, flags, hfunc) 425 DBC *dbc; 426 u_int32_t nentries; 427 HMETA *m; 428 u_int32_t thisbucket; 429 db_pgno_t pgno; 430 u_int32_t flags; 431 u_int32_t (*hfunc) __P((DB *, const void *, u_int32_t)); 432{ 433 COMPQUIET(nentries, 0); 434 COMPQUIET(m, NULL); 435 COMPQUIET(thisbucket, 0); 436 COMPQUIET(pgno, 0); 437 COMPQUIET(flags, 0); 438 COMPQUIET(hfunc, NULL); 439 return (__db_no_hash_am(dbc->dbp->env)); 440} 441 442int 443__ham_vrfy_meta(dbp, vdp, m, pgno, flags) 444 DB *dbp; 445 VRFY_DBINFO *vdp; 446 HMETA *m; 447 db_pgno_t pgno; 448 u_int32_t flags; 449{ 450 COMPQUIET(vdp, NULL); 451 COMPQUIET(m, NULL); 452 COMPQUIET(pgno, 0); 453 COMPQUIET(flags, 0); 454 return (__db_no_hash_am(dbp->env)); 455} 456 457int 458__ham_vrfy_structure(dbp, vdp, meta_pgno, flags) 459 DB *dbp; 460 VRFY_DBINFO *vdp; 461 db_pgno_t meta_pgno; 462 u_int32_t flags; 463{ 464 COMPQUIET(vdp, NULL); 465 COMPQUIET(meta_pgno, 0); 466 COMPQUIET(flags, 0); 467 return (__db_no_hash_am(dbp->env)); 468} 469#endif /* !HAVE_HASH */ 470