Re: Snapshot 08.01.0006 available for testing

From: Rainer Bauer <usenet(at)munnin(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Snapshot 08.01.0006 available for testing
Date: 2005-11-04 14:55:42
Message-ID: 40tmm1dk9lut57a9s8o57njgj0puveneri@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

"Dave Page" wrote:

>Can you send me a patch for that little lot please?

See below, I hope I did everything right. I haven't patched QR_Destructor()
though.

>Yeuch - I never really used it myself, and am very unfamiliar with that
>code as I'm sure you gathered. Let's get things basically stable for
>now, then when 8.1 etc. is released and Anoop is back next week, we can
>start looking at performance etc.

Sounds good.

Rainer

===================================================================
RCS file: /cvsroot/psqlodbc/psqlodbc/results.c,v
retrieving revision 1.83
diff -u -r1.83 results.c
--- results.c 3 Nov 2005 12:05:13 -0000 1.83
+++ results.c 4 Nov 2005 14:07:24 -0000
@@ -1482,6 +1482,7 @@
{
stmt->bind_row = i; /* set the binding location */
result = SC_fetch(stmt);
+ res = SC_get_Curres(stmt);
#ifdef DRIVER_CURSOR_IMPLEMENT
if (SQL_SUCCESS_WITH_INFO == result && 0 ==
stmt->last_fetch_count && res->keyset)
{

***** CVS exited normally with code 1 *****

===================================================================
RCS file: /cvsroot/psqlodbc/psqlodbc/statement.c,v
retrieving revision 1.106
diff -u -r1.106 statement.c
--- statement.c 3 Nov 2005 22:31:16 -0000 1.106
+++ statement.c 4 Nov 2005 13:39:52 -0000
@@ -922,7 +922,6 @@
ConnInfo *ci = &(SC_get_conn(self)->connInfo);

self->last_fetch_count = self->last_fetch_count_include_ommitted = 0;
- coli = QR_get_fields(res); /* the column info */

/* Issue the fetch query here in case of declare fetch for subsequent
rows */
if (SC_is_fetchcursor(self) && ((self->currTuple %
ci->drivers.fetch_max) >= QR_get_num_total_tuples(res) - 1))
@@ -930,28 +929,44 @@
qi.result_in = NULL;
qi.cursor = self->cursor_name;
qi.row_size = ci->drivers.fetch_max;
- sprintf(fetch, "fetch %d in %s",ci->drivers.fetch_max ,
self->cursor_name);

-

- /* Cleanup the QR. We need to kill off the cursor first, or this will
crash */

- if (self->result->cursor)

- {

- free(self->result->cursor);

- self->result->cursor = NULL;

- }

-

- if (self->result)

- {

- QR_Destructor(self->result);

- self->result = NULL;

- }

-

+ sprintf(fetch, "fetch %d in %s",ci->drivers.fetch_max ,
self->cursor_name);
+
+
+
+ /* Cleanup the QR. We need to kill off the cursor first, or this will
crash */
+
+ if (self->result->cursor)
+
+ {
+
+ free(self->result->cursor);
+
+ self->result->cursor = NULL;
+
+ }
+
+
+
+ if (self->result)
+
+ {
+
+ QR_Destructor(self->result);
+
+ self->result = NULL;
+
+ }
+
+
+
/* Finished cleanup */
-

- res = CC_send_query(self->hdbc, fetch, &qi, qflag);
-
+
+
+ res = CC_send_query(self->hdbc, fetch, &qi, qflag);
SC_set_Result(self,res);
}

+ coli = QR_get_fields(res); /* the column info */
mylog("manual_result = %d, use_declarefetch = %d\n",
self->manual_result, ci->drivers.use_declarefetch);

if (self->manual_result)

***** CVS exited normally with code 1 *****

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message Dave Page 2005-11-04 15:41:06 Re: Snapshot 08.01.0006 available for testing
Previous Message Dave Page 2005-11-04 14:36:35 Re: Snapshot 08.01.0006 available for testing