[sqlite] ANN: SQLite PHP Generator 16.3 released

2016-03-24 Thread SQL Maestro Group
Hi! SQL Maestro Group announces the release of SQLite PHP Generator 16.3, a powerful GUI frontend for Windows that allows you to generate feature-rich CRUD web applications for your SQLite database. http://www.sqlmaestro.com/products/sqlite/phpgenerator/ Online demo: http://demo.sqlmaestro.com/

[sqlite] Article about pointer abuse in SQLite

2016-03-24 Thread Keith Medcalf
On Thursday, 24 March, 2016 08:27, Tim Streater said, > On 24 Mar 2016 at 13:41, Jim Callahan > wrote: > > Assuming one did not get a cryptic compiler message (and in those days > all compiler messages were cryptic, "Probable user error:") ... > Not always: If you used JAIL as a variable in a

[sqlite] SQLite with wall enabled what's wrong C demo

2016-03-24 Thread Olivier Mascia
> Le 24 mars 2016 ? 14:46, Domingo Alvarez Duarte dev.dadbiz.es> a ?crit : > > But in this example there is only one application accessing the database and > only one table with one small record been updated all the time and no active > readers, why it's writing to wal ? Because it is

[sqlite] Article about pointer abuse in SQLite

2016-03-24 Thread Simon Slavin
On 24 Mar 2016, at 2:49pm, Richard Hipp wrote: > On 3/24/16, Simon Slavin wrote: >> >> I want the next generation of compilers to require >> that the programmer specify an initial value (a constant, not a calculated >> value) for every variable they define, including every array element when

[sqlite] SQLite with wall enabled what's wrong C demo

2016-03-24 Thread Domingo Alvarez Duarte
Hello ! I pulled the trigger too soon ! The wall file stop growing at 4MB as advertised. But in this example there is only one application accessing the database and only one table with one small record been updated all the time and no active readers, why it's writing to wal ? And why

[sqlite] Article about pointer abuse in SQLite

2016-03-24 Thread Simon Slavin
I've been leaving this thread alone because I've been very interested in various people's contributions. But I'm a security professional so I know stuff most programmers don't know, and I've seen enough wrong information here that I'm concerned someone will use it to design something badly.

[sqlite] Article about pointer abuse in SQLite

2016-03-24 Thread Tim Streater
On 24 Mar 2016 at 13:41, Jim Callahan wrote: > Assuming one did not get a cryptic compiler message (and in those days all > compiler messages were cryptic, "Probable user error:") ... Not always: If you used JAIL as a variable in a computed GOTO, the XDS FORTRAN compiler for the Sigma 7 would,

[sqlite] SQLite with wall enabled what's wrong C demo

2016-03-24 Thread Domingo Alvarez Duarte
Thanks for reply ! The error check was left out intentionally to not pollute the code, I stepped through all code with gdb to certify it's doing all correctly. Cheers ! > Thu Mar 24 2016 12:03:28 PM CET from "Stephan Beal" > Subject: Re: [sqlite] SQLite with wall enabled >what's wrong C

[sqlite] SQLite with wall enabled what's wrong C demo

2016-03-24 Thread Stephan Beal
On Thu, Mar 24, 2016 at 11:55 AM, Domingo Alvarez Duarte < sqlite-mail at dev.dadbiz.es> wrote: > There is something wrong with the program or with sqlite3 ? > > > rc = sqlite3_bind_text(stmt_insert, 1, session_id, > sizeof(session_id)-1, NULL); > rc =

[sqlite] Article about pointer abuse in SQLite

2016-03-24 Thread Richard Hipp
On 3/24/16, Marc L. Allen wrote: > With everything that routine does, the extra initialization negatively > impacts operation? > It did when I put in that comment in 2009. At that point in time, the routine was very hot. Subsequent optimizations have enabled us to completely bypass that

[sqlite] SQLite with wall enabled what's wrong C demo

2016-03-24 Thread Domingo Alvarez Duarte
Hello ! I'm sending here a C program that demonstrates the problem of sqlite3 in wall mode, in this simple example of a simulated session management for a web server when executing the wall log file will grow and grow till eat all our disk. ? There is something wrong with the

[sqlite] Article about pointer abuse in SQLite

2016-03-24 Thread Richard Hipp
On 3/24/16, Simon Slavin wrote: > > I want the next generation of compilers to require > that the programmer specify an initial value (a constant, not a calculated > value) for every variable they define, including every array element when > they define an array. At

[sqlite] Article about pointer abuse in SQLite

2016-03-24 Thread Igor Tandetnik
On 3/23/2016 1:23 PM, Doug Nebeker wrote: >> For obvious security reasons all allocations from the Operating System are >> pre-initialized to 0x00. > > Time to bash Windows, but according to the docs for HeapAlloc, memory is not > automatically initialized to 0 > >

[sqlite] Article about pointer abuse in SQLite

2016-03-24 Thread Marc L. Allen
With everything that routine does, the extra initialization negatively impacts operation? -Original Message- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Richard Hipp Sent: Thursday, March 24, 2016 10:50 AM To:

[sqlite] Article about pointer abuse in SQLite

2016-03-24 Thread Scott Robison
Forgive top posting, on my phone. But two points. 1. There is a flag if you want zero initialized memory from HeapAlloc. 2. These types of heaps are private to the process and must be created first. The heap creation process reserves virtual address space and allocates memory on demand from a

[sqlite] Article about pointer abuse in SQLite

2016-03-24 Thread Jim Callahan
I have painful memories from programming 101 in the twilight of the punch card era that initializing variables was a big deal in FORTRAN and COBOL. After declaring a long list of variables for a convoluted assignment one would have to go back and set equal to zero in FORTRAN and "MOVE SPACES TO"

[sqlite] SQLite with wall enabled what's wrong

2016-03-24 Thread Domingo Alvarez Duarte
Hello Simon ! Thanks again for reply ! Yes I do _prepare(), _bind(), _step(), _reset() | _step(), _finalize(), you can see it on the source code I posted on the first post. Cheers ! > Thu Mar 24 2016 12:21:44 AM CET from "Simon Slavin" > Subject: Re: [sqlite] SQLite with wall enabled

[sqlite] SQLite with wall enabled what's wrong

2016-03-24 Thread Domingo Alvarez Duarte
Hello ! Thanks for reply ! I'm using prepared statements and "sqite3_step == SQLITE_ROW" undeer "stmt.next_row()". Cheers ! > Thu Mar 24 2016 12:13:22 AM CET from "Simon Slavin" > Subject: Re: [sqlite] SQLite with wall enabled >what's >wrong > > How are you executing your SQLite

[sqlite] SQLite with wall enabled what's wrong

2016-03-24 Thread Simon Slavin
On 23 Mar 2016, at 11:43pm, Domingo Alvarez Duarte wrote: > Yes I do _prepare(), _bind(), _step(), _reset() | _step(), _finalize(), you > can see it on the source code I posted on the first post. Okay, I don't know your programming language so this has to wait for someone who does. Simon.

[sqlite] SQLite with wall enabled what's wrong

2016-03-24 Thread Domingo Alvarez Duarte
Hello again ! After all my tests I conclude that the actuall implementation of sqlite "wall" mode needs active manual management to not grow unbounded and with multiuser/long running proesses sharing the same database sqlite will eat all our disk space, because the chance of a process get the

[sqlite] SQLite with wall enabled what's wrong

2016-03-24 Thread Domingo Alvarez Duarte
Can someone give any insight here ? For me the main problem is the wall size that becomes stable at 387MB (+- 8% of the database, but around 70% the size of the tables it's manipulating). And I'm stopping the active reader and calling "PRAGMA wal_checkpoint(FULL);" manually every 1000 users.

[sqlite] SQLite with wall enabled what's wrong

2016-03-24 Thread Simon Slavin
On 23 Mar 2016, at 11:18pm, Domingo Alvarez Duarte wrote: > I'm using prepared statements and "sqite3_step == SQLITE_ROW" undeer > "stmt.next_row()". Which programming language/environment are you using ? When you are finished with your statements are you finalizing them ? _prepare() _step,

[sqlite] SQLite with wall enabled what's wrong

2016-03-24 Thread Simon Slavin
How are you executing your SQLite calls ? Are you using _step() or _exec() ? Are you using SQLite calls directly or using a database library ? Are you doing your INSERT calls in a transaction ? Simon.

[sqlite] SQLite with wall enabled what's wrong

2016-03-24 Thread Domingo Alvarez Duarte
Hello ! Can someone give any insight here ? For me the main problem is the wall size that becomes stable at 387MB (+- 8% of the database, but around 15 times the size of the tables it's manipulating). It seems to me that something is not working as advertised. I'm testing sqlite3 with