Revert the fixes to backup in [
1f940357f7] and [
e5db80350c] and instead fix the problem reported by forum post [forum:
15d82885e2 |
15d82885e2] (that a call to sqlite3_deserialize() after sqlite3_backup_init() but before the first call to sqlite3_backup_step() on the destination db of a backup could cause a crash) by deferring caching the pointer to the destination Btree until after it is locked. This addresses bug [bugs:/info/2026-06-24T08:41:13Z | 2026-06-24T08:41:13Z].
FossilOrigin-Name:
44a0f396daa13f382fd839cd8be49148aa24114968b97fed7f365307d1f8280a