Having a column named "fields" is not a great idea. This is a reserved word in mysql:
http://dev.mysql.com/doc/mysqld-version-reference/en/mysqld-version-refe...
Causes db_write_record to fail under mysql 4.1 at a minimum. If you can't add to mollom_forms, the module doesn't work so well.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | mollom-HEAD.schema.10.patch | 12.49 KB | sun |
| #7 | mollom-DRUPAL-6--1.schema.7.patch | 12.31 KB | sun |
Comments
Comment #1
joshk commentedHere's the doc for 4.x
http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html
Trying to do a basic insert fails:
Comment #2
dries commentedFixing title: "should now use" -> "should not use".
Comment #3
sunDang. Need to think of a new name that works.
Comment #4
dave reidMaybe just use 'data' or 'field_data'. If we used data it could be a serialized array with array('fields' => $fields_array). That way it could be extendable in the future.
Comment #5
sunBumping to critical.
Comment #6
joshk commentedSorry for mistyping the initial title.
+1 for Dave Reid's suggestion of "field_data". Most tables that store serialized info call it "data".
Comment #7
sun'field_data' would technically not be correct. The column does not hold any data, but rather references to form element keys.
I therefore went with 'enabled_fields'.
Since a couple of sites are already running on 6.x-dev, the update path is a bit tricky, but we need to re-learn how to do proper HEAD-HEAD updates anyway. :)
Comment #8
dries commentedCommitted to DRUPAL-6--1. Moving to CVS HEAD.
Comment #9
sunComment #10
sunStraight port to HEAD.
Comment #11
sunJust found the corresponding bug report for core:
#353918: drupal_write_record writes empty string instead of empty serialized array
Powered by Dreditor.
Comment #12
dries commentedCommitted to CVS HEAD. Thanks.
Comment #13
sunLet's move this back to 6.12, so users are able to find it. (special forward-porting scenario)