Commit graph

1236 commits

Author SHA1 Message Date
Máté Kocsis
b5c7a83dca
Remove unnecessary PHPDoc-alike blocks from tests
Closes GH-5759
2020-06-24 13:13:44 +02:00
Máté Kocsis
fbe30592d6
Improve type error messages when an object is given
From now on, we always display the given object's type instead of just reporting "object".
Additionally, make the format of return type errors match the format of argument errors.

Closes GH-5625
2020-05-26 19:06:19 +02:00
Alex Dowad
7b32d176d2
Avoid spurious failures of MySQL INSERT packet overflow test
This test creates a MySQL table called 'test'. In several cases, I have seen a spurious
test failure (in CI) with an error message saying: "table 'test' already exists".

It may be that another test had used a table with the same name and not cleaned it out
correctly. Or maybe we have multiple tests running in parallel in some CI environments,
or the same test DB being used for multiple runs of the test suite.

In any case, change the table name so it is exclusive to this test case only. Also, if
the test table exists at the beginning of the test, drop it.

Closes GH-5479
2020-05-01 12:25:42 +02:00
Nikita Popov
707cb18276 Revert "Insert one more debug output"
This reverts commit 45cb42166d.
2020-04-30 09:55:25 +02:00
Nikita Popov
45cb42166d Insert one more debug output 2020-04-28 21:06:32 +02:00
Nikita Popov
5293c6d6d4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Make mysqli_poll test more deterministic
2020-04-08 16:38:18 +02:00
Nikita Popov
5317ea6d57 Make mysqli_poll test more deterministic
Handle errors appearing in different order.
2020-04-08 16:36:22 +02:00
Christoph M. Becker
d963b78523 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test for Windows
2020-03-23 16:26:19 +01:00
Christoph M. Becker
efbc962c92 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test for Windows
2020-03-23 16:23:33 +01:00
Christoph M. Becker
ba404f21e4 Fix test for Windows
Windows filenames may very well contain a colon, so we adjust the test
accordingly.
2020-03-23 16:22:45 +01:00
Christoph M. Becker
b31f73b1c8 Merge branch 'PHP-7.4'
* PHP-7.4:
  Enclose INI values containing {TMP} in quotes
2020-03-09 22:53:23 +01:00
Christoph M. Becker
fea2994ff8 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Enclose INI values containing {TMP} in quotes
2020-03-09 22:51:11 +01:00
Christoph M. Becker
d5e206620b Enclose INI values containing {TMP} in quotes
At least on Windows, the temporary directory may contain tilde signs,
which would result in an INI parse error.
2020-03-09 22:49:08 +01:00
Máté Kocsis
960318ed95
Change argument error message format
Closes GH-5211
2020-02-26 15:00:08 +01:00
Nikita Popov
a939805641 Use serialize_precision for var_dump()
var_dump() is debugging functionality, so it should print
floating-point numbers accurately. We do this by switching
to serialize_precision, which (by default) will print with
as much precision as necessary to preserve the exact value
of the float.

This also affects debug_zval_dump().

Closes GH-5172.
2020-02-25 09:51:32 +01:00
Nikita Popov
541f8b7640 Remove mysqli reflection tests 2020-02-18 10:08:03 +01:00
Máté Kocsis
ac0853eb26
Make type error messages more consistent
Closes GH-5092
2020-02-17 14:22:17 +01:00
Nikita Popov
f8d795820e Reindent phpt files 2020-02-03 22:52:20 +01:00
Máté Kocsis
5bf6aedae4
Promote mysqli warnings to exceptions
Closes GH-5058
2020-01-30 17:05:07 +01:00
Máté Kocsis
cffff1fb03
Merge branch 'PHP-7.4'
* Fix #78666 mysqli_options generates Warning on var_dump()
2020-01-28 18:51:00 +01:00
Máté Kocsis
d39edebbce
Fix #78666 mysqli_options generates Warning on var_dump()
Closes GH-5121
2020-01-28 18:44:02 +01:00
Nikita Popov
7d3a6e7149 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix mysqli_get_warnings() with multi queries
2020-01-28 17:17:07 +01:00
Nikita Popov
8a5bc8c6be Fix mysqli_get_warnings() with multi queries
In this case warning_count may be non-zero, but php_get_warnings()
may still return no warnings. In this case we should return false
rather than returning a corrupted mysqli_warning object.
2020-01-28 17:13:43 +01:00
Nikita Popov
9b9436d9b0 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix mysqli ssl test for tls1.3
2020-01-24 15:15:36 +01:00
Nikita Popov
c14df824d1 Fix mysqli ssl test for tls1.3
Specifying AES256-SHA results in TLS_AES_256_GCM_SHA384 if the
connection uses TLS v1.3.
2020-01-24 15:14:52 +01:00
Nikita Popov
6ada49a469 Merge branch 'PHP-7.4'
* PHP-7.4:
  Increase timeout in mysqli_reap_async_query test
2020-01-20 09:54:38 +01:00
Nikita Popov
b6506ab32a Increase timeout in mysqli_reap_async_query test
The 2000 here is 2ms, which is a bit optimistic for parallelized
testing.
2020-01-20 09:53:54 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
afdaa91170
Fix #78880: Final spelling fixes 2020-01-16 19:14:31 +01:00
Máté Kocsis
0b4778c377
Fix #78880: Another bunch of spelling errors 2020-01-16 09:46:47 +01:00
Christoph M. Becker
8ea190ba95 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH
2020-01-13 13:24:12 +01:00
Christoph M. Becker
b0cdd8cc53 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH
2020-01-13 13:23:12 +01:00
Christoph M. Becker
1752393bb4 Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH
Column names can be numeric strings, so we have to make sure to insert
the column values with the appropriate numeric keys, instead of adding
them.
2020-01-13 13:21:45 +01:00
Christoph M. Becker
c1519321e7 Merge branch 'PHP-7.4'
* PHP-7.4:
  Bring back test case support for older MySQL versions
2020-01-11 11:22:30 +01:00
Christoph M. Becker
0ab53f1636 Bring back test case support for older MySQL versions
These test cases have recently been adjusted to work with MySQL 8[1],
but some older, but still supported database versions, such as MySQL
5.6, still need the password to be sent hashed, so we fall back to
using `PASSWORD()`, if the `SET PASSWORD` query fails without it.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=b0efd18f7844da29931737b8a1cf461c7493e168>.
2020-01-11 11:21:26 +01:00
Christoph M. Becker
f6dea34831 Fix test cases which fail on Windows debug builds
We use the portable {TMP} instead of the hard-coded /tmp, and skip
mysqli_debug_append.phpt on Windows, because unlinking the trace file
while the connection is still open won't work there.

(cherry picked from commit 60081ca20d)
2020-01-10 20:00:31 +01:00
Christoph M. Becker
55fd97c576 Fix #78790: mysqli_get_client_info() expects exactly 0 parameters, 1 given
Although the `mysqli` parameter is unused, it had been accepted so far,
and the documentation even claims that parameter would be required.  To
not break BC, we allow it again.
2019-12-30 17:40:16 +01:00
Nikita Popov
7e130df249 Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't use PASSWORD() function in test
  Specify explicit row order in PDO MySQL test
  Skip bug77956.phpt if local_infile disabled on server
  Don't check TIMESTAMP NOT NULL in fetch_field_flags test
  Don't test the RENAME DATABASE query
  Make GeomFromText tests compatible with MySQL 8
2019-12-27 17:26:42 +01:00
Nikita Popov
b0efd18f78 Don't use PASSWORD() function in test
Doesn't exist anymore in MySQL 8.
2019-12-27 17:26:15 +01:00
Nikita Popov
23d4659635 Skip bug77956.phpt if local_infile disabled on server 2019-12-27 17:25:53 +01:00
Nikita Popov
6572d9149d Don't check TIMESTAMP NOT NULL in fetch_field_flags test
The behavior of this is very dependent on the MySQL vendor, MySQL
version and MySQL configuration, in particular the
explicit_defaults_for_timestamp variable.

I don't think it's worthwhile to try and model this exactly, so
drop the test.
2019-12-27 17:25:23 +01:00
Nikita Popov
c4cbdfa99c Don't test the RENAME DATABASE query
Apparently this only existed for a short time, because it was
found to be insecure. Don't try to test it.
2019-12-27 17:25:12 +01:00
Nikita Popov
f97806726f Make GeomFromText tests compatible with MySQL 8
The function has been renamed to ST_GeomFromText.
2019-12-27 17:25:01 +01:00
Nikita Popov
6894cbe042 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix mysqli ssl tests
2019-12-05 08:39:16 +01:00
Nikita Popov
6b7cb4a8d7 Fix mysqli ssl tests
First, make sure the tests are skipped if we connect via unix
socket, as we can't use SSL in that case.

Second, use a cipher that is not blacklisted in current MySQL
versions.
2019-12-05 08:38:40 +01:00
Christoph M. Becker
8c5ca24e11 Fix clean section of test case 2019-11-11 15:57:42 +01:00
Christoph M. Becker
0a33536526 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test cases which fail on Windows debug builds
2019-11-11 12:34:50 +01:00
Christoph M. Becker
60081ca20d Fix test cases which fail on Windows debug builds
We use the portable {TMP} instead of the hard-coded /tmp, and skip
mysqli_debug_append.phpt on Windows, because unlinking the trace file
while the connection is still open won't work there.
2019-11-11 12:14:38 +01:00
Fabien Villepinte
a555cc0b3d Clean DONE tags from tests
Remove most of the `===DONE===` tags and its variations.
Keep `===DONE===` if the test output otherwise becomes empty.

Closes GH-4872.
2019-11-07 21:31:47 +01:00
Máté Kocsis
2204dbde3b Add missing ZPP checks
Closes GH-4878.
2019-11-01 15:26:52 +01:00