Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
16 Dec 2006 at 13:43 UTC
Updated:
9 Sep 2007 at 13:32 UTC
Jump to comment: Most recent file
What's the reason for the variable name being limited to 48?
The captcha.module used the role-name and module name to create variables for enabling captcha or or not
with pretty long module func name (30 chars) I just broke the limit for the role "anonymous_user"
I just modified the DB to 90 chars - any implications of that?
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | system-update-6002-variable-length-103634-20.patch | 1.07 KB | bjaspan |
| #10 | variable_max128_3.patch | 1.6 KB | ChrisKennedy |
| #9 | variable_max128_2.patch | 1.61 KB | ChrisKennedy |
| #8 | variable_max128_1.patch | 1.73 KB | ChrisKennedy |
| #7 | variable_max128_0.patch | 1.56 KB | ChrisKennedy |
Comments
Comment #1
gerhard killesreiter commentedthere is no problem in increasing this limit manually. I agree it is somwhat arbitrary. Maybe it is not too late to change this in D5? If too late, please move to D6.
This is not critical
Comment #2
ChrisKennedy commentedThis patch increases the column size from 48 characters to 128.
Comment #3
Christoph C. Cemper commentedhmmm
- I see the changes in the patch file
- I got the site running for 1+ week with changes
but when I do a
patch -p0 < variable_max128.patch
then I get a
patching file `modules/system/system.install'
Assertion failed: hunk, file patch.c, line 321
obviously the patch file is broken or my patch.exe is the wrong one
Comment #4
ChrisKennedy commentedI re-tested the patch against HEAD and it works fine, so I think either your patch program is the issue or you're not applying the patch in the core directory. Perhaps someone else can verify that the patch applies cleanly.
Also just for future reference, no need to change the version setting for this issue - 5.x-dev is fine (and arguably preferable).
Comment #5
drummComment #6
joshk commentedminor tweak to make it system_update_1022, but works as advertised and it good. Watch out for update numbers if more get in first!
Comment #7
ChrisKennedy commentedRe-rolled from the root directory.
Comment #8
ChrisKennedy commentedHere's a version that creates system_update_2000() instead.
Comment #9
ChrisKennedy commentedRe-rolled.
Comment #10
ChrisKennedy commentedOops, there was an extra space.
Comment #11
Crell commentedJust a note that this does cause issues for contrib modules, so the sooner it's fixed the better. If it's a bug (and I believe it is), could this be backported to 5.x?
Comment #12
RobRoy commentedLooks good to me. +1
Comment #13
webchickFor 6.x changes, the update needs to start with 300x
Comment #14
ChrisKennedy commentedNope, see for example http://drupal.org/node/115667
Comment #15
webchickOops! My mistake! I read that as "updates from 5.x.x to 6.x.x"
Comment #16
dries commentedCommitted to CVS HEAD. Thanks.
Comment #17
Crell commenteddrumm, do you think we can convince you this is worth backporting? The current field length breaks some modules (see the link in my last comment), it's not an API change, and a longer field shouldn't be able to break any existing code.
Comment #18
webchickI lean against database upgrades during a stable release for anything but soul-crushing bugs, personally. But it's Neil's call. :)
Comment #19
dwwgiven it requires a schema change, i'm guessing the answer will be 'no', but i'll leave that for drumm or dries to say. ;)
meanwhile, i just finished going through all the CVS activity in the HEAD of core while i was gone, and documenting everything that seemed developer-visible for the upgrade docs. this issue was one of them, so i added a (very short) blurb here:
http://drupal.org/node/114774#variable-name-size
so, once someone sets this back to 6.x/fixed, they can rest assured that it's already been added to the upgrade docs. ;)
cheers,
-derek
Comment #20
bjaspan commentedThis patch as committed removes the primary key from the variable table on pgsql because db_change_column() drops it and the patch does not explicitly re-add it (the problem was revealed by schema.module's comparison report). This means that every call to variable_set() has to do a full table search, an unacceptable performance penalty.
I've attached a new patch that fixes the problem. It rewrites the update to use the schema api though doing so is not necessary. It would be equally valid to add
db_add_primary_key($ret, 'variable', array('name'));to the pgsql block after the call to db_change_column().I have tested this patch, but it is currently impossible to test it without hacking cache.inc to disable all caching because of upgrade problems involving the 'serialized' column. So applying this patch should probably wait until it can be tested against a non-hacked HEAD.
Comment #21
drummLooks like the last patch was still on 6.x. Please get that figured out before thinking about 5.x.
Comment #22
ChrisKennedy commentedFixed by http://drupal.org/node/157682
Comment #23
(not verified) commented