Besides checking for the ability to connect to the MySQL server, some
tests require additional checks (e.g. to be able to check for the
server's version) as skip condition. There is no need, though, to
connect twice; instead we introduce `mysqli_connect_or_skip()` in
test_helpers.inc, which `die()`s with an appropriate error message, if
the connection can't be established, or returns the connection link
otherwise.
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
This environment variable serves to hide (parts of) tests from general
execution, and as the test failures show when that environment variable
is set, apparently it serves to hide (parts of) test from being
executed at all, thus causing test rot.
To avoid this in the future, we drop `MYSQL_TEST_EXPERIMENTAL`, and fix
the failing tests, except for mysqli_get_warnings.phpt, which appears
to be broken beyond repair, and whose most important tests are already
covered by other test cases.
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>