dolt: Flyway and dolt: missing performance_schema

Setup

using dolt data base:

dolt version
dolt version 1.40.3

and added flyway to the pom.xml as described in tutorial:

https://github.com/springframeworkguru/spring-6-rest-mvc/tree/76-flyway-deps

Error

INFO[0398] NewConnection                                 DisableClientMultiStatements=false connectionID=7
ERRO[0398] unable to prepare query: Access denied for user 'restadmin'@'%' to database 'performance_schema'  query="select VARIABLE_VALUE from performance_schema.global_variables where variable_name = 'pxc_strict_mode'"
ERRO[0398] unable to prepare query: Access denied for user 'restadmin'@'%' to database 'performance_schema' (errno 1105) (sqlstate HY000)
WARN[0398] error running query                           connectTime="2024-06-23 13:57:51.190714 +0200 CEST m=+398.837230084" connectionDb=restdb connectionID=7 error="Access denied for user 'restadmin'@'%' to database 'performance_schema'"
ERRO[0398] unable to prepare query: Access denied for user 'restadmin'@'%' to database 'performance_schema'  query="SELECT variable_name FROM performance_schema.user_variables_by_thread WHERE variable_value IS NOT NULL"
ERRO[0398] unable to prepare query: Access denied for user 'restadmin'@'%' to database 'performance_schema' (errno 1105) (sqlstate HY000)
WARN[0398] error running query                           connectTime="2024-06-23 13:57:51.190714 +0200 CEST m=+398.837230084" connectionDb=restdb connectionID=7 error="Access denied for user 'restadmin'@'%' to database 'performance_schema'"

Flyway Source

It is used in this places:

https://github.com/search?q=repo%3Aflyway%2Fflyway+performance_schema&type=code

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 15 (15 by maintainers)

Most upvoted comments

FYI: with 1.41.1 the flyway run without error

Maybe we can close this issue and create a new one for the missing ERRO for some WARN?

Ahh, excellent! Thanks for confirming with the logs. 🙏 Glad to see that those performance_schema queries aren’t causing Flyway to crash. I can see how those error messages in the Dolt logs are a bit confusing since there are a few queries being executed that fail and some of them are gracefully handled by the application, but not all.

We generally don’t include any queries in the logs at the INFO level – we reserve that for DEBUG level, just due to the amount of data written to the logs, but I can see a case for ERRORs to include the query string. I’ll take a look in the logging code today and see what I can do.

Thanks for following up with more clues and helping us figure this one out.

Hi @muescha, thank you for reporting these details about what Flyway needs from performance_schema in order to work with Dolt. Awesome that you were able to get further along by faking out some of the data in the performance_schema tables. If the tables’ existence is really all that is needed to keep Flyway happy, then that’s an easy change for us to make. Populating the global variables would be pretty straight-forward, too.

We’ll tackle the query issue you hit first (https://github.com/dolthub/dolt/issues/8052) and discuss if we should go ahead and stub out some of the tables in performance_schema. Thanks for helping us test with Flyway and finding some gaps we need to fill in for Dolt! 🙏