0

I'm trying to make a transaction(in the node code with mysql npm package) that will select from a table and see if there is a record it will update (UPDATE) otherwise to create a new record (INSERT). I'm using connection pooling build-in with 'npm mysql2' and I get interrupts between the logic of the transaction and its caused me a deadlock from the DB. is there something to do if i don't want to create a stored procedure that will make the transaction instead?

Anubis
  • 1
  • 1

0 Answers0