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

Akka Persistence JDBC MySQL schema creation script warning on duplicate unique index #667

Open
davidlzs opened this issue Jul 13, 2022 · 1 comment

Comments

@davidlzs
Copy link

Versions used

Akka version:

Expected Behavior

Please describe the expected behavior of the issue, starting from the first action.

Actual Behavior

Please provide a description of what actually happens, working from the same starting point.

When using the MySQL schema creation script to create DB objects, we got the following MySQL warning:

09:10:13	CREATE UNIQUE INDEX event_journal_ordering_idx ON event_journal(ordering)	0 row(s) affected, 1 warning(s): 1831 Duplicate index 'event_journal_ordering_idx' defined on the table 'event_journal'. This is deprecated and will be disallowed in a future release. Records: 0  Duplicates: 0  Warnings: 1	0.016 sec

Relevant logs

If you identified a section in your logs that explains the bug or might be important to understand it, please add it.

Reproducible Test Case

Please provide a PR with a failing test.

If the issue is more complex or requires configuration, please provide a link to a project that reproduces the issue.

@octonato
Copy link
Member

Did that happen after a second run of that script?

The create table has a IF NOT EXISTS clause so it's idempotent, but that's not the case for the index.

The is no IF NOT EXISTS clause for index creation. If we want to solve this, we will need to write a more complex script that checks the information_schema table.

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

No branches or pull requests

2 participants