bdr role does not check implicitly column definition
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
```sql
create table t1(a int primary key, b int default null);
alter table t1 modify column b int comment 'int value';
alter table t1 modify column b int default null comment 'int value';
```
### 2. What did you expect to see? (Required)
```sql
mysql> alter table t1 modify column b int comment 'int value';
Query OK, 0 rows affected (0.13 sec)
mysql> alter table t1 modify column b int default null comment 'int value';
Query OK, 0 rows affected (0.13 sec)
```
### 3. What did you see instead (Required)
```sql
mysql> alter table t1 modify column b int comment 'int value';
ERROR 8263 (HY000): The operation is not allowed while the bdr role of this cluster is set to primary.
mysql> alter table t1 modify column b int default null comment 'int value';
Query OK, 0 rows affected (0.13 sec)
```
### 4. What is your TiDB version? (Required)
```sql
mysql> select tidb_version();
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.0.0-alpha
Edition: Community
Git Commit Hash: 6dd47fe67123713714ccf1e2161ba70b6c363b4a
Git Branch: heads/refs/tags/v8.0.0-alpha
UTC Build Time: 2024-03-02 11:43:59
GoVersion: go1.21.6
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.04 sec)
```
Contributor guide
Assessment
This issue has not been assessed yet.