Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 6.5版本rr隔离级别下的metadata lock导致报错问题

According to the official documentation on metadata locks, I conducted the following tests:
- Following the steps mentioned above, the issue can be reproduced.
- Retesting under RR isolation level without adding an index, session 2 only modifies the column length. If the length is changed from long to short, another session’s query will definitely report an error. If the length is changed from short to long, no error is reported.
- Under RR isolation level, only testing index creation, no query errors occur.
- Under RC isolation level, whether increasing or decreasing the field length, no errors are reported.
Question:
Why does changing the field type or shortening the length under RR isolation level always result in an error? It seems to have little to do with adding an index as mentioned in the official documentation.