summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Avoid fatal error on not found class in mysqli_fetch_object()Nikita Popov2020-08-132-9/+15
| | | | | | | | | | | | Instead use C zpp modifier and throw TypeError.
* | | Add many missing closing PHP tags to testsMáté Kocsis2020-08-096-0/+6
| | | | | | | | | | | | Closes GH-5958
* | | Drop '#if 0' in mysqlnd_debug() from the MySQLnd extensionGeorge Peter Banyard2020-08-071-0/+57
| | | | | | | | | | | | Closes GH-5587
* | | Review the usage of apostrophes in error messagesMáté Kocsis2020-07-104-4/+4
| | | | | | | | | | | | Closes GH-5590
* | | [skip-ci] Add README for ext/mysqli testsTiffany2020-07-061-0/+39
| | | | | | | | | | | | Closes GH-5804
* | | Replace EXPECTF when possibleFabien Villepinte2020-06-2914-15/+15
| | | | | | | | | | | | Closes GH-5779
* | | [ci skip] Various typo fixes in stub comments and CHANGES fileAyesh Karunaratne2020-06-251-1/+1
| | |
* | | Introduce InternalIteratorNikita Popov2020-06-241-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Userland classes that implement Traversable must do so either through Iterator or IteratorAggregate. The same requirement does not exist for internal classes: They can implement the internal get_iterator mechanism, without exposing either the Iterator or IteratorAggregate APIs. This makes them usable in get_iterator(), but incompatible with any Iterator based APIs. A lot of internal classes do this, because exposing the userland APIs is simply a lot of work. This patch alleviates this issue by providing a generic InternalIterator class, which acts as an adapater between get_iterator and Iterator, and can be easily used by many internal classes. At the same time, we extend the requirement that Traversable implies Iterator or IteratorAggregate to internal classes as well. Closes GH-5216.
* | | Remove unnecessary PHPDoc-alike blocks from testsMáté Kocsis2020-06-243-3/+0
| | | | | | | | | | | | Closes GH-5759
* | | Improve type error messages when an object is givenMáté Kocsis2020-05-261-1/+1
| | | | | | | | | | | | | | | | | | | | | 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
* | | Avoid spurious failures of MySQL INSERT packet overflow testAlex Dowad2020-05-011-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Revert "Insert one more debug output"Nikita Popov2020-04-301-1/+0
| | | | | | | | | | | | This reverts commit 45cb42166d4a53fe0154be08097f112d6ec72a27.
* | | Insert one more debug outputNikita Popov2020-04-281-0/+1
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2020-04-081-4/+6
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Make mysqli_poll test more deterministic
| * | Make mysqli_poll test more deterministicNikita Popov2020-04-081-5/+7
| | | | | | | | | | | | Handle errors appearing in different order.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-03-231-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix test for Windows
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-231-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix test for Windows
| | * Fix test for WindowsChristoph M. Becker2020-03-231-1/+1
| | | | | | | | | | | | | | | Windows filenames may very well contain a colon, so we adjust the test accordingly.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-03-092-2/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Enclose INI values containing {TMP} in quotes
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-092-2/+2
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Enclose INI values containing {TMP} in quotes
| | * Enclose INI values containing {TMP} in quotesChristoph M. Becker2020-03-092-2/+2
| | | | | | | | | | | | | | | At least on Windows, the temporary directory may contain tilde signs, which would result in an INI parse error.
* | | Change argument error message formatMáté Kocsis2020-02-264-5/+5
| | | | | | | | | | | | Closes GH-5211
* | | Use serialize_precision for var_dump()Nikita Popov2020-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Remove mysqli reflection testsNikita Popov2020-02-185-2044/+0
| | |
* | | Make type error messages more consistentMáté Kocsis2020-02-174-5/+5
| | | | | | | | | | | | Closes GH-5092
* | | Reindent phpt filesNikita Popov2020-02-03398-21001/+21001
| | |
* | | Promote mysqli warnings to exceptionsMáté Kocsis2020-01-30108-770/+1246
| | | | | | | | | | | | Closes GH-5058
* | | Merge branch 'PHP-7.4'Máté Kocsis2020-01-284-72/+7
|\ \ \ | |/ / | | | | | | * Fix #78666 mysqli_options generates Warning on var_dump()
| * | Fix #78666 mysqli_options generates Warning on var_dump()Máté Kocsis2020-01-284-72/+7
| | | | | | | | | | | | Closes GH-5121
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-281-1/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix mysqli_get_warnings() with multi queries
| * | Fix mysqli_get_warnings() with multi queriesNikita Popov2020-01-281-1/+0
| | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-241-3/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix mysqli ssl test for tls1.3
| * | Fix mysqli ssl test for tls1.3Nikita Popov2020-01-241-3/+3
| | | | | | | | | | | | | | | Specifying AES256-SHA results in TLS_AES_256_GCM_SHA384 if the connection uses TLS v1.3.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-01-201-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Increase timeout in mysqli_reap_async_query test
| * | Increase timeout in mysqli_reap_async_query testNikita Popov2020-01-201-1/+1
| | | | | | | | | | | | | | | The 2000 here is 2ms, which is a bit optimistic for parallelized testing.
* | | Make error messages more consistent by fixing capitalizationMáté Kocsis2020-01-172-2/+2
| | | | | | | | | | | | Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
* | | Fix #78880: Final spelling fixesMáté Kocsis2020-01-162-2/+2
| | |
* | | Fix #78880: Another bunch of spelling errorsMáté Kocsis2020-01-163-4/+4
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-132-0/+140
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-01-132-0/+140
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTH
| | * Fix #79084: mysqlnd may fetch wrong column indexes with MYSQLI_BOTHChristoph M. Becker2020-01-132-0/+140
| | | | | | | | | | | | | | | | | | 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.
| | * Fix test cases which fail on Windows debug buildsChristoph M. Becker2020-01-103-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | 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 60081ca20d5701111de5f94ae64909b1cc265f1e)
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-112-4/+7
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Bring back test case support for older MySQL versions
| * | Bring back test case support for older MySQL versionsChristoph M. Becker2020-01-112-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>.
* | | Fix #78790: mysqli_get_client_info() expects exactly 0 parameters, 1 givenChristoph M. Becker2019-12-301-1/+1
| | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.4'Nikita Popov2019-12-277-57/+39
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * | Don't use PASSWORD() function in testNikita Popov2019-12-272-3/+3
| | | | | | | | | | | | Doesn't exist anymore in MySQL 8.
| * | Skip bug77956.phpt if local_infile disabled on serverNikita Popov2019-12-271-0/+10
| | |
| * | Don't check TIMESTAMP NOT NULL in fetch_field_flags testNikita Popov2019-12-271-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | Don't test the RENAME DATABASE queryNikita Popov2019-12-271-20/+8
| | | | | | | | | | | | | | | Apparently this only existed for a short time, because it was found to be insecure. Don't try to test it.