memgraph icon indicating copy to clipboard operation
memgraph copied to clipboard

create node failed when adding limit 0

Open ljhhuxiaoba opened this issue 2 years ago • 2 comments

I executed a query on my empty memgraph database and get an error.

memgraph version:2.7.0 operating system: windows 10 API:Cypher version 9 query:UNWIND [0] AS a OPTIONAL MATCH (n) MERGE (x) RETURN 1 ORDER BY n LIMIT 0 result: no node created

But if I remove the "LIMIT 0",then a new node will be created.

Steps to reproduce: UNWIND [0] AS a OPTIONAL MATCH (n) MERGE (x) RETURN 1 ORDER BY n LIMIT 0;

Expected behavior: A node is created.

Actual behavior: No node is created.

ljhhuxiaoba avatar Apr 13 '23 11:04 ljhhuxiaoba

The same error also occurs in query "CREATE () WITH 0 AS n1 LIMIT 0 return 1".No node is created!

ljhhuxiaoba avatar Apr 19 '23 13:04 ljhhuxiaoba

@gitbuda I tried this out, and the behavior is how @ljhhuxiaoba described it. Not sure if this is expected behavior on Memgraph side.

katarinasupe avatar Apr 21 '23 11:04 katarinasupe