diff options
author | Andrey Hristov <andrey@php.net> | 2010-05-25 22:38:11 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2010-05-25 22:38:11 +0000 |
commit | b3c553fa993ab121e98ec2c07bac81a7e5574831 (patch) | |
tree | f4ff28aea94e7aa7ad18b271c97d5c629dd62234 | |
parent | b434301f7b5e5d4e37dc8860b6a2462569f1dff6 (diff) | |
download | php-git-b3c553fa993ab121e98ec2c07bac81a7e5574831.tar.gz |
Use the specialized macro for this case
-rw-r--r-- | ext/mysqlnd/mysqlnd_ps_codec.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index 24559070ec..326d6f9634 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -621,7 +621,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar *buf_len = offset + stmt->param_count * 2 + 20; tmp_buf = mnd_emalloc(*buf_len); if (!tmp_buf) { - SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "OOM"); + SET_OOM_ERROR(stmt->error_info); goto end; } memcpy(tmp_buf, *buf, offset); @@ -655,7 +655,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar if (stmt->param_bind[j].zv == the_var) { /* Double binding of the same zval, make a copy */ if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { - SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "OOM"); + SET_OOM_ERROR(stmt->error_info); goto end; } break; @@ -668,7 +668,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar if (Z_TYPE_P(the_var) != IS_DOUBLE) { if (!copies || !copies[i]) { if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { - SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "OOM"); + SET_OOM_ERROR(stmt->error_info); goto end; } } @@ -686,7 +686,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar if (Z_TYPE_P(the_var) != IS_LONG) { if (!copies || !copies[i]) { if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { - SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "OOM"); + SET_OOM_ERROR(stmt->error_info); goto end; } } @@ -712,7 +712,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar { if (!copies || !copies[i]) { if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { - SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "OOM"); + SET_OOM_ERROR(stmt->error_info); goto end; } } @@ -738,7 +738,7 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar *buf_len = offset + data_size + 10; /* Allocate + 10 for safety */ tmp_buf = mnd_emalloc(*buf_len); if (!tmp_buf) { - SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "OOM"); + SET_OOM_ERROR(stmt->error_info); goto end; } memcpy(tmp_buf, *buf, offset); |