Put a finished table cell on the current leaf, flushing a full leaf first.
| 1151 | |
| 1152 | // Put a finished table cell on the current leaf, flushing a full leaf first. |
| 1153 | static bool pb_place_table_cell(PageBuilder *pb, const uint8_t *cell, int cell_len, |
| 1154 | int64_t prev_rowid) { |
| 1155 | if (!pb_cell_fits(pb, cell_len) && pb->cell_count > 0) { |
| 1156 | if (!pb_ensure_leaf_cap(pb)) { |
| 1157 | return false; |
| 1158 | } |
| 1159 | pb->leaves[pb->leaf_count].max_key = prev_rowid; |
| 1160 | pb->leaves[pb->leaf_count].sep_cell = NULL; |
| 1161 | pb->leaves[pb->leaf_count].sep_cell_len = 0; |
| 1162 | pb_flush_leaf(pb); |
| 1163 | } |
| 1164 | pb_add_cell(pb, cell, cell_len); |
| 1165 | return true; |
| 1166 | } |
| 1167 | |
| 1168 | // Add a table cell to the PageBuilder, flushing leaf pages as needed. |
| 1169 | // If the payload exceeds max_local, overflow pages are written and only the |
no test coverage detected