Commit e4fba70
Fix crash in PREPARE with property parameter when enable_containment is off
When age.enable_containment is set to off, executing a PREPARE statement
with a property parameter (e.g., MATCH (n $props) RETURN n) causes a
segfault. The crash occurs in transform_map_to_ind_recursive because
the property_constraints node is a cypher_param, not a cypher_map, but
is blindly cast to cypher_map and its keyvals field is dereferenced.
Three fixes:
- In create_property_constraints, when enable_containment is off and the
constraint is a cypher_param, fall back to the containment operator
(@>) since map decomposition requires known keys at parse time.
- In transform_match_entities, guard the keep_null assignment for both
vertex and edge property constraints with is_ag_node checks to avoid
writing to the wrong struct layout.
Fixes #1964
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 217467a commit e4fba70
3 files changed
Lines changed: 148 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3628 | 3628 | | |
3629 | 3629 | | |
3630 | 3630 | | |
3631 | | - | |
| 3631 | + | |
3632 | 3632 | | |
3633 | | - | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
| 3649 | + | |
| 3650 | + | |
| 3651 | + | |
| 3652 | + | |
| 3653 | + | |
| 3654 | + | |
| 3655 | + | |
| 3656 | + | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
| 3664 | + | |
| 3665 | + | |
| 3666 | + | |
| 3667 | + | |
| 3668 | + | |
| 3669 | + | |
| 3670 | + | |
| 3671 | + | |
| 3672 | + | |
| 3673 | + | |
| 3674 | + | |
| 3675 | + | |
| 3676 | + | |
| 3677 | + | |
| 3678 | + | |
| 3679 | + | |
| 3680 | + | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
3634 | 3692 | | |
3635 | 3693 | | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
3636 | 3708 | | |
3637 | 3709 | | |
3638 | 3710 | | |
| |||
3721 | 3793 | | |
3722 | 3794 | | |
3723 | 3795 | | |
| 3796 | + | |
| 3797 | + | |
| 3798 | + | |
| 3799 | + | |
| 3800 | + | |
| 3801 | + | |
| 3802 | + | |
| 3803 | + | |
| 3804 | + | |
| 3805 | + | |
| 3806 | + | |
| 3807 | + | |
3724 | 3808 | | |
3725 | 3809 | | |
3726 | 3810 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1491 | 1491 | | |
1492 | 1492 | | |
1493 | 1493 | | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
1494 | 1536 | | |
1495 | 1537 | | |
1496 | 1538 | | |
| |||
1501 | 1543 | | |
1502 | 1544 | | |
1503 | 1545 | | |
| 1546 | + | |
1504 | 1547 | | |
1505 | 1548 | | |
1506 | 1549 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4261 | 4261 | | |
4262 | 4262 | | |
4263 | 4263 | | |
| 4264 | + | |
| 4265 | + | |
| 4266 | + | |
| 4267 | + | |
| 4268 | + | |
| 4269 | + | |
| 4270 | + | |
| 4271 | + | |
| 4272 | + | |
| 4273 | + | |
| 4274 | + | |
4264 | 4275 | | |
4265 | 4276 | | |
4266 | 4277 | | |
| |||
4690 | 4701 | | |
4691 | 4702 | | |
4692 | 4703 | | |
4693 | | - | |
| 4704 | + | |
| 4705 | + | |
| 4706 | + | |
| 4707 | + | |
4694 | 4708 | | |
4695 | 4709 | | |
4696 | 4710 | | |
| |||
4819 | 4833 | | |
4820 | 4834 | | |
4821 | 4835 | | |
4822 | | - | |
| 4836 | + | |
| 4837 | + | |
| 4838 | + | |
| 4839 | + | |
4823 | 4840 | | |
4824 | 4841 | | |
4825 | 4842 | | |
| |||
0 commit comments