-
Notifications
You must be signed in to change notification settings - Fork 61
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
Handle MySQL commands without deprecation warnings #274
Conversation
37e888b
to
f118585
Compare
Seems that lots of tests are failing due to MySQL connection. |
c2c919e
to
2797400
Compare
First look for a symlink and use it if it exists, otherwise use a given command. With this fix: ``` % ./vendor/bin/wp db check --path=/tmp/wordpress mariadb-check: ... ``` Issue: wp-cli#271 Signed-off-by: Donatas Abraitis <[email protected]> Signed-off-by: Donatas Abraitis <[email protected]>
7a6d128
to
ecfc4a9
Compare
…mmand Just directly call readlink() which returns the full path regardless if it's a symlink or a regular binary. Signed-off-by: Donatas Abraitis <[email protected]>
ecfc4a9
to
cb8b089
Compare
I'm not sure it is right to silence the warning without addressing it -- the original issue is that right now if you install MariaDB it will create symlinks like:
and if you run So this code gets rid of the warning temporarily by checking where the link points, but the actual problem the warning is telling us is that I think any change should actually address the warning and fix the code to know about MariaDB command names and if we should use those. I haven't looked close enough to see how we should decide that: If wp db should check and know what type of database is in use, or if it should be less clever and just check for the existence of |
IMO, both methods should be combined to solve this issue. I mean following the symlink + handling the real mariadb* commands (which is annoying from MariaDB's perspective, but it is how it is). On the other side, the current implementation is broken too if the symlink is removed completely by MariaDB.
Yes, that's what I had in my head above, either be clever or dumb. |
Thank you for the PR / push to address this. This should be fixed by #275 which will select the proper command based on the current MySQL / MariaDB version |
With this fix:
Issue: #271