create node failed when adding limit 0
Created by: @ljhhuxiaoba Source: https://github.com/RedisGraph/RedisGraph/issues/3030 I execute a query on my empty RedisGraph and get an error.
Redis version:6.2.10 RedisGraph version: v2.10.9 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.
Origin comment by: @LiorKogan
@ljhhuxiaoba thank you. LIMIT, including LIMIT 0, should indeed not stop side effects.
GRAPH.QUERY q "UNWIND range(1,16384) as x CREATE (a:A {v:x}) RETURN count(a) LIMIT 1"
1) 1) "count(a)"
2) 1) 1) (integer) 16384
3) 1) "Labels added: 1"
2) "Nodes created: 16384"
3) "Properties set: 16384"
4) "Cached execution: 0"
5) "Query internal execution time: 22.795800 milliseconds"
GRAPH.QUERY q "UNWIND range(1,16384) as x CREATE (a:A {v:x}) RETURN count(a) LIMIT 0"
1) 1) "count(a)"
2) (empty array)
Origin comment by: @ljhhuxiaoba The same error also occurs in query "CREATE () WITH 0 AS n1 LIMIT 0 return 1".No node is created!
@gkorland i can you assign this to me