Commit c600156
authored
fix(changes): actionable error when settings exist but *_cloudsync tables are missing (#55)
Querying cloudsync_changes (directly or via cloudsync_payload_blob_checked)
on a database whose cloudsync_table_settings rows survived while every
*_cloudsync meta table was lost — e.g. a dump/restore that skipped them —
returned SQLITE_NOMEM: the NULL from vtab_build_changes_sql fell through
the config-exists guard added in #54. SQLite Cloud reported it on the
/check path as "Not enough memory to execute query", pointing operators
at memory instead of the real state.
- xFilter now distinguishes this state (settings rows present, zero
%_cloudsync tables in sqlite_master) and raises "cloudsync settings
reference tables whose sync metadata is missing" with the re-init
remediation; genuine OOM still returns SQLITE_NOMEM
- unit test: Changes Vtab Missing Meta Tables (red before, green after)
- bump CLOUDSYNC_VERSION to 1.1.2 and add the CHANGELOG entry (SQLite
vtab only, no PG changes, extension version stays 1.1)1 parent 92a83cd commit c600156
4 files changed
Lines changed: 58 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
416 | 431 | | |
417 | 432 | | |
418 | 433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12976 | 12976 | | |
12977 | 12977 | | |
12978 | 12978 | | |
| 12979 | + | |
| 12980 | + | |
| 12981 | + | |
| 12982 | + | |
| 12983 | + | |
| 12984 | + | |
| 12985 | + | |
| 12986 | + | |
| 12987 | + | |
| 12988 | + | |
| 12989 | + | |
| 12990 | + | |
| 12991 | + | |
| 12992 | + | |
| 12993 | + | |
| 12994 | + | |
| 12995 | + | |
| 12996 | + | |
| 12997 | + | |
| 12998 | + | |
| 12999 | + | |
| 13000 | + | |
| 13001 | + | |
| 13002 | + | |
| 13003 | + | |
| 13004 | + | |
| 13005 | + | |
| 13006 | + | |
| 13007 | + | |
| 13008 | + | |
| 13009 | + | |
| 13010 | + | |
| 13011 | + | |
| 13012 | + | |
| 13013 | + | |
12979 | 13014 | | |
12980 | 13015 | | |
12981 | 13016 | | |
| |||
13429 | 13464 | | |
13430 | 13465 | | |
13431 | 13466 | | |
| 13467 | + | |
13432 | 13468 | | |
13433 | 13469 | | |
13434 | 13470 | | |
| |||
0 commit comments