The SQLite driver doesn't like the compound primary key of metatags_quick.

I've created a core issue: http://drupal.org/node/1571842

However, there's really no need for it in metatags_quick. Using the primary key enforces uniqeness, however, not in the way I think you want.

As the id field is a serial, each row will have a unique id, but they can still have duplicate path and lang.

Secondly, while the primary key defines an index for the table, having id as the leftmost field makes it rather useless as the DB can only use it to look up an row by starting with the id, and as the id is unique, there's no need for the rest of the index.

In the attached patch I've changed the primary key to being the serial field, and added a unique index on lang, path. I've placed lang leftmost in the index, as that will make the lower amount of languages (contra paths), slice up the index in language specific slices.

There's also an update hook to update existing sites.

CommentFileSizeAuthor
metatags_quick-sqlite.patch1.43 KBXen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

valthebald’s picture

Version: 7.x-2.4 » 7.x-2.x-dev
Status: Active » Fixed

Makes sense, committed to 7.x-2.x
Thank you!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.