Skip to content

Crash on graph deletion after copying properties in ON MATCH/ON CREATE #2262

@jeffreylovitz

Description

@jeffreylovitz

These scenarios crash when flushing the database after execution:

Merge6.feature

  Scenario: [6] Copying properties from node with ON CREATE
    Given an empty graph
    And having executed:
      """
      CREATE (:A {name: 'A'}), (:B {name: 'B'})
      """
    When executing query:
      """
      MATCH (a {name: 'A'}), (b {name: 'B'})
      MERGE (a)-[r:TYPE]->(b)
        ON CREATE SET r = a
      """
    Then the result should be empty
    And the side effects should be:
      | +relationships | 1 |
      | +properties    | 1 |
    When executing control query:
      """
      MATCH ()-[r:TYPE]->()
      RETURN [key IN keys(r) | key + '->' + r[key]] AS keyValue
      """
    Then the result should be, in any order:
      | keyValue    |
      | ['name->A'] |

Merge7.feature

  Scenario: [4] Copying properties from node with ON MATCH
    Given an empty graph
    And having executed:
      """
      CREATE (:A {name: 'A'}), (:B {name: 'B'})
      """
    And having executed:
      """
      MATCH (a:A), (b:B)
      CREATE (a)-[:TYPE {name: 'bar'}]->(b)
      """
    When executing query:
      """
      MATCH (a {name: 'A'}), (b {name: 'B'})
      MERGE (a)-[r:TYPE]->(b)
        ON MATCH SET r = a
      """
    Then the result should be empty
    And the side effects should be:
      | +properties | 1 |
      | -properties | 1 |
    When executing control query:
      """
      MATCH ()-[r:TYPE]->()
      RETURN [key IN keys(r) | key + '->' + r[key]] AS keyValue
      """
    Then the result should be, in any order:
      | keyValue    |
      | ['name->A'] |

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions