Bug in bigger cypher using or false

Using Neo4j Enterprise 4.4.2, I get wrong results from a cypher query using a simple WHERE condition in a bigger query. The same condition works in a small cypher. Here is the small cypher that correctly outputs a message count of 4:

The bigger production cypher results in the same application and position on line 85 and follows the same condition as above, but results in a wrong message count of 0

I marked the "or false" part as when removing this, which logically should have no effect, the cypher outputs the correct message count of 4. (just to explain, this "or false" results from a more complex application logic)

For more details, here the relevant part of the profile of the first small working cypher:

And the NOT working bigger cypher inlcuding "or false"

And the working bigger cypher without "or false"

Do I miss something or is this a bug in the cypher processing?

Best,
Reiner

Found a workaround using pattern comprehension but the issue should be investigated anyways.

@Reiner

4.4.2 is fairly old and given Neo4j 4.4.2 - Graph Database & Analytics indicates released on 16 December 2021.

Any chance to upgrade to a more recent release, ie. 4.4.34 Neo4j 4.4.34 - Graph Database & Analytics

Yes - we will try this. Even more we would like to upgrade to 5.1x but as using COLLECT in mappings is deprecated in 5.x, we have to rewrite and test about 140 mostly complex cyphers in our application before :-(

@Reiner

even if the problem persists in 4.4.34, if a fix is to be had it would be applied to 4.4.34+ and not 4.4.2+

We just upgraded, in 4.4.34 the problem doesn't exist anymore. Thanks!

1 Like