SQLite Forum

sqlite3_db_filename after sqlite3_deserialize returns "x"
Login
I have two different SQLite databases. I open both of them and can query for some data on both databases to verify they are indeed **different**. I call `sqlite3_db_filename` on each of them and I get back the fully qualified file name in both cases; the returned values are two different pointers with two different strings, as expected. All good.

I then call `sqlite3_serialize` on the first database and use the resulting buffer to call `sqlite3_deserialize` on the second database. I can again query for some data on both databases to verify they are now **equal**. Still all good.

If I now call `sqlite3_db_filename` on the databases, I still get the same pointer value (and string) for the first database; however, for the second database (where I deserialized the first one), I get a new pointer that points to a string with the value `"x"`.

If I understood correctly, after calling `sqlite3_deserialize` on the second database it should have been converted into an in-memory database, so I was expecting `sqlite3_db_filename` to return an empty string (or even a null pointer) in this case. Maybe I misunderstood the docs?

Cheers.