diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2004-05-20 16:13:13 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2004-05-20 16:13:13 +0000 |
commit | 40b04cd54bb38253284f88dbdefc3fcb9acefbbd (patch) | |
tree | a65c8d19cdbccd49f691730ce5c67fb61ae4688f /ext/pdo_mysql/mysql_driver.c | |
parent | 0d6aa20880517e33949a4fb00a020951ecc4f91b (diff) | |
download | php-git-40b04cd54bb38253284f88dbdefc3fcb9acefbbd.tar.gz |
Correctly report errors for statment problems.
Diffstat (limited to 'ext/pdo_mysql/mysql_driver.c')
-rwxr-xr-x | ext/pdo_mysql/mysql_driver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index d5035534da..27c447438d 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -30,10 +30,10 @@ #include "php_pdo_mysql.h" #include "php_pdo_mysql_int.h" -int _pdo_mysql_error(pdo_dbh_t *dbh, const char *file, int line TSRMLS_DC) /* {{{ */ +int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line TSRMLS_DC) /* {{{ */ { pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; - enum pdo_error_type *pdo_err = &dbh->error_code; + enum pdo_error_type *pdo_err = stmt ? &stmt->error_code : &dbh->error_code; pdo_mysql_error_info *einfo = &H->einfo; einfo->errcode = mysql_errno(H->server); |