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.
On fresh install session table is empty and session.inc tries to insert a row. But it ommits uid field which is NOT NULL and inserting fails. Attached patch makes it to have the same behaviour as 4.6
Comment | File | Size | Author |
---|---|---|---|
#2 | session-uid.inc.diff | 955 bytes | Cvbge |
session-uid.inc | 955 bytes | Cvbge |
Comments
Comment #1
Dries CreditAttribution: Dries commentedPatch doesn't apply because it ends with '.inc'. Maybe better to use
uid int(11) NOT NULL default '0'
in the table definition?Comment #2
Cvbge CreditAttribution: Cvbge commentedI can't change schema definition because that'd mean that db update is needed when upgrading from 4.5.5 to 4.5.6.
As I said (although not directly) 4.6 and later does not have this bug.
Heh, at first I didn't understand what's with the .inc extension...
Comment #3
chx CreditAttribution: chx commentedYou can change schema IMO. It has happened already, we extended locale field size in a minor release. Just nothing major. If you need a rule of thumb: column attribute changes are OK but nothing else.
Comment #4
Cvbge CreditAttribution: Cvbge commentedI believe the SQL query change is better in this case, because it fixes the problem, does not need schema change and makes 4.5 version the same as 4.6.
Comment #5
Cvbge CreditAttribution: Cvbge commentedA person proposed almost identical patch in http://drupal.org/node/30268
Comment #6
Dries CreditAttribution: Dries commentedCommitted to DRUPAL-4-5. Thanks.
Comment #7
(not verified) CreditAttribution: commentedComment #8
(not verified) CreditAttribution: commented