Closed (fixed)
Project:
Privatemsg
Version:
5.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
3 Oct 2007 at 16:38 UTC
Updated:
12 Nov 2007 at 22:42 UTC
Updated privatemsg to Oct 1 release. Ran update.php . . . Results:
The following queries were executed
privatemsg module
Update #6
* ALTER TABLE {users} ADD name_length INT NOT NULL DEFAULT 0
* UPDATE {users} SET name_length = LENGTH(name)
* Failed: CREATE TRIGGER user_name_length_insert BEFORE INSERT ON {users} FOR EACH ROW SET NEW.name_length = LENGTH(NEW.name)
* Failed: CREATE TRIGGER user_name_length_update BEFORE UPDATE ON {users} FOR EACH ROW SET NEW.name_length = LENGTH(NEW.name)
Error shows as follows:
* user warning: Access denied; you need the SUPER privilege for this operation query: CREATE TRIGGER user_name_length_insert BEFORE INSERT ON users FOR EACH ROW SET NEW.name_length = LENGTH(NEW.name) in /path/includes/database.mysql.inc on line 172.
* user warning: Access denied; you need the SUPER privilege for this operation query: CREATE TRIGGER user_name_length_update BEFORE UPDATE ON users FOR EACH ROW SET NEW.name_length = LENGTH(NEW.name) in /path/includes/database.mysql.inc on line 172.
My db user has All permissions to its Drupal db. Why is a SUPER privilege needed?
Drupal 5.2
Apache 2.2.4
MySQL 5.0.44
PHP 5.2.4
Comments
Comment #1
samuelet commentedSame problem for me.
google says:
In version 5.0.x it is not a bug. You need SUPER priviledge just to CREATE TRIGGER.
Some infos here:
http://bugs.mysql.com/bug.php?id=18478
This could be a problem since many druapal installation don't use the SUPER user to connect to mysql.
Comment #2
Zen commentedAs the topic change suggests, update_6 introduces some rather restrictive and questionable changes. Contrib modules should not alter core tables. And while even D6 supports MySQL 4.1 as a minimum, this module should not raise the minimum requirements to 5.
-K
Comment #3
LuRcH@www.daihatsu-drivers.co.uk commentedI have to agree, I am starting to become deeply concerned about the developments happening in this branch of privatemsg. First it requiring the subscriptions module. I can't see a real reason why it become compulsory as I didn't want to run the subscriptions module on my site. The only thing I can see is that both are now maintained by the same new person. Now its starting to require MySQL5. none of the hosting companies I use (4 in total) none of them have MySQL5 running. Makes one consider creating a new branch which is a bit more friendly to end users requirements. :)
Comment #4
abqaria commentedsubscribed
Comment #5
Zen commented@lurch: Please see (and if possible test the patch in) this issue which decouples the subscription module from the privatemsg module.
-K
Comment #6
salvisI agree that the current behavior is not as it should be, and I think I've been able to convince chx to fix it.
For now you have two choices:
If you're using MySQL 5, you can manually install the triggers with SUPER privilege. Check for any records that have name_length=0 (and uid<>0) and fix them manually.
Otherwise, set the users.name_length column to all zeros...
update users set name_length = 0;... and you'll get the old behavior.
IMO, the old behavior is preferable anyway...
Comment #7
LuRcH@www.daihatsu-drivers.co.uk commented@ Zen: Thanks thats great! Have patched and uploaded now. 1st impressions look hopeful so far :)
Comment #8
Zen commented@Lurch: please state that in the other issue, not here.
-K
Comment #9
mr.andrey commentedDoes settings name_length have other implications? In which other places is it used?
When a new user registers, and their name_length gets set to more than 0, does this break anything for the privatemsg?
Thanks,
Andrey.
Comment #10
salvisIt's only used for sorting the names in the dynamic list.
If some name_length's are 0 and others not, then the sort order will be broken, that's all.
Comment #11
salvis... However, there's another issue with that latest snapshot: update_6() and install() fail to add the variables column to the privatemsg table. So if you haven't updated yet, you might be better off to wait...
Comment #12
mr.andrey commentedAh yes, I noticed that error and posted it here: http://drupal.org/node/182369
Is it now fixed, so I could upgrade to the latest CVS or should I wait for other fixes before doing that?
Thanks!
Andrey.
Comment #13
salvisPrivatemsg is unchanged since 10 days ago. chx is planning to clean it up this weekend.
Comment #14
manuj_78 commentedI upgraded my module and it is coming up with the following error
Any help will be greatly appreciated.
Comment #15
salvisYes, the snapshot is still "Last updated: October 2, 2007"
We're still waiting — I'm sorry to raise hopes prematurely.
Comment #16
Zen commentedThis has been fixed via a roll-back. This is a development branch. There will be no roll-back updates added to the module - the updates have just been removed.
However, the following queries will get your tables up-to-date. Run them one by one ...
Delete the name_length column:
ALTER TABLE users DROP name_length;Delete the triggers if they have been added. These two queries will fail on systems that do not support Triggers.
DROP TRIGGER IF EXISTS user_name_length_insert;DROP TRIGGER IF EXISTS user_name_length_update;Reset the update level of the module:
UPDATE system SET schema_version = 4 WHERE name = 'privatemsg' AND type = 'module';Run the updater now to get this fix.
The above queries have only been tested for syntax.
-K
Comment #17
Zen commentedMissing URL issue in my last post: "this fix".
Comment #18
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.