Re: [sqlite] Memory leak in SQlite

2011-05-10 Thread Stephan Beal
y to the source of the leak. Valgrind can be used like this: valgrind --leak-check=full -v --show-reachable=yes --track-origins=yes ./MyProgram -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@s

Re: [sqlite] SQLite as a Logger: How to mimic "rotation of logs"?

2011-05-10 Thread Stephan Beal
quite small, so it would be easy to strip out the bits you can re-use. The log routine, for example, internally uses vnsprintf() (which is C99, not C89, by the way). The trim() function just prepares and executes a statement. -- ----- stephan beal http://wanderinghorse.n

Re: [sqlite] SQLite as a Logger: How to mimic "rotation of logs"?

2011-05-10 Thread Stephan Beal
repos/sqlite-stuff/index.cgi/finfo?name=sq3/sq3_log_db.hpp http://fossil.wanderinghorse.net/repos/sqlite-stuff/index.cgi/finfo?name=sq3/sq3_log_db.cpp that might be useful as a basis (e.g. it includes a printf-like log() routine and a trim() function to remove all but the last N entries). -- -

Re: [sqlite] SQLite as a Logger: How to mimic "rotation of logs"?

2011-05-10 Thread Stephan Beal
n DELETE ... WHERE ID<(the_last_id-100). Not a perfect solution, but for simple apps it suffices. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] System.Data.SQLite blob column exception

2011-05-05 Thread Stephan Beal
t dealing with JSON data, so the encoding is predefined). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Compile Error

2011-05-03 Thread Stephan Beal
code. > That's correct. See: http://www.sqlite.org/compile.html Section 1.6 -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sha256sum function

2011-05-01 Thread Stephan Beal
QLITE_FLOAT == returnT ) { // The 1.1 thing here is a kludge to force the return result // to be a true double. Can't quite remember why it was necessary // (maybe it isn't). sqlite3_result_double(context, 1.1 * reti); } else { sqlite3_result_int(context, reti); } return; } -- - ste

Re: [sqlite] EXT :Re: BUG : round(x,y) not consistent

2011-04-30 Thread Stephan Beal
uld seem to be platform-dependent. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] vacuum and rowids

2011-04-29 Thread Stephan Beal
plicitly declared or you do this: select rowid, * ... e.g.: sqlite> select * from whiki_page_tag; eek|tag1| eek2|tag1| eek|tag2| sqlite> select rowid,* from whiki_page_tag; 1|eek|tag1| 2|eek2|tag1| 3|eek|tag2| -- - stephan beal http:

Re: [sqlite] Persistently setting certain PRAGMAs (foreign_keys, recursive_triggers)

2011-04-17 Thread Stephan Beal
c logic isn't _so_ bad. i don't know, however, whether or not setting pragmas can be done from a trigger. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Balance between keeping DBs open vs repeated open/close

2011-04-06 Thread Stephan Beal
the same as manually opening them), but it might simplify the usage of multiple dbs. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Balance between keeping DBs open vs repeated open/close

2011-04-05 Thread Stephan Beal
ogle for "man 1 ulimit"). If some of your DBs spuriously cannot be opened then you are possibly running into the file descriptor limit and you may be forced to raise that limit (if possible) or start closing DBs which you do not currently need. -- - stephan beal http:/

Re: [sqlite] LENGTH on a BLOB field stops at NUL byte

2011-02-10 Thread Stephan Beal
.lobs.php Doh! -- ----- stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] LENGTH on a BLOB field stops at NUL byte

2011-02-10 Thread Stephan Beal
> http://www.php.net/manual/en/pdostatement.bindparam.php When inserting the GIF, the 3rd argument to bindParam() must be PDO::PARAM_LOB (not BLOB, interestingly). The default is PDO::PARAM_STR, which almost certainly results in the OP's frustration. -- - stephan beal http://wanderi

Re: [sqlite] SIGSEGV Error when using sqlite3_exec( )

2011-02-10 Thread Stephan Beal
0x7fbeb2423000) libnsl.so.1 => /lib/libnsl.so.1 (0x7fbeb2209000) libz.so.1 => /lib/libz.so.1 (0x7fbeb1ff) -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

[sqlite] Announcement: new db access abstraction API w/ sqlite3 support

2011-02-03 Thread Stephan Beal
L driver, since a DB abstraction API supporting only one back-end is pretty senseless. If there are any other C hackers left out there aside from DRH himself, i would love to hear your input/suggestions/comments/etc. (Off-list please - they're not topical here.) Happy Hacking! -- ---

Re: [sqlite] Suggests for improving the SQLite website

2007-11-09 Thread Stephan Beal
the current site, listing the latest couple of news items, is always what i look at first when i visit sqlite.org. :) -- - stephan beal http://wanderinghorse.net/home/stephan/ - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Suggests for improving the SQLite website

2007-11-08 Thread Stephan Beal
as many months suggests the > code is not stable. Only to people not used to open source. "Release early, release often." > (6) Need more eye-candy. Definitely not. Its simplicity is its main beauty. -- -

Re: [sqlite] Re: Transactions on a shared database connection

2007-11-06 Thread Stephan Beal
hange the database at the > same time, But not all actions can succeed at the same time. For example, two threads trying to update the same record at the same time. One query will likely result in SQLITE_BUSY (or similar). -- - stephan bea

Re: [sqlite] Affinity modes

2007-11-04 Thread Stephan Beal
ing specifically to STRICT mode. The docs refer to a STRICT mode, saying that can be used to force an error if a wrong data type is used. The docs don't tell how to enable it, though. -- - stephan beal http://wanderinghorse.net/home/stephan/

Re: [sqlite] Strange error in sqlite 3.4.2 Win32 version

2007-10-31 Thread Stephan Beal
box, with a record already in it? That would explain the discrepancy (but if that were the case, the CREATE TABLE call should fail, so that's probably not the problem). -- - stephan beal http://wanderinghorse.net/home/stephan/

<    2   3   4   5   6   7