Re: [sqlite] Will a read-only transaction cause writes to the WAL?

2010-09-16 Thread Virgilio Alexandre Fornazin
Just curious why you wrap your SELECT statement into a 'TRANSACTION' ... -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Martin C. Sent: quinta-feira, 16 de setembro de 2010 14:16 To: sqlite-users@sqlite.org Subject: [sqlite]

Re: [sqlite] Query critique

2010-07-10 Thread Virgilio Alexandre Fornazin
Calling UPPER() for each field/value while querying is a pain, if you can assume the names are all in uppercase (forcing this in your program before passing them to SQlite), you could speed up things a lot. But you need to analyze what´s happening inside SQlite to check if indices are used, etc.

Re: [sqlite] Null character problem

2010-07-09 Thread Virgilio Alexandre Fornazin
>> My question came purely from a mild curiosity. I was wondering about >> the behavior of sqlite call sqlite3_bind_text when it is passed a range >> of BYTES that includes nulls. See this snipper for documentation: "The third argument is the value to bind to the parameter. In those routines

Re: [sqlite] is this a bug?

2009-12-18 Thread Virgilio Alexandre Fornazin
It´s good to try to reproduce all conditions that this problem happens, to help with creating test-cases and with bug fix. []'s -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of P Kishor Sent: sábado, 19 de dezembro de 2009

Re: [sqlite] is this a bug?

2009-12-18 Thread Virgilio Alexandre Fornazin
This is probably a bug in SQL parser, that doesn't reduced to one parenthesis, causing the side effect in VDBE engine, that doesn't returned all ID´s to IN evaluator in first select. This should be easily reproduced, but the fix you must wait for Richard or other that have knowledge on VDBE

Re: [sqlite] [ANN] SQLJet 1.0.0 released

2009-09-17 Thread Virgilio Alexandre Fornazin
Question 1 is a very good question, why pay for a partial copy if you can use the full version for free? Also, what is the sense of using SQLite database without SQL support? (this remember Clipper/dBase GOTO LOCATE APPEND...) I can't get the point... if you can't use a native SQLite in your

Re: [sqlite] Is it Possible in SQL...

2009-07-10 Thread Virgilio Alexandre Fornazin
'Not using SQL directly' means you create a series data access interface like an ISeries interface that browse in a cursor-style through your series data, then implement it as a concrete class like DatabaseSeries that does the SQL job for you. Talking about scaling issues means that you could do

Re: [sqlite] Is it Possible in SQL...

2009-07-10 Thread Virgilio Alexandre Fornazin
I was trying to figuring out if you are doing something of graph data analysis, I do it almost everyday in our Stock Trader applications... I never did this way (direct SQL), cause our graph series data sources are implement throught a common interface, that could be a SQL query, a stream, a XML,

Re: [sqlite] GROUPY BY alias backward incompatibility

2009-05-28 Thread Virgilio Alexandre Fornazin
Curious... even it does not make sense, it pass also on oracle 11g (sql server actively refused to run) SQL Server 2008: SELECT (SELECT COUNT(*) FROM T t_inner GROUP BY t_outer.c) FROM T t_outer -- Msg 164, Level 15, State 1, Line 1 -- Each GROUP BY expression must contain at least one column

Re: [sqlite] SQLite version 3.6.14 and async vfs

2009-05-07 Thread Virgilio Alexandre Fornazin
0 PM, Ken <kennethinbox-sql...@yahoo.com> > wrote: > > > > --- On Thu, 5/7/09, Virgilio Alexandre Fornazin <virgilioforna...@gmail.com> > wrote: > > > >> From: Virgilio Alexandre Fornazin <virgilioforna...@gmail.com> > >> Subject: Re: [sqlite] SQLi

Re: [sqlite] SQLite version 3.6.14 and async vfs

2009-05-07 Thread Virgilio Alexandre Fornazin
Close should wait for all file operations complete to meet that needs. I think asynchronous VFS should take care of waiting in sqlite3_close() call. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Pavel Ivanov Sent:

Re: [sqlite] Large SQLite3 Database Memory Usage

2009-05-05 Thread Virgilio Alexandre Fornazin
Of Virgilio Alexandre Fornazin Sent: Tuesday, May 05, 2009 12:23 PM To: 'General Discussion of SQLite Database' Subject: Re: [sqlite] Large SQLite3 Database Memory Usage Are you using ADO or plain sqlite dll ? May this be a leak in your provider ? -Original Message- From: sqlite-users-boun

Re: [sqlite] Large SQLite3 Database Memory Usage

2009-05-05 Thread Virgilio Alexandre Fornazin
Are you using ADO or plain sqlite dll ? May this be a leak in your provider ? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Kalyani Phadke Sent: terça-feira, 5 de maio de 2009 16:13 To: General Discussion of SQLite Database

Re: [sqlite] A memvfs for loading/saving database from buffer

2009-04-28 Thread Virgilio Alexandre Fornazin
Where we can get the code ? -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of stephen liu Sent: terça-feira, 28 de abril de 2009 22:24 To: sqlite-users@sqlite.org Subject: [sqlite] A memvfs for loading/saving database from

Re: [sqlite] Using SQLite3 on On-Time RTOS ...

2009-04-27 Thread Virgilio Alexandre Fornazin
Maybe RTOS kernel does not implement Wide-Char functions... Windows VFS must guard them with a SQLITE_WINDOWS_NO_UNICODE macro or something like that at compile time, but you should do it yourself... then you can contribute it back to SQLite. -Original Message- From:

Re: [sqlite] Sqlite replication

2008-12-11 Thread Virgilio Alexandre Fornazin
SQLite is file-based (no server behind DB), you must provide your own synchronization (copying file, executing SQL on both databases, etc). I don't know if there´s an application/library that does it for you automatically. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: [sqlite] Vista frustrations

2008-09-17 Thread Virgilio Alexandre Fornazin
Sure. I just tell to do this test to check if the bug is related to this component, since it debuted on Vista. Virgilio Alexandre Fornazin High performance and realtime systems development Rua Brigadeiro Vicente Faria Lima, 268 Bela VistaLeme-SPCEP 13611-485 Phone: +55 19 3571-5573

Re: [sqlite] Vista frustrations

2008-09-17 Thread Virgilio Alexandre Fornazin
Note that Windows Server 2008 use the same 'core' as Windows Vista. If you´re detecting and redirecting by using GetVersion() or other approach you might test for Server 2008 too. Virgilio Alexandre Fornazin High performance and realtime systems development Rua Brigadeiro Vicente Faria Lima

Re: [sqlite] Vista frustrations

2008-09-17 Thread Virgilio Alexandre Fornazin
Could not this bug be related with Vista feature called 'Superfetch' ? It tries to keep in memory the most accessed files for user, avoiding disk for read access. If you disable (or stop) this service, the problem remains or not ? Virgilio Alexandre Fornazin High performance and realtime

Re: [sqlite] SQLite and Threadsafety (again)

2008-05-21 Thread Virgilio Alexandre Fornazin
to do multiple reads at the same time, however. I'm open to suggestions on a better way to fix this problem. Cheers, Shawn On Wed, May 21, 2008 at 1:05 PM, Virgilio Alexandre Fornazin <[EMAIL PROTECTED]> wrote: > Not to putting flame in question, but why not use any connection p

Re: [sqlite] SQLite and Threadsafety (again)

2008-05-21 Thread Virgilio Alexandre Fornazin
Not to putting flame in question, but why not use any connection per thread ? At this way you can guarantee: - Correct transaction processing; - Avoid waiting on R/W locks, allowing more than one read to run concurrently; We also use this model with ODBC / ADO database layers. You don't need

Re: [sqlite] Proposed SQLite C/C++ interface behavior change.

2008-05-13 Thread Virgilio Alexandre Fornazin
A good and new safe could be a sqlite3_close_v2() call prototyped like int sqlite3_close_v2(sqlite3 * db, int closePendingStatements); and current sqlite3_close() call could become int sqlite3_close(sqlite3 * db) { return sqlite3_close_v2(db, 0); } In this way, current running code

Re: [sqlite] property/config file for SQLite

2008-05-03 Thread Virgilio Alexandre Fornazin
The database contains all pragmas commands you had executed. Why keep storing in a configuration file, since it´s not a database server? Please keep in mind that SQlite is a general purpose 'embedded' database engine, not a DBA-managed database server. Also WHY SQlite should have a configuration

Re: [sqlite] multiple writers for in-memory datastore

2008-04-19 Thread Virgilio Alexandre Fornazin
Imagine the following cenario (I assume you know c++ stdlib) A map of strings (filenames) to in-memory file handlers (the objects that will handle the shared memory or heap files). These files handlers will exists until the process exists and do not receive a delelefile() vfs call. File

Re: [sqlite] segmentation fault

2008-04-13 Thread Virgilio Alexandre Fornazin
You must have to do a run inside gdb to get sqlite shell working then you can get your segfault -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dark0s dark0s Sent: domingo, 13 de abril de 2008 11:00 To: sqlite-users@sqlite.org Subject: [sqlite]

Re: [sqlite] segmentation fault

2008-04-13 Thread Virgilio Alexandre Fornazin
gdb is your friend here. compile with: gcc -O0 -g -shared labsinf.c -o soundex.so then run sqlite with gdb gdb sqlite3 () gdb> run then you can get the backtrace of your exception -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dark0s dark0s

Re: [sqlite] algorithm for adding columns to a table

2008-03-18 Thread Virgilio Alexandre Fornazin
Yes. I did this in my custom version of SQLite. If statement is ALTER TABLE, and SQLite returns error, I check if it´s ALTER TABLE (t) MODIFY COLUMN ou DROP COLUMN, doing the exact flow you did. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Derrell

RE: [sqlite] Proposed sqlite3_initialize() interface

2007-10-30 Thread Virgilio Alexandre Fornazin
gcc support this, msvc++ and other compilers does not. -Original Message- From: Russell Leighton [mailto:[EMAIL PROTECTED] Sent: terça-feira, 30 de outubro de 2007 23:32 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Proposed sqlite3_initialize() interface On Oct 30, 2007, at 10:18

RE: [sqlite] how to get file handle from sqlite3 object?

2007-10-10 Thread Virgilio Alexandre Fornazin
There is a better workaround: get the code from the .dump command of sqlite3 utility and use it... it creates a fresh copy of your database like using sqlite3 dbold .dump | sqlite3 newdb (not sure about the syntax, there´s a example of this case on internet) -Original Message- From:

RE: [sqlite] how to iterate on SELECT query results

2007-09-04 Thread Virgilio Alexandre Fornazin
SQLite use the 'cursor' style like SQL Server / ORACLE in stored procedures: you fetch in a unidirectional (forward only) way. To achieve bi-directional support you must have to store the results in memory as you fetch them (not so difficult to accomplish if you have enough memory to do it, a

RE: [sqlite] VFS in upcoming 3.5.0

2007-09-01 Thread Virgilio Alexandre Fornazin
You can create a 'shared memory VFS' to share a memory database against other thread / processes, and you can also 'copy' the RAW bytes of your memory with memcpy from/to another storage to accomplish the serialize / load you want to wire transfer SQLite memory databases. But this is not a simple

RE: [sqlite] Table locked - why?

2007-08-30 Thread Virgilio Alexandre Fornazin
Did you closed the cursor opened at 'select *...' ? Thats probably the reason you have getting a 'table is locked' error. -Original Message- From: RaghavendraK 70574 [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 30 de agosto de 2007 19:24 To: sqlite-users@sqlite.org Subject: Re: [sqlite]

RE: [sqlite] In memory database question

2007-08-28 Thread Virgilio Alexandre Fornazin
the sender by phone or email immediately and delete it! * - Original Message - From: Virgilio Alexandre Fornazin <[EMAIL PROTECTED]> Date: Tuesday, August 28, 2007 8:42 pm Subject: [sqlite] In

[sqlite] In memory database question

2007-08-28 Thread Virgilio Alexandre Fornazin
Hi There´s possible to share a sqlite3 handle to a memory database in all threads of application? Or there´s a way to ‘duplicate’ the handle (sqlite_open() or something like that)?