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

I've created a core issue:

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.

metatags_quick-sqlite.patch1.43 KBXen
Members fund testing for the Drupal project. Drupal Association Learn more


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.