Steps I noticed in my project (a Win32 application using only SQLite.Interop.dll as a sqlite3.dll replacement with encryption):
1. Opened a database.
2. Attached another database.
3. Called sqlite3_rekey_v2() with zDbName = the name of the attached database.

Expected result: the attached database should be encrypted. If for whatever reason this cannot be accomplished this function should return an error code.

Actual result: the 'main' database is encrypted instead. No error.

When I checked the code I realized that both sqlite3_key_v2 and sqlite3_rekey_v2 ignore the zDbName parameter.

I consider this an important bug, because it is an API call that is doing something different than expected without returning an error.

Workaround: detach the database, encrypt it and attach it again.