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:
18da5759590793c934184a6f1e28fe61a9714f305f1e9704061364325c0bbf9e