← Back to team overview

drizzle-discuss team mailing list archive

tables must have a primary key


So, for Embedded InnoDB, currently I have a requirement that all tables
must have a primary key.

This is due to the Embedded InnoDB API not really allowing us to seek
based on rowid (which is the primary key in InnoDB when you don't
explicitly set one) which means that ::position() (or rather ::rnd_pos)
won't work for such tables... and we don't want to crash out on users
depending on their table definition :)

So.. I think this also a limitation for the replication things Jay is
currently working on.

Should we make it a requirement?

Or we can:
- wait for embedded innodb API to be fixed
- create our own hidden column that's an auto-inc primary key
  (similar to what NDB does)
- live with this limitation for embedded_innodb for the time being and
hope one of the above two happens.

Stewart Smith

Follow ups