Process edges: look up target node, filter by label/props, add binding. * `inbound` controls which end of the edge is the target id. */ #1196 (second mechanism): a hop's output buffer must hold EVERY matched * row. max_rows is an OUTPUT-row limit — projection already enforces it — and * WHERE/aggregation run after expansion, so any cap here silently falsifies * results: field-measured, count()
| 3111 | * only allocation failure stops materialisation (the #601 deadline still |
| 3112 | * bounds time), and match_count stays truthful either way (#627 contract). */ |
| 3113 | static bool binding_out_append(binding_t **rows, int *count, int *cap, binding_t *nb) { |
| 3114 | if (*count == *cap) { |
| 3115 | int next = *cap > 0 ? *cap * CYP_GROWTH_2 : CYP_GROWTH_10; |
| 3116 | binding_t *grown = realloc(*rows, (size_t)next * sizeof(binding_t)); |
| 3117 | if (!grown) { |
| 3118 | binding_free(nb); |
| 3119 | return false; |
| 3120 | } |
| 3121 | *rows = grown; |
| 3122 | *cap = next; |
| 3123 | } |
| 3124 | (*rows)[(*count)++] = *nb; |
| 3125 | return true; |
| 3126 | } |
| 3127 | |
| 3128 | static void process_edges(cbm_store_t *store, cbm_edge_t *edges, int edge_count, bool inbound, |
| 3129 | const cbm_node_pattern_t *target_node, binding_t *b, const char *to_var, |
no test coverage detected