Commit 74b798fd authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel
Browse files

close[t:4707] Rename xid_t to avoid conflicts with the handlerton. Closes #4707.

git-svn-id: file:///svn/toku/tokudb@41667 c7de825b-a66e-492c-adef-691d508d4ae1
parent d7812705
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -359,8 +359,8 @@ void print_db_env_struct (void) {
                             "void (*set_update)                          (DB_ENV *env, int (*update_function)(DB *, const DBT *key, const DBT *old_val, const DBT *extra, void (*set_val)(const DBT *new_val, void *set_extra), void *set_extra))",
                             "int (*set_lock_timeout)                     (DB_ENV *env, uint64_t lock_wait_time_msec)",
                             "int (*get_lock_timeout)                     (DB_ENV *env, uint64_t *lock_wait_time_msec)",
			     "int (*txn_xa_recover)                       (DB_ENV*, XID list[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)",
			     "int (*get_txn_from_xid)                 (DB_ENV*, /*in*/ XID *, /*out*/ DB_TXN **)",
			     "int (*txn_xa_recover)                       (DB_ENV*, TOKU_XA_XID list[/*count*/], long count, /*out*/ long *retp, u_int32_t flags)",
			     "int (*get_txn_from_xid)                 (DB_ENV*, /*in*/ TOKU_XA_XID *, /*out*/ DB_TXN **)",
                             NULL};

	sort_and_dump_fields("db_env", true, extra);
@@ -465,7 +465,7 @@ static void print_db_txn_struct (void) {
	"struct toku_list open_txns",
	"int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*)",
	"int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*)",
	"int (*xa_prepare) (DB_TXN*, XID *)",
	"int (*xa_prepare) (DB_TXN*, TOKU_XA_XID *)",
	NULL};
    sort_and_dump_fields("db_txn", false, extra);
}
@@ -528,12 +528,12 @@ int main (int argc, char *const argv[] __attribute__((__unused__))) {
#endif
    dodefine(DB_GID_SIZE);

    printf("typedef struct xid_t { /* This struct is intended to be binary compatible with the XID in the XA architecture.  See source:/import/opengroup.org/C193.pdf */\n"
    printf("typedef struct toku_xa_xid_s { /* This struct is intended to be binary compatible with the XID in the XA architecture.  See source:/import/opengroup.org/C193.pdf */\n"
           "    long formatID;                  /* format identifier */\n"
           "    long gtrid_length;              /* value from 1 through 64 */\n"
           "    long bqual_length;              /* value from 1 through 64 */\n"
           "    char data[DB_GID_SIZE];\n"
           "} XID;\n");
           "} TOKU_XA_XID;\n");

   //Typedef toku_off_t
    printf("#ifndef TOKU_OFF_T_DEFINED\n"
+5 −5
Original line number Diff line number Diff line
@@ -17,12 +17,12 @@ extern "C" {
#define DB_VERSION_PATCH 119
#define DB_VERSION_STRING "Tokutek: TokuDB 4.6.119"
#define DB_GID_SIZE 128
typedef struct xid_t { /* This struct is intended to be binary compatible with the XID in the XA architecture.  See source:/import/opengroup.org/C193.pdf */
typedef struct toku_xa_xid_s { /* This struct is intended to be binary compatible with the XID in the XA architecture.  See source:/import/opengroup.org/C193.pdf */
    long formatID;                  /* format identifier */
    long gtrid_length;              /* value from 1 through 64 */
    long bqual_length;              /* value from 1 through 64 */
    char data[DB_GID_SIZE];
} XID;
} TOKU_XA_XID;
#ifndef TOKU_OFF_T_DEFINED
#define TOKU_OFF_T_DEFINED
typedef int64_t toku_off_t;
@@ -240,8 +240,8 @@ struct __toku_db_env {
  void (*set_update)                          (DB_ENV *env, int (*update_function)(DB *, const DBT *key, const DBT *old_val, const DBT *extra, void (*set_val)(const DBT *new_val, void *set_extra), void *set_extra));
  int (*set_lock_timeout)                     (DB_ENV *env, uint64_t lock_wait_time_msec);
  int (*get_lock_timeout)                     (DB_ENV *env, uint64_t *lock_wait_time_msec);
  int (*txn_xa_recover)                       (DB_ENV*, XID list[/*count*/], long count, /*out*/ long *retp, u_int32_t flags);
  int (*get_txn_from_xid)                 (DB_ENV*, /*in*/ XID *, /*out*/ DB_TXN **);
  int (*txn_xa_recover)                       (DB_ENV*, TOKU_XA_XID list[/*count*/], long count, /*out*/ long *retp, u_int32_t flags);
  int (*get_txn_from_xid)                 (DB_ENV*, /*in*/ TOKU_XA_XID *, /*out*/ DB_TXN **);
  void *app_private;
  void *api1_internal;
  int  (*close) (DB_ENV *, u_int32_t);
@@ -368,7 +368,7 @@ struct __toku_db_txn {
  struct toku_list open_txns;
  int (*commit_with_progress)(DB_TXN*, uint32_t, TXN_PROGRESS_POLL_FUNCTION, void*);
  int (*abort_with_progress)(DB_TXN*, TXN_PROGRESS_POLL_FUNCTION, void*);
  int (*xa_prepare) (DB_TXN*, XID *);
  int (*xa_prepare) (DB_TXN*, TOKU_XA_XID *);
  DB_ENV *mgrp /*In TokuDB, mgrp is a DB_ENV not a DB_TXNMGR*/;
  DB_TXN *parent;
  void *api_internal;
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ typedef u_int64_t TXNID;

typedef struct blocknum_s { int64_t b; } BLOCKNUM; // make a struct so that we will notice type problems.
typedef struct gid_s { uint8_t *gid; } GID; // the gid is of size [DB_GID_SIZE]
typedef XID *XIDP; // this is the type that's passed to the logger code (so that we don't have to copy all 152 bytes when only a subset are even valid.)
typedef TOKU_XA_XID *XIDP; // this is the type that's passed to the logger code (so that we don't have to copy all 152 bytes when only a subset are even valid.)
#define ROLLBACK_NONE     ((BLOCKNUM){0})

static inline BLOCKNUM make_blocknum(int64_t b) { BLOCKNUM result={b}; return result; }
+1 −1
Original line number Diff line number Diff line
@@ -3548,7 +3548,7 @@ log_open_txn (OMTVALUE txnv, u_int32_t UU(index), void *UU(extra)) {
	return 0;
    }
    case TOKUTXN_PREPARING: {
	XID xa_xid;
	TOKU_XA_XID xa_xid;
	toku_txn_get_prepared_xa_xid(txn, &xa_xid);
	int r = toku_log_xstillopenprepared(logger, NULL, 0,
					    toku_txn_get_txnid(txn),
+1 −1
Original line number Diff line number Diff line
@@ -181,7 +181,7 @@ struct tokutxn {
    TOKUTXN_STATE state;
    LSN        do_fsync_lsn;
    BOOL       do_fsync;
    XID        xa_xid; // for prepared transactions
    TOKU_XA_XID        xa_xid; // for prepared transactions
    struct toku_list prepared_txns_link; // list of prepared transactions
};

Loading