the issue with the first one seems to be num being 0, I imagine that is already being used in an entry
not really sure what would cause issues with the flag not being set, although I wonder why you take that approach instead of just checking to see if SELECT * FROM tPlayer WHERE account='pl.account' and checking to see if there is actually an existing row.
UN has had a similar database for about 2 and a half weeks now that hasn't thrown any errors from trials going in and out of observer mode.
The first screenshot has a constraint on account being unique, the 2nd has no constraints on any column
