I just checked it, and it looks like MySQL refers to
'XXX' and COLUMN2 = 'YYY'
as an expression. Therefore, it compares the values โโof COLUMN2 and "YYY", gets a logical result and executes "XXX". And this is the result, so you probably get 0 in COLUMN1 at the end, since "XXX" is not DOUBLE / INTEGER / BOOLEAN. COLUMN2 will remain unchanged.
Thus, this request is not erroneous, it just does not match what was expected.
vadchen
source share