Closed (fixed)
Project:
Drupal core
Version:
6.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
20 Oct 2008 at 04:45 UTC
Updated:
2 Jan 2014 at 23:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
halcyonCorsair commentedSet status to patch -> code needs review.
Comment #2
damien tournoud commentedThis will need to be fixed in HEAD first (D7-dev), then backported. Also promoted to the PostgreSQL surge (see #337146: Remove PostgreSQL driver from core for more context).
Comment #4
damien tournoud commentedIn Drupal 7, we still have those:
./modules/system/system.install: db_query('UPDATE {term_node} t SET vid = (SELECT vid FROM {node} n WHERE t.nid = n.nid)');
./modules/system/system.install: $ret[] = update_sql("UPDATE {poll_votes} v SET chid = (SELECT chid FROM {poll_choices} c WHERE v.chorder = c.chorder AND v.nid = c.nid)");
./modules/taxonomy/taxonomy.admin.inc: db_query('UPDATE {term_data} t SET weight = 0 WHERE vid = :vid', array(':vid' => $form_state['values']['vid']));
Let's fix them and move that issue quickly to D6.
Comment #5
jhedstromPatch attached that removes the aliases in the 3 queries mentioned in #4.
Not all tests pass (due to other issues), but the number of fails doesn't change pre/post patch...we'll see how the testbot likes this.
Comment #6
CalebD commentedLooks like there is an extra curly brace in the query: {poll_choices}}.chorder
+ $ret[] = update_sql("UPDATE {poll_votes} SET chid = (SELECT chid FROM {poll_choices} WHERE {poll_vodes}.chorder = {poll_choices}}.chorder AND {poll_votes}.nid = {poll_choices}.nid)");Comment #7
jhedstromExtra curly brace removed. Thanks.
Comment #8
damien tournoud commentedI'm pretty sure we can keep the alias on {node}.
{poll_vodes}? Also please keep the alias on {poll_choices}.
Comment #9
damien tournoud commentedComment #10
jhedstromvodes...oops.
Fixes attached.
Comment #11
damien tournoud commentedPerfect. Many thanks Jonathan.
Comment #12
dries commentedCommitted to CVS HEAD. Thanks.
Comment #13
dave reidMoving to 6.x to be ported.
Comment #14
c960657 commentedIt looks like the patch in #348448: Always report E_STRICT errors was accidentially committed together with the fix for this issue:
http://drupal.org/cvs?commit=159769
The patch in #348448 still applies using
patch -R.Comment #15
damien tournoud commentedWe are now working on D6. There are potentially more queries to convert, it's not a simple backport.
Comment #16
damien tournoud commentedIn fact, I only see two of them:
./modules/system/system.install: db_query('UPDATE {term_node} t SET vid = (SELECT vid FROM {node} n WHERE t.nid = n.nid)');
./modules/taxonomy/taxonomy.admin.inc: db_query('UPDATE {term_data} t SET weight = 0 WHERE vid = %d', $form_state['values']['vid']);
Comment #17
damien tournoud commentedComment #18
andypostonly one place
Comment #19
c960657 commentedI couldn't find more than that single occurrence either.
Comment #20
gábor hojtsyLooks good, thanks, committed.