Remove OPENLINK define
This commit is contained in:
parent
0108fddf13
commit
18bbad7696
|
@ -6,7 +6,7 @@
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Id: fd.c,v 1.6 1996/10/31 10:19:59 scrappy Exp $
|
* $Id: fd.c,v 1.7 1996/11/04 04:53:24 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES:
|
* NOTES:
|
||||||
*
|
*
|
||||||
|
@ -197,14 +197,12 @@ static int FileAccess(File file);
|
||||||
static File fileNameOpenFile(FileName fileName, int fileFlags, int fileMode);
|
static File fileNameOpenFile(FileName fileName, int fileFlags, int fileMode);
|
||||||
static char *filepath(char *filename);
|
static char *filepath(char *filename);
|
||||||
|
|
||||||
#ifdef OPENLINK_PATCHES
|
|
||||||
pg_fsync(fd)
|
pg_fsync(fd)
|
||||||
{
|
{
|
||||||
extern int fsyncOff;
|
extern int fsyncOff;
|
||||||
return fsyncOff ? 0 : fsync(fd);
|
return fsyncOff ? 0 : fsync(fd);
|
||||||
}
|
}
|
||||||
#define fsync pg_fsync
|
#define fsync pg_fsync
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(FDDEBUG)
|
#if defined(FDDEBUG)
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.6 1996/11/03 05:07:55 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.7 1996/11/04 04:53:27 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -470,11 +470,7 @@ mdblindwrt(char *dbstr,
|
||||||
status = SM_SUCCESS;
|
status = SM_SUCCESS;
|
||||||
|
|
||||||
/* write and sync the block */
|
/* write and sync the block */
|
||||||
#ifdef OPENLINK_PATCHES
|
|
||||||
if (write(fd, buffer, BLCKSZ) != BLCKSZ || (pg_fsync(fd) < 0))
|
if (write(fd, buffer, BLCKSZ) != BLCKSZ || (pg_fsync(fd) < 0))
|
||||||
#else
|
|
||||||
if (write(fd, buffer, BLCKSZ) != BLCKSZ || fsync(fd) < 0)
|
|
||||||
#endif
|
|
||||||
status = SM_FAIL;
|
status = SM_FAIL;
|
||||||
|
|
||||||
if (close(fd) < 0)
|
if (close(fd) < 0)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.13 1996/11/03 06:52:33 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.14 1996/11/04 04:53:31 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
* this is the "main" module of the postgres backend and
|
* this is the "main" module of the postgres backend and
|
||||||
|
@ -92,9 +92,7 @@ CommandDest whereToSendOutput;
|
||||||
extern int lockingOff;
|
extern int lockingOff;
|
||||||
extern int NBuffers;
|
extern int NBuffers;
|
||||||
|
|
||||||
#ifdef OPENLINK_PATCHES
|
|
||||||
int fsyncOff = 0;
|
int fsyncOff = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
int dontExecute = 0;
|
int dontExecute = 0;
|
||||||
static int ShowStats;
|
static int ShowStats;
|
||||||
|
@ -742,22 +740,16 @@ her exceeded legal ranges or was a divide by zero");
|
||||||
|
|
||||||
static void usage(char* progname)
|
static void usage(char* progname)
|
||||||
{
|
{
|
||||||
#ifdef OPENLINK_PATCHES
|
|
||||||
fprintf(stderr,"\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLFNopQSs] [dbname]\n");
|
|
||||||
#else
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"Usage: %s [-B nbufs] [-d lvl] ] [-f plantype] \t[-m portno] [\t -o filename]\n",
|
"Usage: %s [-B nbufs] [-d lvl] ] [-f plantype] \t[-m portno] [\t -o filename]\n",
|
||||||
progname);
|
progname);
|
||||||
fprintf(stderr,"\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLNopQSs] [dbname]\n");
|
fprintf(stderr,"\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLFNopQSs] [dbname]\n");
|
||||||
#endif
|
|
||||||
fprintf(stderr, " b: consider bushy plan trees during optimization\n");
|
fprintf(stderr, " b: consider bushy plan trees during optimization\n");
|
||||||
fprintf(stderr, " B: set number of buffers in buffer pool\n");
|
fprintf(stderr, " B: set number of buffers in buffer pool\n");
|
||||||
fprintf(stderr, " C: supress version info\n");
|
fprintf(stderr, " C: supress version info\n");
|
||||||
fprintf(stderr, " d: set debug level\n");
|
fprintf(stderr, " d: set debug level\n");
|
||||||
fprintf(stderr, " E: echo query before execution\n");
|
fprintf(stderr, " E: echo query before execution\n");
|
||||||
#ifdef OPENLINK_PATCHES
|
|
||||||
fprintf(stderr, " F: turn off fsync\n");
|
fprintf(stderr, " F: turn off fsync\n");
|
||||||
#endif
|
|
||||||
fprintf(stderr, " f: forbid plantype generation\n");
|
fprintf(stderr, " f: forbid plantype generation\n");
|
||||||
fprintf(stderr, " i: don't execute the query, just show the plan tree\n");
|
fprintf(stderr, " i: don't execute the query, just show the plan tree\n");
|
||||||
fprintf(stderr, " L: turn off locking\n");
|
fprintf(stderr, " L: turn off locking\n");
|
||||||
|
@ -857,11 +849,7 @@ PostgresMain(int argc, char *argv[])
|
||||||
hostName = hostbuf;
|
hostName = hostbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OPENLINK_PATCHES
|
|
||||||
while ((flag = getopt(argc, argv, "B:bCd:Ef:iLm:MNo:P:pQSst:x:F")) != EOF)
|
while ((flag = getopt(argc, argv, "B:bCd:Ef:iLm:MNo:P:pQSst:x:F")) != EOF)
|
||||||
#else
|
|
||||||
while ((flag = getopt(argc, argv, "B:bCd:Ef:iLm:MNo:P:pQSst:x:")) != EOF)
|
|
||||||
#endif
|
|
||||||
switch (flag) {
|
switch (flag) {
|
||||||
|
|
||||||
case 'b':
|
case 'b':
|
||||||
|
@ -908,7 +896,6 @@ PostgresMain(int argc, char *argv[])
|
||||||
flagE = 1;
|
flagE = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#ifdef OPENLINK_PATCHES
|
|
||||||
case 'F':
|
case 'F':
|
||||||
/* --------------------
|
/* --------------------
|
||||||
* turn off fsync
|
* turn off fsync
|
||||||
|
@ -916,7 +903,6 @@ PostgresMain(int argc, char *argv[])
|
||||||
*/
|
*/
|
||||||
fsyncOff = 1;
|
fsyncOff = 1;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
|
|
||||||
case 'f':
|
case 'f':
|
||||||
/* -----------------
|
/* -----------------
|
||||||
|
@ -1264,7 +1250,7 @@ PostgresMain(int argc, char *argv[])
|
||||||
*/
|
*/
|
||||||
if (IsUnderPostmaster == false) {
|
if (IsUnderPostmaster == false) {
|
||||||
puts("\nPOSTGRES backend interactive interface");
|
puts("\nPOSTGRES backend interactive interface");
|
||||||
puts("$Revision: 1.13 $ $Date: 1996/11/03 06:52:33 $");
|
puts("$Revision: 1.14 $ $Date: 1996/11/04 04:53:31 $");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------
|
/* ----------------
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.3 1996/08/26 20:38:52 scrappy Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.4 1996/11/04 04:53:37 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -68,13 +68,8 @@ bpcharin(char *s, int dummy, int typlen)
|
||||||
typlen = len + 4;
|
typlen = len + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef OPENLINK_PATCHES
|
|
||||||
if (len < 1 || len > 4096)
|
|
||||||
elog(WARN, "bpcharin: length of char() must be between 1 and 4096");
|
|
||||||
#else
|
|
||||||
if (len > 4096)
|
if (len > 4096)
|
||||||
elog(WARN, "bpcharin: length of char() must be less than 4096");
|
elog(WARN, "bpcharin: length of char() must be less than 4096");
|
||||||
#endif
|
|
||||||
|
|
||||||
result = (char *) palloc(typlen);
|
result = (char *) palloc(typlen);
|
||||||
*(int32*)result = typlen;
|
*(int32*)result = typlen;
|
||||||
|
@ -137,13 +132,8 @@ varcharin(char *s, int dummy, int typlen)
|
||||||
typlen = len + 4;
|
typlen = len + 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef OPENLINK_PATCHES
|
|
||||||
if (len < 1 || len > 4096)
|
|
||||||
elog(WARN, "bpcharin: length of char() must be between 1 and 4096");
|
|
||||||
#else
|
|
||||||
if (len > 4096)
|
if (len > 4096)
|
||||||
elog(WARN, "varcharin: length of char() must be less than 4096");
|
elog(WARN, "varcharin: length of char() must be less than 4096");
|
||||||
#endif
|
|
||||||
|
|
||||||
result = (char *) palloc(typlen);
|
result = (char *) palloc(typlen);
|
||||||
*(int32*)result = typlen;
|
*(int32*)result = typlen;
|
||||||
|
|
|
@ -180,7 +180,6 @@
|
||||||
|
|
||||||
/* found in src/backend/utils/adt/arrayfuncs.c */
|
/* found in src/backend/utils/adt/arrayfuncs.c */
|
||||||
/* #define LOARRAY */
|
/* #define LOARRAY */
|
||||||
#define OPENLINK_PATCHES
|
|
||||||
|
|
||||||
/* This is the time, in seconds, at which a given backend server
|
/* This is the time, in seconds, at which a given backend server
|
||||||
* will wait on a lock before deciding to abort the transaction
|
* will wait on a lock before deciding to abort the transaction
|
||||||
|
|
Loading…
Reference in New Issue