When table relativity is created in relativity.install, it does

CREATE TABLE {relativity} (
nid int(10) unsigned NOT NULL default '0',
parent_nid int(10) unsigned NOT NULL default '0',
KEY nid (nid),
KEY parent_nid (nid)
)

which creates two keys on nid instead of one each on nid and parent_nid. This should probably read

CREATE TABLE {relativity} (
...
KEY nid (nid),
KEY parent_nid (parent_nid)
)

with a possible update of

ALTER TABLE `relativity` DROP INDEX `parent_nid` ,
ADD INDEX `parent_nid` ( `parent_nid` )

[Sorry not enough experience with install system yet to make a patch.]
Mark.

Comments

darius’s picture

You seem to be right. Could someone else please verify that this is an obvious bug, in case we are missing something? I will fix this then. Thanks,

Darius

efolia’s picture

I don't know if this is related, but whenever I remove a child and re-attach it, I get the following errors (though the process seems to work):
array_keys() [function.array-keys]: The first argument should be an array in /home/mydomain/public_html/clair-obscur/drupal/modules/user.module at line 349.
which cascades into:
implode() [function.implode]: Bad arguments. dans /home/mydomain/public_html/clair-obscur/drupal/modules/user.module at line 349.
and finally in the sql query itself:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () dans /home/lechatea/public_html/clair-obscur/drupal/includes/database.mysql.inc at line 120.

I have not looked very much into the code of the module yet since I'm still just modeling and things seem to be working. Maybe I should...

efolia

darius’s picture

I can remove and reattach a child with no error messages. And, I am sure this is not related to the original issue. If you still experience problems, and think it's a relativity problem, please file a new issue. Thanks,

Darius

darius’s picture

Bug fixed in the CVS HEAD version. Run update to fix the table.

darius’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)