cvs: pecl /pdo_ids informix_driver.c informix_statement.c php_pdo_informix_int.h

From: Date: Fri, 17 Mar 2006 23:01:14 +0000
Subject: cvs: pecl /pdo_ids informix_driver.c informix_statement.c php_pdo_informix_int.h
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-5488@lists.php.net to get a copy of this message
kfbombar Fri Mar 17 23:01:14 2006 UTC Modified files: /pecl/pdo_ids informix_driver.c informix_statement.c php_pdo_informix_int.h Log: Fix for error code clearing http://cvs.php.net/viewcvs.cgi/pecl/pdo_ids/informix_driver.c?r1=1.5&r2=1.6&diff_format=u Index: pecl/pdo_ids/informix_driver.c diff -u pecl/pdo_ids/informix_driver.c:1.5 pecl/pdo_ids/informix_driver.c:1.6 --- pecl/pdo_ids/informix_driver.c:1.5 Thu Mar 16 21:55:42 2006 +++ pecl/pdo_ids/informix_driver.c Fri Mar 17 23:01:14 2006 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: informix_driver.c,v 1.5 2006/03/16 21:55:42 kfbombar Exp $ */ +/* $Id: informix_driver.c,v 1.6 2006/03/17 23:01:14 kfbombar Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -619,3 +619,17 @@ } raise_sql_error(stmt->dbh, stmt, stmt_res->hstmt, SQL_HANDLE_STMT, tag, file, line TSRMLS_CC); } + +/* +* Clears the error information +*/ +void clear_stmt_error(pdo_stmt_t *stmt) +{ + conn_handle *conn_res = (conn_handle *)stmt->dbh->driver_data; + conn_res->error_data.sqlcode = 0; + conn_res->error_data.filename = NULL; + conn_res->error_data.lineno = 0; + conn_res->error_data.failure_name = NULL; + conn_res->error_data.sql_state[0] = '\0'; + conn_res->error_data.err_msg[0] = '\0'; +} http://cvs.php.net/viewcvs.cgi/pecl/pdo_ids/informix_statement.c?r1=1.7&r2=1.8&diff_format=u Index: pecl/pdo_ids/informix_statement.c diff -u pecl/pdo_ids/informix_statement.c:1.7 pecl/pdo_ids/informix_statement.c:1.8 --- pecl/pdo_ids/informix_statement.c:1.7 Fri Mar 17 16:23:54 2006 +++ pecl/pdo_ids/informix_statement.c Fri Mar 17 23:01:14 2006 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: informix_statement.c,v 1.7 2006/03/17 16:23:54 kfbombar Exp $ */ +/* $Id: informix_statement.c,v 1.8 2006/03/17 23:01:14 kfbombar Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -578,6 +578,8 @@ // we're executing now...this tells error handling to Cancel if there's an error. stmt_res->executing = 1; + /* clear the current error information to get ready for new execute */ + clear_stmt_error(stmt); stmt_res->lob_buffer = NULL; // Execute the statement. All parameters should be bound at this point, http://cvs.php.net/viewcvs.cgi/pecl/pdo_ids/php_pdo_informix_int.h?r1=1.3&r2=1.4&diff_format=u Index: pecl/pdo_ids/php_pdo_informix_int.h diff -u pecl/pdo_ids/php_pdo_informix_int.h:1.3 pecl/pdo_ids/php_pdo_informix_int.h:1.4 --- pecl/pdo_ids/php_pdo_informix_int.h:1.3 Thu Mar 16 21:55:42 2006 +++ pecl/pdo_ids/php_pdo_informix_int.h Fri Mar 17 23:01:14 2006 @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_informix_int.h,v 1.3 2006/03/16 21:55:42 kfbombar Exp $ */ +/* $Id: php_pdo_informix_int.h,v 1.4 2006/03/17 23:01:14 kfbombar Exp $ */ #ifndef PHP_PDO_INFORMIX_INT_H #define PHP_PDO_INFORMIX_INT_H @@ -35,6 +35,7 @@ void raise_informix_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char *state, char *tag, char *message, char *file, int line TSRMLS_DC); void raise_dbh_error(pdo_dbh_t *dbh, char *tag, char *file, int line TSRMLS_DC); void raise_stmt_error(pdo_stmt_t *stmt, char *tag, char *file, int line TSRMLS_DC); +void clear_stmt_error(pdo_stmt_t *stmt); int informix_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC); #define RAISE_DBH_ERROR(tag) raise_dbh_error(dbh, tag, __FILE__, __LINE__ TSRMLS_CC)

« previous php.pecl.cvs (#5488) next »