Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: Vitess cannot support Grafana 10+ CTEs #13632

Open
derekperkins opened this issue Jul 27, 2023 · 4 comments
Open

sql: Vitess cannot support Grafana 10+ CTEs #13632

derekperkins opened this issue Jul 27, 2023 · 4 comments

Comments

@derekperkins
Copy link
Member

We've used Vitess for Grafana persistence for several years, but after upgrading to v10, certain functionality including dashboard list/search fails due to usage of CTEs. This is a known issue, I just wanted to call this out specifically since we have tracked compatibility with major projects in the past. Feel free to close if it isn't useful, but it'll at least help anyone searching.

"Search failed" error="Error 1235: unsupported: with expression in select statement"

Related issues:

@systay
Copy link
Collaborator

systay commented Dec 13, 2023

@derekperkins Any chance you could share the query that is breaking vtgate?

@derekperkins
Copy link
Member Author

There's a test here for recursive queries
https://github.com/grafana/grafana/blob/main/pkg/services/sqlstore/sqlstore.go#L363-L392

And a comment about how it relates to Vitess
grafana/grafana#73725 (comment)

@derekperkins
Copy link
Member Author

I submitted a PR based on that comment, hopefully they accept it and it works

@derekperkins
Copy link
Member Author

derekperkins commented Mar 12, 2024

Still trying to get this to work. There has been no movement on the original PR.

This has been longer coming, but go-sql-driver/mysql just released a new version that supports a / in the db name. I also have a PR into Grafana to use that new dependency, so that I can use shard targeting to allow the recursive queries to execute, which should be more reliable long-term.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants