The title is fairly self-explanatory. MergeQuery uses this, and I don't know why it doesn't generate some fails htere, but it doesn't. I have yet to write tests for this but here's the patch that *should* fix the issue, i wnat to see what testbot has to say.

Comments

dmitrig01’s picture

Title: Adding a condition to two queries fails » Adding a DatabaseCondition object to two queries fails

Status: Needs review » Needs work

The last submitted patch, databasecondition_multiple_queries.patch, failed testing.

Crell’s picture

Saving the placeholder object like that creates a circular reference, which results in a memory leak. That's a no-go.

If all we need to do is see if the placeholder object is different than the last time compile was called, you can get a non-reference object ID out of http://us2.php.net/spl_object_hash

dmitrig01’s picture

Status: Needs work » Needs review
StatusFileSize
new4.1 KB

how about this?

Status: Needs review » Needs work

The last submitted patch, databasecondition_multiple_queries.patch, failed testing.

dmitrig01’s picture

StatusFileSize
new2.08 KB
Crell’s picture

Let's use a different variable name to make it clear that it's just the hash ID, not the actual object. :-)

(Because I haven't given Dmitri enough grief about comments and variable names yet tonight...)

dmitrig01’s picture

Status: Needs work » Needs review
StatusFileSize
new1.46 KB

done

Status: Needs review » Needs work

The last submitted patch, databasecondition_multiple_queries.patch, failed testing.

Crell’s picture

All of the failing tests here involve subqueries, although I cannot for the life of me figure out why. I see no reason why it should be dying, since each sub-condition is compiled separately and has its own changed tracker. Dmitri, any ideas?

dmitrig01’s picture

hrm, will look into it

catch’s picture

Version: 7.x-dev » 8.x-dev
Priority: Major » Normal
Issue tags: +Needs backport to D7

There are no steps to reproduce the bug here, nor a use-case, so this is as best a normal bug report, if not a task.

jhodgdon’s picture

fix typo in tag

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

daffie’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

This is so old and there is no why to reproduce the bug. I am closing this as outdated.