Relative Content

Tag Archive for mysqldatabaseconcurrencytransactions

How to prevent duplicate inserts without Serializable transaction?

I have an API, where an insert to tableA happens after validating the result of a select query on some other tables. So tableA can have no unique keys other than the auto-generated ID.
Therefore concurrent requests to this API create duplicate entries in tableA instead of one.

How to prevent duplicate inserts without Serializable transaction?

I have an API, where an insert to tableA happens after validating the result of a select query on some other tables. So tableA can have no unique keys other than the auto-generated ID.
Therefore concurrent requests to this API create duplicate entries in tableA instead of one.

How to prevent duplicate inserts without Serializable transaction?

I have an API, where an insert to tableA happens after validating the result of a select query on some other tables. So tableA can have no unique keys other than the auto-generated ID.
Therefore concurrent requests to this API create duplicate entries in tableA instead of one.