Error Caused by Metadata Lock in RR Isolation Level in Version 6.5

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 6.5版本rr隔离级别下的metadata lock导致报错问题

| username: h5n1

According to the official documentation on metadata locks, I conducted the following tests:

  1. Following the steps mentioned above, the issue can be reproduced.
  2. 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.
  3. Under RR isolation level, only testing index creation, no query errors occur.
  4. 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.

| username: tidb菜鸟一只 | Original post link

Changing the field type or shortening the length will cause data changes, but increasing the length will not cause changes.

| username: h5n1 | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.