4.x版本 online ddl

text → longtext int->bigint char->varchar(100) 这种修改字段类型的方式会导致锁表吗??

可以看看文档
https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000003980529

会吧

我这边验证了下text → longtext int->bigint的table_id没有改变为oneline ddl
char->varchar(100)这个table_id是变了的为offline ddl
MySQL [test]> desc demo;
±---------±-----------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±---------±-----------------±-----±----±--------±---------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| vc_col | varchar(255) | NO | | NULL | |
| text_col | text | YES | | NULL | |
| age | int(11) | YES | | NULL | |
±---------±-----------------±-----±----±--------±---------------+
4 rows in set (0.01 sec)

MySQL [test]> select table_name, table_id from oceanbase.__all_virtual_table where table_name=‘demo’;
±-----------±---------+
| table_name | table_id |
±-----------±---------+
| demo | 500040 |
±-----------±---------+
1 row in set (0.01 sec)

MySQL [test]> ALTER TABLE demo MODIFY age BIGINT;
Query OK, 0 rows affected (0.11 sec)

MySQL [test]> select table_name, table_id from oceanbase.__all_virtual_table where table_name=‘demo’;
±-----------±---------+
| table_name | table_id |
±-----------±---------+
| demo | 500040 |
±-----------±---------+
1 row in set (0.01 sec)

MySQL [test]> desc demo;
±---------±-----------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±---------±-----------------±-----±----±--------±---------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| vc_col | varchar(255) | NO | | NULL | |
| text_col | text | YES | | NULL | |
| age | bigint(20) | YES | | NULL | |
±---------±-----------------±-----±----±--------±---------------+
4 rows in set (0.00 sec)