Applied Joachim's patch for a --regression option.
Made this option mark the .c files, so the environment variable is no longer needed. Created a special MinGW file with the special error message. Do not print port into log file when running regression tests.
This commit is contained in:
parent
c0c00ac3b7
commit
5b88b85cad
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.37 2006/11/08 10:46:47 meskes Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/connect.c,v 1.38 2007/01/11 15:47:33 meskes Exp $ */
|
||||
|
||||
#define POSTGRES_ECPG_INTERNAL
|
||||
#include "postgres_fe.h"
|
||||
@ -19,6 +19,7 @@ static pthread_once_t actual_connection_key_once = PTHREAD_ONCE_INIT;
|
||||
#endif
|
||||
static struct connection *actual_connection = NULL;
|
||||
static struct connection *all_connections = NULL;
|
||||
extern int ecpg_internal_regression_mode;
|
||||
|
||||
#ifdef ENABLE_THREAD_SAFETY
|
||||
static void
|
||||
@ -464,7 +465,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
|
||||
ECPGlog("ECPGconnect: opening database %s on %s port %s %s%s%s%s\n",
|
||||
realname ? realname : "<DEFAULT>",
|
||||
host ? host : "<DEFAULT>",
|
||||
port ? port : "<DEFAULT>",
|
||||
port ? (ecpg_internal_regression_mode ? "<REGRESSION_PORT>" : port) : "<DEFAULT>",
|
||||
options ? "with options " : "", options ? options : "",
|
||||
user ? "for user " : "", user ? user : "");
|
||||
|
||||
@ -478,7 +479,7 @@ ECPGconnect(int lineno, int c, const char *name, const char *user, const char *p
|
||||
ECPGlog("connect: could not open database %s on %s port %s %s%s%s%s in line %d\n\t%s\n",
|
||||
db,
|
||||
host ? host : "<DEFAULT>",
|
||||
port ? port : "<DEFAULT>",
|
||||
port ? (ecpg_internal_regression_mode ? "<REGRESSION_PORT>" : port) : "<DEFAULT>",
|
||||
options ? "with options " : "", options ? options : "",
|
||||
user ? "for user " : "", user ? user : "",
|
||||
lineno, errmsg);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.35 2006/10/04 00:30:11 momjian Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.36 2007/01/11 15:47:33 meskes Exp $ */
|
||||
|
||||
#define POSTGRES_ECPG_INTERNAL
|
||||
#include "postgres_fe.h"
|
||||
@ -16,10 +16,7 @@
|
||||
#include "pgtypes_timestamp.h"
|
||||
#include "pgtypes_interval.h"
|
||||
|
||||
static enum
|
||||
{
|
||||
NOT_CHECKED, REGRESS, NORMAL
|
||||
} ECPG_regression_mode = NOT_CHECKED;
|
||||
extern int ecpg_internal_regression_mode;
|
||||
|
||||
static bool
|
||||
garbage_left(enum ARRAY_TYPE isarray, char *scan_length, enum COMPAT_MODE compat)
|
||||
@ -56,24 +53,11 @@ ECPGget_data(const PGresult *results, int act_tuple, int act_field, int lineno,
|
||||
int value_for_indicator = 0;
|
||||
long log_offset;
|
||||
|
||||
/*
|
||||
* use a global variable to see if the environment variable
|
||||
* ECPG_REGRESSION is set or not. Remember the state in order to avoid
|
||||
* subsequent calls to getenv() for this purpose.
|
||||
*/
|
||||
if (ECPG_regression_mode == NOT_CHECKED)
|
||||
{
|
||||
if (getenv("ECPG_REGRESSION"))
|
||||
ECPG_regression_mode = REGRESS;
|
||||
else
|
||||
ECPG_regression_mode = NORMAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are running in a regression test, do not log the offset variable,
|
||||
* it depends on the machine's alignment.
|
||||
*/
|
||||
if (ECPG_regression_mode == REGRESS)
|
||||
if (ecpg_internal_regression_mode)
|
||||
log_offset = -1;
|
||||
else
|
||||
log_offset = offset;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.32 2006/10/04 00:30:11 momjian Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/misc.c,v 1.33 2007/01/11 15:47:33 meskes Exp $ */
|
||||
|
||||
#define POSTGRES_ECPG_INTERNAL
|
||||
#include "postgres_fe.h"
|
||||
@ -28,6 +28,8 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
extern int ecpg_internal_regression_mode;
|
||||
|
||||
static struct sqlca_t sqlca_init =
|
||||
{
|
||||
{
|
||||
@ -262,7 +264,7 @@ ECPGlog(const char *format,...)
|
||||
* regression tests set this environment variable to get the same
|
||||
* output for every run.
|
||||
*/
|
||||
if (getenv("ECPG_REGRESSION"))
|
||||
if (ecpg_internal_regression_mode)
|
||||
snprintf(f, bufsize, "[NO_PID]: %s", format);
|
||||
else
|
||||
snprintf(f, bufsize, "[%d]: %s", (int) getpid(), format);
|
||||
@ -272,7 +274,7 @@ ECPGlog(const char *format,...)
|
||||
va_end(ap);
|
||||
|
||||
/* dump out internal sqlca variables */
|
||||
if (getenv("ECPG_REGRESSION"))
|
||||
if (ecpg_internal_regression_mode)
|
||||
fprintf(debugstream, "[NO_PID]: sqlca: code: %ld, state: %s\n",
|
||||
sqlca->sqlcode, sqlca->sqlstate);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.94 2006/02/08 09:10:04 meskes Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/ecpg.c,v 1.95 2007/01/11 15:47:33 meskes Exp $ */
|
||||
|
||||
/* New main for ecpg, the PostgreSQL embedded SQL precompiler. */
|
||||
/* (C) Michael Meskes <meskes@postgresql.org> Feb 5th, 1998 */
|
||||
@ -8,12 +8,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#ifdef HAVE_GETOPT_H
|
||||
#include <getopt.h>
|
||||
#endif
|
||||
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
#include "getopt_long.h"
|
||||
|
||||
#include "extern.h"
|
||||
|
||||
@ -22,7 +17,8 @@ int ret_value = 0,
|
||||
auto_create_c = false,
|
||||
system_includes = false,
|
||||
force_indicator = true,
|
||||
header_mode = false;
|
||||
header_mode = false,
|
||||
regression_mode = false;
|
||||
|
||||
enum COMPAT_MODE compat = ECPG_COMPAT_PGSQL;
|
||||
|
||||
@ -56,6 +52,7 @@ help(const char *progname)
|
||||
" OPTION may only be \"no_indicator\"\n");
|
||||
printf(" -t turn on autocommit of transactions\n");
|
||||
printf(" --help show this help, then exit\n");
|
||||
printf(" --regression run in regression testing mode\n");
|
||||
printf(" --version output version information, then exit\n");
|
||||
printf("\nIf no output file is specified, the name is formed by adding .c to the\n"
|
||||
"input file name, after stripping off .pgc if present.\n");
|
||||
@ -112,9 +109,19 @@ add_preprocessor_define(char *define)
|
||||
defines->next = pd;
|
||||
}
|
||||
|
||||
#define ECPG_GETOPT_LONG_HELP 1
|
||||
#define ECPG_GETOPT_LONG_VERSION 2
|
||||
#define ECPG_GETOPT_LONG_REGRESSION 3
|
||||
int
|
||||
main(int argc, char *const argv[])
|
||||
{
|
||||
static struct option ecpg_options[] = {
|
||||
{"help", no_argument, NULL, ECPG_GETOPT_LONG_HELP},
|
||||
{"version", no_argument, NULL, ECPG_GETOPT_LONG_VERSION},
|
||||
{"regression", no_argument, NULL, ECPG_GETOPT_LONG_REGRESSION},
|
||||
{ NULL, 0, NULL, 0}
|
||||
};
|
||||
|
||||
int fnr,
|
||||
c,
|
||||
verbose = false,
|
||||
@ -126,27 +133,35 @@ main(int argc, char *const argv[])
|
||||
|
||||
progname = get_progname(argv[0]);
|
||||
|
||||
if (argc > 1)
|
||||
{
|
||||
if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
|
||||
{
|
||||
help(progname);
|
||||
exit(0);
|
||||
}
|
||||
else if (strcmp(argv[1], "--version") == 0)
|
||||
{
|
||||
printf("ecpg (PostgreSQL %s) %d.%d.%d\n", PG_VERSION,
|
||||
MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL);
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
find_my_exec(argv[0], my_exec_path);
|
||||
|
||||
while ((c = getopt(argc, argv, "vcio:I:tD:dC:r:h")) != -1)
|
||||
while ((c = getopt_long(argc, argv, "vcio:I:tD:dC:r:h?", ecpg_options, NULL)) != -1)
|
||||
{
|
||||
switch (c)
|
||||
{
|
||||
case ECPG_GETOPT_LONG_VERSION:
|
||||
printf("ecpg (PostgreSQL %s) %d.%d.%d\n", PG_VERSION,
|
||||
MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL);
|
||||
exit(0);
|
||||
case ECPG_GETOPT_LONG_HELP:
|
||||
help(progname);
|
||||
exit(0);
|
||||
/*
|
||||
* -? is an alternative spelling of --help. However it is also
|
||||
* returned by getopt_long for unknown options. We can distinguish
|
||||
* both cases by means of the optopt variable which is set to 0 if
|
||||
* it was really -? and not an unknown option character.
|
||||
*/
|
||||
case '?':
|
||||
if (optopt == 0)
|
||||
{
|
||||
help(progname);
|
||||
exit(0);
|
||||
}
|
||||
break;
|
||||
case ECPG_GETOPT_LONG_REGRESSION:
|
||||
regression_mode = true;
|
||||
break;
|
||||
case 'o':
|
||||
if (strcmp(optarg, "-") == 0)
|
||||
yyout = stdout;
|
||||
@ -405,8 +420,12 @@ main(int argc, char *const argv[])
|
||||
|
||||
/* we need several includes */
|
||||
/* but not if we are in header mode */
|
||||
fprintf(yyout, "/* Processed by ecpg (%d.%d.%d) */\n", MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL);
|
||||
if (regression_mode)
|
||||
fprintf(yyout, "/* Processed by ecpg (regression mode) */\n");
|
||||
else
|
||||
fprintf(yyout, "/* Processed by ecpg (%d.%d.%d) */\n", MAJOR_VERSION, MINOR_VERSION, PATCHLEVEL);
|
||||
|
||||
fprintf(yyout, "int ecpg_internal_regression_mode = %d;\n", regression_mode);
|
||||
if (header_mode == false)
|
||||
{
|
||||
fprintf(yyout, "/* These include files are added by the preprocessor */\n#include <ecpgtype.h>\n#include <ecpglib.h>\n#include <ecpgerrno.h>\n#include <sqlca.h>\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.63 2006/03/11 04:38:40 momjian Exp $ */
|
||||
/* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/extern.h,v 1.64 2007/01/11 15:47:33 meskes Exp $ */
|
||||
|
||||
#ifndef _ECPG_PREPROC_EXTERN_H
|
||||
#define _ECPG_PREPROC_EXTERN_H
|
||||
@ -21,7 +21,8 @@ extern int braces_open,
|
||||
force_indicator,
|
||||
ret_value,
|
||||
struct_level,
|
||||
ecpg_informix_var;
|
||||
ecpg_informix_var,
|
||||
regression_mode;
|
||||
extern char *descriptor_index;
|
||||
extern char *descriptor_name;
|
||||
extern char *connection;
|
||||
|
@ -5,7 +5,7 @@ override CFLAGS += $(PTHREAD_CFLAGS)
|
||||
override LDFLAGS := -L../../ecpglib -L../../pgtypeslib $(LDFLAGS)
|
||||
override LIBS := -lecpg -lpgtypes $(libpq) $(LIBS) $(PTHREAD_LIBS)
|
||||
|
||||
ECPG = ../../preproc/ecpg -I$(srcdir)/../../include
|
||||
ECPG = ../../preproc/ecpg --regression -I$(srcdir)/../../include
|
||||
|
||||
%: %.c
|
||||
$(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) $(LIBS) -o $@
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -0,0 +1,83 @@
|
||||
|
||||
THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
|
||||
|
||||
[NO_PID]: ECPGdebug: set to 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT>
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 23: QUERY: alter user connectuser encrypted password 'connectpw' on connection main
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGexecute line 23 Ok: ALTER ROLE
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <DEFAULT>
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <DEFAULT> for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port 55432 for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port 55432 for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database on localhost port 55432 for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432 for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432 for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port 55432 for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: connect: could not open database nonexistant on localhost port 55432 for user connectuser in line 62
|
||||
FATAL: database "nonexistant" does not exist
|
||||
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection nonexistant closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlcode -402 in line 62, 'Could not connect to database nonexistant in line 62.'.
|
||||
[NO_PID]: sqlca: code: -402, state: 08001
|
||||
[NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'.
|
||||
[NO_PID]: sqlca: code: -220, state: 08003
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 20 for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: connect: could not open database connectdb on localhost port 20 for user connectuser in line 66
|
||||
could not connect to server: Connection refused (0x0000274D/10061)
|
||||
Is the server running on host "localhost" and accepting
|
||||
TCP/IP connections on port 20?
|
||||
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlcode -402 in line 66, 'Could not connect to database connectdb in line 66.'.
|
||||
[NO_PID]: sqlca: code: -402, state: 08001
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432 for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
@ -1,7 +1,5 @@
|
||||
|
||||
THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
|
||||
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,6 +1,3 @@
|
||||
|
||||
THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
|
||||
|
||||
[NO_PID]: ECPGdebug: set to 1
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT>
|
||||
@ -19,45 +16,45 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT>
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port 55432 for user connectdb
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <REGRESSION_PORT> for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT>
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port 55432 for user connectdb
|
||||
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port <REGRESSION_PORT> for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection main closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 for user connectuser
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database on localhost port 55432 for user connectdb
|
||||
[NO_PID]: ECPGconnect: opening database on localhost port <REGRESSION_PORT> for user connectdb
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 55432 for user connectuser
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432 for user connectuser
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432 for user connectuser
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ecpg_finish: Connection connectdb closed.
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port 55432 for user connectuser
|
||||
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: connect: could not open database nonexistant on localhost port 55432 for user connectuser in line 62
|
||||
[NO_PID]: connect: could not open database nonexistant on localhost port <REGRESSION_PORT> for user connectuser in line 62
|
||||
FATAL: database "nonexistant" does not exist
|
||||
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
@ -67,9 +64,9 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
|
||||
[NO_PID]: sqlca: code: -402, state: 08001
|
||||
[NO_PID]: raising sqlcode -220 in line 63, 'No such connection CURRENT in line 63.'.
|
||||
[NO_PID]: sqlca: code: -220, state: 08003
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port 20 for user connectuser
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: connect: could not open database connectdb on localhost port 20 for user connectuser in line 66
|
||||
[NO_PID]: connect: could not open database connectdb on localhost port <REGRESSION_PORT> for user connectuser in line 66
|
||||
could not connect to server: Connection refused
|
||||
Is the server running on host "localhost" and accepting
|
||||
TCP/IP connections on port 20?
|
||||
@ -79,5 +76,5 @@ THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
[NO_PID]: raising sqlcode -402 in line 66, 'Could not connect to database connectdb in line 66.'.
|
||||
[NO_PID]: sqlca: code: -402, state: 08001
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port 55432 for user connectuser
|
||||
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
|
||||
[NO_PID]: sqlca: code: 0, state: 00000
|
||||
|
@ -1,3 +0,0 @@
|
||||
|
||||
THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,4 +1,5 @@
|
||||
/* Processed by ecpg (4.3.1) */
|
||||
/* Processed by ecpg (regression mode) */
|
||||
int ecpg_internal_regression_mode = 1;
|
||||
/* These include files are added by the preprocessor */
|
||||
#include <ecpgtype.h>
|
||||
#include <ecpglib.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
#! /bin/sh
|
||||
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress.sh,v 1.15 2006/09/26 07:56:56 meskes Exp $
|
||||
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/pg_regress.sh,v 1.16 2007/01/11 15:47:33 meskes Exp $
|
||||
|
||||
me=`basename $0`
|
||||
|
||||
@ -707,7 +707,7 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
|
||||
# this variable prevents that the PID gets included in the logfiles
|
||||
ECPG_REGRESSION=1; export ECPG_REGRESSION
|
||||
#ECPG_REGRESSION=1; export ECPG_REGRESSION
|
||||
LD_LIBRARY_PATH=$libdir:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
|
||||
|
||||
DIFFPRETTYFLAGS="$DIFFFLAGS -C3"
|
||||
@ -753,19 +753,19 @@ for i in \
|
||||
# so tweak output files and replace the port number (we put a warning
|
||||
# but the price to pay is that we have to tweak the files every time
|
||||
# now not only if the port differs from the standard port).
|
||||
if [ "$i" = "connect/test1.pgc" ]; then
|
||||
#if [ "$i" = "connect/test1.pgc" ]; then
|
||||
# can we use sed -i on all platforms?
|
||||
for f in "$outfile_stderr" "$outfile_stdout" "$outfile_source"; do
|
||||
mv $f $f.tmp
|
||||
echo >> $f
|
||||
echo "THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT" >> $f
|
||||
echo >> $f
|
||||
# for f in "$outfile_stderr" "$outfile_stdout" "$outfile_source"; do
|
||||
# mv $f $f.tmp
|
||||
# echo >> $f
|
||||
# echo "THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT" >> $f
|
||||
# echo >> $f
|
||||
# MinGW could return such a line:
|
||||
# "could not connect to server: Connection refused (0x0000274D/10061)"
|
||||
cat $f.tmp | sed -e s,$PGPORT,55432,g | sed -e "s,could not connect to server: Connection refused (0x.*/.*),could not connect to server: Connection refused,g" >> $f
|
||||
rm $f.tmp
|
||||
done
|
||||
fi
|
||||
#cat $f.tmp | sed -e s,$PGPORT,55432,g | sed -e "s,could not connect to server: Connection refused (0x.*/.*),could not connect to server: Connection refused,g" >> $f
|
||||
# rm $f.tmp
|
||||
# done
|
||||
#fi
|
||||
|
||||
mv "$outfile_source" "$outfile_source.tmp"
|
||||
cat "$outfile_source.tmp" | sed -e 's,^\(#line [0-9]*\) ".*/\([^/]*\)",\1 "\2",' > "$outfile_source"
|
||||
|
Loading…
x
Reference in New Issue
Block a user