> When I implement the same mechanism for saving the
> memory database back to disk, the size of disk file is 4x of the original
> disk file size.

What is "original disk file size" here? Is it an empty database,
database with some data, database with exactly the same data you are
restoring? If the latter then do you restore right over the existing
data? If yes how?

Pavel


On Wed, Aug 22, 2012 at 10:00 PM, Madhur Kashyap
<physiologo...@gmail.com> wrote:
> Hello,
>
> I am using Tcl Extension (TEA) of SQLite inside an EDA tool which supports
> TCL User Shell. I have a strange problem that SQLite version 3.7.10 is
> downgraded to 3.5.9 when I load the necessary .so files. Due to this change
> the backup and restore commands are probably causing a core dump in the EDA
> tool execution.
>
> I have to implement save and restore capability for the memory database
> used in the application. Restore I have implemented using traditional
> method to first attach the disk database and then copy all tables listed in
> sqlite_master table. When I implement the same mechanism for saving the
> memory database back to disk, the size of disk file is 4x of the original
> disk file size.
>
> What is the reason for this size increase? What can I do to avoid this file
> size increase? A long pending question - Why the version is getting
> downgraded to 3.5.9 ? The Tcl version is 8.4.x within the EDA tool. Also I
> cannot find any SQLite libraries within the tool installation.
>
> dbcmd eval "ATTACH DATABASE 'test_disk.db' AS copyto"
> set tableNames [ dbcmd eval {SELECT name FROM sqlite_master WHERE type
> = 'table'} ]
> foreach tname $tableNames {
>     dbcmd eval "CREATE TABLE copyto.$tname AS SELECT * FROM $tname"
> }
>
> --
> Regards
> Madhur Kashyap
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to