| 266 | } |
| 267 | |
| 268 | static void Schema_ActivateFullTextIdx |
| 269 | ( |
| 270 | Schema *s // schema to activate index on |
| 271 | ) { |
| 272 | Index active = ACTIVE_FULLTEXT_IDX(s); |
| 273 | Index pending = PENDING_FULLTEXT_IDX(s); |
| 274 | |
| 275 | // drop active if exists |
| 276 | if(active != NULL) { |
| 277 | Index_Free(active); |
| 278 | } |
| 279 | |
| 280 | // set pending index as active |
| 281 | ACTIVE_FULLTEXT_IDX(s) = pending; |
| 282 | |
| 283 | // clear pending index |
| 284 | PENDING_FULLTEXT_IDX(s) = NULL; |
| 285 | } |
| 286 | |
| 287 | Schema *Schema_New |
| 288 | ( |
no test coverage detected