List:General Discussion« Previous MessageNext Message »
From:william drescher Date:August 19 2012 4:19pm
Subject:Re: update doesn't
View as plain text  
On 8/17/2012 12:13 PM, Rik Wasmus wrote:
>> I get 1 row affected, but the status does not change when I look
>> at the row.
>>
>> If I set it to 'X' it does change.
>>
>> To make it even more wacky, if I (using phpMyAdmin) change it to
>> 'H' it will change and the row is shown change, but when I go to
>> examine the row (using the pencil icon=Edit) it changes back to 'W'.
>>
>> Either there is something really strange or my mysql is possessed.
>>
>> I am using Server version: 5.1.63-0ubuntu0.10.04.
>>
>> Anyone have any thoughts about this or suggestions on how to
>> debug it?
>
> 1) One thing that _could_ do this is a trigger. Does SHOW TRIGGERS; show any
> that could be doing this?
>
> 2) However, in 99.999% of cases, it is just a logic error in the application
> (be it your application or PHPMyAdmin), not anything in MySQL. Can you connect
> with the command line client, run the UPDATE statement, en then check what the
> SELECT shows? If it shows a correct result... the problem ain't in MySQL
> itself.
>
mysql> select status from tasks;
+--------+
| status |
+--------+
| W      |
+--------+
1 row in set (0.00 sec)

mysql> update tasks set status= 'H';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed 1 Warnings: 0

mysql> select status from tasks;
+--------+
| status |
+--------+
| W      |
+--------+
1 row in set (0.00 sec)

whoops

bill




Thread
update doesn'twilliam drescher17 Aug
  • Re: update doesn'tRik Wasmus17 Aug
    • Re: update doesn'twilliam drescher19 Aug
      • Re: update doesn'tJohnny Withers19 Aug
        • Re: update doesn'twilliam drescher19 Aug
          • Re: update doesn'twilliam drescher19 Aug
      • Re: update doesn'tMogens Melander20 Aug
        • Re: update doesn'twilliam drescher20 Aug