patternsqlModerate
Is Oracle DB immune to the InnoDB deadlocks found in MySQL?
Viewed 0 times
theinnodbfoundimmunemysqldeadlocksoracle
Problem
It seems odd to me that MySQL would not handle this internally: "Deadlock found when trying to get lock; try restarting transaction"
Does Oracle DB work around this issue? After all, Oracle owns InnoDB.
Does Oracle DB work around this issue? After all, Oracle owns InnoDB.
Solution
No database can possibly work around deadlock errors in general-- in Oracle, a deadlock indicates a bug in the application, not in the database. The Oracle database will detect the deadlock condition (i.e. session A has a lock that session B is waiting on and session B has a lock that session A is waiting on) and terminate one of the blocked statements to resolve the problem. Your application ought to avoid creating a deadlock in the first place-- one option is to always generate locks in the same order in every session.
Context
StackExchange Database Administrators Q#4494, answer score: 12
Revisions (0)
No revisions yet.