The third stricmp() in writeDriverCommoninfo() is useless, because the second one...
authorHiroshi Inoue <h-inoue@dream.email.ne.jp>
Sun, 3 Apr 2016 04:57:12 +0000 (13:57 +0900)
committerHiroshi Inoue <h-inoue@dream.email.ne.jp>
Sun, 3 Apr 2016 04:57:12 +0000 (13:57 +0900)
SC_get_errormsg() definition is repeated twice in succession.
In info.c:SQLGetInfo(), "len = 0" is unnecessary because len is assigned at the end of the function.
In execute.c:PGAPI_ExecDirect(), flag doesn't need to be set as its value doesn't change.
PODBC_PER_STATEMENT_ROLLBACK is not used.
[patch by Tsunakawa, Takayuki]

dlg_specific.c
execute.c
info.c
pgapifunc.h
statement.h

index 93f7d92dd15797fd27e2f1ebe9b9673754211989..28ebf54b5a87fdfe1f6091ccab9c610edb5556bb 100644 (file)
@@ -1086,15 +1086,6 @@ writeDriverCommoninfo(const char *fileName, const char *sectionName,
    sprintf(tmp, "%d", comval->unique_index);
    if (!SQLWritePrivateProfileString(sectionName, INI_UNIQUEINDEX, tmp, fileName))
        errc--;
-   /*
-    * Never update the onlyread from this module.
-    */
-   if (stricmp(ODBCINST_INI, fileName) == 0)
-   {
-       sprintf(tmp, "%d", comval->onlyread);
-       SQLWritePrivateProfileString(sectionName, INI_READONLY, tmp,
-                                    fileName);
-   }
 
    sprintf(tmp, "%d", comval->use_declarefetch);
    if (!SQLWritePrivateProfileString(sectionName, INI_USEDECLAREFETCH, tmp, fileName))
index d310ed226046845cf1412ed9724c064f6be97da5..c8a70ada864a79a1e1c80bbbcdfeec38f66c5a0a 100644 (file)
--- a/execute.c
+++ b/execute.c
@@ -193,7 +193,6 @@ inolog("a2\n");
 
    mylog("%s: calling PGAPI_Execute...\n", func);
 
-   flag = SC_is_with_hold(stmt) ? PODBC_WITH_HOLD : 0;
    result = PGAPI_Execute(hstmt, flag);
 
    mylog("%s: returned %hd from PGAPI_Execute\n", func, result);
diff --git a/info.c b/info.c
index a73232f4568f95b128a2381046c84f52301fc0a5..21ff1878c7730a26d26f8980d1eb8d81412930b7 100644 (file)
--- a/info.c
+++ b/info.c
@@ -817,14 +817,12 @@ mylog("CONVERT_FUNCTIONS=" FORMAT_ULEN "\n", value);
            value = SQL_BS_SELECT_EXPLICIT | SQL_BS_ROW_COUNT_EXPLICIT;
            break;
        case SQL_CATALOG_NAME:
-           len = 0;
            if (CurrCat(conn))
                p = "Y";
            else
                p = "N";
            break;
        case SQL_COLLATION_SEQ:
-           len = 0;
            p = "";
            break;
        case SQL_CREATE_ASSERTION:
@@ -872,7 +870,6 @@ mylog("CONVERT_FUNCTIONS=" FORMAT_ULEN "\n", value);
            value = SQL_DI_CREATE_INDEX | SQL_DI_DROP_INDEX;
            break;
        case SQL_DESCRIBE_PARAMETER:
-           len = 0;
            p = "N";
            break;
        case SQL_DROP_ASSERTION:
@@ -928,7 +925,6 @@ mylog("CONVERT_FUNCTIONS=" FORMAT_ULEN "\n", value);
                value = NAMEDATALEN_V73 - 1;
            break;
        case SQL_MAX_ROW_SIZE_INCLUDES_LONG:
-           len = 0;
            p = "Y";
            break;
        case SQL_PARAM_ARRAY_ROW_COUNTS:
index bd38e9512ab76ce5ddb2915c7aee0cb65bdd4eff..82b7613e9b98eca95c979d595c7091c2189afc4f 100644 (file)
@@ -22,7 +22,6 @@ extern "C" {
 #define    PODBC_INHERIT_CONNECT_OPTIONS   (1L << 1)
 /* Internal flags for PGAPI_Exec... functions */
 #define    PODBC_WITH_HOLD         1L
-#define    PODBC_PER_STATEMENT_ROLLBACK    (1L << 1)
 /* Flags for the error handling */
 #define    PODBC_ALLOW_PARTIAL_EXTRACT 1L
 #define    PODBC_ERROR_CLEAR       (1L << 1)
index 09dc0e6fd8cc6f2c633be05328e69f55f51f83fa..24d633506637f82ef669b6b50c1bcaf888b8eecc 100644 (file)
@@ -325,7 +325,6 @@ void SC_set_Result(StatementClass *self, QResultClass *res);
 #define    SC_get_errornumber(a) (a->__error_number)
 #define    SC_set_errornumber(a, n) (a->__error_number = n)
 #define    SC_get_errormsg(a) (a->__error_message)
-#define    SC_get_errormsg(a) (a->__error_message)
 #define    SC_is_prepare_statement(a) (0 != (a->prepare & PREPARE_STATEMENT))
 #define    SC_get_prepare_method(a) (a->prepare & (~PREPARE_STATEMENT))