Db.java 26.6 KB
Newer Older
1 2 3
/*-
 * See the file LICENSE for redistribution information.
 *
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
4 5
 * Copyright (c) 1997-2002
 *      Sleepycat Software.  All rights reserved.
6
 *
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
7
 * $Id: Db.java,v 11.110 2002/09/09 20:47:31 bostic Exp $
8 9 10 11 12 13 14 15 16 17 18 19 20
 */

package com.sleepycat.db;

import java.io.OutputStream;
import java.io.FileNotFoundException;

/**
 *
 * @author Donald D. Anderson
 */
public class Db
{
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
    // BEGIN-JAVA-SPECIAL-CONSTANTS
    /* DO NOT EDIT: automatically built by dist/s_java. */
    public static final int DB_BTREE = 1;
    public static final int DB_DONOTINDEX = -30999;
    public static final int DB_HASH = 2;
    public static final int DB_KEYEMPTY = -30998;
    public static final int DB_KEYEXIST = -30997;
    public static final int DB_LOCK_DEADLOCK = -30996;
    public static final int DB_LOCK_NOTGRANTED = -30995;
    public static final int DB_NOSERVER = -30994;
    public static final int DB_NOSERVER_HOME = -30993;
    public static final int DB_NOSERVER_ID = -30992;
    public static final int DB_NOTFOUND = -30991;
    public static final int DB_OLD_VERSION = -30990;
    public static final int DB_PAGE_NOTFOUND = -30989;
    public static final int DB_QUEUE = 4;
    public static final int DB_RECNO = 3;
    public static final int DB_REP_DUPMASTER = -30988;
    public static final int DB_REP_HOLDELECTION = -30987;
    public static final int DB_REP_NEWMASTER = -30986;
    public static final int DB_REP_NEWSITE = -30985;
    public static final int DB_REP_OUTDATED = -30984;
    public static final int DB_RUNRECOVERY = -30982;
    public static final int DB_SECONDARY_BAD = -30981;
    public static final int DB_TXN_ABORT = 0;
    public static final int DB_TXN_APPLY = 1;
    public static final int DB_TXN_BACKWARD_ROLL = 3;
    public static final int DB_TXN_FORWARD_ROLL = 4;
    public static final int DB_TXN_PRINT = 8;
    public static final int DB_UNKNOWN = 5;
    public static final int DB_VERIFY_BAD = -30980;
    public static final int DB_AFTER;
    public static final int DB_AGGRESSIVE;
    public static final int DB_APPEND;
    public static final int DB_ARCH_ABS;
    public static final int DB_ARCH_DATA;
    public static final int DB_ARCH_LOG;
    public static final int DB_AUTO_COMMIT;
    public static final int DB_BEFORE;
    public static final int DB_CACHED_COUNTS;
    public static final int DB_CDB_ALLDB;
    public static final int DB_CHKSUM_SHA1;
    public static final int DB_CLIENT;
    public static final int DB_CONSUME;
    public static final int DB_CONSUME_WAIT;
    public static final int DB_CREATE;
    public static final int DB_CURRENT;
    public static final int DB_CXX_NO_EXCEPTIONS;
69 70 71 72
    public static final int DB_DBT_MALLOC;
    public static final int DB_DBT_PARTIAL;
    public static final int DB_DBT_REALLOC;
    public static final int DB_DBT_USERMEM;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194
    public static final int DB_DIRECT;
    public static final int DB_DIRECT_DB;
    public static final int DB_DIRECT_LOG;
    public static final int DB_DIRTY_READ;
    public static final int DB_DUP;
    public static final int DB_DUPSORT;
    public static final int DB_EID_BROADCAST;
    public static final int DB_EID_INVALID;
    public static final int DB_ENCRYPT;
    public static final int DB_ENCRYPT_AES;
    public static final int DB_EXCL;
    public static final int DB_FAST_STAT;
    public static final int DB_FIRST;
    public static final int DB_FLUSH;
    public static final int DB_FORCE;
    public static final int DB_GET_BOTH;
    public static final int DB_GET_BOTH_RANGE;
    public static final int DB_GET_RECNO;
    public static final int DB_INIT_CDB;
    public static final int DB_INIT_LOCK;
    public static final int DB_INIT_LOG;
    public static final int DB_INIT_MPOOL;
    public static final int DB_INIT_TXN;
    public static final int DB_JOINENV;
    public static final int DB_JOIN_ITEM;
    public static final int DB_JOIN_NOSORT;
    public static final int DB_KEYFIRST;
    public static final int DB_KEYLAST;
    public static final int DB_LAST;
    public static final int DB_LOCKDOWN;
    public static final int DB_LOCK_DEFAULT;
    public static final int DB_LOCK_EXPIRE;
    public static final int DB_LOCK_GET;
    public static final int DB_LOCK_GET_TIMEOUT;
    public static final int DB_LOCK_IREAD;
    public static final int DB_LOCK_IWR;
    public static final int DB_LOCK_IWRITE;
    public static final int DB_LOCK_MAXLOCKS;
    public static final int DB_LOCK_MINLOCKS;
    public static final int DB_LOCK_MINWRITE;
    public static final int DB_LOCK_NOWAIT;
    public static final int DB_LOCK_OLDEST;
    public static final int DB_LOCK_PUT;
    public static final int DB_LOCK_PUT_ALL;
    public static final int DB_LOCK_PUT_OBJ;
    public static final int DB_LOCK_RANDOM;
    public static final int DB_LOCK_READ;
    public static final int DB_LOCK_TIMEOUT;
    public static final int DB_LOCK_WRITE;
    public static final int DB_LOCK_YOUNGEST;
    public static final int DB_MULTIPLE;
    public static final int DB_MULTIPLE_KEY;
    public static final int DB_NEXT;
    public static final int DB_NEXT_DUP;
    public static final int DB_NEXT_NODUP;
    public static final int DB_NODUPDATA;
    public static final int DB_NOLOCKING;
    public static final int DB_NOMMAP;
    public static final int DB_NOORDERCHK;
    public static final int DB_NOOVERWRITE;
    public static final int DB_NOPANIC;
    public static final int DB_NOSYNC;
    public static final int DB_ODDFILESIZE;
    public static final int DB_ORDERCHKONLY;
    public static final int DB_OVERWRITE;
    public static final int DB_PANIC_ENVIRONMENT;
    public static final int DB_POSITION;
    public static final int DB_PREV;
    public static final int DB_PREV_NODUP;
    public static final int DB_PRINTABLE;
    public static final int DB_PRIORITY_DEFAULT;
    public static final int DB_PRIORITY_HIGH;
    public static final int DB_PRIORITY_LOW;
    public static final int DB_PRIORITY_VERY_HIGH;
    public static final int DB_PRIORITY_VERY_LOW;
    public static final int DB_PRIVATE;
    public static final int DB_RDONLY;
    public static final int DB_RECNUM;
    public static final int DB_RECORDCOUNT;
    public static final int DB_RECOVER;
    public static final int DB_RECOVER_FATAL;
    public static final int DB_REGION_INIT;
    public static final int DB_RENUMBER;
    public static final int DB_REP_CLIENT;
    public static final int DB_REP_LOGSONLY;
    public static final int DB_REP_MASTER;
    public static final int DB_REP_PERMANENT;
    public static final int DB_REP_UNAVAIL;
    public static final int DB_REVSPLITOFF;
    public static final int DB_RMW;
    public static final int DB_SALVAGE;
    public static final int DB_SET;
    public static final int DB_SET_LOCK_TIMEOUT;
    public static final int DB_SET_RANGE;
    public static final int DB_SET_RECNO;
    public static final int DB_SET_TXN_TIMEOUT;
    public static final int DB_SNAPSHOT;
    public static final int DB_STAT_CLEAR;
    public static final int DB_SYSTEM_MEM;
    public static final int DB_THREAD;
    public static final int DB_TRUNCATE;
    public static final int DB_TXN_NOSYNC;
    public static final int DB_TXN_NOWAIT;
    public static final int DB_TXN_SYNC;
    public static final int DB_TXN_WRITE_NOSYNC;
    public static final int DB_UPGRADE;
    public static final int DB_USE_ENVIRON;
    public static final int DB_USE_ENVIRON_ROOT;
    public static final int DB_VERB_CHKPOINT;
    public static final int DB_VERB_DEADLOCK;
    public static final int DB_VERB_RECOVERY;
    public static final int DB_VERB_REPLICATION;
    public static final int DB_VERB_WAITSFOR;
    public static final int DB_VERIFY;
    public static final int DB_VERSION_MAJOR;
    public static final int DB_VERSION_MINOR;
    public static final int DB_VERSION_PATCH;
    public static final int DB_WRITECURSOR;
    public static final int DB_XA_CREATE;
    public static final int DB_XIDDATASIZE;
    public static final int DB_YIELDCPU;
    // END-JAVA-SPECIAL-CONSTANTS
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219

    // Note: the env can be null
    //
    public Db(DbEnv env, int flags)
        throws DbException
    {
        constructor_env_ = env;
        _init(env, flags);
        if (env == null) {
            dbenv_ = new DbEnv(this);
        }
        else {
            dbenv_ = env;
        }
        dbenv_._add_db(this);
    }

    //
    // Our parent DbEnv is notifying us that the environment is closing.
    //
    /*package*/ void _notify_dbenv_close()
    {
        dbenv_ = null;
        _notify_internal();
    }
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
220

221 222 223 224 225 226 227 228
    private native void _init(DbEnv env, int flags)
         throws DbException;

    private native void _notify_internal();

    // methods
    //

ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
229 230 231 232 233 234 235 236 237 238 239 240 241
    public synchronized void associate(DbTxn txn, Db secondary,
                                       DbSecondaryKeyCreate key_creator,
                                       int flags)
        throws DbException
    {
        secondary.secondary_key_create_ = key_creator;
        _associate(txn, secondary, key_creator, flags);
    }

    public native void _associate(DbTxn txn, Db secondary,
                                  DbSecondaryKeyCreate key_creator, int flags)
        throws DbException;

242 243 244
    public synchronized int close(int flags)
        throws DbException
    {
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
245 246 247 248 249 250 251 252 253
        try {
            dbenv_._remove_db(this);
            return _close(flags);
        }
        finally {
            if (constructor_env_ == null) {
                dbenv_._notify_db_close();
            }
            dbenv_ = null;
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276
        }
    }

    public native int _close(int flags)
         throws DbException;

    public native Dbc cursor(DbTxn txnid, int flags)
         throws DbException;

    public native int del(DbTxn txnid, Dbt key, int flags)
         throws DbException;

    public native void err(int errcode, String message);

    public native void errx(String message);

    public native int fd()
         throws DbException;

    // overrides Object.finalize
    protected void finalize()
        throws Throwable
    {
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
277 278 279 280
        if (dbenv_ == null)
            _finalize(null, null);
        else
            _finalize(dbenv_.errcall_, dbenv_.errpfx_);
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296
    }

    protected native void _finalize(DbErrcall errcall, String errpfx)
        throws Throwable;

    // returns: 0, DB_NOTFOUND, or throws error
    public native int get(DbTxn txnid, Dbt key, Dbt data, int flags)
         throws DbException;

    public native boolean get_byteswapped();

    public native /*DBTYPE*/ int get_type();

    public native Dbc join(Dbc curslist[], int flags)
         throws DbException;

ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
297
    public native void key_range(DbTxn txnid, Dbt key,
298 299 300
                                 DbKeyRange range, int flags)
         throws DbException;

ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
301 302
    public synchronized void open(DbTxn txnid, String file,
                     String database, /*DBTYPE*/ int type,
303 304 305
                     int flags, int mode)
         throws DbException, FileNotFoundException
    {
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
306
        _open(txnid, file, database, type, flags, mode);
307
    }
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
308

309
    // (Internal)
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
310 311
    public native void _open(DbTxn txnid, String file,
                            String database, /*DBTYPE*/ int type,
312 313
                            int flags, int mode)
         throws DbException, FileNotFoundException;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
314 315 316 317 318


    // returns: 0, DB_NOTFOUND, or throws error
    public native int pget(DbTxn txnid, Dbt key, Dbt pkey, Dbt data, int flags)
         throws DbException;
319 320 321 322 323

    // returns: 0, DB_KEYEXIST, or throws error
    public native int put(DbTxn txnid, Dbt key, Dbt data, int flags)
         throws DbException;

ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
324 325 326 327 328 329 330 331 332 333 334 335 336 337
    public synchronized void rename(String file, String database,
                                    String newname, int flags)
        throws DbException, FileNotFoundException
    {
        try {
            _rename(file, database, newname, flags);
        }
        finally {
            if (constructor_env_ == null) {
                dbenv_._notify_db_close();
            }
            dbenv_ = null;
        }
    }
338

ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361
    public native void _rename(String file, String database,
                               String newname, int flags)
        throws DbException, FileNotFoundException;


    public synchronized void remove(String file,
                                           String database, int flags)
        throws DbException, FileNotFoundException
    {
        try {
            _remove(file, database, flags);
        }
        finally {
            if (constructor_env_ == null) {
                dbenv_._notify_db_close();
            }
            dbenv_ = null;
        }
    }

    public native void _remove(String file, String database,
                               int flags)
        throws DbException, FileNotFoundException;
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401

    // Comparison function.
    public void set_append_recno(DbAppendRecno append_recno)
        throws DbException
    {
        append_recno_ = append_recno;
        append_recno_changed(append_recno);
    }

    // (Internal)
    private native void append_recno_changed(DbAppendRecno append_recno)
        throws DbException;

    // Comparison function.
    public void set_bt_compare(DbBtreeCompare bt_compare)
        throws DbException
    {
        bt_compare_ = bt_compare;
        bt_compare_changed(bt_compare);
    }

    // (Internal)
    private native void bt_compare_changed(DbBtreeCompare bt_compare)
        throws DbException;

    // Maximum keys per page.
    public native void set_bt_maxkey(int maxkey)
        throws DbException;

    // Minimum keys per page.
    public native void set_bt_minkey(int minkey)
        throws DbException;

    // Prefix function.
    public void set_bt_prefix(DbBtreePrefix bt_prefix)
        throws DbException
    {
        bt_prefix_ = bt_prefix;
        bt_prefix_changed(bt_prefix);
    }
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
402

403 404 405 406 407 408 409 410
    // (Internal)
    private native void bt_prefix_changed(DbBtreePrefix bt_prefix)
        throws DbException;

    // Set cache size
    public native void set_cachesize(int gbytes, int bytes, int ncaches)
        throws DbException;

ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
411 412 413 414
    // Set cache priority
    public native void set_cache_priority(/* DB_CACHE_PRIORITY */ int priority)
        throws DbException;

415 416 417 418 419 420 421 422 423 424 425 426
    // Duplication resolution
    public void set_dup_compare(DbDupCompare dup_compare)
        throws DbException
    {
        dup_compare_ = dup_compare;
        dup_compare_changed(dup_compare);
    }

    // (Internal)
    private native void dup_compare_changed(DbDupCompare dup_compare)
        throws DbException;

ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
427 428 429 430
    // Encryption
    public native void set_encrypt(String passwd, /*u_int32_t*/ int flags)
        throws DbException;

431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450
    // Error message callback.
    public void set_errcall(DbErrcall errcall)
    {
        if (dbenv_ != null)
            dbenv_.set_errcall(errcall);
    }

    // Error stream.
    public void set_error_stream(OutputStream s)
    {
        DbOutputStreamErrcall errcall = new DbOutputStreamErrcall(s);
        set_errcall(errcall);
    }

    // Error message prefix.
    public void set_errpfx(String errpfx)
    {
        if (dbenv_ != null)
            dbenv_.set_errpfx(errpfx);
    }
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
451

452 453 454 455 456 457 458 459 460 461 462 463 464 465

    // Feedback
    public void set_feedback(DbFeedback feedback)
        throws DbException
    {
        feedback_ = feedback;
        feedback_changed(feedback);
    }

    // (Internal)
    private native void feedback_changed(DbFeedback feedback)
        throws DbException;

    // Flags.
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
466 467 468 469 470 471
    public native void set_flags(/*u_int32_t*/ int flags)
        throws DbException;

    // Internal - only intended for testing purposes in the Java RPC server
    public native int get_flags_raw()
        throws DbException;
472 473

    // Fill factor.
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
474 475
    public native void set_h_ffactor(/*unsigned*/ int h_ffactor)
        throws DbException;
476 477 478 479 480 481 482 483 484 485

    // Hash function.
    public void set_h_hash(DbHash h_hash)
        throws DbException
    {
        h_hash_ = h_hash;
        hash_changed(h_hash);
    }

    // (Internal)
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
486
    private native void hash_changed(DbHash hash)
487 488 489
        throws DbException;

    // Number of elements.
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
490 491
    public native void set_h_nelem(/*unsigned*/ int h_nelem)
        throws DbException;
492 493

    // Byte order.
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
494 495
    public native void set_lorder(int lorder)
        throws DbException;
496 497

    // Underlying page size.
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
498 499
    public native void set_pagesize(/*size_t*/ long pagesize)
        throws DbException;
500 501

    // Variable-length delimiting byte.
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
502 503
    public native void set_re_delim(int re_delim)
        throws DbException;
504 505

    // Length for fixed-length records.
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
506 507
    public native void set_re_len(/*u_int32_t*/ int re_len)
        throws DbException;
508 509

    // Fixed-length padding byte.
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
510 511
    public native void set_re_pad(int re_pad)
        throws DbException;
512 513

    // Source file name.
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
514 515
    public native void set_re_source(String re_source)
        throws DbException;
516 517

    // Extent size of Queue
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
518 519
    public native void set_q_extentsize(/*u_int32_t*/ int extent_size)
        throws DbException;
520 521 522 523 524

    // returns a DbBtreeStat or DbHashStat
    public native Object stat(int flags)
         throws DbException;

ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
525 526 527 528
    public native void sync(int flags)
         throws DbException;

    public native int truncate(DbTxn txnid, int flags)
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551
         throws DbException;

    public native void upgrade(String name, int flags)
         throws DbException;

    public native void verify(String name, String subdb,
                              OutputStream outstr, int flags)
         throws DbException;

    ////////////////////////////////////////////////////////////////
    //
    // private data
    //
    private long private_dbobj_ = 0;
    private long private_info_ = 0;
    private DbEnv dbenv_ = null;
    private DbEnv constructor_env_ = null;
    private DbFeedback feedback_ = null;
    private DbAppendRecno append_recno_ = null;
    private DbBtreeCompare bt_compare_ = null;
    private DbBtreePrefix bt_prefix_ = null;
    private DbDupCompare dup_compare_ = null;
    private DbHash h_hash_ = null;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
552
    private DbSecondaryKeyCreate secondary_key_create_ = null;
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568

    ////////////////////////////////////////////////////////////////
    //
    // static methods and data that implement
    // loading the native library and doing any
    // extra sanity checks on startup.
    //
    private static boolean already_loaded_ = false;

    public static void load_db()
    {
        if (already_loaded_)
            return;

        // An alternate library name can be specified via a property.
        //
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
569 570 571 572 573 574 575
        String override;

        if ((override = System.getProperty("sleepycat.db.libfile")) != null) {
            System.load(override);
        }
        else if ((override = System.getProperty("sleepycat.db.libname")) != null) {
            System.loadLibrary(override);
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603
        }
        else {
            String os = System.getProperty("os.name");
            if (os != null && os.startsWith("Windows")) {
                // library name is "libdb_java30.dll" (for example) on Win/*
                System.loadLibrary("libdb_java" +
                                   DbConstants.DB_VERSION_MAJOR +
                                   DbConstants.DB_VERSION_MINOR);
            }
            else {
                // library name is "libdb_java-3.0.so" (for example) on UNIX
                // Note: "db_java" isn't good enough;
                // some Unixes require us to use the explicit SONAME.
                System.loadLibrary("db_java-" +
                                   DbConstants.DB_VERSION_MAJOR + "." +
                                   DbConstants.DB_VERSION_MINOR);
            }
        }

        already_loaded_ = true;
    }

    static private native void one_time_init();

    static private void check_constant(int c1, int c2)
    {
        if (c1 != c2) {
            System.err.println("Db: constant mismatch");
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
604
            Thread.dumpStack();
605 606 607 608 609 610 611
            System.exit(1);
        }
    }

    static {
        Db.load_db();

ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
612 613 614
        // BEGIN-JAVA-CONSTANT-INITIALIZATION
        /* DO NOT EDIT: automatically built by dist/s_java. */
        DB_AFTER = DbConstants.DB_AFTER;
615
        DB_AGGRESSIVE = DbConstants.DB_AGGRESSIVE;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
616
        DB_APPEND = DbConstants.DB_APPEND;
617 618 619
        DB_ARCH_ABS = DbConstants.DB_ARCH_ABS;
        DB_ARCH_DATA = DbConstants.DB_ARCH_DATA;
        DB_ARCH_LOG = DbConstants.DB_ARCH_LOG;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
620
        DB_AUTO_COMMIT = DbConstants.DB_AUTO_COMMIT;
621 622
        DB_BEFORE = DbConstants.DB_BEFORE;
        DB_CACHED_COUNTS = DbConstants.DB_CACHED_COUNTS;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
623 624 625
        DB_CDB_ALLDB = DbConstants.DB_CDB_ALLDB;
        DB_CHKSUM_SHA1 = DbConstants.DB_CHKSUM_SHA1;
        DB_CLIENT = DbConstants.DB_CLIENT;
626 627
        DB_CONSUME = DbConstants.DB_CONSUME;
        DB_CONSUME_WAIT = DbConstants.DB_CONSUME_WAIT;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
628
        DB_CREATE = DbConstants.DB_CREATE;
629
        DB_CURRENT = DbConstants.DB_CURRENT;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646
        DB_CXX_NO_EXCEPTIONS = DbConstants.DB_CXX_NO_EXCEPTIONS;
        DB_DBT_MALLOC = DbConstants.DB_DBT_MALLOC;
        DB_DBT_PARTIAL = DbConstants.DB_DBT_PARTIAL;
        DB_DBT_REALLOC = DbConstants.DB_DBT_REALLOC;
        DB_DBT_USERMEM = DbConstants.DB_DBT_USERMEM;
        DB_DIRECT = DbConstants.DB_DIRECT;
        DB_DIRECT_DB = DbConstants.DB_DIRECT_DB;
        DB_DIRECT_LOG = DbConstants.DB_DIRECT_LOG;
        DB_DIRTY_READ = DbConstants.DB_DIRTY_READ;
        DB_DUP = DbConstants.DB_DUP;
        DB_DUPSORT = DbConstants.DB_DUPSORT;
        DB_EID_BROADCAST = DbConstants.DB_EID_BROADCAST;
        DB_EID_INVALID = DbConstants.DB_EID_INVALID;
        DB_ENCRYPT = DbConstants.DB_ENCRYPT;
        DB_ENCRYPT_AES = DbConstants.DB_ENCRYPT_AES;
        DB_EXCL = DbConstants.DB_EXCL;
        DB_FAST_STAT = DbConstants.DB_FAST_STAT;
647 648
        DB_FIRST = DbConstants.DB_FIRST;
        DB_FLUSH = DbConstants.DB_FLUSH;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
649
        DB_FORCE = DbConstants.DB_FORCE;
650
        DB_GET_BOTH = DbConstants.DB_GET_BOTH;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
651
        DB_GET_BOTH_RANGE = DbConstants.DB_GET_BOTH_RANGE;
652
        DB_GET_RECNO = DbConstants.DB_GET_RECNO;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
653 654 655 656 657 658
        DB_INIT_CDB = DbConstants.DB_INIT_CDB;
        DB_INIT_LOCK = DbConstants.DB_INIT_LOCK;
        DB_INIT_LOG = DbConstants.DB_INIT_LOG;
        DB_INIT_MPOOL = DbConstants.DB_INIT_MPOOL;
        DB_INIT_TXN = DbConstants.DB_INIT_TXN;
        DB_JOINENV = DbConstants.DB_JOINENV;
659
        DB_JOIN_ITEM = DbConstants.DB_JOIN_ITEM;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
660
        DB_JOIN_NOSORT = DbConstants.DB_JOIN_NOSORT;
661 662 663
        DB_KEYFIRST = DbConstants.DB_KEYFIRST;
        DB_KEYLAST = DbConstants.DB_KEYLAST;
        DB_LAST = DbConstants.DB_LAST;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686
        DB_LOCKDOWN = DbConstants.DB_LOCKDOWN;
        DB_LOCK_DEFAULT = DbConstants.DB_LOCK_DEFAULT;
        DB_LOCK_EXPIRE = DbConstants.DB_LOCK_EXPIRE;
        DB_LOCK_GET = DbConstants.DB_LOCK_GET;
        DB_LOCK_GET_TIMEOUT = DbConstants.DB_LOCK_GET_TIMEOUT;
        DB_LOCK_IREAD = DbConstants.DB_LOCK_IREAD;
        DB_LOCK_IWR = DbConstants.DB_LOCK_IWR;
        DB_LOCK_IWRITE = DbConstants.DB_LOCK_IWRITE;
        DB_LOCK_MAXLOCKS = DbConstants.DB_LOCK_MAXLOCKS;
        DB_LOCK_MINLOCKS = DbConstants.DB_LOCK_MINLOCKS;
        DB_LOCK_MINWRITE = DbConstants.DB_LOCK_MINWRITE;
        DB_LOCK_NOWAIT = DbConstants.DB_LOCK_NOWAIT;
        DB_LOCK_OLDEST = DbConstants.DB_LOCK_OLDEST;
        DB_LOCK_PUT = DbConstants.DB_LOCK_PUT;
        DB_LOCK_PUT_ALL = DbConstants.DB_LOCK_PUT_ALL;
        DB_LOCK_PUT_OBJ = DbConstants.DB_LOCK_PUT_OBJ;
        DB_LOCK_RANDOM = DbConstants.DB_LOCK_RANDOM;
        DB_LOCK_READ = DbConstants.DB_LOCK_READ;
        DB_LOCK_TIMEOUT = DbConstants.DB_LOCK_TIMEOUT;
        DB_LOCK_WRITE = DbConstants.DB_LOCK_WRITE;
        DB_LOCK_YOUNGEST = DbConstants.DB_LOCK_YOUNGEST;
        DB_MULTIPLE = DbConstants.DB_MULTIPLE;
        DB_MULTIPLE_KEY = DbConstants.DB_MULTIPLE_KEY;
687 688 689 690
        DB_NEXT = DbConstants.DB_NEXT;
        DB_NEXT_DUP = DbConstants.DB_NEXT_DUP;
        DB_NEXT_NODUP = DbConstants.DB_NEXT_NODUP;
        DB_NODUPDATA = DbConstants.DB_NODUPDATA;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
691 692 693
        DB_NOLOCKING = DbConstants.DB_NOLOCKING;
        DB_NOMMAP = DbConstants.DB_NOMMAP;
        DB_NOORDERCHK = DbConstants.DB_NOORDERCHK;
694
        DB_NOOVERWRITE = DbConstants.DB_NOOVERWRITE;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
695
        DB_NOPANIC = DbConstants.DB_NOPANIC;
696
        DB_NOSYNC = DbConstants.DB_NOSYNC;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
697 698 699 700
        DB_ODDFILESIZE = DbConstants.DB_ODDFILESIZE;
        DB_ORDERCHKONLY = DbConstants.DB_ORDERCHKONLY;
        DB_OVERWRITE = DbConstants.DB_OVERWRITE;
        DB_PANIC_ENVIRONMENT = DbConstants.DB_PANIC_ENVIRONMENT;
701 702 703
        DB_POSITION = DbConstants.DB_POSITION;
        DB_PREV = DbConstants.DB_PREV;
        DB_PREV_NODUP = DbConstants.DB_PREV_NODUP;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
704 705 706 707 708 709 710 711 712
        DB_PRINTABLE = DbConstants.DB_PRINTABLE;
        DB_PRIORITY_DEFAULT = DbConstants.DB_PRIORITY_DEFAULT;
        DB_PRIORITY_HIGH = DbConstants.DB_PRIORITY_HIGH;
        DB_PRIORITY_LOW = DbConstants.DB_PRIORITY_LOW;
        DB_PRIORITY_VERY_HIGH = DbConstants.DB_PRIORITY_VERY_HIGH;
        DB_PRIORITY_VERY_LOW = DbConstants.DB_PRIORITY_VERY_LOW;
        DB_PRIVATE = DbConstants.DB_PRIVATE;
        DB_RDONLY = DbConstants.DB_RDONLY;
        DB_RECNUM = DbConstants.DB_RECNUM;
713
        DB_RECORDCOUNT = DbConstants.DB_RECORDCOUNT;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
714 715 716 717 718 719 720 721 722 723
        DB_RECOVER = DbConstants.DB_RECOVER;
        DB_RECOVER_FATAL = DbConstants.DB_RECOVER_FATAL;
        DB_REGION_INIT = DbConstants.DB_REGION_INIT;
        DB_RENUMBER = DbConstants.DB_RENUMBER;
        DB_REP_CLIENT = DbConstants.DB_REP_CLIENT;
        DB_REP_LOGSONLY = DbConstants.DB_REP_LOGSONLY;
        DB_REP_MASTER = DbConstants.DB_REP_MASTER;
        DB_REP_PERMANENT = DbConstants.DB_REP_PERMANENT;
        DB_REP_UNAVAIL = DbConstants.DB_REP_UNAVAIL;
        DB_REVSPLITOFF = DbConstants.DB_REVSPLITOFF;
724
        DB_RMW = DbConstants.DB_RMW;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
725
        DB_SALVAGE = DbConstants.DB_SALVAGE;
726
        DB_SET = DbConstants.DB_SET;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
727
        DB_SET_LOCK_TIMEOUT = DbConstants.DB_SET_LOCK_TIMEOUT;
728 729
        DB_SET_RANGE = DbConstants.DB_SET_RANGE;
        DB_SET_RECNO = DbConstants.DB_SET_RECNO;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751
        DB_SET_TXN_TIMEOUT = DbConstants.DB_SET_TXN_TIMEOUT;
        DB_SNAPSHOT = DbConstants.DB_SNAPSHOT;
        DB_STAT_CLEAR = DbConstants.DB_STAT_CLEAR;
        DB_SYSTEM_MEM = DbConstants.DB_SYSTEM_MEM;
        DB_THREAD = DbConstants.DB_THREAD;
        DB_TRUNCATE = DbConstants.DB_TRUNCATE;
        DB_TXN_NOSYNC = DbConstants.DB_TXN_NOSYNC;
        DB_TXN_NOWAIT = DbConstants.DB_TXN_NOWAIT;
        DB_TXN_SYNC = DbConstants.DB_TXN_SYNC;
        DB_TXN_WRITE_NOSYNC = DbConstants.DB_TXN_WRITE_NOSYNC;
        DB_UPGRADE = DbConstants.DB_UPGRADE;
        DB_USE_ENVIRON = DbConstants.DB_USE_ENVIRON;
        DB_USE_ENVIRON_ROOT = DbConstants.DB_USE_ENVIRON_ROOT;
        DB_VERB_CHKPOINT = DbConstants.DB_VERB_CHKPOINT;
        DB_VERB_DEADLOCK = DbConstants.DB_VERB_DEADLOCK;
        DB_VERB_RECOVERY = DbConstants.DB_VERB_RECOVERY;
        DB_VERB_REPLICATION = DbConstants.DB_VERB_REPLICATION;
        DB_VERB_WAITSFOR = DbConstants.DB_VERB_WAITSFOR;
        DB_VERIFY = DbConstants.DB_VERIFY;
        DB_VERSION_MAJOR = DbConstants.DB_VERSION_MAJOR;
        DB_VERSION_MINOR = DbConstants.DB_VERSION_MINOR;
        DB_VERSION_PATCH = DbConstants.DB_VERSION_PATCH;
752
        DB_WRITECURSOR = DbConstants.DB_WRITECURSOR;
ram@mysql.r18.ru's avatar
ram@mysql.r18.ru committed
753 754 755 756
        DB_XA_CREATE = DbConstants.DB_XA_CREATE;
        DB_XIDDATASIZE = DbConstants.DB_XIDDATASIZE;
        DB_YIELDCPU = DbConstants.DB_YIELDCPU;
        // END-JAVA-CONSTANT-INITIALIZATION
757 758 759 760 761

        one_time_init();
    }
}
// end of Db.java