Page MenuHomePhabricator

Increase size of ug_group in user_groups table
Closed, ResolvedPublic

Description

The current size of ug_group is 16. When synchronizing groups from external sources, this causes some issues.

Can the size be increased to 64? This is the maximum group name size in Active Directory, and it is unlikely that we'll run into groups with a name that long anywhere else (where the maximum is 256).


Version: unspecified
Severity: enhancement

Details

Reference
bz11057

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:48 PM
bzimport set Reference to bz11057.

ayg wrote:

Does VARCHAR(255) actually take up any more storage space than VARCHAR(16), given identical records? If not, we may as well make it 255 characters.

It shouldn't. Don't see any compelling reason not to increase it to 255.

christopher.m.ryan wrote:

Definitely causes Active Directory Authentication headaches. It should be a simply query fix in wikiTables.sql from char(16) to varchar(255) when creating the initial tables and an update script of

<code>alter table user_groups change ug_group ug_group varchar(255)</code>

Of course if there are any other databases to use then there would need to be some translation.

ayg wrote:

Domas, is this possible, or would it cause problems?

I made it upto 32 characters for 1.19

Why 32, rather than 255, or at least 64, which I originally asked for? 32 still doesn't address the stated problem.

(In reply to comment #6)

Why 32, rather than 255, or at least 64, which I originally asked for? 32 still
doesn't address the stated problem.

I didn't know there were any requests to make it larger still...

It is easily enough fixed though

phillip.hagerman wrote:

This is still 32 in 1.20.2 will it be addressed in the next release?

As it is now I have to remove the now-invalidated user group names and alter the table manually

ALTER TABLE ABCXYZ_user_groups CHANGE ug_group ug_group VARBINARY(255) NOT NULL DEFAULT ''

Let's make this 255 as a few people have suggested.

The gerrit change is already successfully merged