Hello,
I'd been looking into a bug in my
application which worked down to
an issue with Bitwise AND and
bound variables in prepared
statements it seems.
The query...
SELECT *
FROM example
WHERE (intColumn & 4294901760) = ?
Where 'intColumn' is an integer
column and the parameter is
bound using
Hello,
I've been wrestling with this issue
for a long while now so I am hoping
some could give some indication to
what I am doing wrong.
I expected this script to work...
create table testtable ( testcol int );
insert into testtable ( testcol ) values ( -2146369472
)
select * from testtable
Hello Igor,
Thanks. That was the problem. I had been
doing 32 bit math on SQLite's 64 bit integers.
Best regards,
Kervin
--- Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> Kervin L. Pierre
>
> wrote:
> > I expected this script to work...
> >
> > cre
Hello,
--- Dennis Cote <[EMAIL PROTECTED]> wrote:
> This really has nothing to do with the Windows DLL
> system. It is simply
Thanks for the explanation. Wondered what that
bug reporter was talking about :)
There's a lot Windows does wrong, we don't have
to go around making up stuff :)
Hello,
I working on a function in our open-source
Outlook plugin [ http://openconnector.org ]
and I've run into some speed issues.
We've been avoiding optimizing for speed
till later but this function is currently
operating at 3 orders of magnitude worse
than acceptible and is slowing down
what
happens.
Best regards,
Kervin
--- Dennis Cote <[EMAIL PROTECTED]> wrote:
> Kervin L. Pierre wrote:
> > I'd appreciate any help or
> > pointers optimizing the SQL in the main
> > loop.
> >
> > for( 'large number' ){
> > // query1
> &g
Hello,
My application is building a query string
with multiple queries. The number of
queries depends on the user and for
performance, I would like to execute as
few sqlite_exec() calls as possible.
So my question what is the maximumm number
of characters there can be in a query
string sent to
Hello,
Thanks.
Best regards,
Kervin
--- [EMAIL PROTECTED] wrote:
> "Kervin L. Pierre" <[EMAIL PROTECTED]> wrote:
> > what is the maximumm number
> > of characters there can be in a query
> > string sent to sqlite_exec()?
>
> 2147483647 bytes
&g
Hello,
Thanks for the explaination. Looks like
this isn't going to help me after all.
Thought sqlite3_exec() would compile the
query only once.
Best regards,
Kervin
--- Dennis Cote <[EMAIL PROTECTED]> wrote:
> Kervin L. Pierre wrote:
> > and for performance, I would like to exe
Hello,
I have a few queries that are executed very
often. I would like to keep them around as
much as possible.
The problem is, I don't know what
'invalidates' a prepared statement. In
other words, when can I expect to have to
're-'prepare a statement?
How long can I keep a prepared
Hello Igor,
Thanks for the info.
Best regards,
Kervin
--- Igor Tandetnik <[EMAIL PROTECTED]> wrote:
> Kervin L. Pierre
>
> wrote:
> > The problem is, I don't know what
> > 'invalidates' a prepared statement. In
> > other words, when can I expect to hav
Hello Michael,
Thanks.
Best regards,
Kervin
--- Michael Ruck <[EMAIL PROTECTED]> wrote:
> Use the function sqlite3_expired to determine, when
> you need to
> recompile a prepared statement. That's the approach
> I use.
>
> Mike
>
> Am 24.09.2006 um
Hello,
I just tried. I am getting build errors
for CVS. 3.3.7 builds though.
Error 101 error C2065: 'SQLITE_FUNCTION' : undeclared
identifier c:\src\sqlite\sqlite\src\expr.c 1185
Error 121 error C2065: 'sqlite3_overload_function' :
undeclared identifier
Hello,
Thanks for the improvements!
Q1
Any name would be find, though the
'ex' extension seems to be popular
for that sought of thing.
Q2
A non-blocking resultset API? :)
Sorry, had to try.
Q3
I think this should be a new error
for the caution's sake. But overall
I prefer more, finer grain,
I have to say SQLite.NET, like SQLite itself is
an incredible piece of software.
- Original Message
> From: Harold Wood <[EMAIL PROTECTED]>
> To: General Discussion of SQLite Database
> Sent: Wednesday, July 16, 2008 11:46:29 PM
> Subject: Re: [sqlite] ANN:
Hello Chris,
It looks like you've been dealing with this
for a while now.
1. Try these extra gcc flags in your build...
"-Wall -Wconversion -Wshadow". Also try
renaming your database handle to something
more unique.
2. Have you tried 'strace' like someone else
suggested?
3.
Paul G wrote:
richard's advice is solid. use async io/event loops if possible, separate
processes if possible, threads as a last resort, in that order. the grey
area is the 'if possible' test, since it's a multi-way tradeoff between
performance, simplicity and provable (to an extent)
Mrs. Brisby wrote:
chances are you can't use threads correctly either. This mailing list is
an excellent example of how many "professional programmers" simply can't
deal with threads- every problem they run into, it's "how do I make
sqlite work with threads".
If you have to ask that question,
scunacc wrote:
I have built with debugging on, and can't do anything with the core
dump:
dbx
Type 'help' for help.
enter object file name (default is `a.out', ^D to exit): sqlite3
reading symbolic information ...
[using memory image in core]
Illegal instruction (reserved addressing fault)
Sorry, I read your trace wrong, thought the
debugger was complaining.
What does the the 'where' command say?
scunacc wrote:
Dear Kervin,
Can you run the sqlite3 under dbx? You may have better luck
getting a backtrace that way instead of reading the core file
after the crash. eg. 'dbx -r
Hello,
I am trying to figure out a way to return
the actual or approximate table size in a
database.
Basically, in my application a table relates
to an object and I need to calculate the
approximate size of an object.
There is the sqlite3_column_bytes(), but I
understand that that function
D. Richard Hipp wrote:
Are you trying to estimate the size of a table,
or a single row in that table? Your words say
the table but the context suggest you really
want the size of a row.
I need the table. But I thought if I could
have the row, calculating the total for the
table wouldn't
Interesting...
Bankers' Rounding
http://blogs.msdn.com/ericlippert/archive/2003/09/26/53107.aspx
Brass Tilde wrote:
From: "Bob Dankert"
Using an older version which I compiled, I get 9.9, though it
seems it should round up to 10.0?
This may be dependent upon the math library linked
8.256.5680
f. 608.256.3780
-Original Message-
From: Kervin L. Pierre [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 30, 2005 12:18 PM
To: sqlite-users@sqlite.org
Subject: Re: [sqlite] Unlucky number for the ROUND function
Interesting...
Bankers' Rounding
http://blogs.msdn.com/ericlip
Hello,
Is this the only reason for the...
"database handle can only be used on the same thread
that opened it"
...rule? Does Windows have that issue?
If so, can we convert this to a compile time option?
Eg. OS_SUPPORTS_THREADSAFE_FILE_LOCKS or similar
flag which can be set to true for OSes
Hello,
Seems to me if your backup program does
a "BEGIN EXCLUSIVE" before doing the
file copy then you should be fine. Just
my guess though.
I believe an exclusive transaction
should ensure that you are the only
writer to the database.
Regards,
Kervin
John Duprey wrote:
I'd like to copy a
Darren Duncan wrote:
At 7:25 PM -0400 9/10/05, D. Richard Hipp wrote:
Well, that's fine as long as CROSS still continues to mean and do what
it has always meant, which is that you explicitly want the result set of
If I understand the issue correctly, it does.
"FROM a, b" is usually
I need to retrieve parts of the Blob column
value. The blob may simply be to large for
memory at runtime.
There is no way to retrieve part of a
blob value in SQLite.
From my understanding, most databases store
blob values separate from the rest of the row.
Would that be a possibility for
Christian Smith wrote:
I went through the link you had sent. This page mentions 5 different
types of locks which are provided by the pager module in SQLite. Could
you please clarify these 2 doubts -
1. My application uses our own Mutex variables to allow single
reader/writer operation -
D. Richard Hipp wrote:
Hence, the result set contains no rows. A COUNT() of a empty result
set gives NULL.
I thought per the last discussion on "Sum and NULL"
that the count of an empty set would return zero.
Regards,
Kervin
SQLite is a great database, but if you're
using Java, why not use something like
Apache Derby ( http://db.apache.org/derby/ )?
Regards,
Kervin
Christoph Langewisch wrote:
Hello,
I'm looking for an embedded SQL database and found SQLite. Now I need some
information I did not found at the page
Cloudscape, which was given to Apache foundation
and is now the Apache Derby Project.
http://db.apache.org/derby/
Jonathan Ballet wrote:
I think you're talking of http://hsqldb.org/, used among other project
by OpenOffice ...
Hello,
We are getting ready to start using in-
memory database to cache sqlite reads/writes
in effort to improve speed. For background,
the application is an email client.
The way we envision the caching working is
that we have a mirror copy of any table in
use in memory. The tables are small
[EMAIL PROTECTED] wrote:
I'm reading and replying to this message using an SQLite-backed
email client See
That's very interesting...
All incoming and archival emails are stored as BLOBs in a table.
The full text of messages is indexed. It is all very fast and
I haven't had to do anything
[EMAIL PROTECTED] wrote:
Is this right? You are doing a separate
CREATE TABLE for each message? That's going
to be the source of your problem. I think
Yes we are. I tried a message/row design
early on but I could not count on it being
behaving well. The problem was fitting
Outlook's
Hello,
I think the problem is that PHP uses a file-based
session serialization. Therefore anything that
cannot be saved to a file and returned ( eg. you
can't do this with file handles, etc. ) cannot be
saved in session scope in PHP as it is implemented
by default.
There is the 'mm' extension
Hello,
We are currently looking at this very issue
ourselves.
I just put in an enhancement request...
http://www.sqlite.org/cvstrac/tktview?tn=1679
For allowing the runtime replacement of memory
functions by using function pointers instead
of C mallocs. We could then replace SQLite's
Hello,
I am not sure if that is exactly the problem, but
it seems that sqlite3_prepare() deadlocks when called
to attach a in-memory database that is already attached.
The second ATTACH occurs on a separate thread with a
separate handle to a database that is already opened in
the process.
Is
Hello Daniel,
Daniel Franke wrote:
Was sqlite designed for those numbers? The docs state that sqlite
supports "databases up to 2 terabytes in size". OTOH, "supports" is
not the same as "works-well-with"?! Any suggestions whether my
descision to use sqlite was appropiate for this table design?
Alexander Roston wrote:
> I asked the compiler to show me a list of the library
routines and "sqlite3_release_memory" was not present.
shouldn't that give you a link error rather
than a segfault? Guessing that if your program
linked properly the linker found the function
somewhere. Maybe
Hello,
I was under the impress that we could never
get an SQLITE_BUSY, not even on COMMIT if
we use BEGIN EXCLUSIVE. But this seems to
say that COMMITs on exclusive transactions
can through SQLITE_BUSY?...
--- [EMAIL PROTECTED] wrote:
> then start the transaction initially with BEGIN
>
Hello,
Regardless of program loading design,
wouldn't this feature be better coded
using function pointers? Ie. Have a
"register/load" function that maps
functions in the exe?
PS. It would be helpful to have
sqlite3OSMalloc() and sqlite3OSFree()
as function pointers as well, so an
application
Hello,
I am writing an application that uses sqlite in
a multithreaded environment. The application is
a plugin for microsoft Outlook
( http://openconnector.org/ ) and hence I do not
have full control over how my objects are passed
amongst threads.
I am trying to keep a hash map of
Hello,
I am using SQLite 3.0.8 in a Win32 threaded
environment.
I keep getting random "Database schema has changed"
errors even though I am using thread local
storage to make sure sqlite3_open() gets called
on each thread and a there is a sqlite3* per thread.
Has anyone had any luck with resolving
Hi,
Thanks for your response. I'm at wit's end
with this thing.
I do open the database multiple times, but
exactly once per thread. I then keep the
sqlite3* on thread local storage and only
use that pointer on the thread it was created
on. This is how I interpreted the documentation.
Is that
Jeff Thompson wrote:
The way THREADSAFE works currently, is that it must be defined, but
also must have a value assigned to it. The compiler switch /D
THREADSAFE won't cause sqlite to have thread safe code included, whiel
/D THREADSAFE=1 will. Ensure you're using the latter format, or
That was at
:
http://www.sqlite.org/faq.html#q17
--- "Kervin L. Pierre" <[EMAIL PROTECTED]> wrote:
Hi,
Thanks for your response. I'm at wit's end
with this thing.
I do open the database multiple times, but
exactly once per thread. I then keep the
sqlite3* on thread local storage and only
Hello,
I've been pulling my hair out over
concurrency problems with SQLite 3.
SQLITE_BUSY, SQLITE_SCHEMA,
SQLITE_MISUSE, I get them all.
Over the last few weeks, I've been
strictly debugging SQLite problems
in my application [ http://openconnector.org ].
No program logic besides fixing
( and
Hello again,
Are there plans for supporting nested transactions
in the future? Would that be a difficult extension
to code ( eg. if one thought they could give it a
try :) )
The current restriction makes it hard to use SQLite
in developing a API eg
exposed_func1()
{
sqlite3_exec("BEGIN");
D. Richard Hipp wrote:
On Thu, 2005-03-31 at 17:08 -0500, Kervin L. Pierre wrote:
Are there plans for supporting nested transactions
in the future?
No.
Shucks. :)
Instead of calling sqlite3_exec("BEGIN") and sqlite3_exec("END")
directly, put them in a wrapper function th
Hello,
[ Sorry for the second email, but I wanted to
separate this ]
Would a...
sqlite3_begin(sqlite3 *db, int type)
sqlite3_end( sqlite3 *db )
be helpful for people counting transactions
in a thread environment?
The only difference to doing the 'transaction
level' counting yourself is that
Hello,
These functions are not supposed to
be replace nested transactions. They
just use the tools the API *already*
has to make it easier to work with
transactions in recursive and
inter-dependent functions/methods.
sqlite3_rollback() would rollback the
transaction. It does nothing else.
By you
In users experience, what is the most stable,
supported LGPL ( or free'er ) SQLite wrapper
library out there?
I've seen
http://www.sqlite.org/cvstrac/wiki?p=SqliteWrappers
LiteSQL seems like the strongest contender.
http://litesql.sourceforge.net/
Any preferences? Input?
Thanks,
Kervin
John LeSueur wrote:
Maybe it's the principle of least surprise. As a new
developer, coming to sqlite, if there was this reference counting and
loosely emulated nested transactions, and one
day I made a mistake and called sqlite3_begin() twice and calling
sqlite3_end() just once, nothing would be
Will Leshner wrote:
On Apr 6, 2005 10:43 AM, Will Leshner <[EMAIL PROTECTED]> wrote:
After thinking about this a bit more, I realized that writing a
trigger that didn't trigger for the locker is pretty simple. So I'm
thinking that triggers would work in this situation, but I'm wondering
if anybody
Ken & Deb Allen wrote:
So, would this problem still exist if the code were to open two
'connections' to the database, issue the SELECT on one open connection
and then issue the CREATE TABLE via the other open connection?
I'm new to this to, but I think it depends on if that
'db.execute()'
As far as I know, SQLite does not support multiple
simultaneous writers.
I believe you need to be ready to handle SQLITE_BUSY
and SQLITE_SCHEMA errors on every call in a multi-
threaded application.
SQLITE_BUSY...
http://www.sqlite.org/cvstrac/wiki?p=MultiThreading
SQLITE_SCHEMA...
I think that's an excellent idea, and I'd like
to help however possible if work starts on a
patch.
My wishlist
1. Finer grain locking ( Row/table )
2. Memory resident resultsets
3. Reduction or elimination SQLITE_SCHEMA
I think memory resident resultsets would be an
excellent feature to start
That's part of the problem I had been having...
1) You have to loop through the resultset twice,
once to put it in memory, the other to process
it in your application.
2) The sqlite3_prepare() and sqlite3_finalize()
both should be in a loop as well right? Since
they can throw SQLITE_BUSY and
Ben Clewett wrote:
I do not unfortunately have any place to host this work. There may be
somebody on this list who knows of a place where this can be published
for any members who may with make use of it.
http://sourceforge.net/ ?
60 matches
Mail list logo