[php-src] PR #17466: ext/mysql: Don't mention errors for optional part of the test
| From: | NattyNarwhal | Date: | Mon, 13 Jan 2025 18:52:42 +0000 |
| Subject: | [php-src] PR #17466: ext/mysql: Don't mention errors for optional part of the test | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-30381@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/17466
Author: NattyNarwhal
If the user we're running the tests as in MySQL is an unprivileged user, we skip the CREATE
DATABASE and CREATE SERVER tests. However, the cleanup code still assumes they're there, and
will fail with instead.
Instead, we simply don't print the messages for the equivalent DROP calls. However, we still do
for TABLE, since if we can't run anything in the test database as the user we're running
as, far more tests will fail.
I don't know if this is the best approach; silencing the errors for when those tests do run is
unwise.
----
This PR is because of GH-17258; currently, the runner is running in the same system as MySQL, so
running it unprivileged seemed wise. This should benefit other platforms wanting to run tests not as
root now though; the only thing needed is to grant privileges to a user for a database (oh, and
change binary logging off or allow it for functions).