mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-15 11:41:13 +03:00
If no KEY is specified on ATTACH, copy the main schema key if the key size
is non-zero. In other words, allow for -1 as a valid key size in support of the --textkey to SEE. FossilOrigin-Name: 03573887dbf357f8aa54e4a1cd03b82b0ded8139
This commit is contained in:
@@ -192,7 +192,7 @@ static void attachFunc(
|
||||
case SQLITE_NULL:
|
||||
/* No key specified. Use the key from the main database */
|
||||
sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
|
||||
if( nKey>0 || sqlite3BtreeGetOptimalReserve(db->aDb[0].pBt)>0 ){
|
||||
if( nKey || sqlite3BtreeGetOptimalReserve(db->aDb[0].pBt)>0 ){
|
||||
rc = sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user