--- Nathaniel Smith <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 07, 2006 at 01:24:38PM -0400, [EMAIL PROTECTED] wrote:
> > If it is inconvenient to rollback and retry the entire transaction,
> > then start the transaction initially with BEGIN EXCLUSIVE. This
> > will acquire the reserved lock
What you're trying to do is possible without .def files
or import files or whatever.
Just put something like this in sqlite3.h before everything:
#ifdef _WIN32
#define S3EXPORT __declspec(dllexport)
#define S3IMPORT __declspec(dllimport)
#define S3CALL __stdcall
#ifdef
Without journalling, you cannot have a ROLLBACK command.
And the semantics of UPDATE become UPDATE OR FAIL instead
of the default UPDATE OR ABORT. The difference is subtle,
but important.
There are other reasons to disable the rollback journal:
Suppose you want to create a database for
* Pat Wibbeler <[EMAIL PROTECTED]> [2006-06-07 22:55]:
> It's entirely possible I'm reading these docs incorrectly, but
> this strategy has worked quite well for me.
No, I don’t see any error in your reading. My apologies; I should
have consulted the docs instead of going by mailing list posts.
Hi Mark,
have you tried to do a VACUUM on the database?
It helps a lot when it comes to the 'read ahead'
feature of the database.
Michael
Mark Drago wrote:
Hello,
I'm writing a web cache and I want to use SQLite to store the log of all
of the accesses made through the web cache. The idea
Robert Simpson wrote:
Pardon my ignorance about *nix, but what happens during this whole global
symbol mapping thing if two libraries both export the same function name?
generally the first one is picked, though there's variations between OS.
the search order for first is fairly flexible
At 22:56 07/06/2006, you wrote:
Hi.
In mine to a database after the size of a file of base has reached
4096 Mb, I am not added any more records. After a command sqlite3_step
the mistake (sqlite3_errmsg) stands out: "SQL logic error or missing
database".
Please help, it is necessary for me to
Jay Sprenkle wrote:
> On 6/7/06, Bill KING <[EMAIL PROTECTED]> wrote:
>> I understand why I'm getting the deadlock now, lazy locking, (it's
>> against the logical grain of transaction/locking, but that's a whole
>> other argument) . Maybe this should be highlighted with big arrows in
>> the
[EMAIL PROTECTED] wrote:
> Bill King <[EMAIL PROTECTED]> wrote:
>
>> Christian Smith wrote:
>>
>>> If one transaction already has a read lock, and another transaction
>>> has a reserved lock (trying to get a write lock), neither thread can
>>> get a write lock. One of the transactions
Dennis Jenkins wrote:
You can do something very similar on windows. Just dump a
hacked "kernel32.dll" into the same directory as the EXE. This might
not work with SP2 of XP for system DLLs. However, if the EXE uses a
non-system DLL (like libJpeg.dll), then just replace that one. Put some
Bill King wrote:
It would be nice if SQLite told us this. However, SQLite detects the
reserved lock and returns SQLITE_BUSY, telling niether transaction
much other than to try again. If a reserved lock is detected when
trying to promote an existing read lock, this is a deadlock situation
[EMAIL PROTECTED] wrote:
> Dennis Jenkins <[EMAIL PROTECTED]> wrote:
>
>> The Windows way does not seem as powerful as the Unix way. I hate
>> the M$ operating systems, but I code for them almost every day. So my
>> next statement isn't so much a defense of Microsoft , but a rebuttal to
"Rick Keiner" <[EMAIL PROTECTED]> wrote:
> Yes, apparently. The :memory: DB doesn't show the storage being reclaimed by
> the OS. In fact, after some more analysis, it's not reusing storage already
> allocated. :( Could that be?
>
> After checking the vacuum.c code. It's not doing anything for an
Hi.
In mine to a database after the size of a file of base has reached
4096 Mb, I am not added any more records. After a command sqlite3_step
the mistake (sqlite3_errmsg) stands out: "SQL logic error or missing
database".
Please help, it is necessary for me to process a lot of records.
Operation
Yes, apparently. The :memory: DB doesn't show the storage being reclaimed by
the OS. In fact, after some more analysis, it's not reusing storage already
allocated. :( Could that be?
After checking the vacuum.c code. It's not doing anything for an in-memory
DB. Would that be handled elsewhere?
* Pat Wibbeler <[EMAIL PROTECTED]> [2006-06-07 20:50]:
> Beginning everything with BEGIN IMMEDIATE should eliminate the
> possibility of deadlock, but you will serialize read-only
> operations.
Why? BEGIN IMMEDIATE acquires a for-read lock. Multiple for-read
locks can be acquired concurrently. It
Dennis Jenkins <[EMAIL PROTECTED]> wrote:
>
> The Windows way does not seem as powerful as the Unix way. I hate
> the M$ operating systems, but I code for them almost every day. So my
> next statement isn't so much a defense of Microsoft , but a rebuttal to
> your assertion that "the
If filestamp is your identifier, the following statement will do the job...
DELETE FROM files
WHERE filestamp IN
(SELECT filestamp FROM snapshot);
I recommend that you check out some tutorials online and at least learn the
basics. There's no reason to continue to suck at SQL. A good place to
Robert Simpson wrote:
>> -Original Message-
>> From: Dennis Jenkins [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, June 07, 2006 11:46 AM
>> To: sqlite-users@sqlite.org
>> Subject: Re: [sqlite] DLLs containing user-defined SQL functions
>>
>> Robert Simpson wrote:
>>
> -Original Message-
> From: Dennis Jenkins [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 07, 2006 11:46 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] DLLs containing user-defined SQL functions
>
> Robert Simpson wrote:
> >> -Original Message-
> >> From: [EMAIL
With all the other discussions going on with more important matters
please excuse this brief interruption..
I have two tables that are created thusly:
CREATE TABLE files (filehash VARCHAR(48) UNIQUE, filestamp INTEGER,
filename VARCHAR(2048));
CREATE TABLE snapshot (filehash VARCHAR(48)
Robert Simpson wrote:
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, June 07, 2006 10:36 AM
>> To: sqlite-users@sqlite.org
>> Subject: Re: [sqlite] DLLs containing user-defined SQL functions
>>
>>
>> It's official then: The lack of sensible
Beginning everything with BEGIN IMMEDIATE should eliminate the
possibility of deadlock, but you will serialize read-only operations.
If your transactions are short or contention is low, using BEGIN
IMMEDIATE makes things easy.
However, if you find that you have a set of read-only operations that
> If it is inconvenient to rollback and retry the entire transaction, then
start the transaction initially with BEGIN EXCLUSIVE.
> This will acquire the reserved lock immediately (instead of waiting to the
first write occurs) and so you will either get an
> SQLITE_BUSY right away (when it is a
I have a sqlite3_get_table query that sometimes returns error code 100 (
SQLITE_ROW). Can someone explain what condition would cause this - I
didn't think that this return code would happen for this function, since
it should fill up the 'results' table.
The query sometimes works, sometimes
"Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
>
> Note an inherent chicken and egg problem: you can't build two DLLs (or
> an EXE and a DLL) using this approach where a circular dependency
> exists, that is, where DLL A needs a function exported from DLL B, and
> at the same time DLL B needs a
Hello,
It could be done using something like that :
===
sharedenv.h// used in calling program and DLL.
===
typedef struct{
pointer to functions funA,funB ... etc
} mysharedfuns;
=
Main Program
=
mysharedfuns sharedfuns;
main()
{
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.
Christian Smith <[EMAIL PROTECTED]> wrote:
> On Wed, 7 Jun 2006, Jiri Hajek wrote:
>
> > However, right after fixing this, I found another problem. It certainly can
> > be my fault, but I don't see how could it be: If I don't use transactions,
> > multiple threads seem to proceed well, but then
Christian Smith
<[EMAIL PROTECTED]> wrote:
This is one of the most painful aspects of Windows programming (among
many) but can be somewhat mitigated by doing away with .def files:
http://msdn2.microsoft.com/en-us/library/3y1sfaz2.aspx
Basically, wrap the above in a macro, something like:
#ifdef
"Pat Wibbeler" <[EMAIL PROTECTED]> wrote:
> You can use BEGIN IMMEDIATE or BEGIN EXCLUSIVE depending on the type of
> lock you'd like.
>
If you are just trying to make sure the database does
not change while you back it up, then Jay's suggestion
of BEGIN IMMEDIATE is the better approach (better
Do you have any transactions that look like:
BEGIN
SELECT
INSERT/DELETE/UPDATE
COMMIT
If you do, you may have multiple threads trying to escalate from a
SHARED to a RESERVED lock as described here:
http://sqlite.org/capi3ref.html#sqlite3_busy_handler
It's important that if you have
You can use BEGIN IMMEDIATE or BEGIN EXCLUSIVE depending on the type of
lock you'd like.
SQLite BEGIN syntax:
http://sqlite.org/lang_transaction.html
SQLite locks:
http://sqlite.org/lockingv3.html
SQLite Busy Handler:
http://sqlite.org/capi3ref.html#sqlite3_busy_handler
Pat
-Original
Thx!
[EMAIL PROTECTED] wrote:
Russell Leighton <[EMAIL PROTECTED]> wrote:
So, this was very enlightening...I have a simple backup function that I
now question is correct.
It does:
- execute "begin" // lock from writes
-copy db file to new file byte by byte
- execute "commit" //
On Wed, 7 Jun 2006, Jiri Hajek wrote:
However, right after fixing this, I found another problem. It certainly can
be my fault, but I don't see how could it be: If I don't use transactions,
multiple threads seem to proceed well, but then right after I add BEGIN and
COMMIT to some place, all
On 6/7/06, Jiri Hajek <[EMAIL PROTECTED]> wrote:
However, right after fixing this, I found another problem. It certainly can
be my fault, but I don't see how could it be: If I don't use transactions,
multiple threads seem to proceed well, but then right after I add BEGIN and
COMMIT to some
On Wed, 7 Jun 2006, Igor Tandetnik wrote:
Dennis Jenkins
<[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
"Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
On Windows, the loader works in a very different way. Basically,
export/import connections are established at link time, not at load
time.
> I have been in contact with the developer of your flash filesystem
> and we are working on a solution now...
That really is excellent news. Thanks for your interest and effort. I look
forward to the solution.
DISCLAIMER:
This information and any attachments contained in this email message
On Wed, 7 Jun 2006, Igor Tandetnik wrote:
[EMAIL PROTECTED] wrote:
"Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
On Windows, the loader works in a very different way. Basically,
export/import connections are established at link time, not at load
time. The loader does not perform a symbol search
Thanks for an additional explanation, I used sqlite3_get_autocommit() for
debugging and it helped me to find out that it really was my fault. There
was an incorrect processing after COMMIT returned SQLITE_BUSY. So sorry for
this.
However, right after fixing this, I found another problem. It
Dennis Jenkins
<[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] wrote:
"Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
On Windows, the loader works in a very different way. Basically,
export/import connections are established at link time, not at load
time. The loader does not perform a symbol search
[EMAIL PROTECTED] wrote:
"Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
On Windows, the loader works in a very different way. Basically,
export/import connections are established at link time, not at load
time. The loader does not perform a symbol search over all the DLLs,
the import tables in the
On 6/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
The disadvantages to the windows approach are obvious.
Before I add this characteristic to the ever-growing
list of reasons why I hate windows and especially hate
programming for windows, I should be fair and ask if
there are any advantages
[EMAIL PROTECTED] wrote:
> "Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
>
>>> This all works great on Unix. When I use dlopen() to
>>> attach the shared library, the procA() reference in
>>> the shared library is automatically resolved to the
>>> address of procA() in the main program.
>>>
On 6/7/06, Russell Leighton <[EMAIL PROTECTED]> wrote:
So, this was very enlightening...I have a simple backup function that I
now question is correct.
It does:
- execute "begin" // lock from writes
-copy db file to new file byte by byte
- execute "commit" // unlock
...I was
"Rick Keiner" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Is there anything similar with a ":memory:" DB to auto-vacuum with a disk
> DB. I would like to release storage that is no longer being used by SQLite.
> Is this possible?
>
I think auto-vacuum work with :memory: databases just as
well as
"Igor Tandetnik" <[EMAIL PROTECTED]> wrote:
>
> > This all works great on Unix. When I use dlopen() to
> > attach the shared library, the procA() reference in
> > the shared library is automatically resolved to the
> > address of procA() in the main program.
>
> On Windows, the loader works in
"Allan, Mark" <[EMAIL PROTECTED]> wrote:
>
> Apparently, yes the flash filesystem implements fully atomic writes, =
> indeed this was one of the features that made us choose this particular =
> filesystem. I know from development of our product that files are only =
> updated when the file is
Hello,
Is there anything similar with a ":memory:" DB to auto-vacuum with a disk
DB. I would like to release storage that is no longer being used by SQLite.
Is this possible?
Thanks,
Rick Keiner
[EMAIL PROTECTED] wrote:
Suppose the main program (the .exe file) contains a
function procA() and the DLL contains a function procB().
I want procB() to be able to call procA().
While it is possible for the EXE to export a function via a .def file,
and for DLL to import it, it's a
> -Original Message-
> From: Robert Simpson [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 07, 2006 7:55 AM
> To: 'sqlite-users@sqlite.org'
> Subject: RE: [sqlite] DLLs containing user-defined SQL functions
>
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 07, 2006 7:30 AM
> To: Sqlite-users
> Subject: [sqlite] DLLs containing user-defined SQL functions
>
[snip]
> Another way to ask the question is this: How do I build
> a DLL in windows that
Hi Richard,
I'm no windows expert, but why don't you use something like
the tcl stubs mechanism? Build a static sqlite_stubs.a library
and link all loadable dynamic libs against it.
Kind regards
Ulrich
On Wednesday 07 June 2006 16:30, [EMAIL PROTECTED] wrote:
> I'm trying to add the ability
For me, I have a bunch of threads writing to the database. That is the only
part I do multithreaded. (All my read queries are handled after all the data
is written.) I just use the scoped_lock operator from the Boost library at
the top of my function that does the bind and step calls. I pass a
I'm trying to add the ability to dynamically load DLLs
containing SQL functions and collating sequences to
SQLite. Things are working great on Unix, but I'm having
issues with Windows. Windows experts, please help me.
Suppose the main program (the .exe file) contains a
function procA() and the
Dr Hipp,
Thanks for your reply.
I have contacted the authors of our filesystem HCC Embedded. The filesystem we
are using is called EFFS, some information can be found at
http://www.hcc-embedded.com/site.php if necessary.
Apparently, yes the flash filesystem implements fully atomic writes,
"Allan, Mark" <[EMAIL PROTECTED]> wrote:
>
> our flash file system is 100% power-fail proof and thus the
> journalling of the database for us is not required.
>
Without journalling, you cannot have a ROLLBACK command.
And the semantics of UPDATE become UPDATE OR FAIL instead
of the default
All,
I have already posted some messages some months ago concerning disabling the
creation of the journal file. It seems that currently there is no way to
configure SQLite to do this. Journalling, it seems, is an integral part of the
paging layer, is this correct?
My question is thus, has
As various people search for application and/or SQLite bugs
related to multiple threads and BEGIN, let me try to aid the
effort by better describing exactly what BEGIN does and
suggesting some debugging tricks.
Realize that BEGIN does not actually create any file locks
or check to see if any
Hi, all
I install PHP and Apache on a WINDOWS XP box. After I enable the php_pdo.dll
and php_pdo_sqlite.dll, the PHP info shows the sqlite version as
"3.2.8Undefined". Why is it Undefined? And is it possible to get a later
version of php_sqlite.dll , such as 3.3.3?
Jack
60 matches
Mail list logo