framework icon indicating copy to clipboard operation
framework copied to clipboard

验证器唯一性,不区分大小写,能不能增加兼容。

Open yulinzhihou opened this issue 4 years ago • 1 comments

select * from table where name = 'knoW'; -- 可以查到 name = know / KNOW /KnoW的,

select * from table where binary name = 'kNoW'; -- 只能查到 name = kNoW的。

验证器如果验证name字段的值时,如果已经存在 name = know 的时候,再添加 name = KNOW ,name = KnoW 这些会提示同已经存在

yulinzhihou avatar Sep 13 '21 04:09 yulinzhihou

和验证器没有关系。使用以下命令,查看 MySQL 的配置项 lower_case_file_system 。

SHOW GLOBAL VARIABLES LIKE '%lower_case%';

OFF 大小写敏感 ON 大小写不敏感

ymiras avatar Sep 18 '21 05:09 ymiras