Problem/Motivation

2.0.1 introduced an incompatibility with postgres. #2767437: Allow sort handler to select the view that stored the order patch uses ISNULL, which is mysql only.
2.0.0 worked fine.

Proposed resolution

COALESCE() might be used instead of ISNULL.

Remaining tasks

Someone should test this in mysql.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

penyaskito created an issue. See original summary.

penyaskito’s picture

Might not be the ideal solution, but #3153830-33: DraggableViews not working after update to 2.0.0 was working for me. We might want to keep that in mind for working on this.

penyaskito’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new1.21 KB

Attached patch.

penyaskito’s picture

Title: 2.0.1 introduced an incompatibility with postgres » Use COALESCE instead of ISNULL for ensuring compatibility with postgres

Re-titled

Status: Needs review » Needs work

The last submitted patch, 3: 3254174-use-coalesce-instead-of-isnull-3.patch, failed testing. View results

penyaskito’s picture

#3254205: Tests need to define $defaultTheme https://www.drupal.org/node/3083055 shows that more tests aren't needed, the existing tests already fail with Postgres 12.1

istryker’s picture

I think we need to test this with microsoft sql as it handles coalesce weirdly

penyaskito’s picture

Per their docs, this patch should be ok: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/coalesce-tr...
Sadly we cannot test it on DrupalCI, and I don't have a MS SQL Server for testing it (nor the time or will).
And if I had to chose, I would go definitely with supporting a popular opensource dbms than a proprietary one.

  • podarok committed 17bd7b3 on 2.0.x authored by penyaskito
    Issue #3254174 by penyaskito, iStryker: Use COALESCE instead of ISNULL...
podarok’s picture

Status: Needs work » Fixed

Merged for testing unblocking reasons
Will be tagged in the next release once approved by someone else

podarok’s picture

Version: 2.0.1 » 2.0.2-rc1
mmbk’s picture

Thank you for this, just in time, for a new project of mine.

Working fine with Drupal 9.2.10 and postgres 14.1

podarok’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.