In 3.31.1, attempting to access URI Parameters via the sqlite3_uri_* functions inside a VFS xFullPathname function returns junk. This was not an issue in 3.30.1 or 3.31.0.
The internals of those functions use the new databaseName() function, which attempts to find the database name from the path passed info sqlite3_open_v2(). According to the function documentation:
> This only works if the filename passed in was obtained from the Pager.
However, the xFullPathname function is called before the Pager has opened the file, the parameter passed to sqlite3_uri_* functions aren't prefixed by the 4 null bytes, thus the databaseName() call steps backward too far.
int test_full_path_name(sqlite3_vfs* vfs, const char* zName, int nOut, char* zOut)
auto test_param = sqlite3_uri_parameter(zName, "test_param");
Re: VFS xFullPathname cannot access URI parameters
On 2/26/20, Chris Warner <[hidden email]> wrote:
> In 3.31.1, attempting to access URI Parameters via the sqlite3_uri_*
> functions inside a VFS xFullPathname function returns junk. This was not an
> issue in 3.30.1 or 3.31.0.
SQLite does not promise that sqlite3_uri_parameter() will work for the
argument passed into xFullPathname. But it has done so historically,
and (apparently) some software has come to depend on that accidental
behavior. So I have implemented changes on trunk, and on branch-3.31
to make it work again.