summaryrefslogtreecommitdiff
path: root/ext/mysqli/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | Reindent more mysqli testsNikita Popov2020-11-25374-17809/+17809
| | | | | | | | | | | | | | | Due to a bug in the tidy script, most tests did not actually get reindented...
| * | Reindent ext/mysqli testsNikita Popov2020-11-25290-4857/+4857
| | | | | | | | | | | | | | | | | | Reindent ext/mysqli tests on PHP-7.4, so they match with the indentation on PHP-8.0. Otherwise merging test changes across branches is very unpleasant.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-171-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #80312: change default engine from MyISAM to InnoDB in tests
| * | Fix #80312: change default engine from MyISAM to InnoDB in testsDarek Slusarczyk2020-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Change mysqli and pdo_mysql tests configuration to use by default InnoDB instead of MyISAM. Closes GH-6405.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-11-112-0/+73
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Handle errors during next_result()
| * | Handle errors during next_result()Nikita Popov2020-11-112-0/+73
| | |
* | | Remove embedded property from mysqli_driverDharman2020-11-093-12/+0
| | | | | | | | | | | | | | | | | | | | | All other leftovers of this feature have been dropped in PHP 8, so we should remove the property as well. Closes GH-6407.
* | | Fix tests for MariaDBDharman2020-11-022-3/+10
| | | | | | | | | | | | Closes GH-6390.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-291-18/+51
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix bug #72413: Segfault with get_result and PS cursors
| * | Fix bug #72413: Segfault with get_result and PS cursorsDharman2020-10-291-20/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We cannot simply switch to use_result here, because the fetch_row methods in get_result mode and in use_result/store_result mode are different: In one case it accepts a statement, in the other a return value zval. Thus, doing a switch to use_result results in a segfault when trying to fetch a row. Actually supporting get_result with cursors would require adding cursor support in mysqlnd_result, not just mysqlnd_ps. That would be a significant amount of effort and, given the age of the issue, does not appear to be particularly likely to happen soon. As such, we simply generate an error when using get_result() with cursors, which is much better than causing a segfault. Instead, parameter binding needs to be used.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-281-0/+41
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.4: Handle mysqli errors in more cases Sync test with master
| * | Handle mysqli errors in more casesDharman2020-10-281-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | Report errors autocommit, commit, rollback and mysqli_stmt_attr_set. Additionally, copy the error from conn to stmt when preparing fails, so these errors are also handled by mysqli_stmt_prepare. Closes GH-6157.
| * | Sync test with masterNikita Popov2020-10-281-258/+258
| | | | | | | | | | | | | | | Sync ext/mysqli/tests/mysqli_report.phpt with PHP-8.0/master, as the current difference in indentation makes it hard to merge.
* | | Merge branch 'PHP-7.4' into PHP-8.0Nikita Popov2020-10-281-0/+172
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix bug #79375
| * | Fix bug #79375Dharman2020-10-281-0/+172
| | | | | | | | | | | | | | | | | | | | | | | | Make sure deadlock errors are properly propagated and reports in a number of places in mysqli and PDO MySQL. This also fixes a memory and a segfault that can occur under these conditions.
* | | Consistent error handling in mysqli_pollDharman2020-10-261-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | This error condition should not actually be reachable, but change it to be consistent with the other ones. Also fix a memory leak. Closes GH-6340.
* | | Fix default value handling of mysqli_fetch_object()Máté Kocsis2020-10-203-11/+6
| | | | | | | | | | | | | | | | | | | | | Make [] acceptable both for classes without constructors and classes with a constructor that takes no arguments. Closes GH-6336.
* | | Verify parameter names of function aliasesMáté Kocsis2020-10-161-2/+2
| | | | | | | | | | | | Closes GH-6335
* | | Fixed test for MySQL < 5.6Matteo Beccati2020-09-281-2/+2
| | | | | | | | | | | | Refs GH-6172.
* | | Make mysqli_warning constructor privateNikita Popov2020-09-271-127/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The constructor was already effectively inaccessible (protected on a final class). This just makes it more obvious and removes the implementation in favor of directly throwing. Per the removed test, this was an unfinished feature, and I don't think it makes a lot of sense to finish it -- the mysqli_stmt::get_warnings() interface makes more sense than direct construction. Closes GH-6208.
* | | Rename mysqli parameters to be more logicalLarry Garfield2020-09-2714-26/+26
| | | | | | | | | | | | Closes GH-6172.
* | | Promote a few forgotten warnings to exceptionsMáté Kocsis2020-09-254-47/+44
| | | | | | | | | | | | Closes GH-6211
* | | Consolidate the usage of "either" and "one of" in error messagesMáté Kocsis2020-09-202-2/+2
| | | | | | | | | | | | Closes GH-6173
* | | Fix some tests for libmysqlNikita Popov2020-09-186-11/+33
| | |
* | | Drop skipifemb.incNikita Popov2020-09-187-12/+1
| | | | | | | | | | | | And drop the last remaining uses of it.
* | | mysqli_set_charset now throws an mysqli_sql_exception when incorrect charset ↵Dharman2020-09-181-1/+17
| | | | | | | | | | | | | | | | | | is provided Closes GH-6142.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-09-181-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Use MyISAM engine for new test
| * | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-09-181-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Use MyISAM engine for new test
| | * Use MyISAM engine for new testNikita Popov2020-09-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Travis on 7.3 is showing this error: > The size of BLOB/TEXT data inserted in one transaction is greater > than 10% of redo log size. Increase the redo log size using > innodb_log_file_size. Force MyISAM engine to avoid this.
* | | Run tidyNikita Popov2020-09-18256-776/+776
| | | | | | | | | | | | | | | This should fix most of the remaining issues with tabs and spaces being mixed in tests.
* | | Merge branch 'PHP-7.4'Nikita Popov2020-09-181-0/+57
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.4: Fix bug #80107: Handling of large compressed packets Bug #80107 Add test for mysqli_query() fails for ~16 MB long query when compression is enabled
| * | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-09-181-0/+57
| |\ \ | | |/ | | | | | | | | | | | | * PHP-7.3: Fix bug #80107: Handling of large compressed packets Bug #80107 Add test for mysqli_query() fails for ~16 MB long query when compression is enabled
| | * Fix bug #80107: Handling of large compressed packetsNikita Popov2020-09-181-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's two layers of packet splitting going on. First, packets need to be split into having a payload of exactly 2^24-1 bytes or being the last packet. If the split packet has size between 2^24-5 and 2^24-1 bytes, the compressed packets also needs to be split, though the choice of split doesn't matter here. I'm splitting off the first 8192 bytes, as that's what I observe libmysqlclient to be doing.
| | * Bug #80107 Add test for mysqli_query() fails for ~16 MB long query when ↵Máté Kocsis2020-09-181-0/+51
| | | | | | | | | | | | compression is enabled
* | | Remove vestiges of embedded mysql from testsNikita Popov2020-09-17258-293/+1
| | |
* | | Merge branch 'PHP-7.4'Nikita Popov2020-09-171-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix mysqli_release_savepoint() on mysqlnd
| * | Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2020-09-171-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix mysqli_release_savepoint() on mysqlnd
| | * Fix mysqli_release_savepoint() on mysqlndNikita Popov2020-09-171-1/+1
| | | | | | | | | | | | mysqli_release_savepoint() was not actually releasing a savepoint...
* | | Fix some tests for libmysqlNikita Popov2020-09-175-4/+12
| | |
* | | Remove checks for old libmysqlclient versions in testsNikita Popov2020-09-1711-194/+142
| | |
* | | mysqli: Promote warning in field_seekDharman2020-09-172-8/+12
| | | | | | | | | | | | Aligning the behaviour of fetch_field and field_seek.
* | | Changed the wording of the error messageDharman2020-09-165-6/+6
| | | | | | | | | | | | | | | | | | "cannot be used in MYSQLI_USE_RESULT mode" sounds more correct than "cannot be used with MYSQLI_USE_RESULT" Closes GH-6137.
* | | Fix testMatteo Beccati2020-09-161-6/+12
| | | | | | | | | | | | follow-up to 7a95e94 for MySQL < 5.6
* | | Promote warnings to Error in MySQLi extensionGeorge Peter Banyard2020-09-1532-274/+388
| | | | | | | | | | | | Closes GH-5803
* | | Remove unintendedly committed testMáté Kocsis2020-09-151-33/+0
| | |
* | | Promote a few remaining errors in ext/standardMáté Kocsis2020-09-151-0/+33
| | | | | | | | | | | | Closes GH-6110
* | | Improve error messages mentioning parameters instead of argumentsMáté Kocsis2020-09-094-4/+4
| | | | | | | | | | | | Closes GH-5999
* | | Improve test portabilityChristoph M. Becker2020-08-141-1/+1
| | | | | | | | | | | | | | | | | | We have to ensure that the attempted connection to the MySQL server fails, and do that by passing an unknown host instead of falling back to localhost.
* | | Fix newly introduced test for WindowsChristoph M. Becker2020-08-141-3/+1
| | | | | | | | | | | | | | | The warning message is rather different there, but since that is irrelevant for this test case, we just suppress the warning.
* | | Don't assert mysql->mysql is non-nullNikita Popov2020-08-141-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is an edge case in constructor behavior where we can end up with mysql->mysql being NULL (rather than mysql itself already being NULL). I think that ultimately that's a bug in the constructor code, and we should probably be destroying the outer structure on construction failure as well. However it's pretty hard to unravel with when considering all the construction permutations.