Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The type column of the node table is VARCHAR(16).
CCK prepends 'content-' onto its content types, leaving only 8 chars for a descriptive "short name" of the content type. For example, "content-shoe-size" already exceeds the limit.
This patch changes the column width to 32 characters.
Comment | File | Size | Author |
---|---|---|---|
type32chars.diff | 2.48 KB | jvandyk | |
Comments
Comment #1
chx CreditAttribution: chx commentedI read the code and looks fine with me. jvandyk says the pgsql way is necessary unless we want to support only 8.0
Comment #2
Bèr Kessels CreditAttribution: Bèr Kessels commentedI am no SQL guru, but AFAIK this will greatly affect the memory usage of mysql. At least that is why i refraind from this solution and renamed node_aggregator to naggregator when that module bumbed into this 8 char limit.
Comment #3
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedBer: I'd really like to have some proof or even evidence for this claim...
I don't think it is a problem.
Comment #4
Bèr Kessels CreditAttribution: Bèr Kessels commentedI meant it as a question, because I am simply not sure.
http://dev.mysql.com/doc/mysql/en/data-size.html states that it really affects your speed and size when you use bigger fields. But I am simply not sure if this is completely true in this case. As sated: I am no sql guru. But i would like one to comment on this issue!
Comment #5
Steven CreditAttribution: Steven commentedTrue, but we use varchar() fields, not char() fields. Their length is their contents + 1 byte for size. In the node table, I think the actual body contents pretty much make the other columns irrelevant as far as actual used size goes.
Comment #6
Steven CreditAttribution: Steven commentedCommited to head.
Comment #7
(not verified) CreditAttribution: commentedComment #8
(not verified) CreditAttribution: commentedComment #9
(not verified) CreditAttribution: commentedComment #10
(not verified) CreditAttribution: commented