mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-27 20:41:58 +03:00
Fix a segfault that could occur if a non-empty in-memory database was the destination of a backup operation from a database with a smaller page size.
FossilOrigin-Name: 020968f857d7b90bab3525fc9d6b859a019f6a80422c3d5ffb88f5bdb8e02a11
This commit is contained in:
@ -977,5 +977,28 @@ do_test backup-11.1 {
|
||||
sqlite3_backup B db1 main db2 temp
|
||||
B finish
|
||||
} {SQLITE_OK}
|
||||
db1 close
|
||||
db2 close
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
do_test backup-12.1 {
|
||||
sqlite3 db1 :memory:
|
||||
sqlite3 db2 :memory:
|
||||
db1 eval {
|
||||
PRAGMA page_size = 8192;
|
||||
CREATE TABLE t1(x);
|
||||
}
|
||||
db2 eval {
|
||||
PRAGMA page_size = 1024;
|
||||
CREATE TABLE t2(x);
|
||||
}
|
||||
|
||||
sqlite3_backup B db1 main db2 temp
|
||||
B step 100
|
||||
B finish
|
||||
} {SQLITE_READONLY}
|
||||
|
||||
|
||||
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user