Re: [sqlite] Query question

2011-01-25 Thread Dan Kennedy
On 01/25/2011 09:47 PM, Ian Hardingham wrote: > Hey guys. > > I have the following table: > > ratingsTable (id INTEGER PRIMARY KEY AUTOINCREMENT, mtId INTEGER, user > TEXT, rating INTEGER); > > mtId links to another table's primary key > > I wish to have a query which gives me the mtId which is

Re: [sqlite] WAL for single user database on NFS and Solaris

2011-01-30 Thread Dan Kennedy
journal_mode to > delete. If you set "PRAGMA locking_mode=EXCLUSIVE" before reading or writing the WAL-mode database it might work. http://www.sqlite.org/wal.html#noshm Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] WAL for single user database on NFS and Solaris

2011-01-31 Thread Dan Kennedy
On 01/31/2011 11:53 AM, Shawn Wilsher wrote: > On Sun, Jan 30, 2011 at 8:26 PM, Dan Kennedy<danielk1...@gmail.com> wrote: >> If you set "PRAGMA locking_mode=EXCLUSIVE" before reading or >> writing the WAL-mode database it might work. > That would make u

Re: [sqlite] Multithreading problem

2011-02-03 Thread Dan Kennedy
.7.5 here. After the IO error in sqlite3_exec(), what value does sqlite3_extended_errcode() return? Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Multithreading problem

2011-02-03 Thread Dan Kennedy
On 02/03/2011 10:22 PM, Tiberio, Sylvain wrote: > > Dan, > > Thanks for your attention. > > sqlite3_extended_errcode() return 0xA0A that means SQLITE_IOERR_DELETE. Earlier versions of SQLite ignored the return code of unlink(). That is probably why you're not seeing a problem wi

Re: [sqlite] Multithreading problem

2011-02-03 Thread Dan Kennedy
in multi-threaded apps? Something like -D_POSIX_C_SOURCE=199506L or -mt perhaps? Is SQLite being compiled with the same thread-related switches as the rest of the app? Dan. > > Sylvain > > -Original Message- > From: sqlite-users-boun...@sqlite.org > [mailto:sqlite-users-boun.

Re: [sqlite] Trigger for incrementing a column is slow

2011-02-03 Thread Dan Kennedy
rofile using the trigger and without. On the version > without, most of the time is spent all in sqlite, as expected. The one with > triggers had a ton more time spent in the various kernel file system > functions (hfs, I'm on Mac OS 10.6.6). So it seems like the triggers ar

Re: [sqlite] Trigger for incrementing a column is slow

2011-02-04 Thread Dan Kennedy
On 02/04/2011 03:24 PM, Kevin Wojniak wrote: > > On Feb 3, 2011, at 10:35 PM, Dan Kennedy wrote: > >> Do you have a test program that we can use to reproduce this phenomenon? >> >> Dan. > > Here is a complete program: > http://pastie.org/pastes/1527560 &g

Re: [sqlite] Multithreading problem

2011-02-04 Thread Dan Kennedy
>make > > I have remade my test file ...and it is working well now! > Thanks you very much!!! > > Another question: Why ./configure doesn't set itself this flag when I > use --enable-threadsafe in a Solaris system? A bug I suppose. Will fix it for 3.7.6. Dan.

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-08 Thread Dan Kennedy
you will find a database file which is not encrypted, and all > tables are dropped. The corruption is still in there and is used to > generate the output mentioned above. I think the mailing list stripped your attachment. Can you put somewhere we can download it from? Or ju

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-08 Thread Dan Kennedy
On 02/08/2011 08:26 PM, Dennis Geldhof wrote: >> -Original Message- >> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >> boun...@sqlite.org] On Behalf Of Dan Kennedy >> Sent: dinsdag 8 februari 2011 12:33 >> To: sqlite-users@sqlite.org >>

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-08 Thread Dan Kennedy
On 02/08/2011 10:24 PM, Dennis Geldhof wrote: >> -Original Message- >> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >> boun...@sqlite.org] On Behalf Of Dan Kennedy >> Sent: dinsdag 8 februari 2011 14:51 >> To: sqlite-users@sqlite.org >>

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-09 Thread Dan Kennedy
to me directly? This mailing list strips out attachments. Dan. > > The "query" is used to change some table structures in the database and > executes the following actions on the database; > BEGIN TRANSACTION; > > ALTER TABLE [A] RENAME TO [TMP_A] > ALTER TABLE [B

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-09 Thread Dan Kennedy
On 02/10/2011 12:10 AM, Dan Kennedy wrote: > On 02/09/2011 08:17 PM, Dennis Geldhof wrote: >> I checked some things for the attached database. It is created with >> sqlite version 3.6.3 or 3.6.23.1 with the help of the system.data.sqlite >> wrapper. The header displays (with

Re: [sqlite] database disk image is malformed 3.7.x

2011-02-09 Thread Dan Kennedy
> I didn't find a way yet to reproduce the issue with a "clean" database. > Only way I can reproduce it is with some of the database, like the > test.db3. So I'm running out of ideas. This is the theory. test.db3 is an auto-vacuum database. http://www.sqlite.org/src/i

Re: [sqlite] determine SQLITE_MAX_LENGTH or sql_limit/sqlite3_limit

2011-02-09 Thread Dan Kennedy
ed, the sqlite3_limit() interface returns the prior value of the limit. Hence, to find the current value of a limit without changing it, simply invoke this interface with the third parameter set to -1. Maybe you can use that. Dan. ___ sqlite-users m

[sqlite] Outer query returning results not found in subquery

2011-02-10 Thread Dan Kubb
llapses subqueries, but I'm not sure. Just to reiterate, the above example is simplified from what I'm actually doing. I'm not just using DISTINCT on a subquery that returns a single row, but rather it returns many rows, some of which have the same value for a column hence my need for DISTINCT. The above example is the simplest way I could think of to demonstrate what's happening. -- Thanks, Dan Kubb ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] upgrading DB from 3.6.23 to 3.7.5

2011-02-11 Thread Dan Kennedy
On 02/11/2011 08:08 PM, Sam Carleton wrote: > On Fri, Feb 11, 2011 at 6:54 AM, Philip Graham Willoughby< > phil.willoug...@strawberrycat.com> wrote: > >> Hi Sam, >> >> On 11 Feb 2011, at 05:29, Sam Carleton wrote: >>> I am sure it is bad form, but attached is one of the 3.6.23 DB, it is >> only

Re: [sqlite] UPDATE WITH ORDER BY LIMIT ERROR

2011-02-15 Thread Dan Kennedy
On 02/15/2011 06:04 PM, venkat easwar wrote: > Forgot to mention what error I am getting. > > near "order": syntax error > near "limit": syntax error - if i remove the order by clause See under the "Optional LIMIT and ORDER BY Clauses" heading on this page:

Re: [sqlite] FTS slowdown with matchinfo

2011-02-15 Thread Dan Kennedy
> the query takes 7.5 minutes. It seems FTS is getting > stuck calculating the 2nd and 3rd part of the "x" > matchinfo data ("hits all rows" and "docs with hits") > but it's not clear why this should take so long. > Any ideas on what might be causing the

Re: [sqlite] foreign key on delete no action

2011-02-16 Thread Dan Kennedy
I better off just leaving the > action blank instead of explicitly writing "on delete no action"? Yes. Good plan. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] FTS slowdown with matchinfo

2011-02-17 Thread Dan Kennedy
On 02/17/2011 05:41 AM, Iker Arizmendi wrote: > Dan Kennedy wrote: >> >> Can you make the database available for download? And >> supply the exact query you are using too? I'd like to >> know why this is. Thanks. >> >> Dan. >> > > You ca

Re: [sqlite] Upgrade from 3.5.8 -> 3.7.5 - increase memory usage

2011-02-20 Thread Dan Kennedy
On 02/21/2011 09:38 AM, Simon Slavin wrote: > > On 21 Feb 2011, at 1:47am, Roger Binns wrote: > >> On 02/20/2011 02:48 PM, Todd Shutts wrote: >>> The application >>> never used more than 10MB and it is currently using 57+MB and continues >>> to climb. >> >> The single most likely explanation is

Re: [sqlite] Reason for random names for the master journal?

2011-02-25 Thread Dan Kennedy
-mjMASTER but it cannot, since that file is still in use. We use the random names to get around this problem. You could probably get away with using "-mjMASTER1", "-mjMASTER2" etc. if you wanted to. See the loop around line 1729 of vdbeaux.c. Dan. __

Re: [sqlite] Reason for random names for the master journal?

2011-02-25 Thread Dan Kennedy
>> For example, say you have two databases in a transaction - mine.db >> and yours.db. A crash happens while committing the transaction >> and the file mine.db-mjMASTER is left in the file-system. >> >> Following recovery, if a process tries to read mine.db, the >> transaction on mine.db will be

Re: [sqlite] long insert statement failing on iPhone

2011-02-28 Thread Dan Kennedy
On 02/26/2011 09:37 AM, Mickey Mestel wrote: > hi all, > > new to the list. > > we are compiling the sqlite.c amalgamation file into our project, as we > want to encrypt the database, and the sqlite that comes with the iOS sdk does > not allow for that. > > we are developing on

Re: [sqlite] Multiple Process Notification

2008-11-23 Thread Dan Saul
Thank you Kees! On 23-Nov-08, at 11:18 AM, Kees Nuyt wrote: > On Sun, 23 Nov 2008 10:33:28 -0600, "Dan Saul" > <[EMAIL PROTECTED]> wrote in General Discussion of > SQLite Database <sqlite-users@sqlite.org>: > >> Hi SQLite, >> >> I w

[sqlite] need partial index

2009-02-11 Thread Dan Leshchiner
trick that i am missing? thanks in advance, dan ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Statements that return a result set?

2009-07-30 Thread Dan Kennedy
On Jul 30, 2009, at 5:12 PM, Robert Villanoa wrote: > Hi folk, > > I am new to SQLite, and I have a question: In SQLite, is there a > statement apart from SELECT statement that can return a result set? > Or the SELECT statement is the only statement that can return a > result set? As

Re: [sqlite] SQL error: database disk image is malformed - other possibility than dump/load

2009-07-31 Thread Dan Kennedy
tables in the old db. So if the corruption problem is confined to an index or indexes, an export/import will fix problem but a vacuum will not. Dan. > we used sqlite > 3.6.10, solaris. > > # sqlite3 trac.db > sqlite> PRAGMA integrity_check; > *** in database main *** > Pag

Re: [sqlite] ANN: SQLite 3.6.16.C#

2009-08-03 Thread Dan Kennedy
portantly though, Perst is an Object DB, so it is caching the actual objects in-memory, whereas SQLite is only caching database pages. I haven't much experience with them, but I think Object DBs are usually faster for this kind of task. YMMV. Dan. ___ sqli

Re: [sqlite] ANN: SQLite 3.6.16.C#

2009-08-03 Thread Dan Kennedy
On Aug 3, 2009, at 2:06 PM, Kosenko Max wrote: > > > Dan Kennedy-4 wrote: >> McObject CEO Steve Graves points out that because of limits of the >> API >> they were using, SQLite performs each INSERT and DELETE in the test >> in a >> separate transaction

Re: [sqlite] help with inconsistent results and segfault

2009-08-03 Thread Dan Kennedy
|110.0 x|cum_sum_x|total 10.0|10.0|110.0 10.0|20.0|110.0 20.0|40.0|110.0 30.0|70.0|110.0 40.0|110.0|110.0 sum(x) 110.0 sum(x) 110.0 SQL error near line 64: misuse of aggregate: max() Dan. > === > > create table Test (x FLOAT); &

Re: [sqlite] Disk I/O error on AIX

2009-08-03 Thread Dan Kennedy
DIR_FSYNC error. > > Any ideas why this is happening or how to track it down? AIX needs -DSQLITE_DISABLE_DIRSYNC. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Disk IO ERROR on AIX

2009-08-07 Thread Dan Kennedy
error. > > Any ideas why this is happening or how to track it down? Compile with SQLITE_DISABLE_DIRSYNC for AIX. Dan. > Thanks, > Ken > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sq

Re: [sqlite] SQLite version 3.6.17

2009-08-13 Thread Dan Kennedy
r how things are, then clarity about maintenance > would be useful. It works at present. It is tested informally before each release. But support could be dropped at any time. The problem is that at this time there exists no individual capable of and willing to make the commitment to maintain it. The current version is not up to date with the newer autoconf stuff either. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] SQLite version 3.6.17

2009-08-14 Thread Dan Kennedy
ch use. The summary of passed/failed tests is in the two lines of output immediately before those transcribed above. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] FTS3 and negation operator

2009-08-14 Thread Dan Kennedy
IS is set at compile time? http://www.sqlite.org/src/annotate?mid=25265=373 Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] 3.6.17 test failure

2009-08-14 Thread Dan Kennedy
of the test log? (search for the strings "rollback-2.3" and "tkt3457-1.4"). Dan. > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-15 Thread Dan Kennedy
N QUERY PLAN to see the strategy SQLite is using for each query. http://www.sqlite.org/lang_explain.html Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-15 Thread Dan Kennedy
On Aug 15, 2009, at 1:34 PM, Jim Showalter wrote: > How will that help him fix this problem, if the problem is that > SQLite's query optimizer is selecting a suboptimal index to use, and > there is no way to specify which index to use? The statistics collected by the ANALYZE command will be

Re: [sqlite] debugging sqlite with gdb

2009-08-15 Thread Dan Kennedy
t > recognized Could be an autoconf artifact. The real executable might be hidden away in the .libs directory. Dan. > what to do? > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.or

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-16 Thread Dan Kennedy
it better to throw an exception than to run the query with a different, possibly slower, plan. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Multiple indexes in SQLite, and selecting which to use

2009-08-17 Thread Dan Kennedy
last scenario) that it uses index i1 instead of the apparently better > index i2 -- no exception throwing. Your last paragraph indicates > that in > this case an exception would be thrown. I guess I got that wrong then. Said users considered it better to throw an error if the index that

Re: [sqlite] Increment a value if constraint violated

2009-08-18 Thread Dan Kennedy
some value and before insert was made > another process made another insert with the same id... Cannot happen. If not executed within an implicit transaction, each SQL statement is effectively wrapped in a transaction all of its own. Dan. ___ sqlite-u

Re: [sqlite] Increment a value if constraint violated

2009-08-18 Thread Dan Kennedy
On Aug 19, 2009, at 12:54 AM, Dan Kennedy wrote: > > On Aug 19, 2009, at 12:35 AM, Pavel Ivanov wrote: > >> You can always do >> >> insert into table (id, count) values (?1, (select count(*) + 1 from >> table where id = ?1)) >> >> Though I'd be

Re: [sqlite] Increment a value if constraint violated

2009-08-18 Thread Dan Kennedy
from the start before executing nested selects? Yes. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Huge numbers of savepoints.

2009-08-19 Thread Dan Kennedy
nts seem to be nested - i.e. you cannot 'forget about' old > savepoints > while retaining recent savepoints. Is my understanding correct here? That's correct. "Savepoint" is just another name for "nested transaction". Dan. ___ sq

Re: [sqlite] about journal file

2009-08-27 Thread Dan Kennedy
document, intended for people working on the SQLite core (or compatible systems). If you are programming an application that uses SQLite, you should not need to worry about any of these details. Dan. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Undefined Symbol: Tcl_CreateObjCommand

2009-08-29 Thread Dan Kennedy
On Aug 30, 2009, at 12:23 AM, carlos.tas...@farmerswife.com wrote: > Hi Dan, > > Yes I can confirm it. As more info here is the size of the so > > 407348 2009-08-29 19:03 tclsqlite-3.6.17.so Are you using 64-bit linux? Dan. ___ sqlit

Re: [sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Dan Kennedy
On Sep 1, 2009, at 12:46 AM, Doug wrote: > I have two simple tables - one that defines a statistic, and one > that hold > the data for each statistic: > > CREATE TABLE Statistic > > ( > >StatID INTEGER PRIMARY KEY, > >OwningComputer TEXT NOT NULL > > ); > > > > CREATE

Re: [sqlite] Speeding up a (simple?) GROUP BY query

2009-08-31 Thread Dan Kennedy
On Sep 1, 2009, at 12:46 AM, Doug wrote: > I have two simple tables - one that defines a statistic, and one > that hold > the data for each statistic: > > CREATE TABLE Statistic > > ( > >StatID INTEGER PRIMARY KEY, > >OwningComputer TEXT NOT NULL > > ); > > > > CREATE

Re: [sqlite] Booleans in SQLite

2009-09-03 Thread Dan Bishop
Nicolas Williams wrote: > On Wed, Sep 02, 2009 at 05:44:38PM -0400, Shaun Seckman (Firaxis) wrote: > >> I'm just curious how difficult it would be to add >> support for booleans in SQLite. This would most likely involve adding a >> new type affinity as well as adding "true" and

Re: [sqlite] Importing data into SQLite

2009-09-07 Thread Dan Kennedy
On Sep 7, 2009, at 9:32 AM, Kavita Raghunathan wrote: > Timothy and all, > When I try to import a .csv, I get a segmentation fault: > 1) First I set .seperator to , > 2) Then I type .import > 3) I see "Segmentation fault" Which version of SQLite is this happening with?

Re: [sqlite] sqlite3_exec fails on arm

2009-09-11 Thread Dan Kennedy
lite3Corrupt() and corruptSchema() functions. See which one it hits and post the stack trace. Dan. > Regards, > > Gottfried > > > D. Richard Hipp wrote: >> >> >> On Sep 10, 2009, at 2:23 AM, gprand wrote: >>> Program's output is: >>> OPEN

RE: [sqlite] database table is locked

2005-05-13 Thread Dan Kennedy
the functions in the expected order. Dan. --- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote: > On Fri, 2005-05-13 at 15:16 +0100, Brandon, Nicholas wrote: > > I think I might be getting confused on this subject as well. Does this mean > > that SQLite 3.x can NOT process

Re: [sqlite] InnoDB Transactions

2005-05-15 Thread Dan Kennedy
y of InnoDB algorithm for comparison? I suspect whatever trick they use won't work with SQLite because there is no server process, but it could be interesting anyway. Dan. __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobil

Re: [sqlite] Sqlite2 vs Sqlite3 benchmark

2005-05-16 Thread Dan Kennedy
--- Ludvig Strigeus <[EMAIL PROTECTED]> wrote: > Dan Kennedy <[EMAIL PROTECTED]> wrote: > > For SQLite 3, the default value of the 'synchronous' pragma > > changed from "NORMAL" to "FULL". IIRC this means the disk is > > synced 3 times in

RE: [sqlite] Convert and isnumeric function

2005-05-16 Thread Dan Kennedy
> There's a former Nigeria dictator Charles Taylor that is even > worse. Liberia! Not that I could tell one from the other :) Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html

Re: [sqlite] Database locked after crash

2005-05-17 Thread Dan Kennedy
Can you post code? --- Jaap Krabbendam <[EMAIL PROTECTED]> wrote: > > Hi, > > I have been simulating a crash during a transaction. After BEGIN, at some > point > I do exit(-1) instead of COMMIT or ROLLBACK in order to simulate a crash. > > After that, I can see that a -journal file is

Re: [sqlite] Problem with memory using Tcl-defined SQL functions

2005-05-20 Thread Dan Kennedy
> The problem is that, when I send a query that uses a Tcl-defined SQL > function to the database, it starts allocating memory that is not freed > afterwards, until I close the Tcl interpreter. Memory leak in Tcl interface code. Fixed in cvs now.

Re: [sqlite] novice sql generation

2005-05-20 Thread Dan Kennedy
--- [EMAIL PROTECTED] wrote: > I am trying to write my first application using sqlite in perl. > The perl part is no problem, but I have not used sql before and > am having some difficulty. > > I have three tables: > > CREATE TABLE i2u(i UNIQUE, u); > INSERT INTO i2u

Re: [sqlite] Changing default PRAGMA SYNCHRONOUS at compile time

2005-05-31 Thread Dan Kennedy
gt; thanks, > > --nickg > > I don't there exists such an option. If you're desperate to change it, modify the value function sqlite3pager_open() sets variable pPager->fullSync to. For "NORMAL", you want it initialized to 0. Dan. ___

Re: [sqlite] Basic Text Bind Question

2005-06-07 Thread Dan Kennedy
> size = sprintf( buf, "SELECT * FROM People WHERE lname = '?'" ); ^^^ > rc = sqlite3_prepare( database, buf, -1, , 0 ); > sqlite3_bind_text(statement, 1, "Fullman", 7, SQLITE_STATIC ); > rc = sqlite3_step(statement); As others have

Re: [sqlite] Problem with ORDER BY involving ROUND

2005-06-09 Thread Dan Kennedy
> Is there any reason why ROUND doesn't return a double? Because the IEEE storage format most (all?) computers use to store floating point numbers is binary based, many values that can be stored exactly in a base 10 system are rounded slightly to fit into the binary system. This is similar to

Re: [sqlite] Reads and Writes

2005-06-14 Thread Dan Kennedy
> I can imagine a protocol that will improve performance by keeping track > of whether the database was updated, which would allow a quick > determination whether a program's cache was still valid. The idea is to > increment a 'version number' in the database file as soon as a program > obtains a

Re: [sqlite] stored procedures

2005-06-14 Thread Dan Kennedy
One reason might be that SQLite does not usually include anything that can be just as well implemented externally. I could be missing something, because I'm not really sure of the advantages of stored procedures, but it seems to me that an implementation could be created without modifying

Re: [sqlite] New SQLite 3.x C++ Wrapper

2005-06-17 Thread Dan Kennedy
> I have updated my SQLite 3.x C++ wrapper (at > http://dev.int64.org/sqlite.html). What do you think of the idea of handling SQLITE_SCHEMA internally instead of throwing an exception? __ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check

Re: [sqlite] sqlite3_column_blob(...) and finalize

2005-06-24 Thread Dan Kennedy
> When I finalize the select statement, the memory pointed to > by the pointer returned by > > const void * sqlite3_column_blob(...) > > is cleared. > > Is this the expected behaviour? The pointers returned by column_blob(), column_text() and column_text16() are only valid until the next call

Re: [sqlite] UNIQUE Constraint but case sensitive

2005-06-24 Thread Dan Kennedy
> Hi, > > I need to create a unique constraint on a column of type varchar, but it is > not case sensitive by default. > Does any one know how to make a unique constraint case sensitive? > CREATE TABLE abc(a UNIQUE COLLATE NOCASE); Bear in mind that the "NOCASE" collation sequence only

[sqlite] Problem when binding with like

2005-07-01 Thread Dan Wellisch
ITE_ROW) I know that the zipCodeValue wxString is correct because I see it in the debugger. I go to the SQLlite command interpreter and run the same query and it works fine. When I change the 'like' to '=' and then just keep zipCodeValue as 60089, it works fine. Is there a bug here, or am I binding incorrectly to ? when I want to use "like"? Thanks, Dan

Re: [sqlite] Problem when binding with like

2005-07-01 Thread Dan Wellisch
Richard: Are you saying that the statement should be.: wxString::Format(wxT("%s%s"),zipCodeValue.c_str(), "%"); ? Thanks, Dan D. Richard Hipp wrote: On Fri, 2005-07-01 at 14:51 -0500, Dan Wellisch wrote: zipCodeValue = wxString::Format(wxT("%s%s%s%s

Re: [sqlite] What happens to unused space?

2005-07-04 Thread Dan Kennedy
> Hi, > > Before I go diving into the SQLite source code, can anyone tell me what > happens to unused space? (i.e. from deleted data in the db) > > Specifically, I'm interested in whether it gets over-written by zeroes, > or something. I'm storing information in a database (in a blob field),

Re: [sqlite] difference between sqlite3_reset() and sqlite3_clear_bindings()

2005-07-07 Thread Dan Kennedy
--- Patrick Dunnigan <[EMAIL PROTECTED]> wrote: > Can someone please explain the difference between sqlite3_reset() and > sqlite3_clear_bindings() > and when would I use one over the other. _clear_bindings() sets the bound values of all SQL variables in a compiled statement to NULL. I don't

RE: [sqlite] Binding a column name?

2005-07-10 Thread Dan Kennedy
> Actually I doubt it can - since without the column name it can't create the > prepared statement byte code, right? Right. It can't be done. > > Is it possible for a bind variable to be a column name? I'd like to make a > query which is: > > select from MyTable; > > and I'd like the

Re: [sqlite] Possible enhancement to SQL logic

2005-07-11 Thread Dan Kennedy
Won't work unfortunately. Currently indices are never used if the WHERE clause has an OR expression in it. --- Aaron Burghardt <[EMAIL PROTECTED]> wrote: > Try adding another index: > > CREATE INDEX a_f1_f2 ON a (f1, f2); > > Does that help? > > Aaron Burghardt > > On Jul 11, 2005, at 6:07

Re: [sqlite] update statements inside select...case inside triggers

2005-07-12 Thread Dan Kennedy
> CREATE TRIGGER trigger_name AFTER UPDATE ON table > BEGIN > SELECT CASE > WHEN a_condition THEN > UPDATE another_table SET a_field=a_value WHERE yet_another_condition > WHEN another_conditon THEN > UPDATE another_table SET a_field=another_value WHERE >

Re: [sqlite] make fails on Solaris

2005-07-15 Thread Dan Kennedy
See if your installation has "nawk" or "gawk". Then search through Makefile.in and change the "awk" invocations to "nawk" or "gawk" (three changes). It might work then. --- H S <[EMAIL PROTECTED]> wrote: > You are right. opcodes.h is corrupted. It has 0 byte.. > > I have all other files:

Re: [sqlite] sqlite3_set_authorizer

2005-07-26 Thread Dan Kennedy
--- Marco Bambini <[EMAIL PROTECTED]> wrote: > From the official documentation of the sqlite3_set_authorizer routine: > "This routine registers a callback with the SQLite library. The > callback is invoked (at compile-time, not at run-time) for each > attempt to access a column of a table

Re: [sqlite] ORDER BY question

2005-07-26 Thread Dan Kennedy
--- [EMAIL PROTECTED] wrote: > > Hello, > > I'm using sqlite3 and have a list of numbers I'd like returned sorted in > increasing order: > 1 1.1 1.10 1.11 1.9 10 11 9 12 > > However, if their column is defined as numeric, the 1.10 gets converted to > 1.1 (which is not what I want) and the

Re: [sqlite] ORDER BY question

2005-07-27 Thread Dan Kennedy
that but got: "no such collation sequence: NUMERIC" > > > > > > > > >

[sqlite] import function

2005-08-03 Thread Dan Wellisch
Hello: I understand there is the .import function for the sqlite3 command interface, but I need to execute this function from within the C API. What do I use to do this? I need to execute this type of function from within my C++ program, not the command line. Thanks, Dan

Re: [sqlite] import function

2005-08-03 Thread Dan Wellisch
Jens: Thanks. I did see that suggested elsewhere in this list and I am proceeding that way in order to use any of the shell functionality. Thanks, Dan Jens Miltner wrote: Am 03.08.2005 um 20:50 schrieb Dan Wellisch: Hello: I understand there is the .import function for the sqlite3

Re: [sqlite] Qn on Transaction across 2 DBs

2005-08-04 Thread Dan Kennedy
--- R S <[EMAIL PROTECTED]> wrote: > Hi, >I have a requirement where I need to update 2 tables in 2 separate > DBs within a transaction. Do I need to attach the second table to the > first at the start of the transaction? As I understand SQLite commits > a transaction across a single DB

[sqlite] International Language Support

2005-08-04 Thread Dan Wellisch
question concerning that OS. Thanks, Dan

Re: [sqlite] International Language Support

2005-08-04 Thread Dan Wellisch
or dispute what Austin is saying? I would like some more feedback before I start doing more investigation. Thanks, Dan Austin Ziegler wrote: On 8/4/05, Dan Wellisch <[EMAIL PROTECTED]> wrote: We just put a SQLlite application in production. It handles the display of ISO 8859-1character

Re: [sqlite] International Language Support

2005-08-06 Thread Dan Wellisch
. Dan Wellisch

Re: [sqlite] ORDER BY Does not work

2005-08-12 Thread Dan Kennedy
In the file where.c, near the bottom of the function isSortingIndex there is a line: if( j>=nTerm || (i>=pIdx->nColumn && pIdx->onError!=OE_None) ){ Comment out the second part of the expression as follows: if( j>=nTerm /* || (i>=pIdx->nColumn && pIdx->onError!=OE_None) */){ At the moment I'm

Re: [sqlite] LIKE faster than =

2005-09-02 Thread Dan Kennedy
This could be because '=' can use an index but LIKE cannot. If the column that is part of the '=' expression ("columnname" in your example) has an index, and contains many rows with the same value (i.e 'abcd'), then using the index will be slower than the linear table scan forced by LIKE. In

Re: [sqlite] Null values in Primary Key

2005-09-03 Thread Dan Kennedy
NULL = NULL is false. It's an SQL thing - go figure. Try: SELECT * FROM test WHERE b IS NULL; http://www.sqlite.org/nulls.html --- Matt Froncek <[EMAIL PROTECTED]> wrote: > I am using SQLCrypt and it returns SQLite Library number 3002002. I have > tried with Encryption on and off. > > Why

[sqlite] questions from a new user

2005-09-10 Thread dan greene
is fine for selecting and inserting rows when the column data being used is a 0-terminated string. But what is the general approach if one or more columns contain variable-length binary data? Thanks for any help! Cheers Dan Greene

Re: [sqlite] questions from a new user

2005-09-10 Thread Dan Kennedy
> > 2. Could someone give me a brief overview on how to insert and retrieve > BLOB data in SQLITE? It seems to me that sqlite3_exec is fine for > selecting and inserting rows when the column data being used is a > 0-terminated string. But what is the general approach if one or more >

[sqlite] weird problem with windows 2000

2005-09-15 Thread dan greene
2000 NTFS machine to slow down the single inserts so drastically? Cheers Dan Greene

Re: [sqlite] weird problem with windows 2000 PLEASE HELP!!!

2005-09-17 Thread dan greene
So, if I'm reading your message right, the 25 seconds for inserting 200 (that is only 200 messsages) into a database under win 2000 is correct??? Perhaps it's just my uneducated opinion but your explanation sounds bogus... Why would the folks who wrote SQLITE show it off as being so fast

Re: [sqlite] Problem with floating point fields, and a feature request

2005-09-20 Thread Dan Kennedy
> two floats A and B should be compared with this algorithm : > > diff=A-B > if (diff>tolerance) then A>B > else if (diff<-tolerance) then A else A = B You could define a new collation sequence to do all that. However, it's difficult to say what will happen when you have three numbers A, B and

RE: [sqlite] Problem with floating point fields, and a feature request

2005-09-21 Thread Dan Kennedy
--- Cariotoglou Mike <[EMAIL PROTECTED]> wrote: > collating sequences do not apply to floating point comparisons, do they? Hmmm, excellent point. Guess I didn't think too hard about that one. But the other point is the real show-stopper, how should the software deal with the circumstances

Re: [sqlite] Function to find the size returned data size from a SELECT??

2005-09-21 Thread Dan Kennedy
> I was wondering if there was a way to find the size of data that will be > returned before actually making the call to sqlite3_get_table which will > return a pointer to a malloc'd memory location. My question is really: can I > find the required memory size before the call? The short answer

Re: [sqlite] Rewriting a query

2005-09-28 Thread Dan Kennedy
What happens if you create the index on sCommunityID only? Does it still do the full table scan? Also, don't overlook using UNION or UNION ALL, ugly as they can be. Maybe something like this could be used to avoid creating a very small temporary table: SELECT ... FROM (SELECT ... UNION SELECT

Re: [sqlite] Rewriting a query

2005-09-30 Thread Dan Kennedy
--- [EMAIL PROTECTED] wrote: > Robin Breathe <[EMAIL PROTECTED]> wrote: > > Hugh Gibson wrote: > > >> I'm intrigued. How do you get SQLite to use a multi-column index as it's > > >> primary key (i.e. B-tree hash)? Please elaborate. > > > > > > Simply > > > > > > CREATE TABLE TransactionList

Re: [sqlite] Newbie coherency questions ... poor man's replication? Proper replication approaches?

2005-10-03 Thread Dan Kennedy
> We're building a multi-master, peer-to-peer network service, > so we need a way to replicate changes between systems. Unsolicited advice: Of course I don't understand your problem domain, but I'm a big fan of a technology called "virtual synchrony" for this kind of thing. Very successful

<    5   6   7   8   9   10   11   12   13   14   >