Re: [sqlite] page_size: bug with PRAGMA or documentation?

2016-09-12 Thread Rowan Worth
Thanks Richard, that's much clearer.

Just one thing: "The page_size pragma will only set in the page size if ..."

The "in" looks out of place :)
-Rowan


On 12 September 2016 at 19:43, Richard Hipp  wrote:

> On 9/12/16, Rowan Worth  wrote:
> > The docs for PRAGMA page_size say that it is effective if issued "prior
> to
> > the first CREATE statement".
>
> Fixed at https://www.sqlite.org/draft/pragma.html#pragma_page_size
>
> This will be pushed to the main website at the next release.
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] page_size: bug with PRAGMA or documentation?

2016-09-12 Thread Richard Hipp
On 9/12/16, Rowan Worth  wrote:
> The docs for PRAGMA page_size say that it is effective if issued "prior to
> the first CREATE statement".

Fixed at https://www.sqlite.org/draft/pragma.html#pragma_page_size

This will be pushed to the main website at the next release.
-- 
D. Richard Hipp
d...@sqlite.org
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] page_size: bug with PRAGMA or documentation?

2016-09-12 Thread Hick Gunter
I guess that selecting from sqlite_master issues an implicit create, and 
querying/updateing something from the file header (i.e. several PRAGMAs) would 
also imply writing the first page of the file (with the current setting of 
page_size) too.

-Ursprüngliche Nachricht-
Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im 
Auftrag von Rowan Worth
Gesendet: Montag, 12. September 2016 12:14
An: General Discussion of SQLite Database 
Betreff: [sqlite] page_size: bug with PRAGMA or documentation?

Hey guys,

The docs for PRAGMA page_size say that it is effective if issued "prior to the 
first CREATE statement". So imagine my surprise when I found page_size to be 
ineffective without ever issuing a CREATE statement!

The sequence goes like so:

$ rm /tmp/lol.db; sqlite3 /tmp/lol.db
SQLite version 3.8.1 2013-10-17 12:57:35
sqlite> BEGIN;
sqlite> select count(*) from sqlite_master;
0
sqlite> pragma page_size = 8192;
sqlite> pragma page_size;
1024

1024? That's not what I asked for! This variant also fails:

$ rm /tmp/lol.db; sqlite3 /tmp/lol.db
SQLite version 3.8.1 2013-10-17 12:57:35
sqlite> BEGIN;
sqlite> pragma schema_version;
0
sqlite> pragma page_size = 8192;
sqlite> pragma page_size;
1024

No create statements in sight, and the behaviour is also present in 3.13.0.

It's not really a big deal to move the page_size pragma earlier, but at the 
very least I think it at least deserves a hint in the documentation that 
operations other than CREATE statements can render it ineffective.

Cheers,
-Rowan
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


___
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.


___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] page_size: bug with PRAGMA or documentation?

2016-09-12 Thread Rowan Worth
Hey guys,

The docs for PRAGMA page_size say that it is effective if issued "prior to
the first CREATE statement". So imagine my surprise when I found page_size
to be ineffective without ever issuing a CREATE statement!

The sequence goes like so:

$ rm /tmp/lol.db; sqlite3 /tmp/lol.db
SQLite version 3.8.1 2013-10-17 12:57:35
sqlite> BEGIN;
sqlite> select count(*) from sqlite_master;
0
sqlite> pragma page_size = 8192;
sqlite> pragma page_size;
1024

1024? That's not what I asked for! This variant also fails:

$ rm /tmp/lol.db; sqlite3 /tmp/lol.db
SQLite version 3.8.1 2013-10-17 12:57:35
sqlite> BEGIN;
sqlite> pragma schema_version;
0
sqlite> pragma page_size = 8192;
sqlite> pragma page_size;
1024

No create statements in sight, and the behaviour is also present in 3.13.0.

It's not really a big deal to move the page_size pragma earlier, but at the
very least I think it at least deserves a hint in the documentation that
operations other than CREATE statements can render it ineffective.

Cheers,
-Rowan
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users