like there shouldn't be
because the DB is already in RAM - it seems like the cache would only add extra
memory copies and slow things down. But that is my naïve assumption.
Anyone know?
Thanks,
Dave
te:
>On 10/16/06, Dave Dyer <[EMAIL PROTECTED]> wrote:
>>
>>I can't find an example, but it seems like there ought to be
>>syntax to use bind to inline selection variables, instead of
>>having to have a callback function.
>>
>>Something like:
>&g
>
>Either there is a bug in your operating system (you didn't tell
>us what operating system you are using, by the way) or else there
>is still a process holding a transaction open that you are unaware
>of.
It turns out to be the latter.
It would be useful in such circumstances to identify the
I've got a database that is permanantly locked, presumably due to
some error. Any attempt to modify it results in a "sqlite_locked"
error. This error persists even if all users close the database.
sqlite> insert into user (name) values ('fred');
SQL error: database is locked
-
I can't find an example, but it seems like there ought to be
syntax to use bind to inline selection variables, instead of
having to have a callback function.
Something like:
char *forval,*barval;
sqlite_prepare(db,"select ?foo,?bar from table");
sqlite_bind("?foo",&fooval);
sqlite_bind("?ba
It's only a structural problem, but the name "Cursor" is used
in the mac environment, and so sqlite's "Cursor" struct causes
conflicts.
It would be handy if the name changed, say to SQCursor
-
To unsubscribe, send ema
>
>Most of us use email clients that store our mail as simple text files. An
>SQLite database is no more likely to get corrupted than any other file.
I would stipulate that sqlite data is less likely to be corrupted due to bugs
in sqlite itself, or due to power failure or gross program crashes.
I realize that sqlite uses the best available techniqes to
always fail safe and therefore avoid database corruption, it
remains that case that "shit happens" and when it does, sqlite
databases become hopelessly corrupted.
Traditional file systems have evolved an array of techniques
to limit the
Have the main program pass the DLL a callback table. Main and DLL
can share the definition of the callback, but the DLL should do
a reasonable runtime check that the table it is presented matches
the one it expects.
", &pMemoryDB);
//
//WHAT DO I DO NOW?
//****
}
Thanks,
Dave Gierok
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, June 05, 2006 12:49 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Memory DB:
u very much for your help,
Dave Gierok
>
>I think this is a very reasonable assumption.
It's a lot easier to drive if you assume you're the only
car on the road.
I encountered this problem and agree with most of the diagnosis.
The real problem is that sqlite assumes it "owns" the temporary
transaction file that it created, and can do anything it wants with it;
for example read, rename, or delete it. Any other process which
gets it's hooks into the fi
(executed without a formal transaction
wrapper) to also be begin-immediate.
-Dave
On 3/14/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote:
>
> On 3/13/06, Dave Brown <[EMAIL PROTECTED]> wrote:
> > Yeah if I put BEGIN IMMEDIATE in thread1 as well, then it works, but as
> you
>
force all
transactions to be immediate.
-Dave
On 3/13/06, Igor Tandetnik <[EMAIL PROTECTED]> wrote:
>
> Dave Brown <[EMAIL PROTECTED]> wrote:
> > Igor - ok I tried this, and now I am getting SQLITE_BUSY returned
> > when I try
> > to sqlite3_exec my "BEG
statement
(without transaction).
So I can wrap all these calls in a do-while loop to check for SQLITE_BUSY,
but isn't this the point of declaring a busy_handler ?? Why wouldn't the
database use the busy-handler in the case where it is trying to execute my
1-line INSERT statement?
-Dav
voked here?? Shouldn't the busy handler take care of the fact that DB1 is
writing, so after it's done, DB2 will be allowed to finish its write
transaction? Why do I get back an immediate SQLITE_BUSY in this case?
Thanks for any help,
Dave
>
>SQLite thinks you have declared a column named "active"
>with a datatype of "BOOL JOINED DATE".
Since BOOL JOINED DATE doesn't correspond to any known
data type, shouldn't it be flagged as an error? Surely
the declaration of a table shouldn't accept garbage.
At 04:47 AM 2/13/2006, John Stanton wrote:
>Sigh... what is wrong with a message "disk full" when the disk space is
>exhausted? Why is simple and to the point a problem?
The "disk full" error is actually "write failed". Disk full may be
the expected reason for a write to fail, but there are ma
>It is a reasonable assumption to make that the only thing which can have
>changed since the last write is the disk becoming full. A disk cable falling
>off, head crash or mechanical disk failure is not only unlikely but would
>crash the entire machine and make error detection and recovery unl
At 09:00 AM 2/10/2006, [EMAIL PROTECTED] wrote:
>"Drew, Stephen" <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> In sqlite3OsWrite function (in os_win.c) the following code exists:
>>
>> while( amt>0 && (rc = WriteFile(id->h, pBuf, amt, &wrote, 0))!=0 &&
>> wrote>0 ){
>>
>> amt -= wrote;
>>
A simple "fuzzy" tolerance will not solve the problem, only mask
it for the most common cases. A single floating point addition
of two numbers can result in ZERO bits of precision.
>>
>>select * from test where f=13.06; -- returns no data
Pardon me for throwing a bomb, but no good programmer
would ever use = to compare floating point numbers.
Choose a more appropriate representation for your data.
on windows, what about running sqlite as a server process
which uses ole for communication? Lots of other
programs are made scriptable this way.
the thread that Roger Binns pointed out (with similar problems
in an app called "subversion") seems to be right on the money.
The problem is associated with unrelated processes doing background
file operations. I wrote a test program, and found it fails
for me if I run it in a directory which is
I looked into this, and the actual problem is windows returning
a "access denied" error code when trying to recreate the journal
file immediately after deleting it. I can't find any documentation
that says create might fail for this reason, but filemon (from
systeminternals.com) says the status
I'm taking a test cut at converting a existing mysql database
to sqlite. I dumped the mysql database, tweaked the prototype
into slite format, and converted the escape characters in the
data to standard sql format. Here's what happens when I attempt
an import:
sqlite> .read proto.txt
sqlite> .r
At 02:17 PM 11/3/2005, Fred Williams wrote:
>Has somebody got amnesia or something? I think I've seen this question
>going on four or five times now.
There was a problem with my subscription so I didn't see
my own posts. Not seeing it, I expected it got eaten by
a spam filter and sent it again.
If I designed a sqlite database to be used by a bunch of independent
applications, for example a group of CGI scripts each of which
opened the database, did some processing, and exited, would
that be (a) safe (b) effecient ?
If I designed a sqlite database to be used by a bunch of independent
applications, for example a bunch of CGI scripts each of which
opened the database, did some processing, and exited, would
that be (a) safe (b) effecient ?
If I designed a sqlite database to be used by a bunch of independent
applications, for example a bunch of CGI scripts each of which
opened the database, did some processing, and exited, would
that be (a) safe (b) effecient ?
On Sep 4, 2005, at 5:53 AM, Igor Tandetnik wrote:
Christopher R. Palmer wrote:
Unfortunately, that's not the case. The code that was being used
when I created ticket 1272 was very simple. In the main thread, I
opened a handle for each thread. Each thread then worked
independently using onl
Has anyone created (or is logging) a testbed so that new versions of SQLite
can be run through some regression tests? Might want to add this one to the
mix if so.
-Dave
-Original Message-
From: Downey, Shawn [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 24, 2005 11:56 AM
To
will
try helping tracing it down.
i really wonder, what might be wrong with hoary, so those unpredictable
strange error occur...
thanks anyways
dave
Martin Jenkins schrieb:
CREATE TABLE `blacklist` (
`blcfid` int(11) NOT NULL default '0',
`blndid` int(11) NOT NULL default '0',
PRIMARY KEY (`blcfid`,`blndid`)
) TYPE=MyISAM;
If you run the sqlite3 command line utility and .read your script you'll
see why it doesn't work - you need to
hi!
versions:
sqlite3: v3.2.1 with corresponding version of libsqlite3
(/usr/lib/libsqlite3.so.0.8.6)
testing oses: ubuntu hoary and debian sarge
i get various errors, if importing the attached file with
---
rm -f myproject.sqlite3
cat myproject.mysqldump \
| sed "s/\`/\"/g" \
Wait - what if AUTOVACUUM is set on the database, and I'm the only one doing
inserts/deletes? Will I still need to sqlite3_prepare() my statements again
if auto-vacuum is on?
-Dave
-Original Message-
From: D. Richard Hipp [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 10, 2005 4:12
Yes, actually I'm doing that already. Thanks!
-Dave
-Original Message-
From: D. Richard Hipp [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 10, 2005 4:12 AM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] Binding a column name?
On Sun, 2005-07-10 at 00:23 -0700, Brown, Dave
That is what I do. But that also means I have to call sqlite_prepare() each
time, instead of just once. I was originally hoping I could prepare() once
and just bind.
-Dave
-Original Message-
From: Eugene Wee [mailto:[EMAIL PROTECTED]
Sent: Sunday, July 10, 2005 12:18 AM
To: sqlite
Actually I doubt it can - since without the column name it can't create the
prepared statement byte code, right?
-Dave
-Original Message-
From: Brown, Dave [mailto:[EMAIL PROTECTED]
Sent: Saturday, July 09, 2005 8:46 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] Binding a c
, which treats the column name as text and not part of the compiled
statement.
-Dave
omply with US Government export...".
So is it 256 bits or bytes which is the true max key length that should be
used (assuming non-export) ?
-Dave
, Brown, Dave <[EMAIL PROTECTED]> wrote:
>
> In looking at the SQLite C++ Wrapper
> (http://dev.int64.org/sqlite.html) I noticed the example insert code has a
loop like:
>
> for(int i=0; i<1; i++) {
> cmd.bind(1, i);
> cmd.executenonquery();
> }
>
>
executed (executenonquery() just ends up calling sqlite3_step() ). Doesn't
sqlite3_reset() have to be called in order to reuse a prepared query?
-Dave
, it works. I didn't
think having a comment after the statement was supposed to be a syntax
error. Is it?
-Dave
Why not use a mutex around your database code in your program?
-Original Message-
From: de f [mailto:[EMAIL PROTECTED]
Sent: Friday, June 17, 2005 9:58 AM
To: sqlite-users@sqlite.org
Subject: [sqlite] How to Lock other threads out of DB until specifically
UNlocking the DB?
I need to Loc
te
structure pointer simultaneously in two or more threads.
QUESTION: If I wrap the database calls with a mutex, so two threads can't
use the sqlite structure simultaneously, is this ok? (Even though a thread
which didn't create the struct will be using it).
-Dave
I dont know how they were generated, but they are in the source zipfile you
download from the sqlite.org site.
-Dave
-Original Message-
From: Thomas Fjellstrom [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 09, 2005 3:16 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] #line macros
ey just leftover from debugging?
Thanks,
Dave
Is there any benefit in a C program to wrapping a single insert via
sqlite3_exec() in a transaction?
In other words, is
INSERT INTO table1 VALUES(1,2);
any worse (or better) than doing:
BEGIN;
INSERT INTO table1 VALUES(1,2);
COMMIT;
Thanks,
Dave
aren't making calls on the sqlite3 struct at
once.
On 5/21/05, Brown, Dave <[EMAIL PROTECTED]> wrote:
>
> Is it ok to call sqlite3_prepare() for a statement using the sqlite3
> struct owned by thread A, and then run the actual query with
> sqlite3_step() and
> sq
database
file).
-Dave
No I dont think they do. I downloaded the full .zip file and it's just the
source code. Same with the gzip.
-Dave
-Original Message-
From: Tiago Dionizio [mailto:[EMAIL PROTECTED]
Sent: Friday, May 20, 2005 4:11 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] SQLite HTML Doc
Is the SQLite HTML documentation (all the pages found under
www.sqlite.org/docs.html) available for download?? The site was down a bit
today and that can be frustrating!
-Dave
Because I need to insert them into the 2nd table as the result of a select,
not first retrieve them all into my program, then loop over the results and
insert into the 2nd table.
-Dave
-Original Message-
From: Jay Sprenkle [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 19, 2005 9:16 AM
So I guess I have to write my own function, "current_row()", using the
sqlite3_create_function() APIs?
-Dave
-Original Message-
From: Jay Sprenkle [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 19, 2005 8:40 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] How to get row
2
9 3
etc
Any ideas?
-Dave
That's not what I want, though. I want to UPDATE the actual values in the
order_number column so they end up as 1, 2, 3 instead of 1, 3, 4.
So I want the result of a "select * from table order by order_number" to
give me:
a, 1
c, 2
d, 3
-Dave
-Original Message-
From
:
Start with this:
a, 1
b, 2
c, 3
d, 4
now delete the row with 'b':
a, 1
c, 3
d, 4
I'm trying to figure out how to write an update statement which will reorder
this back to:
a, 1
c, 2
d, 3
Help!
-Dave
illiseconds
sqlite3>
What do you guys think?
-Dave
Doing
the UPDATE + SELECT in C++ gives me back the next id properly :)
Thanks for the help.
-Dave
-Original Message-
From: Steve O'Hara [mailto:[EMAIL PROTECTED]
Sent: Monday, February 21, 2005 3:07 AM
To: sqlite-users@sqlite.org
Subject: RE: [sqlite] Making a SEQUENCE?
Hi Dave,
one else hasn't
also incremented it further before I got to it.
Do you see what I mean?
-Dave
-Original Message-
From: Ulrik Petersen [mailto:[EMAIL PROTECTED]
Sent: Monday, February 21, 2005 12:49 AM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Making a SEQUENCE?
Hi again
ent?
Does anyone have a solution to this?
Thanks,
Dave
nalize(ppStmt);
/* CstrCommand3 contains a INSERT statement */
sqlite3_prepare (hDB,CstrCommand3,strlen(CstrCommand3),&ppStmt3,&CstrTail);
sqlite3_step(ppStmt3);
sqlite3_finalize(ppStmt3);
===
Thanks,
Dave
atement),
the sqlite3_step() call returns SQLITE_ERROR.
Is it legal for me to have the prepare/step/finalize coding embedded as I've
shown in my simple example above? Any help would be appreciated.
Thanks,
Dave
ALPHA version?
Thanks,
Dave
in a world-writable directory.
Thank you.
Dave Bodenstab
On Nov 8, 2004, at 10:51 AM, Clay Dowling wrote:
Tomas Franzén said:
On 2004-11-09, at 16.42, b.bum wrote:
Are you statically linking SQLite or using a dylib?
I don't know. That's not a good sign, is it? ;-)
I have compiled SQLite and added libsqlite.o and sqlite.h to the
project items in XCode.
ld
On Oct 12, 2004, at 12:33 PM, Shawn Walker wrote:
How do I disable Journalling in SQLite 3.0? I thought setting "PRAGMA
temp_store=MEMORY;" would do that?
Try: PRAGMA synchronous = OFF;
http://www.sqlite.org/lang.html#pragma_synchronous
Did I read somewhere that default_synchronous is no longer
On Aug 11, 2004, at 3:48 PM, Dave Hayden wrote:
Since only one of the competing threads will have completed a write
(right?), can't the others "postpone" their transactions somehow until
they can get a write lock?
That is, postpone the "begin transaction" action. Since
On Aug 11, 2004, at 4:05 PM, tezozomoc wrote:
I have solved this problem by writing a wrappers around sql_exec and
sql_query, sql_step, etc...
In these wrappers I handle the waiting for busy and the lock file
issue...
I was doing the same, calling usleep() whenever I got a SQLITE_BUSY
return and
two opened write
transactions, you shouldn't be able to open two in the first place.
Please let me know if there's something I'm missing here..
Thanks,
-Dave
"num") and do:
db1: BEGIN TRANSACTION;
db2: BEGIN TRANSACTION;
db1: INSERT INTO test VALUES ( 1 );
At this point, both of these return SQLITE_BUSY:
db2: UPDATE test SET num = 2 WHERE num = 1;
db1: END TRANSACTION;
Is this a bug? Or do I have to do something with sqlite 3 I didn'
On Jul 26, 2004, at 2:13 PM, Gus Mueller wrote:
What's interesting is that balance_nonroot doesn't call
balance_shallower- it calls balance, and then balance calls
balance_shallower.
Yeah, it looks like a frame header is getting tromped on and confusing
the debugger. I filed it at bugreporter.appl
On Jul 24, 2004, at 1:32 AM, [EMAIL PROTECTED] wrote:
sqlite> select count(*) from newsgroups where name =
'rec.arts.anime.fandom';
0
sqlite> select count(*) from newsgroups where name like
'rec.arts.anime.fandom';
1
Figured it out: I was using sqlite3_bind_blob(), but if I change to
sql
x0001f2d0 in sqlite3_step (pStmt=0x55e340) at ../src/vdbeapi.c:159
#7 0xa36c in sqlite3_exec (db=0xc9, zSql=0x280ac40 "",
xCallback=0, pArg=0x40dbc, pzErrMsg=0x0) at ../src/legacy.c:79
and here's the code (XCode 1.2 project):
http://www.opaque.net/~dave/dbtest.tgz
Can another OS X
On Jul 24, 2004, at 2:45 AM, Paolo Vernazza wrote:
[EMAIL PROTECTED] wrote:
How can a string be like something that has no wildcards, but not
equal to it? My hunch is it has something to do with character
encoding, but is that really how it should work?
Like is not case sensitive...
Hey, I never
7;rec.arts.anime.fandom';
0
sqlite> select count(*) from newsgroups where name like
'rec.arts.anime.fandom';
1
How can a string be like something that has no wildcards, but not equal
to it? My hunch is it has something to do with character encoding, but
is that really how it should work?
Thanks,
-Dave
), file
C:/z_dev/other/voom/sqlite/src/btree.c, line 2055
Any recommendations?
Thanks,
Dave
name LIKE '%foo%';
run faster with an index on the flag column since it can scan just the
flag = 1 rows instead of the full table?
-Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Mar 18, 2004, at 1:30 PM, Corporate wrote:
Two words! Thread Synchronization! (above the database API in your
code).
Works like a charm.
I just sat down with a cup of coffee and came to the came
conclusion--if I keep only one connection to the database and do the
mutexing myself, I get bett
ith a locked database. :)
Many thanks,
-Dave
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
On Mar 18, 2004, at 11:28 AM, David Morel wrote:
Le jeu 18/03/2004 à 15:42, Christian Smith a écrit :
| "The problem with the French is that they don't have a word for
entrepreneur"
| George W. Bush
did the man realy SAY that?
Nah:
http://www.snopes.com/quotes/bush.htm
It's a variation on t
On Mar 17, 2004, at 5:44 PM, D. Richard Hipp wrote:
Dave Hayden wrote:
> I'm inserting a bunch of data loaded off the network into a table.
Here at
> the office, SQLite keeps up pretty well; at home on the cable modem,
it's a
> huge bottleneck.
Is the database file on a netw
I'm inserting a bunch of data loaded off the network into a table. Here
at the office, SQLite keeps up pretty well; at home on the cable modem,
it's a huge bottleneck. Loading now takes about 10x what it used to
when we were just storing in memory. Yes, I'm doing BEGIN/END around
the entire tra
After reading that SQLite should Just Work, I dug through my code and
found my bug: I was calling sqlite_reset before invoking my precompiled
queries instead of afterwards. I changed it around and it seems to be
fixed--leaving the vm in a running state must have held a lock
somewhere?
Many th
wo threads: the UI thread
mostly reads and occasionally updates rows, while the network thread
loads new messages and inserts them. Will that work, or do I just
misunderstand how SQLite does multithreading?
Many thanks,
-Dave
---
401 - 487 of 487 matches
Mail list logo