Clearly separated fetching (physical reading) from decoding phases (data
interpretation). Threaded fetching added but disabled as needs more work for
Windows. For Linux needs some touches to add pthreads if this is enabled,
probably with a compile-time switch.
The code reorganisation makes it easy to add also async API, similar to
cURL's one.
mysqli_fetch_assoc_zerofill.phpt
checks for UNSIGNED ZEROFILL
mysqli_stmt_bind_result_zerofill.phpt
checks for UNSIGNED ZEROFILL
mysqli_stmt_bing_call_user_func.phpt
Needs to be refined once http://bugs.php.net/bug.php?id=43568
has been closed and a decision has been made on call_user_func_array().
There seems to be a BC break between 5_2 -> 5_3 .
Johannes has an eye on it
Modified:
mysqli_change_user_insert_id.phpt
skip test for buggy MySQL Server versions
mysqli_insert_id.phpt
added additional checks
MYSQL_TEST_SKIP_CONNECT_FAILURE which controls how connection problems
are handled: failure (MYSQL_TEST_SKIP_CONNECT_FAILURE = false, default)
or skip (MYSQL_TEST_SKIP_CONNECT_FAILURE = true)
Also, some minor tweaking of connection parameters in the tests.
MYSQL_TEST_SKIP_CONNECT_FAILURE = false
Every test that needs a working MySQL connection now includes
skipifconnectfailure.inc. If MYSQL_TEST_SKIP_CONNECT_FAILURE evaluates
to true skipifconnectfailure.inc tries to establish a database
connection. If no connection can be opened, the test will be skipped.
In case of MYSQL_TEST_SKIP_CONNECT_FAILURE = false (default) an no
connection, a test who cannot establish a connection will fail.
So, if you have a buggy configuration or a server that is sometimes
not available, you can now decide if you want the tests to ignore this
and skip the test or to fail (MYSQL_TEST_CONNECT_FAILURE = false, default).
Other, minor tweaks:
042.phpt - whitespace
067.phpt - parse error in SKIPIF section fixed
[14:35] <_jani_> nixnutz_: why don't you just commit everything in one go..?
[14:35] <_jani_> this "spamming" is getting quite boring..
[14:36] <Pierre> 20â¬/commit :)
objects. Technically it might be possible to tweak ext/mysqli and make
the objects cloneable - tough, we haven't checked in depth.
So, if one is interested, raise a discussion.
a result set in one array. This is handy if want to fetch all results and
pass the data directly to a template engine, for example. In this case
you save a loop.
1) Currently:
$all_rows = array();
while ($row = mysqli_fetch_assoc($res))
$all_rows[] = $row;
2) With mysqli_fetch_all:
$all_rows = mysqli_fetch_all($res, MYSQL_ASSOC)
Note: if you need the loop for processing each row, try variant 1) for
performance reasons.
from the "same" result handle and checking with each other if the fetched
rows are the same or not. Inspired by a bug report. There seem to be really
people doing this...