if (!is_null($tmp = @$res->fetch_field($link)))
printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
- while ($tmp = $res->fetch_field())
+ while ($tmp = $res->fetch_field()) {
var_dump($tmp);
+ }
var_dump($tmp);
$res->free_result();
printf("[012] Expecting boolean/false, got %s/%s. [%d] %s\n",
gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
- if (false !== ($tmp = mysqli_stmt_send_long_data($stmt, PHP_INT_MAX + 1, $blob)))
+ if (false !== ($tmp = @mysqli_stmt_send_long_data($stmt, PHP_INT_MAX + 1, $blob)))
printf("[013] Expecting boolean/false, got %s/%s. [%d] %s\n",
gettype($tmp), $tmp, mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt));
/* Prevent from freeing */
/* Don't update is_ref, or we will leak during conversion */
Z_ADDREF_P(stmt->param_bind[i].zv);
+ stmt->param_bind[i].flags = 0;
if (stmt->param_bind[i].type == MYSQL_TYPE_LONG_BLOB) {
stmt->param_bind[i].flags &= ~MYSQLND_PARAM_BIND_BLOB_USED;
}
zval **data_begin = result->stored_data->data;
unsigned int field_count = result->meta->field_count;
unsigned int row_count = result->stored_data->row_count;
+ DBG_ENTER("mysqlnd_res_initialize_result_set_rest");
+
if (!data_cursor || row_count == result->stored_data->initialized_rows) {
- return;
+ DBG_VOID_RETURN;
}
while ((data_cursor - data_begin) < (row_count * field_count)) {
if (NULL == data_cursor[0]) {
}
data_cursor += field_count;
}
+ DBG_VOID_RETURN;
}
/* }}} */
not during mysqli_fetch_field() time.
*/
if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) {
+ DBG_INF_FMT("We have decode the whole result set to be able to satisfy this meta request");
/* we have to initialize the rest to get the updated max length */
mysqlnd_res_initialize_result_set_rest(result TSRMLS_CC);
}
not during mysqli_fetch_field_direct() time.
*/
if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) {
+ DBG_INF_FMT("We have decode the whole result set to be able to satisfy this meta request");
/* we have to initialized the rest to get the updated max length */
mysqlnd_res_initialize_result_set_rest(result TSRMLS_CC);
}
{
DBG_ENTER("mysqlnd_res_meta::fetch_field");
if (meta->current_field >= meta->field_count) {
+ DBG_INF("no more fields");
DBG_RETURN(NULL);
}
+ DBG_INF_FMT("name=%s max_length=%u",
+ meta->fields[meta->current_field].name? meta->fields[meta->current_field].name:"",
+ meta->fields[meta->current_field].max_length);
DBG_RETURN(&meta->fields[meta->current_field++]);
}
/* }}} */
{
DBG_ENTER("mysqlnd_res_meta::fetch_field_direct");
DBG_INF_FMT("fieldnr=%d", fieldnr);
+ DBG_INF_FMT("name=%s max_length=%u",
+ meta->fields[meta->current_field].name? meta->fields[meta->current_field].name:"",
+ meta->fields[meta->current_field].max_length);
DBG_RETURN(&meta->fields[fieldnr]);
}
/* }}} */