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 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/s

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

2011-09-22 Thread Stephan Beal
> > The following entries pointed by the arrow are duplicated. > Where are they duplicated? The output you provide does not show any duplicates (all have 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/ ___ 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
h result row do > 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

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

2011-09-20 Thread Stephan Beal
hing that SQLite can do to work around it. Other database engines have also run 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] How to store and retrieve list of images from sqlite in android

2011-09-20 Thread Stephan Beal
d i 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://s

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

2011-09-19 Thread Stephan Beal
ere both half right ;). -- - 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
bsequent 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
p://orafaq.com/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://wanderin

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

2011-09-19 Thread Stephan Beal
on, 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.or

Re: [sqlite] UPDATE of field deletes record

2011-09-15 Thread Stephan Beal
)&";" > That code can't possibly evaluate to valid SQL, i think: 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-15 Thread Stephan Beal
ng on an old sqlite3 API (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] About extension-functions.c

2011-09-14 Thread Stephan Beal
maining errors 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

Re: [sqlite] About extension-functions.c

2011-09-13 Thread Stephan Beal
On Wed, Sep 14, 2011 at 6:06 AM, Freddy López wrote: > 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://wanderinghorse.net/h

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

2011-09-12 Thread Stephan Beal
0GB on-storage db on that same machine. :-? -- - 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
o you could workaround with that in mind. > Yes, you can. i do it all the time, along with 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] 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 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 10

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

2011-09-08 Thread Stephan Beal
emoves a dep on -ldl (which, when linked 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] sqlite3.h file?

2011-09-07 Thread Stephan Beal
On Tue, Sep 6, 2011 at 5:33 PM, Eduard Filipas wrote: > 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. -- - ste

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

2011-09-06 Thread Stephan Beal
because of external problems. e.g. out-of-memory or i/o error. Once you get one of these errors, it's generally 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

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

2011-09-06 Thread Stephan Beal
lag; > wouldn't it be simpler (and more accurate) to return rc instead of successFlag (which is not set properly, IMO, 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] Strange performance problem

2011-09-05 Thread Stephan Beal
worry 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://w

Re: [sqlite] Strange performance problem

2011-09-05 Thread Stephan Beal
On Mon, Sep 5, 2011 at 6:59 PM, Dan Kennedy 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://wanderinghorse.net/home/s

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

2011-09-05 Thread Stephan Beal
he whole 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.or

Re: [sqlite] Strange performance problem

2011-09-05 Thread Stephan Beal
conditions and can therefore (at least 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. -- ---

Re: [sqlite] Track DML (from certain clients only)

2011-09-02 Thread Stephan Beal
mall wrapper function which does the logging and executes the statements? It could take additional arguments, e.g. a symbolic name for the source of the query (e.g. "app2.funcA()"). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sql

Re: [sqlite] out of sequence error 2

2011-09-01 Thread Stephan Beal
On Thu, Sep 1, 2011 at 9:10 AM, NOCaut wrote: > > How wait for finish query? > while(q1.step()); // or q1.fetch() <<< this function i not find > try q1.finalize(), as someone suggested for your previous post. -- - stephan beal http://wanderingh

Re: [sqlite] error:library routine out of sequence

2011-08-30 Thread Stephan Beal
On Tue, Aug 30, 2011 at 6:41 PM, NOCaut wrote: > > This line most finalizate > q.finalize(); <<<<<< > > or not? > it doesn't if the query throws unless the query class also calls finalize() in its dtor. -- - stephan be

Re: [sqlite] Max page count not being remembered across close/open in SQLite 3.7.6.3

2011-08-30 Thread Stephan Beal
e using CREATE TABLE ... AS SELECT ... could violate the space constraint. -- - 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] Custom Collation comparing only firt character?

2011-08-26 Thread Stephan Beal
s table (848207 rows): select pays, zip, ville, region from allcountries where typos(ville, > 'saopaul%') < 3 group by pays, ville, region > Cool - can you please post a link to the sources? -- - stephan beal http://wanderinghorse.net/home/stephan/ _

[sqlite] "Possible" doc bug in os_unix.c

2011-08-26 Thread Stephan Beal
that diff (in the unchanged part) which look like they might also need to be updated (but i'm not certain, as i don't grok that code at all): ... ** that the file needs to be extended at this point. Otherwise, the ** SQLITE_FCNTL_SIZE_HINT operation is a no-op for Unix. Happy Hacking

Re: [sqlite] WAL mode and Network filesystems

2011-08-26 Thread Stephan Beal
00% or more. It's probably not always that slow, but it was on the couple of Linux/Solaris systems i tested on a couple years ago. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http:/

Re: [sqlite] Determining size of insert row/query before inserting

2011-08-25 Thread Stephan Beal
GB of that might not be allocatable to non-root processes. -- - 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] Shell tool locks database ? AFP access a problem ?

2011-08-24 Thread Stephan Beal
egory of problem is not specific to the combination of sqlite3/AFP. -- - 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] Shell tool locks database ? AFP access a problem ?

2011-08-24 Thread Stephan Beal
Oracle's CLI client ("sqlplus") - as long as i had sqlplus opened and connected, my PHP pages couldn't insert any data. i.e. this type of problem isn't limited to sqlite3. -- - stephan beal http://wanderinghorse.net/home/stephan/ __

Re: [sqlite] Last record in db

2011-08-22 Thread Stephan Beal
that the "last" insert ID (sqlite3_last_insert_rowid()) in his case was the ID of an insert (in a different table) caused as a side-effect of an on-insert trigger in the original target table. -- - stephan beal http://wanderinghorse.net/home/stephan/

Re: [sqlite] Last record in db

2011-08-22 Thread Stephan Beal
attempt to insert a new row will fail with an SQLITE_FULL error." and didn't consider that there might be different algorithms in play. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sql

Re: [sqlite] Last record in db

2011-08-22 Thread Stephan Beal
ever decrements. If the rowid limit is ever hit (very unlikely to happen!) you'll get a "db full" error, in which case it's probably time to recreate the table to get the rowid to start counting at 1 again. -- - stephan beal htt

Re: [sqlite] update required

2011-08-21 Thread Stephan Beal
se send me some instructions on what I need to install and how to > install it? Thanks a lot. > You just did install it. That program is sqlite. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-u

Re: [sqlite] SQLite + unicode

2011-08-19 Thread Stephan Beal
o maybe it has a byte or two of historical value ;). And for C/C++ wrappers: http://fossil.wanderinghorse.net/repos/cpdo/ cpdo is a PDO-like db access abstraction layer for C. Includes a C++ wrapper API. Happy Hacking! -- - stephan beal http://wanderingh

Re: [sqlite] Strange foreign key constraint failed with DROP TABLE

2011-08-19 Thread Stephan Beal
hen SQLite is not in autocommit mode<http://www.sqlite.org/c3ref/get_autocommit.html>). Attempting to do so does not return an error; it simply has no effect. so the pragma switch would have to come before/after the transaction, as opposed to being part of it. -- - stephan b

Re: [sqlite] EINTR and write() in os_unix.c

2011-08-19 Thread Stephan Beal
tatbuf.st_size==0 && (pFile->fsFlags & SQLITE_FSFLAGS_IS_MSDOS)!=0 ){ do{ rc = osWrite(fd, "S", 1); }while( rc<0 && errno==EINTR ); if( rc!=1 ){ line 1159 in my copy. In that particular case, with a length of 1, they are "probably" semantically e

Re: [sqlite] Strange foreign key constraint failed with DROP TABLE

2011-08-19 Thread Stephan Beal
tion. > The workaround would be simply to switch the order of the DROP TABLEs, wouldn't it? -- - 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] EINTR and write() in os_unix.c

2011-08-19 Thread Stephan Beal
On Thu, Aug 18, 2011 at 6:10 PM, Stephan Beal wrote: > On Thu, Aug 18, 2011 at 5:27 PM, David Garfield < > garfi...@irving.iisd.sra.com> wrote: > >> I HOPE that an interrupt in a large interrupted write will NOT return > > EINTR, because if it does, the partial write i

Re: [sqlite] EINTR and write() in os_unix.c

2011-08-18 Thread Stephan Beal
or > EAGAIN, or maybe some others. > That's the key semantic i was missing. > I HOPE that an interrupt in a large interrupted write will NOT return > EINTR, because if it does, the partial write is screwed up. > i hope so, too! :-D Thank you for your

Re: [sqlite] EINTR and write() in os_unix.c

2011-08-18 Thread Stephan Beal
a little gem i didn't know. That clarifies things greatly. Thank you :). -- - 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] EINTR and write() in os_unix.c

2011-08-18 Thread Stephan Beal
quot; given this particular problem, and i'm suspicious because of that. It _seems_ to be exactly what i'm looking for, but i also know that my knowledge for the effect of EINTR on system calls is too constrained for me to have my own educated, confident opinion on it. -- - stephan beal h

[sqlite] EINTR and write() in os_unix.c

2011-08-18 Thread Stephan Beal
which we kids should not try at home. :-? -- - 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] forcing X'' literals in sqlite3's .dump?

2011-08-17 Thread Stephan Beal
On Wed, Aug 17, 2011 at 11:52 PM, Richard Hipp wrote: > On Wed, Aug 17, 2011 at 12:28 PM, Stephan Beal >wrote: > > > But the reality is still: if the sqlite3 shell links with libreadline, it > > is GPL. > > > > > Not. > Sorry, i wasn't clear: the res

Re: [sqlite] null handling import

2011-08-17 Thread Stephan Beal
o do... Happy Hacking! -- - 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] forcing X'' literals in sqlite3's .dump?

2011-08-17 Thread Stephan Beal
On Wed, Aug 17, 2011 at 6:25 PM, Stephan Beal wrote: > Just to be pedantic for a moment: the shell is GPL if you #define > USE_READLINE to a true value. Such is the reality of viral licenses. From > shell.c: > And to be even more pedantic: that code came from the WRONG shell.c (

Re: [sqlite] forcing X'' literals in sqlite3's .dump?

2011-08-17 Thread Stephan Beal
istory(X) # define write_history(X) # define stifle_history(X) #endif -- - 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] Bulk Insert

2011-08-13 Thread Stephan Beal
ill > taking minutes to record that data. > The answer is the same as it was yesterday: wrap the inserts in a transaction. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://s

Re: [sqlite] Bulk Insert

2011-08-12 Thread Stephan Beal
On Fri, Aug 12, 2011 at 2:09 PM, Sumit Gupta wrote: > query is only reading about 400-500 record per minute. This way it is going > If you are not currently using a transaction to wrap the whole import, add a transaction and the speed will improve a great deal. -- - stephan bea

Re: [sqlite] SQLite + unicode

2011-08-10 Thread Stephan Beal
berally licensed. -- ----- 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] Feature request: extend the IN operator

2011-08-07 Thread Stephan Beal
uot;), in the form you describe, is not ANSI-specified. -- - 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] Example of implementing undo/redo using sqlite3?

2011-08-04 Thread Stephan Beal
On Thu, Aug 4, 2011 at 9:44 PM, Alexey Pechnikov wrote: > > http://sqlite.mobigroup.ru/artifact/265e408b4352d66cfc79a9990cb2c22fb390d3b6 > > http://sqlite.mobigroup.ru/artifact/2250bbbc83f80eff73ce003ab7a30293c688ae9b That is one of the coolest things i've seen months :).

Re: [sqlite] Example of implementing undo/redo using sqlite3?

2011-08-04 Thread Stephan Beal
On Thu, Aug 4, 2011 at 8:13 PM, Dustin Sallings wrote: >https://github.com/dustin/kvtest/blob/master/sqlite-base.cc#L160 > The code is short and to the point. Thank you :). -- - stephan beal http://wanderinghorse.net/home/s

[sqlite] Example of implementing undo/redo using sqlite3?

2011-08-04 Thread Stephan Beal
undo/redo implementation can be written in surprisingly little code." i'm wondering if anyone can point me to an example of implementing such a beast? -- ----- stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing li

Re: [sqlite] Need Help! -- SQlite database on server

2011-08-04 Thread Stephan Beal
On Thu, Aug 4, 2011 at 7:50 PM, Stephan Beal wrote: > http://www.sqlite.org/whentouse.html > Specifically: 2nd section, 1st list item. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite

Re: [sqlite] Need Help! -- SQlite database on server

2011-08-04 Thread Stephan Beal
On Thu, Aug 4, 2011 at 7:15 PM, Vinoth raj wrote: > It would be a great help if you can shed some light on my problem. Is it > possible at all to save SQLite database on a server? > http://www.sqlite.org/whentouse.html -- - stephan beal http://wanderinghorse.net/hom

Re: [sqlite] Deep copy of 2 sqlite3*?

2011-08-03 Thread Stephan Beal
oints to them. A memcpy() will copy the pointers but not their contents. i.e. you'll have 2 copies of an sqlite3 handle which both point to (and own!) the underying memory. NEVER use memcpy() to copy non-trivial types (e.g. those which contain owned pointers). -- - stephan

Re: [sqlite] Deep copy of 2 sqlite3*?

2011-08-03 Thread Stephan Beal
ost never" a good idea to implement copy ctors for classes which refer to stream handles and such. The absolute simplest/sanest/safest way to implement this is to declare the copy ctor and copy assignment operator as private and NOT implement them. -- - stephan beal http://wand

Re: [sqlite] Field drop work around

2011-08-02 Thread Stephan Beal
wo which i'm not aware of. -- - 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] Sqlite3_step problem

2011-08-02 Thread Stephan Beal
y using command line tool. > ...what could be the reason > Can you show us the C code? Without that we can only guess. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sq

Re: [sqlite] Reducing compiled size

2011-07-25 Thread Stephan Beal
-..." So it seems that OPTS= is missing. -- - 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] Reducing compiled size

2011-07-25 Thread Stephan Beal
On Mon, Jul 25, 2011 at 4:39 PM, Dave Hope wrote: > make sqlite3.c "-DSQLITE_OMIT_ALTERTABLE -DSQLITE_OMIT_ANALYZE > Shouldn't that be: make sqlite3.c CPPFLAGS="..." ? Make doesn't understand -D (no, that's not a smiley). -- - stephan beal ht

Re: [sqlite] Selected string differs to Inserted one

2011-07-24 Thread Stephan Beal
cii-compatible up to value 127). -- - 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] Performance Improvement

2011-07-18 Thread Stephan Beal
y case: that page claims that the limit of the file size is theoretically 2^64 but that 14TB is the practical limit. i thought that the limit was somewhere under 4GB. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing

Re: [sqlite] Performance Improvement

2011-07-18 Thread Stephan Beal
resses (as you demonstrated), 10 bytes x 100B records = 1 terrabyte JUST for the addresses (not including any sqlite3-related overhead per record, which is probably much larger than the 10 bytes you're saving). -- - stephan beal http://wanderinghor

Re: [sqlite] Minimize sqlite3.o size

2011-07-12 Thread Stephan Beal
ptimizations is not an option)? If I know > Coincidentally, i just tried -O3 and the end result was almost 0.5MB larger than with -g -Os. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@

Re: [sqlite] Insert not working for sqlite3

2011-07-11 Thread Stephan Beal
On Mon, Jul 11, 2011 at 2:41 AM, James_21th wrote: > $result=$dbh->query("create table tbl2 (one varchar(10),two > varchar(10));"); > A CREATE statement has no results. In PDO, only SELECT (and similar) return a result, if i'm not mistaken. -- - stephan beal htt

Re: [sqlite] Can a sys admin control temporary file location without changing the source code?

2011-07-09 Thread Stephan Beal
however your db is named) Order allow,deny Deny from all so that people who know the db is there can't fetch it over http. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-user

Re: [sqlite] Insert not working for sqlite3

2011-07-08 Thread Stephan Beal
this in order to write the journal). > > $dbh = new PDO('sqlite:db1.db'); > $result=$dbh->query("create table tbl2 (one varchar(10),two > varchar(10));"); > var_dump($result); > ?> > Can you show us the OUTPUT of that command? And i highly recommend

Re: [sqlite] Insert not working for sqlite3

2011-07-07 Thread Stephan Beal
On Thu, Jul 7, 2011 at 2:17 PM, Simon Slavin wrote: > For each operation you should test the $result and check to see it's > SQLITE_OK. > Or enable exceptions and you don't have to check for errors (because they will cause an exception). -- - stephan beal http://wand

Re: [sqlite] Insert not working for sqlite3

2011-07-07 Thread Stephan Beal
O _only_ throws exceptions if you set the exceptions reporting option. Try instantiating it like this: $attr = array( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION ); $dbh = new PDO($dsn, "", "", $attr ); -- - stephan beal http://wanderinghorse.net/home/stephan/

Re: [sqlite] Insert not working for sqlite3

2011-07-06 Thread Stephan Beal
(same directory)? -- ----- 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] Insert not working for sqlite3

2011-07-06 Thread Stephan Beal
ck will be greately appreciated! > See: http://www.php.net/manual/en/pdo.error-handling.php and enable exception throwing. Then any errors will throw an exception and the problem will be easy to track down. -- - stephan beal http://wanderinghorse.net/home/stephan/ __

Re: [sqlite] Statement is not executing

2011-07-05 Thread Stephan Beal
ould expend the effort to look for a real solution, rather than relying on something like that (i can't sleep at night if i know my software might break at any second due to hacks like that one). -- - stephan beal http://wanderinghorse.net/home/stephan/ __

Re: [sqlite] Can a sys admin control temporary file location without changing the source code?

2011-06-30 Thread Stephan Beal
memory for the journal, but i was assuming the journal is considered a temp file. -- - 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] Can a sys admin control temporary file location without changing the source code?

2011-06-30 Thread Stephan Beal
On Thu, Jun 30, 2011 at 9:06 PM, Tom Browder wrote: > Thanks, Richard (and Simon), I think I can solve my web access problem > by giving the db file its own directory. > You can also try disabling the temp files (telling it to use memory instead). -- - stephan

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Stephan Beal
ter wrote about it in "C++ Coding Standards", if i'm not mistaken. -- - 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] Is this a BUG or am I wrong ? sub-select returns nothing when column id matches the inner query

2011-06-28 Thread Stephan Beal
ouble quotes, but that is an unportable SQL extension. -- - 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] Is this a BUG or am I wrong ? sub-select returns nothing when column id matches the inner query

2011-06-28 Thread Stephan Beal
On Tue, Jun 28, 2011 at 8:42 PM, thilo wrote: > sqlite> select (select v from t1 where n="a") wrong,* from a1; > use SINGLE quotes, not double quotes. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Stephan Beal
le and needs HARD TABS, which will almost certainly be lost through the email path. -- - 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 sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Stephan Beal
On Tue, Jun 28, 2011 at 8:04 PM, Stephan Beal wrote: > You're both very right, and might i suggest a compromise: in my latest > Might i add that all involved machines were some flavour of Linux, which favour's Simon's argument against relying on the system's sqlite

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Stephan Beal
we use whatever's on the system. i did that because when i launched my project on my web hoster i found that i couldn't compile there because they have an ancient (3.3?) sqlite3. So i added the option to add your own amalgamation to my tree. -- - ste

Re: [sqlite] Compile sqlite3 with g++? Do I need a wrapper?

2011-06-28 Thread Stephan Beal
sing g++? If so, please tell me how. > There is NOTHING wrong with mixing .c and .cpp files in one C++ project. Compile the C code with gcc and C++ code with g++, and then link them together as you would any other objects. -- ----- stephan beal http://wanderinghorse.n

Re: [sqlite] Best solution to import big DBF file?

2011-06-27 Thread Stephan Beal
red text files. -- - 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] lol: sqlite3 db smaller than the sum of its contents...

2011-06-23 Thread Stephan Beal
system that do versioning as well as backups > (such as Time Machine). > In this case that's not the issue - the application using the db _is_ the wiki back-end/manager, so the pages have to be in the db. i only have them as files because i imported them from a GoogleCode project. -

[sqlite] lol: sqlite3 db smaller than the sum of its contents...

2011-06-23 Thread Stephan Beal
), and the extra 80kb were from the hard drive's large block size (slack space reported by 'df'). Kinda funny, though, that sqlite3 actually decreases the amount of storage required in this case. -- - stephan beal http://wander

[sqlite] announce: new sqlite3 JavaScript binding

2011-06-12 Thread Stephan Beal
For that small handful of sqlite3+v8 hackers out there... http://code.google.com/p/v8-juice/wiki/JSPDO JSPDO is a PHP PDO-like db access abstraction API, but using JavaScript (via the Google v8 JS engine). It supports sqlite3 and MySQLv5. Happy Hacking! -- - stephan beal http

Re: [sqlite] Fwd: Possible small memory leak

2011-06-07 Thread Stephan Beal
instinct is to trust this description. The linux man pages tend to explicitly mark any behaviours which do not conform to the spec(s) mentioned in the "CONFORMING TO" section of the given man page. -- - stephan beal http://wanderinghorse.net/home/stephan/ __

Re: [sqlite] Bug in sqlite3_bind_parameter_name

2011-06-01 Thread Stephan Beal
l so far, and i haven't yet had any mis-parsing except on code which was itself not legal SQL (i.e. it doesn't seem to create any new problems where there isn't already a problem). -- - stephan beal http://wanderinghorse.net/home/stephan/ __

Re: [sqlite] Create DB file and then Create Table - Table FAILS.

2011-06-01 Thread Stephan Beal
m a session with the MySQL or ocilib (Oracle) 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-users

Re: [sqlite] alter table add column

2011-05-31 Thread Stephan Beal
/lang_altertable.html and read the 3rd paragraph. If it is not part of a trigger, then simply correct the spelling in your program/SQL script. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sq

Re: [sqlite] alter table add column

2011-05-31 Thread Stephan Beal
data. If it did, the runtime would probably be O(N) or worse, not O(1) (as described above). -- - 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] Bug in sqlite3_bind_parameter_name

2011-05-31 Thread Stephan Beal
r purposes of bind_parameter(), or may only parameters in the main expression be named? e.g. if @p1 had been part of the WHERE clause in a subselect? -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users

Re: [sqlite] Prepare and exec

2011-05-23 Thread Stephan Beal
e3_step( Stmt ) ) { my_callback( Stmt ); } -- - 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] Sqlite Files

2011-05-22 Thread Stephan Beal
te shell: http://www.sqlite.org/sqlite.html -- ----- 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 Fossil usage

2011-05-19 Thread Stephan Beal
ighly recommend leaving autosync on (at least most of the time). If it is turned off and you forget to manually push/pull from one of your machines, it can easily lead to an unintentional fork (been there, done that many times). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___

<    1   2   3   4   5   6   7   >