Failed to add a vector column with default value(even by error message prompt)
- 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)
Related pr: https://github.com/pingcap/tidb/pull/56286
```
create table t(embedding VECTOR DEFAULT (VEC_FROM_TEXT('[1,2,3]')));
tidb> alter table t add column vec_col VECTOR(3) default '[1,2.1,3.2]';
ERROR 1105 (HY000): VECTOR column 'vec_col' can't have a literal default. Use expression default instead: ((VEC_FROM_TEXT('...')))
alter table t add column vec_col VECTOR(3) default ((VEC_FROM_TEXT('[1,2,3]')));
```
### 2. What did you expect to see? (Required)
Execute successfully.
### 3. What did you see instead (Required)
```
ERROR 1674 (HY000): Statement is unsafe because it uses a system function that may return a different value on the slave
```
### 4. What is your TiDB version? (Required)
master
Contributor guide
Assessment
This issue has not been assessed yet.