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

[BUG]What is the problem with using MySQL database Elsa service error? #6077

Closed
EthanZqh opened this issue Oct 31, 2024 · 5 comments
Closed
Labels
bug Something isn't working

Comments

@EthanZqh
Copy link

hello,teacher:
What is the problem with using MySQL database Elsa service error?
elsa-mysql-err

@EthanZqh EthanZqh added the bug Something isn't working label Oct 31, 2024
@sfmskywalker
Copy link
Member

It looks like that the MySql server version you're using doesn't yet support the LIMIT, IN, ALL, ANY and SOME subquery syntax.

@EthanZqh
Copy link
Author

EthanZqh commented Nov 1, 2024

It looks like that the MySql server version you're using doesn't yet support the LIMIT, IN, ALL, ANY and SOME subquery syntax.

The MySQL server version is community-based mysql-8.0.30-winx64 or community-based mysql-9.0.1-winx64
Limit&IN/ALL/ANY/OME subqueries are not yet supported
Solution problem: 1. Which MySQL version supports the "Limit&IN/ALL/ANY/OME subquery" query?
2. It is to modify the nested source code query, but I cannot modify the Elsa source code. I am referencing the Elsa Dll dynamic library.

@sfmskywalker
Copy link
Member

The EF Core migrations were generated against MySql version 9.0.0.
One thing you could try is to generate your own migrations. The simplest way might be to copy the Elsa.EntityFrameworkCore.MySql project and rename it, and change the MySql version to an older version.

The MySQL server version is community-based mysql-8.0.30-winx64 or community-based mysql-9.0.1-winx64

Do you mean that you are not sure which one you are using? If so, probably you're using version 8. So, if possible for you, upgrading to version 9 might solve your issue and then you don't need to generate custom migrations.

@EthanZqh
Copy link
Author

Upgrading MySQL to the community version MySQL-9.0.1-winx64 does not solve the problem and supports' Limit&IN/ALL/ANY/OME subqueries'. It may be necessary to change the source code nesting to solve the problem,
The code is as follows: DELETE w
FROM WorkflowInboxMessages AS w
WHERE w.Id IN (
SELECT w0.Id
FROM (select w1.Id from WorkflowInboxMessages AS w1
WHERE w1.ExpiresAt <= @__now_0
LIMIT 3 OFFSET 2) AS w0
)
I am unable to modify the source code. I hope the teacher can modify the source code to solve this problem. Thank you!

@sfmskywalker
Copy link
Member

Let's keep the issue in one place: #6096

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants