storage engine: how to identify PRIMARY keys?

Christoph Rupp <[email protected]> Tue, 10 May 2016 11:11:50 +0200
Newsgroups gmane.comp.db.mysql.devel
Message-ID <CAE6Xdb7VoB6_RNHix871Rd+L7FtmjZ8L0_BjG0DKcZrgi1aGuw@mail.gmail.com>
Hi,

in the ::create() method of my storage engine I want to create indices
for all columns where (*field)->m_indexed is true.

As far as I understand there are different types of indices:
- PRIMARY: always unique
- INDEX: usually not unique (can have duplicate keys)

but I have not been able to figure out whether a FIELD object is a
primary key or not.

I saw that the Schema description (TABLE->s) has more information
about the columns, but it seems they're already sorted by priority
(i.e. primary key is first), whereas the FIELD objects are not sorted.

Thanks
Christoph

-- 
MySQL Internals Mailing List
For list archives: http://lists.mysql.com/internals
To unsubscribe:    http://lists.mysql.com/internals