# [Know Issue] 视图中出现未知数据类型 var_string(2)

## Key Words

View, 视图，数据类型，var_string(2)

## Versions affected  

v6.1 以上版本

## Issue

查询视图中的字段类型，发现原本是 varchar 类型的字段，字段类型显示为 var_string(2)。  
`select DATA_TYPE from information_schema.columns where TABLE_NAME = 'xxx' and column_name = 'xxx';`

## Root Case

这个问题是之前解决并发访问视图 column 问题时引入的  [https://github.com/pingcap/tidb/pull/34538](https://github.com/pingcap/tidb/pull/34538)，会影响到 v6.1 以上版本。  
var_string 代表视图中字符串表达式值的变长类型，在显示为实际类型时应该像 v6.1 之前版本调用 tryFillViewColumnType 时将其转换为 varchar
[https://github.com/pingcap/tidb/blob/v6.5.2/executor/show.go#L2116-L2117](https://github.com/pingcap/tidb/blob/v6.5.2/executor/show.go#L2116-L2117)

## Resolution

此问题只是显示问题，并不影响使用及实际的行为。  
修复进展请关注 [https://github.com/pingcap/tidb/issues/43264](https://github.com/pingcap/tidb/issues/43264)
