Page size problem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Page size problem

Anton Kuznetsov
Hello!

Did anybody try to create an SQLite3 database with a custom page_size (e.g.
8192) and fill it with data of more than 1Gb? As for me I didn't
manage (using tclsqlite-3.2.7). It says "database disk image is malformed".

Thanks.
Anton.

Reply | Threaded
Open this post in threaded view
|

Re: Page size problem

D. Richard Hipp
"Anton Kuznetsov" <[hidden email]> wrote:
> Hello!
>
> Did anybody try to create an SQLite3 database with a custom page_size (e.g.
> 8192) and fill it with data of more than 1Gb? As for me I didn't
> manage (using tclsqlite-3.2.7). It says "database disk image is malformed".
>

I just testing the script shown below.  It generates a 2 GiB database
that seems to work fine.

PRAGMA page_size=8192;
CREATE TABLE t1(x);
INSERT INTO t1 VALUES('123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123456789 ');
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;
INSERT INTO t1 SELECT * FROM t1;

--
D. Richard Hipp <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

RE: Page size problem

Cariotoglou Mike
In reply to this post by Anton Kuznetsov
FYI, I tried the same script on windows xp2 sqlite 3.2.7, and it worked
fine also

> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]]
> Sent: Tuesday, November 01, 2005 7:13 PM
> To: [hidden email]
> Subject: Re: [sqlite] Page size problem
>
> "Anton Kuznetsov" <[hidden email]> wrote:
> > Hello!
> >
> > Did anybody try to create an SQLite3 database with a custom
> page_size (e.g.
> > 8192) and fill it with data of more than 1Gb? As for me I didn't
> > manage (using tclsqlite-3.2.7). It says "database disk
> image is malformed".
> >
>
> I just testing the script shown below.  It generates a 2 GiB
> database that seems to work fine.
>