Handle MySQL commands without deprecation warnings#274
Handle MySQL commands without deprecation warnings#274ton31337 wants to merge 2 commits intowp-cli:mainfrom
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 <donatas@hostinger.com> Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
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 <donatas@opensourcerouting.org>
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