1.Fix a crash on SQLDisconnect.
authorHiroshi Inoue <inoue@tpf.co.jp>
Sat, 27 May 2006 14:07:34 +0000 (14:07 +0000)
committerHiroshi Inoue <inoue@tpf.co.jp>
Sat, 27 May 2006 14:07:34 +0000 (14:07 +0000)
2.Fix a *close cursor* error in *disallow premature* mode.

connection.c
convert.c
version.h

index d94d87d7a582c0e47c812d2b40f1d1bb1bb00f19..df8627fee8af95f4ec9d1f00e4bd28d9fb6a7c7e 100644 (file)
@@ -407,6 +407,7 @@ CC_cursor_count(ConnectionClass *self)
 void
 CC_clear_error(ConnectionClass *self)
 {
+   if (!self)  return;
    self->__error_number = 0;
    if (self->__error_message)
    {
index f78d3d570c51222e6a65c2ec83ba571fd6c28d4a..da9922528ea18cdf14c9efa938fbbce80f3c6fd1 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -2374,7 +2374,7 @@ inolog("type=%d concur=%d\n",
    {
        char        fetchstr[128];
 
-       sprintf(fetchstr, ";fetch backward in \"%s\";close %s;",
+       sprintf(fetchstr, ";fetch backward in \"%s\";close \"%s\";",
                SC_cursor_name(stmt), SC_cursor_name(stmt));
        if (begin_first && CC_is_in_autocommit(conn))
            strcat(fetchstr, "COMMIT;");
index bcb64fe0566b996ba9a40b2b84da2887471c6660..2b4bd9b88a1ad3c70134469ffaa6f618bcfd4495 100644 (file)
--- a/version.h
+++ b/version.h
@@ -11,6 +11,6 @@
 
 #define POSTGRESDRIVERVERSION      "08.02.0004"
 #define POSTGRES_RESOURCE_VERSION  "08.02.0004\0"
-#define PG_DRVFILE_VERSION     8,2,0,04 
+#define PG_DRVFILE_VERSION     8,2,0,04
 
 #endif