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

Mutations in My SQL fail when sql_require_primary_key = 1 in set in the DB #10234

Open
pari-m opened this issue May 13, 2024 · 0 comments
Open
Labels
k/enhancement New feature or improve an existing feature

Comments

@pari-m
Copy link

pari-m commented May 13, 2024

Is your proposal related to a problem?

MySQL doesn't return data in mutations so Hasura creates temporary tables so Hasura can retain and select the data after a mutation. These tables don't have a primary key which is causing the following error on the MySQL server.

Unable to create or change a table without a primary key, when the system variable 'sql_require_primary_key'

Describe the solution you'd like

Hasura to use primary keys in temporary tables

Describe alternatives you've considered

The following variable can be set in MySQL

SET sql_require_primary_key = 0;

@pari-m pari-m added the k/enhancement New feature or improve an existing feature label May 13, 2024
@pari-m pari-m changed the title Mutations in My_SQL fail when sql_require_primary_key = 1 in the DB Mutations in My SQL fail when sql_require_primary_key = 1 in the DB May 13, 2024
@pari-m pari-m changed the title Mutations in My SQL fail when sql_require_primary_key = 1 in the DB Mutations in My SQL fail when sql_require_primary_key = 1 in set in the DB May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
k/enhancement New feature or improve an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant