[sqlite] valgrind report (uninitialized byte) while committing large transaction

2009-12-16 Thread Vincent Cridlig
Hi,



I am seeing the valgrind error below using sqlite 3.6.18. It seems to always
happens while committing a transaction having 100 INSERT(s). all INSERT are
done in one single table.

Is this a known issue?



Thanks

Vincent



==15065==

==15065== Thread 71:

==15065== Syscall param write(buf) points to uninitialised byte(s)

==15065==at 0xEF74DEC: (within /lib/libpthread-2.3.4.so)

==15065==by 0xFDFD500: seekAndWrite (os_unix.c:2839)

==15065==by 0xFDFD5B8: unixWrite (os_unix.c:2898)

==15065==by 0xFDFB558: sqlite3OsWrite (os.c:69)

==15065==by 0xFE00F30: pager_write_pagelist (pager.c:2892)

==15065==by 0xFE02900: sqlite3PagerCommitPhaseOne (pager.c:4668)

==15065==by 0xFDDABE4: sqlite3BtreeCommitPhaseOne (btree.c:2956)

==15065==by 0xFE28F90: vdbeCommit (vdbeaux.c:1645)

==15065==by 0xFE296DC: sqlite3VdbeHalt (vdbeaux.c:2019)

==15065==by 0xFE22968: sqlite3VdbeExec (vdbe.c:2638)

==15065==by 0xFE25BC0: sqlite3Step (vdbeapi.c:344)

==15065==by 0xFE25D54: sqlite3_step (vdbeapi.c:407)

==15065==by 0xFDF5E2C: sqlite3_exec (legacy.c:71)

==15065==.. COMMIT TRANSACTION ..

==15065==  Address 0x322367B4 is 148 bytes inside a block of size 1,168
alloc'd

==15065==at 0xFFBABC0: malloc (vg_replace_malloc.c:149)

==15065==by 0xFDFA9B0: sqlite3MemMalloc (mem1.c:43)

==15065==by 0xFDF9C4C: mallocWithAlarm (malloc.c:251)

==15065==by 0xFDF9D44: sqlite3Malloc (malloc.c:279)

==15065==by 0xFE05794: pcache1Alloc (pcache1.c:172)

==15065==by 0xFE058BC: pcache1AllocPage (pcache1.c:206)

==15065==by 0xFE06310: pcache1Fetch (pcache1.c:575)

==15065==by 0xFE06B20: sqlite3PcacheFetch (pcache.c:231)

==15065==by 0xFE01CCC: sqlite3PagerAcquire (pager.c:3806)

==15065==by 0xFDD8CCC: btreeGetPage (btree.c:1510)

==15065==by 0xFDDCEB8: allocateBtreePage (btree.c:4766)

==15065==by 0xFDDEC70: balance_deeper (btree.c:6255)

==15065==by 0xFDDEDD4: balance (btree.c:6315)

==15065==by 0xFDDF1C0: sqlite3BtreeInsert (btree.c:6552)

==15065==by 0xFE239C0: sqlite3VdbeExec (vdbe.c:3724)

==15065==by 0xFE25BC0: sqlite3Step (vdbeapi.c:344)

==15065==by 0xFE25D54: sqlite3_step (vdbeapi.c:407)

==15065==by 0xFDF5E2C: sqlite3_exec (legacy.c:71)

==15065==. INSERT ..
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Multiple connection to in-memory database

2008-08-22 Thread Vincent Cridlig
tmpfs looks like the best approach for us since we then can use 
concurrent transactions using multiple connections from different 
threads and with good performances.
I didn't know /tmp was mounted as a tmpfs.

Thanks all for the replies.

Vincent



Brandon, Nicholas (UK) wrote:
>> I would like to use transactions from separate threads, each 
>> thread having one connection to a single in-memory db.
>>
>> 
>
> If your production environment is a modern linux distribution you may
> find the temporary directory ("/tmp") is already a memory drive using
> the tmpfs filesystem. If not it is very easy to create one. Search the
> internet for more information.
>
> You can then access the database by multiple processes/threads by
> referring to the file path.
>
> Nick
>
> 
> This email and any attachments are confidential to the intended
> recipient and may also be privileged. If you are not the intended
> recipient please delete it from your system and notify the sender.
> You should not copy it or use it for any purpose nor disclose or
> distribute its contents to any other person.
> 
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>   


___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Multiple connection to in-memory database

2008-08-19 Thread vincent cridlig
Hi,

I would like to use transactions from separate threads, each thread having one 
connection to a single in-memory db.

I just read in the sqlite doc that in-memory sqlite databases (using 
sqlite3_open(":memory:", ...)) are private to a single connection.
Is there a way to open a second connection to the same in-memory database (for 
example from a second thread)? Has someone ever tried to do (or implement) that?

Any help appreciated.

Thanks
Vincent


  
_ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users