diff options
author | Xinchen Hui <laruence@php.net> | 2014-06-23 15:35:53 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2014-06-23 15:35:53 +0800 |
commit | c135ca0a9de17e75f5292db8a751eac55e2ae20f (patch) | |
tree | 24c28762fa7aff9e2c90462adfe6f210e0c7c86b | |
parent | 87b667221ed145bb1992abf3b10072bc0462600f (diff) | |
download | php-git-c135ca0a9de17e75f5292db8a751eac55e2ae20f.tar.gz |
Actually, I don't know how it works. (maybe I should re-start again :<)
-rw-r--r-- | ext/pdo/pdo_stmt.c | 4 | ||||
-rw-r--r-- | ext/pdo_mysql/mysql_statement.c | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 989b0969c8..c8878028b5 100644 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -560,9 +560,7 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ switch (type) { case PDO_PARAM_ZVAL: if (value && value_len == sizeof(zval)) { - int need_copy = (new_type != PDO_PARAM_ZVAL || stmt->dbh->stringify) ? 1 : 0; - zval *zv = (zval**)value; - ZVAL_ZVAL(dest, zv, need_copy, 1); + ZVAL_COPY_VALUE(dest, value); } else { ZVAL_NULL(dest); } diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 29f608ea43..2c0fc85383 100644 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -746,7 +746,7 @@ static int pdo_mysql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsig } #if PDO_USE_MYSQLND if (S->stmt) { - //??? Z_TRY_ADDREF(S->stmt->data->result_bind[colno].zv); + Z_TRY_ADDREF(S->stmt->data->result_bind[colno].zv); *ptr = (char*)&S->stmt->data->result_bind[colno].zv; *len = sizeof(zval); PDO_DBG_RETURN(1); |