bind[ofs].buffer = stmt->result.buf[ofs].val;
bind[ofs].is_null = &stmt->result.is_null[ofs];
bind[ofs].buffer_length = stmt->result.buf[ofs].buflen;
- bind[ofs].length = &stmt->result.buf[ofs].buflen;
+ bind[ofs].length = &stmt->result.buf[ofs].output_len;
break;
}
default:
} else
#endif
{
- copy_len = stmt->result.buf[i].buflen;
+ copy_len = stmt->result.buf[i].output_len;
}
if (!IS_BINARY_DATA(fields[i])) {
ZVAL_UTF8_STRINGL(stmt->result.vars[i], stmt->result.buf[i].val,
var_dump($test);
+ /* this will crash with libmysql from PHP 5.0.6 (or earlier) to 5.3.0 */
+ mysqli_fetch($stmt);
+
mysqli_stmt_close($stmt);
mysqli_query($link, "DROP TABLE IF EXISTS test_bind_fetch");
mysqli_close($link);