Re: [sqlite] Updated FTS3 compression patch

2010-03-24 Thread Alexandre Courbot
> Patch is here > http://sqlite.mobigroup.ru/src/vinfo/d3d9906674 Would love to try it - but for some reason I cannot find a way to get an actual "patch" on this page. Could you produce a diff that could be applied on top of 2.6.23's source, or even better amalgamation? Thanks, Alex.

Re: [sqlite] regression in FTS3 offsets function in 3.6.23

2010-03-24 Thread Dan Kennedy
On Mar 24, 2010, at 7:24 PM, Andrew Sutherland wrote: > > > As reported on https://bugzilla.mozilla.org/show_bug.cgi?id=551260#c17 > The binaries used below were all downloaded from sqlite.org. > > $ cat fts3-offsets-asplode.sql > CREATE VIRTUAL TABLE ft USING fts3(tokenize=porter, fulltextOne,

Re: [sqlite] Update problem in use C/C++ interface

2010-03-24 Thread 王志刚
??? wrote: > Hi, I meet a problem in use c/c++ API to update a row in table. > all return value means the operate is successful, But the row have no > change at all. How do you determine this? > the main code al follow: > >wstring sql = L"UPDATE Mail SET [Content] = ?1 [CurrentSize] = ?2 >

Re: [sqlite] corruption problem with attached macintosh database

2010-03-24 Thread Dave Dyer
> > >What journaling mode are you using? whatever is default. I compile mu own sqlite static libraries, but I don't customize the settings. ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] SIGSEGV on INSERT DEFAULT VALUES with triggers

2010-03-24 Thread Shane Harrelson
Can you provide more details? What options are you using? What version of the source? Amalgamation? Preprocessed? Complete package? I could not reproduce this on the current or 3.6.23 build: >./sqlite3 -version 3.6.23 >cat script.sql CREATE TABLE current(x,y,z); INSERT INTO current DEFAULT

[sqlite] Pagesize and performance

2010-03-24 Thread Tom Broadbent
mainly just want to summarize and get confirmation on a few points. 1. matching pagesize to file system record size is recommended for write performance improvements 2. default SQLite pagesize is 1k; max SQLite pagesize is 32k 3. docs seem to say that 32k max pagesize is no

Re: [sqlite] corruption problem with attached macintosh database

2010-03-24 Thread Shane Harrelson
On Wed, Mar 24, 2010 at 7:20 PM, Dave Dyer wrote: > > > > >Could you help us by adding any of the following details ? > > > >What OS is the Mac running ? > > OSX 10.4.11 for me, but also snow leopard. > > >What OS is the PC running ? > > Windows 2003 server for me, but

[sqlite] BUG: Sqlite 3.6.23. Optimizer does not use indexes when a table is joined with a fts3 table

2010-03-24 Thread Shopsland gmail
### BUG: Sqlite 3.6.23. Optimizer does not use indexes when a table is joined with a fts3 table Given those two tables: Table a . number: integer primary key . date: double (julian) . index: dateindx (index of column date) Total rows: 37866 Table fts (fts3 table) . title: string Total rows:

Re: [sqlite] hello.. I have some question for sqlite3..

2010-03-24 Thread D. Richard Hipp
On Mar 24, 2010, at 7:44 PM, 김민수 wrote: > hello.. > I'm a student in Korea who study Database systems. > I have some question for you. > It is important for me so eventhen you are busy plz teach me about > some question.. > > I would like to use sqlite3 with eclipse and mingw. > Actually I

[sqlite] SIGSEGV on INSERT DEFAULT VALUES with triggers

2010-03-24 Thread Tomasz Ł . Nowak
Hi! A bug resulting in a crash (segmentation fault) of sqlite3 has been detected. Please find attached the script causing problems and a debug session log. Tested to be vulnerable: linux 3.6.23 linux 3.6.22 linux 3.6.4 solaris 3.5.1 Tested to be invulnerable: linux 2.8.17 Best wishes Tomasz

Re: [sqlite] corruption problem with attached macintosh database

2010-03-24 Thread Dave Dyer
> >Could you help us by adding any of the following details ? > >What OS is the Mac running ? OSX 10.4.11 for me, but also snow leopard. >What OS is the PC running ? Windows 2003 server for me, but also XP (note the file systems are all mac file systems) >What protocol is being used to access

Re: [sqlite] corruption problem with attached macintosh database

2010-03-24 Thread Simon Slavin
On 24 Mar 2010, at 8:50pm, Dave Dyer wrote: > database resident on a mac file sustem > mounted as a drive letter on a pc > the "main" database is open and shared by sqlite running on both computers. > the "auxiliary" database is attached and updated simultaneously from both > computers> Could

[sqlite] more on mac database corruption

2010-03-24 Thread Dave Dyer
I was able to reproduce the problem using a trivial set of commands to the standard sqlite command tool: On the Mac: gorp:~/2010 yeartech/yearbook tools/resource davedyer$ /applications/utilities/sqlite3-shell actiontool2.sqlite SQLite version 3.6.10 with the Encryption Extension sqlite>

Re: [sqlite] Question about binding

2010-03-24 Thread Vance E. Neff
Thanks Pavel! Vance Pavel Ivanov wrote: >> Is there documentation that talks about about the various binding place >> holders or is this a standard SQL construct? > > Probably this will help you: http://www.sqlite.org/c3ref/bind_blob.html. > > > Pavel > > On Tue, Mar 23, 2010 at 3:48 PM,

Re: [sqlite] Question about binding

2010-03-24 Thread Adam DeVita
Good day, For the sake of fun, I have to share this - especially with tall this talk of binding all the parameters. void poem(CString pth) { sqlite3_stmt *ppStmt; //statement pointer sqlite3 *db; //database const char *pzTail; char *pzerr; if( sqlite3_open(pth, ) ){

Re: [sqlite] R*Tree and sqlite3_last_insert_rowid() API - possible bug?

2010-03-24 Thread Wanadoo Hartwig
Hi Dan, Am 22.03.2010 um 05:08 schrieb Dan Kennedy: > > On Mar 22, 2010, at 4:16 AM, Wanadoo Hartwig wrote: > >> Hi Minar, hi Dan, >> >> there is a similar bug in the FTS3 module. But here the >> sqlite_last_rowid may return a wrong value. > > How do we reproduce this bug? > > Dan. > >

[sqlite] corruption problem with attached macintosh database

2010-03-24 Thread Dave Dyer
I think there is a locking problem that leads to corrupt databases under quite reproducable conditions. The conditions are: database resident on a mac file sustem mounted as a drive letter on a pc the "main" database is open and shared by sqlite running on both computers. the "auxiliary"

Re: [sqlite] Question about binding

2010-03-24 Thread Pavel Ivanov
Yes, they are the same. Pavel On Wed, Mar 24, 2010 at 4:04 PM, a1rex wrote: >    * :VVV >    * @VVV >    * $VVV > Are above bindings the same? (Just different prefix to VVV)? > Thank you, > Samuel > > From: Pavel Ivanov

Re: [sqlite] Question about binding

2010-03-24 Thread a1rex
* :VVV * @VVV * $VVV Are above bindings the same? (Just different prefix to VVV)? Thank you, Samuel From: Pavel Ivanov To: General Discussion of SQLite Database Sent: Wed, March 24, 2010 2:16:34 PM

Re: [sqlite] Question about binding

2010-03-24 Thread Pavel Ivanov
> Is there documentation that talks about about the various binding place > holders or is this a standard SQL construct? Probably this will help you: http://www.sqlite.org/c3ref/bind_blob.html. Pavel On Tue, Mar 23, 2010 at 3:48 PM, Vance E. Neff wrote: > Thanks to all

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread Martin Sigwald
Will do. Thanks again to everyone. At least I learned how to use strace, which I didnt no. On Wed, Mar 24, 2010 at 2:25 PM, Pavel Ivanov wrote: > > When allocating memory for my ICMP packets I wasnt doind a bzero to fill > all > > fields with 0, so some "garbage" generated

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread David Baird
On Wed, Mar 24, 2010 at 11:19 AM, Martin Sigwald wrote: > Problem Solved: As some one point out, it was MY fault. > When allocating memory for my ICMP packets I wasnt doind a bzero to fill all > fields with 0, so some "garbage" generated by Sqlite use of memory was >

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread Pavel Ivanov
> When allocating memory for my ICMP packets I wasnt doind a bzero to fill all > fields with 0, so some "garbage" generated by Sqlite use of memory was > "corrupting" my packets. And still try please my very first suggestion - run you program with valgrind (just to get used to it and to use it

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread Martin Sigwald
Problem Solved: As some one point out, it was MY fault. When allocating memory for my ICMP packets I wasnt doind a bzero to fill all fields with 0, so some "garbage" generated by Sqlite use of memory was "corrupting" my packets. Thank you all for the help. One of the best user groups I ever met.

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread David Baird
On Wed, Mar 24, 2010 at 11:09 AM, Martin Sigwald wrote: > Doing N pings after a _close or a query has the same result as doind one: > not one of them works. Do 2 pings work ever? For example, how about each of these scenarios? open_db ping ping close_db or ping ping or

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread Martin Sigwald
Doing N pings after a _close or a query has the same result as doind one: not one of them works. On Wed, Mar 24, 2010 at 2:07 PM, David Baird wrote: > On Wed, Mar 24, 2010 at 9:42 AM, Martin Sigwald > wrote: > > I meant socket. I know sockets are FDs. My

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread David Baird
On Wed, Mar 24, 2010 at 9:42 AM, Martin Sigwald wrote: > I meant socket. I know sockets are FDs. My mistake, sorry. > Yes, I tried putting the call before Sqlite calls and it works perfectly. If > I put it between open and close it works, provided I dont do anything else. >

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread Martin Sigwald
I'm attaching the strace output for the following code you asked: int main(void){ sqlite3* db_handle=NULL; if(sqlite3_open("guido.db",_handle)) { //abro DB fprintf(stderr,"Error while open DB:%s\n",sqlite3_errmsg(db_handle)); printf("No pude abrir la

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread paivanof
> I don't notice any cases of where a stale file descriptor is being > accessed.  I'm stumped :-/ Can it be a problem with clone() calls? AFAIK, it's how SQLite checks if it can work safely from multiple threads. Martin, can you recompile SQLite with SQLITE_THREADSAFE set to 0 and look if your

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread David Baird
On Wed, Mar 24, 2010 at 9:24 AM, David Baird wrote: > On Wed, Mar 24, 2010 at 9:05 AM, Martin Sigwald wrote: >> While I could gather, both the open system called generated by the DB and >> the socket() syscall are returning a FD=3. >> That is, they are both

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread Martin Sigwald
I meant socket. I know sockets are FDs. My mistake, sorry. Yes, I tried putting the call before Sqlite calls and it works perfectly. If I put it between open and close it works, provided I dont do anything else. For example, if I open the DB, ping, then run a query then ping again, the second ping

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread David Baird
On Wed, Mar 24, 2010 at 9:05 AM, Martin Sigwald wrote: > While I could gather, both the open system called generated by the DB and > the socket() syscall are returning a FD=3. > That is, they are both trying to use the same filedescriptor. My guess is > packets get sent to

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread Jay A. Kreibich
On Wed, Mar 24, 2010 at 12:05:58PM -0300, Martin Sigwald scratched on the wall: > While I could gather, both the open system called generated by the DB and > the socket() syscall are returning a FD=3. > That is, they are both trying to use the same filedescriptor. My guess is > packets get sent to

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread Martin Sigwald
While I could gather, both the open system called generated by the DB and the socket() syscall are returning a FD=3. That is, they are both trying to use the same filedescriptor. My guess is packets get sent to that file descriptor, instead of the port. How can I changed this? I just followed

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread Martin Sigwald
I tried using STRACE, unfortunately, I am quite new to Linux programming, so I can't make much sense out of the output. I attached it to this email, in case some kind soul would like to take a look at it. The program ran is exactly this: #include #include #include #include "ping.h" int

[sqlite] regression in FTS3 offsets function in 3.6.23

2010-03-24 Thread Andrew Sutherland
As reported on https://bugzilla.mozilla.org/show_bug.cgi?id=551260#c17 The binaries used below were all downloaded from sqlite.org. $ cat fts3-offsets-asplode.sql CREATE VIRTUAL TABLE ft USING fts3(tokenize=porter, fulltextOne, fulltextTwo); INSERT INTO ft VALUES("", "foo"); INSERT INTO ft

Re: [sqlite] sqlite 3.6.23 may cause memory overrun problem

2010-03-24 Thread D. Richard Hipp
On Mar 24, 2010, at 7:11 AM, Daniel Lin wrote: > About this bug, I found change the code to following will let it > workable. > But, I require your confirm. > > memcpy(pKeyInfo, zP4, sizeof(*pKeyInfo)); The SQLite code is correct as written. Your change will cause SQLite to malfunction.

Re: [sqlite] Update problem in use C/C++ interface

2010-03-24 Thread Igor Tandetnik
王志刚 wrote: > Hi, I meet a problem in use c/c++ API to update a row in table. > all return value means the operate is successful, But the row have no > change at all. How do you determine this? > the main code al follow: > >wstring sql = L"UPDATE Mail SET [Content] = ?1 [CurrentSize] = ?2 >

[sqlite] Update problem in use C/C++ interface

2010-03-24 Thread 王志刚
Hi, I meet a problem in use c/c++ API to update a row in table. all return value means the operate is successful, But the row have no change at all. and the INSERT , SELECT operation is OK. I think maybe I'm not first one meet this problem.But I can't visit the archive. So if anyone here know

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-24 Thread Max Vlasov
One process, two threads. > I have found in documentation, that is not recommended to pass one > connection > from one thread to second one. > Yes, you're right, forgot about this, only exception is sqlite3_interrupt that can be called from other thread otherwise its existence makes no sense. But

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-24 Thread Jakub Ladman
One process, two threads. I have found in documentation, that is not recommended to pass one connection from one thread to second one. A partial succes, relative fast function, is proven with database file stored in ramdisk. Hard disk file storage 16 inserts per second. Ramdisk file storage 150

Re: [sqlite] fast acces to one memory located table from two threads

2010-03-24 Thread Max Vlasov
> I need an application consisting two threads. > In one of them i need to store incomming "messages" (one message is 1 to 8 > bytes of data) to temporary table existing only in memory. > It needs to be fast, storing hundreds of messages per second. > There i have a trigger deleting old rows and

Re: [sqlite] SQlite C API screwing port access?

2010-03-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin Sigwald wrote: > Here is the actual code: > > int main(void) > { > sqlite3* db_handle; > > sqlite3_open(DB_NAME,_handle); > sqlite3_close(db_handle); > my_ping("10.0.0.4"); > > return 0; > } > > If I call close