When trying to install the Node Access module, I get the following error:

    * user warning: BLOB/TEXT column 'permissions' can't have a default value query: CREATE TABLE user_relationship_node_access ( `nid` int(10) unsigned NOT NULL default 0, `permissions` text NOT NULL default '', PRIMARY KEY (nid) ) /*!40100 DEFAULT CHARACTER SET utf8*/ in C:\Web\site\drupal\includes\database.mysql.inc on line 172.
    * The installation of the User Relationship Private Nodes module as unsuccessful.
    * user warning: Table 'drupal.user_relationship_node_access' doesn't exist query: SELECT permissions FROM user_relationship_node_access WHERE nid = 1 in C:\Web\site\drupal\includes\database.mysql.inc on line 172.
    * user warning: Table 'drupal.user_relationship_node_access' doesn't exist query: SELECT permissions FROM user_relationship_node_access WHERE nid = 2 in C:\Web\site\drupal\includes\database.mysql.inc on line 172.
    * user warning: Table 'drupal.user_relationship_node_access' doesn't exist query: SELECT permissions FROM user_relationship_node_access WHERE nid = 3 in C:\Web\site\drupal\includes\database.mysql.inc on line 172.
    * user warning: Table 'drupal.user_relationship_node_access' doesn't exist query: SELECT permissions FROM user_relationship_node_access WHERE nid = 4 in C:\Web\site\drupal\includes\database.mysql.inc on line 172.
    * user warning: Table 'drupal.user_relationship_node_access' doesn't exist query: SELECT permissions FROM user_relationship_node_access WHERE nid = 5 in C:\Web\site\drupal\includes\database.mysql.inc on line 172.
    * user warning: Table 'drupal.user_relationship_node_access' doesn't exist query: SELECT permissions FROM user_relationship_node_access WHERE nid = 6 in C:\Web\site\drupal\includes\database.mysql.inc on line 172.
    * user warning: Table 'drupal.user_relationship_node_access' doesn't exist query: SELECT permissions FROM user_relationship_node_access WHERE nid = 7 in C:\Web\site\drupal\includes\database.mysql.inc on line 172.
    * user warning: Table 'drupal.user_relationship_node_access' doesn't exist query: SELECT permissions FROM user_relationship_node_access WHERE nid = 16 in C:\Web\site\drupal\includes\database.mysql.inc on line 172.
    * user warning: Table 'drupal.user_relationship_node_access' doesn't exist query: SELECT permissions FROM user_relationship_node_access WHERE nid = 19 in C:\Web\site\drupal\includes\database.mysql.inc on line 172.
    * user warning: Table 'drupal.user_relationship_node_access' doesn't exist query: SELECT permissions FROM user_relationship_node_access WHERE nid = 20 in C:\Web\site\drupal\includes\database.mysql.inc on line 172.

This page http://drupal.org/node/115869 indicates that a TEXT column cannot have a default value on MySQL under Windows. I removed default '' for the permissions column and the module installed properly. Not sure how this affects Linux installations or actual module logic.

Comments

Roman S’s picture

Furthermore, uninstalling the node access module leaves the node_access table in an inconsistent state. I had to click Administer -> Content management -> Post settings -> Rebuild permissions to fix it. Otherwise new nodes were not accessible by users (other than UID 0).

jaydub’s picture

Version: 6.x-1.x-dev » 5.x-2.x-dev
StatusFileSize
new973 bytes
new1.1 KB

Yes it's true regardless of Win/Linux/other with MySQL you should not set DEFAULT values for TEXT columns. See these pages on d.o.:

Settings to 6.x as it appears in that branch as well.

http://drupal.org/node/190504
http://drupal.org/node/159330
http://drupal.org/node/159333
http://drupal.org/node/146939

jaydub’s picture

Version: 5.x-2.8 » 6.x-1.x-dev
Status: Active » Needs review
jaydub’s picture

Version: 5.x-2.x-dev » 6.x-1.x-dev
Status: Needs review » Fixed

Fixed in CVS

Status: Fixed » Closed (fixed)

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