Skip to content

Conversation

julianbrost
Copy link
Collaborator

@julianbrost julianbrost commented Aug 20, 2025

SESSION_VARIABLES_ADMIN wasn't actually introduced in MySQL 8.0.0 but only in 8.0.14.1 Use exactly that version in the version comparison to ensure compatibility.

Tests

Running the Icinga DB integration tests with the following environment variables set:

  • ICINGA_TESTING_MYSQL_IMAGE=mysql:8.0.0
  • ICINGA_TESTING_MYSQL_IMAGE=mysql:8.0.13
  • ICINGA_TESTING_MYSQL_IMAGE=mysql:8.0.14

Before

Running in Icinga DB as-is:

8.0.0:

panic: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON *.* TO u1 */' at line 1

8.0.13 (yes, the error message got worse):

panic: Error 1149 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use

8.0.14 works fine.

After

After adding replace github.com/icinga/icinga-testing => ../../icinga-testing to https://github.com/Icinga/icingadb/blob/main/tests/go.mod to use the changed version from this PR: all three versions work fine.

refs Icinga/icingadb#729 (the problem was noticed there)

Footnotes

  1. https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_session-variables-admin

SESSION_VARIABLES_ADMIN wasn't actually introduced in MySQL 8.0.0 but only in
8.0.14.[^1] Use exactly that version in the version comparison to ensure
compatibility.

[^1]: https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_session-variables-admin
@cla-bot cla-bot bot added the cla/signed label Aug 20, 2025
@julianbrost julianbrost added the bug Something isn't working label Aug 20, 2025
@julianbrost julianbrost marked this pull request as ready for review August 20, 2025 12:26
@oxzi oxzi merged commit 43491aa into main Sep 1, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cla/signed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants