Problem/Motivation
CacheTest as well as RelationshipRepresentativeNodeTest in both, user and taxonomy test group, fails currently with PostgreSQL as database backend. This is because of missing quotes for identifiers. The problem in detail is that conditionNamespace() uses UPPERCASE for namespaces and such we get identifiers like these:
taxonomy_term_data_node__taxonomy_term_field_dataINNER.tid
And this is a problem as long as these identifiers are not quoted, because PostgreSQL will lower case them (unless quoted) and so we will end with an exception.
Proposed resolution
Quote identifiers to ensure case sensitve identifiers.
Remaining tasks
Write patch.
User interface changes
None.
API changes
None.
Comments
Comment #1
daffie commentedThis patch fixes the CacheTest for me with PostgreSQL.
Comment #2
bzrudi71 commentedAwesome find daffie! Especially as this fixes the RelationshipRepresentativeNodeTest() in user and taxonomy! We had no solution for those so far and your patch fixed them as a side effect, nice :-) Hopefully this get's green for MySQL too so we can update the IS and get this in ASAP.
Comment #4
bzrudi71 commentedComment #6
mradcliffeWe should run the patch through SQLite tests as well, and might make sense to just glance at Mongo driver class overrides in Views to make sure we're not causing any headaches there. That's because we're doing specific quoting in a non-Sql class.
Comment #7
bzrudi71 commentedI did SQLite testing and all is okay. We have pass in CacheTest and no other new fails or exceptions. I think this patch just needs some commenting love and then is ready to go.
Comment #8
bzrudi71 commented@mradcliffe, I think we should move forward here? Anything left to do from your point of view?
Comment #9
mradcliffeI wasn't able to find anything in the mongodb driver that overrode this specifically so if there is a conflict in could be addressed later.
Comment #10
bzrudi71 commentedOkay, thanks mradcliffe for the mongodb check. New patch with just some comment additions attached, so I think we are ready to set RTBC now? This patch will also fix remaining exceptions in:
Comment #11
andypostwhy ' = ' is used here?
Comment #12
bzrudi71 commented@andypost: Because $string is always a condition like:
taxonomy_indexINNER.tid = taxonomy_term_field_data_node_field_dataINNER.tidComment #13
andypostChecked, yes!
Comment #14
alexpottThis issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed a7a5236 and pushed to 8.0.x. Thanks!