Mysql data loss

found occasional data loss in mysql. This time I lost a record in the order table. I used laravel framework

.

generate order retention
user submit order-> Table 1 generate order-> user payment-> payment callback-> Table 1 status modification, insert the merchant"s collection record in Table 2 (get the order number from Table 1)

self-examination
1. The order table uses soft deletion, and the global search in the program does not find the statement to delete the order. Even if there is, soft deletion does not actually delete the data.
2. The records in Table 2 exist, indicating that the records in Table 1 still exist until the payment callback ends successfully. Moreover, the id is self-growing, and the middle 23 is followed by 25, except for * * 24, indicating that the record has been generated. It"s gone for no reason.
3. No one is operating the database at that point in time, so human erroneous deletion can be eliminated.

Apr.05,2022

from your current statement, I can only give you an idea: the added statement that is rolled back will also cause the ID to increase


if there is a binlog, see if binlog has found anything. If you can find this delete operation, compare the context to see under what circumstances

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-1b35ed5-2bfb6.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-1b35ed5-2bfb6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?