{
BOOL set_no_trans = FALSE;
-mylog("CC_on_abort in\n");
+mylog("CC_on_abort in opt=%x\n", opt);
CONNLOCK_ACQUIRE(conn);
if (0 != (opt & CONN_DEAD)) /* CONN_DEAD implies NO_TRANS also */
opt |= NO_TRANS;
#define CONN_IN_ERROR_BEFORE_IDLE (1L<<3)
/* not connected yet || already disconnected */
-#define CC_not_connected(x) (CONN_DOWN == (x)->status || CONN_NOT_CONNECTED == (x)->status)
+#define CC_not_connected(x) (!(x) || CONN_DOWN == (x)->status || CONN_NOT_CONNECTED == (x)->status)
/* AutoCommit functions */
#define CC_is_in_autocommit(x) (x->transact_status & CONN_IN_AUTOCOMMIT)
return TRUE;
}
}
+ if (CC_not_connected((ConnectionClass *) SC_get_conn(self)))
+ {
+ SC_set_error(self, STMT_SEQUENCE_ERROR, "the connection is closed", func);
+ return TRUE;
+ }
return FALSE;
}
if (!res)
{
if (SC_get_errornumber(self) <= 0)
+ {
SC_set_error(self, STMT_NO_RESPONSE, "Could not receive the response, communication down ??", func);
- CC_on_abort(conn, CONN_DEAD);
+ CC_on_abort(conn, CONN_DEAD);
+ }
goto cleanup;
}
}