53 while (pstrans && pstrans->
ipid != ipid) {
65 pstranshead = pstrans->
psnext;
89 if (psvbptr && psvbptr->
iisopen == 0) {
100 while (psrcvhdl && psrcvhdl->
ipid != ipid) {
101 psrcvhdl = psrcvhdl->
psnext;
103 if (psrcvhdl && psrcvhdl->
ipid == ipid) {
114 off_t trcvsaveoffset;
115 int ifound = 0, iresult = 0;
125 if (tlength2 != tlength && tlength2 != tlength - INTSIZE) {
141 if (tlength2 == tlength - INTSIZE) {
157 while (pstrans && pstrans->
ipid != ipid) {
158 pstrans = pstrans->
psnext;
160 if (pstrans && pstrans->
ipid == ipid) {
170 int ihandle, iloop, imode, imaxrowlen,
ipid;
171 struct keydesc skeydesc;
179 imaxrowlen =
inl_ldint (pcbuffer + (INTSIZE * 2));
180 skeydesc.k_flags =
inl_ldint (pcbuffer + (INTSIZE * 3));
181 skeydesc.k_nparts =
inl_ldint (pcbuffer + (INTSIZE * 4));
182 pcbuffer += (INTSIZE * 6);
183 for (iloop = 0; iloop < skeydesc.k_nparts; iloop++) {
184 skeydesc.k_part[iloop].kp_start =
inl_ldint (pcbuffer + (iloop * 3 * INTSIZE));
185 skeydesc.k_part[iloop].kp_leng =
186 inl_ldint (pcbuffer + INTSIZE + (iloop * 3 * INTSIZE));
187 skeydesc.k_part[iloop].kp_type =
188 inl_ldint (pcbuffer + (INTSIZE * 2) + +(iloop * 3 * INTSIZE));
190 pcfilename = pcbuffer + (skeydesc.k_nparts * 3 * INTSIZE);
191 ihandle =
isbuild (pcfilename, imaxrowlen, &skeydesc, imode);
206 while (pstrans && pstrans->
ipid != ipid) {
207 pstrans = pstrans->
psnext;
219 pstranshead->
psprev = pstrans;
221 pstranshead = pstrans;
230 int ihandle, iloop,
ipid, isaveerror = 0;
231 struct keydesc skeydesc;
242 skeydesc.k_flags =
inl_ldint (pcbuffer + INTSIZE);
243 skeydesc.k_nparts =
inl_ldint (pcbuffer + (INTSIZE * 2));
244 pcbuffer += (INTSIZE * 4);
245 for (iloop = 0; iloop < skeydesc.k_nparts; iloop++) {
246 skeydesc.k_part[iloop].kp_start =
inl_ldint (pcbuffer + (iloop * 3 * INTSIZE));
247 skeydesc.k_part[iloop].kp_leng =
248 inl_ldint (pcbuffer + INTSIZE + (iloop * 3 * INTSIZE));
249 skeydesc.k_part[iloop].kp_type =
250 inl_ldint (pcbuffer + (INTSIZE * 2) + +(iloop * 3 * INTSIZE));
291 while (pstrans && pstrans->
ipid != ipid) {
292 pstrans = pstrans->
psnext;
303 pstranshead = pstrans->
psnext;
307 if (!psrecoverhandle[iloop]) {
310 for (psrcv = psrecoverhandle[iloop]; psrcv; psrcv = psrcv->
psnext) {
336 pcrow = pcbuffer + INTSIZE +
QUADSIZE + INTSIZE;
344 int ihandle, iloop,
ipid, isaveerror = 0;
345 struct keydesc skeydesc;
356 skeydesc.k_flags =
inl_ldint (pcbuffer + INTSIZE);
357 skeydesc.k_nparts =
inl_ldint (pcbuffer + (INTSIZE * 2));
358 pcbuffer += (INTSIZE * 4);
359 for (iloop = 0; iloop < skeydesc.k_nparts; iloop++) {
360 skeydesc.k_part[iloop].kp_start =
inl_ldint (pcbuffer + (iloop * 3 * INTSIZE));
361 skeydesc.k_part[iloop].kp_leng =
362 inl_ldint (pcbuffer + INTSIZE + (iloop * 3 * INTSIZE));
363 skeydesc.k_part[iloop].kp_type =
364 inl_ldint (pcbuffer + (INTSIZE * 2) + +(iloop * 3 * INTSIZE));
402 ivarlenflag =
inl_ldint (pcbuffer + INTSIZE);
407 psrcv = psrecoverhandle[
ihandle];
408 while (psrcv && psrcv->
ipid != ipid) {
411 if (!psrcv || psrcv->
ipid != ipid) {
435 ivarlenflag =
inl_ldint (pcbuffer + INTSIZE);
448 ISINOUT | ISMANULOCK | (ivarlenflag ? ISVARLEN : ISFIXLEN));
456 if (psrecoverhandle[ihandle]) {
459 psrecoverhandle[
ihandle] = psrcv;
481 pcrow = pcbuffer + INTSIZE +
QUADSIZE + INTSIZE;
500 char *pcoldname, *pcnewname;
501 int ioldnamelength,
ipid;
508 pcoldname = pcbuffer + INTSIZE + INTSIZE;
509 pcnewname = pcbuffer + INTSIZE + INTSIZE + ioldnamelength;
577 isrewrec (ihandle, trownumber, pcrow);
587 off_t tlength, tlength2, toffset;
588 int iloop, isaveerror;
599 psrecoverhandle[iloop] =
NULL;
621 if (tlength2 != tlength && tlength2 != tlength - INTSIZE) {
663 if (tlength2 == tlength - INTSIZE) {
int isdelindex(const int ihandle, struct keydesc *pskeydesc)
int ivbforcedataallocate(const int ihandle, const off_t trownumber)
static struct RCV_HDL * psrecoverhandle[128+1]
static int ircvbegin(char *pcbuffer, const int ilength)
static int inl_ldint(void *pclocation)
static int ircvfilerename(char *pcbuffer)
int isrewrec(const int ihandle, const long long trownumber, char *pcrow)
int isrename(char *pcoldname, char *pcnewname)
int isuniqueid(const int ihandle, long long *ptuniqueid)
static int ircvchecktrans(const int ilength, const int ipid)
int isdelrec(const int ihandle, long long trownumber)
static int ircvfileerase(char *pcbuffer)
static void vcloseall(void)
static int ircvdeleteindex(char *pcbuffer)
static struct SLOGHDR * psvblogheader
int iserase(char *pcfilename)
static int ircvdelete(char *pcbuffer)
int ivbenter(const int ihandle, const unsigned int imodifying, const unsigned int ispecial)
static int ircvcreateindex(char *pcbuffer)
static int ircvcommit(char *pcbuffer)
static int ircvupdate(char *pcbuffer)
static int ircvuniqueid(char *pcbuffer)
static void inl_stint(int ivalue, void *pclocation)
unsigned char iisdictlocked
int isopen(const char *pcfilename, int imode)
EC ARGUMENT EC EC BOUND EC BOUND EC BOUND EC BOUND TABLE EC DATA EC DATA EC DATA PTR NULL
static int ircvcluster(char *pcbuffer)
static struct STRANS * pstranshead
int ivbwriterow(const int ihandle, char *pcrow, const off_t trownumber)
void * pvvbmalloc(const size_t size)
static int ircvfileclose(char *pcbuffer)
int ivbfileopenlock(const int ihandle, const int imode)
struct DICTINFO * psvbfile[128+1]
int issetunique(const int ihandle, const long long tuniqueid)
int isaddindex(const int ihandle, struct keydesc *pskeydesc)
static int ircvfileopen(char *pcbuffer)
int ivbexit(const int ihandle)
static int ircvinsert(char *pcbuffer)
static int igetrcvhandle(const int ihandle, const int ipid)
static int ircvsetunique(char *pcbuffer)
static int ircvrollback(void)
static int iignore(const int ipid)
int isclose(const int ihandle)
static char * cvbrtransbuffer
int isbuild(const char *pcfilename, const int imaxrowlength, struct keydesc *pskey, int imode)
ssize_t tvbread(const int ihandle, void *pvbuffer, const size_t tcount)
#define MAX_BUFFER_LENGTH
static int irollbackall(void)
static off_t inl_ldquad(void *pclocation)
int isrelease(const int ihandle)
static int ircvbuild(char *pcbuffer)
off_t tvblseek(const int ihandle, off_t toffset, const int iwhence)