Skip to content

Error Code: 3750. Unable to create or change a table without a primary key #13256

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

Open
izturn opened this issue Apr 16, 2025 · 0 comments · May be fixed by #13258
Open

Error Code: 3750. Unable to create or change a table without a primary key #13256

izturn opened this issue Apr 16, 2025 · 0 comments · May be fixed by #13258
Labels
kind/enhancement Category issues or prs related to enhancement.

Comments

@izturn
Copy link

izturn commented Apr 16, 2025

Describe the bug
When executing mysql-schema.sql, an error occurs that causes the script to fail.
After debugging, I found that the root cause is that the roles and permissions tables do not have primary keys defined.

The error message is as follows:

Error Code: 3750. Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key' is set. Add a primary key to the table or unset this variable to avoid this message. Note that tables without a primary key can cause performance problems in row-based replication, so please consult your DBA before changing this setting.

Please consider adding primary keys to the role and permission tables to resolve this issue.

ps: i will send a pr to fix this

@izturn izturn linked a pull request Apr 16, 2025 that will close this issue
5 tasks
@KomachiSion KomachiSion added the kind/enhancement Category issues or prs related to enhancement. label Apr 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants