[drupal-devel] [bug] UI allows longer role name than database
Cvbge
drupal-devel at drupal.org
Tue Aug 16 17:03:13 UTC 2005
Issue status update for
http://drupal.org/node/18616
Post a follow up:
http://drupal.org/project/comments/add/18616
Project: Drupal
Version: 4.6.3
Component: database system
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: plj
Updated by: Cvbge
Status: patch (code needs work)
Attachment: http://drupal.org/files/issues/role.name_64.diff (2.61 KB)
I have not tested mysql's update, but I think it should work.
Cvbge
Previous comments:
------------------------------------------------------------------------
Wed, 09 Mar 2005 13:38:12 +0000 : plj
The Postgresql database script shipped with Drupal 4.5.2 has a 32
characters long varchar value for role name. The relevant UI form
field, however, has attribute maxlength="64". This naturally causes an
SQL error, if too long name is entered.
The SQL part is still same in CVS version, but I don't know if the UI
part has been fixed.
Related SQL:
CREATE TABLE role (
rid SERIAL,
name varchar(32) NOT NULL default '',
PRIMARY KEY (rid),
UNIQUE (name)
);
------------------------------------------------------------------------
Tue, 28 Jun 2005 16:51:15 +0000 : plj
Changing version to 4.6.1, and component to database system (perhaps
more relevant than user system), as the problem still exists. It also
seems that the length of the field in question is only 32 in both
database.mysql and database.pgsql, even though the UI allows 64.
Either UI or the database scripts should be fixed.
------------------------------------------------------------------------
Tue, 28 Jun 2005 17:06:18 +0000 : plj
Attachment: http://drupal.org/files/issues/database_1.patch (660 bytes)
On a second thought, here is a patch against both DBs. Both are
untested, but the change is tiny.
------------------------------------------------------------------------
Sat, 06 Aug 2005 20:36:10 +0000 : Cvbge
There should be also a patch for database/updates.inc
------------------------------------------------------------------------
Mon, 15 Aug 2005 11:20:09 +0000 : plj
I've no idea how the update.inc's update numbering works. But it should
excecute a statement like this:
alter table role alter column name type varchar(64)
More information about the drupal-devel
mailing list