Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ext/mysql: Don't mention errors for optional part of the test #17466

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NattyNarwhal
Copy link
Member

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).

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant