UPDATE wipes data in the row...
Posted by:
Dave Who
Date: June 19, 2008 02:23PM
At some time, mysql suddenly started to behave strangely. I've noticed earlier that it runs multiple updates instead of just one, so that views counter increments by two or three when it must add only one. But I had not a clue why it happens, 'cause I definitely run the query only one time.
And now happened something very wrong. While I wanted to update the data in specific row, mysql just wiped some values in it and didn't placed the values I passed to it. I've tried everything, escaping, un-escaping. Nothing helps. And then I've turned on query log in my.cnf. And the odd thing came out:
46595 Query UPDATE groups SET thumb=NULL, last_video_thumb='1', title='Supporters of Dinamo Tbilisi', description='sdadsa sdaasd', private='0', approve_video_add='0', approve_discuss_add='0' WHERE group_id = '2'
46612 Query UPDATE groups SET thumb=NULL, last_video_thumb=1, title=NULL, description=NULL, private=NULL, approve_video_add=NULL, approve_discuss_add=NULL WHERE group_id = '2'
As you can see here two quieries run instead of one. First one is normal, and the second NULL some fields out totally... Thats some kind of anomally, cause the call is made only once. However I use ADODB abstraction layer, but no one never heard of such a bug.
MySQL version on the server is 4.01 (That's what I was given). And I see multiple mysql instances in processlist. Don't know whether this is a feature or some mishappening.
Any help or advice appreciated.