MySQL Forums
Forum List  »  InnoDB

Critical Issue: Field value changes back to older value after a successful update
Posted by: Abe C
Date: June 30, 2014 08:52AM

I'm having a critical issue with one of my InnoDB tables. I have field that requires to constantly be updated.

1. The Update does not return any errors
2. The value sometimes is shown correctly but immediately is changed back to an older value.

The queries below were done one after the next.

mysql> select modified, current_session, ts, online, active from clients where id = 142;
+------------+-----------------+------------+--------+--------+
| modified | current_session | ts | online | active |
+------------+-----------------+------------+--------+--------+
| 1403499240 | NULL | 1384143022 | 1 | 1 |
+------------+-----------------+------------+--------+--------+
1 row in set (0.00 sec)

mysql> update clients set modified=1403905962 where id = 142;
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> select modified, current_session, ts, online, active from clients where id = 142;
+------------+-----------------+------------+--------+--------+
| modified | current_session | ts | online | active |
+------------+-----------------+------------+--------+--------+
| 1403905962 | NULL | 1384143022 | 1 | 1 |
+------------+-----------------+------------+--------+--------+
1 row in set (0.00 sec)

mysql> select modified, current_session, ts, online, active from clients where id = 142;
+------------+-----------------+------------+--------+--------+
| modified | current_session | ts | online | active |
+------------+-----------------+------------+--------+--------+
| 1403499240 | NULL | 1384143022 | 1 | 1 |
+------------+-----------------+------------+--------+--------+
1 row in set (0.00 sec)

The table description is the following:

mysql> desc clients;
+-----------------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+---------------------+------+-----+---------+----------------+
| id | bigint(20) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(50) | NO | UNI | NULL | |
| active | tinyint(4) | NO | | 1 | |
| proc | char(5) | NO | | false | |
| current_session | bigint(20) unsigned | YES | | NULL | |
| ts | bigint(20) unsigned | NO | | 0 | |
| modified | bigint(20) unsigned | NO | | 0 | |
+-----------------+---------------------+------+-----+---------+----------------+

The error seems to be happening on two records only and only for the modified field.

Every other record on the table seems to be updated successfully. I tried doing an online search for a possible cause and found absolutely nothing.

Thanks in advanced for any help on this issue.

Options: ReplyQuote


Subject
Views
Written By
Posted
Critical Issue: Field value changes back to older value after a successful update
1426
June 30, 2014 08:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.