There is a problem of read repetition in LOCK TABLES auto_table WRITE;.

The basic logic of the

program is as follows:
execute "LOCK TABLES auto_table WRITE";
then "select ID from auto_table;
then update ID+1" UPDATE auto_table set ID=ID+1 ";
finally execute" UNLOCK TABLES "

but this logic occurs when two users read the same ID. Is it related to concurrency? Or is it something else?

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