A read tool's statements share one read batch instead of taking the file * lock once per statement. The batch reads one snapshot until it renews * (every 100 ms, forced here through the seam), then sees later commits. */
| 349 | * lock once per statement. The batch reads one snapshot until it renews |
| 350 | * (every 100 ms, forced here through the seam), then sees later commits. */ |
| 351 | static char *read_batch_name(cbm_store_t *s) { |
| 352 | cbm_node_t found = {0}; |
| 353 | if (cbm_store_find_node_by_qn(s, "p", "p.a", &found) != CBM_STORE_OK) { |
| 354 | return NULL; |
| 355 | } |
| 356 | char *name = found.name ? strdup(found.name) : NULL; |
| 357 | cbm_node_free_fields(&found); |
| 358 | return name; |
| 359 | } |
| 360 | |
| 361 | static bool read_batch_rename(cbm_store_t *writer, const char *name) { |
| 362 | cbm_node_t node = { |
no test coverage detected