diff options
| author | Thies C. Arntzen <thies@php.net> | 2001-02-17 15:54:40 +0000 |
|---|---|---|
| committer | Thies C. Arntzen <thies@php.net> | 2001-02-17 15:54:40 +0000 |
| commit | 67c2eaa6ea221d47717b2218637394718d06c53a (patch) | |
| tree | faa2b6b5fe04245218dbd2f546b2279642263b7c | |
| parent | 55f25fb9423db649c5ea76558083dcb944675f00 (diff) | |
| download | php-git-67c2eaa6ea221d47717b2218637394718d06c53a.tar.gz | |
make oci work again.
| -rw-r--r-- | ext/oci8/oci8.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index f504827e0c..2ee8ef2636 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -735,22 +735,17 @@ _oci_session_list_dtor(zend_rsrc_list_entry *rsrc) static ub4 oci_handle_error(oci_connection *connection, ub4 errcode) { - switch (errcode) { - case 0: - return 0; - break; - case 22: /* ORA-00022 Invalid session id */ - case 1012: /* ORA-01012: */ - case 3113: /* ORA-03113: end-of-file on communication channel */ - connection->open = 0; - connection->session->open = 0; - connection->session->server->open = 0; - return 0; - break; - default: - return 0; - break; - } + switch (errcode) { + case 22: /* ORA-00022 Invalid session id */ + case 1012: /* ORA-01012: */ + case 3113: /* ORA-03113: end-of-file on communication channel */ + connection->open = 0; + connection->session->open = 0; + connection->session->server->open = 0; + return 1; /* fatal error */ + } + + return 0; /* no fatal error */ } /* {{{ oci_error() */ @@ -1224,8 +1219,12 @@ oci_execute(oci_statement *statement, char *func,ub4 mode) if (statement->binds) { zend_hash_apply(statement->binds, (int (*)(void *)) _oci_bind_post_exec); } + oci_handle_error(statement->conn, statement->error); - return 0; + + if (statement->error) { + return 0; + } } if (stmttype == OCI_STMT_SELECT && (statement->executed == 0)) { |
