Closed Bug 565320 Opened 12 years ago Closed 12 years ago

Missing named key in users_permissions causes site failure when file cache expires


( :: Knowledge Base Software, task, P1)



(Not tracked)



(Reporter: jsocol, Assigned: paulc)



(Keywords: regression, Whiteboard: qa-)


(1 file)

[From bug 565289.] In attachment 443825 [details] [diff] [review] we drop three indexes from users_permissions but only add two. The one we forgot was used in webroot/lib/userslib.php:1715-1739 in a FORCE INDEX clause.

The key we dropped was
UNIQUE KEY `permName` ( `permName` )

We either need to add the UNIQUE KEY back (though since this column is also the PRIMARY KEY it seems redundant) or we need to update line 1757 of webroot/lib/userslib.php to do


The latter is technically correct, I'm just not sure if there would be other fallout from it and would rather not poke the bear.

Paul: can you please audit the conversion script and check that no other indices were left behind?
Whiteboard: qa-
Severity: normal → critical
Priority: -- → P1
Checked this thoroughly, using:
> mysql -e "SELECT TABLE_NAME, INDEX_NAME, COLUMN_NAME FROM information_schema.statistics WHERE TABLE_SCHEMA = 'dbname' order by TABLE_NAME, COLUMN_NAME, INDEX_TYPE;
to generate the list of indexes, and then doing a diff of the two.
Attachment #445008 - Flags: review?(james)
Comment on attachment 445008 [details] [diff] [review]
fixes differences in indexes before vs after

r+. I tested this by wiping out the file cache, which, as predicted, caused everything to break, then I applied this SQL, and magically, everything worked again.
Attachment #445008 - Flags: review?(james) → review+
Duplicate of this bug: 565606
Target Milestone: 1.5.5 →
Can we land this to unblock testing (so Rebecca/Michael can sign up for accounts here?)
(In reply to comment #4)
> Can we land this to unblock testing (so Rebecca/Michael can sign up for
> accounts here?)
Bug 565701 is blocking this.
Depends on: 565701
SQL was run in bug 565701. Looks like the symptoms in bug 565606 are also fixed on stage-new. Resolving this so QA can verify.
Closed: 12 years ago
Resolution: --- → FIXED
Verified; this was the bug causing random (or, not-so-random) Tiki errors, iirc.
You need to log in before you can comment on or make changes to this bug.