When adding taxonomy terms to nodes with a publish date before 1970 mysql throws an error. The taxonomy_index.created field attributes differ from those of node.created. Node.created supports unsigned integers where as taxonomy.index does not. I can not think of a valid reason for this discrepancy. Attached is a patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 985292-patch-4-and-tests.patch | 2.92 KB | bfroehle |
| #4 | taxonomy_index.patch | 1.6 KB | ngmaloney |
| #3 | 985292_3_test_only.patch | 1.56 KB | scor |
| #2 | taxonomy_index.patch | 1.61 KB | ngmaloney |
| taxonomy_index.patch | 1.13 KB | ngmaloney |
Comments
Comment #1
scor commentedyou'll need an update function as well.
Comment #2
ngmaloney commentedAttached is patch containing update function as well.
Comment #3
scor commentedbumping to major. attaching a test to reproduce this bug programmatically (not that it should be committed, I'm not sure where this test should live, really).
There is a minor doxygen issue.
should be
Comment #4
ngmaloney commentedAttached is patch resolving doxygen issue.
Comment #5
scor commentedlooks good now. reproduced bug, applied patch and ran update.php and the bug was solved. I'd like another set of eyes looking at this before RTBC.
Comment #6
vgarvardt commentedConfirm PDOException: SQLSTATE[22003] when saving node with the year before 1970.
Applied patch from #4, run update.php and tried to create node with publish date before 1970 again - works fine now.
Comment #7
jbrown commentedThe test needs to be in the patch.
Comment #8
bfroehle commentedHere is the patch in #4 together with the unit test in #3.
Comment #9
bfroehle commentedCNR to trigger the bot.
Comment #10
bojanz commentedLooks like we're good to go.
Comment #11
webchickThanks for the bug fix, and the test. I added a line of doxygen to that testX function and Committed to HEAD.
This looks like it could use a D6 backport too, no?
Comment #12
scor commentedThe taxonomy_index table was added in Drupal 7.