What is the problem with the lock of the Innodb engine in Mysql?

recently, I have been looking at the lock mechanism related to Mysql. There are a few questions that have not been understood. I would like to ask you,
1, Mysql intentional lock and specific exclusive lock / shared lock. Is the purpose of intentional lock only to reduce the conflicting judgment of acquiring shared lock / exclusive lock in row lock? Just to make a prejudgment?
2, select * from table where idex = 1 for update is this intentional lock or record lock? Or is there both, the intention lock first and then record the lock? If idex is Between 1 AND 5, do GAP locks and intention locks coexist? Of course, this is under RR-level transaction isolation.
3. In select from table where idx between 1 and 5 for update, we should actually use NExt-Key locks, so is our commonly used select from table where idx between 1 and 5 the snapshot read in MVCC or the lock type of the current Next_key?

Jan.08,2022

1. The intention lock can be seen as a notice, shouting: I'm going to apply for an Xmax S line lock later. The main function is to indicate that a transaction is locking or is about to lock a row. Of course, there is the possibility of compatibility conflicts between various locks.
2. Apply for an intention lock before any row lock;
3.for update plus X lock, for shared plus S lock, select without the first two is a snapshot read.

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