ng if it's encrypted might have it use as well)
>
An encrypted SQLite database appears to be white noise
from beginning to end. There is no header. Many users
prefer it that way.
--
D. Richard Hipp <[EMAIL PROTECTED]>
data) but
it also make known or chosen plaintext attacks considerably more
difficult.
--
D. Richard Hipp <[EMAIL PROTECTED]>
s a valid database.
It might *look* like a text file, but that just might
be because the database is encrypted in a way that makes
it appear so. Hence, SQLite cannot pass judgement on
a file until you actually try to do something with it.
--
D. Richard Hipp <[EMAIL PROTECTED]>
the problem?
Actually, that looks like it might work. Have you tried it?
You might also need to comment out some code further down in the
file that attempts to create new WideInt objects in Tcl.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Mon, 2005-08-22 at 08:42 -0700, Clark Christensen wrote:
>
> --- "D. Richard Hipp" <[EMAIL PROTECTED]> wrote:
> > ...
> > SQLite never "blows away" a file that is not a database.
> >
> > --
> > D. Richard Hipp <[EMAIL PROTE
sing Tcl 8.4 and it worked fine.
I would recommend that you upgrade. Going to Tcl 8.4
(or 8.5) will cost you perhaps 1 day of work, but will
easily pay back that much and more as you continue to
work with the code.
--
D. Richard Hipp <[EMAIL PROTECTED]>
rst, it will have to read
all of the data in order to determine the size, which
defeats the purpose of putting the size column in the
table in the first place.
--
D. Richard Hipp <[EMAIL PROTECTED]>
Version 3.2.3 of SQLite is now available on the website
http://www.sqlite.org/
In addition to fixing a lot of minor bugs, this release
adds a number of important new enhancements. Most of
the enhancements are centered around the much-improved
query optimizer, but there are some unrelated addition
u can store
that value in a separate column in the table.
CREATE TABLE object(
size INT,
data BLOB
);
Then when you need to know the size, just do
a query for the size.
Note: This will only work if the "size" column
comes before the "data" column in the table
definition.
--
D. Richard Hipp <[EMAIL PROTECTED]>
dated when I try this.
What version of SQLite are you using? What platform? What
language binding?
--
D. Richard Hipp <[EMAIL PROTECTED]>
er. When the index above is
used, things will come out sorted or by name just because of
the way they work in SQLite. SQL does not guarantee that behavior
so it probably will not work that way on other database engines,
but it should work fine in SQLite.
--
D. Richard Hipp <[EMAIL PROTECTED]>
large (13000 rows) and each row uses in
excess of 1KB or memory, this is apparently causing your
machine to thrash.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Sat, 2005-08-20 at 13:36 -0700, Will Leshner wrote:
> On Aug 20, 2005, at 9:21 AM, D. Richard Hipp wrote:
>
> > SQLite never "blows away" a file that is not a database.
>
> Sorry to use such crude language :) But I believe I have run into an
> issue with S
eally contains a database. The file is not actually opened
until you try to do something with it.
SQLite never "blows away" a file that is not a database.
--
D. Richard Hipp <[EMAIL PROTECTED]>
; well.
The code shown was for reading the database. You'll also need
to find and fix the spot where the database is written, of course.
--
D. Richard Hipp <[EMAIL PROTECTED]>
ter update on foo begin
update foo set date_lch=current_timestamp where rowid=new.rowid;
end;
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Thu, 2005-08-18 at 14:10 -0400, D. Richard Hipp wrote:
> On Thu, 2005-08-18 at 09:40 -0700, Robert Simpson wrote:
> > http://www.psc.edu/general/software/packages/ieee/ieee.html
> >
> > The way I interpreted this site, is that the IEEE standard for floating
> >
x%02x%02x%02x%02x%02x\n",
x.z[0], x.z[1], x.z[2], x.z[3], x.z[4], x.z[5], x.z[6], x.z[7]);
x.i = 1;
printf("%02x%02x%02x%02x%02x%02x%02x%02x\n",
x.z[0], x.z[1], x.z[2], x.z[3], x.z[4], x.z[5], x.z[6], x.z[7]);
return 0;
}
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Thu, 2005-08-18 at 12:24 -0400, D. Richard Hipp wrote:
> On Thu, 2005-08-18 at 18:04 +0200, Frank van Vugt wrote:
> > L.S.
> >
> > It looks like there's something wrong with the endiannes when using sqlite3
> > (v3.2.2) on an ARM architecture (SA1100 n
are stored in the IEEE 64-bit
format with the same byte order as the machine integer.
--
D. Richard Hipp <[EMAIL PROTECTED]>
c/chngview?cn=2596.
Do "cvs update" and try again.
--
D. Richard Hipp <[EMAIL PROTECTED]>
y work around the problem
by defeating the optimizer:
ORDER BY +eidh.ekey, kinapo.polhths
^-- unary "+" here
--
D. Richard Hipp <[EMAIL PROTECTED]>
3.2.2 will not optimize the above. But the latest code
in CVS will. 3.2.3 will probably be released relatively soon.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Thu, 2005-08-04 at 12:59 -0700, L. S. wrote:
> What is the prescribed way to create the complete documentation (without
> having to learn yet another scripting language--or whatever it is)?
>
make doc
--
D. Richard Hipp <[EMAIL PROTECTED]>
CVS which will appear in the next release.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Tue, 2005-08-02 at 09:30 -0400, D. Richard Hipp wrote:
> On Mon, 2005-08-01 at 22:04 +0200, Jens Miltner wrote:
> > we get an assertion (no crash here, though) in btree.c
> > and the backtrace looks similar to the one scunacc provided, which
> > made me think the
It looks like this may be the same problem. I will let
everybody know as soon as I have a fix.
--
D. Richard Hipp <[EMAIL PROTECTED]>
See my comments below.
On Mon, 2005-08-01 at 21:06 +0200, Peter Berkel wrote:
> Hallo,
>
> I am not an expert in programming and I try make a frontend
> for sqlite using tcl/tk. See example code below.
>
> I have the following problem. I try to entry data which I want to insert in a
> sqlite
havior be changed?
> Thanks.
>
SQLite never blocks for any reason. If it cannot get a
lock, it returns SQLITE_BUSY. Even if you call
sqlite3_busy_timeout() it doesn't block - it polls.
What OS are you using? What wrappers around SQLite are
you using? What version of SQLite?
--
D. Richard Hipp <[EMAIL PROTECTED]>
ng like that.
--
D. Richard Hipp <[EMAIL PROTECTED]>
avior in platform
printf() functions. The fix was for SQLite to always use
it's own internal printf() function.
--
D. Richard Hipp <[EMAIL PROTECTED]>
lename in the database.
--
D. Richard Hipp <[EMAIL PROTECTED]>
t;
The text is wrong and has now been corrected.
See http://www.sqlite.org/cvstrac/chngview?cn=2559
TEMP tables in SQLite work like they do in every other
SQL database engine.
--
D. Richard Hipp <[EMAIL PROTECTED]>
ingle thread.
--
D. Richard Hipp <[EMAIL PROTECTED]>
/test.db "select CURRENT_TIME"
> 20:37:26
>
CURRENT_TIME returns the time in UTC which is 2 hours to
the west of CEST, apparently.
--
D. Richard Hipp <[EMAIL PROTECTED]>
e
> records* to return me the last 50 and while doing that it locked the
> DB! Maybe I constructed my query wrong
> It looks something like this:
>
> select fields from table order by id desc limit 50;
>
Try putting and index on table.id.
--
D. Richard Hipp <[EMAIL PROTECTED]>
The Philips MP3 players use SQLite version 2.x. You probably
downloaded version 3.x. Version 3.x will not read or write
version 2.x database files. Try using version 2.8.16 instead
of whatever version it is you downloaded.
On Sun, 2005-07-17 at 12:08 +0200, Karl Sinn wrote:
> Hi,
>
> I am comp
rect. But threading
bugs tend to manifest themselves as timing-dependent
glitches and lock-ups that are hardware and platform
dependent, that never happen the same way twice, and that
only appear for customers after deployment and never in a
testing environment.
--
D. Richard Hipp <[EMAIL PROTECTED]>
one table in a
separate database and ATTACH it. Then when you want
to erase it all, DETACH the separate database, delete
the file, then reinitialize the database and re-ATTACH
it.
--
D. Richard Hipp <[EMAIL PROTECTED]>
ur program crashes for any reason,
the *entire* database file will be irrecoverably
corrupted if you do not have a journal?
--
D. Richard Hipp <[EMAIL PROTECTED]>
ood to me. What about the memory cost of prepared
> statements? I know with some database drivers that I've used, having
> a large number of prepared statements caused the memory usage of the
> connections to grow significantly.
>
Prepared statements use a few KiB each.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Tue, 2005-07-12 at 11:01 -0700, Derek Shaw wrote:
> SQLite 3 relocates 2 addresses out of its memory bounds when it
> loads.
Can you explan in more detail what this means?
--
D. Richard Hipp <[EMAIL PROTECTED]>
as written a completely different program by the same name.
You want the "sqlite3_analyzer" that appears on on
http://www.sqlite.org/download.html
--
D. Richard Hipp <[EMAIL PROTECTED]>
statements - ever.
--
D. Richard Hipp <[EMAIL PROTECTED]>
(SELECT rowid FROM a WHERE f1=5 UNION
SELECT rowid FROM a WHERE f2=11);
Perhaps SQLite will do such rewriting automatically someday,
but probably not in the near term.
--
D. Richard Hipp <[EMAIL PROTECTED]>
ow execute a query using both the indexes:
>
> SELECT * FROM a WHERE f1 = 1 OR f2 = 1;
> MySQL and PostgreSQL will use the indexes here, and
> therefore return the result considerably faster.
>
Really? I would be very interested to know what
query plan MySQL and PostgreSQL u
t
around until after the new one is ready, then use the
sqlite3_transfer_bindings() API to transfer all your bindings
from the old to the new, then finalize the old.
>
> Is it possible to get the SQLITE_SCHEMA error after the first
> sqlite3_step call, while iterating throw the rows?
>
No. SQLITE_SCHEMA will always appear immediately or not
at all.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Sun, 2005-07-10 at 12:21 -0400, [EMAIL PROTECTED]
wrote:
> IIRC, you can't create a table in an attached DB.
That's true for SQLite 2.8. But beginning with SQLite 3.0
the restriction is removed and you can create new tables in
an attached database.
--
D. Richard Hipp <[EMAIL PROTECTED]>
it to use a wrapper class of some sort that
automates the task of rerunning sqlite3_prepare() when necessary.
--
D. Richard Hipp <[EMAIL PROTECTED]>
QLITE_BUSY
if it cannot. That way, you can never get two threads holding
a shared lock and both trying to promote to an exclusive lock.
This avoids the deadlock scenario described above, but it also
reduces the amount of concurrency. So it is a tradeoff.
--
D. Richard Hipp <[EMAIL PROTECTED]>
nd from: http://www.piclist.com/techref/microchip/math/32bmath-ph.htm
>
> "signed 32-bit numbers have a range of -2147483648 to +2147483647
>
That's correct for version 2.8. Version 3.0 expands the INTEGER PRIMARY
KEY out to 64 bits so you have a range of -18446744073709551616 to
+18446744073709551615. Seems unlikely to overflow...
--
D. Richard Hipp <[EMAIL PROTECTED]>
fecient to put $var inside
your SQL statement and let SQLite worry about escapes rather than
doing so yourself. Like this:
DB eval BEGIN
DB eval {INSERT INTO table1 VALUES($a,$b,$c,$d)}
DB eval COMMIT
--
D. Richard Hipp <[EMAIL PROTECTED]>
ction will
cause the transaction to roll back automatically.
I *hope* that is what the SQLite integration with firefox
will accomplish. But again, I don't really know.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Wed, 2005-07-06 at 09:32 -0400, [EMAIL PROTECTED]
wrote:
> "D. Richard Hipp" <[EMAIL PROTECTED]> writes:
>
> > On Wed, 2005-07-06 at 09:38 -0300, Gerson LuÃs Fontoura Vaz wrote:
> >> I'm using SQLite for the first time...
> >>
> >&g
k or to unbounded growth
in memory requirements.
--
D. Richard Hipp <[EMAIL PROTECTED]>
le memory leak in version 3.2.2, we
would look into the matter right away. For 2.8.15, you can
file a bug report if you like. Somebody might investigate the
problem in a month or two.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Fri, 2005-07-01 at 20:22 -0500, Dan Wellisch wrote:
> Richard:
>
> Are you saying that the statement should be.:
>
> wxString::Format(wxT("%s%s"),zipCodeValue.c_str(), "%");
>
Yes. Or perhaps this:
wxString::Format(wxT("%s%%"), zip
(), SQLITE_STATIC);
>
Do not put quotes around strings that are bound. Just insert
them directly. You are trying to LIKE against '''6008%''', not
'6008%' as you intend.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Thu, 2005-06-30 at 16:35 +0530, Ajay wrote:
> So I used query
> Insert into NEWTABLE select * from OLDTABLE order by no desc
> But it is not giving me sorted output as new table?
>
> Can you tell me where I am wrong ???
>
The ORDER BY clause on a SELECT used to insert into a table
has been
it appears to be have been addressed
> post-v3.2.1.
>
http://www.sqlite.org/cvstrac/tktview?tn=1188
I had forgotten about that one. Sorry.
--
D. Richard Hipp <[EMAIL PROTECTED]>
ou are are getting the results that
you report. I am unable to reproduce them.
--
D. Richard Hipp <[EMAIL PROTECTED]>
e code, I get only a single
line of output (3) as you would expect.
--
D. Richard Hipp <[EMAIL PROTECTED]>
-length allocation is
roughly the same thing.
--
D. Richard Hipp <[EMAIL PROTECTED]>
e taken on unused databases.
--
D. Richard Hipp <[EMAIL PROTECTED]>
new features go into version 3.
--
D. Richard Hipp <[EMAIL PROTECTED]>
r later.
--
D. Richard Hipp <[EMAIL PROTECTED]>
) then do
crosscompiler -o libsqlite.a *.c
--
D. Richard Hipp <[EMAIL PROTECTED]>
t; potential bug?
>
We do coverage testing from time to time using
gcov. And things like this would really stand out.
I'll rerun the coverage tests in a few days and see
what pops up.
--
D. Richard Hipp <[EMAIL PROTECTED]>
king through the code and trying
things and I cannot reproduce the problem. Please
let me know if you get any more clues...
--
D. Richard Hipp <[EMAIL PROTECTED]>
f the isNT() function?
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Sun, 2005-06-19 at 22:29 -0400, D. Richard Hipp wrote:
> Essentially the same talk will likely be repeated
> at other venues. I will keep you posted.
If you cannot make it to OSCON or AUUG, the next
opportunity to hear the SQLite Internals tutorial
will be at the 12th Annual Tcl/Tk Conf
l section 2.1
for details.
--
D. Richard Hipp <[EMAIL PROTECTED]>
ay to force the value to be inserted as string?
>
Make the declared datatype of the column TEXT.
Example:
CREATE TABLE t1(a, b INTEGER, c REAL, d TEXT);
INSERT INTO t1 VALUES(9.0,9.0,9.0,9.0);
SELECCT * FROM t1;
Results in:
9|9|9|9.0
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Mon, 2005-06-20 at 15:03 +0300, Amir Hadar wrote:
> Hi
>
> I encountered an assert in function moveToRoot in file btree.c.
>
Not much to go on. Can you tell me what you were doing
or how to reproduce the problem?
--
D. Richard Hipp <[EMAIL PROTECTED]>
bt
that is what you are running into. Unless you are
using AUTOINCREMENT and manually inserting a row
with a huge rowid - that can cause a FULL error.
--
D. Richard Hipp <[EMAIL PROTECTED]>
ke
a case that there is sufficient interest, I'm sure
something could be worked out.
--
D. Richard Hipp <[EMAIL PROTECTED]>
yet been accepted, though.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Sun, 2005-06-19 at 20:15 -0400, Paul G wrote:
> i have other obligations which will prevent me from being able to travel to
> oregon at that time.
>
Essentially the same talk will likely be repeated
at other venues. I will keep you posted.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Sun, 2005-06-19 at 21:29 +0200, Marcel Strittmatter wrote:
> > http://conferences.oreillynet.com/oscon2005/
> >
>
> http://conferences.oreillynet.com/os2005/ is the correct url, isn't it?
>
Yes it is. Sorry for the typo.
--
D. Richard Hipp <[EMAIL PROTECTED]>
r own products
* Anyone who is just curious about how SQL database engines
work.
For additional information visit
http://conferences.oreillynet.com/oscon2005/
I hope to see many of you there.
--
D. Richard Hipp <[EMAIL PROTECTED]>
d map more in than needed, or something
> else?
>
Why not use a smaller page size but map multiple pages at a time?
--
D. Richard Hipp <[EMAIL PROTECTED]>
great deal about footprint.
See also http://www.sqlite.org/copyright.html
--
D. Richard Hipp <[EMAIL PROTECTED]>
A new pager API that works for memmap() would also continue to work
for the old read()/write() method. So presumably you could create
a new pragma that lets the programmer decide at run-time which method
to use. Use memmap() for faster reads and less memory usage or
use read/write for better co
ors" on the
compiler
I do use (GCC) over the years. In every case, the cause has turned out
to
be a defective memory SIMM.
Memtest86 is your friend. http://www.memtest86.com/
--
D. Richard Hipp <[EMAIL PROTECTED]>
to rewrite just the one page where the value
is being inserted.
--
D. Richard Hipp <[EMAIL PROTECTED]>
posix locks and the very specific brokenness of posix locks on RH9.
There aren't really any other options here.
> That
> is, should the FAQ be updated to indicate that only the thread that calls
> sqlite3_open is allowed to use the structure?
>
The documentation needs to be
(which I do not use so am
unlikely to ever notice.) Fixed now.
--
D. Richard Hipp <[EMAIL PROTECTED]>
etrying the failed query. Seems to work...
>
There should never be such a thing as a transient
SQLITE_CORRUPT error. You should only get an SQLITE_CORRUPT
error if the database file is truly and permanently
corrupted.
--
D. Richard Hipp <[EMAIL PROTECTED]>
fined, it is assumed to be zero. No changes
are needed to make this work.
--
D. Richard Hipp <[EMAIL PROTECTED]>
On Wed, 2005-06-15 at 10:05 -0400, D. Richard Hipp wrote:
> There are currently two outstanding tickets against SQLite
> for deadlocks while running multiple threads on RedHat 9.
> See
>
> http://www.sqlite.org/cvstrac/tktview?tn=1285
> http://www.sqlite.org/cvstrac/tktvi
On Wed, 2005-06-15 at 12:43 -0400, Christopher R. Palmer wrote:
> I've temporarily placed the trace file at
>
> http://67.19.10.2/~crpalmer/sqlite-traking.gz
>
The file is named sqlite-trace-locking.gz. And it
did not containing the debugging information I need.
Perhaps you didn't compile with
ase prove me wrong...
--
D. Richard Hipp <[EMAIL PROTECTED]>
. Richard Hipp <[EMAIL PROTECTED]>
gt; sqlite3 test 'select * from t;'
>
> returns:
>
> key|325763213
>
>
It looks like perl is making this conversion for you. SQLite does
not do this.
As a work-around, consider prepending a single 'x' character to every
"v" column entry then strip of the 'x' before you use it.
--
D. Richard Hipp <[EMAIL PROTECTED]>
is created on that column
automatically.)
It will be faster still if you use UNION ALL instead
of UNION.
--
D. Richard Hipp <[EMAIL PROTECTED]>
>
This might be a problem with SQLite. But a more likely
explanation is that something in your program is munging
the malloc memory pool. Perhaps your program is freeing
some memory twice, or continuing to use (and modify) memory
after it is freed, or overrunning a buffer obtained from
m
file, parse.y.
If your (broken) compiler insists on having parse.y present, then why
not just download it from the website.
http://www.sqlite.org/cvstrac/getfile/sqlite/src/parse.y
--
D. Richard Hipp <[EMAIL PROTECTED]>
n the normal "escape single-quotes within the string."
>
SQLite has no idiosyncrasies regarding string quoting. However, I
cannot speak for the Perl DBI interface to SQLite - I am unfamiliar
with that code.
--
D. Richard Hipp <[EMAIL PROTECTED]>
f
SQL statements. It then returns a pointer to the beginning of the
second statement so that you can process them all in a loop. But
your code appears to omit this loop and thus is processing only
the first one. It never reaches the SELECT.
--
D. Richard Hipp <[EMAIL PROTECTED]>
ng worked great.
--
D. Richard Hipp <[EMAIL PROTECTED]>
901 - 1000 of 1805 matches
Mail list logo