Skip to content

Commit 39cf8fe

Browse files
author
wangyinliang
committed
add scheme/Index NoneUnique
1 parent f4733ad commit 39cf8fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

schema/schema.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,12 @@ func (ta *Table) fetchIndexesViaSqlDB(conn *sql.DB) error {
340340

341341
for r.Next() {
342342
var indexName, colName string
343+
var noneUnique uint64
343344
var cardinality interface{}
344345

345346
err := r.Scan(
346347
&unused,
347-
&unused,
348+
&noneUnique,
348349
&indexName,
349350
&unused,
350351
&colName,
@@ -368,6 +369,7 @@ func (ta *Table) fetchIndexesViaSqlDB(conn *sql.DB) error {
368369

369370
c := toUint64(cardinality)
370371
currentIndex.AddColumn(colName, c)
372+
currentIndex.NoneUnique = noneUnique
371373
}
372374

373375
return ta.fetchPrimaryKeyColumns()

0 commit comments

Comments
 (0)