Php inquires if it has been inserted before it inserts or triggers the mysql unique constraint. What's going on?

I built a unique index. When inserting data, I first search in the database. The program is Synchronize. It queries, judges, and then inserts. There is only one database. I do not know why I look at the php_error log, or trigger the constraint of this unique index.

Mar.05,2021

if it is a website, it is still possible to be concurrent, because php will create different processes for different users.


indicates that someone has inserted it.

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