Re: [sqlite] OT: how best to convert sqlite3_int64 to and from string in a cross platform fashion?

2009-05-04 Thread Dan
rm bit shifting and will be much faster than the > string conversions. You're thinking of the varint format used in the file-format: http://www.sqlite.org/fileformat.html#varint_format sqlite3_int64 is just a typdef of int64_t on most platforms. Dan. > > > HTH, &

Re: [sqlite] Performance of in-memory database and memory journal

2009-05-06 Thread Dan
ement? In this case it will only matter if you have statements that affect more than one row that could hit a constraint. i.e. an UPDATE or an INSERT INTO ... SELECT statement. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Performance of in-memory database and memory journal

2009-05-06 Thread Dan
; INTO >> ... SELECT statement. > > So, if I always do INSERT ... VALUES (), i.e. always insert only one > row by one statement, then this insert will be able to rollback > harmlessly even without journal? Assuming it's a constraint failure that causes the rollback that

Re: [sqlite] SQLite version 3.6.14 and async vfs

2009-05-07 Thread Dan
hed through. > And another question just to be sure that I understand it correctly: > async vfs holds only one queue for all opened database files, right? True statement. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite3_open_v2 and SQLITE_BUSY

2009-05-07 Thread Dan
torSize() and xDeviceCharacteristics(). But that's all, nothing is read, written or locked until later on. So you won't get SQLITE_BUSY back from sqlite3_open_v2(). You might manage an SQLITE_CANTOPEN if you tried to open a directory or, depending on the flags passed t

Re: [sqlite] SQLite version 3.6.14

2009-05-08 Thread Dan
by a power failure or OS crash. When using asynchronous IO this should not be possible (assuming the hardware is not being untruthful - just as when using regular "PRAGMA synchronous=full" mode without the async IO VFS). Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bad UPDATE performance

2009-05-12 Thread Dan
t; same > operation on the DB multiple times, after a while everything will > become > slow. Maybe try this patch: http://www.sqlite.org/cvstrac/chngview?cn=6619 Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bad UPDATE performance

2009-05-13 Thread Dan
On May 14, 2009, at 4:08 AM, Ofir Neuman wrote: > Thanks Dan this was very helpful it seems that I have a similar > problem. > > Didn't try the patch yet but I find out a scenario to reproduce the > problem. > > 1. Process A perform UPDATE on bunch of record

Re: [sqlite] Bad UPDATE performance

2009-05-14 Thread Dan
On May 14, 2009, at 2:33 PM, Ofir Neuman wrote: > Dan, > > Before I got your reply I checked it with Pcache1RemoveFromHash() > and it > fixed the problem. > > I will re-check this issue with pCache->nPage-- but I guess that it > will fix > the problem as

Re: [sqlite] seg fault in sqlite3MemFree

2009-05-14 Thread Dan
enough to figure out why the pointer is decremented, but it seems this > is causing core dumps only with virtual tables. > > Did anybody else see this? Am I doing something wrong? Do you have a stack trace for the crash? On linux, open the core with [gdb ] and type "where". Dan.

Re: [sqlite] SQLITE_ENABLE_MEMORY_MANAGEMENT still single threaded?

2009-05-18 Thread Dan
r threads to do both writes and reads - bad > for > performance. Using the same thread/connection-handle for reading and writing a database might improve performance. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to install the latest version of sqlite3 on Ubuntu?

2009-05-18 Thread Dan
/sbin:/bin:/usr/ > games > So I think the executable file sqlite3 is seen by PATH. > Could you please tell me any more suggestions? $ ldd /usr/local/bin/sqlite3 Check it's linking to the correct libsqlite3.so. Dan. > > > > > > > _

Re: [sqlite] about insert into select

2009-05-20 Thread Dan
to table A; > (2) select a row from B ,then insert the row into table A > immediately, repeat the precess. Usually strategy 2. Falls back to 1 if A and B are the same table, or if there are triggers that imply inserting rows into B may modify A. Dan. > > > > > > __

Re: [sqlite] about sqlite on line back up API

2009-05-22 Thread Dan
e has > finished. Did you open the flash database with "PRAGMA locking_mode=exclusive", or some other option that would turn on persistent journals? Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] read_uncommitted=on; question

2009-05-25 Thread Dan
from that table until connection A either COMMITs or ROLLBACKs its open transaction. Trying to do so returns SQLITE_LOCKED. However, when in read_uncommitted=1 mode, the second connection reads the modified contents of the table, even though that data has not yet been (and indeed may never be

Re: [sqlite] [sqlite-dev] How to install sqlite3-3.6.14.1.bin.gz

2009-05-25 Thread Dan
On May 25, 2009, at 2:52 PM, Manasi Save wrote: > Hi, > > Can anyone help me on how to run sqlite3-3.6.14.1.bin.gz on Linux > machine. > I am working on Fedora 10. Please if anyone can provide any input on > this. Like this: d...@computer2:~/tmp$ wget http://www.sqlite.org/sqlite3-3.6.1

Re: [sqlite] database file header: "schema layer file format" anomaly

2009-05-26 Thread Dan
een such > documents and reality should always be reported, so here it is. As you say, probably not important in practice but still worth getting right. Thanks for reporting this. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] suggested changes to file format document

2009-05-26 Thread Dan
> Thanks very much for catching these. Document is now updated with the fixes in the fossil docsrc repository. Dan. > 1. In the following, s/less than/less than or equal to/ > > """ > 2.3.3.4 Index B-Tree Cell Format > [snip 2 paragraphs] > > If t

Re: [sqlite] Alignment bug in SQLIte 3.6.14.2

2009-05-26 Thread Dan
Looks like the same issue as reported here: http://www.sqlite.org/cvstrac/tktview?tn=3869 Fix will be included in 3.6.15. Or just grab the patch here if you're in a hurry: http://www.sqlite.org/cvstrac/chngview?cn=6666 Dan. On May 27, 2009, at 12:12 PM, Brian Dantes wrote: &g

Re: [sqlite] Some index questions

2009-05-27 Thread Dan
27;m curious what > is the benefit or application of a compound index compared to two > single indexes ? Such a query can use the compound index T1Idx above. It can do the following too: WHERE b = 3 AND c = 4; WHERE b = 3 AND c > 4; but cannot be used to optimize: WHERE c =

Re: [sqlite] Some index questions

2009-05-27 Thread Dan
On May 27, 2009, at 10:13 PM, Marcus Grimm wrote: > Hi Dan, > > thanks for your answers: this was exactly what I was looking for. > > Dan wrote: >> On May 27, 2009, at 9:08 PM, Marcus Grimm wrote: >>> >>> The difference, I guess, to a "real" sq

Re: [sqlite] Compite with DSQLITE_THREADSAFE=1 but application has mulitple threads using the same connection

2009-06-09 Thread Dan
On Jun 10, 2009, at 5:23 AM, Joanne Pham wrote: > Sorry Couldn't locate the email about Compite with > DSQLITE_THREADSAFE=1 bu the application has multiple threads using > the same connection? > Would you pleas direct me to any document that has this info. > Thanks, > JP > http://www.sqli

Re: [sqlite] Questions from a new user

2009-06-18 Thread Dan
_reset() or sqlite3_finalize() on the statement handle. You can also invalidate it by calling sqlite3_column_text16(), or bytes16(). In this case the buffer that contains the utf-8 representation (a pointer to which is returned by sqlite3_column_text()) is discarded to make room for the utf-16

Re: [sqlite] Asynchronous I/O Module For SQLite

2009-06-18 Thread Dan
piled into the app, and seem to > stand apart from the core sqlite3, I was curious if I could use them > with sqlite3 version 3.5.9 since that version is already in use in > my organization. Might very well work on unix systems. I think there were some incompatibilities with the windows

Re: [sqlite] async io and locks

2009-06-19 Thread Dan
e the database was unlocked and modify table t2, changing the set of rows selects. Of course, if the asynchronous thread manages to commit the first transaction to disk before the user has time to execute the second, the database file will be unlocked between transactions. Dan. __

Re: [sqlite] async io and locks

2009-06-19 Thread Dan
On Jun 20, 2009, at 6:22 AM, Robert Lehr wrote: > Once again, I am forced to reply to the top-level, outside the thread > b/c I am not receiving individual replies. I apologize for the > inconvenience. > > On Jun 20, 2009, at 12:30 AM, Dan wrote: >> On Jun 20, 2009, at

Re: [sqlite] Interrupting sqlite

2009-06-22 Thread Dan
ment handle should be sqlite3_reset() or sqlite3_finalize(). Dan. > This > way I could try to interrupt the statement many times so I can > continue to process the main loop to get the UI going. > > Thanks. > ___ > sqlite-users m

Re: [sqlite] ROWID of 0

2009-06-26 Thread Dan
On Jun 26, 2009, at 11:13 PM, Shaun Seckman (Firaxis) wrote: > I have a column ("ID") in a table that is the primary key integer so > it > should be an alias for ROWID. Is it safe to have a ROWID of 0? Yes. > > > > > -Shaun > > > > > > ___ > sqli

Re: [sqlite] unable to write the string "1.0" into a database table

2009-06-27 Thread Dan
>fprintf(stderr, "sqlite3_stmt: %s", sqlite3_errmsg(db)); >goto out2; >} > >ret = sqlite3_bind_text(stmt, 1, "1.1", strlen("1.1") + 1, >SQLITE_TRANSIENT); >if (ret != SQLITE_OK) { >fprintf(stder

Re: [sqlite] Database triggers

2009-06-29 Thread Dan
On Jun 29, 2009, at 2:44 PM, Kris Groves wrote: > Given the trigger creation statement : > CREATE TRIGGER triggername DELETE ON tablename BEGIN statements; END > > When does it happen ? BEFORE or AFTER ? > > I've read http://sqlite.org/lang_createtrigger.html, but it is > unclear to me. If I h

Re: [sqlite] problem with SQLITE_BUSY

2009-07-04 Thread Dan
On Jul 4, 2009, at 8:12 PM, Wenton Thomas wrote: > I use prepare statements, and I am sure I finalize all of them. You may be mistaken. sqlite3_next_stmt() will return 0 if all statements really are finalized. assert( sqlite3_next_stmt(db, 0)==0 );

Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Dan
e system-installed version. :-) You will need to build from the source tarball (the one with the unsupported configure script), not the amalgamation package for this to work. Dan. > Can anyone help me? > > Thanks, > > Andy > > > > > ___

Re: [sqlite] SQLITE_ENABLE_UPDATE_DELETE_LIMIT Works?

2009-07-06 Thread Dan
le and include RTREE and UPDATE_DELETE_LIMIT. > > Any ideas? I tried putting a > > #define SQLITE_ENABLE_UPDATE_DELETE_LIMIT 1 > > into sqlite3.h, but that didn't work. :( The makefiles in the full source tarball support a target "sqlite3.c". Build this targe

Re: [sqlite] Performance issue in using 'LIKE' with Indexes.

2009-07-08 Thread Dan
elect query > with "column_name LIKE 'a%' ". > So my first question is will this query use the index created or not? Possibly. Details are here: http://www.sqlite.org/optoverview.html#like_opt Dan. ___ sqlite-users mailing li

Re: [sqlite] string is converted into a number

2009-07-13 Thread Dan
On Jul 13, 2009, at 3:38 PM, Wilfried Mestdagh wrote: > Hi, > > It seems that if I create the table as a field type 'char' instead of > 'string' then the issue is solved. But I thought the field type was > of non > importance? Details here: http://www.sqlite.org/datatype3.html#affinity >

Re: [sqlite] SQLite 3.6.16 and the Asynchronous I/O transaction fails with multiple database files

2009-07-18 Thread Dan
http://www.sqlite.org/cvstrac/getfile?f=sqlite/ext/async/sqlite3async.c&v=1.7 Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sqlite_mem_methods

2009-07-23 Thread Dan
xSize I don't think will be > possible to implement at all. Write a wrapper that allocates the requested size plus an 8-byte header each time an allocation is requested. Use the header space to store the size of the allocation. Dan. > ___ &g

Re: [sqlite] Installing SQLite

2009-07-23 Thread Dan
On Jul 23, 2009, at 10:50 PM, Jay A. Kreibich wrote: > On Thu, Jul 23, 2009 at 09:46:24AM -0400, Wilson, Ron P scratched on > the wall: > >> I think the OP just has the wrong expectations. > > Yes, and no. While SQLite doesn't have a one-click-to-install > download, I have to agree that the

Re: [sqlite] Nested transactions

2009-07-24 Thread Dan
e lock, delete records from the database file, then downgrade back to a read lock. Dan. > > As a second note: it's pretty bad idea to change table which is used > in not yet finished select statement. In SQLite it can lead to > unpredictable behavior. E.g. rows that you've alr

Re: [sqlite] SQLite lock behavior in shared-cache mode

2009-07-27 Thread Dan
While compiling any statement (sqlite3_prepare_v2()), or while stepping (sqlite3_step()) a statement that accesses the main database, a mutex associated with the in-memory cache of the main database will be held. Dan. On Jul 27, 2009, at 11:16 PM, Alessandro Merolli wrote: >

Re: [sqlite] benchmarking UTF8 vs UTF16 encoded databases

2007-11-27 Thread Dan
atabase doesn't match that of the machine it is used on. But not much. Dan. - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Transactional DDL

2007-11-27 Thread Dan
t transactional? VACUUM is obviously one of them, are there any other? Some of the pragma statements. Can't think of anything else. Dan. - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: AW: [sqlite] Transactional DDL

2007-11-27 Thread Dan
with everything else. Dan. Mike -Ursprüngliche Nachricht- Von: Dan [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 27. November 2007 15:59 An: sqlite-users@sqlite.org Betreff: Re: [sqlite] Transactional DDL On Nov 27, 2007, at 9:47 PM, Igor Sereda wrote: I noticed that CREATE TABLE

Re: [sqlite] How to run SQLite tests

2007-11-28 Thread Dan
n built into it. Use testfixture to run the script "quick.test" from the test directory (takes from 2-4 minutes). Once that passes, run "all.test" (warning - takes upwards of 30 minutes to run). $ ./testfixture ../sqlite

Re: [sqlite] ftruncate() for values greater than file size

2007-11-29 Thread Dan
ith normal operation. Not 100% sure, just guessing... Dan. Thanks! Mark -- --- To unsubscribe, send

Re: [sqlite] UNION and ORDER BY errors starting from sqlite 3.4.2

2007-12-04 Thread Dan
b FROM x2 ORDER BY [x1.b]; SELECT x1.b, a FROM x1 UNION SELECT a, b FROM x2 ORDER BY 1; Because it is consistent with this kind of statement: SELECT "x1.b" FROM (SELECT x1.b FROM x1); Any opinions? Dan

Re: [sqlite] Cache resizing problem.

2007-12-04 Thread Dan
#x27;s internal schema until step 6. By the time it is loaded for the first time in step 6 the "student_master" table has already been added. Hence no problem. Dan. - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] UNION and ORDER BY errors starting from sqlite 3.4.2

2007-12-04 Thread Dan
On Dec 4, 2007, at 10:35 PM, Joe Wilson wrote: --- Dan <[EMAIL PROTECTED]> wrote: i.e., if we have: CREATE TABLE x1(a, b, c); CREATE TABLE x2(a, b, c); then the following pairs of statements are equivalent: ... SELECT x1.b, a FROM x1 UNION SELECT a, b FROM x2 ORDE

Re: [sqlite] Cache resizing problem.

2007-12-04 Thread Dan
On Dec 4, 2007, at 11:47 PM, Dennis Cote wrote: Dan wrote: This is failing because the internal representation of the database schema used by the first connection has not yet been updated to include the changes made in step 4 by the second connection. After the sqlite3_prepare() in step 6

Re: [sqlite] UNION and ORDER BY errors starting from sqlite 3.4.2

2007-12-05 Thread Dan
On Dec 5, 2007, at 1:24 AM, Joe Wilson wrote: --- Dan <[EMAIL PROTECTED]> wrote: The "b" in the ORDER BY does not match "x1.b" because it is not a simple identifier (according to matchOrderbyToColumn()). It does not match either "" or " as ".

Re: [sqlite] unable to open a temporary database file for storing temporary tables

2007-12-06 Thread Dan
When issuing PRAGMAS, do they have to be issued from sqlite executable or can they also be issued via the Tcl API? Pragmas can be executed via the Tcl API, because they are a part of SQLite's SQL dialect. Unlike the 'dot-commands' that are only available in the s

Re: [sqlite] Querying DATE column with date/time string.

2007-12-06 Thread Dan
7;2008-01-31 23:59:59.99'; sqlite> .quit In English, why does adding the 'time' portion to the between clause not find the record? Because according to the default collation sequence, strcmp(), the string '2008-01-01 00:00:00' is larger than '20

Re: [sqlite] Simple question about optimization

2007-12-10 Thread Dan
On 10/12/2007, Kees Nuyt <[EMAIL PROTECTED]> wrote: On Mon, 10 Dec 2007 12:22:53 +0100, Clodo <[EMAIL PROTECTED]> wrote: In this case: - CREATE TABLE test ( Field01 text PRIMARY KEY NOT NULL, Field02 text ); insert into test values ('alpha','beta'); update test

Re: [sqlite] Regarding explicitly managing SQLite Databases....[Resend]

2007-12-10 Thread Dan
/www.sqlite.org/pragma.html) help any? Dan. (a) Since I am new to SQLite, I would like to hear from the community on how this can be done using what SQLite3 provides. If there are specifics that need to be managed outside the context of SQLite, I am fine with that. However, for doing extern

Re: [sqlite] Seg fault after calling sqlite3_exec while running under cygwin

2007-12-10 Thread Dan
trace in gdb I gather the following info: Does the sqlite3 shell work when compiled the same way? Dan. - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] Regarding explicitly managing SQLite Databases....[Resend]

2007-12-11 Thread Dan
statements are being executed, I would like to - for example - redirect the queries to another data base when 70% of the space is reached. How can I do that? I think you would have to check the size of the file on disk using external (non-SQLite) APIs before each insert. Dan. ~Yuva On Dec

Re: [sqlite] shared cache and 'no such table' issue

2007-12-27 Thread Dan
roblem? Should be fixed by: http://www.sqlite.org/cvstrac/chngview?cn=4643 Please post if you find this is not the case (or if you find it is). Dan. - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] C API: Manifest type SQLITE_INTEGER: Is it 32- or 64-bit?

2008-01-03 Thread Dan
retrieve a value, it is truncated to 32-bits before returning it. So to be safe, you're better off always using sqlite3_column_int64(). Dan. I don't know whether or not I'm just "lucky" that the application which wrote the database uses 64 bit for all of its integers?

[sqlite] configure script for amalgamation

2008-01-09 Thread Dan
his out post if it fails to install, fails to detect readline, fails to build shared library on your AIX system, that sort of thing. Thanks in advance. Dan. - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] How do I add primary key on existing table?

2008-01-20 Thread Dan
E to add a constraint or a new column marked as PRIMARY KEY is not supported. You can get pretty much the same effect by doing: CREATE UNIQUE INDEX custsales_i ON custsales(id, type); Dan. - To unsubscribe, send email

Re: [sqlite] Program is crahed on sqlite3_bind_int- Could you please help

2008-01-21 Thread Dan
sqlite3_bind_int. I couldn't figure out what is the problem and how to fit it. It used to work last week. Could you please help. It's likely that the statement handle is invalid or has already been passed to sqlite3_finali

Re: [sqlite] FTS3 Unicode support

2008-01-24 Thread Dan
One of the example tokenizers uses the ICU library for localization. See the same document for details. It is built if the SQLITE_ENABLE_ICU macro is defined when fts3 is compiled. Regards, Dan. - To unsubscribe, send email to [EMAIL PROTECTED] -

Re: [sqlite] SQLite Compilation Problems on FreeBSD

2008-01-27 Thread Dan
ot;sqlite-amalgamation-3_5_4.zip" produced the same errors as sqlite-source-. Hi, Can you try the experimental configure system in this package and let us know if it works: http://www.sqlite.org/sqlite-3.5.4-autoconf.tar.gz Thanks, Dan. I have compiled, installed, linked, and used i

Re: [sqlite] Solaris bus error

2008-01-31 Thread Dan
then see if you can get a stack trace for another thread? Thanks. Dan. Ken <[EMAIL PROTECTED]> wrote: Core/backtrace info: (gdb) core-file core Core was generated by `/home/ixion/LIB/sqlite3test/.libs/ testfixture ../sqliteSrc/sqlite-3.5.5/test/qu'. Program terminated with signal

Re: [sqlite] WHERE clause

2008-02-05 Thread Dan
On Feb 6, 2008, at 1:00 PM, Pavel Dedik wrote: > Hi all, > > how can I escape the '%' in where clause? > I suggested the query may look like this: > > *SELECT * from tbl where field LIKE '%\%text'; Try: select * from a w

Re: [sqlite] SQLite Web Site

2008-02-06 Thread Dan
he incorrect HTML is equivalent to the HTML suggested by the validator. Fair enough I guess, both versions are unambiguous and the suggested version is better. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Why attach databases?

2008-02-07 Thread Dan
an atomic operation (either all the changes will succeed or none of them). You can't do that with two separate database handles. Dan. > I was initially thinking that I could attach every database I had > with the > same schema and execute queries without specifying database names.

Re: [sqlite] Is this list available in *DIGEST* form??

2008-02-07 Thread Dan
On Feb 8, 2008, at 11:31 AM, Rob Sciuk wrote: > > How do I sign up for the digest rather than the regular feed?? > > > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users Use the webpage linked above. Dan. ___ sqlite-use

Re: [sqlite] Virtual table xBestIndex and when to free index resource

2008-02-11 Thread Dan
e resource that really does require a destructor (a connection handle to some other database etc.), do not open it in xBestIndex(). Open it in xFilter() and close it in xClose(). Each xFilter() call should be matched by exactly one xClose(). Regards, Dan. _

Re: [sqlite] Nested calls to prepare/step/prepare

2008-02-28 Thread Dan
> } > } > > > So my questing is, does sqlite allow a prepare to be started while > a prior prepared statement is still open? Hi, This is supposed to be Ok. If you can supply an example program to demonstrate the crash that would

Re: [sqlite] Multiple databases

2008-03-02 Thread Dan
t databases, even those with the same schema. If the table/index locations are different but the schema cookie is the same, you are risking database corruption. Also, prepared statement structures contain some pointers back to the database handle that was used to create them. Not sure what the implicati

Re: [sqlite] bus error with SQLite 3.5.6

2008-03-02 Thread Dan
base? Or send it to me if you don't want it made public. Also, the exact sqlite version might be helpful. Alternatively, can you compile with debugging symbols enabled and post a stack trace? Thanks, Dan. On Mar 3, 2008, at 4:33 AM, P Kishor wrote: > I have a fairly simple db with fts3

Re: [sqlite] SQLite Crashes

2008-03-02 Thread Dan
but some others show it being called from other parts of SQLite that make no sense to me. This one is particularly odd: http://crash-stats.mozilla.com/report/index/8b54f1c5-e8aa-11dc- b466-001a4bd43e5c Stack overflow possibly? Will keep thinking this. Regards, Dan. ___

Re: [sqlite] bus error with SQLite 3.5.6

2008-03-03 Thread Dan
On Mar 3, 2008, at 12:03 PM, P Kishor wrote: > Dan, > > > On 3/2/08, Dan <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> I tried this script here with the latest CVS version and >> it didn't crash: >> >>CREATE TABLE page

Re: [sqlite] sqlite3_get_table

2008-03-05 Thread Dan
ld understanding that sqlite3_get_table (previously > sqlite_get_table) will malloc for *errmsg and I'll need to do the > free(). Has anything changed? I'm just recompiling old codes with > the new lib. Technically you're supposed to use sqlite3_free().

Re: [sqlite] "sqlite3.h: No such file or directory" error when installing software on Linux

2008-03-10 Thread Dan
On Mar 10, 2008, at 6:44 PM, thomas Armstrong wrote: > Hi. > > I've just installed 'sqlite' (version 2.8.16) and 'sqlite-devel' > (version 2.8.16) from RPMs on my Linux Fedora Core, but I get this > error message when installing a software: Looks

Re: [sqlite] Can't get concat operator to work

2008-03-10 Thread Dan
3_result_text() to return the result, does your result string include a nul-terminator character? If so, that byte should not be included in the "number of bytes" parameter passed to result_text(). i.e. if you were doing: sqlite3_result_text(pContext, "abc", 4, ...) you might get

Re: [sqlite] garbage mail messages

2008-03-11 Thread Dan
On Mar 11, 2008, at 3:02 PM, [EMAIL PROTECTED] wrote: > > > OK Dan, you have the solution. The count was including the > terminating NULL char. Making it not include the NULL char fixed > the problem. > >Another question: For an empty result, should I return 0 or

Re: [sqlite] SQLite and (high) concurrency

2008-03-11 Thread Dan
lite3_mprintf("INSERT OR IGNORE INTO ..."... ^ Maybe that's got something to do with it. Knock out the OR IGNORE and see what happens. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Param Binding Problem

2008-03-12 Thread Dan
ext_%s WHERE > contents > MATCH '? '",sTempTableRoot.c_str()); Don't put quotes around the ? character. ('? ') is a literal string. You probably want (? || ' ') - an SQL variable with a single space appended to it. Dan. > > nError = sqlite3_prep

Re: [sqlite] Sorting NULs with Dynamic Typing

2008-03-19 Thread Dan
> How does SQLite handle sorting with a column that contains values > (including zero) and NULs? Are the NULs converted to zero for the > purposes of sorting? A null value is considered less than all other values when sorting. http://www.sqlite.org/datatype3.html#compari

Re: [sqlite] Regular Expressions and sqlite3_create_function

2008-03-20 Thread Dan
; anyone have > an example using this function (sqlite3_create_function) to override > regexp()? There is one in the ext/icu/icu.c file of the source distribution. http://www.sqlite.org/cvstrac/fileview?f=sqlite/ext/icu/icu.c&v=1.7 Dan. _

Re: [sqlite] endless loop example

2008-03-21 Thread Dan
sodes fe2 > Why does this put SQLite into an endless loop? Why do you figure it is an infinite loop? From the looks of the query it is probably just returning a very large number of rows. Dan. > (I am not using the shell tool, just preparing the statement as is > and

Re: [sqlite] limts change with switch from bit maps to vectors?

2008-04-02 Thread Dan
for page tracking? Only the dirty-page tracking. The limits on the number of attached databases and tables in a join are the same as they always were. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Unicode searches

2008-04-06 Thread Dan
nds the ICU library to SQLite using the custom collation sequence interface (and others). With this extension, SQLite uses the upper/lower case tables that are part of unicode. See ext/icu/README in the source distro for details. Dan. > Keith. > >>> Sort order is highly depende

Re: [sqlite] default sqlite3 IO methods for VFS

2008-04-07 Thread Dan
static sqlite3_io_methods njMethods = { > 1, > njOpen, ... } ; > > } > > > How do I get the address of sqlites default I/O methods? sqlite3_vfs *pDefaultVfs = sqlite_vfs_find(0); Dan. > > Thanks for any sug

Re: [sqlite] default sqlite3 IO methods for VFS

2008-04-07 Thread Dan
On Apr 8, 2008, at 2:16 AM, Ken wrote: > Dan, > > Doesn't that just return the VFS part ??? I'm looking for the > sqlite3_io_methods part for the default vfs ( or is this really > the sqlite3_file )? Right. Sorry, I didn't read carefully. :) I don't rea

Re: [sqlite] error in sqlite3_extension_init

2008-04-11 Thread Dan
On Apr 12, 2008, at 12:36 AM, dark0s dark0s wrote: > Excuse me for my stupid topic, but I am crazying to find error in > program below. > > My output is: > > bash-3.1# gcc -shared labsinf.c -o inf.so > labsinf.c:61: error: expected ';', ',' or ')' before '*' token > > The errror is for sqlit3_e

Re: [sqlite] How to set memory usage as high as possible -- but not too high?

2008-04-13 Thread Dan
emory available to an application is all of the RAM + all of the swap space. Best performance probably comes by using up all of the RAM and never using the swap. Realistically, you should probably just set a large cache_size as in option 1. Does SQLite really run faster with 1GB available than it would with 100MB? Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite version 3.5.8

2008-04-16 Thread Dan
> > I was not so much concerned between zip vs .tar.gz format, but the > content of the amalgamation. "sqlite-amalgamation-3.5.8.tar.gz" which is the file that allows you do "./configure && make install" to build from the amalgamation is up now. Dan. __

Re: [sqlite] understanding EXPLAIN

2008-04-17 Thread Dan
asier to read. > In any case, would I be better off with a compound index if I modify > my query to > > select wkt_geometry from sg_rivers where xmin >= ? and ymin >= ? and > xmax <= ? and ymax <= ?; No. The B-Tree structures that SQ

Re: [sqlite] TlsAlloc

2008-04-18 Thread Dan
dll > unloading and I traced it back to one of sqlite functions. I modified > (hacked) it for myself to be able to free the slot on request, but it > would be nice if future version addressed this problem. Upgrading will probably clear this problem. As of 3.5, SQLite no long

Re: [sqlite] multiple writers for in-memory datastore

2008-04-19 Thread Dan
ads don't operate on the same db at the same > time? As of 3.5, sqlite connections are threadsafe by default. With earlier versions, this trick will not work. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] multiple writers for in-memory datastore

2008-04-20 Thread Dan
ely into its own attached db? > > > in other wordstwo bulk insert operations going on simultaneously > on the same connection but each insert operation going into a > different attached in-memory db. Probably not. Each sqlite3* handle has a single mutex that it uses to serializ

Re: [sqlite] Crash in SQLite [@ syncJournal ]

2008-05-04 Thread Dan
We don't have any steps to reproduce, but we have a bug tracking > the issue: > https://bugzilla.mozilla.org/show_bug.cgi?id=432148 > > More details can be found in the bug. Hi Shawn, Do these databases use auto-vacuum? Incremental vacuum? Fts3? Thanks, Dan. > &

Re: [sqlite] Concerns regarding sqlite on jffs2

2008-05-05 Thread Dan
, but the theoretical worst performance is terrible. If you are using automatically generated rowids for your table (you are unless you have declared a column as INTEGER PRIMARY KEY) and the indexed timestamps are always increasing (I guess they are, right?) then

Re: [sqlite] import files with more than 2GB?

2008-05-06 Thread Dan
.html > (what would we do without Google !?!) > > Is it possible to include this (or a better equivalent) to the next > version? I hate such hacks where I don't really know what I am doing. You might have some luck if you grab cvs as of last night. Some changes were m

Re: [sqlite] Actually delete deleted rows from databasefile

2008-05-08 Thread Dan
ring is > still visible in the > database file, the file instead grows. What is the rule for reusing > a deleted block (if it > is so)? I guess it depends on the size of the new records inserted how space is allocated for them. Assuming they are sm

Re: [sqlite] Who is using SQLite prior to version 3.3.0?

2008-05-12 Thread Dan
y. One of the most annoying this about > SQLite is that version 3.x can't open version 2.x databases (which > unfortunately are still out there). I think the short answer is that with version 4: * Descending indexes are properly supported, and * Integer values 0 and 1 consume a s

Re: [sqlite] sqlite3_transfer_bindings obsolete?

2008-05-16 Thread Dan
On May 17, 2008, at 2:51 AM, Shawn Wilsher wrote: > And a fun follow-up question. Will sqlite3_transfer_bindings transfer > bindings across connection objects if the two statements are for two > different connections to the same database? No. It will return SQLITE_MISUSE. Dan. &

  1   2   3   4   5   6   7   8   9   10   >