- 修复 MySql 8.0 索引 DESC 的判断;#1664

This commit is contained in:
2881099
2023-11-14 15:24:14 +08:00
parent a4dca34547
commit 7180cddb42
6 changed files with 6 additions and 6 deletions

View File

@ -267,7 +267,7 @@ where a.table_schema in ({0}) and a.table_name in ({1})", tboldname ?? tbname);
select
a.column_name,
a.index_name 'index_id',
0 'IsDesc',
case when a.collation = 'D' then 1 else 0 end 'IsDesc',
case when a.non_unique = 0 then 1 else 0 end 'IsUnique'
from information_schema.statistics a
where a.table_schema IN ({0}) and a.table_name IN ({1}) and a.index_name <> 'PRIMARY'", tboldname ?? tbname);