Closed ahmad-rahnavard closed 8 months ago
Thanks for the report. What version of mysqldump
is used?
This parameter was added in
I appreciate the information. I understand the reason behind adding it. The version I'm using is:
mysqldump Ver 10.19 Distrib 10.5.21-MariaDB, for debian-linux-gnu (x86_64)
Could you please explain how did you install mysqldump
? This bundle will have to support different versions of this tool if we want the backups to work. :grimacing:
I installed it using apt-get install default-mysql-client
in a Docker container based on the official php:8.1-fpm-bullseye
image.
The mysqldump
provided by MariaDB doesn't support this option:
docker run --rm -it php:8.1-fpm-bullseye bash -c "apt update && apt install -y -q default-mysql-client && mysqldump --version && mysqldump --column-statistics=0"
# […]
mysqldump Ver 10.19 Distrib 10.5.21-MariaDB, for debian-linux-gnu (x86_64)
mysqldump: unknown variable 'column-statistics=0'
Please try the following change, I tried to keep compatibility with MySQL and MariaDB:
I can confirm that the proposed changes will resolve the issue, and it should work fine. Thank you @alexislefebvre :pray:
Thanks! It was published in the last release: https://github.com/liip/LiipTestFixturesBundle/releases/tag/2.7.1
Preconditions
PHP: 8.1.25 Symfony: 5.4 LiipTestFixturesBundle: 2.6.0 DB: mariadb:10.5 (docker container with exposed port)
Steps to reproduce
The bundle config:
Expected result
Tests should run without any issues and faster than when you set
cache_db: ~
Actual result
Getting the following error in tests. which also results in some failing tests.
NOTE: When I run the tests separately, I don't see any issues, but running multiple tests together results in the error above.
Removing the
--column-statistics=0
option from this line https://github.com/liip/LiipTestFixturesBundle/blob/2.x/src/Services/DatabaseBackup/MysqlDatabaseBackup.php#L78 fixed the issue for me.