The mysql update data increases the field amount and returns 1, but the final data is not updated.

problem description

the system has a way to increase the user"s balance. Use mysql to increase the balance field update table set column = column + n . The database uses the rds, version of aws MySQL 5.6.27

.

the environmental background of the problems and what methods you have tried

occasionally the amount is not added, but the printed log shows normal, and 1 is returned after update. Using (java+spring+mybatis), at first the default update returns the number of matched, and then the number of affected is changed to 1. But the result is still not modified successfully

the following log:

add_point, count:1, user_id:XXX, point:XXX

related codes

update user_info set point = point + -sharp{point} where id = -sharp{userId}

what result do you expect? What is the error message actually seen?

expect the user balance to be added correctly, but not actually. But my own unit test, running multiple threads has not been able to reproduce.

Aug.19,2021
Is

rolled back with an exception


plus transaction commit?

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b376a0-3445b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b376a0-3445b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?