Set once_reached_eof status when useDeclareFetch=0 so that QR_num_total_read() macro...
authorHiroshi Inoue <h-inoue@dream.email.ne.jp>
Sat, 30 Apr 2016 23:09:50 +0000 (08:09 +0900)
committerHiroshi Inoue <h-inoue@dream.email.ne.jp>
Tue, 3 May 2016 00:26:37 +0000 (09:26 +0900)
Don't forget to call CC_on_abort_partial() when rollback back to a savepoint.
Now the driver passes cursor-block-delete test.

connection.c
qresult.c

index bd5bbad42f3a0f3266469838e37d97e8943ba82d..0de5fc963c5e7725f39133ad2aee253f1d27c4f1 100644 (file)
@@ -2423,7 +2423,11 @@ LIBPQ_update_transaction_status(ConnectionClass *self)
 
        case PQTRANS_INTRANS:
            CC_set_in_trans(self);
-           CC_set_no_error_trans(self);
+           if (CC_is_in_error_trans(self))
+           {
+               CC_set_no_error_trans(self);
+               CC_on_abort_partial(self);
+           }
            break;
 
        case PQTRANS_INERROR:
index 92aea869d5d879cd5a797945c5180ad0b2a9dbbf..95ff0967423a2f306a4ab71f2c5a5b20cd50883a 100644 (file)
--- a/qresult.c
+++ b/qresult.c
@@ -697,6 +697,8 @@ inolog("!!%p->cursTup=%d total_read=%d\n", self, self->cursTuple, self->num_tota
     */
    QR_set_command(self, PQcmdStatus(*pgres));
    QR_set_cursor(self, cursor);
+   if (NULL == cursor)
+       QR_set_reached_eof(self);
    return TRUE;
 }