ext/mysql: Don't mention errors for optional part of the test #17466
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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).