I know I should be writing
MAX(column) + 1 in my queries rather than
MAX(column +1). However, by mistake I wrote the wrong one and it seems to prevent a deadlock issue that I was having.
Couldn't find an explanation on this after digging for sometimes. Do point me to the write direction if this is already answered or looking forward to learn some new interesting things.