Open jamisonbryant opened 2 months ago
I created a new pipeline job whose only job was to connect to the MySQL server and create the sproc:
apt-get update
apt-get install -y -q mariadb-client libmariadb-dev
mysql -h $DB_HOST -u $MYSQL_USER -p$MYSQL_PASSWORD < ./bin/scripts/pipeline/truncate_dirty_tables_sproc.sql
And this is the error I get from that:
ERROR 2061 (HY000): RSA Encryption not supported - caching_sha2_password plugin was built with GnuTLS support
This appears to be a MySQL 8-specific problem, see this StackOverflow question. Still not sure what the underlying issue is, but this might be a hint.
Update: Disregard, this was due to a mismatch in the MySQL/MariaDB versions between the Docker image and the packages I was trying to install.
I was able to get my query test job to run successfully by adding a DELIMITER //
and END //
to the SQL file containing the sproc. I know that's not how it's done in the code, but I was just trying to find out if there was a syntax difference between MySQL 5.7 and 8.0 causing my issue. I'm uploading the new sproc SQL to this comment.
truncate_dirty_tables_sproc.sql.txt
Update: Unfortunately this did not resolve the issue in my PHPUnit test suite jobs, although they are still using the same hardcoded SQL as before.
Hi,
in the Passbolt API, we also run the test suiteon Gitlab CI, with the following cnfiguration.
I never had a MySQL 8 specific issue, so could this be due to your pipeline configuration?
log_bin_trust_function_creators = 1
I believe this was the key. I noticed this line was in my mysql.cnf
as well as your GitLab pipeline. Once I put it in our GitLab pipeline, we no longer get the SQL errors. So thank you for sharing that :)
I checked the test-suite-light documentation and I don't see any mention of this configuration setting. I will submit a PR to update the README if that's all right.
Description
Hi, I am running my test suite in a GitLab CI pipeline using an attached MySQL service container. The service container gets its image directly from Docker Hub. My whole entire test suite passes when using the
mysql:5.7
docker image:But when switching to the
mysql:8
image, many tests fail with this error:I also tried using
mysql:8.0
andmysql:8.4
and got the same result.Expected outcome
The TruncateDirtyTables sproc gets created in the background before/as the test suite runs, just like it did in MySQL 5.7.
Things I tried
MysqlTriggerBasedTableSniffer::createTruncateDirtyTablesProcedure()
and nothing looks amiss thereI have my local Docker MySQL container configured with these engine settings, but I have no idea if they affect sproc creation, as they're mostly for legacy support of some of our other apps:
Questions
createTruncateDirtyTablesProcedure()
is called, is that logged anywhere that's visible? If not, can we log the result of that query somewhere for debugging purposes?