"permissions" field in {signup} table is dead code

radicand - May 20, 2006 - 18:29
Project:Signup
Version:4.7.x-1.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:dww
Status:closed
Description

Hi-
I'm running a site that's using MySQL 5.0, and in my own projects I've had to deal with the below error about default types, so I'm pretty sure it's a MySQL 5-related bug. After attempting to create an event, I get the below error:

user warning: Field 'permissions' doesn't have a default value query: INSERT INTO signup (nid, forwarding_email, send_confirmation, confirmation_email, send_reminder, reminder_days_before, reminder_email) VALUES (14, 'email@address.com', 1, 'Thanks for signing up!', 1, 1, 'Event reminder!') in /var/www/xxxxxxx/drupal/includes/database.mysql.inc on line 120.

It seems that you need to set a value for the `permissions` field when inserting into the table- MySQL 5 won't allow it to be blank by default.

#1

dww - June 6, 2006 - 10:54
Assigned to:Anonymous» dww

weird, it appears that the signup module is never using this field at all. i've got a 4.6 site that's been making heavy use of signup, and the permissions field is always empty in my DB. grepping through the code, it seems like we never use it at all. i'll ask the previous maintainer, hunmonk, if he's got any wisdom on this, but i think the best bet is to just remove it entirely from the DB schema.

#2

dww - June 6, 2006 - 21:47
Title:MySQL 5.0 Default Value Error» "permissions" field in {signup} table is dead code
Status:active» reviewed & tested by the community

i confirmed this field is in fact dead code. attached patch removes it from the signup schema (in 4.7 and HEAD -- i'll backport it to signup.mysql in 4.6).

AttachmentSize
signup_drop_permissions.patch 3.01 KB

#3

dww - June 6, 2006 - 22:03
Status:reviewed & tested by the community» fixed

committed to 4.7 and HEAD, backported to signup.mysql in 4.6.

#4

hunmonk - June 14, 2006 - 02:22

found another piece of code related to this. removed it and committed changes to all versions.

#5

Anonymous - June 28, 2006 - 02:32
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.