Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1957

cache affects update (no replies)

$
0
0
I am doing a very common update in database, lets assume it is:
update table_generic set amount = amount + in_amount where id = 1000;

Scenario: This update is used in a procedure that interacts with other huge tables (15MM records). This procedure is invoked as a queue about 20 times in 1 second. I am sure the queue works, according to the logs.

Then, the last possibility is that MySQL, in this particular update, did once (among millions invokations) used a cached value for amount field.

So, considering the procedure variable in_amount = 10.5, imagine that the database has the values:
id,amount
1,10.5

then I updated it to:
id,amount
1,21.0

then I updated it to:
id,amount
1,31.5

then, the bug occurs and it gets the cached value for amount field of 10.5, and I get as result of the update:
id,amount
1,21.0

Does that ever occur to anyone of you? Could that be a possible cause?
Questions are raised as the system is running for the last 3 years with no problem and after a long time of auditing, this is the unique possible cause.

Viewing all articles
Browse latest Browse all 1957

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>