in reply to understanding this database error code handling
No.
An assignment always has the assigned value also as its return value. You can easily check that by printing the value of an assignment:
print $foo = '0'; print $foo = 'bar'; [download]