Re: [sqlite] How to connect to an in-memory, shared cache db via SQLiteConnection

2012-08-17 Thread Wayne Bradney
Ah, there you go. I'd assumed the latest nuget package would have this already. 
Thanks.
 > From: kevin.m.ben...@gmail.com
> Date: Fri, 17 Aug 2012 22:54:58 -0400
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How to connect to an in-memory, shared cache db via 
> SQLiteConnection
> 
> On Fri, Aug 17, 2012 at 8:51 PM, Wayne Bradney wrote:
> 
> >
> >
> >
> > I'm using System.Data.SQLite version 1.0.81.0, and I'm trying the
> > following connection string: FullUri='file::memory:?cache=shared; when I
> > Open() the SQLiteConnection, I get: Invalid ConnectionString format for
> > parameter "FullUri" What am I doing wrong?
> > ___
> >
> 
> http://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki
> 
> 
> *Version History*
> 
> *1.0.82.0 - September XX, 2012 (release scheduled)*
> 
> Add support for URI file names  via the new
> FullUri connection string property.
> 
> 
> > --
> >--
> >   --
> >  --Ô¿Ô--
> > K e V i N
> >
> ___
> 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


Re: [sqlite] How to connect to an in-memory, shared cache db via SQLiteConnection

2012-08-17 Thread Kevin Benson
On Fri, Aug 17, 2012 at 8:51 PM, Wayne Bradney wrote:

>
>
>
> I'm using System.Data.SQLite version 1.0.81.0, and I'm trying the
> following connection string: FullUri='file::memory:?cache=shared; when I
> Open() the SQLiteConnection, I get: Invalid ConnectionString format for
> parameter "FullUri" What am I doing wrong?
> ___
>

http://system.data.sqlite.org/index.html/doc/trunk/www/news.wiki


*Version History*

*1.0.82.0 - September XX, 2012 (release scheduled)*

Add support for URI file names  via the new
FullUri connection string property.


> --
>--
>   --
>  --Ô¿Ô--
> K e V i N
>
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to connect to an in-memory, shared cache db via SQLiteConnection

2012-08-17 Thread Udon Shaun
the ":memory:" is the old format and not a uri format

It should be something like:


file:mymemorydb.db?mode=memory&cache=shared




 From: Wayne Bradney 
To: General Discussion of SQLite Database  
Sent: Saturday, August 18, 2012 2:51 AM
Subject: Re: [sqlite] How to connect to an in-memory, shared cache db via 
SQLiteConnection
 
Sorry, I'd already removed the quote - still doesn't work. Here's what I've 
tried:             const string connectionString = @"FullUri=file::memory:"; 
gives: Data Source cannot be empty.  Use :memory: to open an in-memory 
database             const string connectionString = 
@"FullUri=file::memory:?cache=shared"; gives: Invalid ConnectionString format 
for parameter "FullUri"             const string connectionString = @"Data 
Source=:memory:"; works, but doesn't give me the shared cache I need.           
  const string connectionString = @"Data Source=:memory:?cache=shared"; gives: 
Invalid ConnectionString format for parameter "Data Source" I just can't seem 
to get a shared cache, in-memory db no matter what I try!
> From: slav...@bigfraud.org
> Date: Sat, 18 Aug 2012 02:15:13 +0100
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How to connect to an in-memory,    shared cache db via 
> SQLiteConnection
> 
> 
> On 18 Aug 2012, at 1:51am, Wayne Bradney  wrote:
> 
> > I'm using System.Data.SQLite version 1.0.81.0, and I'm trying the following 
> > connection string: FullUri='file::memory:?cache=shared;  when I Open() the 
> > SQLiteConnection, I get: Invalid ConnectionString format for parameter 
> > "FullUri" What am I doing wrong?    
> 
> I think it's the quote.  Try using
> 
> FullUri=file::memory:?cache=shared;
> 
> instead.  If that doesn't work, try just
> 
> FullUri=file::memory:
> 
> for debugging purposes.
> 
> Simon.
> ___
> 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-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to connect to an in-memory, shared cache db via SQLiteConnection

2012-08-17 Thread Wayne Bradney
Sorry, I'd already removed the quote - still doesn't work. Here's what I've 
tried: const string connectionString = @"FullUri=file::memory:"; 
gives: Data Source cannot be empty.  Use :memory: to open an in-memory database 
const string connectionString = 
@"FullUri=file::memory:?cache=shared"; gives: Invalid ConnectionString format 
for parameter "FullUri" const string connectionString = @"Data 
Source=:memory:"; works, but doesn't give me the shared cache I need.   
  const string connectionString = @"Data Source=:memory:?cache=shared"; gives: 
Invalid ConnectionString format for parameter "Data Source" I just can't seem 
to get a shared cache, in-memory db no matter what I try!
 > From: slav...@bigfraud.org
> Date: Sat, 18 Aug 2012 02:15:13 +0100
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] How to connect to an in-memory, shared cache db via 
> SQLiteConnection
> 
> 
> On 18 Aug 2012, at 1:51am, Wayne Bradney  wrote:
> 
> > I'm using System.Data.SQLite version 1.0.81.0, and I'm trying the following 
> > connection string: FullUri='file::memory:?cache=shared;  when I Open() the 
> > SQLiteConnection, I get: Invalid ConnectionString format for parameter 
> > "FullUri" What am I doing wrong?
> 
> I think it's the quote.  Try using
> 
> FullUri=file::memory:?cache=shared;
> 
> instead.  If that doesn't work, try just
> 
> FullUri=file::memory:
> 
> for debugging purposes.
> 
> Simon.
> ___
> 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


Re: [sqlite] How to connect to an in-memory, shared cache db via SQLiteConnection

2012-08-17 Thread Simon Slavin

On 18 Aug 2012, at 1:51am, Wayne Bradney  wrote:

> I'm using System.Data.SQLite version 1.0.81.0, and I'm trying the following 
> connection string: FullUri='file::memory:?cache=shared;  when I Open() the 
> SQLiteConnection, I get: Invalid ConnectionString format for parameter 
> "FullUri" What am I doing wrong?

I think it's the quote.  Try using

FullUri=file::memory:?cache=shared;

instead.  If that doesn't work, try just

FullUri=file::memory:

for debugging purposes.

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


[sqlite] How to connect to an in-memory, shared cache db via SQLiteConnection

2012-08-17 Thread Wayne Bradney



I'm using System.Data.SQLite version 1.0.81.0, and I'm trying the following 
connection string: FullUri='file::memory:?cache=shared;  when I Open() the 
SQLiteConnection, I get: Invalid ConnectionString format for parameter 
"FullUri" What am I doing wrong?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Problem with SQLite on client machine under .net framework 4 client profile

2012-08-17 Thread jean . nkengtonye
Hello,

I'm trying to launch our application .exe on a client machine.
We've rebuilt the project under .NET framework 4 client profile.

I have this error on launch:
"The specified store provider cannot be found in the configuration, or is 
not valid".

Do you have an idea of what to do? Everything runs fine on developers' 
machines.
Am I obliged to install the SQLite .NET 4 Win32 setup on every machine 
that should run the .exe? 

Thanks and regards,
Jean

- 


This message and any attachments (the "message") is
intended solely for the intended addressees and is confidential. 
If you receive this message in error,or are not the intended recipient(s), 
please delete it and any copies from your systems and immediately notify
the sender. Any unauthorized view, use that does not comply with its purpose, 
dissemination or disclosure, either whole or partial, is prohibited. Since the 
internet 
cannot guarantee the integrity of this message which may not be reliable, BNP 
PARIBAS 
(and its subsidiaries) shall not be liable for the message if modified, changed 
or falsified. 
Do not print this message unless it is necessary,consider the environment.

--

Ce message et toutes les pieces jointes (ci-apres le "message") 
sont etablis a l'intention exclusive de ses destinataires et sont confidentiels.
Si vous recevez ce message par erreur ou s'il ne vous est pas destine,
merci de le detruire ainsi que toute copie de votre systeme et d'en avertir
immediatement l'expediteur. Toute lecture non autorisee, toute utilisation de 
ce message qui n'est pas conforme a sa destination, toute diffusion ou toute 
publication, totale ou partielle, est interdite. L'Internet ne permettant pas 
d'assurer
l'integrite de ce message electronique susceptible d'alteration, BNP Paribas 
(et ses filiales) decline(nt) toute responsabilite au titre de ce message dans 
l'hypothese
ou il aurait ete modifie, deforme ou falsifie. 
N'imprimez ce message que si necessaire, pensez a l'environnement.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Encryption using System.Data.SQLite.dll

2012-08-17 Thread Richard Hipp
On Fri, Aug 17, 2012 at 1:20 PM, John Grasmeder
wrote:

> I agree, I am trying to find a way of getting the System.Data.SQLite.dll
> to use AES-128 in CCM mode which is the type used by Adobe AIR.
>

The only way to do that is to purchase an SEE license, giving you access to
the SEE source code, then recompile System.Data.SQLite.dll using the SEE
version of "sqlite3.c".


> Currently all I can find is that it uses "Encrypted databases are fully
> encrypted and support both binary and cleartext password types" from
> http://system.data.sqlite.org/index.html/doc/trunk/www/features.wiki.
>
> I have downloaded the fossil application, cloned the repository and
> opened a full source tree from sds.fossil but I am having no luck
> finding anything about the encryption used on SQLite databases. :(
>
>
>  John G.
>
> > -Original Message-
> > From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> > boun...@sqlite.org] On Behalf Of Richard Hipp
> > Sent: Friday, August 17, 2012 12:09 PM
> > To: General Discussion of SQLite Database
> > Subject: Re: [sqlite] Encryption using System.Data.SQLite.dll
> >
> > On Fri, Aug 17, 2012 at 11:58 AM, Carlos Milon Silva
> > wrote:
> >
> > > John,
> > >
> > > The internal Adobe Air SQLite is built to not accept extensions,
> > >
> >
> > Yes, but Adobe Air comes with the SQLite Encryption Extension (SEE)
> > built in.  There is nothing that needs to be extended with Adobe Air.
> >
> >
> >
> > > so, either the System.Data.SQLite.dll or the SQLite Encryption
> > > Extension from hwaci could only be used with a an external native
> > > extension application.
> > >
> >
> > --
> > D. Richard Hipp
> > d...@sqlite.org
> > ___
> > 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
>



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


Re: [sqlite] Encryption using System.Data.SQLite.dll

2012-08-17 Thread John Grasmeder
I agree, I am trying to find a way of getting the System.Data.SQLite.dll
to use AES-128 in CCM mode which is the type used by Adobe AIR.
Currently all I can find is that it uses "Encrypted databases are fully
encrypted and support both binary and cleartext password types" from
http://system.data.sqlite.org/index.html/doc/trunk/www/features.wiki.

I have downloaded the fossil application, cloned the repository and
opened a full source tree from sds.fossil but I am having no luck
finding anything about the encryption used on SQLite databases. :(


 John G.

> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Richard Hipp
> Sent: Friday, August 17, 2012 12:09 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Encryption using System.Data.SQLite.dll
> 
> On Fri, Aug 17, 2012 at 11:58 AM, Carlos Milon Silva
> wrote:
> 
> > John,
> >
> > The internal Adobe Air SQLite is built to not accept extensions,
> >
> 
> Yes, but Adobe Air comes with the SQLite Encryption Extension (SEE)
> built in.  There is nothing that needs to be extended with Adobe Air.
> 
> 
> 
> > so, either the System.Data.SQLite.dll or the SQLite Encryption
> > Extension from hwaci could only be used with a an external native
> > extension application.
> >
> 
> --
> D. Richard Hipp
> d...@sqlite.org
> ___
> 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] SQLite VxWorks 6.3 (DKM)

2012-08-17 Thread Udon Shaun
I'm trying to compile SQLite for the VxWorks 6.3 platform on an embedded target 
(VxWorks in DKM rather than RTP) and have made fairly good progress but have 
hit a brick wall.
I can get it to compile with the compile options listed below, however, when 
run it gives "disk I/O error-SQLITE_IOERR_LOCK" (error code 0F0A).

The terminal console gives:
fcntl 0 38 SETLK RDLK 1073741824 1 0 -1
fcntl-failure-reason 0 38 SETLK RDLK 1073741824 1 0

The db file is created (and deleted when closed), but with zero contents. I 
also do not see a journal file created at all even when journal mode is set to 
"Persist".

I've tried changing the locking style (-SQLITE_ENABLE_LOCKING_STYLE) however 
this gives me a shedload of compile errors for any value greater than "0"  (see 
below). SQLITE_NO_SYNC has no effect.

Any ideas?

=
compiler options
-DSQLITE_OMIT_WAL=1 \
-DSQLITE_HOMEGROWN_RECURSIVE_MUTEX \
-DSQLITE_THREADSAFE=0 \
-DSQLITE_OMIT_LOAD_EXTENSION \
-DHAVE_UTIME \
-DSQLITE_LOCK_TRACE \
-DSQLITE_DEBUG=2 \
-DSQLITE_DEBUG_OS_TRACE=1 


changes from sqlite 3.7.13

fchown and umask nulled (return constant zero pointer) e.g for umask on line 
25558 

#if defined(OS_VXWORKS)
  { "umask",     (sqlite3_syscall_ptr)0,   0 },
#else  
  { "umask",    (sqlite3_syscall_ptr)posixUmask,   0 },
#endif
#define osUmask ((mode_t(*)(mode_t))aSyscall[21].pCurrent)

Compile errors when SQLITE_ENABLE_LOCKING_STYLE is set to a value >0

sqlite3.c:25517: error: `pread' undeclared here (not in a function)
sqlite3.c:25517: error: initializer element is not constant
sqlite3.c:25517: error: (near initialization for `aSyscall[9].pCurrent')
sqlite3.c:25517: error: initializer element is not constant
sqlite3.c:25517: error: (near initialization for `aSyscall[9]')
sqlite3.c:25526: error: initializer element is not constant
sqlite3.c:25526: error: (near initialization for `aSyscall[10]')
sqlite3.c:25530: error: initializer element is not constant
sqlite3.c:25530: error: (near initialization for `aSyscall[11]')
sqlite3.c:25534: error: `pwrite' undeclared here (not in a function)
sqlite3.c:25534: error: initializer element is not constant
sqlite3.c:25534: error: (near initialization for `aSyscall[12].pCurrent')
sqlite3.c:25534: error: initializer element is not constant
sqlite3.c:25534: error: (near initialization for `aSyscall[12]')
sqlite3.c:25544: error: initializer element is not constant
sqlite3.c:25544: error: (near initialization for `aSyscall[13]')
sqlite3.c:25550: error: initializer element is not constant
sqlite3.c:25550: error: (near initialization for `aSyscall[14]')
sqlite3.c:25559: error: initializer element is not constant
sqlite3.c:25559: error: (near initialization for `aSyscall[15]')
sqlite3.c:25563: error: initializer element is not constant
sqlite3.c:25563: error: (near initialization for `aSyscall[16]')
sqlite3.c:25566: error: initializer element is not constant
sqlite3.c:25566: error: (near initialization for `aSyscall[17]')
sqlite3.c:25569: error: initializer element is not constant
sqlite3.c:25569: error: (near initialization for `aSyscall[18]')
sqlite3.c:25572: error: initializer element is not constant
sqlite3.c:25572: error: (near initialization for `aSyscall[19]')
sqlite3.c:25576: error: initializer element is not constant
sqlite3.c:25576: error: (near initialization for `aSyscall[20]')
sqlite3.c:25583: error: initializer element is not constant
sqlite3.c:25583: error: (near initialization for `aSyscall[21]')#endif
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Encryption using System.Data.SQLite.dll

2012-08-17 Thread Richard Hipp
On Fri, Aug 17, 2012 at 11:58 AM, Carlos Milon Silva wrote:

> John,
>
> The internal Adobe Air SQLite is built to not accept extensions,
>

Yes, but Adobe Air comes with the SQLite Encryption Extension (SEE) built
in.  There is nothing that needs to be extended with Adobe Air.



> so, either the System.Data.SQLite.dll or the SQLite Encryption Extension
> from hwaci
> could only be used with a an external native extension application.
>

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


Re: [sqlite] Encryption using System.Data.SQLite.dll

2012-08-17 Thread Carlos Milon Silva

John,

The internal Adobe Air SQLite is built to not accept extensions,
so, either the System.Data.SQLite.dll or the SQLite Encryption Extension 
from hwaci

could only be used with a an external native extension application.

Carlos.

Em 17/08/2012 09:48, John Grasmeder escreveu:

Carlos,

My statements must have misled you, Adobe Air already contains an
implementation of SQLite. I am currently using it with several 'tool'
applications along with my client application that my customer will use
which all process encrypted databases the same way. I am hoping not to
get into a discussion with the 'sqlite-users' list of the merits of who
is implementing database encryption correctly or incorrectly. It doesn't
look like I can change the methods used from the Adobe side of things so
I was hoping that the System.Data.SQLite.dll group allowed some way of
overriding the encryption used on the database file.

Joe Mistachkin has also replied with a reference to SQLite Encryption
Extension (http://www.hwaci.com/sw/sqlite/see.html) which I will look
into today and see if it can be added to my Dotnet code.



Thanks,

John G.

-Original Message-
From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
boun...@sqlite.org] On Behalf Of Carlos Milon Silva
Sent: Thursday, August 16, 2012 06:01 PM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Encryption using System.Data.SQLite.dll

if you really need to use System.Data.SQLite.dll, from Adobe Air, then
you need to follow something like to:

http://blogs.adobe.com/globalization/invoking-icu-from-adobe-air-
applications-part-2-using-flash-builder-4-6/

and call System.Data.SQLite.dll as an external native extension

Carlos.





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


Re: [sqlite] Encryption using System.Data.SQLite.dll

2012-08-17 Thread Mike

On 8/17/12 9:48 AM, John Grasmeder wrote:

Joe Mistachkin has also replied with a reference to SQLite Encryption
Extension (http://www.hwaci.com/sw/sqlite/see.html) which I will look
into today and see if it can be added to my Dotnet code.



That $2000.00 license fee would be a killer for me!

Mike

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


Re: [sqlite] Encryption using System.Data.SQLite.dll

2012-08-17 Thread John Grasmeder
Carlos,

My statements must have misled you, Adobe Air already contains an
implementation of SQLite. I am currently using it with several 'tool'
applications along with my client application that my customer will use
which all process encrypted databases the same way. I am hoping not to
get into a discussion with the 'sqlite-users' list of the merits of who
is implementing database encryption correctly or incorrectly. It doesn't
look like I can change the methods used from the Adobe side of things so
I was hoping that the System.Data.SQLite.dll group allowed some way of
overriding the encryption used on the database file.

Joe Mistachkin has also replied with a reference to SQLite Encryption
Extension (http://www.hwaci.com/sw/sqlite/see.html) which I will look
into today and see if it can be added to my Dotnet code.



Thanks,

John G.
> -Original Message-
> From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-
> boun...@sqlite.org] On Behalf Of Carlos Milon Silva
> Sent: Thursday, August 16, 2012 06:01 PM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Encryption using System.Data.SQLite.dll
> 
> if you really need to use System.Data.SQLite.dll, from Adobe Air, then
> you need to follow something like to:
> 
> http://blogs.adobe.com/globalization/invoking-icu-from-adobe-air-
> applications-part-2-using-flash-builder-4-6/
> 
> and call System.Data.SQLite.dll as an external native extension
> 
> Carlos.
> 
> Em 16/08/2012 16:17, John Grasmeder escreveu:
> > Hello List,
> >
> >
> >
> > I am currently using System.Data.SQLite.dll version 1.0.79.0. I am
> > creating  a SQLite database file from data stored in MS-SQL which
> will
> > be pushed to client applications running an Adobe Air application on
> > Macs and Windows PCs.  Everything is progressing nicely but I am now
> > at the step where I need to 'Lock up' the SQLite database from
prying
> eyes.
> >
> >
> >
> >
> > How do I go about changing the encryption method/methods that are
> used
> > in the SQLite.SQLiteConnection class? Do I need to implement my own
> > version of SQLiteConnection and override some methods or is there
> some
> > other code I have not found as of date?
> >
> >
> >
> > Creating both Encrypted and non Encrypted databases on both sides
> > (client Adobe ActionScript/server don.net framework) and being able
> to
> > read them from the side that created them leads me to believe the
> > Encryption methods are not the same.
> >
> >
> >
> > If this knowledge is available on the sqlite.org web site could
> > someone please point me in the right direction.
> >
> >
> >
> > Thanks,
> >
> >
> >
> > John G.
> >
> > ___
> > 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-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Error: database disk image is malformed

2012-08-17 Thread Richard Hipp
On Fri, Aug 17, 2012 at 8:08 AM, Tal Tabakman wrote:

>
> 7. file system is NFS.
>

Consider using the "unix-dotfile" VFS instead of the standard "unix" VFS.
(Add the string "unix-dotfile" as the 4th argument to sqlite3_open_v2().)

The unix-dotfile VFS will use dot-file locking instead of posix advisory
locking.  The unix-dotfile VFS will usually work better on NFS.

The down side of unix-dotfile is that will cut concurrency, but it sounds
like you are not using concurrency anyhow.  Also, if a process crashes, it
might leave a stale dot-file lock that you'll need to clear manually.


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


[sqlite] MultiThread Performance Gain Attempts

2012-08-17 Thread esum
Hi,

I am using sqlite version 3.7.13 in a multithreaded application
(transactions with writes and reads will be called from different parallel
threads within one process), and I am trying to gain performance.  I would
also like in some way to keep an on disk record of the database as the
program runs, and am working with an existing database structure that uses
the shared cache/unlock_notify mechanisms to handle concurrency, opening a
separate database connection per each thread (I cannot modify these
settings).

I have been attempting to do the following: For every write operation, write
to an in memory database, then perform that same write to a separate on disk
database with the asynchronous io module vfs attached to it.  The on disk
database also sets locking_mode to exclusive and journal_mode to WAL.  Reads
will just happen on the in-memory database.  This combination of
configurations for the on disk database has given me almost in memory write
speeds.  I have not set the sqlite3async vfs as the default for all db
connections in sqlite3async_initialize().  I have just attached the
sqlite3async vfs to on disk database connections, not the in memory ones. 
However, I get the error: "no such access mode : memory" when I try to begin
any transaction for the in memory database.  How do I fix this?

As an alternative, is it safe to just use the on disk database with the
configurations/additions listed above for all read/write operations?  If I
do inserts/updates and query for those same inserts/updates right after,
will those inserts/updates be reflected in the query results or could those
writes still be somewhere in the write operation queue or a different place
in cache/WAL file?

Thanks for any help.  All suggestions are more than welcome.



--
View this message in context: 
http://sqlite.1065341.n5.nabble.com/MultiThread-Performance-Gain-Attempts-tp63796.html
Sent from the SQLite mailing list archive at Nabble.com.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Assertion failure when sqlite3_bind_blob is passed a negative length

2012-08-17 Thread Joey Adams
With SQLite 3.7.13 (the current version), if you pass a negative
length to sqlite3_bind_blob, you get an assertion failure:

sqlite3.c:59949: sqlite3VdbeMemSetStr: Assertion `enc!=0' failed.

Here is the relevant source code:

...
  if( nByte<0 ){
assert( enc!=0 );
if( enc==SQLITE_UTF8 ){
  for(nByte=0; nByte<=iLimit && z[nByte]; nByte++){}
}else{
  for(nByte=0; nByte<=iLimit && (z[nByte] | z[nByte+1]); nByte+=2){}
}
flags |= MEM_Term;
  }
...

If assertions are not turned on, it takes the second branch, treating
the string as UTF-16 (output of attached test program):

sqlite3_bind_blob returned 0
column type:  BLOB
column text:  foo^@garbage^@
column bytes: 12

This is not a bug, strictly speaking.  It doesn't really make sense
for a BLOB to be NUL-terminated.  But the documentation does not make
it clear that this is undefined behavior [1]:

>In those routines that have a fourth argument, its value is the number of 
>bytes in the parameter. To be clear: the value is the number of bytes in the 
>value, not the number of characters. If the fourth parameter is negative, the 
>length of the string is the number of bytes up to the first zero terminator. 
>...

 [1]: http://www.sqlite.org/c3ref/bind_blob.html

Giving a negative length to sqlite3_bind_blob might be an easy trap to
fall into, since sqlite3_bind_text *does* let you give a negative
length, which basically means strlen(value).

I think the documentation should mention that a negative length
argument is only allowed for text and text16.

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


[sqlite] Error: database disk image is malformed

2012-08-17 Thread Tal Tabakman
Hi Simon

thanks for your prompt reply

answers for the below

1. The database is written by a single process who has an EXCLUSIVE LOCK

2. Only AFTER all data is being written, costumer can access it (read mode)

3. potentially, it is a single writer followed by multiple readers kind of flow

4. For the problem described we had also a single reader.

5. hence, I hardly think that this is a concurrency issue

6. the OS is linux in 64 bits mode

7. file system is NFS.

8. so, user launches an execution via local DRM (LSF i think) and from
a remote machine is a DB is generated, after DB is generated another
execution is launched and another remote machine access it in a read
mode and some "SELECT..." queries are used, then the corruption error
appears...


>* Answering your question below,*>* *>* yes , I believe  that the costumer is 
>using network*
You can read section 6.0 of



to learn some of the problems involved.  If you need any further help
from us then I'm sorry but we have more questions:

Which network file protocol is being used.  NFS ?  SMB ?

What OS are all the computers involved running ?

Are all accesses across a network or is one app accessing the file as
a local file and the other accessing it across the network ?
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How to know what terms were created using FTS

2012-08-17 Thread Dominique Pellé
Mohit Sindhwani  wrote:

> Hi Ralf,
>
>
>
> On 17/8/2012 3:50 PM, Ralf Junker wrote:
>>
>> On 17.08.2012 09:30, Mohit Sindhwani wrote:
>>
>>> We're using FTS4 and it works well for many things.  One of the things
>>> that we'd like to do is to see what terms are being created by the
>>> tokenizer in use.  What would be the easiest way to do that?
>>>
>>> I tried looking through the fts_aux table and the segments and content
>>> tables, but nothing struck me directly as usable.  Any suggestions?
>>
>> http://www.sqlite.org/fts3.html#fts4aux
>
>
> I did look at this - but I couldn't figure out a way that allowed me to see
> what terms were created by the tokenizer for a particular expression.
> Example "SOME TEXT" becomes "SOME", "TEXT" - is there a way to find that?
>
> Best Regards,
> Mohit.

This gives the tokens:

sqlite> CREATE VIRTUAL TABLE ft USING fts4(x);
sqlite> INSERT INTO ft VALUES("hello world");
sqlite> INSERT INTO ft VALUES("hello there");

sqlite> CREATE VIRTUAL TABLE ft_terms USING fts4aux(ft);

sqlite> .header on
sqlite> SELECT * FROM ft_terms;
term|col|documents|occurrences
hello|*|2|2
hello|0|2|2
there|*|1|1
there|0|1|1
world|*|1|1
world|0|1|1

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


Re: [sqlite] How to know what terms were created using FTS

2012-08-17 Thread Dan Kennedy

On 08/17/2012 03:58 PM, Mohit Sindhwani wrote:

Hi Ralf,


On 17/8/2012 3:50 PM, Ralf Junker wrote:

On 17.08.2012 09:30, Mohit Sindhwani wrote:


We're using FTS4 and it works well for many things.  One of the things
that we'd like to do is to see what terms are being created by the
tokenizer in use.  What would be the easiest way to do that?

I tried looking through the fts_aux table and the segments and content
tables, but nothing struck me directly as usable.  Any suggestions?

http://www.sqlite.org/fts3.html#fts4aux


I did look at this - but I couldn't figure out a way that allowed me to
see what terms were created by the tokenizer for a particular
expression.  Example "SOME TEXT" becomes "SOME", "TEXT" - is there a way
to find that?


You could, I suppose, obtain a handle for the tables tokenizer using
the fts3_tokenizer() function:

  http://www.sqlite.org/fts3.html#section_8_1

Then use it to tokenize your expression using the API in
fts3_tokenizer.h. See static function "testFunc()" in
fts3_tokenizer.c for an example.

Dan.



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


Re: [sqlite] How to know what terms were created using FTS

2012-08-17 Thread Mohit Sindhwani

Hi Ralf,


On 17/8/2012 3:50 PM, Ralf Junker wrote:

On 17.08.2012 09:30, Mohit Sindhwani wrote:


We're using FTS4 and it works well for many things.  One of the things
that we'd like to do is to see what terms are being created by the
tokenizer in use.  What would be the easiest way to do that?

I tried looking through the fts_aux table and the segments and content
tables, but nothing struck me directly as usable.  Any suggestions?

http://www.sqlite.org/fts3.html#fts4aux


I did look at this - but I couldn't figure out a way that allowed me to 
see what terms were created by the tokenizer for a particular 
expression.  Example "SOME TEXT" becomes "SOME", "TEXT" - is there a way 
to find that?


Best Regards,
Mohit.
17/8/2012 | 4:57 PM.



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


Re: [sqlite] How to know what terms were created using FTS

2012-08-17 Thread Ralf Junker
On 17.08.2012 09:30, Mohit Sindhwani wrote:

> We're using FTS4 and it works well for many things.  One of the things
> that we'd like to do is to see what terms are being created by the
> tokenizer in use.  What would be the easiest way to do that?
> 
> I tried looking through the fts_aux table and the segments and content
> tables, but nothing struck me directly as usable.  Any suggestions?

http://www.sqlite.org/fts3.html#fts4aux

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


[sqlite] How to know what terms were created using FTS

2012-08-17 Thread Mohit Sindhwani

Hi,

We're using FTS4 and it works well for many things.  One of the things 
that we'd like to do is to see what terms are being created by the 
tokenizer in use.  What would be the easiest way to do that?


I tried looking through the fts_aux table and the segments and content 
tables, but nothing struck me directly as usable.  Any suggestions?


Best Regards,
Mohit.
17/8/2012 | 3:29 PM.


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