Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
database system
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
20 Nov 2007 at 21:25 UTC
Updated:
2 May 2010 at 00:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
moshe weitzman commentedwhat if one alters schema to add a field to node table (for example). most of the queries will not specify that field and use the schema default which is desired behaviors. we would be logging many useless messages. so there is a tradeoff here.
Comment #2
yched commentedIf I read the patch correctly, logging occurs when no column default is found in the schema.
Comment #3
moshe weitzman commentedoh, you are right. so this is rtbc. we usually do the else clause on a new line and combine into elseif but thats minor. hopefully gabor can fix that if noone else gets to it.
Comment #4
gábor hojtsyHm, Drupal does not use trigger_error(), but watchdog and its constants instead. (Additionally to the coding style error noted by Moshe)
Comment #5
panchoThis is more a bug than a new feature, therefore I keep it in the D6 queue. Needs to be rerolled according to #3 and #4.
Comment #6
panchoNow this needs to go to D7.
Comment #7
brianV commentedHere's the patch rolled for D7.
Comment #8
mcarbone commentedTested this on HEAD and it works well. One minor question: it's currently using WATCHDOG_ERROR as the severity. Should it instead be WATCHDOG_WARNING (since, for instance, MySQL -- at least 5.1 -- will still insert the row with a NULL value)?
Re-rolled to fix the minor coding style issue.
Comment #9
MichaelCole commented#8: 193960-log-missing-field.patch queued for re-testing.