Closed (fixed)
Project:
Printer, email and PDF versions
Version:
6.x-1.11
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2010 at 00:13 UTC
Updated:
27 Oct 2011 at 18:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
josh waihi commentedthere were a few bugs in my last patch. here it is again tested and working.
Comment #2
jcnventuraHi,
The logic is wrong. Instead of GREATEST (OR), GREATEST (OR), GREATEST (OR) it should be AND, IMP, AND. IMP stands for material implication which can be implemented as OR(NOT(x), y).
Also, doesn't this spew out lots of errors for the failed insert? Which is wrong also, as it should be nid, $print_display, $print_display_comment, $print_display_urllist and not nid, 0, 0, 1.
Finally, there's already some code in 6.x-1.12 to try to reduce this. I would love to have code that's more performant AND PostgreSQL compatible, but it must start by being correct.
Thanks for providing a patch!
João Ventura
Comment #3
sammys commentedWhile we're waiting for the performance enhancement I'd like to have a fix committed for PostgreSQL to update without error since that's more critical than performance. Here is a patch to do just that.
I would expect this issue to be reset to needs work after that commit. :)
Comment #4
jcnventurasammys: that fix was committed more than a month ago (#881870: last update_n doesn't work in postgres)
Comment #5
dalinupdate 6007 barfs on any site with a moderate number of nodes due to an out-of-memory error. I think we need to use batch API to get this to complete reliably. Some code comments would be great - I can't even figure out what the code is trying to do.
Comment #6
dalinEven when I hard-code
ini_set('memory_limit', '256M');
at the beginning of the update, another memory error when update.php tries to output the results due to the massive number of queries run. I had to switch to db_query instead of udpate_sql().
Comment #7
jcnventuraI am so sorry, everyone..
Looking at this again, I realized the operations are AND, OR, AND (not AND, IMP, AND) as I believed in #2.
That sequence of operations is very simple to implement in standard SQL that is valid in MySQL and PostgreSQL, and after some other fixes which dispense with the INSERT operation, the 6007 updates can become a lot simpler..
If anyone still cares, feel free to try the dev.
João