RE: [sqlite] Problems with threadsafe opt correction #2623

2005-09-06 Thread Cariotoglou Mike
I hope that this restriction is not enforced on windows, ever! I have an application that will be completely broken by this: it is an application server, that serves multiple clients, pools db connections, and hands them out on demand, protecting the pool with a number of mechanisms that have

RE: [sqlite] bug in sqlite 3.2.5 compilation and ANALYZE

2005-09-06 Thread Cariotoglou Mike
ok, I pinned it down. it is a genuine bug, and has nothing to do with dlls and wrappers. to reproduce, do this: 1. open the command-line utility on a database (or even with no database, it does not matter) 2. type this: SQLite version 3.2.5 Enter ".help" for instructions sqlite> pragma

[sqlite] ANN: Sqlite3Explorer 1.8 released

2005-09-06 Thread Cariotoglou Mike
Minor fix to work around a bug in pragma empty_result_callbacks, which makes Explorer incompatible with the ANALYZE command

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread Ralf Junker
1. You are still passing UTF-8 strings to Win95/98/ME file. No Windows version (not Win95 nor NT) accepts UTF-8 strings, especially not those ending with ...A and ...W. The only functions taking any other codepages are a few functions which especially deal with strings and codepage

[sqlite] What's the safest, most elegant way to copy a live db.

2005-09-06 Thread John Duprey
I'd like to copy a database that may or may not be in use. Doing a filesystem copy will not ensure a stable copy. Can I use the sqlite3 CLI and some SQL to do this such that I can wrap it up into a script or do I need to write my own program, that gets a lock and re-creates the DB in a new

Re: [sqlite] What's the safest, most elegant way to copy a live db.

2005-09-06 Thread Jay Sprenkle
On 9/6/05, John Duprey <[EMAIL PROTECTED]> wrote: > > What I'd like is a safe binary copy. > > From a previous post, I have seen someone suggest this: > attach 'foo.db' as bar; > create table baz as select * from bar.baz; > detach bar; > If I wrapped this in a loop for all tables it would

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread Roger Binns
To sum up: You need to convert UTF-8 to UTF-16-LE first. Then, if the OS is NT, you can pass these to the ...W functions. Otherwise, you need to further convert to ANSI user codepage and pass it to the ...A functions. Alternatively tell people to link against unicows if they need win9x

Re: [sqlite] What's the safest, most elegant way to copy a live db.

2005-09-06 Thread Kervin L. Pierre
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

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread D. Richard Hipp
On Tue, 2005-09-06 at 08:35 -0700, Roger Binns wrote: > > To sum up: You need to convert UTF-8 to UTF-16-LE first. Then, > > if the OS is NT, you can pass these to the ...W functions. > > Otherwise, you need to further convert to ANSI user codepage > > and pass it to the ...A functions. > >

Re: [sqlite] What's the safest, most elegant way to copy a live db.

2005-09-06 Thread D. Richard Hipp
On Tue, 2005-09-06 at 11:09 -0400, John Duprey wrote: > I'd like to copy a database that may or may not be in use. Doing a > filesystem copy will not ensure a stable copy. Can I use the sqlite3 CLI and > some SQL to do this such that I can wrap it up into a script or do I need to > write my own

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread Robert Simpson
I'm back in the office today -- let me have a quick crack at the issue before you settle on something. I've got a pretty good idea how to clean it up. I don't like using the MSLU because its a dependency that up until now SQLite has not had. Since the unicows.dll is not part of a standard

Re: [sqlite] What's the safest, most elegant way to copy a live db.

2005-09-06 Thread Jay Sprenkle
> I suggest this approach: > > 1. Open the database file using sqlite3_open() > 2. Run sqlite3_exec("BEGIN IMMEDIATE"); > 3. Make a copy of the raw database file using whatever > high-speed file copy mechanism is at hand. > 4. sqlite3_close(); > > The BEGIN IMMEDIATE operation in step 2 will

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread Ulrik Petersen
Robert Simpson wrote: I'm back in the office today -- let me have a quick crack at the issue before you settle on something. I've got a pretty good idea how to clean it up. I don't like using the MSLU because its a dependency that up until now SQLite has not had. Since the unicows.dll is

Re: [sqlite] Problems with threadsafe opt correction #2623

2005-09-06 Thread Kiel W.
Ian Monroe wrote: I see your just ignorant of how open source software gets released. Ian, You are right, I hope you will forgive my ignorance. Beyond that, it wasn't my place to criticize those projects even if I had fully understood the situation. --kiel

Re: [sqlite] Problems with threadsafe opt correction #2623

2005-09-06 Thread Jay Sprenkle
On 9/5/05, Ian Monroe <[EMAIL PROTECTED]> wrote: > > > > > SQLite has *never* supported the ability of a handle to be used > > by more than one thread. By luck, such use would sometimes work on > > some operating systems. But it would fail on others. Such a > > situation is very dangerous since

[sqlite] need to write during a long read

2005-09-06 Thread Mark Drago
Hey Guys, I'm writing a web proxy in C for Linux that logs all of the connections that go through it to a sqlite database. There is then a PHP web GUI that allows the user to perform queries against all of the data in the log. Needless to say, this database can get fairly large. I use a 5

Re: [sqlite] Please test on Win95/98/ME

2005-09-06 Thread Robert Simpson
- Original Message - From: "D. Richard Hipp" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 06, 2005 8:53 AM Subject: Re: [sqlite] Please test on Win95/98/ME On Tue, 2005-09-06 at 08:35 -0700, Roger Binns wrote: > To sum up: You need to convert UTF-8 to

[sqlite] SQLite where clause parsing?

2005-09-06 Thread R S
Hi, I have a million records in my DB. I tried using .explain on and ran the query below which took a long time although I just want the last 100,000 records...(It ran much faster when my table had a 100,000 records) so I assume it is related to how I constructed the statement. select columns

Re: [sqlite] SQLite where clause parsing?

2005-09-06 Thread D. Richard Hipp
On Tue, 2005-09-06 at 13:07 -0700, R S wrote: > Hi, > I have a million records in my DB. I tried using .explain on and ran the > query below which took a long time although I just want the last 100,000 > records...(It ran much faster when my table had a 100,000 records) so I > assume it is