Move DEADLOCK_* constants into DatabaseBase