[sqlite] memory leak

2017-11-04 Thread Lev
I'm fighting with some memory leak. From time to time the vsize of the process goes up with 100k. I have several function like this, and I call them in each second. My memory growth happens every 10 minutes or so. int dbSqliteSelectSensorsToReport(sdmd_t *sdmd, sensor_t *sensor, int deviceType,

Re: [sqlite] DB on JFFS

2017-11-04 Thread Lev
On Fri, 3 Nov 2017 21:40:52 + Simon Slavin wrote: > Those two are in conclict. You might like to try putting BEGIN … END > around your inserts just for testing. That is a good idea, thanks. So it might look like this? BEGIN TRANSACTION;

[sqlite] DB on JFFS

2017-11-03 Thread Lev
I'm implementing an application that is on a flash filesystem (JFFS). The flash is connected to the CPU with SPI. I experience about 1s INSERT time. My DB isn't big, just about 200k. I implement a fifo like operation, so i have a fixed length row count. I DELETE old data from time to time. I

Re: [sqlite] sqlite - Delete large table in sqlite

2016-09-11 Thread Lev
On Sat, 10 Sep 2016 13:31:51 +0100 Simon Slavin wrote: > You do it after opening a connection to the database. Probably the > first thing you do after sqlite3_open(). Thanks! -- 73 de HA5OGL Op.: Levente

Re: [sqlite] sqlite - Delete large table in sqlite

2016-09-10 Thread Lev
enough to set this once as the connection created? Or shall I set this every time a do sqlite3_step()? Thanks, Lev -- 73 de HA5OGL Op.: Levente ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin

Re: [sqlite] Locking databases - Possibly (probably?) a dumb question

2016-08-20 Thread Lev
On Sat, 20 Aug 2016 18:01:46 +0100 Simon Slavin wrote: > Yes and yes, but do it this way. > > 1) Create the database file by opening it. > 2) Do something that makes the file non-blank, like creating a table. > 3) Issue "PRAGMA journal_mode=WAL"

Re: [sqlite] Locking databases - Possibly (probably?) a dumb question

2016-08-20 Thread Lev
On Sat, 6 Aug 2016 17:03:30 -0400 Richard Hipp wrote: > Doing "PRAGMA journal_mode=WAL;" on your database (just once, perhaps > from a command-line shell) will fix this for you. I read in the documentation: The WAL journaling mode uses a write-ahead

[sqlite] accessing database from Lua and C

2015-10-25 Thread Lev
I only have a single thread, so no other entity is accessing the database at the same time. Other solution would be to pass the filename of the database, but then I have to close the connection. Must I? I don't know if it is possible. Thanks for your hints in advance. Lev -- 73 de HA5OGL Op

[sqlite] combine SELECTs

2015-08-31 Thread Lev
JOIN B ON B.KeyField = A.KeyField >JOIN C ON C.KeyField = A.KeyField > ; > > > You could of course add lots of other columns, this just the minimum > to make the idea work. Okay. Thanks for the hint. I think I go for 1. Lev -- 73 de HA5OGL Op.: Levente

[sqlite] combine SELECTs

2015-08-30 Thread Lev
the syntax. Any help are welcome. Thanks, Lev -- 73 de HA5OGL Op.: Levente

Re: [sqlite] database locked in PHP

2015-01-24 Thread Lev
On Sat, 24 Jan 2015 20:59:22 + Simon Slavin wrote: > and set it to 6 (60 seconds) or so. Okay, I try that, but I still don't understand how can a single threaded application get a locked error. Levente

[sqlite] database locked in PHP

2015-01-24 Thread Lev
Hi list, I'm currently working on a www frontend that uses SQLite. I sometimes get a database locked error when I access the database by calling the execute() call. This is on PHP. Reading the document http://www.sqlite.org/rescode.html#locked I learned that locked error occurs only on the

Re: [sqlite] PHP: squelch warning and error messages

2015-01-06 Thread Lev
On Tue, 6 Jan 2015 10:45:40 +0100 Stephan Beal wrote: > PHP's general-purpose mechanism for warning squelching is to prepend > the command which is warning with an @ sign: Thanks. This is what I need. Thank you again. Levente ___ sqlite-users

Re: [sqlite] PHP: squelch warning and error messages

2015-01-06 Thread Lev
On Mon, 05 Jan 2015 18:29:52 -0800 Roger Binns wrote: [...] > Or in short, you squelch the diagnostics by providing acceptable SQL. > You need to log/trace queries to find out which ones are the > problems. I know what this error/warning is. I

[sqlite] PHP: squelch warning and error messages

2015-01-05 Thread Lev
I'm using the PHP bindings for SQLite3. How can I squelch error and warning messages? I do error checking, but the failing call emits the messages. Messages like: Warning: SQLite3::prepare(): Unable to prepare statement: 1, no such table: Thanks, Levente