Re: [sqlite] Using a select with 'where'

2012-04-27 Thread Stephan Beal
On Fri, Apr 27, 2012 at 10:00 PM, Tim Streater t...@clothears.org.uk wrote: delete from addressbook where absid=(select personnick from grouplinks where groupnick='27') i think what you want is IN instead of =. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to

Re: [sqlite] Possible bug when rebuilding amalgamation without triggers or altertable

2012-04-26 Thread Stephan Beal
from the code in future releases and without warning. For any particular release, some of these options may cause compile-time or run-time failures, particularly when used in combination with other options. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal

Re: [sqlite] Possible bug when rebuilding amalgamation without triggers or altertable

2012-04-26 Thread Stephan Beal
expensive for them. The second important note does not appear to be specific to the amalgamation build. It appears to (in my interpretation) be making a blanket statement about those options. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal

Re: [sqlite] Possible bug when rebuilding amalgamation without triggers or altertable

2012-04-25 Thread Stephan Beal
. SQLITE_OMIT_* compile-time options only work correctly when SQLite is built from canonical source files.* -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http

Re: [sqlite] Permissions

2012-04-22 Thread Stephan Beal
Try the sticky bit: chown user:apache theDir chmod 4775 theDir :-? - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On Apr 22, 2012 1:19 PM, Steinar Midtskogen stei...@latinitas.org wrote: Patrik Nilsson nipatriknils...@gmail.com writes: You can try setting

Re: [sqlite] Using \attach database\ to work around DB locking

2012-04-13 Thread Stephan Beal
use a different thread of the same process, but of course Threads are evil.. In my experience every open() of :memory: is a difference instance? My hand is injured, making typing difficult, so i won't try it out right now :/. -- - stephan beal http://wanderinghorse.net/home/stephan/ http

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
compile command? -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite Exception 14

2012-04-12 Thread Stephan Beal
Table Name */ #define SQLITE_TESTCTRL_RESERVE 14 sounds like the first one. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 5:00 PM, Sako Youssouf youssouf.s...@renault-trucks.com wrote: compil.c:(.text+0x6f): multiple definition of `main' Remove shell.o from your libsqlite.a. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
-l... -L... with sqlite3.o? -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 5:31 PM, Sako Youssouf youssouf.s...@renault-trucks.com wrote: Others ideas? Can you paste in the last thing (or two) you tried? You might also try passing -s to ar (it's equivalent to calling ranlib, from what i understand). -- - stephan beal http

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 6:07 PM, Sako Youssouf youssouf.s...@renault-trucks.com wrote: # ar -rvs libsqlite3.a sqlite3.o # gcc -L. -lsqlite -L/usr/lib/ -ldl -lpthread -o compil compil.c You're back to the first problem you had: linking against /usr/lib/libsqlite.* -- - stephan beal http

Re: [sqlite] is it reliable to directly read sqlite3_sequence?

2012-04-08 Thread Stephan Beal
of my mind (in the context of my db wrapper API). i appreciate the link to the docs - that certainly clarifies it for me (as a non-problem). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing

Re: [sqlite] is it reliable to directly read sqlite3_sequence?

2012-04-08 Thread Stephan Beal
of time. In other words with this implementation your function may return incorrect value. Thanks for that clarification. i incidentally removed it because it causes a huge number of malloc()s in my test app. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal

Re: [sqlite] In-memory and temporary database

2012-03-28 Thread Stephan Beal
you could use shared memory, probably. How about using your :memory: db as the main one and simultaneously queue the commits into an on-disk db which other apps would then read? (Or do they need to also update the db?) They would be a little bit behind the master, of course. -- - stephan beal

Re: [sqlite] compressing BLOB

2012-03-02 Thread Stephan Beal
in the fossil source repo: http://fossil-scm.org/index.html/artifact/41357470cd8b147dcea8c684ed131ebf29643650?ln=53-105 -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] How to find number of tables

2012-02-25 Thread Stephan Beal
|rootpage|sql table|t1|t1|2|CREATE TABLE t1(a) table|t2|t2|3|CREATE TABLE t2(a) -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin

Re: [sqlite] Column names including spaces

2012-02-23 Thread Stephan Beal
On Wed, Feb 22, 2012 at 11:14 PM, Petite Abeille petite.abei...@gmail.comwrote: http://www.sqlite.org/lang_keywords.html @sqlite3 committers: there's a minor error on that page: is says There are three ways of quoting... and then goes on to show four ways. -- - stephan beal http

Re: [sqlite] Column names including spaces

2012-02-22 Thread Stephan Beal
([Col 1]); sqlite .h on sqlite insert into t values('a'); sqlite select * from t; Col 1 a sqlite select [Col 1] from t; Col 1 a Hope that helps, -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing

Re: [sqlite] make connection to another database within sqlite3 shell command

2012-02-17 Thread Stephan Beal
to connect multiple database files at once: http://www.sqlite.org/lang_attach.html -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin

Re: [sqlite] Able to differentiate between No query and empty results?

2012-02-14 Thread Stephan Beal
Hi! Check the column count after sqlite3_prepare(). You don't need to execute the query to get the column count. - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On Feb 14, 2012 5:50 PM, Marc L. Allen mlal...@outsitenetworks.com wrote: Without examining

Re: [sqlite] Able to differentiate between No query and empty results?

2012-02-14 Thread Stephan Beal
To expand on Simon's warning about types: any given column can contain different types in different rows in sqlite, so examining just the first row to get the types is not necessarily reliable (but may be for any given app, depending on how the app inserts/updates data). - stephan beal http

Re: [sqlite] Incorporating user written functions into the sqlite library

2012-02-14 Thread Stephan Beal
then you can use http://www.sqlite.org/capi3ref.html#sqlite3_create_function on that handle to register the functions (do this right after opening the db if at all possible). If it does not provide such a handle then you're out of luck :/. -- - stephan beal http://wanderinghorse.net/home

Re: [sqlite] Able to differentiate between No query and empty results?

2012-02-14 Thread Stephan Beal
don't) then using double is an option. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] A sqlite c++ wrapper, sqlite3x

2012-02-07 Thread Stephan Beal
. Feel free to contact me off-list with questions. - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On Feb 7, 2012 7:53 AM, Truls Haaland trul...@yahoo.com wrote: Hello everyone,My project used sqlite3x, a sqlite c++ wrapper. Now for some reason, I wanna

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
://paste.ideaslabs.com/show/OPNHBY7xPG A segfault can be caused by at least 300 million different things. The easiest way to figure out where the problem is is to run your app through gdb (or equivalent) and get a backtrace after it crashes. -- - stephan beal http://wanderinghorse.net/home

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
But finding out exactly where it fails requires either adding debug output to the plug or running it (in this case the sqlite shell) through a debugger. - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On Feb 3, 2012 4:35 PM, Jorge Eliécer Osorio Caro

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
it as normal until it crashes, then type bt to get a backtrace. That will show what led up to the error. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
but not the backtrace, so i can't say what let up to the crash, but the Reason part is telling - the address 03b8 is invalid. Are you sure you've properly initialized all of the memory/variables in initialize_niurouting()? -- - stephan beal http://wanderinghorse.net/home/stephan/ http

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
passed to it, and it's conceivable that the lifetime of the table_structure string is the problem. :-? [1] = http://www.sqlite.org/c3ref/declare_vtab.html -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
On Fri, Feb 3, 2012 at 8:22 PM, Stephan Beal sgb...@googlemail.com wrote: sqlite3_declare_vtab()[1] does not document the lifetime requirements of the string passed to it, and it's conceivable that the lifetime of the table_structure string is the problem. i take that back - if that were

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
On Fri, Feb 3, 2012 at 8:25 PM, Stephan Beal sgb...@googlemail.com wrote: i take that back - if that were the case then the crash would almost certainly happen later on (after your init routine returns). But it still can't hurt to try. But please try this: nr = (NiuRouting*) sqlite3_malloc

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
any more i think, that the program do no enter to any method. And please show us what the DBG macro expands to - maybe the problem is in the first DBG() call? -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal

Re: [sqlite] How to find type of value that a column contains.

2012-02-02 Thread Stephan Beal
Google for sqlite3_column_type. - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On Feb 2, 2012 8:22 AM, bhaskarReddy uni...@gmail.com wrote: Hi Friends, I have to find a type of a value in sql. Suppose if i pass to a function

Re: [sqlite] File checking mechanism.

2012-02-01 Thread Stephan Beal
#sqlite3_open sqlite3_open_v2() has the ability to require that a DB exists before it is opened. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org

Re: [sqlite] Found it

2012-01-26 Thread Stephan Beal
and stamina have been a treat to watch. IMO he should be made an honorary member of the dev team (or at least get a coffee mug). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite

Re: [sqlite] sqlite3_bind_text destructor

2012-01-25 Thread Stephan Beal
it is admittedly somewhat confusing that one passes a (char const *) as opposed to (char *) even when expecting (depending on the value of the last parameter) it to be freed. Here's an example of its usage: http://www.adp-gmbh.ch/sqlite/bind_insert.html -- - stephan beal http://wanderinghorse.net

Re: [sqlite] sqlite3_bind_text destructor

2012-01-25 Thread Stephan Beal
. http://www.adp-gmbh.ch/sqlite/**bind_insert.htmlhttp://www.adp-gmbh.ch/sqlite/bind_insert.html Ha!! That example doesn't use the destructor arg. It does, actually: it uses SQLITE_STATIC, which is a no-op function with the signature void(*)(void *). -- - stephan beal http

Re: [sqlite] storing and comparing dates in sqlite

2012-01-23 Thread Stephan Beal
portable form out there. Portable meaning, in this context, the ability to work with them (more or less easily) in a wide variety of contexts. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing

Re: [sqlite] storing and comparing dates in sqlite

2012-01-23 Thread Stephan Beal
On Mon, Jan 23, 2012 at 7:01 PM, dotolee woo_ju...@yahoo.com wrote: can you point me in the right direction? aka. what data type am i using to store the date in my sqlite database? is TEXT correct? how do I do a select on it? http://en.wikipedia.org/wiki/Unix_time -- - stephan beal

Re: [sqlite] sql/tcl script

2012-01-16 Thread Stephan Beal
and SpiderMonkey engines) - Python ... -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sql/tcl script

2012-01-16 Thread Stephan Beal
On Mon, Jan 16, 2012 at 8:02 PM, Bill McCormick wpmccorm...@gmail.comwrote: I assume that you are *NOT* naming the few that don't, rather these scripting languages *DO* have sqlite3 binding support. Yes, sorry - a bad choice of wording on my part. :/ -- - stephan beal http

Re: [sqlite] sql/tcl script

2012-01-16 Thread Stephan Beal
the opposite). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Slow commits

2012-01-13 Thread Stephan Beal
then of course it will be slow. You also haven't told us what type of storage you're using. Someone posted recently about a server process which writes to an SD card (which is bound to be somewhat slow). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal

Re: [sqlite] suppress database is locked?

2012-01-12 Thread Stephan Beal
is load_extension: http://sqlite.org/lang_corefunc.html -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] (no subject)

2012-01-04 Thread Stephan Beal
of sqlite3 (unless of course you are on a very space-constrained device). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo

Re: [sqlite] Restrict SQLite to Single user mode usage

2012-01-04 Thread Stephan Beal
to it multiple times concurrently. . how can one achieve it like in sqlserver etc sqlite3 is not a client-server db, and is missing several features which you may be assuming it has. See: http://sqlite.org/whentouse.html -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Stephan Beal
was _not_ used. If the build linked to one copy of libtcl but is trying to use a different one at runtime, a segfault would almost certainly result. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Stephan Beal
Try: # export LD_LIBRARY_PATH=/path/to/your/libs:$LD_LIBRARY_PATH # your commands here... (sorry, i'm on a mobile phone lying in bed or i'd be more specific/detailed!) - stephan beal http://wanderinghorse.net/home/stephan/ On Jan 5, 2012 12:07 AM, Tilsley, Jerry M. jmtils...@st-claire.org

Re: [sqlite] libtclsqlite3 package

2012-01-03 Thread Stephan Beal
/lib/libtcl8.4.so.0 As a quick workaround, you can simply create a symlink to it, e.g.: # sudo su - # cd /usr/lib # ln -s libtcl8.4.so libtcl8.4.12.so that is of course philosophically arguable, but it might get your build working. -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] sqlite crash info

2012-01-02 Thread Stephan Beal
it even though it doesn't actually modify any bytes used by the db. (Whether or not that _does_ corrupt it depends largely on how sqlite3 tracks the logical end-of-file.) -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users

Re: [sqlite] PHP SQLite examples

2011-11-14 Thread Stephan Beal
personally prefer PDO but others on this list can/will likely recommend other APIs). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite

Re: [sqlite] does sqlite3_reset have a performance impact on queries?

2011-11-02 Thread Stephan Beal
. It is likely to work on many platforms but it is technically undefined. To fix that: std::string const s( query.str() ); (note that a (const ) created this way is guaranteed to stay alive until the end of the scope) Then use s.c_str() and s.size() instead of query.str().xxx(). -- - stephan

Re: [sqlite] core dump happened in sqlite3_step for 30 statements in BEGIN TRANSACTION executing every 10 Millisecond

2011-11-02 Thread Stephan Beal
as a replacement for sprintf(): std::ostringstring q; q SELECT x ... ; dbStatements.push_back( q.str() ); -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi

Re: [sqlite] does sqlite3_reset have a performance impact onqueries?

2011-11-02 Thread Stephan Beal
(undefined or not), calling ostringstream::str() twice there is unnecessary, and downright inefficient if the user's STL does not use CoW (all of them do, AFAIK, but that's an implementation detail clients shouldn't count on). -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] does sqlite3_reset have a performance impact onqueries?

2011-11-02 Thread Stephan Beal
On Wed, Nov 2, 2011 at 1:11 PM, Stephan Beal sgb...@googlemail.com wrote: about undefined behaviour is true in that case, but i am 100% convinced that i've seen that usage cause problems before. Perhaps it was the compiler in question (one of the MSVC variants) which made the behaviour

Re: [sqlite] Disk I/O Error

2011-11-01 Thread Stephan Beal
remember who) pointed out that platforms exist which can return 0 from read() when interrupted. My man page says: POSIX allows a read() that is interrupted after reading some data to return -1 (with errno set to EINTR) or to return the number of bytes already read. -- - stephan beal http

Re: [sqlite] Segmentation Fault on SQLITE3_exex

2011-10-28 Thread Stephan Beal
() should be applied to a string which contains no formatting specifiers. -- - 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] PHP + SQLite - Issues with update

2011-10-21 Thread Stephan Beal
On Fri, Oct 21, 2011 at 1:05 AM, Prashant Prabhudesai prashantprabhude...@gmail.com wrote: $row = $res-fecth(); ... After the script exits successfully I inspect the value in the Token column Are you 100% sure the above command executes correctly? -- - stephan beal http

Re: [sqlite] How to make SQLite run safely on CIFS mounted file system?

2011-10-19 Thread Stephan Beal
On Tue, Oct 18, 2011 at 12:37 PM, Sune Ahlgren sune_ahlg...@hotmail.comwrote: What can I do to make SQLite run safely on CIFS? Nothing. Even MS Access cannot (or could not way back when i used it) be safely used on SMB/CIFS storage. -- - stephan beal http://wanderinghorse.net/home

Re: [sqlite] How to make SQLite run safely on CIFS mounted file system?

2011-10-19 Thread Stephan Beal
has, historically speaking, always been problematic. Communicating the locks between separate machines, race conditions, unclean network connection errors, blah blah blah. That goes for all applications, not just databases. -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] How to make SQLite run safely on CIFS mounted file system?

2011-10-19 Thread Stephan Beal
On Wed, Oct 19, 2011 at 9:23 PM, Stephan Beal sgb...@googlemail.com wrote: race conditions, unclean network connection errors, blah blah blah. That goes for all applications, not just databases. And not just for CIFS, but NFS and other networked filesystems as well. i'm not personally aware

Re: [sqlite] How to make SQLite run safely on CIFS mounted file system?

2011-10-19 Thread Stephan Beal
a few lock/unlock calls. -- - 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] load database into memory java applet

2011-10-10 Thread Stephan Beal
post is providing the name memory:, which is not correct). -- - 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] Statement failing

2011-10-09 Thread Stephan Beal
. Amen. -- - 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] Error 14 - cannot open Database

2011-10-09 Thread Stephan Beal
to try: Can you open the file with the command-line sqlite3 client? Is the file still there? Are the file permissions still correct (readable by your server's user id)? -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing

Re: [sqlite] Statement failing

2011-10-08 Thread Stephan Beal
doing wrong? http://www.php.net/manual/en/pdo.query.php says: Executes an SQL statement, returning a result set as a PDOStatement object an is singular, and result set implies a single statement. -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] Porting a simple logon script to SQLite3 from MySQL

2011-10-05 Thread Stephan Beal
that problem: http://php.net/manual/en/pdo.prepare.php -- - 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] How do you check if a sqlite database is open?

2011-10-04 Thread Stephan Beal
of course must initialize it to, or else it has an unspecified value). sqlite3 * db = NULL; int rc = sqlite3_open(, db); if(rc) { ... error ... ; sqlite3_close(db); } else { sqlite3 is open } After you close it, assign it to NULL again, and there's your is open flag. -- - stephan beal http

Re: [sqlite] feed endless data into sqlite, thru a shell script

2011-09-27 Thread Stephan Beal
. -- - 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] Problem with using WAL journal mode in embedded system (disk I/O error)

2011-09-26 Thread Stephan Beal
of data being queried at one time) anywhere close to the size it gives out? From my (very limited) understanding of mmap(), it uses(?) the same address range as malloc() would [have if mmap() hadn't stolen it]. -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] Still chasing database schema has changed

2011-09-26 Thread Stephan Beal
other. At least that was my experience when i tried it out a few years ago. -- - 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] MC/DC coverage explained wrong in the home page?

2011-09-24 Thread Stephan Beal
of *x cannot change so long as x does not change. But that comes down once's definition of const. *x _as an expression_ does not exist until it is tried, and it cannot (in short-circuit logic) be tried until x evaluates to true (else undefined behaviour, as described earlier). -- - stephan beal

Re: [sqlite] Newbie starting off question

2011-09-23 Thread Stephan Beal
. A tiny expansion to that: someone recently reported a problem when serving a singleton db instance from a DLL (he was getting 2 different instances of the singleton, IIRC), but that's not an sqlite3-specific problem. -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] duplicate ( Corruption) in sqlite3 database

2011-09-22 Thread Stephan Beal
a unique 3rd column value). ... Here the dn name is unique but still i am seeing duplicate dn names. Please show us the duplicates. i don't see any dupes in your inserts and you didn't present any SELECT data which shows duplicates. -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] duplicate ( Corruption) in sqlite3 database

2011-09-22 Thread Stephan Beal
On Thu, Sep 22, 2011 at 2:04 PM, Jay A. Kreibich j...@kreibi.ch wrote: The PK (first column). The CREATE TABLE showed it as an INTEGER PRIMARY KEY Ah, indeed. i skipped that and looked at the unique index :/. -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] Permissions issue with SQLite

2011-09-22 Thread Stephan Beal
On Thu, Sep 22, 2011 at 4:16 PM, Magnus Thor Torfason zulutime@gmail.com wrote: SQLite version 3.3.6 Just to preempt the inevitable request to try it on a current version: this is reproducible on 3.7.2 (Ubuntu 10.10). -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] Newbie starting off question

2011-09-22 Thread Stephan Beal
a CGI, i would recommend what Pavel did: compile the sqlite3 amalgamation into your project. The problem i've had with CGIs is that my primary hoster has an ancient version of sqlite3 installed, so i can't build against it. Having the amalgamation in my tree works around that. -- - stephan

Re: [sqlite] How to store and retrieve list of images from sqlite in android

2011-09-20 Thread Stephan Beal
strongly recommend reading this article before posting to the Android group: http://catb.org/~esr/faqs/smart-questions.html -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http

Re: [sqlite] Disk I/O Error on Ext3/write-back/barrier FS.

2011-09-20 Thread Stephan Beal
into this same problem. But notice those last two sentences. -- - 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] change after sqlite upgrade with python

2011-09-20 Thread Stephan Beal
not include the table name in the key, but are solely the column name. Is this expected? Yes, it's expected and well documented. The names of ANY columns is UNSPECIFIED unless you use an AS qualifier to give them the names you want. -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] SQLite disc and I/O usage

2011-09-19 Thread Stephan Beal
information, e.g. links between btree nodes. i can't say with certainty how much of those 70 bytes is overhead, but one of the devs probably can. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Quickest way to delete all contents of a table

2011-09-19 Thread Stephan Beal
/faq/difference_between_truncate_delete_and_drop_commands DROP has less overhead associated with it (e.g. no triggers fired). Note that TRUNCATE described on that page is (apparently) not supported in sqlite3 (or that's what my shell tells me). -- - stephan beal http://wanderinghorse.net/home

Re: [sqlite] Quickest way to delete all contents of a table

2011-09-19 Thread Stephan Beal
for subsequent insertions. -- - 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] Quickest way to delete all contents of a table

2011-09-19 Thread Stephan Beal
;). -- - 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] About extension-functions.c

2011-09-15 Thread Stephan Beal
(which possibly had an i64 typedef). But i'm just guessing. :-? -- - 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] UPDATE of field deletes record

2011-09-15 Thread Stephan Beal
: there's a missing pair before the 2nd sqlite_escape() call. -- - 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] About extension-functions.c

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 6:06 AM, Freddy López freddy.vat...@gmail.comwrote: I would like to know if you can help me with it. My knowledge of C is poor. We can't possibly help until we know what the problem is. Can you please post the compiler output? -- - stephan beal http

Re: [sqlite] About extension-functions.c

2011-09-14 Thread Stephan Beal
are side effects of that. Can you try: gcc -std=c99 -fPIC -lm -shared extension-functions.c -o libsqlitefunctions.so to see if that works around the problem? (If not, please post the errors again if they are notably different from the ones you already posted.) -- - stephan beal http

Re: [sqlite] sqlite in-memory mode - Is there any limit about the data size using in-memory mode?

2011-09-12 Thread Stephan Beal
. :-? -- - 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] c89 (long long) compatibility warning in amalgamation build

2011-09-08 Thread Stephan Beal
in, prohibits static linking of my CGI binary).) -- - 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] c89 (long long) compatibility warning in amalgamation build

2011-09-08 Thread Stephan Beal
On Thu, Sep 8, 2011 at 12:32 PM, Stephan Beal sgb...@googlemail.com wrote: i reported this problem before, then retracted it because i couldn't reproduce it, and now i seem to have stumbled again upon the magic combination which triggers it... and of course i should have mentioned: Ubuntu

Re: [sqlite] c89 (long long) compatibility warning in amalgamation build

2011-09-08 Thread Stephan Beal
with that in mind. Yes, you can. i do it all the time, along with inttypes.h for the standard printf/scanf format specifiers (but _those_ don't support int64_t on 32-bit platforms in C89 mode, in my experience). -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] sqlite3.h file?

2011-09-07 Thread Stephan Beal
On Tue, Sep 6, 2011 at 5:33 PM, Eduard Filipas eduard.fili...@volja.netwrote: i searched your website and i cant find sqlite3.h file. where can i get proper one? http://www.sqlite.org/download.html it's part of the download bundles. Try the top link on that page. -- - stephan beal

Re: [sqlite] MemoryScape saying I have LEAKS in my SQLite code?

2011-09-06 Thread Stephan Beal
, if journalMode, eventLogTable, or trigger fail to exec(). -- - 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] MemoryScape saying I have LEAKS in my SQLite code?

2011-09-06 Thread Stephan Beal
not a good idea to continue using the db handle (i would argue, though there are those who could rightly argue otherwise). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http

Re: [sqlite] Strange performance problem

2011-09-05 Thread Stephan Beal
in principal) respond with the first result more quickly. Whether or not that explains the whole difference, i cannot say (only profiling could), but some of the gurus on the list can probably give you some ballpark numbers on the effect the WHERE clause has. -- - stephan beal http

Re: [sqlite] Sharing some speed-test results BLOB vs flat-file... comments?

2011-09-05 Thread Stephan Beal
row (and thus the overhead of the blob is disproportionately high, since we are copying it but not modifying it). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080

Re: [sqlite] Strange performance problem

2011-09-05 Thread Stephan Beal
On Mon, Sep 5, 2011 at 6:59 PM, Dan Kennedy danielk1...@gmail.com wrote: You could get the same effect by wrapping your loop in a BEGIN/COMMIT block. Out of curiosity: would a BEGIN/ROLLBACK be equivalent for this case (where only SELECTs are used)? -- - stephan beal http

Re: [sqlite] Strange performance problem

2011-09-05 Thread Stephan Beal
about multi-anything, then you shouldn't see anything alarming. Doh, i wasn't aware that an explicit rollback is treated as an error, but my quick tests with the JavaScript bindings show that it is. -- - stephan beal http://wanderinghorse.net/home/stephan

<    1   2   3   4   5   6   >