Update of /cvsroot/firebird/interbase/jrd
In directory usw-pr-cvs1:/tmp/cvs-serv10269
Modified Files:
tra.c
Log Message:
make tip pages long
Index: tra.c
===================================================================
RCS file: /cvsroot/firebird/interbase/jrd/tra.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -U3 -r1.2 -r1.3
--- tra.c 2001/05/13 13:37:33 1.2
+++ tra.c 2001/06/08 21:38:33 1.3
@@ -107,7 +107,7 @@
static void downgrade_lock (TRA);
static void expand_view_lock (TRA, REL, SCHAR);
static TIP fetch_inventory_page (TDBB, WIN *, SLONG, USHORT);
-static SLONG inventory_page (TDBB, int);
+static SLONG inventory_page (TDBB, SLONG);
static SSHORT limbo_transaction (TDBB, SLONG);
static void restart_requests (TDBB, TRA);
static BOOLEAN start_sweeper (TDBB, DBB);
@@ -242,8 +242,9 @@
TIP tip;
ATT attachment;
UCHAR *byte;
-SSHORT shift, sequence, last, state;
-SLONG number, ceiling, active, trans_per_tip, max, limbo, trans_offset;
+SSHORT shift, state;
+SLONG number, ceiling, active, trans_per_tip;
+SLONG max, limbo, sequence, last, trans_offset;
SET_TDBB (tdbb);
dbb = tdbb->tdbb_database;
@@ -557,7 +558,8 @@
*
**************************************/
DBB dbb;
-SLONG tip_seq, trans_per_tip;
+SLONG trans_per_tip;
+ULONG tip_number, tip_seq;
WIN window;
TIP tip;
ULONG byte;
@@ -569,15 +571,16 @@
/* locate and fetch the proper TIP page */
+tip_number = (ULONG) number;
trans_per_tip = dbb->dbb_pcontrol->pgc_tpt;
-tip_seq = number / trans_per_tip;
+tip_seq = tip_number / trans_per_tip;
window.win_flags = 0;
tip = fetch_inventory_page (tdbb, &window, tip_seq, LCK_read);
/* calculate the state of the desired transaction */
-byte = TRANS_OFFSET (number % trans_per_tip);
-shift = TRANS_SHIFT (number);
+byte = TRANS_OFFSET (tip_number % trans_per_tip);
+shift = TRANS_SHIFT (tip_number);
state = (tip->tip_transactions [byte] >> shift ) & TRA_MASK;
CCH_RELEASE (tdbb, &window);
@@ -607,7 +610,7 @@
**************************************/
DBB dbb;
ULONG trans_per_tip;
-USHORT sequence, last, l;
+ULONG sequence, last, l;
WIN window;
TIP tip;
UCHAR *p, *q;
@@ -1323,8 +1326,9 @@
TIP tip;
JRNI record;
UCHAR *address;
-SSHORT sequence, shift;
-ULONG byte, trans_per_tip, generation;
+SSHORT shift;
+SLONG sequence;
+ULONG byte, trans_per_tip;
SET_TDBB (tdbb);
dbb = tdbb->tdbb_database;
@@ -2709,7 +2713,7 @@
#ifndef GATEWAY
static SLONG inventory_page (
TDBB tdbb,
- int sequence)
+ SLONG sequence)
{
/**************************************
*
@@ -2779,8 +2783,8 @@
WIN window;
TIP tip;
UCHAR *byte;
-SSHORT shift, page, state;
-SLONG number, trans_per_tip, trans_offset;
+SSHORT shift, state;
+SLONG page, number, trans_per_tip, trans_offset;
SET_TDBB (tdbb);
dbb = tdbb->tdbb_database;
|