The module doesn't work when the database used by Drupal is PostgreSql.

It's execution cause an error due to the use of ISNULL() function, that doesn't exist in PostgreSql.

Comments

mithenks created an issue. See original summary.

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

What's the PostgreSql equivalent?

mithenks’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new633 bytes

Patch that use "column IS NULL" instead of "ISNULL(column)".

solideogloria’s picture

Status: Needs review » Reviewed & tested by the community

The ISNULL function actually isn't supposed to be used to check if something is null and only do that. That function is used to replace a null value with another value. https://www.postgresqltutorial.com/postgresql-isnull/

SQL Server supports ISNULL function that replaces NULL with a specified replacement value:

ISNULL(expression, replacement)

If the expression is NULL, then the ISNULL function returns the replacement. Otherwise, it returns the result of the expression.

So whether you use PostgreSQL or not, it should be changed.

gold’s picture

Version: 7.x-1.0 » 8.x-1.x-dev
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new531 bytes

This is still present in the 8.x version of the module.

This should resolve the issue the 8.x branch.

solideogloria’s picture

Status: Needs review » Reviewed & tested by the community

Patch #3 is for D7, so this can be committed for both branches.

  • miiimooo committed 61b2bb7 on 8.x-1.x authored by Gold
    8.x-1.x: Issue #2840400 by mithenks, Gold, solideogloria: Module not...

  • miiimooo committed 19eeeae on 7.x-1.x authored by mithenks
    7.x-1.x: Issue #2840400 by mithenks, Gold, solideogloria: Module not...
miiimooo’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @mithenks, @solideogloria and @Gold!

joachim’s picture

> The ISNULL function actually isn't supposed to be used to check if something is null and only do that.

Not in MySql. https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#functi... says:

> If expr is NULL, ISNULL() returns 1, otherwise it returns 0.

Are we sure this patch doesn't break MySql?

solideogloria’s picture

Are we sure this patch doesn't break MySql?

Right above that line on the page you linked:

IS NULL		NULL value test
ISNULL()	Test whether the argument is NULL


It says right there that "IS NULL" works as a NULL value test.

I tested some basic queries here, and IS NULL works: https://www.jdoodle.com/online-mysql-terminal/

Status: Fixed » Closed (fixed)

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