Handle OOM in mysqlnd_fetch_row_unbuffered_c()

This commit is contained in:
Andrey Hristov 2010-05-03 19:02:48 +00:00
parent 2b18a3ff93
commit 2b00096004

View file

@ -646,7 +646,7 @@ mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES * result TSRMLS_DC)
result->conn->stats TSRMLS_CC);
retrow = mnd_malloc(result->field_count * sizeof(char *));
if (retrow) {
for (i = 0; i < field_count; i++, field++, zend_hash_key++) {
zval *data = result->unbuf->last_row_data[i];
unsigned int len;
@ -668,6 +668,9 @@ mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES * result TSRMLS_DC)
field->max_length = len;
}
}
} else {
SET_OOM_ERROR(result->conn->error_info);
}
}
} else if (ret == FAIL) {
if (row_packet->error_info.error_no) {