Received this error while updating to the latest rev -

user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE drupal_login_security_track DROP INDEX id in /xxxxxx/xxxxxxx/drupal-6.12/includes/database.mysql-common.inc on line 448.

The status was -

Failed: ALTER TABLE {login_security_track} DROP INDEX id

Created bug report as "critical" due to effects on security and users

CommentFileSizeAuthor
#1 login_security_492800_1.patch1.08 KBilo

Comments

ilo’s picture

StatusFileSize
new1.08 KB

I guess the error was introduced in the 1.9 revision of the install file, in the update_6001 function. Some database tasks were moved and leave the drop operation unfinished: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/login_secur...

the 1.8 revision of the function was something like this:

db_drop_primary_key($ret, 'login_security_track');
db_add_primary_key($ret, 'login_security_track', array('id'));
db_drop_index($ret, 'login_security_track', 'id');

and the 1.9 is

db_drop_primary_key($ret, 'login_security_track');
db_drop_index($ret, 'login_security_track', 'id');

Need to switch back this update function to the 1.8.. Deekayen?

This little patch would do, don't know if should I commit as the file was slightly modified for a D7 aproximation by deekayen, I'll wait for him in this issue.

ilo’s picture

Status: Active » Needs review
marcus0263’s picture

Excellent, applied the new dev version and the patch, all is well.

Cheers!

deekayen’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

  • deekayen committed 79c8463 on 6.x-1.x, 8.x-1.x
    #492800 - temporary? fix for the order of index queries on update