@@ -31,7 +31,7 @@ type IndexField struct {
3131 KeyName string
3232 SeqInIndex int
3333 ColumnName string
34- Collation string
34+ Collation sql. NullString
3535 Cardinality int
3636 SubPart sql.NullInt64
3737 Packed sql.NullString
@@ -190,6 +190,7 @@ func (t *Table) parse() error {
190190
191191 t .Fields = append (t .Fields , f )
192192 }
193+
193194 if rows .Err () != nil {
194195 return rows .Err ()
195196 }
@@ -221,7 +222,7 @@ func getIndexes(db *sql.DB, schema, tableName string) (map[string]Index, error)
221222 & i .ColumnName , & i .Collation , & i .Cardinality , & i .SubPart ,
222223 & i .Packed , & i .Null , & i .IndexType , & i .Comment , & i .IndexComment )
223224 if err != nil {
224- return nil , fmt .Errorf ("cannot read constraints : %s" , err )
225+ return nil , fmt .Errorf ("cannot read indexes : %s" , err )
225226 }
226227 if index , ok := indexes [i .KeyName ]; ! ok {
227228 indexes [i .KeyName ] = Index {
@@ -288,7 +289,7 @@ func getTriggers(db *sql.DB, schema, tableName string) ([]Trigger, error) {
288289 & t .Created , & t .SQLMode , & t .Definer , & t .CharacterSetClient , & t .CollationConnection ,
289290 & t .DatabaseCollation )
290291 if err != nil {
291- return nil , fmt .Errorf ("cannot read constraints : %s" , err )
292+ return nil , fmt .Errorf ("cannot read trigger : %s" , err )
292293 }
293294 triggers = append (triggers , t )
294295 }
0 commit comments