I'm developing a system using mssql and based it off of the pgsql in the acl.install module. It sets a primary key on acl_user.acl_id that I don't think should be done. Perhaps the primary key should be the combination of both of them? This doesn't look like an issue for mysql or mysqli.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | acl.071111.patch.txt | 5.21 KB | salvis |
| #2 | acl.071110.patch.txt | 4.95 KB | salvis |
| #1 | acl_db_fix.patch | 4.79 KB | fago |
Comments
Comment #1
fagoyep, you are right.
I had a look at the db scheme. The mysql scheme doesn't even include primary keys. Furthermore the db scheme doesn't use utf8 for mysql > 4.1.
So I've gone over this issues and created a patch. It also adds an uninstallation routine.
I've tested the mysql upgrade path, but not the postgre sql, because I have no postgre sql test environment. It would be nice if someone could test it.
merlinofchaos, are the scheme changes ok for you?
Comment #2
salvisHi fago
Thanks for looking into this. Merlinofchaos has just turned ACL and Forum Access over to me.
About the patch:
The CREATE INDEX seems to have been redundant.
Anyone care to test the PostgreSQL?
P.S. I'd be happy to keep you aboard.
Comment #3
fagoah well, so hopefully this brings new life to the project.. :)
@name: yep, copy/paste mistake. My mysql hasn't complained, but anyway let's remove them.
@INDEX: as to my knowledge, for a primary key is anyway an index maintained, so there is no need to specify a further one.
Comment #4
salvisacl_user now has an index (the primary key) on (acl_id, uid) — this helps for queries about acl_id alone as well as about acl_id and uid. It does not help for queries about plain uid. That's what the index on uid does.
Feel free to commit #2 if you agree.
Comment #5
fagoindeed, thanks for clarifying this :)
from the mysql docs:
however, I think the patch needs some more love now.
* the upgrade path still removes the old indexes
* postgre sql is missing the indexes
Comment #6
salvisYes, the upgrade path removed one index too many. The others should be ok, but I've put the removal ahead of the recreation to make sure we only do what we want to do.
As for pgsql, if no one cares, we'll commit anyway — I did massage it a little though, but I don't know whether it works...
Comment #7
fagofine. I've only replaced the index name to be {acl_user}_uid_index, so that the acl_user table prefix is correctly applied.
Otherwise, the code looks good so I've committed it to 5.x-dev. PostgreSQL could still need a tester..
Comment #8
Shiny commentedtesting on postgres - what's the current state? the patch won't apply cleanly to the end of the DRUPAL-5 branch. Is it already in there?
Comment #9
salvisYes, the patch is already committed to acl 5.x-1.x-dev, but I'm not sure whether the pgsql part really works, so I'd really appreciate your feedback...
Comment #10
Shiny commentedIt all installs the schema cleanly - looks correct.
will test with forum access next.
Comment #11
salvisGreat — thank you for checking/testing!
Comment #12
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.