View Single Post

   
  #1 (permalink)  
Old 02-28-2008, 11:11 AM
nobrow@gmail.com
 
Posts: n/a
Default Rows being matched during SELECT but not UPDATE

How's this for an anomaly ...

mysql> SELECT * FROM clients WHERE username = 'aaa' AND pwd = 'bbb'
LIMIT 1;
<snip>
1 row in set (0.00 sec)

mysql> UPDATE clients SET last_login = NOW() WHERE username = 'aaa'
AND pwd = 'bbb' LIMIT 1;
Query OK, 0 rows affected (0.01 sec)
Rows matched: 0 Changed: 0 Warnings: 0

The update no longer appears to find any matching rows. This has
worked perfectly for weeks. No changes were made to my code, but it
suddenly stopped working.

The only thing I can think of is that I upgraded a number of packages
on my system (Gentoo) over the last few days. Perhaps MySQL depends on
one of these packages for updates, but the above still looks pretty
implausible to me.

I'll rebuild MySQL (for want of any better ideas) and see what
happens. In the meantime I just thought I'd share this one with yis.
Any comments/suggestions appreciated.

Reply With Quote