Further Mylog renewal.
authorHiroshi Inoue <h-inoue@dream.email.ne.jp>
Sun, 27 Aug 2017 13:06:59 +0000 (22:06 +0900)
committerHiroshi Inoue <h-inoue@dream.email.ne.jp>
Sun, 27 Aug 2017 13:06:59 +0000 (22:06 +0900)
26 files changed:
bind.c
columninfo.c
connection.c
convert.c
descriptor.c
dlg_specific.c
dlg_wingui.c
drvconn.c
environ.c
execute.c
info.c
inouealc.c
misc.c
multibyte.c
odbcapi.c
odbcapi30.c
odbcapi30w.c
odbcapiw.c
options.c
parse.c
pgapi30.c
pgtypes.c
qresult.c
results.c
statement.c
win_unicode.c

diff --git a/bind.c b/bind.c
index d92695664a488f043cf98d2b9b996e112f33916c..4d2dfc0640ec16428e6050ce373cc2f2626c5e21 100644 (file)
--- a/bind.c
+++ b/bind.c
@@ -48,7 +48,7 @@ PGAPI_BindParameter(HSTMT hstmt,
    IPDFields   *ipdopts;
    PutDataInfo *pdata_info;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    if (!stmt)
    {
@@ -135,7 +135,7 @@ PGAPI_BindParameter(HSTMT hstmt,
    if (stmt->status == STMT_DESCRIBED)
        SC_recycle_statement(stmt);
 
-   MYLOG(0, "%s: ipar=%d, paramType=%d, fCType=%d, fSqlType=%d, cbColDef=" FORMAT_ULEN ", ibScale=%d,", func, ipar, fParamType, fCType, fSqlType, cbColDef, ibScale);
+   MYLOG(0, "ipar=%d, paramType=%d, fCType=%d, fSqlType=%d, cbColDef=" FORMAT_ULEN ", ibScale=%d,", ipar, fParamType, fCType, fSqlType, cbColDef, ibScale);
    MYPRINTF(0, "rgbValue=%p(" FORMAT_LEN "), pcbValue=%p\n", rgbValue, cbValueMax, pcbValue);
 
    return SQL_SUCCESS;
@@ -158,9 +158,9 @@ PGAPI_BindCol(HSTMT hstmt,
    BindInfoClass   *bookmark;
    RETCODE     ret = SQL_SUCCESS;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
-   MYLOG(0, "**** PGAPI_BindCol: stmt = %p, icol = %d\n", stmt, icol);
+   MYLOG(0, "**** : stmt = %p, icol = %d\n", stmt, icol);
    MYLOG(0, "**** : fCType=%d rgb=%p valusMax=" FORMAT_LEN " pcb=%p\n", fCType, rgbValue, cbValueMax, pcbValue);
 
    if (!stmt)
@@ -314,7 +314,7 @@ PGAPI_DescribeParam(HSTMT hstmt,
    OID     pgtype;
    ConnectionClass *conn;
 
-   MYLOG(0, "%s: entering...%d\n", func, ipar);
+   MYLOG(0, "entering...%d\n", ipar);
 
    if (!stmt)
    {
@@ -422,7 +422,7 @@ PGAPI_NumParams(HSTMT hstmt,
    StatementClass *stmt = (StatementClass *) hstmt;
    CSTR func = "PGAPI_NumParams";
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    if (!stmt)
    {
@@ -488,10 +488,9 @@ create_empty_bindings(int num_columns)
 void
 extend_parameter_bindings(APDFields *self, int num_params)
 {
-   CSTR func = "extend_parameter_bindings";
    ParameterInfoClass *new_bindings;
 
-   MYLOG(0, "%s: entering ... self=%p, parameters_allocated=%d, num_params=%d,%p\n", func, self, self->allocated, num_params, self->parameters);
+   MYLOG(0, "entering ... self=%p, parameters_allocated=%d, num_params=%d,%p\n", self, self->allocated, num_params, self->parameters);
 
    /*
     * if we have too few, allocate room for more, and copy the old
@@ -502,7 +501,7 @@ extend_parameter_bindings(APDFields *self, int num_params)
        new_bindings = (ParameterInfoClass *) realloc(self->parameters, sizeof(ParameterInfoClass) * num_params);
        if (!new_bindings)
        {
-           MYLOG(0, "%s: unable to create %d new bindings from %d old bindings\n", func, num_params, self->allocated);
+           MYLOG(0, "unable to create %d new bindings from %d old bindings\n", num_params, self->allocated);
 
            if (self->parameters)
                free(self->parameters);
@@ -516,16 +515,15 @@ extend_parameter_bindings(APDFields *self, int num_params)
        self->allocated = num_params;
    }
 
-   MYLOG(0, "exit %s=%p\n", func, self->parameters);
+   MYLOG(0, "leaving %p\n", self->parameters);
 }
 
 void
 extend_iparameter_bindings(IPDFields *self, int num_params)
 {
-   CSTR func = "extend_iparameter_bindings";
    ParameterImplClass *new_bindings;
 
-   MYLOG(0, "%s: entering ... self=%p, parameters_allocated=%d, num_params=%d\n", func, self, self->allocated, num_params);
+   MYLOG(0, "entering ... self=%p, parameters_allocated=%d, num_params=%d\n", self, self->allocated, num_params);
 
    /*
     * if we have too few, allocate room for more, and copy the old
@@ -536,7 +534,7 @@ extend_iparameter_bindings(IPDFields *self, int num_params)
        new_bindings = (ParameterImplClass *) realloc(self->parameters, sizeof(ParameterImplClass) * num_params);
        if (!new_bindings)
        {
-           MYLOG(0, "%s: unable to create %d new bindings from %d old bindings\n", func, num_params, self->allocated);
+           MYLOG(0, "unable to create %d new bindings from %d old bindings\n", num_params, self->allocated);
 
            if (self->parameters)
                free(self->parameters);
@@ -551,15 +549,14 @@ extend_iparameter_bindings(IPDFields *self, int num_params)
        self->allocated = num_params;
    }
 
-   MYLOG(0, "exit %s=%p\n", func, self->parameters);
+   MYLOG(0, "leaving %p\n", self->parameters);
 }
 
 void
 reset_a_parameter_binding(APDFields *self, int ipar)
 {
-   CSTR func = "reset_a_parameter_binding";
 
-   MYLOG(0, "%s: entering ... self=%p, parameters_allocated=%d, ipar=%d\n", func, self, self->allocated, ipar);
+   MYLOG(0, "entering ... self=%p, parameters_allocated=%d, ipar=%d\n", self, self->allocated, ipar);
 
    if (ipar < 1 || ipar > self->allocated)
        return;
@@ -578,9 +575,7 @@ reset_a_parameter_binding(APDFields *self, int ipar)
 void
 reset_a_iparameter_binding(IPDFields *self, int ipar)
 {
-   CSTR func = "reset_a_iparameter_binding";
-
-   MYLOG(0, "%s: entering ... self=%p, parameters_allocated=%d, ipar=%d\n", func, self, self->allocated, ipar);
+   MYLOG(0, "entering ... self=%p, parameters_allocated=%d, ipar=%d\n", self, self->allocated, ipar);
 
    if (ipar < 1 || ipar > self->allocated)
        return;
@@ -645,8 +640,7 @@ CountParameters(const StatementClass *self, Int2 *inputCount, Int2 *ioCount, Int
 void
 APD_free_params(APDFields *apdopts, char option)
 {
-   CSTR    func = "APD_free_params";
-   MYLOG(0, "%s:  ENTER, self=%p\n", func, apdopts);
+   MYLOG(0, "entering self=%p\n", apdopts);
 
    if (!apdopts->parameters)
        return;
@@ -658,16 +652,15 @@ APD_free_params(APDFields *apdopts, char option)
        apdopts->allocated = 0;
    }
 
-   MYLOG(0, "%s:  EXIT\n", func);
+   MYLOG(0, "leaving\n");
 }
 
 void
 PDATA_free_params(PutDataInfo *pdata, char option)
 {
-   CSTR    func = "PDATA_free_params";
    int         i;
 
-   MYLOG(0, "%s:  ENTER, self=%p\n", func, pdata);
+   MYLOG(0, "entering self=%p\n", pdata);
 
    if (!pdata->pdata)
        return;
@@ -693,7 +686,7 @@ PDATA_free_params(PutDataInfo *pdata, char option)
        pdata->allocated = 0;
    }
 
-   MYLOG(0, "%s:  EXIT\n", func);
+   MYLOG(0, "leaving\n");
 }
 
 /*
@@ -702,9 +695,7 @@ PDATA_free_params(PutDataInfo *pdata, char option)
 void
 IPD_free_params(IPDFields *ipdopts, char option)
 {
-   CSTR    func = "IPD_free_params";
-
-   MYLOG(0, "%s:  ENTER, self=%p\n", func, ipdopts);
+   MYLOG(0, "entering self=%p\n", ipdopts);
 
    if (!ipdopts->parameters)
        return;
@@ -715,17 +706,16 @@ IPD_free_params(IPDFields *ipdopts, char option)
        ipdopts->allocated = 0;
    }
 
-   MYLOG(0, "%s:  EXIT\n", func);
+   MYLOG(0, "leaving\n");
 }
 
 void
 extend_column_bindings(ARDFields *self, int num_columns)
 {
-   CSTR func = "extend_column_bindings";
    BindInfoClass *new_bindings;
    int         i;
 
-   MYLOG(0, "%s: entering ... self=%p, bindings_allocated=%d, num_columns=%d\n", func, self, self->allocated, num_columns);
+   MYLOG(0, "entering ... self=%p, bindings_allocated=%d, num_columns=%d\n", self, self->allocated, num_columns);
 
    /*
     * if we have too few, allocate room for more, and copy the old
@@ -736,7 +726,7 @@ extend_column_bindings(ARDFields *self, int num_columns)
        new_bindings = create_empty_bindings(num_columns);
        if (!new_bindings)
        {
-           MYLOG(0, "%s: unable to create %d new bindings from %d old bindings\n", func, num_columns, self->allocated);
+           MYLOG(0, "unable to create %d new bindings from %d old bindings\n", num_columns, self->allocated);
 
            if (self->bindings)
            {
@@ -769,16 +759,15 @@ extend_column_bindings(ARDFields *self, int num_columns)
    /* SQLExecDirect(...)  # returns 5 cols */
    /* SQLExecDirect(...)  # returns 10 cols  (now OK) */
 
-   MYLOG(0, "exit %s=%p\n", func, self->bindings);
+   MYLOG(0, "leaving %p\n", self->bindings);
 }
 
 void
 reset_a_column_binding(ARDFields *self, int icol)
 {
-   CSTR func = "reset_a_column_binding";
    BindInfoClass   *bookmark;
 
-   MYLOG(0, "%s: entering ... self=%p, bindings_allocated=%d, icol=%d\n", func, self, self->allocated, icol);
+   MYLOG(0, "entering ... self=%p, bindings_allocated=%d, icol=%d\n", self, self->allocated, icol);
 
    if (icol > self->allocated)
        return;
@@ -810,7 +799,7 @@ void    ARD_unbind_cols(ARDFields *self, BOOL freeall)
 {
    Int2    lf;
 
-MYLOG(1, "ARD_unbind_cols freeall=%d allocated=%d bindings=%p\n", freeall, self->allocated, self->bindings);
+MYLOG(1, "freeall=%d allocated=%d bindings=%p\n", freeall, self->allocated, self->bindings);
    for (lf = 1; lf <= self->allocated; lf++)
        reset_a_column_binding(self, lf);
    if (freeall)
@@ -825,7 +814,7 @@ void    GDATA_unbind_cols(GetDataInfo *self, BOOL freeall)
 {
    Int2    lf;
 
-MYLOG(1, "GDATA_unbind_cols freeall=%d allocated=%d gdata=%p\n", freeall, self->allocated, self->gdata);
+MYLOG(1, "freeall=%d allocated=%d gdata=%p\n", freeall, self->allocated, self->gdata);
    if (self->fdata.ttlbuf)
    {
        free(self->fdata.ttlbuf);
@@ -874,10 +863,9 @@ create_empty_gdata(int num_columns)
 void
 extend_getdata_info(GetDataInfo *self, int num_columns, BOOL shrink)
 {
-   CSTR func = "extend_getdata_info";
    GetDataClass    *new_gdata;
 
-   MYLOG(0, "%s: entering ... self=%p, gdata_allocated=%d, num_columns=%d\n", func, self, self->allocated, num_columns);
+   MYLOG(0, "entering ... self=%p, gdata_allocated=%d, num_columns=%d\n", self, self->allocated, num_columns);
 
    /*
     * if we have too few, allocate room for more, and copy the old
@@ -888,7 +876,7 @@ extend_getdata_info(GetDataInfo *self, int num_columns, BOOL shrink)
        new_gdata = create_empty_gdata(num_columns);
        if (!new_gdata)
        {
-           MYLOG(0, "%s: unable to create %d new gdata from %d old gdata\n", func, num_columns, self->allocated);
+           MYLOG(0, "unable to create %d new gdata from %d old gdata\n", num_columns, self->allocated);
 
            if (self->gdata)
            {
@@ -929,7 +917,7 @@ extend_getdata_info(GetDataInfo *self, int num_columns, BOOL shrink)
     * about it by unbinding those columns.
     */
 
-   MYLOG(0, "exit extend_gdata_info=%p\n", self->gdata);
+   MYLOG(0, "leaving %p\n", self->gdata);
 }
 void   reset_a_getdata_info(GetDataInfo *gdata_info, int icol)
 {
@@ -954,10 +942,9 @@ void PutDataInfoInitialize(PutDataInfo *pdata_info)
 void
 extend_putdata_info(PutDataInfo *self, int num_params, BOOL shrink)
 {
-   CSTR func = "extend_putdata_info";
    PutDataClass    *new_pdata;
 
-   MYLOG(0, "%s: entering ... self=%p, parameters_allocated=%d, num_params=%d\n", func, self, self->allocated, num_params);
+   MYLOG(0, "entering ... self=%p, parameters_allocated=%d, num_params=%d\n", self, self->allocated, num_params);
 
    /*
     * if we have too few, allocate room for more, and copy the old
@@ -973,7 +960,7 @@ extend_putdata_info(PutDataInfo *self, int num_params, BOOL shrink)
        new_pdata = (PutDataClass *) realloc(self->pdata, sizeof(PutDataClass) * num_params);
        if (!new_pdata)
        {
-           MYLOG(0, "%s: unable to create %d new pdata from %d old pdata\n", func, num_params, self->allocated);
+           MYLOG(0, "unable to create %d new pdata from %d old pdata\n", num_params, self->allocated);
 
            self->pdata = NULL;
            self->allocated = 0;
@@ -999,7 +986,7 @@ extend_putdata_info(PutDataInfo *self, int num_params, BOOL shrink)
        }
    }
 
-   MYLOG(0, "exit %s=%p\n", func, self->pdata);
+   MYLOG(0, "leaving %p\n", self->pdata);
 }
 void   reset_a_putdata_info(PutDataInfo *pdata_info, int ipar)
 {
index 0f010c689d26a056f52f7ae6946be8284623bf8c..9160ce678ea1914efa97d89144506b6d5a563a76 100644 (file)
@@ -56,7 +56,6 @@ CI_Destructor(ColumnInfoClass *self)
 BOOL
 CI_read_fields_from_pgres(ColumnInfoClass *self, PGresult *pgres)
 {
-   CSTR        func = "CI_read_fields";
    Int2        lf;
    int         new_num_fields;
    OID     new_adtid, new_relid = 0, new_attid = 0;
@@ -103,7 +102,7 @@ CI_read_fields_from_pgres(ColumnInfoClass *self, PGresult *pgres)
        if (new_atttypmod < 0)
            new_atttypmod = -1;
 
-       MYLOG(0, "%s: fieldname='%s', adtid=%d, adtsize=%d, atttypmod=%d (rel,att)=(%d,%d)\n", func, new_field_name, new_adtid, new_adtsize, new_atttypmod, new_relid, new_attid);
+       MYLOG(0, "fieldname='%s', adtid=%d, adtsize=%d, atttypmod=%d (rel,att)=(%d,%d)\n", new_field_name, new_adtid, new_adtsize, new_atttypmod, new_relid, new_attid);
 
        if (self)
            CI_set_field_info(self, lf, new_field_name, new_adtid, new_adtsize, new_atttypmod, new_relid, new_attid);
index 3df8711a2d0d6923e7623e6a80d5b01419431b89..85ea06a39ed3e4523747d5b744997e315f1293f8 100644 (file)
@@ -77,10 +77,10 @@ PGAPI_AllocConnect(HENV henv,
    ConnectionClass *conn;
    CSTR func = "PGAPI_AllocConnect";
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    conn = CC_Constructor();
-   MYLOG(0, "**** %s: henv = %p, conn = %p\n", func, henv, conn);
+   MYLOG(0, "**** henv = %p, conn = %p\n", henv, conn);
 
    if (!conn)
    {
@@ -123,7 +123,7 @@ PGAPI_Connect(HDBC hdbc,
    RETCODE ret = SQL_SUCCESS;
    char    fchar, *tmpstr;
 
-   MYLOG(0, "%s: entering..cbDSN=%hi.\n", func, cbDSN);
+   MYLOG(0, "entering..cbDSN=%hi.\n", cbDSN);
 
    if (!conn)
    {
@@ -159,7 +159,7 @@ PGAPI_Connect(HDBC hdbc,
        free(tmpstr);
    }
 
-   QLOG(0, "conn = %p, %s(DSN='%s', UID='%s', PWD='%s')\n", conn, func, ci->dsn, ci->username, NAME_IS_VALID(ci->password) ? "xxxxx" : "");
+   QLOG(0, "conn = %p (DSN='%s', UID='%s', PWD='%s')\n", conn, ci->dsn, ci->username, NAME_IS_VALID(ci->password) ? "xxxxx" : "");
 
    if ((fchar = CC_connect(conn, NULL)) <= 0)
    {
@@ -170,7 +170,7 @@ PGAPI_Connect(HDBC hdbc,
    if (SQL_SUCCESS == ret && 2 == fchar)
        ret = SQL_SUCCESS_WITH_INFO;
 
-   MYLOG(0, "%s: returning..%d.\n", func, ret);
+   MYLOG(0, "leaving..%d.\n", ret);
 
    return ret;
 }
@@ -187,7 +187,7 @@ PGAPI_BrowseConnect(HDBC hdbc,
    CSTR func = "PGAPI_BrowseConnect";
    ConnectionClass *conn = (ConnectionClass *) hdbc;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    CC_set_error(conn, CONN_NOT_IMPLEMENTED_ERROR, "Function not implemented", func);
    return SQL_ERROR;
@@ -202,7 +202,7 @@ PGAPI_Disconnect(HDBC hdbc)
    CSTR func = "PGAPI_Disconnect";
 
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    if (!conn)
    {
@@ -217,13 +217,13 @@ PGAPI_Disconnect(HDBC hdbc)
    }
 
    logs_on_off(-1, conn->connInfo.drivers.debug, conn->connInfo.drivers.commlog);
-   MYLOG(0, "%s: about to CC_cleanup\n", func);
+   MYLOG(0, "about to CC_cleanup\n");
 
    /* Close the connection and free statements */
    CC_cleanup(conn, FALSE);
 
-   MYLOG(0, "%s: done CC_cleanup\n", func);
-   MYLOG(0, "%s: returning...\n", func);
+   MYLOG(0, "done CC_cleanup\n");
+   MYLOG(0, "leaving...\n");
 
    return SQL_SUCCESS;
 }
@@ -236,8 +236,7 @@ PGAPI_FreeConnect(HDBC hdbc)
    CSTR func = "PGAPI_FreeConnect";
    EnvironmentClass *env;
 
-   MYLOG(0, "%s: entering...\n", func);
-   MYLOG(0, "**** in %s: hdbc=%p\n", func, hdbc);
+   MYLOG(0, "entering...hdbc=%p\n", hdbc);
 
    if (!conn)
    {
@@ -255,7 +254,7 @@ PGAPI_FreeConnect(HDBC hdbc)
 
    CC_Destructor(conn);
 
-   MYLOG(0, "%s: returning...\n", func);
+   MYLOG(0, "leaving...\n");
 
    return SQL_SUCCESS;
 }
@@ -358,7 +357,7 @@ CC_Constructor()
 char
 CC_Destructor(ConnectionClass *self)
 {
-   MYLOG(0, "enter CC_Destructor, self=%p\n", self);
+   MYLOG(0, "entering self=%p\n", self);
 
    if (self->status == CONN_EXECUTING)
        return 0;
@@ -389,7 +388,7 @@ CC_Destructor(ConnectionClass *self)
    DELETE_CONNLOCK(self);
    free(self);
 
-   MYLOG(0, "exit CC_Destructor\n");
+   MYLOG(0, "leaving\n");
 
    return 1;
 }
@@ -404,7 +403,7 @@ CC_cursor_count(ConnectionClass *self)
                count = 0;
    QResultClass        *res;
 
-   MYLOG(0, "CC_cursor_count: self=%p, num_stmts=%d\n", self, self->num_stmts);
+   MYLOG(0, "self=%p, num_stmts=%d\n", self, self->num_stmts);
 
    CONNLOCK_ACQUIRE(self);
    for (i = 0; i < self->num_stmts; i++)
@@ -415,7 +414,7 @@ CC_cursor_count(ConnectionClass *self)
    }
    CONNLOCK_RELEASE(self);
 
-   MYLOG(0, "CC_cursor_count: returning %d\n", count);
+   MYLOG(0, "leaving %d\n", count);
 
    return count;
 }
@@ -464,7 +463,7 @@ CC_begin(ConnectionClass *self)
    if (!CC_is_in_trans(self))
    {
        QResultClass *res = CC_send_query(self, bgncmd, NULL, 0, NULL);
-       MYLOG(0, "CC_begin:  sending BEGIN!\n");
+       MYLOG(0, "  sending BEGIN!\n");
 
        ret = QR_command_maybe_successful(res);
        QR_Destructor(res);
@@ -488,7 +487,7 @@ CC_commit(ConnectionClass *self)
        if (CC_is_in_trans(self))
        {
            QResultClass *res = CC_send_query(self, cmtcmd, NULL, 0, NULL);
-           MYLOG(0, "CC_commit:  sending COMMIT!\n");
+           MYLOG(0, "  sending COMMIT!\n");
            ret = QR_command_maybe_successful(res);
            QR_Destructor(res);
        }
@@ -508,7 +507,7 @@ CC_abort(ConnectionClass *self)
    if (CC_is_in_trans(self))
    {
        QResultClass *res = CC_send_query(self, rbkcmd, NULL, 0, NULL);
-       MYLOG(0, "CC_abort:  sending ABORT!\n");
+       MYLOG(0, "  sending ABORT!\n");
        ret = QR_command_maybe_successful(res);
        QR_Destructor(res);
    }
@@ -520,13 +519,12 @@ CC_abort(ConnectionClass *self)
 char
 CC_set_autocommit(ConnectionClass *self, BOOL on)
 {
-   CSTR func = "CC_set_autocommit";
    BOOL currsts = CC_is_in_autocommit(self);
 
    if ((on && currsts) ||
        (!on && !currsts))
        return on;
-   MYLOG(0, "%s: %d->%d\n", func, currsts, on);
+   MYLOG(0, " %d->%d\n", currsts, on);
    if (CC_is_in_trans(self))
        CC_commit(self);
    if (on)
@@ -654,7 +652,7 @@ CC_cleanup(ConnectionClass *self, BOOL keepCommunication)
    if (self->status == CONN_EXECUTING)
        return FALSE;
 
-   MYLOG(0, "in CC_Cleanup, self=%p\n", self);
+   MYLOG(0, "entering self=%p\n", self);
 
    ENTER_CONN_CS(self);
    /* Cancel an ongoing transaction */
@@ -745,7 +743,7 @@ CC_cleanup(ConnectionClass *self, BOOL keepCommunication)
    }
 
    LEAVE_CONN_CS(self);
-   MYLOG(0, "exit CC_Cleanup\n");
+   MYLOG(0, "leaving\n");
    return TRUE;
 }
 
@@ -809,7 +807,7 @@ handle_pgres_error(ConnectionClass *self, const PGresult *pgres,
    char    *sqlstate = NULL;
    int level = 0;
 
-   MYLOG(1, "handle_pgres_error\n");
+   MYLOG(1, "entering\n");
 
    sqlstate = PQresultErrorField(pgres, PG_DIAG_SQLSTATE);
    if (res && pgres)
@@ -823,7 +821,7 @@ handle_pgres_error(ConnectionClass *self, const PGresult *pgres,
    {
        const char *errmsg = "The connection has been lost";
 
-       MYLOG(0, "%s setting error message=%s\n", __FUNCTION__, errmsg);
+       MYLOG(0, "setting error message=%s\n", errmsg);
        QLOG(0, "\t%ssetting error message=%s\n", __FUNCTION__, errmsg);
        if (CC_get_errornumber(self) <= 0)
            CC_set_error(self, CONNECTION_COMMUNICATION_ERROR, errmsg, comment);
@@ -1018,7 +1016,7 @@ static char CC_initial_log(ConnectionClass *self, const char *func)
        return 0;
    }
 
-   MYLOG(0, "%s: DSN = '%s', server = '%s', port = '%s', database = '%s', username = '%s', password='%s'\n", func, ci->dsn, ci->server, ci->port, ci->database, ci->username, NAME_IS_VALID(ci->password) ? "xxxxx" : "");
+   MYLOG(0, "DSN = '%s', server = '%s', port = '%s', database = '%s', username = '%s', password='%s'\n", ci->dsn, ci->server, ci->port, ci->database, ci->username, NAME_IS_VALID(ci->password) ? "xxxxx" : "");
 
    return 1;
 }
@@ -1035,7 +1033,7 @@ LIBPQ_CC_connect(ConnectionClass *self, char *salt_para)
    CSTR        func = "LIBPQ_CC_connect";
    QResultClass    *res;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    if (0 == CC_initial_log(self, func))
        return 0;
@@ -1063,9 +1061,7 @@ CC_connect(ConnectionClass *self, char *salt_para)
    char        ret, *saverr = NULL, retsend;
    const char  *errmsg = NULL;
 
-   MYLOG(0, "%s: entering...\n", func);
-
-   MYLOG(0, "sslmode=%s\n", self->connInfo.sslmode);
+   MYLOG(0, "entering...sslmode=%s\n", self->connInfo.sslmode);
 
    ret = LIBPQ_CC_connect(self, salt_para);
    if (ret <= 0)
@@ -1140,7 +1136,7 @@ MYLOG(0, "conn->unicode=%d Client Encoding='%s' (Code %d)\n", self->unicode, sel
    ret = 1;
 
 cleanup:
-   MYLOG(0, "%s: returning...%d\n", func, ret);
+   MYLOG(0, "leaving...%d\n", ret);
    if (NULL != saverr)
    {
        if (ret > 0 && CC_get_errornumber(self) <= 0)
@@ -1160,7 +1156,7 @@ CC_add_statement(ConnectionClass *self, StatementClass *stmt)
    int i;
    char    ret = TRUE;
 
-   MYLOG(0, "CC_add_statement: self=%p, stmt=%p\n", self, stmt);
+   MYLOG(0, "self=%p, stmt=%p\n", self, stmt);
 
    CONNLOCK_ACQUIRE(self);
    for (i = 0; i < self->num_stmts; i++)
@@ -1208,7 +1204,7 @@ CC_set_error_statements(ConnectionClass *self)
 {
    int i;
 
-   MYLOG(0, "CC_error_statements: self=%p\n", self);
+   MYLOG(0, "entering self=%p\n", self);
 
    for (i = 0; i < self->num_stmts; i++)
    {
@@ -1367,7 +1363,7 @@ CC_get_error(ConnectionClass *self, int *number, char **message)
 {
    int         rv;
 
-   MYLOG(0, "enter CC_get_error\n");
+   MYLOG(0, "entering\n");
 
    CONNLOCK_ACQUIRE(self);
 
@@ -1380,7 +1376,7 @@ CC_get_error(ConnectionClass *self, int *number, char **message)
 
    CONNLOCK_RELEASE(self);
 
-   MYLOG(0, "exit CC_get_error\n");
+   MYLOG(0, "leaving\n");
 
    return rv;
 }
@@ -1461,7 +1457,7 @@ static void CC_clear_cursors(ConnectionClass *self, BOOL on_abort)
                        QR_set_cursor(res, NULL);
                    QR_Destructor(wres);
                    CONNLOCK_ACQUIRE(self);
-MYLOG(1, " !!!! %s:%p->permanent -> %d %p\n", __FUNCTION__, res, QR_is_permanent(res), QR_get_cursor(res));
+MYLOG(1, "%p->permanent -> %d %p\n", res, QR_is_permanent(res), QR_get_cursor(res));
                }
                else
                    QR_set_permanent(res);
@@ -1523,7 +1519,7 @@ void  CC_on_abort(ConnectionClass *conn, unsigned int opt)
 {
    BOOL    set_no_trans = FALSE;
 
-MYLOG(0, "CC_on_abort in opt=%x\n", opt);
+MYLOG(0, "entering opt=%x\n", opt);
    CONNLOCK_ACQUIRE(conn);
    if (0 != (opt & CONN_DEAD)) /* CONN_DEAD implies NO_TRANS also */
        opt |= NO_TRANS;
@@ -1569,7 +1565,7 @@ MYLOG(0, "CC_on_abort in opt=%x\n", opt);
 
 void   CC_on_abort_partial(ConnectionClass *conn)
 {
-MYLOG(0, "CC_on_abort_partial in\n");
+MYLOG(0, "entering\n");
    CONNLOCK_ACQUIRE(conn);
    ProcessRollback(conn, TRUE, TRUE);
    CC_discard_marked_objects(conn);
@@ -1635,7 +1631,7 @@ CC_internal_rollback(ConnectionClass *self, int rollback_type, BOOL ignore_abort
    {
        case PER_STATEMENT_ROLLBACK:
            GenerateSvpCommand(self, INTERNAL_ROLLBACK_OPERATION, cmd, sizeof(cmd));
-           MYLOG(0, " %s:rollback_type=%d %s\n", __FUNCTION__, rollback_type, cmd);
+           MYLOG(0, " rollback_type=%d %s\n", rollback_type, cmd);
            QLOG(0, "PQexec: %p '%s'\n", self->pqconn, cmd);
            pgres = PQexec(self->pqconn, cmd);
            switch (PQresultStatus(pgres))
@@ -1656,7 +1652,7 @@ CC_internal_rollback(ConnectionClass *self, int rollback_type, BOOL ignore_abort
        case PER_QUERY_ROLLBACK:
            SPRINTF_FIXED(cmd, "%s TO %s;%s %s"
                , rbkcmd, per_query_svp , rlscmd, per_query_svp);
-           MYLOG(0, " %s:query_rollback PQsendQuery %s\n", __FUNCTION__, cmd);
+           MYLOG(0, " query_rollback PQsendQuery %s\n", cmd);
            QLOG(0, "PQsendQuery: %p '%s'\n", self->pqconn, cmd);
            PQsendQuery(self->pqconn, cmd);
            ret = 0;
@@ -1679,7 +1675,7 @@ CC_internal_rollback(ConnectionClass *self, int rollback_type, BOOL ignore_abort
                if (ignore_abort)
                    CC_set_no_error_trans(self);
                else
-                   MYLOG(0, " %s:return error\n", __FUNCTION__);
+                   MYLOG(0, " return error\n");
            }
            LIBPQ_update_transaction_status(self);
            break;
@@ -1739,11 +1735,11 @@ CC_send_query_append(ConnectionClass *self, const char *query, QueryInfo *qi, UD
 
    if (appendq)
    {
-       MYLOG(0, "%s_append: conn=%p, query='%s'+'%s'\n", func, self, query, appendq);
+       MYLOG(0, "conn=%p, query='%s'+'%s'\n", self, query, appendq);
    }
    else
    {
-       MYLOG(0, "%s: conn=%p, query='%s'\n", func, self, query);
+       MYLOG(0, "conn=%p, query='%s'\n", self, query);
    }
 
    if (!self->pqconn)
@@ -1820,7 +1816,7 @@ CC_send_query_append(ConnectionClass *self, const char *query, QueryInfo *qi, UD
 
    /* append all these together, to avoid round-trips */
    query_len = strlen(query);
-   MYLOG(0, "%s:query_len=" FORMAT_SIZE_T "\n", __FUNCTION__, query_len);
+   MYLOG(0, "query_len=" FORMAT_SIZE_T "\n", query_len);
 
    initPQExpBuffer(&query_buf);
    /* issue_begin, query_rollback and prepend_savepoint are exclusive */
@@ -1856,7 +1852,7 @@ CC_send_query_append(ConnectionClass *self, const char *query, QueryInfo *qi, UD
        CC_set_error(self, CONN_NO_MEMORY_ERROR, "Couldn't alloc buffer for query.", "");
        goto cleanup;
    }
-MYLOG(1, "!!!! %s:query_buf=%s(" FORMAT_SIZE_T ")\n", __FUNCTION__, query_buf.data, strlen(query_buf.data));
+MYLOG(1, "query_buf=%s(" FORMAT_SIZE_T ")\n", query_buf.data, strlen(query_buf.data));
 
    /* Set up notice receiver */
    nrarg.conn = self;
@@ -1904,7 +1900,7 @@ MYLOG(1, "!!!! %s:query_buf=%s(" FORMAT_SIZE_T ")\n", __FUNCTION__, query_buf.da
                /* portal query command, no tuples returned */
                /* read in the return message from the backend */
                cmdbuffer = PQcmdStatus(pgres);
-               MYLOG(0, "send_query: ok - 'C' - %s\n", cmdbuffer);
+               MYLOG(0, " ok - 'C' - %s\n", cmdbuffer);
                QLOG(0, "\tok: - 'C' - %s\n", cmdbuffer);
 
                if (query_completed)    /* allow for "show" style notices */
@@ -1921,7 +1917,7 @@ MYLOG(1, "!!!! %s:query_buf=%s(" FORMAT_SIZE_T ")\n", __FUNCTION__, query_buf.da
                    nrarg.res = res;
                }
 
-               MYLOG(0, "send_query: setting cmdbuffer = '%s'\n", cmdbuffer);
+               MYLOG(0, " setting cmdbuffer = '%s'\n", cmdbuffer);
 
                my_trim(cmdbuffer); /* get rid of trailing space */
                if (strnicmp(cmdbuffer, bgncmd, strlen(bgncmd)) == 0)
@@ -2005,7 +2001,7 @@ MYLOG(1, "Discarded a RELEASE result\n");
                    QR_set_rstatus(res, PORES_COMMAND_OK);
                QR_set_command(res, cmdbuffer);
                query_completed = TRUE;
-               MYLOG(0, "send_query: returning res = %p\n", res);
+               MYLOG(0, " returning res = %p\n", res);
                break;
 
            case PGRES_EMPTY_QUERY:
@@ -2044,7 +2040,7 @@ MYLOG(1, "Discarded a RELEASE result\n");
                        if (stmt)
                            res->next->num_key_fields = stmt->num_key_fields;
                    }
-                   MYLOG(0, "send_query: 'T' no result_in: res = %p\n", res->next);
+                   MYLOG(0, " 'T' no result_in: res = %p\n", res->next);
                    res = res->next;
                    nrarg.res = res;
 
@@ -2122,7 +2118,7 @@ MYLOG(1, "Discarded a RELEASE result\n");
                handle_pgres_error(self, pgres, "send_query", res, TRUE);
                CC_on_abort(self, CONN_DEAD);
 
-               MYLOG(0, "send_query: error - %s\n", CC_get_errormsg(self));
+               MYLOG(0, " error - %s\n", CC_get_errormsg(self));
                ReadyToReturn = TRUE;
                retres = NULL;
                break;
@@ -2143,7 +2139,7 @@ cleanup:
        PQclear(pgres);
        pgres = NULL;
    }
-MYLOG(1, " !!!! %s:rollback_on_error=%d CC_is_in_trans=%d discard_next_savepoint=%d query_rollback=%d\n", __FUNCTION__, rollback_on_error, CC_is_in_trans(self), discard_next_savepoint, query_rollback);
+MYLOG(1, " rollback_on_error=%d CC_is_in_trans=%d discard_next_savepoint=%d query_rollback=%d\n", rollback_on_error, CC_is_in_trans(self), discard_next_savepoint, query_rollback);
    if (rollback_on_error && CC_is_in_trans(self) && !discard_next_savepoint)
    {
        if (query_rollback)
@@ -2218,7 +2214,7 @@ MYLOG(1, " !!!! %s:rollback_on_error=%d CC_is_in_trans=%d discard_next_savepoint
                    CC_set_errornumber(self, CONN_ERROR_IGNORED);
                    if (retres)
                        QR_set_rstatus(retres, PORES_NONFATAL_ERROR);
-MYLOG(1, " !!!! %s:ignored abort_on_conn\n", __FUNCTION__);
+MYLOG(1, " ignored abort_on_conn\n");
                }
                else if (retres)
                {
@@ -2302,7 +2298,7 @@ CC_send_function(ConnectionClass *self, const char *fn_name, void *result_buf, i
    Int4        intParamBufs[MAX_SEND_FUNC_ARGS];
    Int8        int8ParamBufs[MAX_SEND_FUNC_ARGS];
 
-   MYLOG(0, "send_function(): conn=%p, fn_name=%s, result_is_int=%d, nargs=%d\n", self, fn_name, result_is_int, nargs);
+   MYLOG(0, "conn=%p, fn_name=%s, result_is_int=%d, nargs=%d\n", self, fn_name, result_is_int, nargs);
 
    /* Finish the pending extended query first */
 #define    return DONT_CALL_RETURN_FROM_HERE???
@@ -2344,7 +2340,7 @@ CC_send_function(ConnectionClass *self, const char *fn_name, void *result_buf, i
                         paramTypes, (const char * const *) paramValues,
                         paramLengths, paramFormats, 1);
 
-   MYLOG(0, "send_function: done sending function\n");
+   MYLOG(0, "done sending function\n");
 
    if (PQresultStatus(pgres) == PGRES_TUPLES_OK)
        QLOG(0, "\tok: - 'T' - %s\n", PQcmdStatus(pgres));
@@ -2363,7 +2359,7 @@ CC_send_function(ConnectionClass *self, const char *fn_name, void *result_buf, i
    *actual_result_len = PQgetlength(pgres, 0, 0);
 
    QLOG(0, "\tgot result with length: %d\n", *actual_result_len);
-   MYLOG(0, "send_function(): got result with length %d\n", *actual_result_len);
+   MYLOG(0, "got result with length %d\n", *actual_result_len);
 
    if (*actual_result_len > 0)
    {
@@ -2412,7 +2408,7 @@ CC_send_settings(ConnectionClass *self, const char *set_query)
    CSTR func = "CC_send_settings";
 
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    if (set_query == NULL) return TRUE;
 
@@ -2445,7 +2441,7 @@ CC_send_settings(ConnectionClass *self, const char *set_query)
        if (!SQL_SUCCEEDED(result))
            status = FALSE;
 
-       MYLOG(0, "%s: result %d, status %d from '%s'\n", func, result, status, ptr);
+       MYLOG(0, "result %d, status %d from '%s'\n", result, status, ptr);
 
 #ifdef HAVE_STRTOK_R
        ptr = strtok_r(NULL, ";", &last);
@@ -2470,9 +2466,8 @@ static void
 CC_lookup_lo(ConnectionClass *self)
 {
    QResultClass    *res;
-   CSTR func = "CC_lookup_lo";
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    res = CC_send_query(self, "select oid, typbasetype from pg_type where typname = '"  PG_TYPE_LO_NAME "'",
        NULL, READ_ONLY_QUERY, NULL);
@@ -2846,7 +2841,7 @@ cleanup:
        self->pqconn = NULL;
    }
 
-   MYLOG(0, "%s: retuning %d\n", func, ret);
+   MYLOG(0, "leaving %d\n", ret);
    return ret;
 }
 
@@ -3422,7 +3417,7 @@ PgDtc_isolate(void *self, DWORD option)
        CC_cleanup(sconn, TRUE);
        if (newconn = CC_Copy(sconn), NULL == newconn)
            return newconn;
-       MYLOG(0, "%s:newconn=%p from %p\n", __FUNCTION__, newconn, sconn);
+       MYLOG(0, "newconn=%p from %p\n", newconn, sconn);
        CC_initialize(sconn, FALSE);
        if (!disposingConn)
            CC_copy_conninfo(&sconn->connInfo, &newconn->connInfo);
index 0663e730c2236e878b533c8faf236c2f135d824e..20445014c45b993fe37bf9577e1e757e0cc54db6 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -940,7 +940,7 @@ setup_getdataclass(SQLLEN * const length_return, const char ** const ptr_return,
                    if (SQL_C_WCHAR == fCType)
                        hybrid = (!is_utf8 || (same_encoding && wcs_debug));
            }
-           MYLOG(0, "%s:localize=%d hybrid=%d is_utf8=%d same_encoding=%d wcs_debug=%d\n", __FUNCTION__, localize_needed, hybrid, is_utf8, same_encoding, wcs_debug);
+           MYLOG(0, "localize=%d hybrid=%d is_utf8=%d same_encoding=%d wcs_debug=%d\n", localize_needed, hybrid, is_utf8, same_encoding, wcs_debug);
        }
    }
    if (fCType == SQL_C_WCHAR)
@@ -949,7 +949,7 @@ setup_getdataclass(SQLLEN * const length_return, const char ** const ptr_return,
            unicode_count = convert_from_pgbinary(neut_str, NULL, 0) * 2;
        else if (hybrid)
        {
-           MYLOG(0, "%s:hybrid estimate\n", __FUNCTION__);
+           MYLOG(0, "hybrid estimate\n");
            if ((unicode_count = bindcol_hybrid_estimate(neut_str, lf_conv, &allocbuf)) < 0)
            {
                result = COPY_INVALID_STRING_CONVERSION;
@@ -1029,7 +1029,7 @@ setup_getdataclass(SQLLEN * const length_return, const char ** const ptr_return,
                    utf8_to_ucs2_lf(neut_str, SQL_NTS, lf_conv, (SQLWCHAR *) pgdc->ttlbuf, unicode_count, FALSE);
                else /* hybrid */
                {
-                   MYLOG(0, "%s:hybrid convert\n", __FUNCTION__);
+                   MYLOG(0, "hybrid convert\n");
                    if (bindcol_hybrid_exec((SQLWCHAR *) pgdc->ttlbuf, neut_str, unicode_count + 1, lf_conv, &allocbuf) < 0)
                    {
                        result = COPY_INVALID_STRING_CONVERSION;
@@ -1108,7 +1108,7 @@ convert_text_field_to_sql_c(GetDataInfo * const gdata, const int current_col,
    int copy_len = 0, needbuflen = 0, i;
    const char  *ptr;
 
-   MYLOG(0, "%s:field_type=%u type=%d\n", __FUNCTION__, field_type, fCType);
+   MYLOG(0, "field_type=%u type=%d\n", field_type, fCType);
 
    switch (field_type)
    {
@@ -1296,7 +1296,7 @@ copy_and_convert_field(StatementClass *stmt,
 
    memset(&std_time, 0, sizeof(SIMPLE_TIME));
 
-   MYLOG(0, "copy_and_convert: field_type = %d, fctype = %d, value = '%s', cbValueMax=" FORMAT_LEN "\n", field_type, fCType, (value == NULL) ? "<NULL>" : value, cbValueMax);
+   MYLOG(0, "field_type = %d, fctype = %d, value = '%s', cbValueMax=" FORMAT_LEN "\n", field_type, fCType, (value == NULL) ? "<NULL>" : value, cbValueMax);
 
    if (!value)
    {
@@ -1562,7 +1562,7 @@ MYLOG(1, "2stime fr=%d\n", std_time.fr);
            fCType = SQL_C_CHAR;
 #endif
 
-       MYLOG(0, "copy_and_convert, SQL_C_DEFAULT: fCType = %d\n", fCType);
+       MYLOG(0, ", SQL_C_DEFAULT: fCType = %d\n", fCType);
    }
 
    text_bin_handling = FALSE;
@@ -2700,7 +2700,7 @@ prepareParametersNoDesc(StatementClass *stmt, BOOL fake_params, BOOL param_cast)
    QueryParse  query_org, *qp;
    QueryBuild  query_crt, *qb;
 
-MYLOG(1, "prepareParametersNoDesc\n");
+MYLOG(1, "entering\n");
    qp = &query_org;
    QP_initialize(qp, stmt);
    qb = &query_crt;
@@ -2739,7 +2739,7 @@ MYLOG(1, "prepareParametersNoDesc\n");
 
    SC_scanQueryAndCountParams(orgquery, conn, &endp1, &num_p1, &multi, NULL);
    SC_scanQueryAndCountParams(srvquery, conn, &endp2, NULL, NULL, NULL);
-   MYLOG(0, "%s:parsed for the first command length=" FORMAT_SSIZE_T "(" FORMAT_SSIZE_T ") num_p=%d\n", func, endp2, endp1, num_p1);
+   MYLOG(0, "parsed for the first command length=" FORMAT_SSIZE_T "(" FORMAT_SSIZE_T ") num_p=%d\n", endp2, endp1, num_p1);
    pstmt = buildProcessedStmt(srvquery,
                               endp2 < 0 ? SQL_NTS : endp2,
                               fake_params ? 0 : num_p1);
@@ -2756,7 +2756,7 @@ MYLOG(1, "prepareParametersNoDesc\n");
        num_pa += num_p1;
        SC_scanQueryAndCountParams(orgquery, conn, &endp1, &num_p1, &multi, NULL);
        SC_scanQueryAndCountParams(srvquery, conn, &endp2, &num_p2, NULL, NULL);
-       MYLOG(0, "%s:parsed for the subsequent command length=" FORMAT_SSIZE_T "(" FORMAT_SSIZE_T ") num_p=%d\n", func, endp2, endp1, num_p1);
+       MYLOG(0, "parsed for the subsequent command length=" FORMAT_SSIZE_T "(" FORMAT_SSIZE_T ") num_p=%d\n", endp2, endp1, num_p1);
        pstmt = buildProcessedStmt(srvquery,
                                   endp2 < 0 ? SQL_NTS : endp2,
                                   fake_params ? 0 : num_p1);
@@ -2795,7 +2795,7 @@ desc_params_and_sync(StatementClass *stmt)
    SQLSMALLINT num_pa = 0;
    ProcessedStmt *pstmt;
 
-MYLOG(1, "prep_params_and_sync\n");
+MYLOG(1, "entering\n");
 
    retval = SQL_ERROR;
 #define    return  DONT_CALL_RETURN_FROM_HERE???
@@ -2860,7 +2860,7 @@ RETCODE   prepareParameters(StatementClass *stmt, BOOL fake_params)
            return SQL_SUCCESS;
    }
 
-MYLOG(1, "prepareParameters\n");
+MYLOG(1, "calling prepareParameters\n");
 
    if (prepareParametersNoDesc(stmt, fake_params, PARSE_PARAM_CAST) == SQL_ERROR)
        return SQL_ERROR;
@@ -2886,7 +2886,7 @@ copy_statement_with_parameters(StatementClass *stmt, BOOL buildPrepareStatement)
    ConnInfo   *ci = &(conn->connInfo);
    const       char *bestitem = NULL;
 
-MYLOG(1, "%s: enter prepared=%d\n", func, stmt->prepared);
+MYLOG(1, "entering prepared=%d\n", stmt->prepared);
    if (!stmt->statement)
    {
        SC_set_error(stmt, STMT_INTERNAL_ERROR, "No statement string", func);
@@ -3575,7 +3575,7 @@ inner_process_tokens(QueryParse *qp, QueryBuild *qb)
                qb->errornumber = STMT_EXEC_ERROR;
                qb->errormsg = "ODBC escape convert error";
            }
-           MYLOG(0, "%s convert_escape error\n", func);
+           MYLOG(0, "convert_escape error\n");
            return SQL_ERROR;
        }
        PT_TOKEN_IGNORE(pt);
@@ -3905,7 +3905,7 @@ build_libpq_bind_params(StatementClass *stmt,
            STRCPY_FIXED(tmp, "Parameters exist but IPD isn't set. Please call SQLDescribeParam()");
        else
            SPRINTF_FIXED(tmp, "The # of IPD parameters %d < %d the # of parameter markers", ipdopts->allocated, num_params);
-       MYLOG(0, "%s:%s\n", __FUNCTION__, tmp);
+       MYLOG(0, "%s\n", tmp);
        SC_set_error(stmt, STMT_COUNT_FIELD_INCORRECT, tmp, func);
        return FALSE;
    }
@@ -4239,8 +4239,6 @@ static int
 ResolveOneParam(QueryBuild *qb, QueryParse *qp, BOOL *isnull, BOOL *isbinary,
                OID *pgType)
 {
-   CSTR func = "ResolveOneParam";
-
    ConnectionClass *conn = qb->conn;
    const APDFields *apdopts = qb->apdopts;
    const IPDFields *ipdopts = qb->ipdopts;
@@ -4293,7 +4291,7 @@ ResolveOneParam(QueryBuild *qb, QueryParse *qp, BOOL *isnull, BOOL *isbinary,
     */
    param_number = ++qb->param_number;
 
-MYLOG(1, "resolveOneParam %d(%d,%d)\n", param_number, ipdopts->allocated, apdopts->allocated);
+MYLOG(1, "para:%d(%d,%d)\n", param_number, ipdopts->allocated, apdopts->allocated);
    apara = NULL;
    ipara = NULL;
    if (param_number < apdopts->allocated)
@@ -4302,7 +4300,7 @@ MYLOG(1, "resolveOneParam %d(%d,%d)\n", param_number, ipdopts->allocated, apdopt
        ipara = ipdopts->parameters + param_number;
    if ((!apara || !ipara) && valueOutput)
    {
-       MYLOG(0, "%s:The # of (A|I)PD parameters (%d, %d) < %d the # of parameter markers\n", __FUNCTION__, apdopts->allocated, ipdopts->allocated, param_number);
+       MYLOG(0, "The # of (A|I)PD parameters (%d, %d) < %d the # of parameter markers\n", apdopts->allocated, ipdopts->allocated, param_number);
        qb->errormsg = "The # of binded parameters < the # of parameter markers";
        qb->errornumber = STMT_COUNT_FIELD_INCORRECT;
        CVT_TERMINATE(qb);  /* just in case */
@@ -4452,11 +4450,11 @@ MYLOG(1, "ipara=%p paramType=%d %d proc_return=%d\n", ipara, ipara ? ipara->para
        if (0 != param_pgtype)
        {
            param_sqltype = pgtype_attr_to_concise_type(conn, param_pgtype, PG_ATP_UNSET, PG_ADT_UNSET, PG_UNKNOWNS_UNSET);
-           MYLOG(0, "%s: convert from pgtype(%u) to sqltype(%d)\n", __FUNCTION__, param_pgtype, param_sqltype);
+           MYLOG(0, "convert from pgtype(%u) to sqltype(%d)\n", param_pgtype, param_sqltype);
        }
    }
 
-   MYLOG(0, "%s: from(fcType)=%d, to(fSqlType)=%d(%u), *pgType=%u\n", func,
+   MYLOG(0, "from(fcType)=%d, to(fSqlType)=%d(%u), *pgType=%u\n",
          param_ctype, param_sqltype, param_pgtype, *pgType);
 
    /* Handle NULL parameter data */
@@ -4521,7 +4519,7 @@ MYLOG(1, "ipara=%p paramType=%d %d proc_return=%d\n", ipara, ipara ? ipara->para
            case SQL_C_CHAR:
                if (!same_encoding || wcs_debug)
                {
-                   MYLOG(0, "%s:locale param convert\n", __FUNCTION__);
+                   MYLOG(0, "locale param convert\n");
                    if ((used = bindpara_msg_to_utf8(buffer, &allocbuf, used)) < 0)
                    {
                        qb->errormsg = "Could not convert from the current locale to wide characters";
@@ -4535,7 +4533,7 @@ MYLOG(1, "ipara=%p paramType=%d %d proc_return=%d\n", ipara, ipara ? ipara->para
            case SQL_C_WCHAR:
                if (!is_utf8 || (same_encoding && wcs_debug))
                {
-                   MYLOG(0, "%s:hybrid param convert\n", __FUNCTION__);
+                   MYLOG(0, "hybrid param convert\n");
                    if ((used = bindpara_wchar_to_msg((SQLWCHAR *) buffer, &allocbuf, used)) < 0)
                    {
                        qb->errormsg = "Could not convert from wide characters to the current locale";
@@ -4561,7 +4559,7 @@ MYLOG(1, "ipara=%p paramType=%d %d proc_return=%d\n", ipara, ipara ? ipara->para
 
 #ifdef UNICODE_SUPPORT
        case SQL_C_WCHAR:
-MYLOG(0, " %s:C_WCHAR=%d contents=%s(" FORMAT_LEN ")\n", __FUNCTION__, param_ctype, buffer, used);
+MYLOG(0, " C_WCHAR=%d contents=%s(" FORMAT_LEN ")\n", param_ctype, buffer, used);
            if (NULL == send_buf)
            {
                allocbuf = ucs2_to_utf8((SQLWCHAR *) buffer, used > 0 ? used / WCLEN : used, &used, FALSE);
@@ -5207,7 +5205,6 @@ static int
 processParameters(QueryParse *qp, QueryBuild *qb,
        size_t *output_count, SQLLEN param_pos[][2])
 {
-   CSTR func = "processParameters";
    int retval, innerParenthesis, param_count;
    BOOL stop;
 
@@ -5270,7 +5267,7 @@ processParameters(QueryParse *qp, QueryBuild *qb,
    }
    if (param_pos[param_count][0] >= 0)
    {
-       MYLOG(0, "%s closing ) not found %d\n", func, innerParenthesis);
+       MYLOG(0, "closing ) not found %d\n", innerParenthesis);
        qb->errornumber = STMT_EXEC_ERROR;
        qb->errormsg = "processParameters closing ) not found";
        return SQL_ERROR;
@@ -5304,7 +5301,6 @@ processParameters(QueryParse *qp, QueryBuild *qb,
 static int
 convert_escape(QueryParse *qp, QueryBuild *qb)
 {
-   CSTR func = "convert_escape";
    RETCODE retval = SQL_SUCCESS;
    char        buf[1024], buf_small[128], key[65];
    UCHAR   ucv;
@@ -5588,7 +5584,7 @@ MYLOG(0, FORMAT_LEN "-" FORMAT_LEN " num=%s SQL_BIT=%d\n", to, from, num, SQL_BI
                {
                    qb->errornumber = STMT_EXEC_ERROR;
                    qb->errormsg = "internal expression error";
-                   MYLOG(0, "%s internal expression error %s\n", func, mapExpr);
+                   MYLOG(0, "internal expression error %s\n", mapExpr);
                    retval = SQL_ERROR;
                    break;
                }
@@ -5929,13 +5925,13 @@ convert_from_pgbinary(const char *value, char *rgbValue, SQLLEN cbValueMax)
            i++;
        }
        /** if (rgbValue)
-           MYLOG(0, "convert_from_pgbinary: i=%d, rgbValue[%d] = %d, %c\n", i, o, rgbValue[o], rgbValue[o]); ***/
+           MYLOG(0, "i=%d, rgbValue[%d] = %d, %c\n", i, o, rgbValue[o], rgbValue[o]); ***/
    }
 
    if (rgbValue)
        rgbValue[o] = '\0';     /* extra protection */
 
-   MYLOG(0, "convert_from_pgbinary: in=" FORMAT_SIZE_T ", out = " FORMAT_SIZE_T "\n", ilen, o);
+   MYLOG(0, "in=" FORMAT_SIZE_T ", out = " FORMAT_SIZE_T "\n", ilen, o);
 
    return o;
 }
@@ -5984,7 +5980,6 @@ conv_to_octal2(UCHAR val, char *octal)
 static size_t
 convert_to_pgbinary(const char *in, char *out, size_t len, QueryBuild *qb)
 {
-   CSTR    func = "convert_to_pgbinary";
    UCHAR   inc;
    size_t          i, o = 0;
    char    escape_in_literal = CC_get_escape(qb->conn);
@@ -6004,7 +5999,7 @@ convert_to_pgbinary(const char *in, char *out, size_t len, QueryBuild *qb)
    for (i = 0; i < len; i++)
    {
        inc = in[i];
-       MYLOG(1, "%s: in[" FORMAT_SIZE_T "] = %d, %c\n", func, i, inc, inc);
+       MYLOG(1, "in[" FORMAT_SIZE_T "] = %d, %c\n", i, inc, inc);
        if (inc < 128 && (isalnum(inc) || inc == ' '))
            out[o++] = inc;
        else
@@ -6021,7 +6016,7 @@ convert_to_pgbinary(const char *in, char *out, size_t len, QueryBuild *qb)
        }
    }
 
-   MYLOG(0, "%s: returning " FORMAT_SIZE_T ", out='%.*s'\n", func, o, (int) o, out);
+   MYLOG(0, "leaving " FORMAT_SIZE_T ", out='%.*s'\n", o, (int) o, out);
 
    return o;
 }
index 3b6de89d47ba9430519ce2b1a856e297a397af72..3f5f9d58f1481873522750a9a1720ecfa7af73da 100644 (file)
@@ -34,7 +34,7 @@ void  TI_Destructor(TABLE_INFO **ti, int count)
 {
    int i;
 
-MYLOG(1, "TI_Destructor count=%d\n", count);
+MYLOG(1, "entering count=%d\n", count);
    if (ti)
    {
        for (i = 0; i < count; i++)
@@ -63,7 +63,7 @@ MYLOG(0, "!!!refcnt %p:%d -> %d\n", coli, coli->refcnt, coli->refcnt - 1);
 }
 void   FI_Constructor(FIELD_INFO *self, BOOL reuse)
 {
-MYLOG(1, "FI_Constructor reuse=%d\n", reuse);
+MYLOG(1, "entering reuse=%d\n", reuse);
    if (reuse)
        FI_Destructor(&self, 1, FALSE);
    memset(self, 0, sizeof(FIELD_INFO));
@@ -75,7 +75,7 @@ void  FI_Destructor(FIELD_INFO **fi, int count, BOOL freeFI)
 {
    int i;
 
-MYLOG(1, "FI_Destructor count=%d\n", count);
+MYLOG(1, "entering count=%d\n", count);
    if (fi)
    {
        for (i = 0; i < count; i++)
@@ -190,7 +190,7 @@ void    DC_Constructor(DescriptorClass *self, BOOL embedded, StatementClass *stmt)
 
 static void ARDFields_free(ARDFields * self)
 {
-MYLOG(1, "ARDFields_free %p bookmark=%p\n", self, self->bookmark);
+MYLOG(1, "entering %p bookmark=%p\n", self, self->bookmark);
    if (self->bookmark)
    {
        free(self->bookmark);
@@ -336,7 +336,7 @@ char CC_add_descriptor(ConnectionClass *self, DescriptorClass *desc)
    int new_num_descs;
    DescriptorClass **descs;
 
-   MYLOG(0, "CC_add_descriptor: self=%p, desc=%p\n", self, desc);
+   MYLOG(0, "entering self=%p, desc=%p\n", self, desc);
 
    for (i = 0; i < self->num_descs; i++)
    {
@@ -375,7 +375,7 @@ PGAPI_AllocDesc(HDBC ConnectionHandle,
    RETCODE ret = SQL_SUCCESS;
    DescriptorClass *desc;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    desc = (DescriptorClass *) malloc(sizeof(DescriptorClass));
    if (desc)
@@ -402,11 +402,10 @@ PGAPI_AllocDesc(HDBC ConnectionHandle,
 RETCODE SQL_API
 PGAPI_FreeDesc(SQLHDESC DescriptorHandle)
 {
-   CSTR func = "PGAPI_FreeDesc";
    DescriptorClass *desc = (DescriptorClass *) DescriptorHandle;
    RETCODE ret = SQL_SUCCESS;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
    DC_Destructor(desc);
    if (!desc->deschd.embedded)
    {
@@ -515,7 +514,6 @@ RETCODE SQL_API
 PGAPI_CopyDesc(SQLHDESC SourceDescHandle,
               SQLHDESC TargetDescHandle)
 {
-   CSTR func = "PGAPI_CopyDesc";
    RETCODE ret = SQL_ERROR;
    DescriptorClass *src, *target;
    DescriptorHeader    *srchd, *targethd;
@@ -523,7 +521,7 @@ PGAPI_CopyDesc(SQLHDESC SourceDescHandle,
    APDFields   *apd_src, *apd_tgt;
    IPDFields   *ipd_src, *ipd_tgt;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
    src = (DescriptorClass *) SourceDescHandle;
    target = (DescriptorClass *) TargetDescHandle;
    srchd = &(src->deschd);
@@ -736,12 +734,11 @@ PGAPI_DescError(SQLHDESC hdesc,
                SQLSMALLINT * pcbErrorMsg,
                UWORD flag)
 {
-   CSTR func = "PGAPI_DescError";
    /* CC: return an error of a hdesc  */
    DescriptorClass *desc = (DescriptorClass *) hdesc;
    DescriptorHeader *deschd = &(desc->deschd);
 
-   MYLOG(0, "%s RecN=%hd\n", func, RecNumber);
+   MYLOG(0, "entering RecN=%hd\n", RecNumber);
    deschd->pgerror = DC_create_errorinfo(desc);
    return ER_ReturnError(deschd->pgerror, RecNumber, szSqlState,
                pfNativeError, szErrorMsg, cbErrorMsgMax,
index 3fc1ea5bd2d20dc213aa1132e458bc8300228b42..10d74dc687ad89dc38c306433358bfe1e8b6191d 100644 (file)
@@ -597,7 +597,7 @@ copyConnAttributes(ConnInfo *ci, const char *attribute, const char *value)
    {
        ci->password = decode_or_remove_braces(value);
 #ifndef FORCE_PASSWORDE_DISPLAY
-       MYLOG(0, "%s: key='%s' value='xxxxxxxx'\n", __FUNCTION__, attribute);
+       MYLOG(0, "key='%s' value='xxxxxxxx'\n", attribute);
        printed = TRUE;
 #endif
    }
@@ -624,8 +624,8 @@ copyConnAttributes(ConnInfo *ci, const char *attribute, const char *value)
                /* ignore first part */
            }
            ci->rollback_on_error = atoi(ptr + 1);
-           MYLOG(0, "%s:key='%s' value='%s' rollback_on_error=%d\n",
-               __FUNCTION__, attribute, value, ci->rollback_on_error);
+           MYLOG(0, "key='%s' value='%s' rollback_on_error=%d\n",
+               attribute, value, ci->rollback_on_error);
            printed = TRUE;
        }
    }
@@ -695,8 +695,8 @@ copyConnAttributes(ConnInfo *ci, const char *attribute, const char *value)
                STRCPY_FIXED(ci->sslmode, SSLMODE_DISABLE);
                break;
        }
-       MYLOG(0, "%s:key='%s' value='%s' set to '%s'\n",
-               __FUNCTION__, attribute, value, ci->sslmode);
+       MYLOG(0, "key='%s' value='%s' set to '%s'\n",
+               attribute, value, ci->sslmode);
        printed = TRUE;
    }
    else if (stricmp(attribute, INI_ABBREVIATE) == 0)
@@ -723,8 +723,8 @@ copyConnAttributes(ConnInfo *ci, const char *attribute, const char *value)
        {
            setExtraOptions(ci, value, hex_format);
        }
-       MYLOG(0, "%s:key='%s' value='%s'(force_abbrev=%d bde=%d cvt_null_date=%x)\n",
-           __FUNCTION__, attribute, value, ci->force_abbrev_connstr, ci->bde_environment, ci->cvt_null_date_string);
+       MYLOG(0, "key='%s' value='%s'(force_abbrev=%d bde=%d cvt_null_date=%x)\n",
+           attribute, value, ci->force_abbrev_connstr, ci->bde_environment, ci->cvt_null_date_string);
        printed = TRUE;
    }
 
@@ -763,7 +763,7 @@ copyConnAttributes(ConnInfo *ci, const char *attribute, const char *value)
        found = FALSE;
 
    if (!printed)
-       MYLOG(0, "%s: key='%s' value='%s'%s\n", __FUNCTION__, attribute,
+       MYLOG(0, "key='%s' value='%s'%s\n", attribute,
            value, found ? NULL_STRING : " not found");
 
    return found;
@@ -773,7 +773,7 @@ copyConnAttributes(ConnInfo *ci, const char *attribute, const char *value)
 static void
 getCiDefaults(ConnInfo *ci)
 {
-   MYLOG(0, "calling %s\n", __FUNCTION__);
+   MYLOG(0, "entering\n");
 
    ci->drivers.debug = DEFAULT_DEBUG;
    ci->drivers.commlog = DEFAULT_COMMLOG;
@@ -837,7 +837,7 @@ get_Ci_Drivers(const char *section, const char *filename, GLOBAL_VALUES *comval)
 
 void getDriversDefaults(const char *drivername, GLOBAL_VALUES *comval)
 {
-   MYLOG(0, "%s:%p of the driver %s\n", __FUNCTION__, comval, NULL_IF_NULL(drivername));
+   MYLOG(0, "%p of the driver %s\n", comval, NULL_IF_NULL(drivername));
    get_Ci_Drivers(drivername, ODBCINST_INI, comval);
    if (NULL != drivername)
        STR_TO_NAME(comval->drivername, drivername);
@@ -846,7 +846,6 @@ void getDriversDefaults(const char *drivername, GLOBAL_VALUES *comval)
 void
 getDSNinfo(ConnInfo *ci, const char *configDrvrname)
 {
-   CSTR    func = "getDSNinfo";
    char       *DSN = ci->dsn;
    char    temp[LARGE_REGISTRY_LEN];
    const char *drivername;
@@ -855,7 +854,7 @@ getDSNinfo(ConnInfo *ci, const char *configDrvrname)
  * If a driver keyword was present, then dont use a DSN and return.
  * If DSN is null and no driver, then use the default datasource.
  */
-   MYLOG(0, "%s: DSN=%s driver=%s&%s\n", func, DSN,
+   MYLOG(0, "entering DSN=%s driver=%s&%s\n", DSN,
        ci->drivername, NULL_IF_NULL(configDrvrname));
 
    getCiDefaults(ci);
@@ -1298,12 +1297,11 @@ writeDSNinfo(const ConnInfo *ci)
 static void
 get_Ci_Drivers(const char *section, const char *filename, GLOBAL_VALUES *comval)
 {
-   CSTR    func = "get_Ci_Drivers";
    char        temp[256];
    BOOL    inst_position = (stricmp(filename, ODBCINST_INI) == 0);
 
    if (0 != strcmp(ODBCINST_INI, filename))
-       MYLOG(0, "%s:setting %s position of %s(%p)\n", func, filename, section, comval);
+       MYLOG(0, "setting %s position of %s(%p)\n", filename, section, comval);
 
    /*
     * It's not appropriate to handle debug or commlog here.
@@ -1685,8 +1683,7 @@ CC_conninfo_release(ConnInfo *conninfo)
 void
 CC_conninfo_init(ConnInfo *conninfo, UInt4 option)
 {
-   CSTR    func = "CC_conninfo_init";
-   MYLOG(0, "%s opt=%d\n", func, option);
+   MYLOG(0, "entering opt=%d\n", option);
 
    if (0 != (CLEANUP_FOR_REUSE & option))
        CC_conninfo_release(conninfo);
@@ -1751,7 +1748,7 @@ void  copy_globals(GLOBAL_VALUES *to, const GLOBAL_VALUES *from)
    CORR_STRCPY(extra_systable_prefixes);
    CORR_STRCPY(protocol);
 
-   MYLOG(0, "copy_globals driver=%s\n", SAFE_NAME(to->drivername));
+   MYLOG(0, "driver=%s\n", SAFE_NAME(to->drivername));
 }
 
 void   finalize_globals(GLOBAL_VALUES *glbv)
index 8bae363f3d288aa3bb8813626572ab4934720a94..c3e5b184ebec069caaa994d4acda85d7e1c14db8 100644 (file)
@@ -148,7 +148,7 @@ driver_optionsDraw(HWND hdlg, const ConnInfo *ci, int src, BOOL enable)
    const char * drivername = NULL;
    GLOBAL_VALUES defval;
 
-MYLOG(0, "!!!! %s;%d in\n", __FUNCTION__, src);
+MYLOG(0, "entering src=%d\n", src);
    init_globals(&defval);
    switch (src)
    {
@@ -215,7 +215,7 @@ driver_options_update(HWND hdlg, ConnInfo *ci)
 {
    GLOBAL_VALUES *comval;
 
-// MYLOG(0, "!!!! %s in\n", __FUNCTION__);
+MYLOG(2, "entering\n");
    comval = &(ci->drivers);
 
    comval->commlog = IsDlgButtonChecked(hdlg, DRV_COMMLOG);
@@ -306,7 +306,7 @@ global_optionsProc(HWND hdlg,
    GLOBAL_VALUES   defval;
 
 // if (WM_INITDIALOG == wMsg || WM_COMMAND == wMsg)
-// MYLOG(0, "!!!! %s:%d in\n", __FUNCTION__, wMsg);
+// MYLOG(0, "entering wMsg=%d\n", wMsg);
    init_globals(&defval);
    switch (wMsg)
    {
@@ -380,7 +380,7 @@ ds_options1Proc(HWND hdlg,
    char    strbuf[128];
 
 // if (WM_INITDIALOG == wMsg || WM_COMMAND == wMsg)
-// MYLOG(0, "!!!! %s:%d in\n", __FUNCTION__, wMsg);
+// MYLOG(0, "entering wMsg=%d in\n", wMsg);
    switch (wMsg)
    {
        case WM_INITDIALOG:
@@ -454,7 +454,7 @@ ds_options_update(HWND hdlg, ConnInfo *ci)
 {
    char        buf[128];
 
-   MYLOG(0, "%s: got ci = %p\n", __FUNCTION__, ci);
+   MYLOG(0, "entering got ci=%p\n", ci);
 
    /* Readonly */
    ITOA_FIXED(ci->onlyread, IsDlgButtonChecked(hdlg, DS_READONLY));
@@ -544,7 +544,7 @@ ds_options2Proc(HWND hdlg,
    BOOL        enable;
 
 // if (WM_INITDIALOG == wMsg || WM_COMMAND == wMsg)
-// MYLOG(0, "!!!! %s:%d in\n", __FUNCTION__, wMsg);
+// MYLOG(0, "entering wMsg=%d in\n", wMsg);
    switch (wMsg)
    {
        case WM_INITDIALOG:
@@ -697,7 +697,7 @@ ds_options3Draw(HWND hdlg, const ConnInfo *ci)
    BOOL    enable = TRUE;
    static BOOL defset = FALSE;
 
-MYLOG(0, "!!!! %s in\n", __FUNCTION__);
+MYLOG(0, "entering\n");
 #ifdef _HANDLE_ENLIST_IN_DTC_
    switch (ci->xa_opt)
    {
@@ -743,7 +743,7 @@ ds_options3_update(HWND hdlg, ConnInfo *ci)
    PQCONNINFOPARSEPROC pproc = NULL;
    PQCONNINFOFREEPROC  fproc = NULL;   
 
-   MYLOG(0, "%s: got ci = %p\n", __FUNCTION__, ci);
+   MYLOG(0, "entering got ci=%p\n", ci);
 
    /* Datasource libpq parameters */
    GetDlgItemText(hdlg, DS_LIBPQOPT, pqopt, sizeof(pqopt));
@@ -793,7 +793,7 @@ ds_options3Proc(HWND hdlg,
    DWORD       cmd;
 
 if (WM_INITDIALOG == wMsg || WM_COMMAND == wMsg)
-MYLOG(0, "!!!! %s:%d in\n", __FUNCTION__, wMsg);
+MYLOG(0, "entering wMsg=%d\n", wMsg);
    switch (wMsg)
    {
        case WM_INITDIALOG:
index 4cc3e504e50c9eaaa51ccccef07b5e6adb859f30..3d709b7b26e3d6d153d92017788db950a63723ad 100644 (file)
--- a/drvconn.c
+++ b/drvconn.c
@@ -116,7 +116,7 @@ PGAPI_DriverConnect(HDBC hdbc,
    int     reqs = 0;
 
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    if (!conn)
    {
@@ -127,13 +127,13 @@ PGAPI_DriverConnect(HDBC hdbc,
    connStrIn = make_string(szConnStrIn, cbConnStrIn, NULL, 0);
 
 #ifdef FORCE_PASSWORD_DISPLAY
-   MYLOG(0, "**** PGAPI_DriverConnect: fDriverCompletion=%d, connStrIn='%s'\n", fDriverCompletion, connStrIn);
+   MYLOG(0, "**** fDriverCompletion=%d, connStrIn='%s'\n", fDriverCompletion, connStrIn);
 #else
    if (get_mylog())
    {
        char    *hide_str = hide_password(connStrIn);
 
-       MYLOG(0, "**** PGAPI_DriverConnect: fDriverCompletion=%d, connStrIn='%s'\n", fDriverCompletion, NULL_IF_NULL(hide_str));
+       MYLOG(0, "**** fDriverCompletion=%d, connStrIn='%s'\n", fDriverCompletion, NULL_IF_NULL(hide_str));
        if (hide_str)
            free(hide_str);
    }
@@ -315,7 +315,7 @@ MYLOG(1, "before CC_connect\n");
    }
 #endif /* FORCE_PASSWORD_DISPLAY */
 
-   MYLOG(0, "PGAPI_DriverConnect: returning %d\n", result);
+   MYLOG(0, "leaving %d\n", result);
    return result;
 }
 
@@ -326,7 +326,7 @@ dconn_DoDialog(HWND hwnd, ConnInfo *ci)
 {
    LRESULT         dialog_result;
 
-   MYLOG(0, "dconn_DoDialog: ci = %p\n", ci);
+   MYLOG(0, "entering ci = %p\n", ci);
 
    if (hwnd)
    {
@@ -335,7 +335,7 @@ dconn_DoDialog(HWND hwnd, ConnInfo *ci)
        if (-1 == dialog_result)
        {
            int errc = GetLastError();
-           MYLOG(0, " %s:LastError=%d\n", __FUNCTION__, errc);
+           MYLOG(0, " LastError=%d\n", errc);
        }
        if (!dialog_result || (dialog_result == -1))
            return SQL_NO_DATA_FOUND;
@@ -343,7 +343,7 @@ dconn_DoDialog(HWND hwnd, ConnInfo *ci)
            return SQL_SUCCESS;
    }
 
-   MYLOG(0, " %s:No window specified\n", __FUNCTION__);
+   MYLOG(0, " No window specified\n");
    return SQL_ERROR;
 }
 
@@ -528,14 +528,14 @@ dconn_get_attributes(copyfunc func, const char *connect_string, ConnInfo *ci)
                    {
                        if (!delp)  /* error */
                        {
-                           MYLOG(0, "%s closing bracket doesn't exist 1\n", __FUNCTION__);
+                           MYLOG(0, "closing bracket doesn't exist 1\n");
                            ret = FALSE;
                            goto cleanup;
                        }
                        closep = strchr(delp + 1, CLOSING_BRACKET);
                        if (!closep)    /* error */
                        {
-                           MYLOG(0, "%s closing bracket doesn't exist 2\n", __FUNCTION__);
+                           MYLOG(0, "closing bracket doesn't exist 2\n");
                            ret = FALSE;
                            goto cleanup;
                        }
@@ -565,7 +565,7 @@ dconn_get_attributes(copyfunc func, const char *connect_string, ConnInfo *ci)
                            eoftok = TRUE;
                        break;
                    }
-MYLOG(0, "%s subsequent char to the closing bracket is %c value=%s\n", __FUNCTION__, closep[1], value);
+MYLOG(0, "subsequent char to the closing bracket is %c value=%s\n", closep[1], value);
                    ret = FALSE;
                    goto cleanup;
                }
index 36fb3d4dff8f7f280f3b8aed043cddffef36f539..1bd72223b53aaa7737f63bbb9af5b0f1108a03af 100644 (file)
--- a/environ.c
+++ b/environ.c
@@ -66,7 +66,7 @@ PGAPI_AllocEnv(HENV * phenv)
    CSTR func = "PGAPI_AllocEnv";
    SQLRETURN   ret = SQL_SUCCESS;
 
-   MYLOG(0, "**** in %s ** \n", func);
+   MYLOG(0, "entering\n");
 
    /*
     * For systems on which none of the constructor-making
@@ -85,7 +85,7 @@ PGAPI_AllocEnv(HENV * phenv)
        ret = SQL_ERROR;
    }
 
-   MYLOG(0, "** exit %s: phenv = %p **\n", func, *phenv);
+   MYLOG(0, "leaving phenv=%p\n", *phenv);
    return ret;
 }
 
@@ -97,7 +97,7 @@ PGAPI_FreeEnv(HENV henv)
    SQLRETURN   ret = SQL_SUCCESS;
    EnvironmentClass *env = (EnvironmentClass *) henv;
 
-   MYLOG(0, "**** in PGAPI_FreeEnv: env = %p ** \n", env);
+   MYLOG(0, "entering env=%p\n", env);
 
    if (env && EN_Destructor(env))
    {
@@ -189,7 +189,6 @@ ER_ReturnError(PG_ErrorInfo *pgerror,
               SQLSMALLINT * pcbErrorMsg,
               UWORD flag)
 {
-   CSTR func = "ER_ReturnError";
    /* CC: return an error of a hstmt  */
    PG_ErrorInfo    *error;
    BOOL        partial_ok = ((flag & PODBC_ALLOW_PARTIAL_EXTRACT) != 0);
@@ -200,7 +199,7 @@ ER_ReturnError(PG_ErrorInfo *pgerror,
        return SQL_NO_DATA_FOUND;
    error = pgerror;
    msg = error->__error_message;
-   MYLOG(0, "%s: status = %d, msg = #%s#\n", func, error->status, msg);
+   MYLOG(0, "entering status = %d, msg = #%s#\n", error->status, msg);
    msglen = (SQLSMALLINT) strlen(msg);
    /*
     *  Even though an application specifies a larger error message
@@ -280,7 +279,7 @@ PGAPI_ConnectError(HDBC hdbc,
    BOOL    once_again = FALSE;
    ssize_t     msglen;
 
-   MYLOG(0, "**** PGAPI_ConnectError: hdbc=%p <%d>\n", hdbc, cbErrorMsgMax);
+   MYLOG(0, "entering hdbc=%p <%d>\n", hdbc, cbErrorMsgMax);
    if (RecNumber != 1 && RecNumber != -1)
        return SQL_NO_DATA_FOUND;
    if (cbErrorMsgMax < 0)
@@ -408,7 +407,7 @@ PGAPI_EnvError(HENV henv,
    char        *msg = NULL;
    int     status;
 
-   MYLOG(0, "**** PGAPI_EnvError: henv=%p <%d>\n", henv, cbErrorMsgMax);
+   MYLOG(0, "entering henv=%p <%d>\n", henv, cbErrorMsgMax);
    if (RecNumber != 1 && RecNumber != -1)
        return SQL_NO_DATA_FOUND;
    if (cbErrorMsgMax < 0)
@@ -471,7 +470,7 @@ EN_Constructor(void)
 
    if (WSAStartup(wVersionRequested, &wsaData))
    {
-       MYLOG(0, "%s: WSAStartup error\n", __FUNCTION__);
+       MYLOG(0, " WSAStartup error\n");
        return rv;
    }
    /* Verify that this is the minimum version of WinSock */
@@ -481,7 +480,7 @@ EN_Constructor(void)
        ;
    else
    {
-       MYLOG(0, "%s: WSAStartup version=(%d,%d)\n", __FUNCTION__,
+       MYLOG(0, " WSAStartup version=(%d,%d)\n",
            LOBYTE(wsaData.wVersion), HIBYTE(wsaData.wVersion));
        goto cleanup;
    }
@@ -490,7 +489,7 @@ EN_Constructor(void)
    rv = (EnvironmentClass *) malloc(sizeof(EnvironmentClass));
    if (NULL == rv)
    {
-       MYLOG(0, "%s: malloc error\n", __FUNCTION__);
+       MYLOG(0, " malloc error\n");
        goto cleanup;
    }
    rv->errormsg = 0;
@@ -515,7 +514,7 @@ EN_Destructor(EnvironmentClass *self)
    int     lf, nullcnt;
    char        rv = 1;
 
-   MYLOG(0, "in EN_Destructor, self=%p\n", self);
+   MYLOG(0, "entering self=%p\n", self);
    if (!self)
        return 0;
 
@@ -553,7 +552,7 @@ EN_Destructor(EnvironmentClass *self)
 #ifdef WIN32
    WSACleanup();
 #endif
-   MYLOG(0, "exit EN_Destructor: rv = %d\n", rv);
+   MYLOG(0, "leaving rv=%d\n", rv);
 #ifdef _MEMORY_DEBUG_
    debug_memory_check();
 #endif   /* _MEMORY_DEBUG_ */
@@ -585,7 +584,7 @@ EN_add_connection(EnvironmentClass *self, ConnectionClass *conn)
    ConnectionClass **newa;
    char    ret = FALSE;
 
-   MYLOG(0, "EN_add_connection: self = %p, conn = %p\n", self, conn);
+   MYLOG(0, "entering self = %p, conn = %p\n", self, conn);
 
    ENTER_CONNS_CS;
    for (i = 0; i < conns_count; i++)
index 67614a79475cb457da7c4f47d7af2570aaa73f6c..2deddb608269a5f8e75e1d23ce3d40565f3ecebc 100644 (file)
--- a/execute.c
+++ b/execute.c
@@ -46,7 +46,7 @@ PGAPI_Prepare(HSTMT hstmt,
    RETCODE retval = SQL_SUCCESS;
    BOOL    prepared;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
 #define    return  DONT_CALL_RETURN_FROM_HERE???
    /* StartRollbackState(self); */
@@ -62,30 +62,30 @@ PGAPI_Prepare(HSTMT hstmt,
    switch (self->status)
    {
        case STMT_DESCRIBED:
-           MYLOG(0, "**** PGAPI_Prepare: STMT_DESCRIBED, recycle\n");
+           MYLOG(0, "**** STMT_DESCRIBED, recycle\n");
            SC_recycle_statement(self); /* recycle the statement, but do
                                         * not remove parameter bindings */
            break;
 
        case STMT_FINISHED:
-           MYLOG(0, "**** PGAPI_Prepare: STMT_FINISHED, recycle\n");
+           MYLOG(0, "**** STMT_FINISHED, recycle\n");
            SC_recycle_statement(self); /* recycle the statement, but do
                                         * not remove parameter bindings */
            break;
 
        case STMT_ALLOCATED:
-           MYLOG(0, "**** PGAPI_Prepare: STMT_ALLOCATED, copy\n");
+           MYLOG(0, "**** STMT_ALLOCATED, copy\n");
            self->status = STMT_READY;
            break;
 
        case STMT_READY:
-           MYLOG(0, "**** PGAPI_Prepare: STMT_READY, change SQL\n");
+           MYLOG(0, "**** STMT_READY, change SQL\n");
            if (NOT_YET_PREPARED != prepared)
                SC_recycle_statement(self); /* recycle the statement */
            break;
 
        case STMT_EXECUTING:
-           MYLOG(0, "**** PGAPI_Prepare: STMT_EXECUTING, error!\n");
+           MYLOG(0, "**** STMT_EXECUTING, error!\n");
 
            SC_set_error(self, STMT_SEQUENCE_ERROR, "PGAPI_Prepare(): The handle does not point to a statement that is ready to be executed", func);
 
@@ -130,7 +130,7 @@ PGAPI_Prepare(HSTMT hstmt,
 
 cleanup:
 #undef return
-MYLOG(1, "SQLPrepare return=%d\n", retval);
+MYLOG(1, "leaving %d\n", retval);
    return retval;
 }
 
@@ -147,7 +147,7 @@ PGAPI_ExecDirect(HSTMT hstmt,
    CSTR func = "PGAPI_ExecDirect";
    const ConnectionClass   *conn = SC_get_conn(stmt);
 
-   MYLOG(0, "%s: entering...%x\n", func, flag);
+   MYLOG(0, "entering...%x\n", flag);
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -164,7 +164,7 @@ MYLOG(1, "a2\n");
        return SQL_ERROR;
    }
 
-   MYLOG(0, "**** %s: hstmt=%p, statement='%s'\n", func, hstmt, stmt->statement);
+   MYLOG(0, "**** hstmt=%p, statement='%s'\n", hstmt, stmt->statement);
 
    if (0 != (flag & PODBC_WITH_HOLD))
        SC_set_with_hold(stmt);
@@ -188,11 +188,11 @@ MYLOG(1, "a2\n");
        return SQL_ERROR;
    }
 
-   MYLOG(0, "%s: calling PGAPI_Execute...\n", func);
+   MYLOG(0, "calling PGAPI_Execute...\n");
 
    result = PGAPI_Execute(hstmt, flag);
 
-   MYLOG(0, "%s: returned %hd from PGAPI_Execute\n", func, result);
+   MYLOG(0, "leaving %hd\n", result);
    return result;
 }
 
@@ -420,7 +420,7 @@ RETCODE Exec_with_parameters_resolved(StatementClass *stmt, BOOL *exec_end)
 
    *exec_end = FALSE;
    conn = SC_get_conn(stmt);
-   MYLOG(0, "%s: copying statement params: trans_status=%d, len=" FORMAT_SIZE_T ", stmt='%s'\n", func, conn->transact_status, strlen(stmt->statement), stmt->statement);
+   MYLOG(0, "copying statement params: trans_status=%d, len=" FORMAT_SIZE_T ", stmt='%s'\n", conn->transact_status, strlen(stmt->statement), stmt->statement);
 
 #define    return  DONT_CALL_RETURN_FROM_HERE???
 #define    RETURN(code)    { retval = code; goto cleanup; }
@@ -549,12 +549,11 @@ cleanup:
 int
 StartRollbackState(StatementClass *stmt)
 {
-   CSTR    func = "StartRollbackState";
    int         ret;
    ConnectionClass *conn;
    ConnInfo    *ci = NULL;
 
-MYLOG(1, "%s:%p->external=%d\n", func, stmt, stmt->external);
+MYLOG(1, "entering %p->external=%d\n", stmt, stmt->external);
    conn = SC_get_conn(stmt);
    if (conn)
        ci = &conn->connInfo;
@@ -639,7 +638,7 @@ SetStatementSvp(StatementClass *stmt, unsigned int option)
        ENTER_CONN_CS(conn);
        conn->lock_CC_for_rb++;
    }
-MYLOG(1, " !!!! %s:%p->accessed=%d opt=%u in_progress=%u prev=%u\n", __FUNCTION__, conn, CC_accessed_db(conn), option, conn->opt_in_progress, conn->opt_previous);
+MYLOG(1, " %p->accessed=%d opt=%u in_progress=%u prev=%u\n", conn, CC_accessed_db(conn), option, conn->opt_in_progress, conn->opt_previous);
    conn->opt_in_progress &= option;
    switch (stmt->statement_type)
    {
@@ -682,7 +681,7 @@ MYLOG(1, " !!!! %s:%p->accessed=%d opt=%u in_progress=%u prev=%u\n", __FUNCTION_
        }
    }
    CC_set_accessed_db(conn);
-MYLOG(1, "%s:%p->accessed=%d\n", func, conn, CC_accessed_db(conn));
+MYLOG(1, "leaving %p->accessed=%d\n", conn, CC_accessed_db(conn));
    return ret;
 }
 
@@ -693,10 +692,10 @@ DiscardStatementSvp(StatementClass *stmt, RETCODE ret, BOOL errorOnly)
    ConnectionClass *conn = SC_get_conn(stmt);
    BOOL    start_stmt = FALSE;
 
-MYLOG(1, "%s:%p->accessed=%d is_in=%d is_rb=%d is_tc=%d\n", func, conn, CC_accessed_db(conn),
+MYLOG(1, "entering %p->accessed=%d is_in=%d is_rb=%d is_tc=%d\n", conn, CC_accessed_db(conn),
 CC_is_in_trans(conn), SC_is_rb_stmt(stmt), SC_is_tc_stmt(stmt));
    if (conn->lock_CC_for_rb > 0)
-       MYLOG(0, "%s:in_progress=%u previous=%d\n", func, conn->opt_in_progress, conn->opt_previous);
+       MYLOG(0, "in_progress=%u previous=%d\n", conn->opt_in_progress, conn->opt_previous);
    switch (ret)
    {
        case SQL_NEED_DATA:
@@ -733,7 +732,7 @@ CC_is_in_trans(conn), SC_is_rb_stmt(stmt), SC_is_tc_stmt(stmt));
    }
    else if (errorOnly)
        return ret;
-MYLOG(1, "ret=%d\n", ret);
+MYLOG(1, "\tret=%d\n", ret);
 cleanup:
 #ifdef NOT_USED
    if (!SC_is_prepare_statement(stmt) && ONCE_DESCRIBED == stmt->prepared)
@@ -751,10 +750,11 @@ cleanup:
        {
            LEAVE_CONN_CS(conn);
            conn->lock_CC_for_rb--;
-           MYLOG(1, " %s:release conn_lock\n", __FUNCTION__);
+           MYLOG(1, " release conn_lock\n");
        }
        CC_start_stmt(conn);
    }
+   MYLOG(1, "leaving %d\n", ret);
    return ret;
 }
 
@@ -892,7 +892,7 @@ PGAPI_Execute(HSTMT hstmt, UWORD flag)
    BOOL    exec_end, recycled = FALSE, recycle = TRUE;
    SQLSMALLINT num_params;
 
-   MYLOG(0, "%s: entering...%x\n", func, flag);
+   MYLOG(0, "entering...%x\n", flag);
 
    conn = SC_get_conn(stmt);
    apdopts = SC_get_APDF(stmt);
@@ -907,13 +907,13 @@ PGAPI_Execute(HSTMT hstmt, UWORD flag)
        SC_recycle_statement(stmt);
    }
 
-   MYLOG(0, "%s: clear errors...\n", func);
+   MYLOG(0, "clear errors...\n");
 
    SC_clear_error(stmt);
    if (!stmt->statement)
    {
        SC_set_error(stmt, STMT_NO_STMTSTRING, "This handle does not have a SQL statement stored in it", func);
-       MYLOG(0, "%s: problem with handle\n", func);
+       MYLOG(0, "problem with handle\n");
        return SQL_ERROR;
    }
 
@@ -945,7 +945,7 @@ PGAPI_Execute(HSTMT hstmt, UWORD flag)
     */
    else if (stmt->status == STMT_FINISHED)
    {
-       MYLOG(0, "%s: recycling statement (should have been done by app)...\n", func);
+       MYLOG(0, "recycling statement (should have been done by app)...\n");
 /******** Is this really NEEDED ? ******/
        SC_recycle_statement(stmt);
        recycled = TRUE;
@@ -955,7 +955,7 @@ PGAPI_Execute(HSTMT hstmt, UWORD flag)
        (stmt->status != STMT_ALLOCATED && stmt->status != STMT_READY))
    {
        SC_set_error(stmt, STMT_STATUS_ERROR, "The handle does not point to a statement that is ready to be executed", func);
-       MYLOG(0, "%s: problem with statement\n", func);
+       MYLOG(0, "problem with statement\n");
        retval = SQL_ERROR;
        goto cleanup;
    }
@@ -1106,7 +1106,7 @@ next_param_row:
        goto next_param_row;
    }
 cleanup:
-MYLOG(0, "retval=%d\n", retval);
+MYLOG(0, "leaving retval=%d\n", retval);
    SC_setInsertedTable(stmt, retval);
 #undef return
    return retval;
@@ -1123,7 +1123,7 @@ PGAPI_Transact(HENV henv,
    char        ok;
    int         lf;
 
-   MYLOG(0, "entering %s: hdbc=%p, henv=%p\n", func, hdbc, henv);
+   MYLOG(0, "entering hdbc=%p, henv=%p\n", hdbc, henv);
 
    if (hdbc == SQL_NULL_HDBC && henv == SQL_NULL_HENV)
    {
@@ -1162,7 +1162,7 @@ PGAPI_Transact(HENV henv,
    /* If manual commit and in transaction, then proceed. */
    if (CC_loves_visible_trans(conn) && CC_is_in_trans(conn))
    {
-       MYLOG(0, "PGAPI_Transact: sending on conn %p '%d'\n", conn, fType);
+       MYLOG(0, "sending on conn %p '%d'\n", conn, fType);
 
        ok = (SQL_COMMIT == fType) ? CC_commit(conn) : CC_abort(conn);
        if (!ok)
@@ -1185,7 +1185,7 @@ PGAPI_Cancel(HSTMT hstmt)     /* Statement to cancel. */
    ConnectionClass *conn;
    RETCODE     ret = SQL_SUCCESS;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    /* Check if this can handle canceling in the middle of a SQLPutData? */
    if (!stmt)
@@ -1282,7 +1282,7 @@ PGAPI_NativeSql(HDBC hdbc,
    ConnectionClass *conn = (ConnectionClass *) hdbc;
    RETCODE     result;
 
-   MYLOG(0, "%s: entering...cbSqlStrIn=%d\n", func, cbSqlStrIn);
+   MYLOG(0, "entering...cbSqlStrIn=%d\n", cbSqlStrIn);
 
    ptr = (cbSqlStrIn == 0) ? "" : make_string(szSqlStrIn, cbSqlStrIn, NULL, 0);
    if (!ptr)
@@ -1332,13 +1332,13 @@ PGAPI_ParamData(HSTMT hstmt,
    Int2        num_p;
    ConnectionClass *conn = NULL;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    conn = SC_get_conn(stmt);
 
    estmt = stmt->execute_delegate ? stmt->execute_delegate : stmt;
    apdopts = SC_get_APDF(estmt);
-   MYLOG(0, "%s: data_at_exec=%d, params_alloc=%d\n", func, estmt->data_at_exec, apdopts->allocated);
+   MYLOG(0, "\tdata_at_exec=%d, params_alloc=%d\n", estmt->data_at_exec, apdopts->allocated);
 
 #define    return  DONT_CALL_RETURN_FROM_HERE???
    if (SC_AcceptedCancelRequest(stmt))
@@ -1451,7 +1451,7 @@ MYLOG(1, "return SQL_NEED_DATA\n");
 cleanup:
 #undef return
    SC_setInsertedTable(stmt, retval);
-   MYLOG(0, "%s: returning %d\n", func, retval);
+   MYLOG(0, "leaving %d\n", retval);
    return retval;
 }
 
@@ -1481,7 +1481,7 @@ PGAPI_PutData(HSTMT hstmt,
    SQLLEN      putlen;
    BOOL        lenset = FALSE, handling_lo = FALSE;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
 #define    return  DONT_CALL_RETURN_FROM_HERE???
    if (SC_AcceptedCancelRequest(stmt))
@@ -1562,7 +1562,7 @@ PGAPI_PutData(HSTMT hstmt,
 
    if (!estmt->put_data)
    {                           /* first call */
-       MYLOG(0, "PGAPI_PutData: (1) cbValue = " FORMAT_LEN "\n", cbValue);
+       MYLOG(0, "(1) cbValue = " FORMAT_LEN "\n", cbValue);
 
        estmt->put_data = TRUE;
 
@@ -1640,7 +1640,7 @@ PGAPI_PutData(HSTMT hstmt,
    else
    {
        /* calling SQLPutData more than once */
-       MYLOG(0, "PGAPI_PutData: (>1) cbValue = " FORMAT_LEN "\n", cbValue);
+       MYLOG(0, "(>1) cbValue = " FORMAT_LEN "\n", cbValue);
 
        /* if (current_iparam->SQLType == SQL_LONGVARBINARY) */
        if (handling_lo)
diff --git a/info.c b/info.c
index a1d5ec01cb0217d7f11662a3b283a062e192c272..fb3bddd16112c3d2baa151ec80d1a1f5bd979bb2 100644 (file)
--- a/info.c
+++ b/info.c
@@ -68,7 +68,7 @@ PGAPI_GetInfo(HDBC hdbc,
    RETCODE     result = SQL_ERROR;
    char        odbcver[16];
 
-   MYLOG(0, "%s: entering...fInfoType=%d\n", func, fInfoType);
+   MYLOG(0, "entering...fInfoType=%d\n", fInfoType);
 
    if (!conn)
    {
@@ -1027,7 +1027,7 @@ MYLOG(0, "CONVERT_FUNCTIONS=" FORMAT_ULEN "\n", value);
 
    result = SQL_SUCCESS;
 
-   MYLOG(0, "%s: p='%s', len=" FORMAT_ULEN ", value=" FORMAT_ULEN ", cbMax=%d\n", func, p ? p : "<NULL>", len, value, cbInfoValueMax);
+   MYLOG(0, "p='%s', len=" FORMAT_ULEN ", value=" FORMAT_ULEN ", cbMax=%d\n", p ? p : "<NULL>", len, value, cbInfoValueMax);
 
    /*
     * NOTE, that if rgbInfoValue is NULL, then no warnings or errors
@@ -1110,7 +1110,7 @@ PGAPI_GetTypeInfo(HSTMT hstmt,
    Int2        sqlType;
    RETCODE     result = SQL_SUCCESS;
 
-   MYLOG(0, "%s: entering...fSqlType = %d\n", func, fSqlType);
+   MYLOG(0, "entering...fSqlType=%d\n", fSqlType);
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -1252,11 +1252,10 @@ PGAPI_GetFunctions(HDBC hdbc,
                   SQLUSMALLINT fFunction,
                   SQLUSMALLINT * pfExists)
 {
-   CSTR func = "PGAPI_GetFunctions";
    ConnectionClass *conn = (ConnectionClass *) hdbc;
    ConnInfo   *ci = &(conn->connInfo);
 
-   MYLOG(0, "%s: entering...%u\n", func, fFunction);
+   MYLOG(0, "entering...%u\n", fFunction);
 
    if (fFunction == SQL_API_ALL_FUNCTIONS)
    {
@@ -1523,7 +1522,7 @@ simpleCatalogEscape(const SQLCHAR *src, SQLLEN srclen, const ConnectionClass *co
        srclen = (SQLLEN) strlen((char *) src);
    if (srclen <= 0)
        return dest;
-MYLOG(0, "simple in=%s(" FORMAT_LEN ")\n", src, srclen);
+MYLOG(0, "entering in=%s(" FORMAT_LEN ")\n", src, srclen);
    encoded_str_constr(&encstr, conn->ccsc, (char *) src);
    dest = malloc(2 * srclen + 1);
    if (!dest) return NULL;
@@ -1541,7 +1540,7 @@ MYLOG(0, "simple in=%s(" FORMAT_LEN ")\n", src, srclen);
        dest[outlen++] = *in;
    }
    dest[outlen] = '\0';
-MYLOG(0, "simple output=%s(%d)\n", dest, outlen);
+MYLOG(0, "leaving output=%s(%d)\n", dest, outlen);
    return dest;
 }
 
@@ -1564,7 +1563,7 @@ adjustLikePattern(const SQLCHAR *src, int srclen, const ConnectionClass *conn)
    /* if (srclen <= 0) */
    if (srclen < 0)
        return dest;
-MYLOG(0, "adjust in=%.*s(%d)\n", srclen, src, srclen);
+MYLOG(0, "entering in=%.*s(%d)\n", srclen, src, srclen);
    encoded_str_constr(&encstr, conn->ccsc, (char *) src);
    dest = malloc(4 * srclen + 1);
    if (!dest) return NULL;
@@ -1611,7 +1610,7 @@ MYLOG(0, "adjust in=%.*s(%d)\n", srclen, src, srclen);
        dest[outlen++] = SEARCH_PATTERN_ESCAPE;
    }
    dest[outlen] = '\0';
-MYLOG(0, "adjust output=%s(%d)\n", dest, outlen);
+MYLOG(0, "leaving output=%s(%d)\n", dest, outlen);
    return dest;
 }
 
@@ -1724,7 +1723,7 @@ PGAPI_Tables(HSTMT hstmt,
    SQLLEN      cbRelname, cbRelkind, cbSchName;
    EnvironmentClass *env;
 
-   MYLOG(0, "%s: entering...stmt=%p scnm=%p len=%d\n", func, stmt, szTableOwner, cbTableOwner);
+   MYLOG(0, "entering...stmt=%p scnm=%p len=%d\n", stmt, szTableOwner, cbTableOwner);
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -2080,7 +2079,7 @@ retry_public_schema:
             * set_tuplefield_string(&tuple[TABLES_SCHEMA_NAME], table_owner);
             */
 
-           MYLOG(0, "%s: table_name = '%s'\n", func, table_name);
+           MYLOG(0, "table_name = '%s'\n", table_name);
 
            if (list_schemas || !list_some)
                set_tuplefield_string(&tuple[TABLES_SCHEMA_NAME], GET_SCHEMA_NAME(table_owner));
@@ -2143,7 +2142,7 @@ cleanup:
    if (htbl_stmt)
        PGAPI_FreeStmt(htbl_stmt, SQL_DROP);
 
-   MYLOG(0, "%s: EXIT, stmt=%p, ret=%d\n", func, stmt, ret);
+   MYLOG(0, "leaving stmt=%p, ret=%d\n", stmt, ret);
    return ret;
 }
 
@@ -2241,7 +2240,7 @@ PGAPI_Columns(HSTMT hstmt,
    const SQLCHAR *szSchemaName;
    BOOL    setIdentity = FALSE;
 
-   MYLOG(0, "%s: entering...stmt=%p scnm=%p len=%d\n", func, stmt, szTableOwner, cbTableOwner);
+   MYLOG(0, "entering...stmt=%p scnm=%p len=%d\n", stmt, szTableOwner, cbTableOwner);
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -2349,7 +2348,7 @@ retry_public_schema:
    }
    col_stmt = (StatementClass *) hcol_stmt;
 
-   MYLOG(0, "%s: hcol_stmt = %p, col_stmt = %p\n", func, hcol_stmt, col_stmt);
+   MYLOG(0, "hcol_stmt = %p, col_stmt = %p\n", hcol_stmt, col_stmt);
 
    result = PGAPI_ExecDirect(hcol_stmt, (SQLCHAR *) columns_query.data, SQL_NTS, PODBC_RDONLY);
    if (!SQL_SUCCEEDED(result))
@@ -2755,7 +2754,7 @@ cleanup:
        free(escColumnName);
    if (hcol_stmt)
        PGAPI_FreeStmt(hcol_stmt, SQL_DROP);
-   MYLOG(0, "%s: EXIT,  stmt=%p\n", func, stmt);
+   MYLOG(0, "leaving stmt=%p\n", stmt);
    return result;
 }
 
@@ -2789,7 +2788,7 @@ PGAPI_SpecialColumns(HSTMT hstmt,
    const char *eq_string;
    int     result_cols;
 
-   MYLOG(0, "%s: entering...stmt=%p scnm=%p len=%d colType=%d scope=%d\n", func, stmt, szTableOwner, cbTableOwner, fColType, fScope);
+   MYLOG(0, "entering...stmt=%p scnm=%p len=%d colType=%d scope=%d\n", stmt, szTableOwner, cbTableOwner, fColType, fScope);
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -2841,7 +2840,7 @@ retry_public_schema:
    }
    col_stmt = (StatementClass *) hcol_stmt;
 
-   MYLOG(0, "%s: hcol_stmt = %p, col_stmt = %p\n", func, hcol_stmt, col_stmt);
+   MYLOG(0, "hcol_stmt = %p, col_stmt = %p\n", hcol_stmt, col_stmt);
 
    if (PQExpBufferDataBroken(columns_query))
    {
@@ -3005,7 +3004,7 @@ cleanup:
    SC_set_current_col(stmt, -1);
    if (hcol_stmt)
        PGAPI_FreeStmt(hcol_stmt, SQL_DROP);
-   MYLOG(0, "%s: EXIT,  stmt=%p\n", func, stmt);
+   MYLOG(0, "leaving  stmt=%p\n", stmt);
    return result;
 }
 
@@ -3059,7 +3058,7 @@ PGAPI_Statistics(HSTMT hstmt,
    OID     ioid;
    Int4        relhasoids;
 
-   MYLOG(0, "%s: entering...stmt=%p scnm=%p len=%d\n", func, stmt, szTableOwner, cbTableOwner);
+   MYLOG(0, "entering...stmt=%p scnm=%p len=%d\n", stmt, szTableOwner, cbTableOwner);
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -3185,7 +3184,7 @@ PGAPI_Statistics(HSTMT hstmt,
        column_names[total_columns].pnum = field_number;
        total_columns++;
 
-       MYLOG(0, "%s: column_name = '%s'\n", func, column_name);
+       MYLOG(0, "column_name = '%s'\n", column_name);
 
        result = PGAPI_Fetch(hcol_stmt);
    }
@@ -3416,7 +3415,7 @@ PGAPI_Statistics(HSTMT hstmt,
                if (OID_ATTNUM == attnum)
                {
                    set_tuplefield_string(&tuple[STATS_COLUMN_NAME], OID_NAME);
-                   MYLOG(0, "%s: column name = oid\n", func);
+                   MYLOG(0, "column name = oid\n");
                }
                else if (0 == attnum)
                {
@@ -3450,12 +3449,12 @@ PGAPI_Statistics(HSTMT hstmt,
                    if (unknownf)
                    {
                        set_tuplefield_string(&tuple[STATS_COLUMN_NAME], "UNKNOWN");
-                       MYLOG(0, "%s: column name = UNKNOWN\n", func);
+                       MYLOG(0, "column name = UNKNOWN\n");
                    }
                    else
                    {
                        set_tuplefield_string(&tuple[STATS_COLUMN_NAME], column_names[matchidx].col_name);
-                       MYLOG(0, "%s: column name = '%s'\n", func, column_names[matchidx].col_name);
+                       MYLOG(0, "column name = '%s'\n", column_names[matchidx].col_name);
                    }
                }
 
@@ -3513,7 +3512,7 @@ cleanup:
    SC_set_rowset_start(stmt, -1, FALSE);
    SC_set_current_col(stmt, -1);
 
-   MYLOG(0, "%s: EXIT, stmt=%p, ret=%d\n", func, stmt, ret);
+   MYLOG(0, "leaving stmt=%p, ret=%d\n", stmt, ret);
 
    return ret;
 }
@@ -3541,7 +3540,7 @@ PGAPI_ColumnPrivileges(HSTMT hstmt,
    BOOL    search_pattern;
    QResultClass    *res = NULL;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    /* Neither Access or Borland care about this. */
 
@@ -3658,7 +3657,7 @@ PGAPI_PrimaryKeys(HSTMT hstmt,
    const char *eq_string;
    char    *escSchemaName = NULL, *escTableName = NULL;
 
-   MYLOG(0, "%s: entering...stmt=%p scnm=%p len=%d\n", func, stmt, szTableOwner, cbTableOwner);
+   MYLOG(0, "entering...stmt=%p scnm=%p len=%d\n", stmt, szTableOwner, cbTableOwner);
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -3837,7 +3836,7 @@ retry_public_schema:
            ret = SQL_ERROR;
            goto cleanup;
        }
-       MYLOG(0, "%s: tables_query='%s'\n", func, tables_query.data);
+       MYLOG(0, "tables_query='%s'\n", tables_query.data);
 
        result = PGAPI_ExecDirect(htbl_stmt, (SQLCHAR *) tables_query.data, SQL_NTS, PODBC_RDONLY);
        if (!SQL_SUCCEEDED(result))
@@ -3924,7 +3923,7 @@ cleanup:
    SC_set_rowset_start(stmt, -1, FALSE);
    SC_set_current_col(stmt, -1);
 
-   MYLOG(0, "%s: EXIT, stmt=%p, ret=%d\n", func, stmt, ret);
+   MYLOG(0, "leaving stmt=%p, ret=%d\n", stmt, ret);
    return ret;
 }
 
@@ -4090,7 +4089,7 @@ PGAPI_ForeignKeys_old(HSTMT hstmt,
    UInt4       relid1, relid2;
    const char *eq_string;
 
-   MYLOG(0, "%s: entering...stmt=%p\n", func, stmt);
+   MYLOG(0, "entering...stmt=%p\n", stmt);
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -4174,7 +4173,7 @@ PGAPI_ForeignKeys_old(HSTMT hstmt,
    {
        char    *escSchemaName;
 
-       MYLOG(0, "%s: entering Foreign Key Case #2\n", func);
+       MYLOG(0, " Foreign Key Case #2\n");
        escFkTableName = simpleCatalogEscape((SQLCHAR *) fk_table_needed, SQL_NTS, conn);
        schema_str(schema_needed, sizeof(schema_needed), szFkTableOwner, cbFkTableOwner, TABLE_IS_VALID(szFkTableName, cbFkTableName), conn);
        escSchemaName = simpleCatalogEscape((SQLCHAR *) schema_needed, SQL_NTS, conn);
@@ -4396,7 +4395,7 @@ PGAPI_ForeignKeys_old(HSTMT hstmt,
                    got_pkname = TRUE;
                }
                pkey_text = getClientColumnName(conn, relid2, pkey_ptr, &pkey_alloced);
-               MYLOG(0, "%s: pkey_ptr='%s', pkey='%s'\n", func, pkey_text, pkey);
+               MYLOG(0, "pkey_ptr='%s', pkey='%s'\n", pkey_text, pkey);
                if (strcmp(pkey_text, pkey))
                {
                    num_keys = 0;
@@ -4460,19 +4459,19 @@ PGAPI_ForeignKeys_old(HSTMT hstmt,
                pkey_text = getClientColumnName(conn, relid2, pkey_ptr, &pkey_alloced);
                fkey_text = getClientColumnName(conn, relid1, fkey_ptr, &fkey_alloced);
 
-               MYLOG(0, "%s: pk_table = '%s', pkey_ptr = '%s'\n", func, pk_table_fetched, pkey_text);
+               MYLOG(0, "pk_table = '%s', pkey_ptr = '%s'\n", pk_table_fetched, pkey_text);
                set_tuplefield_string(&tuple[FKS_PKTABLE_CAT], CurrCat(conn));
                set_tuplefield_string(&tuple[FKS_PKTABLE_SCHEM], GET_SCHEMA_NAME(schema_fetched));
                set_tuplefield_string(&tuple[FKS_PKTABLE_NAME], pk_table_fetched);
                set_tuplefield_string(&tuple[FKS_PKCOLUMN_NAME], pkey_text);
 
-               MYLOG(0, "%s: fk_table_needed = '%s', fkey_ptr = '%s'\n", func, fk_table_needed, fkey_text);
+               MYLOG(0, "fk_table_needed = '%s', fkey_ptr = '%s'\n", fk_table_needed, fkey_text);
                set_tuplefield_string(&tuple[FKS_FKTABLE_CAT], CurrCat(conn));
                set_tuplefield_string(&tuple[FKS_FKTABLE_SCHEM], GET_SCHEMA_NAME(schema_needed));
                set_tuplefield_string(&tuple[FKS_FKTABLE_NAME], fk_table_needed);
                set_tuplefield_string(&tuple[FKS_FKCOLUMN_NAME], fkey_text);
 
-               MYLOG(0, "%s: upd_rule_type = '%i', del_rule_type = '%i'\n, trig_name = '%s'", func, upd_rule_type, del_rule_type, trig_args);
+               MYLOG(0, "upd_rule_type = '%i', del_rule_type = '%i'\n, trig_name = '%s'", upd_rule_type, del_rule_type, trig_args);
                set_tuplefield_int2(&tuple[FKS_KEY_SEQ], (Int2) (k + 1));
                set_tuplefield_int2(&tuple[FKS_UPDATE_RULE], upd_rule_type);
                set_tuplefield_int2(&tuple[FKS_DELETE_RULE], del_rule_type);
@@ -4831,7 +4830,7 @@ cleanup:
    SC_set_rowset_start(stmt, -1, FALSE);
    SC_set_current_col(stmt, -1);
 
-   MYLOG(0, "%s(): EXIT, stmt=%p, ret=%d\n", func, stmt, ret);
+   MYLOG(0, "leaving stmt=%p, ret=%d\n", stmt, ret);
    return ret;
 }
 
@@ -4927,7 +4926,7 @@ PGAPI_ProcedureColumns(HSTMT hstmt,
    int     ret_col = -1, ext_pos = -1, poid_pos = -1, attid_pos = -1, attname_pos = -1;
    UInt4       poid = 0, newpoid;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -5322,7 +5321,7 @@ PGAPI_Procedures(HSTMT hstmt,
    const char  *like_or_eq, *op_string;
    BOOL    search_pattern;
 
-   MYLOG(0, "%s: entering... scnm=%p len=%d\n", func, szProcOwner, cbProcOwner);
+   MYLOG(0, "entering... scnm=%p len=%d\n", szProcOwner, cbProcOwner);
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -5472,7 +5471,7 @@ PGAPI_TablePrivileges(HSTMT hstmt,
    char        *escSchemaName = NULL, *escTableName = NULL;
    BOOL        search_pattern;
 
-   MYLOG(0, "%s: entering... scnm=%p len-%d\n", func, szTableOwner, cbTableOwner);
+   MYLOG(0, "entering... scnm=%p len-%d\n", szTableOwner, cbTableOwner);
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
 
@@ -5785,7 +5784,7 @@ PGAPI_ForeignKeys_new(HSTMT hstmt,
 
    const char *eq_string;
 
-   MYLOG(0, "%s: entering...stmt=%p\n", func, stmt);
+   MYLOG(0, "entering...stmt=%p\n", stmt);
 
    if (result = SC_initialize_and_recycle(stmt), SQL_SUCCESS != result)
        return result;
@@ -5804,7 +5803,7 @@ PGAPI_ForeignKeys_new(HSTMT hstmt,
     */
    if (NULL != fk_table_needed)
    {
-       MYLOG(0, "%s: entering Foreign Key Case #2\n", func);
+       MYLOG(0, " Foreign Key Case #2\n");
        escTableName = simpleCatalogEscape((SQLCHAR *) fk_table_needed, SQL_NTS, conn);
        schema_str(schema_needed, sizeof(schema_needed), szFkTableOwner, cbFkTableOwner, TABLE_IS_VALID(szFkTableName, cbFkTableName), conn);
        relqual = "\n   and  conrelid = c.oid";
@@ -5974,6 +5973,6 @@ cleanup:
    SC_set_rowset_start(stmt, -1, FALSE);
    SC_set_current_col(stmt, -1);
 
-   MYLOG(0, "%s(): EXIT, stmt=%p, ret=%d\n", func, stmt, ret);
+   MYLOG(0, "leaving stmt=%p, ret=%d\n", stmt, ret);
    return ret;
 }
index 4d6490cae4ac8e25fe9d5d86faa8d4b760126fda..6d8d952ceca923e8317c574f82f35ff2f1377eea 100644 (file)
@@ -84,7 +84,7 @@ void * pgdebug_realloc(void * ptr, size_t size)
    void * alloced = realloc(ptr, size);
    if (!alloced)
    {
-       MYLOG(0, "%s:%s %p error\n", ALCERR, __FUNCTION__, ptr);
+       MYLOG(0, "%s %p error\n", ALCERR, ptr);
    }
    else if (!ptr)
    {
@@ -106,7 +106,7 @@ void * pgdebug_realloc(void * ptr, size_t size)
        }
    }
 
-   inolog("%s %p->%p\n", __FUNCTION__, ptr, alloced);
+   inolog("%p->%p\n", ptr, alloced);
    return alloced;
 }
 char * pgdebug_strdup(const char * ptr)
@@ -114,7 +114,7 @@ char * pgdebug_strdup(const char * ptr)
    char * alloced = strdup(ptr);
    if (!alloced)
    {
-       MYLOG(0, "%s:%s %p error\n", ALCERR, __FUNCTION__, ptr);
+       MYLOG(0, "%s %p error\n", ALCERR, ptr);
    }
    else
    {
@@ -135,7 +135,7 @@ char * pgdebug_strdup(const char * ptr)
        altbl[tbsize].len = strlen(ptr) + 1;
        tbsize++;
    }
-   inolog("%s %p->%p(%s)\n", __FUNCTION__, ptr, alloced, alloced);
+   inolog("%p->%p(%s)\n", ptr, alloced, alloced);
    return alloced;
 }
 
@@ -146,7 +146,7 @@ void pgdebug_free(void * ptr)
 
    if (!ptr)
    {
-       MYLOG(0, "%s:%sing null ptr\n", ALCERR, __FUNCTION__);
+       MYLOG(0, "%s null ptr\n", ALCERR);
        return;
    }
    for (i = 0; i < tbsize; i++)
@@ -165,11 +165,11 @@ void pgdebug_free(void * ptr)
    }
    if (! freed)
    {
-       MYLOG(0, "%s:%sing not found ptr %p\n", ALCERR, __FUNCTION__, ptr);
+       MYLOG(0, "%s not found ptr %p\n", ALCERR, ptr);
        return;
    }
    else
-       inolog("%sing ptr=%p\n", __FUNCTION__, ptr);
+       inolog("ptr=%p\n", ptr);
    free(ptr);
 }
 
@@ -198,7 +198,7 @@ char *pgdebug_strcpy(char *out, const char *in)
 {
    if (!out || !in)
    {
-       MYLOG(0, "%s:%s null pointer out=%p,in=%p\n", ALCERR, __FUNCTION__, out, in);
+       MYLOG(0, "%s null pointer out=%p,in=%p\n", ALCERR, out, in);
        return NULL;
    }
    out_check(out, strlen(in) + 1, __FUNCTION__);
@@ -208,7 +208,7 @@ char *pgdebug_strncpy(char *out, const char *in, size_t len)
 {
    if (!out || !in)
    {
-       MYLOG(0, "%s:%s null pointer out=%p,in=%p\n", ALCERR, __FUNCTION__, out, in);
+       MYLOG(0, "%s null pointer out=%p,in=%p\n", ALCERR, out, in);
        return NULL;
    }
    out_check(out, len, __FUNCTION__);
@@ -218,7 +218,7 @@ char *pgdebug_strncpy_null(char *out, const char *in, size_t len)
 {
    if (!out || !in)
    {
-       MYLOG(0, "%s:%s null pointer out=%p,in=%p\n", ALCERR, __FUNCTION__, out, in);
+       MYLOG(0, "%s null pointer out=%p,in=%p\n", ALCERR, out, in);
        return NULL;
    }
    out_check(out, len, __FUNCTION__);
@@ -229,7 +229,7 @@ void *pgdebug_memcpy(void *out, const void *in, size_t len)
 {
    if (!out || !in)
    {
-       MYLOG(0, "%s:%s null pointer out=%p,in=%p\n", ALCERR, __FUNCTION__, out, in);
+       MYLOG(0, "%s null pointer out=%p,in=%p\n", ALCERR, out, in);
        return NULL;
    }
    out_check(out, len, __FUNCTION__);
@@ -240,7 +240,7 @@ void *pgdebug_memset(void *out, int c, size_t len)
 {
    if (!out)
    {
-       MYLOG(0, "%s:%s null pointer out=%p\n", ALCERR, __FUNCTION__, out);
+       MYLOG(0, "%s null pointer out=%p\n", ALCERR, out);
        return NULL;
    }
    out_check(out, len, __FUNCTION__);
diff --git a/misc.c b/misc.c
index d5d26e1e489d0d3296a13ab844b0a5bb7c44df07..aea089b43d4809f9d192c5443ddb9f0fe515ebcc 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -122,7 +122,7 @@ make_string(const SQLCHAR *s, SQLINTEGER len, char *buf, size_t bufsize)
        length = strlen((char *) s);
    else
    {
-       MYLOG(0, "make_string invalid length=%d\n", len);
+       MYLOG(0, "invalid length=%d\n", len);
        return NULL;
    }
    if (buf)
index beb94e178eefcff9d1319e550ff63d50af7918b4..b45bd05c3e085b4d0678c8f2f1fdeca3b55a1ff7 100644 (file)
@@ -502,7 +502,7 @@ derive_locale_encoding(const char *dbencoding)
        ptr++;
        if ((enc_no= pg_char_to_encoding(ptr)) >= 0)
            wenc = pg_encoding_to_char(enc_no);
-       MYLOG(0, "%s locale=%s enc=%s\n", __FUNCTION__, loc, wenc ? wenc : "(null)");
+       MYLOG(0, "locale=%s enc=%s\n", loc, wenc ? wenc : "(null)");
    }
 #endif /* WIN32 */
    return wenc;
index a40400d77db4425842f82dda91f0c6bf14afa260..2b4e5c63e3633bab46046d8a09290788f28a6ed3 100644 (file)
--- a/odbcapi.c
+++ b/odbcapi.c
@@ -60,7 +60,7 @@ SQLBindCol(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    ENTER_STMT_CS(stmt);
    SC_clear_error(stmt);
    StartRollbackState(stmt);
@@ -74,7 +74,7 @@ SQLBindCol(HSTMT StatementHandle,
 RETCODE        SQL_API
 SQLCancel(HSTMT StatementHandle)
 {
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    /* Not that neither ENTER_STMT_CS nor StartRollbackState is called */
    /* SC_clear_error((StatementClass *) StatementHandle); maybe this neither */
    if (SC_connection_lost_check((StatementClass *) StatementHandle, __FUNCTION__))
@@ -106,7 +106,7 @@ SQLColumns(HSTMT StatementHandle,
    ConnInfo *ci = &(SC_get_conn(stmt)->connInfo);
    UWORD   flag    = PODBC_SEARCH_PUBLIC_SCHEMA;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -183,7 +183,7 @@ SQLConnect(HDBC ConnectionHandle,
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -206,7 +206,7 @@ SQLDriverConnect(HDBC hdbc,
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) hdbc;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -226,7 +226,7 @@ SQLBrowseConnect(HDBC hdbc,
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) hdbc;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -243,7 +243,7 @@ SQLDataSources(HENV EnvironmentHandle,
               SQLCHAR *Description, SQLSMALLINT BufferLength2,
               SQLSMALLINT *NameLength2)
 {
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
 
    /*
     * return PGAPI_DataSources(EnvironmentHandle, Direction, ServerName,
@@ -263,7 +263,7 @@ SQLDescribeCol(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -282,11 +282,10 @@ SQLDescribeCol(HSTMT StatementHandle,
 RETCODE        SQL_API
 SQLDisconnect(HDBC ConnectionHandle)
 {
-   CSTR func = "SQLDisconnect";
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
 
-   MYLOG(0, "[%s for %p]\n", func, ConnectionHandle);
+   MYLOG(0, "Entering for %p\n", ConnectionHandle);
 #ifdef _HANDLE_ENLIST_IN_DTC_
    if (CC_is_in_global_trans(conn))
        CALL_DtcOnDisconnect(conn);
@@ -308,7 +307,7 @@ SQLExecDirect(HSTMT StatementHandle,
    StatementClass *stmt = (StatementClass *) StatementHandle;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -336,7 +335,7 @@ SQLExecute(HSTMT StatementHandle)
    StatementClass *stmt = (StatementClass *) StatementHandle;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -359,7 +358,6 @@ SQLExecute(HSTMT StatementHandle)
 RETCODE        SQL_API
 SQLFetch(HSTMT StatementHandle)
 {
-   CSTR func = "SQLFetch";
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
    IRDFields   *irdopts = SC_get_IRDF(stmt);
@@ -367,7 +365,7 @@ SQLFetch(HSTMT StatementHandle)
    SQLUSMALLINT *rowStatusArray = irdopts->rowStatusArray;
    SQLULEN *pcRow = irdopts->rowsFetched;
 
-   MYLOG(0, "[[%s]]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -393,7 +391,7 @@ SQLFreeStmt(HSTMT StatementHandle,
    StatementClass *stmt = (StatementClass *) StatementHandle;
    ConnectionClass *conn = NULL;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
 
    if (stmt)
    {
@@ -433,7 +431,7 @@ SQLGetCursorName(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    ENTER_STMT_CS(stmt);
    SC_clear_error(stmt);
    StartRollbackState(stmt);
@@ -454,7 +452,7 @@ SQLGetData(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -475,7 +473,7 @@ SQLGetFunctions(HDBC ConnectionHandle,
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -494,14 +492,13 @@ SQLGetInfo(HDBC ConnectionHandle,
           SQLUSMALLINT InfoType, PTR InfoValue,
           SQLSMALLINT BufferLength, SQLSMALLINT *StringLength)
 {
-   CSTR    func = "SQLGetInfo";
    RETCODE     ret;
    ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
 
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
-   MYLOG(0, "[%s(30)]\n", func);
+   MYLOG(0, "Entering\n");
    if ((ret = PGAPI_GetInfo(ConnectionHandle, InfoType, InfoValue,
                BufferLength, StringLength)) == SQL_ERROR)
        CC_log_error("SQLGetInfo(30)", "", conn);
@@ -518,7 +515,7 @@ SQLGetTypeInfo(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check((StatementClass *) StatementHandle, __FUNCTION__))
        return SQL_ERROR;
 
@@ -544,7 +541,7 @@ SQLNumResultCols(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -564,7 +561,7 @@ SQLParamData(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -585,7 +582,7 @@ SQLPrepare(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -611,7 +608,7 @@ SQLPutData(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -630,7 +627,7 @@ SQLRowCount(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -652,7 +649,7 @@ SQLSetCursorName(HSTMT StatementHandle,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    ENTER_STMT_CS(stmt);
    SC_clear_error(stmt);
    StartRollbackState(stmt);
@@ -670,7 +667,7 @@ SQLSetParam(HSTMT StatementHandle,
            SQLSMALLINT ParameterScale, PTR ParameterValue,
            SQLLEN *StrLen_or_Ind)
 {
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    SC_clear_error((StatementClass *) StatementHandle);
 
    /*
@@ -696,7 +693,7 @@ SQLSpecialColumns(HSTMT StatementHandle,
    StatementClass *stmt = (StatementClass *) StatementHandle;
    SQLCHAR *ctName = CatalogName, *scName = SchemaName, *tbName = TableName;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -762,7 +759,7 @@ SQLStatistics(HSTMT StatementHandle,
    StatementClass *stmt = (StatementClass *) StatementHandle;
    SQLCHAR *ctName = CatalogName, *scName = SchemaName, *tbName = TableName;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -829,7 +826,7 @@ SQLTables(HSTMT StatementHandle,
    SQLCHAR *ctName = CatalogName, *scName = SchemaName, *tbName = TableName;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -904,7 +901,7 @@ SQLColumnPrivileges(HSTMT hstmt,
        *tbName = szTableName, *clName = szColumnName;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -979,7 +976,7 @@ SQLDescribeParam(HSTMT hstmt,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1007,7 +1004,7 @@ SQLExtendedFetch(HSTMT hstmt,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1054,7 +1051,7 @@ SQLForeignKeys(HSTMT hstmt,
        *pktbName = szPkTableName, *fkctName = szFkCatalogName,
        *fkscName = szFkSchemaName, *fktbName = szFkTableName;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1139,7 +1136,7 @@ SQLMoreResults(HSTMT hstmt)
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1164,7 +1161,7 @@ SQLNativeSql(HDBC hdbc,
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) hdbc;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -1182,7 +1179,7 @@ SQLNumParams(HSTMT hstmt,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1211,7 +1208,7 @@ SQLPrimaryKeys(HSTMT hstmt,
    SQLCHAR *ctName = szCatalogName, *scName = szSchemaName,
        *tbName = szTableName;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1281,7 +1278,7 @@ SQLProcedureColumns(HSTMT hstmt,
        *prName = szProcName, *clName = szColumnName;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1360,7 +1357,7 @@ SQLProcedures(HSTMT hstmt,
        *prName = szProcName;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1425,7 +1422,7 @@ SQLSetPos(HSTMT hstmt,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1455,7 +1452,7 @@ SQLTablePrivileges(HSTMT hstmt,
        *tbName = szTableName;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1525,7 +1522,7 @@ SQLBindParameter(HSTMT hstmt,
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "[%s]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    ENTER_STMT_CS(stmt);
    SC_clear_error(stmt);
    StartRollbackState(stmt);
index d30e4c83a7103b1216b40cefadec8526624cd9a6..4a15efe30709e8dabb755144fba2000f9dbaf7c4 100644 (file)
@@ -34,11 +34,10 @@ RETCODE     SQL_API
 SQLAllocHandle(SQLSMALLINT HandleType,
               SQLHANDLE InputHandle, SQLHANDLE * OutputHandle)
 {
-   CSTR    func = "SQLAllocHandle";
    RETCODE     ret;
    ConnectionClass *conn;
 
-   MYLOG(0, "[[%s]]\n", func);
+   MYLOG(0, "Entering\n");
    switch (HandleType)
    {
        case SQL_HANDLE_ENV:
@@ -81,12 +80,11 @@ SQLBindParam(HSTMT StatementHandle,
             SQLSMALLINT ParameterScale, PTR ParameterValue,
             SQLLEN *StrLen_or_Ind)
 {
-   CSTR    func = "SQLBindParam";
    RETCODE         ret;
    StatementClass  *stmt = (StatementClass *) StatementHandle;
    int         BufferLength = 512;     /* Is it OK ? */
 
-   MYLOG(0, "[[%s]]\n", func);
+   MYLOG(0, "Entering\n");
    ENTER_STMT_CS(stmt);
    SC_clear_error(stmt);
    StartRollbackState(stmt);
@@ -100,11 +98,10 @@ SQLBindParam(HSTMT StatementHandle,
 RETCODE        SQL_API
 SQLCloseCursor(HSTMT StatementHandle)
 {
-   CSTR    func = "SQLCloseCursor";
    StatementClass  *stmt = (StatementClass *) StatementHandle;
    RETCODE ret;
 
-   MYLOG(0, "[[%s]]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -133,11 +130,10 @@ SQLColAttribute(SQLHSTMT StatementHandle,
 #endif
            )
 {
-   CSTR    func = "SQLColAttribute";
    RETCODE ret;
    StatementClass  *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[[%s]]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -158,10 +154,9 @@ RETCODE        SQL_API
 SQLCopyDesc(SQLHDESC SourceDescHandle,
            SQLHDESC TargetDescHandle)
 {
-   CSTR    func = "SQLCopyDesc";
    RETCODE ret;
 
-   MYLOG(0, "[[%s]]\n", func);
+   MYLOG(0, "Entering\n");
    ret = PGAPI_CopyDesc(SourceDescHandle, TargetDescHandle);
    return ret;
 }
@@ -171,10 +166,9 @@ RETCODE        SQL_API
 SQLEndTran(SQLSMALLINT HandleType, SQLHANDLE Handle,
           SQLSMALLINT CompletionType)
 {
-   CSTR    func = "SQLEndTran";
    RETCODE ret;
 
-   MYLOG(0, "[[%s]]\n", func);
+   MYLOG(0, "Entering\n");
    switch (HandleType)
    {
        case SQL_HANDLE_ENV:
@@ -209,7 +203,7 @@ SQLFetchScroll(HSTMT StatementHandle,
    SQLULEN *pcRow = irdopts->rowsFetched;
    SQLLEN  bkmarkoff = 0;
 
-   MYLOG(0, "[[%s]] %d," FORMAT_LEN "\n", func, FetchOrientation, FetchOffset);
+   MYLOG(0, "Entering %d," FORMAT_LEN "\n", FetchOrientation, FetchOffset);
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -241,7 +235,7 @@ MYLOG(0, "bookmark=" FORMAT_LEN " FetchOffset = " FORMAT_LEN "\n", FetchOffset,
    ret = DiscardStatementSvp(stmt,ret, FALSE);
    LEAVE_STMT_CS(stmt);
    if (ret != SQL_SUCCESS)
-       MYLOG(0, "%s return = %d\n", func, ret);
+       MYLOG(0, "leaving return = %d\n", ret);
    return ret;
 }
 
@@ -249,12 +243,11 @@ MYLOG(0, "bookmark=" FORMAT_LEN " FetchOffset = " FORMAT_LEN "\n", FetchOffset,
 RETCODE        SQL_API
 SQLFreeHandle(SQLSMALLINT HandleType, SQLHANDLE Handle)
 {
-   CSTR    func = "SQLFreeHandle";
    RETCODE     ret;
    StatementClass *stmt;
    ConnectionClass *conn = NULL;
 
-   MYLOG(0, "[[%s]]\n", func);
+   MYLOG(0, "Entering\n");
 
    switch (HandleType)
    {
@@ -300,7 +293,7 @@ SQLGetDescField(SQLHDESC DescriptorHandle,
 {
    RETCODE ret;
 
-   MYLOG(0, "[[%s]]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    ret = PGAPI_GetDescField(DescriptorHandle, RecNumber, FieldIdentifier,
            Value, BufferLength, StringLength);
    return ret;
@@ -315,7 +308,7 @@ SQLGetDescRec(SQLHDESC DescriptorHandle,
              SQLLEN *Length, SQLSMALLINT *Precision,
              SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
 {
-   MYLOG(0, "[[%s]]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    MYLOG(0, "Error not implemented\n");
    return SQL_ERROR;
 }
@@ -327,10 +320,9 @@ SQLGetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle,
                PTR DiagInfo, SQLSMALLINT BufferLength,
                SQLSMALLINT *StringLength)
 {
-   CSTR func = "SQLGetDiagField";
    RETCODE ret;
 
-   MYLOG(0, "[[%s]] Handle=(%u,%p) Rec=%d Id=%d info=(%p,%d)\n", func, HandleType, Handle, RecNumber, DiagIdentifier, DiagInfo, BufferLength);
+   MYLOG(0, "Entering Handle=(%u,%p) Rec=%d Id=%d info=(%p,%d)\n", HandleType, Handle, RecNumber, DiagIdentifier, DiagInfo, BufferLength);
    ret = PGAPI_GetDiagField(HandleType, Handle, RecNumber, DiagIdentifier,
                DiagInfo, BufferLength, StringLength);
    return ret;
@@ -345,7 +337,7 @@ SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
 {
    RETCODE ret;
 
-   MYLOG(0, "[[%s]]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    ret = PGAPI_GetDiagRec(HandleType, Handle, RecNumber, Sqlstate,
            NativeError, MessageText, BufferLength, TextLength);
    return ret;
@@ -361,7 +353,7 @@ SQLGetEnvAttr(HENV EnvironmentHandle,
    RETCODE ret;
    EnvironmentClass *env = (EnvironmentClass *) EnvironmentHandle;
 
-   MYLOG(0, "[[%s]] %d\n", __FUNCTION__, Attribute);
+   MYLOG(0, "Entering %d\n", Attribute);
    ENTER_ENV_CS(env);
    ret = SQL_SUCCESS;
    switch (Attribute)
@@ -395,7 +387,7 @@ SQLGetConnectAttr(HDBC ConnectionHandle,
 {
    RETCODE ret;
 
-   MYLOG(0, "[[%s]] %d\n", __FUNCTION__, Attribute);
+   MYLOG(0, "Entering %d\n", Attribute);
    CC_examine_global_transaction((ConnectionClass*) ConnectionHandle);
    ENTER_CONN_CS((ConnectionClass *) ConnectionHandle);
    CC_clear_error((ConnectionClass *) ConnectionHandle);
@@ -412,10 +404,9 @@ SQLGetStmtAttr(HSTMT StatementHandle,
               SQLINTEGER BufferLength, SQLINTEGER *StringLength)
 {
    RETCODE ret;
-   CSTR func = "SQLGetStmtAttr";
    StatementClass  *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[[%s]] Handle=%p %d\n", func, StatementHandle, Attribute);
+   MYLOG(0, "Entering Handle=%p %d\n", StatementHandle, Attribute);
    ENTER_STMT_CS(stmt);
    SC_clear_error(stmt);
    StartRollbackState(stmt);
@@ -435,7 +426,7 @@ SQLSetConnectAttr(HDBC ConnectionHandle,
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
 
-   MYLOG(0, "[[%s]] %d\n", __FUNCTION__, Attribute);
+   MYLOG(0, "Entering %d\n", Attribute);
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -453,7 +444,7 @@ SQLSetDescField(SQLHDESC DescriptorHandle,
 {
    RETCODE     ret;
 
-   MYLOG(0, "[[%s]] h=%p rec=%d field=%d val=%p\n", __FUNCTION__, DescriptorHandle, RecNumber, FieldIdentifier, Value);
+   MYLOG(0, "Entering h=%p rec=%d field=%d val=%p\n", DescriptorHandle, RecNumber, FieldIdentifier, Value);
    ret = PGAPI_SetDescField(DescriptorHandle, RecNumber, FieldIdentifier,
                Value, BufferLength);
    return ret;
@@ -468,9 +459,7 @@ SQLSetDescRec(SQLHDESC DescriptorHandle,
              PTR Data, SQLLEN *StringLength,
              SQLLEN *Indicator)
 {
-   CSTR func = "SQLSetDescRec";
-
-   MYLOG(0, "[[%s]]\n", func);
+   MYLOG(0, "Entering\n");
    MYLOG(0, "Error not implemented\n");
    return SQL_ERROR;
 }
@@ -485,7 +474,7 @@ SQLSetEnvAttr(HENV EnvironmentHandle,
    RETCODE ret;
    EnvironmentClass *env = (EnvironmentClass *) EnvironmentHandle;
 
-   MYLOG(0, "[[%s]] att=%d," FORMAT_ULEN "\n", __FUNCTION__, Attribute, (SQLULEN) Value);
+   MYLOG(0, "Entering att=%d," FORMAT_ULEN "\n", Attribute, (SQLULEN) Value);
    ENTER_ENV_CS(env);
    switch (Attribute)
    {
@@ -543,11 +532,10 @@ SQLSetStmtAttr(HSTMT StatementHandle,
               SQLINTEGER Attribute, PTR Value,
               SQLINTEGER StringLength)
 {
-   CSTR func = "SQLSetStmtAttr";
    StatementClass *stmt = (StatementClass *) StatementHandle;
    RETCODE ret;
 
-   MYLOG(0, "[[%s]] Handle=%p %d," FORMAT_ULEN "\n", func, StatementHandle, Attribute, (SQLULEN) Value);
+   MYLOG(0, "Entering Handle=%p %d," FORMAT_ULEN "\n", StatementHandle, Attribute, (SQLULEN) Value);
    ENTER_STMT_CS(stmt);
    SC_clear_error(stmt);
    StartRollbackState(stmt);
@@ -686,14 +674,13 @@ RETCODE   SQL_API
 SQLBulkOperations(HSTMT hstmt, SQLSMALLINT operation)
 {
    RETCODE ret;
-   CSTR func = "SQLBulkOperations";
    StatementClass  *stmt = (StatementClass *) hstmt;
 
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
    ENTER_STMT_CS(stmt);
-   MYLOG(0, "[[%s]] Handle=%p %d\n", func, hstmt, operation);
+   MYLOG(0, "Entering Handle=%p %d\n", hstmt, operation);
    SC_clear_error(stmt);
    StartRollbackState(stmt);
    ret = PGAPI_BulkOperations(hstmt, operation);
index 35153391a84e2095e2df6d5ef2bfaff32c6630f3..b1d93e8ac95f2dad8dc353364def4e8a4856fa2f 100644 (file)
@@ -30,11 +30,10 @@ SQLGetStmtAttrW(SQLHSTMT hstmt,
                SQLINTEGER  cbValueMax,
                SQLINTEGER  *pcbValue)
 {
-   CSTR func = "SQLGetStmtAttrW";
    RETCODE ret;
    StatementClass  *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    ENTER_STMT_CS((StatementClass *) hstmt);
    SC_clear_error((StatementClass *) hstmt);
    StartRollbackState(stmt);
@@ -51,11 +50,10 @@ SQLSetStmtAttrW(SQLHSTMT hstmt,
                PTR     rgbValue,
                SQLINTEGER  cbValueMax)
 {
-   CSTR func = "SQLSetStmtAttrW";
    RETCODE ret;
    StatementClass  *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    ENTER_STMT_CS(stmt);
    SC_clear_error(stmt);
    StartRollbackState(stmt);
@@ -73,10 +71,9 @@ SQLGetConnectAttrW(HDBC hdbc,
                   SQLINTEGER   cbValueMax,
                   SQLINTEGER   *pcbValue)
 {
-   CSTR func = "SQLGetConnectAttrW";
    RETCODE ret;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction((ConnectionClass *) hdbc);
    ENTER_CONN_CS((ConnectionClass *) hdbc);
    CC_clear_error((ConnectionClass *) hdbc);
@@ -92,11 +89,10 @@ SQLSetConnectAttrW(HDBC hdbc,
                   PTR      rgbValue,
                   SQLINTEGER   cbValue)
 {
-   CSTR func = "SQLSetConnectAttrW";
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) hdbc;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -113,13 +109,12 @@ SQLSetDescFieldW(SQLHDESC DescriptorHandle, SQLSMALLINT RecNumber,
                 SQLSMALLINT FieldIdentifier, PTR Value,
                 SQLINTEGER BufferLength)
 {
-   CSTR func = "SQLSetDescFieldW";
    RETCODE ret;
    SQLLEN  vallen;
         char    *uval = NULL;
    BOOL    val_alloced = FALSE;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (BufferLength > 0 || SQL_NTS == BufferLength)
    {
        switch (FieldIdentifier)
@@ -157,12 +152,11 @@ SQLGetDescFieldW(SQLHDESC hdesc, SQLSMALLINT iRecord, SQLSMALLINT iField,
                 PTR rgbValue, SQLINTEGER cbValueMax,
                 SQLINTEGER *pcbValue)
 {
-   CSTR func = "SQLGetDescFieldW";
    RETCODE ret;
    SQLINTEGER      blen = 0, bMax, *pcbV;
         char    *rgbV = NULL, *rgbVt;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    switch (iField)
    {
        case SQL_DESC_BASE_COLUMN_NAME:
@@ -226,12 +220,11 @@ SQLGetDiagRecW(SQLSMALLINT fHandleType,
               SQLSMALLINT  cbErrorMsgMax,
               SQLSMALLINT  *pcbErrorMsg)
 {
-   CSTR func = "SQLGetDiagRecW";
    RETCODE ret;
         SQLSMALLINT    buflen, tlen;
         char    qstr_ansi[8], *mtxt = NULL;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    buflen = 0;
         if (szErrorMsg && cbErrorMsgMax > 0)
    {
@@ -289,7 +282,7 @@ SQLColAttributeW(SQLHSTMT   hstmt,
    SQLSMALLINT *rgbL, blen = 0, bMax;
         char    *rgbD = NULL, *rgbDt;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -363,12 +356,11 @@ SQLGetDiagFieldW(SQLSMALLINT  fHandleType,
                 SQLSMALLINT    cbDiagInfoMax,
                 SQLSMALLINT   *pcbDiagInfo)
 {
-   CSTR        func = "SQLGetDiagFieldW";
    RETCODE     ret;
    SQLSMALLINT *rgbL, blen = 0, bMax;
    char       *rgbD = NULL, *rgbDt;
 
-   MYLOG(0, "[[%s]] Handle=(%u,%p) Rec=%d Id=%d info=(%p,%d)\n", func, fHandleType,
+   MYLOG(0, "Entering Handle=(%u,%p) Rec=%d Id=%d info=(%p,%d)\n", fHandleType,
            handle, iRecord, fDiagField, rgbDiagInfo, cbDiagInfoMax);
    switch (fDiagField)
    {
@@ -434,7 +426,7 @@ SQLGetDescRecW(SQLHDESC DescriptorHandle,
              SQLLEN *Length, SQLSMALLINT *Precision,
              SQLSMALLINT *Scale, SQLSMALLINT *Nullable)
 {
-   MYLOG(0, "[[%s]]\n", __FUNCTION__);
+   MYLOG(0, "Entering\n");
    MYLOG(0, "Error not implemented\n");
    return SQL_ERROR;
 }
@@ -448,9 +440,7 @@ SQLSetDescRecW(SQLHDESC DescriptorHandle,
              PTR Data, SQLLEN *StringLength,
              SQLLEN *Indicator)
 {
-   CSTR func = "SQLSetDescRecW";
-
-   MYLOG(0, "[[%s]]\n", func);
+   MYLOG(0, "Entering\n");
    MYLOG(0, "Error not implemented\n");
    return SQL_ERROR;
 }
index c2393f1280775e230376eed84aaf05f047799a94..593d7008acc8ba30b9706b40b4aa08f44a783aae 100644 (file)
@@ -43,7 +43,7 @@ SQLColumnsW(HSTMT StatementHandle,
    UWORD   flag = PODBC_SEARCH_PUBLIC_SCHEMA;
    ConnInfo    *ci;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -92,13 +92,12 @@ SQLConnectW(HDBC ConnectionHandle,
            SQLWCHAR *UserName, SQLSMALLINT NameLength2,
            SQLWCHAR *Authentication, SQLSMALLINT NameLength3)
 {
-   CSTR func = "SQLConnectW";
    char    *svName, *usName, *auth;
    SQLLEN  nmlen1, nmlen2, nmlen3;
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -138,7 +137,7 @@ SQLDriverConnectW(HDBC hdbc,
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) hdbc;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -209,7 +208,7 @@ SQLBrowseConnectW(HDBC          hdbc,
    RETCODE ret;
    ConnectionClass *conn = (ConnectionClass *) hdbc;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -245,8 +244,7 @@ SQLDataSourcesW(HENV EnvironmentHandle,
                SQLWCHAR *Description, SQLSMALLINT BufferLength2,
                SQLSMALLINT *NameLength2)
 {
-   CSTR func = "SQLDataSourcesW";
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    /*
    return PGAPI_DataSources(EnvironmentHandle, Direction, ServerName,
        BufferLength1, NameLength1, Description, BufferLength2,
@@ -268,7 +266,7 @@ SQLDescribeColW(HSTMT StatementHandle,
    SQLSMALLINT buflen, nmlen;
    char    *clName = NULL, *clNamet = NULL;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -330,7 +328,7 @@ SQLExecDirectW(HSTMT StatementHandle,
    StatementClass  *stmt = (StatementClass *) StatementHandle;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -362,7 +360,7 @@ SQLGetCursorNameW(HSTMT StatementHandle,
    char    *crName = NULL, *crNamet;
    SQLSMALLINT clen, buflen;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (BufferLength > 0)
        buflen = BufferLength * 3;
    else
@@ -409,7 +407,6 @@ SQLGetInfoW(HDBC ConnectionHandle,
            SQLUSMALLINT InfoType, PTR InfoValue,
            SQLSMALLINT BufferLength, SQLSMALLINT *StringLength)
 {
-   CSTR func = "SQLGetInfoW";
    ConnectionClass *conn = (ConnectionClass *) ConnectionHandle;
    RETCODE ret;
 
@@ -417,7 +414,7 @@ SQLGetInfoW(HDBC ConnectionHandle,
    ENTER_CONN_CS(conn);
    CC_set_in_unicode_driver(conn);
    CC_clear_error(conn);
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if ((ret = PGAPI_GetInfo(ConnectionHandle, InfoType, InfoValue,
                             BufferLength, StringLength)) == SQL_ERROR)
        CC_log_error("SQLGetInfoW", "", conn);
@@ -435,7 +432,7 @@ SQLPrepareW(HSTMT StatementHandle,
    char    *stxt;
    SQLLEN  slen;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -458,13 +455,12 @@ RETCODE  SQL_API
 SQLSetCursorNameW(HSTMT StatementHandle,
                  SQLWCHAR *CursorName, SQLSMALLINT NameLength)
 {
-   CSTR func = "SQLSetCursorNameW";
    RETCODE ret;
    StatementClass *stmt = (StatementClass *) StatementHandle;
    char    *crName;
    SQLLEN  nlen;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    crName = ucs2_to_utf8(CursorName, NameLength, &nlen, FALSE);
    ENTER_STMT_CS(stmt);
    SC_clear_error(stmt);
@@ -493,7 +489,7 @@ SQLSpecialColumnsW(HSTMT StatementHandle,
    ConnectionClass *conn;
    BOOL lower_id;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -539,7 +535,7 @@ SQLStatisticsW(HSTMT StatementHandle,
    ConnectionClass *conn;
    BOOL lower_id;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -586,7 +582,7 @@ SQLTablesW(HSTMT StatementHandle,
    BOOL lower_id;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -642,7 +638,7 @@ SQLColumnPrivilegesW(HSTMT          hstmt,
    BOOL    lower_id;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -702,7 +698,7 @@ SQLForeignKeysW(HSTMT           hstmt,
    ConnectionClass *conn;
    BOOL    lower_id;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -759,7 +755,7 @@ SQLNativeSqlW(HDBC          hdbc,
    SQLINTEGER  buflen, olen;
    ConnectionClass *conn = (ConnectionClass *) hdbc;
 
-   MYLOG(0, "[%s}\n", func);
+   MYLOG(0, "Entering\n");
    CC_examine_global_transaction(conn);
    ENTER_CONN_CS(conn);
    CC_clear_error(conn);
@@ -822,7 +818,7 @@ SQLPrimaryKeysW(HSTMT           hstmt,
    ConnectionClass *conn;
    BOOL    lower_id;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -872,7 +868,7 @@ SQLProcedureColumnsW(HSTMT          hstmt,
    BOOL    lower_id;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    conn = SC_get_conn(stmt);
    lower_id = SC_is_lower_case(stmt, conn);
    ctName = ucs2_to_utf8(szCatalogName, cbCatalogName, &nmlen1, lower_id);
@@ -924,7 +920,7 @@ SQLProceduresW(HSTMT        hstmt,
    BOOL    lower_id;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -975,7 +971,7 @@ SQLTablePrivilegesW(HSTMT           hstmt,
    BOOL    lower_id;
    UWORD   flag = 0;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
@@ -1016,7 +1012,7 @@ SQLGetTypeInfoW(SQLHSTMT  StatementHandle,
    RETCODE ret;
    StatementClass * stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "[%s]\n", func);
+   MYLOG(0, "Entering\n");
    if (SC_connection_lost_check(stmt, __FUNCTION__))
        return SQL_ERROR;
 
index 4f12e0f502806a7a09a7d0c145e0570079987ef5..7950d1258c9b3d289c7317377989591a8751ab5d 100644 (file)
--- a/options.c
+++ b/options.c
@@ -57,7 +57,7 @@ set_statement_option(ConnectionClass *conn,
             * positioned update isn't supported so cursor concurrency is
             * read-only
             */
-           MYLOG(0, "SetStmtOption(): SQL_CONCURRENCY = " FORMAT_LEN " ", vParam);
+           MYLOG(0, "SQL_CONCURRENCY = " FORMAT_LEN " ", vParam);
            setval = SQL_CONCUR_READ_ONLY;
            if (SQL_CONCUR_READ_ONLY == vParam)
                ;
@@ -87,7 +87,7 @@ set_statement_option(ConnectionClass *conn,
             * if declare/fetch, then type can only be forward. otherwise,
             * it can only be forward or static.
             */
-           MYLOG(0, "SetStmtOption(): SQL_CURSOR_TYPE = " FORMAT_LEN " ", vParam);
+           MYLOG(0, "SQL_CURSOR_TYPE = " FORMAT_LEN " ", vParam);
            setval = SQL_CURSOR_FORWARD_ONLY;
            if (ci->drivers.lie)
                setval = vParam;
@@ -127,7 +127,7 @@ set_statement_option(ConnectionClass *conn,
            break;
 
        case SQL_KEYSET_SIZE:   /* ignored, but saved and returned  */
-           MYLOG(0, "SetStmtOption(): SQL_KEYSET_SIZE, vParam = " FORMAT_LEN "\n", vParam);
+           MYLOG(0, "SQL_KEYSET_SIZE, vParam = " FORMAT_LEN "\n", vParam);
 
            if (conn)
                conn->stmtOptions.keyset_size = vParam;
@@ -143,7 +143,7 @@ set_statement_option(ConnectionClass *conn,
            break;
 
        case SQL_MAX_LENGTH:    /* ignored, but saved */
-           MYLOG(0, "SetStmtOption(): SQL_MAX_LENGTH, vParam = " FORMAT_LEN "\n", vParam);
+           MYLOG(0, "SQL_MAX_LENGTH, vParam = " FORMAT_LEN "\n", vParam);
            if (conn)
                conn->stmtOptions.maxLength = vParam;
            if (stmt)
@@ -157,7 +157,7 @@ set_statement_option(ConnectionClass *conn,
            break;
 
        case SQL_MAX_ROWS:      /* ignored, but saved */
-           MYLOG(0, "SetStmtOption(): SQL_MAX_ROWS, vParam = " FORMAT_LEN "\n", vParam);
+           MYLOG(0, "SQL_MAX_ROWS, vParam = " FORMAT_LEN "\n", vParam);
            if (conn)
                conn->stmtOptions.maxRows = vParam;
            if (stmt)
@@ -171,11 +171,11 @@ set_statement_option(ConnectionClass *conn,
            break;
 
        case SQL_NOSCAN:        /* ignored */
-           MYLOG(0, "SetStmtOption: SQL_NOSCAN, vParam = " FORMAT_LEN "\n", vParam);
+           MYLOG(0, "SQL_NOSCAN, vParam = " FORMAT_LEN "\n", vParam);
            break;
 
        case SQL_QUERY_TIMEOUT: /* ignored */
-           MYLOG(0, "SetStmtOption: SQL_QUERY_TIMEOUT, vParam = " FORMAT_LEN "\n", vParam);
+           MYLOG(0, "SQL_QUERY_TIMEOUT, vParam = " FORMAT_LEN "\n", vParam);
            if (conn)
                conn->stmtOptions.stmt_timeout = (SQLULEN) vParam;
            if (stmt)
@@ -183,7 +183,7 @@ set_statement_option(ConnectionClass *conn,
            break;
 
        case SQL_RETRIEVE_DATA:
-           MYLOG(0, "SetStmtOption(): SQL_RETRIEVE_DATA, vParam = " FORMAT_LEN "\n", vParam);
+           MYLOG(0, "SQL_RETRIEVE_DATA, vParam = " FORMAT_LEN "\n", vParam);
            if (conn)
                conn->stmtOptions.retrieve_data = (SQLUINTEGER) vParam;
            if (stmt)
@@ -191,7 +191,7 @@ set_statement_option(ConnectionClass *conn,
            break;
 
        case SQL_ROWSET_SIZE:
-           MYLOG(0, "SetStmtOption(): SQL_ROWSET_SIZE, vParam = " FORMAT_LEN "\n", vParam);
+           MYLOG(0, "SQL_ROWSET_SIZE, vParam = " FORMAT_LEN "\n", vParam);
 
            if (vParam < 1)
            {
@@ -304,7 +304,7 @@ PGAPI_SetConnectOption(HDBC hdbc,
    RETCODE     retval;
    BOOL        autocomm_on;
 
-   MYLOG(0, "%s: entering fOption = %d vParam = " FORMAT_LEN "\n", func, fOption, vParam);
+   MYLOG(0, "entering fOption = %d vParam = " FORMAT_LEN "\n", fOption, vParam);
    if (!conn)
    {
        CC_log_error(func, "", NULL);
@@ -368,7 +368,7 @@ PGAPI_SetConnectOption(HDBC hdbc,
            else if (!autocomm_on && SQL_AUTOCOMMIT_OFF == conn->autocommit_public)
                break;
            conn->autocommit_public = (autocomm_on ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF);
-           MYLOG(0, "%s: AUTOCOMMIT: transact_status=%d, vparam=" FORMAT_LEN "\n", func, conn->transact_status, vParam);
+           MYLOG(0, "AUTOCOMMIT: transact_status=%d, vparam=" FORMAT_LEN "\n", conn->transact_status, vParam);
 
 #ifdef _HANDLE_ENLIST_IN_DTC_
            if (CC_is_in_global_trans(conn))
@@ -491,7 +491,7 @@ PGAPI_GetConnectOption(HDBC hdbc,
    SQLLEN      len = sizeof(SQLINTEGER);
    SQLRETURN   result = SQL_SUCCESS;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    if (!conn)
    {
@@ -615,7 +615,7 @@ PGAPI_SetStmtOption(HSTMT hstmt,
    StatementClass *stmt = (StatementClass *) hstmt;
    RETCODE retval;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, " entering...\n");
 
    /*
     * Though we could fake Access out by just returning SQL_SUCCESS all
@@ -648,7 +648,7 @@ PGAPI_GetStmtOption(HSTMT hstmt,
    SQLINTEGER  len = sizeof(SQLINTEGER);
    Int4        bookmark;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    /*
     * thought we could fake Access out by just returning SQL_SUCCESS all
@@ -713,17 +713,17 @@ PGAPI_GetStmtOption(HSTMT hstmt,
            break;
 
        case SQL_CONCURRENCY:   /* NOT REALLY SUPPORTED */
-           MYLOG(0, "GetStmtOption(): SQL_CONCURRENCY %d\n", stmt->options.scroll_concurrency);
+           MYLOG(0, "SQL_CONCURRENCY %d\n", stmt->options.scroll_concurrency);
            *((SQLINTEGER *) pvParam) = stmt->options.scroll_concurrency;
            break;
 
        case SQL_CURSOR_TYPE:   /* PARTIAL SUPPORT */
-           MYLOG(0, "GetStmtOption(): SQL_CURSOR_TYPE %d\n", stmt->options.cursor_type);
+           MYLOG(0, "SQL_CURSOR_TYPE %d\n", stmt->options.cursor_type);
            *((SQLINTEGER *) pvParam) = stmt->options.cursor_type;
            break;
 
        case SQL_KEYSET_SIZE:   /* NOT SUPPORTED, but saved */
-           MYLOG(0, "GetStmtOption(): SQL_KEYSET_SIZE\n");
+           MYLOG(0, "SQL_KEYSET_SIZE\n");
            *((SQLLEN *) pvParam) = stmt->options.keyset_size;
            break;
 
@@ -733,7 +733,7 @@ PGAPI_GetStmtOption(HSTMT hstmt,
 
        case SQL_MAX_ROWS:      /* NOT SUPPORTED, but saved */
            *((SQLLEN *) pvParam) = stmt->options.maxRows;
-           MYLOG(0, "GetSmtOption: MAX_ROWS, returning " FORMAT_LEN "\n", stmt->options.maxRows);
+           MYLOG(0, "MAX_ROWS, returning " FORMAT_LEN "\n", stmt->options.maxRows);
            break;
 
        case SQL_NOSCAN:        /* NOT SUPPORTED */
diff --git a/parse.c b/parse.c
index ba1fe00f72dcea5483f2d02b1b1f5292ee31f8b8..94a53c5856b18de7a3da0cc2a23365ba3a87f612 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -287,7 +287,7 @@ getColInfo(COL_INFO *col_info, FIELD_INFO *fi, int k)
 {
    char       *str;
 
-MYLOG(1, "getColInfo non-manual result\n");
+MYLOG(1, "entering non-manual result\n");
    fi->dquote = TRUE;
    STR_TO_NAME(fi->column_name, QR_get_value_backend_text(col_info->result, k, COLUMNS_COLUMN_NAME));
 
@@ -312,7 +312,7 @@ searchColInfo(COL_INFO *col_info, FIELD_INFO *fi)
    OID         basetype;
    const char     *col;
 
-MYLOG(1, "searchColInfo num_cols=" FORMAT_ULEN " col=%s\n", QR_get_num_cached_tuples(col_info->result), PRINT_NAME(fi->column_name));
+MYLOG(1, "entering num_cols=" FORMAT_ULEN " col=%s\n", QR_get_num_cached_tuples(col_info->result), PRINT_NAME(fi->column_name));
    if (fi->attnum < 0)
        return FALSE;
    for (k = 0; k < QR_get_num_cached_tuples(col_info->result); k++)
@@ -323,7 +323,7 @@ MYLOG(1, "searchColInfo num_cols=" FORMAT_ULEN " col=%s\n", QR_get_num_cached_tu
            if (basetype = (OID) strtoul(QR_get_value_backend_text(col_info->result, k, COLUMNS_BASE_TYPEID), NULL, 10), 0 == basetype)
                basetype = (OID) strtoul(QR_get_value_backend_text(col_info->result, k, COLUMNS_FIELD_TYPE), NULL, 10);
            atttypmod = QR_get_value_backend_int(col_info->result, k, COLUMNS_ATTTYPMOD, NULL);
-MYLOG(1, "searchColInfo %d attnum=%d\n", k, attnum);
+MYLOG(1, "%d attnum=%d\n", k, attnum);
            if (attnum == fi->attnum &&
                basetype == fi->basetype &&
                atttypmod == fi->typmod)
@@ -336,7 +336,7 @@ MYLOG(1, "searchColInfo %d attnum=%d\n", k, attnum);
        else if (NAME_IS_VALID(fi->column_name))
        {
            col = QR_get_value_backend_text(col_info->result, k, COLUMNS_COLUMN_NAME);
-MYLOG(1, "searchColInfo %d col=%s\n", k, col);
+MYLOG(1, "%d col=%s\n", k, col);
            if (fi->dquote)
                cmp = strcmp(col, GET_NAME(fi->column_name));
            else
@@ -347,7 +347,7 @@ MYLOG(1, "searchColInfo %d col=%s\n", k, col);
                    STR_TO_NAME(fi->column_name, col);
                getColInfo(col_info, fi, k);
 
-               MYLOG(0, "PARSE: searchColInfo: \n");
+               MYLOG(0, "PARSE: \n");
                return TRUE;
            }
        }
@@ -594,7 +594,7 @@ static BOOL has_multi_table(const StatementClass *stmt)
    BOOL multi_table = FALSE;
    QResultClass    *res;
 
-MYLOG(1, "has_multi_table ntab=%d", stmt->ntab);
+MYLOG(1, "entering ntab=%d", stmt->ntab);
    if (1 < stmt->ntab)
        multi_table = TRUE;
    else if (SC_has_join(stmt))
@@ -639,7 +639,7 @@ ColAttSet(StatementClass *stmt, TABLE_INFO *rti)
    int     i, num_fields;
    BOOL        fi_reuse, updatable, call_xxxxx;
 
-MYLOG(0, "ColAttSet in\n");
+MYLOG(0, "entering\n");
 
    if (reloid = rti->table_oid, 0 == reloid)
        return FALSE;
@@ -812,7 +812,7 @@ getColumnsInfo(ConnectionClass *conn, TABLE_INFO *wti, OID greloid, StatementCla
    StatementClass  *col_stmt;
    QResultClass    *res;
 
-   MYLOG(0, "PARSE: Getting PG_Columns for table %u(%s)\n", greloid, PRINT_NAME(wti->table_name));
+   MYLOG(0, "entering Getting PG_Columns for table %u(%s)\n", greloid, PRINT_NAME(wti->table_name));
 
    if (NULL == conn)
        conn = SC_get_conn(stmt);
@@ -988,7 +988,7 @@ BOOL getCOLIfromTI(const char *func, ConnectionClass *conn, StatementClass *stmt
    TABLE_INFO  *wti = *pti;
    COL_INFO    *coli;
 
-MYLOG(1, "getCOLIfromTI reloid=%u ti=%p\n", reloid, wti);
+MYLOG(1, "entering reloid=%u ti=%p\n", reloid, wti);
    if (!conn)
        conn = SC_get_conn(stmt);
    if (!wti)   /* SQLColAttribute case */
@@ -1094,14 +1094,13 @@ MYLOG(1, "#1 %p->table_name=%s(%u)\n", wti, PRINT_NAME(wti->table_name), wti->ta
    }
    else if (!colatt && stmt)
        SC_set_parse_status(stmt, STMT_PARSE_FATAL);
-MYLOG(1, "getCOLIfromTI returns %d\n", found);
+MYLOG(1, "leaving returns %d\n", found);
    return found;
 }
 
 SQLRETURN
 SC_set_SS_columnkey(StatementClass *stmt)
 {
-   CSTR        func = "SC_set_SS_columnkey";
    IRDFields   *irdflds = SC_get_IRDF(stmt);
    FIELD_INFO  **fi = irdflds->fi, *tfi;
    size_t      nfields = irdflds->nfields;
@@ -1110,7 +1109,7 @@ SC_set_SS_columnkey(StatementClass *stmt)
    BOOL        contains_key = FALSE;
    int     i;
 
-MYLOG(1, "%s:fields=" FORMAT_SIZE_T " ntab=%d\n", func, nfields, stmt->ntab);
+MYLOG(1, "entering fields=" FORMAT_SIZE_T " ntab=%d\n", nfields, stmt->ntab);
    if (!fi)        return ret;
    if (0 >= nfields)   return ret;
    if (!has_multi_table(stmt) && 1 == stmt->ntab)
@@ -1148,14 +1147,14 @@ MYLOG(1, "%s:fields=" FORMAT_SIZE_T " ntab=%d\n", func, nfields, stmt->ntab);
                if (oneti == tfi->ti &&
                    strcmp(keycolnam, SAFE_NAME(tfi->column_name)) == 0)
                {
-MYLOG(1, "%s:key %s found at %p\n", func, keycolnam, fi + i);
+MYLOG(1, "key %s found at %p\n", keycolnam, fi + i);
                    tfi->columnkey = TRUE;
                    break;
                }
            }
            if (i >= nfields)
            {
-               MYLOG(0, "%s: %s not found\n", func, keycolnam);
+               MYLOG(0, "%s not found\n", keycolnam);
                break;
            }
            ret = PGAPI_Fetch(pstmt);
@@ -1166,7 +1165,7 @@ MYLOG(1, "%s:key %s found at %p\n", func, keycolnam, fi + i);
            goto cleanup;
        ret = SQL_SUCCESS;
    }
-MYLOG(1, "%s: contains_key=%d\n", func, contains_key);
+MYLOG(1, "contains_key=%d\n", contains_key);
    for (i = 0; i < nfields; i++)
    {
        if (tfi = fi[i], NULL == tfi)
@@ -1272,7 +1271,7 @@ parse_the_statement(StatementClass *stmt, BOOL check_hasoids, BOOL sqlsvr_check)
    IRDFields   *irdflds;
    BOOL        updatable = TRUE, column_has_alias = FALSE;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    if (SC_parsed_status(stmt) != STMT_PARSE_NONE)
    {
@@ -2174,7 +2173,7 @@ cleanup:
        parse = FALSE;
    }
 
-   MYLOG(0, "done %s: parse=%d, parse_status=%d\n", func, parse, SC_parsed_status(stmt));
+   MYLOG(0, "laving parse=%d, parse_status=%d\n", parse, SC_parsed_status(stmt));
    return parse;
 }
 
index 68a71e7476f2fc8c1437f1cbe007654c7ab3e680..01c0e64eff8fbd6e1abc6d47d7cccda7b391d2f8 100644 (file)
--- a/pgapi30.c
+++ b/pgapi30.c
@@ -38,9 +38,8 @@ PGAPI_GetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
                 SQLSMALLINT BufferLength, SQLSMALLINT *TextLength)
 {
    RETCODE     ret;
-   CSTR func = "PGAPI_GetDiagRec";
 
-   MYLOG(0, "%s entering type=%d rec=%d\n", func, HandleType, RecNumber);
+   MYLOG(0, "entering type=%d rec=%d\n", HandleType, RecNumber);
    switch (HandleType)
    {
        case SQL_HANDLE_ENV:
@@ -67,7 +66,7 @@ PGAPI_GetDiagRec(SQLSMALLINT HandleType, SQLHANDLE Handle,
        default:
            ret = SQL_ERROR;
    }
-   MYLOG(0, "%s exiting %d\n", func, ret);
+   MYLOG(0, "leaving %d\n", ret);
    return ret;
 }
 
@@ -88,9 +87,8 @@ PGAPI_GetDiagField(SQLSMALLINT HandleType, SQLHANDLE Handle,
    SQLSMALLINT pcbErrm;
    ssize_t     rtnlen = -1;
    int     rtnctype = SQL_C_CHAR;
-   CSTR func = "PGAPI_GetDiagField";
 
-   MYLOG(0, "%s entering rec=%d\n", func, RecNumber);
+   MYLOG(0, "entering rec=%d\n", RecNumber);
    switch (HandleType)
    {
        case SQL_HANDLE_ENV:
@@ -388,7 +386,7 @@ MYLOG(1, "rc=" FORMAT_LEN "\n", rc);
        if (StringLengthPtr)
            *StringLengthPtr = (SQLSMALLINT) rtnlen;
    }
-   MYLOG(0, "%s exiting %d\n", func, ret);
+   MYLOG(0, "leaving %d\n", ret);
    return ret;
 }
 
@@ -402,7 +400,7 @@ PGAPI_GetConnectAttr(HDBC ConnectionHandle,
    RETCODE ret = SQL_SUCCESS;
    SQLINTEGER  len = 4;
 
-   MYLOG(0, "PGAPI_GetConnectAttr %d\n", Attribute);
+   MYLOG(0, "entering %d\n", Attribute);
    switch (Attribute)
    {
        case SQL_ATTR_ASYNC_ENABLE:
@@ -683,7 +681,6 @@ static RETCODE SQL_API
 APDSetField(DescriptorClass *desc, SQLSMALLINT RecNumber,
            SQLSMALLINT FieldIdentifier, PTR Value, SQLINTEGER BufferLength)
 {
-   CSTR        func = "APDSetField";
    RETCODE     ret = SQL_SUCCESS;
    APDFields   *opts = &(desc->apdf);
    SQLSMALLINT para_idx;
@@ -715,14 +712,14 @@ APDSetField(DescriptorClass *desc, SQLSMALLINT RecNumber,
    }
    if (RecNumber <=0)
    {
-MYLOG(1, "%s RecN=%d allocated=%d\n", func, RecNumber, opts->allocated);
+MYLOG(1, "RecN=%d allocated=%d\n", RecNumber, opts->allocated);
        DC_set_error(desc, DESC_BAD_PARAMETER_NUMBER_ERROR,
                "bad parameter number");
        return SQL_ERROR;
    }
    if (RecNumber > opts->allocated)
    {
-MYLOG(1, "%s RecN=%d allocated=%d\n", func, RecNumber, opts->allocated);
+MYLOG(1, "RecN=%d allocated=%d\n", RecNumber, opts->allocated);
        parameter_bindings_set(opts, RecNumber, TRUE);
        /* DC_set_error(desc, DESC_BAD_PARAMETER_NUMBER_ERROR,
                "bad parameter number");
@@ -884,7 +881,7 @@ IPDSetField(DescriptorClass *desc, SQLSMALLINT RecNumber,
    }
    if (RecNumber <= 0 || RecNumber > ipdopts->allocated)
    {
-MYLOG(1, "IPDSetField RecN=%d allocated=%d\n", RecNumber, ipdopts->allocated);
+MYLOG(1, "RecN=%d allocated=%d\n", RecNumber, ipdopts->allocated);
        DC_set_error(desc, DESC_BAD_PARAMETER_NUMBER_ERROR,
                "bad parameter number");
        return SQL_ERROR;
@@ -1163,7 +1160,7 @@ APDGetField(DescriptorClass *desc, SQLSMALLINT RecNumber,
            break;
        default:if (RecNumber <= 0 || RecNumber > opts->allocated)
            {
-MYLOG(1, "APDGetField RecN=%d allocated=%d\n", RecNumber, opts->allocated);
+MYLOG(1, "RecN=%d allocated=%d\n", RecNumber, opts->allocated);
                DC_set_error(desc, DESC_BAD_PARAMETER_NUMBER_ERROR,
                    "bad parameter number");
                return SQL_ERROR;
@@ -1417,7 +1414,7 @@ IPDGetField(DescriptorClass *desc, SQLSMALLINT RecNumber,
            break;
        default:if (RecNumber <= 0 || RecNumber > ipdopts->allocated)
            {
-MYLOG(1, "IPDGetField RecN=%d allocated=%d\n", RecNumber, ipdopts->allocated);
+MYLOG(1, "RecN=%d allocated=%d\n", RecNumber, ipdopts->allocated);
                DC_set_error(desc, DESC_BAD_PARAMETER_NUMBER_ERROR,
                    "bad parameter number");
                return SQL_ERROR;
@@ -1554,7 +1551,7 @@ PGAPI_GetStmtAttr(HSTMT StatementHandle,
    RETCODE     ret = SQL_SUCCESS;
    SQLINTEGER  len = 0;
 
-   MYLOG(0, "%s Handle=%p %d\n", func, StatementHandle, Attribute);
+   MYLOG(0, "entering Handle=%p %d\n", StatementHandle, Attribute);
    switch (Attribute)
    {
        case SQL_ATTR_FETCH_BOOKMARK_PTR:   /* 16 */
@@ -1657,7 +1654,7 @@ PGAPI_SetConnectAttr(HDBC ConnectionHandle,
    BOOL    unsupported = FALSE;
    int newValue;
 
-   MYLOG(0, "%s for %p: %d %p\n", func, ConnectionHandle, Attribute, Value);
+   MYLOG(0, "entering for %p: %d %p\n", ConnectionHandle, Attribute, Value);
    switch (Attribute)
    {
        case SQL_ATTR_METADATA_ID:
@@ -1814,7 +1811,7 @@ PGAPI_GetDescField(SQLHDESC DescriptorHandle,
    RETCODE     ret = SQL_SUCCESS;
    DescriptorClass *desc = (DescriptorClass *) DescriptorHandle;
 
-   MYLOG(0, "%s h=%p rec=%d field=%d blen=%d\n", func, DescriptorHandle, RecNumber, FieldIdentifier, BufferLength);
+   MYLOG(0, "entering h=%p rec=%d field=%d blen=%d\n", DescriptorHandle, RecNumber, FieldIdentifier, BufferLength);
    switch (DC_get_desc_type(desc))
    {
        case SQL_ATTR_APP_ROW_DESC:
@@ -1864,7 +1861,7 @@ PGAPI_SetDescField(SQLHDESC DescriptorHandle,
    RETCODE     ret = SQL_SUCCESS;
    DescriptorClass *desc = (DescriptorClass *) DescriptorHandle;
 
-   MYLOG(0, "%s h=%p(%d) rec=%d field=%d val=%p,%d\n", func, DescriptorHandle, DC_get_desc_type(desc), RecNumber, FieldIdentifier, Value, BufferLength);
+   MYLOG(0, "entering h=%p(%d) rec=%d field=%d val=%p,%d\n", DescriptorHandle, DC_get_desc_type(desc), RecNumber, FieldIdentifier, Value, BufferLength);
    switch (DC_get_desc_type(desc))
    {
        case SQL_ATTR_APP_ROW_DESC:
@@ -1915,7 +1912,7 @@ PGAPI_SetStmtAttr(HSTMT StatementHandle,
    CSTR func = "PGAPI_SetStmtAttr";
    StatementClass *stmt = (StatementClass *) StatementHandle;
 
-   MYLOG(0, "%s Handle=%p %d," FORMAT_ULEN "(%p)\n", func, StatementHandle, Attribute, (SQLULEN) Value, Value);
+   MYLOG(0, "entering Handle=%p %d," FORMAT_ULEN "(%p)\n", StatementHandle, Attribute, (SQLULEN) Value, Value);
    switch (Attribute)
    {
        case SQL_ATTR_ENABLE_AUTO_IPD:  /* 15 */
@@ -2028,7 +2025,7 @@ RETCODE   bulk_ope_callback(RETCODE retcode, void *para)
 
    if (s->need_data_callback)
    {
-       MYLOG(0, "bulk_ope_callback in\n");
+       MYLOG(0, "entering in\n");
        s->processed++;
        s->idx++;
    }
@@ -2096,7 +2093,7 @@ PGAPI_BulkOperations(HSTMT hstmt, SQLSMALLINT operationX)
    ConnectionClass *conn;
    BindInfoClass   *bookmark;
 
-   MYLOG(0, "%s operation = %d\n", func, operationX);
+   MYLOG(0, "entering operation = %d\n", operationX);
    s.stmt = (StatementClass *) hstmt;
    s.operation = operationX;
    SC_clear_error(s.stmt);
index 4271026561f94db711f8fca5eb6484f5635d5500..ddf68f2de94ae859d4a7b74312d9efe0b65bc4b3 100644 (file)
--- a/pgtypes.c
+++ b/pgtypes.c
@@ -172,7 +172,7 @@ pg_true_type(const ConnectionClass *conn, OID type, OID basetype)
 static SQLSMALLINT
 get_interval_type(Int4 atttypmod, const char **name)
 {
-MYLOG(0, "!!! %s atttypmod=%x\n", __FUNCTION__, atttypmod);
+MYLOG(0, "entering atttypmod=%x\n", atttypmod);
    if ((-1) == atttypmod)
        return 0;
    if (0 != (YEAR_BIT & atttypmod))
@@ -265,7 +265,7 @@ getCharColumnSizeX(const ConnectionClass *conn, OID type, int atttypmod, int adt
    int     p = -1, maxsize;
    const ConnInfo  *ci = &(conn->connInfo);
 
-   MYLOG(0, "%s: type=%d, atttypmod=%d, adtsize_or=%d, unknown = %d\n", __FUNCTION__, type, atttypmod, adtsize_or_longestlen, handle_unknown_size_as);
+   MYLOG(0, "entering type=%d, atttypmod=%d, adtsize_or=%d, unknown = %d\n", type, atttypmod, adtsize_or_longestlen, handle_unknown_size_as);
 
    /* Assign Maximum size based on parameters */
    switch (type)
@@ -316,7 +316,7 @@ MYLOG(1, "!!! adtsize_or_logngest=%d\n", adtsize_or_longestlen);
 MYLOG(1, "!!! catalog_result=%d\n", handle_unknown_size_as);
    if (UNKNOWNS_AS_LONGEST == handle_unknown_size_as)
    {
-       MYLOG(0, "%s: LONGEST: p = %d\n", __FUNCTION__, p);
+       MYLOG(0, "LONGEST: p = %d\n", p);
        if (p > 0 &&
            (atttypmod < 0 || atttypmod > p))
            return p;
@@ -370,7 +370,7 @@ getNumericDecimalDigitsX(const ConnectionClass *conn, OID type, int atttypmod, i
 {
    Int4        default_decimal_digits = 6;
 
-   MYLOG(0, "%s: type=%d, atttypmod=%d\n", __FUNCTION__, type, atttypmod);
+   MYLOG(0, "entering type=%d, atttypmod=%d\n", type, atttypmod);
 
    if (atttypmod < 0 && adtsize_or_longest < 0)
        return default_decimal_digits;
@@ -388,7 +388,7 @@ getNumericColumnSizeX(const ConnectionClass *conn, OID type, int atttypmod, int
 {
    Int4    default_column_size = 28;
 
-   MYLOG(0, "%s: type=%d, typmod=%d\n", __FUNCTION__, type, atttypmod);
+   MYLOG(0, "entering type=%d, typmod=%d\n", type, atttypmod);
 
    if (atttypmod > -1)
        return (atttypmod >> 16) & 0xffff;
@@ -414,7 +414,7 @@ getNumericColumnSizeX(const ConnectionClass *conn, OID type, int atttypmod, int
 static SQLSMALLINT
 getTimestampDecimalDigitsX(const ConnectionClass *conn, OID type, int atttypmod)
 {
-   MYLOG(0, "%s: type=%d, atttypmod=%d\n", __FUNCTION__, type, atttypmod);
+   MYLOG(0, "type=%d, atttypmod=%d\n", type, atttypmod);
    return (atttypmod > -1 ? atttypmod : 6);
 }
 
@@ -423,7 +423,7 @@ getTimestampColumnSizeX(const ConnectionClass *conn, OID type, int atttypmod)
 {
    Int4    fixed, scale;
 
-   MYLOG(0, "%s: type=%d, atttypmod=%d\n", __FUNCTION__, type, atttypmod);
+   MYLOG(0, "entering type=%d, atttypmod=%d\n", type, atttypmod);
 
    switch (type)
    {
@@ -452,7 +452,7 @@ getIntervalDecimalDigits(OID type, int atttypmod)
 {
    Int4    prec;
 
-   MYLOG(0, "%s: type=%d, atttypmod=%d\n", __FUNCTION__, type, atttypmod);
+   MYLOG(0, "entering type=%d, atttypmod=%d\n", type, atttypmod);
 
    if ((atttypmod & SECOND_BIT) == 0)
        return 0;
@@ -464,7 +464,7 @@ getIntervalColumnSize(OID type, int atttypmod)
 {
    Int4    ttl, leading_precision = 9, scale;
 
-   MYLOG(0, "%s: type=%d, atttypmod=%d\n", __FUNCTION__, type, atttypmod);
+   MYLOG(0, "entering type=%d, atttypmod=%d\n", type, atttypmod);
 
    ttl = leading_precision;
    switch (get_interval_type(atttypmod, NULL))
index 132d546a03447cb919d6593601c0cf624567ea8c..9ea6e108b7eae390f5cdfb53d1b923921f45fdf0 100644 (file)
--- a/qresult.c
+++ b/qresult.c
@@ -37,11 +37,11 @@ void
 QR_set_num_fields(QResultClass *self, int new_num_fields)
 {
    if (!self)  return;
-   MYLOG(0, "in QR_set_num_fields\n");
+   MYLOG(0, "entering\n");
 
    CI_set_num_fields(QR_get_fields(self), new_num_fields);
 
-   MYLOG(0, "exit QR_set_num_fields\n");
+   MYLOG(0, "leaving\n");
 }
 
 
@@ -132,7 +132,7 @@ void
 QR_inc_rowstart_in_cache(QResultClass *self, SQLLEN base_inc)
 {
    if (!QR_has_valid_base(self))
-       MYLOG(0, "QR_inc_rowstart_in_cache called while the cache is not ready\n");
+       MYLOG(0, " called while the cache is not ready\n");
    self->base += base_inc;
    if (QR_synchronize_keys(self))
        self->key_base = self->base;
@@ -170,7 +170,7 @@ QR_Constructor(void)
 {
    QResultClass *rv;
 
-   MYLOG(0, "in QR_Constructor\n");
+   MYLOG(0, "entering\n");
    rv = (QResultClass *) malloc(sizeof(QResultClass));
 
    if (rv != NULL)
@@ -239,7 +239,7 @@ QR_Constructor(void)
        rv->deleted_keyset = NULL;
    }
 
-   MYLOG(0, "exit QR_Constructor\n");
+   MYLOG(0, "leaving\n");
    return rv;
 }
 
@@ -252,7 +252,7 @@ QR_close_result(QResultClass *self, BOOL destroy)
    BOOL    top = TRUE;
 
    if (!self)  return;
-   MYLOG(0, "QResult: in QR_close_result\n");
+   MYLOG(0, "entering\n");
 
    while(self)
    {
@@ -316,13 +316,13 @@ QR_close_result(QResultClass *self, BOOL destroy)
        top = FALSE;
    }
 
-   MYLOG(0, "QResult: exit close_result\n");
+   MYLOG(0, "leaving\n");
 }
 
 void
 QR_reset_for_re_execute(QResultClass *self)
 {
-   MYLOG(0, "QResult: enter %s for %p\n", __FUNCTION__, self);
+   MYLOG(0, "entering for %p\n", self);
    if (!self)  return;
    QR_close_result(self, FALSE);
    /* reset flags etc */
@@ -335,17 +335,17 @@ QR_reset_for_re_execute(QResultClass *self)
    self->sqlstate[0] = '\0';
    self->messageref = NULL;
 
-   MYLOG(0, "QResult: exit %s\n", __FUNCTION__);
+   MYLOG(0, "leaving\n");
 }
 
 void
 QR_Destructor(QResultClass *self)
 {
-   MYLOG(0, "QResult: enter DESTRUCTOR\n");
+   MYLOG(0, "entering\n");
    if (!self)  return;
    QR_close_result(self, TRUE);
 
-   MYLOG(0, "QResult: exit DESTRUCTOR\n");
+   MYLOG(0, "leaving\n");
 }
 
 
@@ -440,7 +440,7 @@ TupleField  *QR_AddNew(QResultClass *self)
    UInt4   num_fields;
 
    if (!self)  return  NULL;
-MYLOG(1, "QR_AddNew " FORMAT_ULEN "th row(%d fields) alloc=" FORMAT_LEN "\n", self->num_cached_rows, QR_NumResultCols(self), self->count_backend_allocated);
+MYLOG(1, FORMAT_ULEN "th row(%d fields) alloc=" FORMAT_LEN "\n", self->num_cached_rows, QR_NumResultCols(self), self->count_backend_allocated);
    if (num_fields = QR_NumResultCols(self), !num_fields)   return  NULL;
    if (self->num_fields <= 0)
    {
@@ -476,7 +476,7 @@ QR_free_memory(QResultClass *self)
    SQLLEN      num_backend_rows = self->num_cached_rows;
    int     num_fields = self->num_fields;
 
-   MYLOG(0, "QResult: free memory in, fcount=" FORMAT_LEN "\n", num_backend_rows);
+   MYLOG(0, "entering fcount=" FORMAT_LEN "\n", num_backend_rows);
 
    if (self->backend_tuples)
    {
@@ -574,14 +574,13 @@ QR_free_memory(QResultClass *self)
    self->cursTuple = -1;
    self->pstatus = 0;
 
-   MYLOG(0, "QResult: free memory out\n");
+   MYLOG(0, "leaving\n");
 }
 
 
 BOOL
 QR_from_PGresult(QResultClass *self, StatementClass *stmt, ConnectionClass *conn, const char *cursor, PGresult **pgres)
 {
-   CSTR func = "QR_from_PGResult";
    int         num_io_params, num_cached_rows;
    int         i;
    Int2        paramType;
@@ -634,7 +633,7 @@ QR_from_PGresult(QResultClass *self, StatementClass *stmt, ConnectionClass *conn
        if (new_atttypmod < 0)
            new_atttypmod = -1;
 
-       MYLOG(0, "%s: fieldname='%s', adtid=%d, adtsize=%d, atttypmod=%d (rel,att)=(%d,%d)\n", func, new_field_name, new_adtid, new_adtsize, new_atttypmod, new_relid, new_attid);
+       MYLOG(0, "fieldname='%s', adtid=%d, adtsize=%d, atttypmod=%d (rel,att)=(%d,%d)\n", new_field_name, new_adtid, new_adtsize, new_atttypmod, new_relid, new_attid);
        QLOG(1, "\tfieldname='%s', adtid=%d, adtsize=%d, atttypmod=%d (rel,att)=(%d,%d)\n", new_field_name, new_adtid, new_adtsize, new_atttypmod, new_relid, new_attid);
 
        CI_set_field_info(QR_get_fields(self), lf, new_field_name, new_adtid, new_adtsize, new_atttypmod, new_relid, new_attid);
@@ -659,7 +658,7 @@ QR_from_PGresult(QResultClass *self, StatementClass *stmt, ConnectionClass *conn
                    if (SQL_PARAM_OUTPUT == paramType ||
                        SQL_PARAM_INPUT_OUTPUT == paramType)
                    {
-MYLOG(1, "!![%d].PGType %u->%u\n", i, PIC_get_pgtype(ipdopts->parameters[i]), CI_get_oid(QR_get_fields(self), cidx));
+MYLOG(1, "[%d].PGType %u->%u\n", i, PIC_get_pgtype(ipdopts->parameters[i]), CI_get_oid(QR_get_fields(self), cidx));
                        PIC_set_pgtype(ipdopts->parameters[i], CI_get_oid(QR_get_fields(self), cidx));
                        cidx++;
                    }
@@ -751,7 +750,7 @@ QR_close(QResultClass *self)
                CC_does_autocommit(conn) &&
                CC_cursor_count(conn) <= 1)
            {
-               MYLOG(0, "QResult: END transaction on conn=%p\n", conn);
+               MYLOG(0, "End transaction on conn=%p\n", conn);
                if ((ROLLBACK_ON_ERROR & flag) == 0)
                {
                    STRCAT_FIXED(buf, ";commit");
@@ -762,7 +761,7 @@ QR_close(QResultClass *self)
                    does_commit = TRUE;
            }
 
-MYLOG(1, " !!!! %s:Case I CC_send_query %s flag=%x\n", __FUNCTION__, buf, flag);
+MYLOG(1, " Case I CC_send_query %s flag=%x\n", buf, flag);
            res = CC_send_query(conn, buf, NULL, flag, NULL);
            QR_Destructor(res);
            if (does_commit)
@@ -784,7 +783,7 @@ MYLOG(1, " !!!! %s:Case I CC_send_query %s flag=%x\n", __FUNCTION__, buf, flag);
        /* End the transaction if there are no cursors left on this conn */
        if (CC_does_autocommit(conn) && CC_cursor_count(conn) == 0)
        {
-           MYLOG(0, "QResult: END transaction on conn=%p\n", conn);
+           MYLOG(0, "End transaction on conn=%p\n", conn);
 
            if (!CC_commit(conn))
            {
@@ -808,7 +807,7 @@ QR_prepare_for_tupledata(QResultClass *self)
    BOOL    haskeyset = QR_haskeyset(self);
    SQLULEN num_total_rows = QR_get_num_total_tuples(self);
 
-MYLOG(1, "QR_get_tupledata %p->num_fields=%d\n", self, self->num_fields);
+MYLOG(1, "entering %p->num_fields=%d\n", self, self->num_fields);
    if (!QR_get_cursor(self))
    {
 
@@ -1067,7 +1066,7 @@ MYLOG(1, "moved=" FORMAT_ULEN " ? " FORMAT_ULEN "\n", moved, movement);
            RETURN(-1)
        }
        /* return a row from cache */
-       MYLOG(0, "%s: fetch_number < fcount: returning tuple " FORMAT_LEN ", fcount = " FORMAT_LEN "\n", func, fetch_number, num_backend_rows);
+       MYLOG(0, "fetch_number < fcount: returning tuple " FORMAT_LEN ", fcount = " FORMAT_LEN "\n", fetch_number, num_backend_rows);
        self->tupleField = the_tuples + (fetch_number * num_fields);
 MYLOG(1, "tupleField=%p\n", self->tupleField);
        /* move to next row */
@@ -1099,7 +1098,7 @@ MYLOG(1, "tupleField=%p\n", self->tupleField);
 
    if (!QR_get_cursor(self))
    {
-       MYLOG(0, "%s: ALL_ROWS: done, fcount = " FORMAT_ULEN ", fetch_number = " FORMAT_LEN "\n", func, QR_get_num_total_tuples(self), fetch_number);
+       MYLOG(0, "ALL_ROWS: done, fcount = " FORMAT_ULEN ", fetch_number = " FORMAT_LEN "\n", QR_get_num_total_tuples(self), fetch_number);
        self->tupleField = NULL;
        QR_set_reached_eof(self);
        RETURN(-1)      /* end of tuples */
@@ -1149,7 +1148,7 @@ MYLOG(1, "clear obsolete " FORMAT_LEN " tuples\n", num_backend_rows);
             "fetch %d in \"%s\"",
             fetch_size, QR_get_cursor(self));
 
-   MYLOG(0, "%s: sending actual fetch (%d) query '%s'\n", func, fetch_size, fetch);
+   MYLOG(0, "sending actual fetch (%d) query '%s'\n", fetch_size, fetch);
    if (!boundary_adjusted)
    {
        QR_set_num_cached_rows(self, 0);
@@ -1176,8 +1175,8 @@ MYLOG(1, "clear obsolete " FORMAT_LEN " tuples\n", num_backend_rows);
    curr_eof = reached_eof_now = (QR_once_reached_eof(self) && self->cursTuple >= (Int4)self->num_total_read);
 MYLOG(1, "reached_eof_now=%d\n", reached_eof_now);
 
-   MYLOG(0, "_%s: PGresult: fetch_total = " FORMAT_ULEN " & this_fetch = " FORMAT_ULEN "\n", func, self->num_total_read, self->num_cached_rows);
-   MYLOG(0, "_%s: PGresult: cursTuple = " FORMAT_LEN ", offset = " FORMAT_LEN "\n", func, self->cursTuple, offset);
+   MYLOG(0, ": PGresult: fetch_total = " FORMAT_ULEN " & this_fetch = " FORMAT_ULEN "\n", self->num_total_read, self->num_cached_rows);
+   MYLOG(0, ": PGresult: cursTuple = " FORMAT_LEN ", offset = " FORMAT_LEN "\n", self->cursTuple, offset);
 
    cur_fetch = self->num_cached_rows - num_rows_in;
    if (!ret)
@@ -1189,7 +1188,7 @@ MYLOG(1, "reached_eof_now=%d\n", reached_eof_now);
        num_backend_rows = self->num_cached_rows;
        if (reached_eof_now)
        {
-           MYLOG(0, "%s: reached eof now\n", func);
+           MYLOG(0, "reached eof now\n");
            QR_set_reached_eof(self);
            if (self->ad_count > 0 && cur_fetch < fetch_size)
            {
@@ -1240,7 +1239,7 @@ MYLOG(1, "will add " FORMAT_LEN " added_tuples from " FORMAT_LEN " and select th
        else
        {
            /* We are surely done here (we read 0 tuples) */
-           MYLOG(0, "_%s: 'C': DONE (fcount == " FORMAT_LEN ")\n", func, num_backend_rows);
+           MYLOG(0, " 'C': DONE (fcount == " FORMAT_LEN ")\n", num_backend_rows);
            ret = -1;   /* end of tuples */
        }
    }
@@ -1303,7 +1302,7 @@ cleanup:
    LEAVE_CONN_CS(conn);
 #undef RETURN
 #undef return
-MYLOG(1, "%s returning %d offset=" FORMAT_LEN "\n", func, ret, offset);
+MYLOG(1, "returning %d offset=" FORMAT_LEN "\n", ret, offset);
    return ret;
 }
 
index 45da639f07a4bd5a4b39bc13dd9bf67e1df58b51..6478d720a865401aadf78474bbfb8649350fbd5a 100644 (file)
--- a/results.c
+++ b/results.c
@@ -46,7 +46,7 @@ PGAPI_RowCount(HSTMT hstmt,
    StatementClass *stmt = (StatementClass *) hstmt;
    QResultClass *res;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
    if (!stmt)
    {
        SC_log_error(func, NULL_STRING, NULL);
@@ -70,7 +70,7 @@ PGAPI_RowCount(HSTMT hstmt,
        if (res->recent_processed_row_count >= 0)
        {
            *pcrow = res->recent_processed_row_count;
-           MYLOG(0, "**** %s: THE ROWS: *pcrow = " FORMAT_LEN "\n", func, *pcrow);
+           MYLOG(0, "**** THE ROWS: *pcrow = " FORMAT_LEN "\n", *pcrow);
 
            return SQL_SUCCESS;
        }
@@ -95,7 +95,7 @@ SC_describe_ok(StatementClass *stmt, BOOL build_fi, int col_idx, const char *fun
    num_fields = SC_describe(stmt);
    result = SC_get_Curres(stmt);
 
-   MYLOG(0, "%s: result = %p, status = %d, numcols = %d\n", func, result, stmt->status, result != NULL ? QR_NumResultCols(result) : -1);
+   MYLOG(0, "entering result = %p, status = %d, numcols = %d\n", result, stmt->status, result != NULL ? QR_NumResultCols(result) : -1);
    /****if ((!result) || ((stmt->status != STMT_FINISHED) && (stmt->status != STMT_PREMATURE))) ****/
    if (!QR_command_maybe_successful(result) || num_fields < 0)
    {
@@ -150,7 +150,7 @@ PGAPI_NumResultCols(HSTMT hstmt,
    char        parse_ok;
    RETCODE     ret = SQL_SUCCESS;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
    if (!stmt)
    {
        SC_log_error(func, NULL_STRING, NULL);
@@ -171,7 +171,7 @@ PGAPI_NumResultCols(HSTMT hstmt,
    {
        if (SC_parsed_status(stmt) == STMT_PARSE_NONE)
        {
-           MYLOG(0, "%s: calling parse_statement on stmt=%p\n", func, stmt);
+           MYLOG(0, "calling parse_statement on stmt=%p\n", stmt);
            parse_statement(stmt, FALSE);
        }
 
@@ -179,7 +179,7 @@ PGAPI_NumResultCols(HSTMT hstmt,
        {
            parse_ok = TRUE;
            *pccol = SC_get_IRDF(stmt)->nfields;
-           MYLOG(0, "PARSE: %s: *pccol = %d\n", func, *pccol);
+           MYLOG(0, "PARSE: *pccol = %d\n", *pccol);
        }
    }
 
@@ -235,7 +235,7 @@ PGAPI_DescribeCol(HSTMT hstmt,
    int         len = 0;
    RETCODE     result = SQL_SUCCESS;
 
-   MYLOG(0, "%s: entering.%d..\n", func, icol);
+   MYLOG(0, "entering.%d..\n", icol);
 
    if (!stmt)
    {
@@ -286,11 +286,11 @@ MYLOG(1, "answering bookmark info\n");
    {
        if (SC_parsed_status(stmt) == STMT_PARSE_NONE)
        {
-           MYLOG(0, "%s: calling parse_statement on stmt=%p\n", func, stmt);
+           MYLOG(0, "calling parse_statement on stmt=%p\n", stmt);
            parse_statement(stmt, FALSE);
        }
 
-       MYLOG(0, "PARSE: DescribeCol: icol=%d, stmt=%p, stmt->nfld=%d, stmt->fi=%p\n", icol, stmt, irdflds->nfields, irdflds->fi);
+       MYLOG(0, "PARSE: icol=%d, stmt=%p, stmt->nfld=%d, stmt->fi=%p\n", icol, stmt, irdflds->nfields, irdflds->fi);
 
        if (SC_parsed_status(stmt) != STMT_PARSE_FATAL && irdflds->fi)
        {
@@ -302,7 +302,7 @@ MYLOG(1, "answering bookmark info\n");
                result = SQL_ERROR;
                goto cleanup;
            }
-           MYLOG(0, "DescribeCol: getting info for icol=%d\n", icol);
+           MYLOG(0, "getting info for icol=%d\n", icol);
        }
    }
 
@@ -377,9 +377,9 @@ MYLOG(1, "answering bookmark info\n");
        decimal_digits = pgtype_decimal_digits(stmt, fieldtype, icol);
    }
 
-   MYLOG(0, "describeCol: col %d fieldname = '%s'\n", icol, NULL_IF_NULL(col_name));
-   MYLOG(0, "describeCol: col %d fieldtype = %d\n", icol, fieldtype);
-   MYLOG(0, "describeCol: col %d column_size = " FORMAT_LEN "\n", icol, column_size);
+   MYLOG(0, "col %d fieldname = '%s'\n", icol, NULL_IF_NULL(col_name));
+   MYLOG(0, "col %d fieldtype = %d\n", icol, fieldtype);
+   MYLOG(0, "col %d column_size = " FORMAT_LEN "\n", icol, column_size);
 
    result = SQL_SUCCESS;
 
@@ -412,7 +412,7 @@ MYLOG(1, "answering bookmark info\n");
    {
        *pfSqlType = pgtype_to_concise_type(stmt, fieldtype, icol, unknown_sizes);
 
-       MYLOG(0, "describeCol: col %d *pfSqlType = %d\n", icol, *pfSqlType);
+       MYLOG(0, "col %d *pfSqlType = %d\n", icol, *pfSqlType);
    }
 
    /*
@@ -425,7 +425,7 @@ MYLOG(1, "answering bookmark info\n");
 
        *pcbColDef = column_size;
 
-       MYLOG(0, "describeCol: col %d  *pcbColDef = " FORMAT_ULEN "\n", icol, *pcbColDef);
+       MYLOG(0, "Col: col %d  *pcbColDef = " FORMAT_ULEN "\n", icol, *pcbColDef);
    }
 
    /*
@@ -437,7 +437,7 @@ MYLOG(1, "answering bookmark info\n");
            decimal_digits = 0;
 
        *pibScale = (SQLSMALLINT) decimal_digits;
-       MYLOG(0, "describeCol: col %d  *pibScale = %d\n", icol, *pibScale);
+       MYLOG(0, "col %d  *pibScale = %d\n", icol, *pibScale);
    }
 
    /*
@@ -450,7 +450,7 @@ MYLOG(1, "answering bookmark info\n");
        else
            *pfNullable = fi ? fi->nullable : pgtype_nullable(conn, fieldtype);
 
-       MYLOG(0, "describeCol: col %d  *pfNullable = %d\n", icol, *pfNullable);
+       MYLOG(0, "col %d  *pfNullable = %d\n", icol, *pfNullable);
    }
 
 cleanup:
@@ -487,7 +487,7 @@ PGAPI_ColAttributes(HSTMT hstmt,
    QResultClass    *res;
    BOOL        stmt_updatable;
 
-   MYLOG(0, "%s: entering..col=%d %d len=%d.\n", func, icol, fDescType,
+   MYLOG(0, "entering..col=%d %d len=%d.\n", icol, fDescType,
                cbDescMax);
 
    if (!stmt)
@@ -545,7 +545,7 @@ MYLOG(1, "answering bookmark info\n");
    {
        if (SC_parsed_status(stmt) == STMT_PARSE_NONE)
        {
-           MYLOG(0, "%s: calling parse_statement\n", func);
+           MYLOG(0, "calling parse_statement\n");
            parse_statement(stmt, FALSE);
        }
 
@@ -631,7 +631,7 @@ MYLOG(1, "answering bookmark info\n");
        field_type = getEffectiveOid(conn, fi);
    }
 
-   MYLOG(0, "colAttr: col %d field_type=%d fi,ti=%p,%p\n", col_idx, field_type, fi, ti);
+   MYLOG(0, "col %d field_type=%d fi,ti=%p,%p\n", col_idx, field_type, fi, ti);
 
 #ifdef SUPPRESS_LONGEST_ON_CURSORS
    if (UNKNOWNS_AS_LONGEST == unknown_sizes)
@@ -673,7 +673,7 @@ MYLOG(1, "answering bookmark info\n");
        case SQL_COLUMN_DISPLAY_SIZE: /* == SQL_DESC_DISPLAY_SIZE */
            value = (USE_FI(fi, unknown_sizes) && 0 != fi->display_size) ? fi->display_size : pgtype_display_size(stmt, field_type, col_idx, unknown_sizes);
 
-           MYLOG(0, "%s: col %d, display_size= " FORMAT_LEN "\n", func, col_idx, value);
+           MYLOG(0, "col %d, display_size= " FORMAT_LEN "\n", col_idx, value);
 
            break;
 
@@ -682,7 +682,7 @@ MYLOG(1, "answering bookmark info\n");
            {
                p = GET_NAME(fi->column_alias);
 
-               MYLOG(0, "%s: COLUMN_LABEL = '%s'\n", func, p);
+               MYLOG(0, "COLUMN_LABEL = '%s'\n", p);
                break;
            }
            /* otherwise same as column name -- FALL THROUGH!!! */
@@ -695,7 +695,7 @@ MYLOG(1, "answering bookmark info\n");
                MYPRINTF(1, "NULL\n");
            p = fi ? (NAME_IS_NULL(fi->column_alias) ? SAFE_NAME(fi->column_name) : GET_NAME(fi->column_alias)) : QR_get_fieldname(res, col_idx);
 
-           MYLOG(0, "%s: COLUMN_NAME = '%s'\n", func, p);
+           MYLOG(0, "COLUMN_NAME = '%s'\n", p);
            break;
 
        case SQL_COLUMN_LENGTH:
@@ -704,7 +704,7 @@ MYLOG(1, "answering bookmark info\n");
            /* if (-1 == value)  I'm not sure which is right */
                value = 0;
 
-           MYLOG(0, "%s: col %d, column_length = " FORMAT_LEN "\n", func, col_idx, value);
+           MYLOG(0, "col %d, column_length = " FORMAT_LEN "\n", col_idx, value);
            break;
 
        case SQL_COLUMN_MONEY: /* == SQL_DESC_FIXED_PREC_SCALE */
@@ -722,7 +722,7 @@ MYLOG(1, "COLUMN_NULLABLE=" FORMAT_LEN "\n", value);
 
        case SQL_COLUMN_OWNER_NAME: /* == SQL_DESC_SCHEMA_NAME */
            p = ti ? SAFE_NAME(ti->schema_name) : NULL_STRING;
-           MYLOG(0, "%s: SCHEMA_NAME = '%s'\n", func, p);
+           MYLOG(0, "SCHEMA_NAME = '%s'\n", p);
            break;
 
        case SQL_COLUMN_PRECISION: /* in 2.x */
@@ -730,7 +730,7 @@ MYLOG(1, "COLUMN_NULLABLE=" FORMAT_LEN "\n", value);
            if (value < 0)
                value = 0;
 
-           MYLOG(0, "%s: col %d, column_size = " FORMAT_LEN "\n", func, col_idx, value);
+           MYLOG(0, "col %d, column_size = " FORMAT_LEN "\n", col_idx, value);
            break;
 
        case SQL_COLUMN_QUALIFIER_NAME: /* == SQL_DESC_CATALOG_NAME */
@@ -751,7 +751,7 @@ MYLOG(1, "COLUMN_SCALE=" FORMAT_LEN "\n", value);
        case SQL_COLUMN_TABLE_NAME: /* == SQL_DESC_TABLE_NAME */
            p = ti ? SAFE_NAME(ti->table_name) : NULL_STRING;
 
-           MYLOG(0, "%s: TABLE_NAME = '%s'\n", func, p);
+           MYLOG(0, "TABLE_NAME = '%s'\n", p);
            break;
 
        case SQL_COLUMN_TYPE: /* == SQL_DESC_CONCISE_TYPE */
@@ -799,25 +799,25 @@ MYLOG(1, "COLUMN_SCALE=" FORMAT_LEN "\n", value);
 
            p = fi ? SAFE_NAME(fi->column_name) : QR_get_fieldname(res, col_idx);
 
-           MYLOG(0, "%s: BASE_COLUMN_NAME = '%s'\n", func, p);
+           MYLOG(0, "BASE_COLUMN_NAME = '%s'\n", p);
            break;
        case SQL_DESC_BASE_TABLE_NAME: /* the same as TABLE_NAME ok ? */
            p = ti ? SAFE_NAME(ti->table_name) : NULL_STRING;
 
-           MYLOG(0, "%s: BASE_TABLE_NAME = '%s'\n", func, p);
+           MYLOG(0, "BASE_TABLE_NAME = '%s'\n", p);
            break;
        case SQL_DESC_LENGTH: /* different from SQL_COLUMN_LENGTH */
            value = (fi && column_size > 0) ? column_size : pgtype_desclength(stmt, field_type, col_idx, unknown_sizes);
            if (-1 == value)
                value = 0;
 
-           MYLOG(0, "%s: col %d, desc_length = " FORMAT_LEN "\n", func, col_idx, value);
+           MYLOG(0, "col %d, desc_length = " FORMAT_LEN "\n", col_idx, value);
            break;
        case SQL_DESC_OCTET_LENGTH:
            value = (USE_FI(fi, unknown_sizes) && fi->length > 0) ? fi->length : pgtype_attr_transfer_octet_length(conn, field_type, column_size, unknown_sizes);
            if (-1 == value)
                value = 0;
-           MYLOG(0, "%s: col %d, octet_length = " FORMAT_LEN "\n", func, col_idx, value);
+           MYLOG(0, "col %d, octet_length = " FORMAT_LEN "\n", col_idx, value);
            break;
        case SQL_DESC_PRECISION: /* different from SQL_COLUMN_PRECISION */
            if (value = FI_precision(fi), value <= 0)
@@ -825,7 +825,7 @@ MYLOG(1, "COLUMN_SCALE=" FORMAT_LEN "\n", value);
            if (value < 0)
                value = 0;
 
-           MYLOG(0, "%s: col %d, desc_precision = " FORMAT_LEN "\n", func, col_idx, value);
+           MYLOG(0, "col %d, desc_precision = " FORMAT_LEN "\n", col_idx, value);
            break;
        case SQL_DESC_SCALE: /* different from SQL_COLUMN_SCALE */
            value = pgtype_scale(stmt, field_type, col_idx);
@@ -861,7 +861,7 @@ MYLOG(1, "COLUMN_SCALE=" FORMAT_LEN "\n", value);
                    SC_set_SS_columnkey(stmt);
                }
                value = fi->columnkey;
-               MYLOG(0, "%s:SS_COLUMN_KEY=" FORMAT_LEN "\n", func, value);
+               MYLOG(0, "SS_COLUMN_KEY=" FORMAT_LEN "\n", value);
                break;
            }
            SC_set_error(stmt, STMT_OPTION_NOT_FOR_THE_DRIVER, "this request may be for MS SQL Server", func);
@@ -927,7 +927,7 @@ PGAPI_GetData(HSTMT hstmt,
    SQLCHAR     dum_rgb[2] = "\0\0";
 #endif /* WITH_UNIXODBC */
 
-   MYLOG(0, "%s: enter, stmt=%p icol=%d\n", func, stmt, icol);
+   MYLOG(0, "entering stmt=%p icol=%d\n", stmt, icol);
 
    if (!stmt)
    {
@@ -1086,7 +1086,7 @@ MYLOG(1, "currT=" FORMAT_LEN " base=" FORMAT_LEN " rowset=" FORMAT_LEN "\n", stm
    field_type = QR_get_field_type(res, icol);
    atttypmod = QR_get_atttypmod(res, icol);
 
-   MYLOG(0, "**** %s: icol = %d, target_type = %d, field_type = %d, value = '%s'\n", func, icol, target_type, field_type, NULL_IF_NULL(value));
+   MYLOG(0, "**** icol = %d, target_type = %d, field_type = %d, value = '%s'\n", icol, target_type, field_type, NULL_IF_NULL(value));
 
    SC_set_current_col(stmt, icol);
 
@@ -1136,7 +1136,7 @@ MYLOG(1, "currT=" FORMAT_LEN " base=" FORMAT_LEN " rowset=" FORMAT_LEN "\n", stm
 
 cleanup:
 #undef return
-MYLOG(1, "%s returning %d\n", __FUNCTION__, result);
+MYLOG(1, "leaving %d\n", result);
    return result;
 }
 
@@ -1155,7 +1155,7 @@ PGAPI_Fetch(HSTMT hstmt)
    BindInfoClass   *bookmark;
    RETCODE     retval = SQL_SUCCESS;
 
-   MYLOG(0, "%s: stmt = %p, stmt->result= %p\n", func, stmt, stmt ? SC_get_Curres(stmt) : NULL);
+   MYLOG(0, "entering stmt = %p, stmt->result= %p\n", stmt, stmt ? SC_get_Curres(stmt) : NULL);
 
    if (!stmt)
    {
@@ -1428,7 +1428,7 @@ PGAPI_ExtendedFetch(HSTMT hstmt,
    BOOL        currp_is_valid, reached_eof, useCursor;
    SQLLEN      reqsize = rowsetSize;
 
-   MYLOG(0, "%s: stmt=%p rowsetSize=" FORMAT_LEN "\n", func, stmt, rowsetSize);
+   MYLOG(0, "entering stmt=%p rowsetSize=" FORMAT_LEN "\n", stmt, rowsetSize);
 
    if (!stmt)
    {
@@ -1833,7 +1833,7 @@ MYLOG(1, "num_tuples=" FORMAT_LEN "\n", num_tuples);
    }
    /* Physical Row advancement occurs for each row fetched below */
 
-   MYLOG(0, "PGAPI_ExtendedFetch: new currTuple = " FORMAT_LEN "\n", stmt->currTuple);
+   MYLOG(0, "new currTuple = " FORMAT_LEN "\n", stmt->currTuple);
 
    truncated = error = FALSE;
 
@@ -1971,12 +1971,11 @@ cleanup:
 RETCODE        SQL_API
 PGAPI_MoreResults(HSTMT hstmt)
 {
-   CSTR func = "PGAPI_MoreResults";
    StatementClass  *stmt = (StatementClass *) hstmt;
    QResultClass    *res;
    RETCODE     ret = SQL_SUCCESS;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
    res = SC_get_Curres(stmt);
    if (res)
    {
@@ -2009,7 +2008,7 @@ PGAPI_MoreResults(HSTMT hstmt)
        PGAPI_FreeStmt(hstmt, SQL_CLOSE);
        ret = SQL_NO_DATA_FOUND;
    }
-   MYLOG(0, "%s: returning %d\n", func, ret);
+   MYLOG(0, "leaving %d\n", ret);
    return ret;
 }
 
@@ -2057,7 +2056,7 @@ static void AddRollback(StatementClass *stmt, QResultClass *res, SQLLEN index, c
 
    if (!CC_is_in_trans(conn))
        return;
-MYLOG(1, "AddRollback " FORMAT_LEN "(%u,%u) %s\n", index, keyset->blocknum, keyset->offset, dmlcode == SQL_ADD ? "ADD" : (dmlcode == SQL_UPDATE ? "UPDATE" : (dmlcode == SQL_DELETE ? "DELETE" : "REFRESH")));
+MYLOG(1, "entering " FORMAT_LEN "(%u,%u) %s\n", index, keyset->blocknum, keyset->offset, dmlcode == SQL_ADD ? "ADD" : (dmlcode == SQL_UPDATE ? "UPDATE" : (dmlcode == SQL_DELETE ? "DELETE" : "REFRESH")));
    if (!res->rollback)
    {
        res->rb_count = 0;
@@ -2119,7 +2118,7 @@ SQLLEN ReplaceCachedRows(TupleField *otuple, const TupleField *ituple, int num_f
 {
    SQLLEN  i;
 
-MYLOG(1, "ReplaceCachedRows %p num_fields=%d num_rows=" FORMAT_LEN "\n", otuple, num_fields, num_rows);
+MYLOG(1, "entering %p num_fields=%d num_rows=" FORMAT_LEN "\n", otuple, num_fields, num_rows);
    for (i = 0; i < num_fields * num_rows; i++, ituple++, otuple++)
    {
        if (otuple->value)
@@ -2145,7 +2144,7 @@ int MoveCachedRows(TupleField *otuple, TupleField *ituple, Int2 num_fields, SQLL
 {
    int i;
 
-MYLOG(1, "MoveCachedRows %p num_fields=%d num_rows=" FORMAT_LEN "\n", otuple, num_fields, num_rows);
+MYLOG(1, "entering %p num_fields=%d num_rows=" FORMAT_LEN "\n", otuple, num_fields, num_rows);
    for (i = 0; i < num_fields * num_rows; i++, ituple++, otuple++)
    {
        if (otuple->value)
@@ -2263,7 +2262,7 @@ static void AddAdded(StatementClass *stmt, QResultClass *res, SQLLEN index, cons
 
    if (!res)   return;
    num_fields = res->num_fields;
-MYLOG(1, "AddAdded index=" FORMAT_LEN ", tuple=%p, num_fields=%d\n", index, tuple_added, num_fields);
+MYLOG(1, "entering index=" FORMAT_LEN ", tuple=%p, num_fields=%d\n", index, tuple_added, num_fields);
    ad_count = res->ad_count;
    res->ad_count++;
    if (QR_get_cursor(res))
@@ -2309,7 +2308,7 @@ static    void RemoveAdded(QResultClass *res, SQLLEN index)
    KeySet  *added_keyset;
    TupleField  *added_tuples;
 
-   MYLOG(0, "RemoveAdded index=" FORMAT_LEN "\n", index);
+   MYLOG(0, "entering index=" FORMAT_LEN "\n", index);
    if (index < 0)
        rmidx = -index - 1;
    else
@@ -2328,7 +2327,7 @@ static    void RemoveAdded(QResultClass *res, SQLLEN index)
    RemoveDeleted(res, index);
    RemoveUpdated(res, index);
    res->ad_count--;
-   MYLOG(0, "RemoveAdded removed=1 count=%d\n", res->ad_count);
+   MYLOG(0, "removed=1 count=%d\n", res->ad_count);
 }
 
 static void
@@ -2338,7 +2337,7 @@ CommitAdded(QResultClass *res)
    int i;
    UWORD   status;
 
-   MYLOG(0, "CommitAdded res=%p\n", res);
+   MYLOG(0, "entering res=%p\n", res);
    if (!res || !res->added_keyset) return;
    added_keyset = res->added_keyset;
    for (i = res->ad_count - 1; i >= 0; i--)
@@ -2377,7 +2376,7 @@ AddDeleted(QResultClass *res, SQLULEN index, const KeySet *keyset)
    UWORD   status;
    Int2    num_fields = res->num_fields;
 
-MYLOG(1, "AddDeleted " FORMAT_ULEN "\n", index);
+MYLOG(1, "entering " FORMAT_ULEN "\n", index);
    dl_count = res->dl_count;
    res->dl_count++;
    if (!QR_get_cursor(res))
@@ -2442,7 +2441,7 @@ RemoveDeleted(QResultClass *res, SQLLEN index)
    SQLLEN  *deleted, num_read = QR_get_num_total_read(res);
    KeySet  *deleted_keyset;
 
-   MYLOG(0, "RemoveDeleted index=" FORMAT_LEN "\n", index);
+   MYLOG(0, "entering index=" FORMAT_LEN "\n", index);
    if (index < 0)
    {
        midx = index;
@@ -2473,7 +2472,7 @@ RemoveDeleted(QResultClass *res, SQLLEN index)
            rm_count++;
        }
    }
-   MYLOG(0, "RemoveDeleted removed count=%d,%d\n", rm_count, res->dl_count);
+   MYLOG(0, "removed count=%d,%d\n", rm_count, res->dl_count);
 }
 
 static void
@@ -2507,7 +2506,7 @@ CommitDeleted(QResultClass *res)
        }
        if (status != deleted_keyset->status)
        {
-MYLOG(1, "!!Commit Deleted=" FORMAT_LEN "(%d)\n", *deleted, i);
+MYLOG(1, "Deleted=" FORMAT_LEN "(%d)\n", *deleted, i);
            deleted_keyset->status = status;
        }
    }
@@ -2553,7 +2552,7 @@ AddUpdated(StatementClass *stmt, SQLLEN index, const KeySet *keyset, const Tuple
    int i;
    UWORD   status;
 
-MYLOG(1, "AddUpdated index=" FORMAT_LEN "\n", index);
+MYLOG(1, "entering index=" FORMAT_LEN "\n", index);
    if (!stmt)  return;
    if (res = SC_get_Curres(stmt), !res)    return;
    if (!keyset)    return;
@@ -2646,7 +2645,7 @@ MYLOG(1, "AddUpdated index=" FORMAT_LEN "\n", index);
 static void
 RemoveUpdated(QResultClass *res, SQLLEN index)
 {
-   MYLOG(0, "RemoveUpdated index=" FORMAT_LEN "\n", index);
+   MYLOG(0, "entering index=" FORMAT_LEN "\n", index);
    RemoveUpdatedAfterTheKey(res, index, NULL);
 }
 
@@ -2659,7 +2658,7 @@ RemoveUpdatedAfterTheKey(QResultClass *res, SQLLEN index, const KeySet *keyset)
    SQLLEN  pidx, midx, mv_count;
    int i, num_fields = res->num_fields, rm_count = 0;
 
-   MYLOG(0, "RemoveUpdatedAfterTheKey " FORMAT_LEN ",(%u,%u)\n", index, keyset ? keyset->blocknum : 0, keyset ? keyset->offset : 0);
+   MYLOG(0, "entering " FORMAT_LEN ",(%u,%u)\n", index, keyset ? keyset->blocknum : 0, keyset ? keyset->offset : 0);
    if (index < 0)
    {
        midx = index;
@@ -2702,7 +2701,7 @@ RemoveUpdatedAfterTheKey(QResultClass *res, SQLLEN index, const KeySet *keyset)
            rm_count++;
        }
    }
-   MYLOG(0, "RemoveUpdatedAfter removed count=%d,%d\n", rm_count, res->up_count);
+   MYLOG(0, "removed count=%d,%d\n", rm_count, res->up_count);
 }
 
 static void
@@ -2712,7 +2711,7 @@ CommitUpdated(QResultClass *res)
    int i;
    UWORD   status;
 
-   MYLOG(0, "CommitUpdated res=%p\n", res);
+   MYLOG(0, "entering res=%p\n", res);
    if (!res)   return;
    if (!QR_get_cursor(res))
        return;
@@ -2757,7 +2756,7 @@ DiscardRollback(StatementClass *stmt, QResultClass *res)
    KeySet  *keyset;
    BOOL    kres_is_valid;
 
-MYLOG(1, "DiscardRollback\n");
+MYLOG(1, "entering\n");
    if (QR_get_cursor(res))
    {
        CommitAdded(res);
@@ -2901,7 +2900,7 @@ MYLOG(1, "rollbp=%d\n", rollbp);
 
    for (i = res->rb_count - 1; i >= rollbp; i--)
    {
-MYLOG(1, "UndoRollback %d(%d)\n", i, rollback[i].option);
+MYLOG(1, "do %d(%d)\n", i, rollback[i].option);
        index = rollback[i].index;
        if (curs)
        {
@@ -3026,7 +3025,7 @@ positioned_load(StatementClass *stmt, UInt4 flag, const UInt4 *oidint, const cha
    const ssize_t   from_pos = stmt->load_from_pos;
    const char *load_stmt = stmt->load_statement;
 
-MYLOG(1, "%s bestitem=%s bestqual=%s\n", func, SAFE_NAME(ti->bestitem), SAFE_NAME(ti->bestqual));
+MYLOG(1, "entering bestitem=%s bestqual=%s\n", SAFE_NAME(ti->bestitem), SAFE_NAME(ti->bestqual));
    initPQExpBuffer(&selstr);
 #define    return  DONT_CALL_RETURN_FROM_HERE???
    if (TI_has_subclass(ti))
@@ -3163,7 +3162,7 @@ SC_pos_reload_with_key(StatementClass *stmt, SQLULEN global_ridx, UInt2 *count,
    BOOL        use_ctid = TRUE;
    BOOL        idx_exist = TRUE;
 
-   MYLOG(0, "positioned load fi=%p ti=%p\n", irdflds->fi, stmt->ti);
+   MYLOG(0, "entering fi=%p ti=%p\n", irdflds->fi, stmt->ti);
    rcnt = 0;
    if (count)
        *count = 0;
@@ -3481,7 +3480,7 @@ static SQLLEN LoadFromKeyset_inh(StatementClass *stmt, QResultClass * res, int r
    const char *load_stmt = stmt->load_statement;
    const ssize_t   from_pos = stmt->load_from_pos;
 
-MYLOG(0, " %s in rows_per_fetch=%d limitrow=" FORMAT_LEN "\n", __FUNCTION__, rows_per_fetch, limitrow);
+MYLOG(0, "entering in rows_per_fetch=%d limitrow=" FORMAT_LEN "\n", rows_per_fetch, limitrow);
    new_oid = 0;
 #define    return  DONT_CALL_RETURN_FROM_HERE???
    for (i = SC_get_rowset_start(stmt), kres_ridx = GIdx2KResIdx(i, stmt, res), rowc = 0, oid = 0;; i++, kres_ridx++)
@@ -3607,7 +3606,7 @@ SC_pos_reload_needed(StatementClass *stmt, SQLULEN req_size, UDWORD flag)
    Int4        rows_per_fetch;
    BOOL        create_from_scratch = (0 != flag);
 
-   MYLOG(0, "%s\n", func);
+   MYLOG(0, "entering\n");
    if (!(res = SC_get_Curres(stmt)))
    {
        SC_set_error(stmt, STMT_INVALID_CURSOR_STATE_ERROR, "Null statement result in SC_pos_reload_needed.", func);
@@ -3702,7 +3701,7 @@ SC_pos_newload(StatementClass *stmt, const UInt4 *oidint, BOOL tidRef,
    QResultClass *res, *qres;
    RETCODE     ret = SQL_ERROR;
 
-   MYLOG(0, "positioned new ti=%p\n", stmt->ti);
+   MYLOG(0, "entering ti=%p\n", stmt->ti);
    if (!(res = SC_get_Curres(stmt)))
    {
        SC_set_error(stmt, STMT_INVALID_CURSOR_STATE_ERROR, "Null statement result in SC_pos_newload.", func);
@@ -3881,7 +3880,7 @@ pos_update_callback(RETCODE retcode, void *para)
 
    if (s->updyes)
    {
-       MYLOG(0, "pos_update_callback in\n");
+       MYLOG(0, "entering\n");
        ret = irow_update(ret, s->stmt, s->qstmt, s->global_ridx, &s->old_keyset);
 MYLOG(1, "irow_update ret=%d,%d\n", ret, SC_get_errornumber(s->qstmt));
        if (ret != SQL_SUCCESS)
@@ -3955,7 +3954,7 @@ SC_pos_update(StatementClass *stmt,
        SC_set_error(s.stmt, STMT_INVALID_CURSOR_STATE_ERROR, "Null statement result in SC_pos_update.", func);
        return SQL_ERROR;
    }
-   MYLOG(0, "POS UPDATE " FORMAT_POSIROW "+" FORMAT_LEN " fi=%p ti=%p\n", s.irow, QR_get_rowstart_in_cache(s.res), fi, s.stmt->ti);
+   MYLOG(0, "entering " FORMAT_POSIROW "+" FORMAT_LEN " fi=%p ti=%p\n", s.irow, QR_get_rowstart_in_cache(s.res), fi, s.stmt->ti);
    if (SC_update_not_ready(stmt))
        parse_statement(s.stmt, TRUE);  /* not preferable */
    if (!SC_is_updatable(s.stmt))
@@ -4159,7 +4158,7 @@ SC_pos_delete(StatementClass *stmt,
    BOOL        idx_exist = TRUE;
    char        table_fqn[256];
 
-   MYLOG(0, "POS DELETE ti=%p\n", stmt->ti);
+   MYLOG(0, "entering ti=%p\n", stmt->ti);
    if (!(res = SC_get_Curres(stmt)))
    {
        SC_set_error(stmt, STMT_INVALID_CURSOR_STATE_ERROR, "Null statement result in SC_pos_delete.", func);
@@ -4386,7 +4385,7 @@ pos_add_callback(RETCODE retcode, void *para)
    {
        SQLSETPOSIROW   brow_save;
 
-       MYLOG(0, "pos_add_callback in ret=%d\n", ret);
+       MYLOG(0, "entering ret=%d\n", ret);
        brow_save = s->stmt->bind_row;
        s->stmt->bind_row = s->irow;
        if (QR_get_cursor(s->res))
@@ -4462,7 +4461,7 @@ SC_pos_add(StatementClass *stmt,
    int     func_cs_count = 0;
    char        table_fqn[256];
 
-   MYLOG(0, "POS ADD fi=%p ti=%p\n", fi, stmt->ti);
+   MYLOG(0, "entering fi=%p ti=%p\n", fi, stmt->ti);
    s.stmt = stmt;
    s.irow = irow;
    if (!(s.res = SC_get_Curres(s.stmt)))
@@ -4693,7 +4692,7 @@ RETCODE spos_callback(RETCODE retcode, void *para)
    SQLLEN  kres_ridx, pos_ridx = 0;
 
    ret = retcode;
-   MYLOG(0, "%s: %d in\n", func, s->need_data_callback);
+   MYLOG(0, "entering %d in\n", s->need_data_callback);
    if (s->need_data_callback)
    {
        s->processed++;
@@ -4835,7 +4834,7 @@ PGAPI_SetPos(HSTMT hstmt,
    s.opts = SC_get_ARDF(s.stmt);
    gdata_info = SC_get_GDTI(s.stmt);
    gdata = gdata_info->gdata;
-   MYLOG(0, "%s fOption=%d irow=" FORMAT_POSIROW " lock=%hu currt=" FORMAT_LEN "\n", func, s.fOption, s.irow, fLock, s.stmt->currTuple);
+   MYLOG(0, "entering fOption=%d irow=" FORMAT_POSIROW " lock=%hu currt=" FORMAT_LEN "\n", s.fOption, s.irow, fLock, s.stmt->currTuple);
    if (s.stmt->options.scroll_concurrency != SQL_CONCUR_READ_ONLY)
        ;
    else if (s.fOption != SQL_POSITION && s.fOption != SQL_REFRESH)
@@ -4902,7 +4901,7 @@ MYLOG(0, "num_cols=%d gdatainfo=%d\n", QR_NumPublicResultCols(s.res), gdata_allo
        SC_set_error(s.stmt, STMT_ROW_OUT_OF_RANGE, "the row was deleted?", func);
        ret = SQL_ERROR;
    }
-   MYLOG(0, "%s returning %d\n", func, ret);
+   MYLOG(0, "leaving %d\n", ret);
    return ret;
 }
 
@@ -4917,8 +4916,8 @@ PGAPI_SetScrollOptions(HSTMT hstmt,
    CSTR func = "PGAPI_SetScrollOptions";
    StatementClass *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "%s: fConcurrency=%d crowKeyset=" FORMAT_LEN " crowRowset=%d\n",
-         func, fConcurrency, crowKeyset, crowRowset);
+   MYLOG(0, "entering fConcurrency=%d crowKeyset=" FORMAT_LEN " crowRowset=%d\n",
+         fConcurrency, crowKeyset, crowRowset);
    SC_set_error(stmt, STMT_NOT_IMPLEMENTED_ERROR, "SetScroll option not implemeted", func);
 
    return SQL_ERROR;
@@ -4934,7 +4933,7 @@ PGAPI_SetCursorName(HSTMT hstmt,
    CSTR func = "PGAPI_SetCursorName";
    StatementClass *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "%s: hstmt=%p, szCursor=%p, cbCursorMax=%d\n", func, hstmt, szCursor, cbCursor);
+   MYLOG(0, "entering hstmt=%p, szCursor=%p, cbCursorMax=%d\n", hstmt, szCursor, cbCursor);
 
    if (!stmt)
    {
@@ -4959,7 +4958,7 @@ PGAPI_GetCursorName(HSTMT hstmt,
    size_t      len = 0;
    RETCODE     result;
 
-   MYLOG(0, "%s: hstmt=%p, szCursor=%p, cbCursorMax=%d, pcbCursor=%p\n", func, hstmt, szCursor, cbCursorMax, pcbCursor);
+   MYLOG(0, "entering hstmt=%p, szCursor=%p, cbCursorMax=%d, pcbCursor=%p\n", hstmt, szCursor, cbCursorMax, pcbCursor);
 
    if (!stmt)
    {
@@ -5016,7 +5015,7 @@ SC_fetch_by_bookmark(StatementClass *stmt)
    TupleField  *otuple, *ituple;
    SQLUSMALLINT    *rowStatusArray;
 
-   MYLOG(0, "%s in\n", __FUNCTION__);
+   MYLOG(0, "entering\n");
 
    if (!(res = SC_get_Curres(stmt)))
    {
@@ -5129,7 +5128,7 @@ MYLOG(0, "i=%d bidx=" FORMAT_LEN " cached=" FORMAT_ULEN "\n", i, bidx, res->num_
    opts->bookmark = NULL;
    ret = PGAPI_ExtendedFetch(fstmt, SQL_FETCH_NEXT, 0,
        &cRow, NULL, 0, size_of_rowset);
-   MYLOG(0, "%s cRow=" FORMAT_ULEN "\n", __FUNCTION__, cRow);
+   MYLOG(0, "cRow=" FORMAT_ULEN "\n", cRow);
 
 cleanup:
    if (NULL != hstmt)
index cec01c03826b3a1a617a246209b7a788de2907d4..2616fc11541ab715a05d49814bf4934d0f5c2881 100644 (file)
@@ -183,7 +183,7 @@ PGAPI_AllocStmt(HDBC hdbc,
    StatementClass *stmt;
    ARDFields   *ardopts;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
 
    if (!conn)
    {
@@ -193,7 +193,7 @@ PGAPI_AllocStmt(HDBC hdbc,
 
    stmt = SC_Constructor(conn);
 
-   MYLOG(0, "**** PGAPI_AllocStmt: hdbc = %p, stmt = %p\n", hdbc, stmt);
+   MYLOG(0, "**** : hdbc = %p, stmt = %p\n", hdbc, stmt);
 
    if (!stmt)
    {
@@ -242,7 +242,7 @@ PGAPI_FreeStmt(HSTMT hstmt,
    CSTR func = "PGAPI_FreeStmt";
    StatementClass *stmt = (StatementClass *) hstmt;
 
-   MYLOG(0, "%s: entering...hstmt=%p, fOption=%hi\n", func, hstmt, fOption);
+   MYLOG(0, "entering...hstmt=%p, fOption=%hi\n", hstmt, fOption);
 
    if (!stmt)
    {
@@ -468,7 +468,7 @@ SC_Destructor(StatementClass *self)
    CSTR func   = "SC_Destructor";
    QResultClass    *res = SC_get_Result(self);
 
-   MYLOG(0, "SC_Destructor: self=%p, self->result=%p, self->hdbc=%p\n", self, res, self->hdbc);
+   MYLOG(0, "entering self=%p, self->result=%p, self->hdbc=%p\n", self, res, self->hdbc);
    SC_clear_error(self);
    if (STMT_EXECUTING == self->status)
    {
@@ -509,7 +509,7 @@ SC_Destructor(StatementClass *self)
    DELETE_STMT_CS(self);
    free(self);
 
-   MYLOG(0, "SC_Destructor: EXIT\n");
+   MYLOG(0, "leaving\n");
 
    return TRUE;
 }
@@ -519,7 +519,7 @@ SC_init_Result(StatementClass *self)
 {
    self->result = self->curres = NULL;
    self->curr_param_result = 0;
-   MYLOG(0, "SC_init_Result(%p)\n", self);
+   MYLOG(0, "leaving(%p)\n", self);
 }
 
 void
@@ -527,7 +527,7 @@ SC_set_Result(StatementClass *self, QResultClass *res)
 {
    if (res != self->result)
    {
-       MYLOG(0, "SC_set_Result(%p, %p)\n", self, res);
+       MYLOG(0, "(%p, %p)\n", self, res);
        QR_Destructor(self->result);
        self->result = self->curres = res;
        if (NULL != res)
@@ -746,7 +746,7 @@ BOOL    SC_opencheck(StatementClass *self, const char *func)
     */
    if (self->prepare && self->status == STMT_DESCRIBED)
    {
-       MYLOG(0, "SC_opencheck: self->prepare && self->status == STMT_DESCRIBED\n");
+       MYLOG(0, "self->prepare && self->status == STMT_DESCRIBED\n");
        return FALSE;
    }
    if (res = SC_get_Curres(self), NULL != res)
@@ -803,7 +803,7 @@ SC_recycle_statement(StatementClass *self)
    CSTR    func = "SC_recycle_statement";
    ConnectionClass *conn;
 
-   MYLOG(0, "%s: self= %p\n", func, self);
+   MYLOG(0, "entering self=%p\n", self);
 
    SC_clear_error(self);
    /* This would not happen */
@@ -866,7 +866,7 @@ MYLOG(1, "SC_clear_parse_status\n");
    SC_set_rowset_start(self, -1, FALSE);
    SC_set_current_col(self, -1);
    self->bind_row = 0;
-MYLOG(1, "%s statement=%p ommitted=0\n", func, self);
+MYLOG(1, "statement=%p ommitted=0\n", self);
    self->last_fetch_count = self->last_fetch_count_include_ommitted = 0;
 
    self->__error_message = NULL;
@@ -904,7 +904,6 @@ SC_scanQueryAndCountParams(const char *query, const ConnectionClass *conn,
        ssize_t *next_cmd, SQLSMALLINT * pcpar,
        po_ind_t *multi_st, po_ind_t *proc_return)
 {
-   CSTR func = "SC_scanQueryAndCountParams";
    const   char *sptr, *tstr, *tag = NULL;
    size_t  taglen = 0;
    char    tchar, bchar, escape_in_literal = '\0';
@@ -917,7 +916,7 @@ SC_scanQueryAndCountParams(const char *query, const ConnectionClass *conn,
    SQLSMALLINT num_p;
    encoded_str encstr;
 
-   MYLOG(0, "%s: entering...\n", func);
+   MYLOG(0, "entering...\n");
    num_p = 0;
    if (proc_return)
        *proc_return = 0;
@@ -1095,7 +1094,7 @@ SC_describe(StatementClass *self)
 {
    Int4        num_fields = -1;
    QResultClass    *res;
-   MYLOG(0, "SC_describe: status = %d\n", self->status);
+   MYLOG(0, "entering status = %d\n", self->status);
 
    res = SC_get_Curres(self);
    if (NULL != res)
@@ -1383,7 +1382,7 @@ StatementClass *SC_get_ancestor(StatementClass *stmt)
 {
    StatementClass  *child = stmt, *parent;
 
-MYLOG(1, "SC_get_ancestor in stmt=%p\n", stmt);
+MYLOG(1, "entering stmt=%p\n", stmt);
    for (child = stmt, parent = child->execute_parent; parent; child = parent, parent = child->execute_parent)
    {
        MYLOG(1, "parent=%p\n", parent);
@@ -1426,7 +1425,7 @@ SC_replace_error_with_res(StatementClass *self, int number, const char *message,
    QResultClass    *self_res;
    BOOL    repstate;
 
-MYLOG(1, "SC_set_error_from_res %p->%p check=%i\n", from_res ,self, check);
+MYLOG(1, "entering %p->%p check=%i\n", from_res ,self, check);
    if (check)
    {
        if (0 == number)            return;
@@ -1471,7 +1470,7 @@ SC_error_copy(StatementClass *self, const StatementClass *from, BOOL check)
    QResultClass    *self_res, *from_res;
    BOOL    repstate;
 
-MYLOG(1, "SC_error_copy %p->%p check=%i\n", from ,self, check);
+MYLOG(1, "entering %p->%p check=%i\n", from ,self, check);
    if (self == from)   return;
    if (check)
    {
@@ -1519,7 +1518,7 @@ SC_full_error_copy(StatementClass *self, const StatementClass *from, BOOL allres
 {
    PG_ErrorInfo        *pgerror;
 
-MYLOG(1, "SC_full_error_copy %p->%p\n", from ,self);
+MYLOG(1, "entering %p->%p\n", from ,self);
    if (self->__error_message)
    {
        free(self->__error_message);
@@ -1627,7 +1626,7 @@ SC_fetch(StatementClass *self)
 
    /* TupleField *tupleField; */
 
-MYLOG(1, "%s statement=%p res=%p ommitted=0\n", func, self, res);
+MYLOG(1, "entering statement=%p res=%p ommitted=0\n", self, res);
    self->last_fetch_count = self->last_fetch_count_include_ommitted = 0;
    if (!res)
        return SQL_ERROR;
@@ -1649,7 +1648,7 @@ MYLOG(1, "%s statement=%p res=%p ommitted=0\n", func, self, res);
            return SQL_NO_DATA_FOUND;
        }
 
-       MYLOG(0, "**** %s: non-cursor_result\n", func);
+       MYLOG(0, "**** : non-cursor_result\n");
        (self->currTuple)++;
    }
    else
@@ -1658,7 +1657,7 @@ MYLOG(1, "%s statement=%p res=%p ommitted=0\n", func, self, res);
        retval = QR_next_tuple(res, self);
        if (retval < 0)
        {
-           MYLOG(0, "**** %s: end_tuples\n", func);
+           MYLOG(0, "**** : end_tuples\n");
            if (QR_get_cursor(res) &&
                SQL_CURSOR_FORWARD_ONLY == self->options.cursor_type &&
                QR_once_reached_eof(res))
@@ -1706,7 +1705,7 @@ MYLOG(1, "SC_ pstatus[" FORMAT_LEN "]=%hx fetch_count=" FORMAT_LEN "\n", kres_ri
 
    result = SQL_SUCCESS;
    self->last_fetch_count++;
-MYLOG(1, "%s: stmt=%p ommitted++\n", func, self);
+MYLOG(1, "stmt=%p ommitted++\n", self);
    self->last_fetch_count_include_ommitted++;
 
    opts = SC_get_ARDF(self);
@@ -1852,7 +1851,7 @@ SC_execute(StatementClass *self)
    if (CONN_EXECUTING == conn->status)
    {
        SC_set_error(self, STMT_SEQUENCE_ERROR, "Connection is already in use.", func);
-       MYLOG(0, "%s: problem with connection\n", func);
+       MYLOG(0, "problem with connection\n");
        goto cleanup;
    }
    is_in_trans = CC_is_in_trans(conn);
@@ -2288,7 +2287,7 @@ int enqueueNeedDataCallback(StatementClass *stmt, NeedDataCallfunc func, void *d
    stmt->callbacks[stmt->num_callbacks].data = data;
    stmt->num_callbacks++;
 
-MYLOG(1, "enqueueNeedDataCallack stmt=%p, func=%p, count=%d\n", stmt, func, stmt->num_callbacks);
+MYLOG(1, "stmt=%p, func=%p, count=%d\n", stmt, func, stmt->num_callbacks);
    return stmt->num_callbacks;
 }
 
@@ -2299,7 +2298,7 @@ RETCODE dequeueNeedDataCallback(RETCODE retcode, StatementClass *stmt)
    void            *data;
    int         i, cnt;
 
-   MYLOG(0, "dequeueNeedDataCallback ret=%d count=%d\n", retcode, stmt->num_callbacks);
+   MYLOG(0, "entering ret=%d count=%d\n", retcode, stmt->num_callbacks);
    if (SQL_NEED_DATA == retcode)
        return retcode;
    if (stmt->num_callbacks <= 0)
@@ -2464,7 +2463,7 @@ libpq_bind_and_exec(StatementClass *stmt)
 #endif /* NOT_USED */
 
    /* 1. Bind */
-   MYLOG(0, "%s: bind stmt=%p\n", func, stmt);
+   MYLOG(0, "bind stmt=%p\n", stmt);
    if (!build_libpq_bind_params(stmt,
                                 &nParams,
                                 &paramTypes,
@@ -2478,7 +2477,7 @@ libpq_bind_and_exec(StatementClass *stmt)
    }
 
    /* 2. Execute */
-   MYLOG(0, "%s: execute stmt=%p\n", func, stmt);
+   MYLOG(0, "execute stmt=%p\n", stmt);
    if (!SC_is_fetchcursor(stmt))
    {
        if (stmt->prepared == NOT_YET_PREPARED ||
@@ -2502,7 +2501,7 @@ libpq_bind_and_exec(StatementClass *stmt)
        }
 
        pstmt = stmt->processed_statements;
-       MYLOG(0, "%s execParams query=%s nParams=%d\n", __FUNCTION__, pstmt->query, nParams);
+       MYLOG(0, "execParams query=%s nParams=%d\n", pstmt->query, nParams);
        QLOG(0, "PQexecParams: %p '%s' nParams=%d\n", conn->pqconn, pstmt->query, nParams);
        pgres = PQexecParams(conn->pqconn,
                             pstmt->query,
@@ -2527,7 +2526,7 @@ libpq_bind_and_exec(StatementClass *stmt)
        plan_name = stmt->plan_name ? stmt->plan_name : NULL_STRING;
 
        /* already prepared */
-       MYLOG(0, "%s execPrepared plan=%s nParams=%d\n", __FUNCTION__, plan_name, nParams);
+       MYLOG(0, "execPrepared plan=%s nParams=%d\n", plan_name, nParams);
        QLOG(0, "PQexecPrepared: %p plan=%s nParams=%d\n", conn->pqconn, plan_name, nParams);
        pgres = PQexecPrepared(conn->pqconn,
                               plan_name,   /* portal name == plan name */
@@ -2602,7 +2601,7 @@ MYLOG(1, "get_Result=%p %p %d\n", res, SC_get_Result(stmt), stmt->curr_param_res
            CC_set_error(conn, CONNECTION_BACKEND_CRAZY, "Unexpected protocol character from backend (send_query)", func);
            CC_on_abort(conn, CONN_DEAD);
 
-           MYLOG(0, "send_query: error - %s\n", CC_get_errormsg(conn));
+           MYLOG(0, "PQexecxxxxxx: error - %s\n", CC_get_errormsg(conn));
            QLOG(0, "error: - (%d) - %s\n", pgresstatus, CC_get_errormsg(conn));
            break;
    }
@@ -2647,11 +2646,12 @@ ParseWithLibpq(StatementClass *stmt, const char *plan_name,
    CSTR    func = "ParseWithLibpq";
    ConnectionClass *conn = SC_get_conn(stmt);
    Int4        sta_pidx = -1, end_pidx = -1;
+   const char  *cstatus;
    Oid        *paramTypes = NULL;
    BOOL        retval = FALSE;
    PGresult   *pgres = NULL;
 
-   MYLOG(0, "%s: plan_name=%s query=%s\n", func, plan_name, query);
+   MYLOG(0, "entering plan_name=%s query=%s\n", plan_name, query);
    if (!RequestStart(stmt, conn, func))
        return FALSE;
 
@@ -2740,8 +2740,9 @@ MYLOG(0, "sta_pidx=%d end_pidx=%d num_p=%d\n", sta_pidx, end_pidx, num_params);
        handle_pgres_error(conn, pgres, "ParseWithlibpq", res, TRUE);
        goto cleanup;
    }
-   QLOG(0, "\tok: - 'C' - %s\n", PQcmdStatus(pgres));
-MYLOG(0, "PQprepare was successful, plan=%s\n", plan_name ? plan_name : "");
+   cstatus = PQcmdStatus(pgres);
+   QLOG(0, "\tok: - 'C' - %s\n", cstatus);
+   MYLOG(0, "\tok: - 'C' - %s\n", cstatus);
    if (stmt->plan_name)
        SC_set_prepared(stmt, PREPARED_PERMANENTLY);
    else
@@ -2790,7 +2791,7 @@ ParseAndDescribeWithLibpq(StatementClass *stmt, const char *plan_name,
    Oid         oid;
    SQLSMALLINT paramType;
 
-   MYLOG(0, "%s: plan_name=%s query=%s\n", func, plan_name, query_param);
+   MYLOG(0, "entering plan_name=%s query=%s\n", plan_name, query_param);
    if (!RequestStart(stmt, conn, func))
        return NULL;
 
@@ -2811,7 +2812,7 @@ ParseAndDescribeWithLibpq(StatementClass *stmt, const char *plan_name,
        goto cleanup;
 
    /* Describe */
-   MYLOG(0, "%s: describing plan_name=%s\n", func, plan_name);
+   MYLOG(0, "describing plan_name=%s\n", plan_name);
    QLOG(0, "\tPQdescribePrepared: %p plan_name=%s\n", conn->pqconn, plan_name);
 
    pgres = PQdescribePrepared(conn->pqconn, plan_name);
@@ -2832,7 +2833,7 @@ ParseAndDescribeWithLibpq(StatementClass *stmt, const char *plan_name,
            CC_set_error(conn, CONNECTION_BACKEND_CRAZY, "Unexpected result from PQdescribePrepared", func);
            CC_on_abort(conn, CONN_DEAD);
 
-           MYLOG(0, "send_query: error - %s\n", CC_get_errormsg(conn));
+           MYLOG(0, "PQdescribePrepared: error - %s\n", CC_get_errormsg(conn));
            goto cleanup;
    }
 
@@ -3084,10 +3085,10 @@ PG_BM   SC_Resolve_bookmark(const ARDFields *opts, Int4 idx)
            cpylen = sizeof(pg_bm);
        else if (*used >= 12)
            cpylen = 12;
-       MYLOG(0, "%s used=" FORMAT_LEN " cpylen=" FORMAT_SIZE_T "\n", __FUNCTION__, *used, cpylen);
+       MYLOG(0, "used=" FORMAT_LEN " cpylen=" FORMAT_SIZE_T "\n", *used, cpylen);
    }
    memcpy(&pg_bm, CALC_BOOKMARK_ADDR(bookmark, offset, bind_size, idx), cpylen);
-MYLOG(0, "%s index=%d block=%d off=%d\n", __FUNCTION__, pg_bm.index, pg_bm.keys.blocknum, pg_bm.keys.offset);
+MYLOG(0, "index=%d block=%d off=%d\n", pg_bm.index, pg_bm.keys.blocknum, pg_bm.keys.offset);
    pg_bm.index = SC_resolve_int4_bookmark(pg_bm.index);
 
    return pg_bm;
@@ -3101,7 +3102,7 @@ int   SC_Create_bookmark(StatementClass *self, BindInfoClass *bookmark, Int4 bind_
    size_t      cvtlen = sizeof(Int4);
    PG_BM       pg_bm;
 
-MYLOG(0, "%s type=%d buflen=" FORMAT_LEN " buf=%p\n", __FUNCTION__, bookmark->returntype, bookmark->buflen, bookmark->buffer);
+MYLOG(0, "entering type=%d buflen=" FORMAT_LEN " buf=%p\n", bookmark->returntype, bookmark->buflen, bookmark->buffer);
    memset(&pg_bm, 0, sizeof(pg_bm));
    if (SQL_C_BOOKMARK == bookmark->returntype)
        ;
@@ -3123,7 +3124,7 @@ MYLOG(0, "%s type=%d buflen=" FORMAT_LEN " buf=%p\n", __FUNCTION__, bookmark->re
            used = LENADDR_SHIFT(used, bind_row * sizeof(SQLLEN));
        *used = cvtlen;
    }
-MYLOG(0, "%s cvtlen=" FORMAT_SIZE_T " ix(bl,of)=%d(%d,%d)\n", __FUNCTION__, cvtlen, pg_bm.index, pg_bm.keys.blocknum, pg_bm.keys.offset);
+MYLOG(0, "leaving cvtlen=" FORMAT_SIZE_T " ix(bl,of)=%d(%d,%d)\n", cvtlen, pg_bm.index, pg_bm.keys.blocknum, pg_bm.keys.offset);
 
    return COPY_OK;
 }
index b7ba45c6cb7e9c0d3051f15ca50a1a33832f8ef9..06961d90a4453c02ad52b2b18ca86436aaec5baf 100644 (file)
@@ -52,7 +52,7 @@ int get_convtype(void)
                    '\0' == cdt[2] &&
                    '\0' == cdt[3])
                {
-                   MYLOG(0, " %s:UTF-16LE detected\n", __FUNCTION__);
+                   MYLOG(0, " UTF-16LE detected\n");
                    convtype = WCSTYPE_UTF16_LE;
                    use_wcs = TRUE;
                }
@@ -67,7 +67,7 @@ int get_convtype(void)
                    '\0' == cdt[6] &&
                    '\0' == cdt[7])
                {
-                   MYLOG(0, " %s:UTF32-LE detected\n", __FUNCTION__);
+                   MYLOG(0, " UTF32-LE detected\n");
                    convtype = WCSTYPE_UTF32_LE;
                    use_wcs = TRUE;
                }
@@ -86,7 +86,7 @@ int get_convtype(void)
            '\0' == cdt[2] &&
            '\0' == cdt[3])
        {
-           MYLOG(0, " %s:C16_UTF-16LE detected\n", __FUNCTION__);
+           MYLOG(0, " C16_UTF-16LE detected\n");
            convtype = C16TYPE_UTF16_LE;
            use_c16 = TRUE;
        }
@@ -132,7 +132,7 @@ char *ucs2_to_utf8(const SQLWCHAR *ucs2str, SQLLEN ilen, SQLLEN *olen, BOOL lowe
 {
    char *  utf8str;
    int len = 0;
-MYLOG(0, "ucs2_to_utf8 %p ilen=" FORMAT_LEN " ", ucs2str, ilen);
+MYLOG(0, "%p ilen=" FORMAT_LEN " ", ucs2str, ilen);
 
    if (!ucs2str)
    {
@@ -226,7 +226,7 @@ MYPRINTF(0, " newlen=" FORMAT_LEN, ilen);
        if (olen)
            *olen = len;
    }
-MYPRINTF(0, " %s:olen=%d utf8str=%s\n", __FUNCTION__, len, utf8str ? utf8str : "");
+MYPRINTF(0, " olen=%d utf8str=%s\n", len, utf8str ? utf8str : "");
    return utf8str;
 }
 
@@ -263,7 +263,7 @@ utf8_to_ucs2_lf(const char *utf8str, SQLLEN ilen, BOOL lfconv,
    SQLULEN     rtn, ocount, wcode;
    const UCHAR *str;
 
-MYLOG(1, "utf8_to_ucs2 ilen=" FORMAT_LEN " bufcount=" FORMAT_ULEN, ilen, bufcount);
+MYLOG(1, "ilen=" FORMAT_LEN " bufcount=" FORMAT_ULEN, ilen, bufcount);
    if (!utf8str)
        return 0;
 MYPRINTF(1, " string=%s", utf8str);
@@ -421,7 +421,7 @@ char *ucs4_to_utf8(const UInt4 *ucs4str, SQLLEN ilen, SQLLEN *olen, BOOL lower_i
 {
    char *  utf8str;
    int len = 0;
-MYLOG(0, " %s:%p ilen=" FORMAT_LEN "\n", __FUNCTION__, ucs4str, ilen);
+MYLOG(0, " %p ilen=" FORMAT_LEN "\n", ucs4str, ilen);
 
    if (!ucs4str)
    {
@@ -493,7 +493,7 @@ MYLOG(0, " newlen=" FORMAT_LEN "\n", ilen);
                       ((byte4_mask2 & *wstr) >> 4) |
                       ((byte4_mask3 & *wstr) << 10) |
                       ((byte4_mask4 & *wstr) << 24);
-/* MYLOG(0, " %s:%08x->%08x\n", __FUNCTION__, *wstr, byte4code); */
+/* MYLOG(0, " %08x->%08x\n", *wstr, byte4code); */
                if (little_endian)
                    memcpy(utf8str + len, (char *) &byte4code, sizeof(byte4code));
                else
@@ -510,7 +510,7 @@ MYLOG(0, " newlen=" FORMAT_LEN "\n", ilen);
        if (olen)
            *olen = len;
    }
-MYLOG(0, " %s:olen=%d %s\n", __FUNCTION__, len, utf8str ? utf8str : "");
+MYLOG(0, " olen=%d %s\n", len, utf8str ? utf8str : "");
    return utf8str;
 }
 
@@ -536,7 +536,7 @@ SQLULEN utf8_to_ucs4_lf(const char *utf8str, SQLLEN ilen, BOOL lfconv,
    SQLULEN     rtn, ocount, wcode;
    const UCHAR *str;
 
-MYLOG(0, " %s:ilen=" FORMAT_LEN " bufcount=" FORMAT_ULEN "\n", __FUNCTION__, ilen, bufcount);
+MYLOG(0, " ilen=" FORMAT_LEN " bufcount=" FORMAT_ULEN "\n", ilen, bufcount);
    if (!utf8str)
        return 0;
 MYLOG(99, " string=%s\n", utf8str);
@@ -654,7 +654,7 @@ cleanup:
    }
    if (ocount < bufcount && ucs4str)
        ucs4str[ocount] = 0;
-MYLOG(0, " %s:ocount=" FORMAT_ULEN "\n", __FUNCTION__, ocount);
+MYLOG(0, " ocount=" FORMAT_ULEN "\n", ocount);
    return rtn;
 }
 
@@ -671,7 +671,7 @@ int ucs4_to_ucs2_lf(const unsigned int *ucs4str, SQLLEN ilen, SQLWCHAR *ucs2str,
    UCHAR * const udt = (UCHAR *) &dmy_wchar;
    unsigned int    uintdt;
 
-MYLOG(0, " %s:ilen=" FORMAT_LEN " bufcount=%d\n", __FUNCTION__, ilen, bufcount);
+MYLOG(0, " ilen=" FORMAT_LEN " bufcount=%d\n", ilen, bufcount);
    if (ilen < 0)
        ilen = ucs4strlen(ucs4str);
    for (i = 0; i < ilen && (uintdt = ucs4str[i]); i++)
@@ -728,7 +728,7 @@ int ucs2_to_ucs4(const SQLWCHAR *ucs2str, SQLLEN ilen, unsigned int *ucs4str, in
    unsigned int    dmy_uint;
    UCHAR * const udt = (UCHAR *) &dmy_uint;
 
-MYLOG(0, " %s:ilen=" FORMAT_LEN " bufcount=%d\n", __FUNCTION__, ilen, bufcount);
+MYLOG(0, " ilen=" FORMAT_LEN " bufcount=%d\n", ilen, bufcount);
    if (ilen < 0)
        ilen = ucs2strlen(ucs2str);
    udt[3] = 0; /* always */
@@ -813,7 +813,7 @@ int msgtowstr(const char *inmsg, wchar_t *outmsg, int buflen)
 {
    int outlen = -1;
 
-MYLOG(0, " %s:inmsg=%p buflen=%d\n", __FUNCTION__, inmsg, buflen);
+MYLOG(0, " inmsg=%p buflen=%d\n", inmsg, buflen);
 #ifdef WIN32
    if (NULL == outmsg)
        buflen = 0;
@@ -833,9 +833,9 @@ MYLOG(0, " %s:inmsg=%p buflen=%d\n", __FUNCTION__, inmsg, buflen);
    if (outmsg && outlen >= buflen)
    {
        outmsg[buflen - 1] = 0;
-       MYLOG(0, " %s:out=%dchars truncated to %d\n", __FUNCTION__, outlen, buflen - 1);
+       MYLOG(0, " out=%dchars truncated to %d\n", outlen, buflen - 1);
    }
-MYLOG(0, " %s buf=%dchars out=%dchars\n", __FUNCTION__, buflen, outlen);
+MYLOG(0, " buf=%dchars out=%dchars\n", buflen, outlen);
 
    return outlen;
 }
@@ -854,7 +854,7 @@ int wstrtomsg(const wchar_t *wstr, char *outmsg, int buflen)
 {
    int outlen = -1;
 
-MYLOG(0, " %s:wstr=%p buflen=%d\n", __FUNCTION__, wstr, buflen);
+MYLOG(0, " wstr=%p buflen=%d\n", wstr, buflen);
 #ifdef WIN32
    if (NULL == outmsg)
        buflen = 0;
@@ -872,9 +872,9 @@ MYLOG(0, " %s:wstr=%p buflen=%d\n", __FUNCTION__, wstr, buflen);
    if (outmsg && outlen >= buflen)
    {
        outmsg[buflen - 1] = 0;
-       MYLOG(0, " %s:out=%dbytes truncated to %d\n", __FUNCTION__, outlen, buflen - 1);
+       MYLOG(0, " out=%dbytes truncated to %d\n", outlen, buflen - 1);
    }
-MYLOG(0, " %s buf=%dbytes outlen=%dbytes\n", __FUNCTION__, buflen, outlen);
+MYLOG(0, " buf=%dbytes outlen=%dbytes\n", buflen, outlen);
 
    return outlen;
 }
@@ -895,7 +895,7 @@ SQLLEN  mbstoc16_lf(char16_t *c16dt, const char *c8dt, size_t n, BOOL lf_conv)
    const char  *cdt;
    mbstate_t   mbst = initial_state;
 
-MYLOG(0, " %s:c16dt=%p size=%lu\n", __FUNCTION__, c16dt, n);
+MYLOG(0, " c16dt=%p size=%lu\n", c16dt, n);
    for (i = 0, cdt = c8dt; i < n || (!c16dt); i++)
    {
        if (lf_conv && PG_LINEFEED == *cdt && i > 0 && PG_CARRIAGE_RETURN != cdt[-1])
@@ -929,7 +929,7 @@ SQLLEN  c16tombs(char *c8dt, const char16_t *c16dt, size_t n)
    char    *cdt, c4byte[4];
    mbstate_t   mbst = initial_state;
 
-MYLOG(0, " %s:c8dt=%p size=%lu\n", __FUNCTION__, c8dt, n);
+MYLOG(0, " c8dt=%p size=%lu\n", c8dt, n);
    if (!c8dt)
        n = 0;
    for (i = 0, cdt = c8dt; c16dt[i] && (result < n || (!cdt)); i++)
@@ -1011,7 +1011,7 @@ SQLLEN bindpara_msg_to_utf8(const char *ldt, char **wcsbuf, SQLLEN used)
    }
  
    get_convtype();
-   MYLOG(0, " %s\n", __FUNCTION__);
+   MYLOG(0, " \n");
 #if defined(__WCS_ISO10646__)
    if (use_wcs)
    {
@@ -1077,7 +1077,7 @@ SQLLEN bindpara_wchar_to_msg(const SQLWCHAR *utf16, char **wcsbuf, SQLLEN used)
    }
 
    get_convtype();
-MYLOG(0, " %s\n", __FUNCTION__);
+MYLOG(0, "\n");
 #if defined(__WCS_ISO10646__)
    if (use_wcs)
    {
@@ -1127,7 +1127,7 @@ SQLLEN bindcol_hybrid_estimate(const char *ldt, BOOL lf_conv, char **wcsbuf)
    SQLLEN  l = (-2);
 
    get_convtype();
-   MYLOG(0, " %s:lf_conv=%d\n", __FUNCTION__, lf_conv);
+   MYLOG(0, " lf_conv=%d\n", lf_conv);
 #if defined(__WCS_ISO10646__)
    if (use_wcs)
    {
@@ -1178,7 +1178,7 @@ SQLLEN bindcol_hybrid_exec(SQLWCHAR *utf16, const char *ldt, size_t n, BOOL lf_c
    SQLLEN  l = (-2);
 
    get_convtype();
-   MYLOG(0, " %s:size=" FORMAT_SIZE_T " lf_conv=%d\n", __FUNCTION__, n, lf_conv);
+   MYLOG(0, " size=" FORMAT_SIZE_T " lf_conv=%d\n", n, lf_conv);
 #if defined(__WCS_ISO10646__)
    if (use_wcs)
    {
@@ -1240,7 +1240,7 @@ SQLLEN bindcol_localize_estimate(const char *utf8dt, BOOL lf_conv, char **wcsbuf
    char *convalc = NULL;
 
    get_convtype();
-   MYLOG(0, " %s:lf_conv=%d\n", __FUNCTION__, lf_conv);
+   MYLOG(0, " lf_conv=%d\n", lf_conv);
 #if defined(__WCS_ISO10646__)
    if (use_wcs)
    {
@@ -1270,7 +1270,7 @@ SQLLEN bindcol_localize_estimate(const char *utf8dt, BOOL lf_conv, char **wcsbuf
    else if (NULL != convalc)
        *wcsbuf = (char *) convalc;
    
-MYLOG(0, " %s:return=" FORMAT_LEN "\n", __FUNCTION__, l);
+MYLOG(0, " return=" FORMAT_LEN "\n", l);
    return l;
 }
 
@@ -1279,7 +1279,7 @@ SQLLEN bindcol_localize_exec(char *ldt, size_t n, BOOL lf_conv, char **wcsbuf)
    SQLLEN  l = (-2);
 
    get_convtype();
-   MYLOG(0, " %s:size=" FORMAT_SIZE_T "\n", __FUNCTION__, n);
+   MYLOG(0, " size=" FORMAT_SIZE_T "\n", n);
 #if defined(__WCS_ISO10646__)
    if (use_wcs)
    {
@@ -1299,7 +1299,7 @@ SQLLEN bindcol_localize_exec(char *ldt, size_t n, BOOL lf_conv, char **wcsbuf)
    free(*wcsbuf);
    *wcsbuf = NULL;
 
-MYLOG(0, " %s:return=" FORMAT_LEN "\n", __FUNCTION__, l);
+MYLOG(0, " return=" FORMAT_LEN "\n", l);
    return l;
 }