The SQLContentEntityStorage makes an equal assertment as an expression.
This does not work on all database engines. The database agnostic implementation is to use "CASE WHEN THEN ELSE END" construction.
$query->addExpression('base.' . $this->revisionKey . ' = revision.' . $this->revisionKey, 'isDefaultRevision');
This prevents any revisionable entity from being loaded, resulting in a PDO exception for database engines not supporting inline equal expressions.
Should be replaced with:
$query->addExpression('CASE base.' . $this->revisionKey . ' WHEN revision.' . $this->revisionKey . ' THEN 1 ELSE 0 END', 'isDefaultRevision');
Comments
Comment #1
david_garcia commentedI was not sure about the component system to assign this issue to... here goes the patch.
Comment #3
david_garcia commentedComment #4
david_garcia commentedComment #6
jhedstromTests are still passing, patch applies. I've searched through core, and this appears to be the only instance where an inline equal expression is used.
Comment #7
alexpottThis issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 9f03518 and pushed to 8.0.x. Thanks!