1
0
mirror of https://github.com/sqlite/sqlite.git synced 2026-01-06 08:01:16 +03:00

Fix a broken assert() in the recovery extension. [forum:/forumpost/82a88f5812|Forum post 82a88f5812].

FossilOrigin-Name: 8a1ad137606ce5bddbed62f89ff9a5cd922c6530db84c12b8b27c08df3c66bc6
This commit is contained in:
dan
2023-04-20 10:26:56 +00:00
parent 8cb4f0b1b2
commit 9549245509
4 changed files with 22 additions and 9 deletions

View File

@@ -316,5 +316,18 @@ do_execsql_test 16.9 {
COMMIT;
} {1 2 3 4}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 17.1 {
CREATE TABLE t(a, PRIMARY KEY(a, a COLLATE NOCASE)) WITHOUT ROWID;
INSERT INTO t VALUES('abc');
INSERT INTO t VALUES('def');
}
do_test 17.2 {
set R [sqlite3_recover_init db main test.db2]
$R run
list [catch { $R finish } msg] $msg
} {0 {}}
finish_test

View File

@@ -1106,7 +1106,7 @@ static void recoverAddTable(
int iField = sqlite3_column_int(pStmt, 0);
int iCol = sqlite3_column_int(pStmt, 1);
assert( iField<pNew->nCol && iCol<pNew->nCol );
assert( iCol<pNew->nCol );
pNew->aCol[iCol].iField = iField;
pNew->bIntkey = 0;