[sqlite] Sqlite3 in MAC Os
Hi everybody, Im developing an application using sqlite3 in MAC OS,I just wanted to know wheather sqlite3 can be used in MAC OS.If so can the same sqlite3 library and the executable used in windows can be used in MAC OS or a different version has to be used. Regards, Kirrthana
Re: [sqlite] Using same database with multiple processes
Thomas Dybdahl Ahle wrote: Hi, I'm running a project using pysqlite for database support. It's awsome. Now I have a user who produces this warning: "Warning: You can only execute one statement at a time." Hard to say without knowing the value of sql in cur.execute(sql) pysqlite's execute method can only execute a single query. Use executescript to executing multiple queries. I'm wondering if it can have something to do with multiple processes using the same database? Don't think so. I can't reproduce it my self, but then I haven't got a dural core processor. I'm running a dual CPU machine and with Python2.5 and sqlite3 (basically what you have but newer) I get: PythonWin 2.5 (r25:51908, ... v.1310 32 bit (Intel)] on win32. Portions Copyright 1994-2006 Mark Hammond - see 'Help/About PythonWin' for further copyright information. >>> import sqlite3 >>> C=sqlite3.Connection(":memory:") >>> c=C.cursor() >>> c.execute("begin; create table t(a); end") Traceback (most recent call last): File "", line 1, in Warning: You can only execute one statement at a time. >>> c.executescript("begin; create table t(a); end") Traceback (most recent call last): File "", line 1, in ProgrammingError: you did not provide a complete SQL statement >>> c.executescript("begin; create table t(a); end;") BTW, there is a pysqlite list (this one is for the SQLite, the underlying C library) but it's a bit quiet. Martin - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Re: Using same database with multiple processes
Btw. According to python import pysqlite2.dbapi2 as sqlite print sqlite.version He is running sqlite 2.0.5. It works fine in 2.3.2. I guess it is a bug which has been fixed. Is there any way to make the code backwards compatible, or will I just have to ask him to upgrade? søn, 25 02 2007 kl. 22:16 +0100, skrev Thomas Dybdahl Ahle: > Hi, I'm running a project using pysqlite for database support. It's > awsome. > Now I have a user who produces this warning: "Warning: You can only > execute one statement at a time." > At: > con = sqlite.connect(path) > cur = con.cursor() > cur.execute(sql) > I'm wondering if it can have something to do with multiple processes > using the same database? > I can't reproduce it my self, but then I haven't got a dural core > processor. > > Any ideas how to solve this? > -- Med venlig hilsen, Best regards, Thomas - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] developers mailing list
On Sun, 2007-02-25 at 22:48 +0100, Jakub Ladman wrote: > Dne neděle 25 únor 2007 19:25 Martin Jenkins napsal(a): > > Jakub Ladman wrote: > > > > You want "make -f Makefile.linux-gcc" > Oh, of course, sorry. > > And how to fix this? > > [EMAIL PROTECTED] ~/src/sqlite-3.3.13 $ make -f Makefile.linux-gcc > sh4-pc-linux-uclibc-gcc -Os -DNDEBUG=1 -DHAVE_FDATASYNC=1 -DTHREADSAFE=1 > -DHAVE_USLEEP=1 -I. -I../sqlite-3.3.13/src -c > ../sqlite-3.3.13/src/tclsqlite.c > ../sqlite-3.3.13/src/tclsqlite.c:20:17: tcl.h: není souborem ani adresářem > ../sqlite-3.3.13/src/tclsqlite.c:54: error: syntax error before "Tcl_Interp" > ../sqlite-3.3.13/src/tclsqlite.c:54: warning: no semicolon at end of struct > or > union > > I do not need tcl. It's seems a bit strange to me that Makefile.linux-gcc includes tcl in the build by default, but it does. Maybe that should change... If you add "-DNO_TCL" to the OPTS variable in Makefile.linux-gcc this error should go away. i.e. add the following line somewhere after the "OPTS = -DNDEBUG" bit: OPTS += -DNO_TCL Dan. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Re[2]: SQLite - how to protect the data
I get that, but I will draw an analogy for you. My dad cannot rip a commercial movie DVD and because he doesn't know how he even doesn't try. So if someone doesn't know how to crack it I'd say that most people will not even bother, very few might and some of those could succeed. But I can live with that and I will. Regards Marek Teg wrote: > > Hello All, > > You also have to accept that, if it's on the user's PC and they REALLY > want that data, they can get it. They don't even need to crack the > encryption. They just need to figure out what key the program's using > to unlock the DB. There's absolutely no way to protect data that's > stored on someone else's PC. Just look at DVD's, HD DVD and Blu-Ray > disks. Millions spent on security, cracked within months of release. > > > C > > Sunday, February 25, 2007, 12:13:00 PM, you wrote: > > JS> One way or another you have to apply sweat or treasure to protect your > JS> data asset. Just how valuable is it? > > JS> mxs wrote: >>> Thanks Ulrich, but I think that goes beyond the scope of my knowledge >>> and >>> tools I have available to me. >>> >>> I wish somebody (who has C++ knowledge) has done it already and released >>> version of SQLite with encrypt and decrypt functionality. I cannot >>> believe >>> that there is not more need for it between SQLite users. You make it >>> sound >>> like it shouldn't be a problem for someone who knows C++. But I am >>> expecting >>> a catch somewhere, otherwise why would there be commercial versions of >>> SQLite which has this functonality. >>> >>> Thanks for your suggestion anyways. >>> >>> If you don't mind one more off topic question. You seem to have >>> experience >>> with wxWidgets. In tandem with wxPython is that a better tool to use >>> than >>> just Python and Tkinter. Which route is the easier one for a beginner in >>> this language? >>> >>> Thanks again >>> >>> Marek >>> >>> >>> >>> Ulrich Telle wrote: >>> Hi Marek, >I'll be honest with you I had to google around to find out what is >wxWidgets (obviously I've seen it before, but never dipped in). Pls >understand I've been messing around for years with VB (not even the >.NET version) and it served me quite well. But I decided to move on >to something rather free of Microsoft. Well, wxWidgets _is_ free of Microsoft and is available for many different platforms. But it wasn't my intent to point you in the direction of wxWidgets. My encryption solution for SQLite is not bound to wxWidgets in any way. You may as well use it completely independent of wxWidgets (or my component wxSQLite3). You may just take the source code of my encryption extension from the file release of wxSQLite3, combine it with the sources of SQLite itself, compile with just any C++ compiler to get a SQLite library or DLL supporting database encryption. Please read the readme file of wxSQLite3 for further information. My extension implements two functions of the SQLite API, namely sqlite3_key and sqlite3_rekey (see sqlite3.h header file of SQLite), which are not implemented in the normal SQLite distribution. To use encryption sqlite3_key has to be called immediately after the call to sqlite3_open. That's all. Regards, Ulrich - To unsubscribe, send email to [EMAIL PROTECTED] - >>> >>> > > > JS> > - > JS> To unsubscribe, send email to [EMAIL PROTECTED] > JS> > - > > > > > -- > Best regards, > Tegmailto:[EMAIL PROTECTED] > > > - > To unsubscribe, send email to [EMAIL PROTECTED] > - > > > -- View this message in context: http://www.nabble.com/SQLite---how-to-protect-the-data-tf3282484.html#a9153088 Sent from the SQLite mailing list archive at Nabble.com. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite - how to protect the data
I don't have any market value in mind, but I do know that the data in the database took a lot of time to put together (and I mean a lot). It was very lengthy process of one individual. So it does have a high value, although not one you can put a monetary value on, not at least for now. Regards Marek John Stanton wrote: > > One way or another you have to apply sweat or treasure to protect your > data asset. Just how valuable is it? > > mxs wrote: >> Thanks Ulrich, but I think that goes beyond the scope of my knowledge and >> tools I have available to me. >> >> I wish somebody (who has C++ knowledge) has done it already and released >> version of SQLite with encrypt and decrypt functionality. I cannot >> believe >> that there is not more need for it between SQLite users. You make it >> sound >> like it shouldn't be a problem for someone who knows C++. But I am >> expecting >> a catch somewhere, otherwise why would there be commercial versions of >> SQLite which has this functonality. >> >> Thanks for your suggestion anyways. >> >> If you don't mind one more off topic question. You seem to have >> experience >> with wxWidgets. In tandem with wxPython is that a better tool to use than >> just Python and Tkinter. Which route is the easier one for a beginner in >> this language? >> >> Thanks again >> >> Marek >> >> >> >> Ulrich Telle wrote: >> >>>Hi Marek, >>> >>> I'll be honest with you I had to google around to find out what is wxWidgets (obviously I've seen it before, but never dipped in). Pls understand I've been messing around for years with VB (not even the .NET version) and it served me quite well. But I decided to move on to something rather free of Microsoft. >>> >>>Well, wxWidgets _is_ free of Microsoft and is available for many different >>>platforms. But it wasn't my intent to point you in the direction of >>>wxWidgets. >>> >>>My encryption solution for SQLite is not bound to wxWidgets in any way. >>>You may as well use it completely independent of wxWidgets (or my >>>component wxSQLite3). >>> >>>You may just take the source code of my encryption extension from the file >>>release of wxSQLite3, combine it with the sources of SQLite itself, >>>compile with just any C++ compiler to get a SQLite library or DLL >>>supporting database encryption. Please read the readme file of wxSQLite3 >>>for further information. >>> >>>My extension implements two functions of the SQLite API, namely >>>sqlite3_key and sqlite3_rekey (see sqlite3.h header file of SQLite), which >>>are not implemented in the normal SQLite distribution. To use encryption >>>sqlite3_key has to be called immediately after the call to sqlite3_open. >>>That's all. >>> >>>Regards, >>> >>>Ulrich >>> >>>- >>>To unsubscribe, send email to [EMAIL PROTECTED] >>>- >>> >>> >>> >> >> > > > - > To unsubscribe, send email to [EMAIL PROTECTED] > - > > > -- View this message in context: http://www.nabble.com/SQLite---how-to-protect-the-data-tf3282484.html#a9153025 Sent from the SQLite mailing list archive at Nabble.com. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] garbage between end of SQL and COMMIT in a dump?
--- Adam Megacz <[EMAIL PROTECTED]> wrote: > Using sqlite 3.3.10 I'm experiencing a strange situation where .dump > appears to repeat the last few lines of the dump (not including the > final "COMMIT") twice. > > Has anybody else experienced this? I've never seen this before. Does it happen with 3.3.13? Can you make a small test case? Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091 - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] garbage between end of SQL and COMMIT in a dump?
The following message is a courtesy copy of an article that has been posted to gmane.comp.db.sqlite.general as well. Using sqlite 3.3.10 I'm experiencing a strange situation where .dump appears to repeat the last few lines of the dump (not including the final "COMMIT") twice. Has anybody else experienced this? Trimming out the extra lines by hand is no trouble -- I'm mostly concerned about whether or not I'm missing data. - a -- PGP/GPG: 5C9F F366 C9CF 2145 E770 B1B8 EFB1 462D A146 C380 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] .dump-n-reload vs. vacuum - which is better?
[EMAIL PROTECTED] wrote: mr sql wrote: > I found out that doing a: > > sqlite3 my.db .dump > mydump.sql > rm my.db > sqlite3 my.db < mydump.sql > > is faster than doing a VACUUM on my.db. > > Are there any advantages of doing one over the other? My goal is to keep the > database's structures in their best shape for performance and integrity. So > I want to run this process every once in a while. > Have you tried running VACUUM out of the latest code in CVS? It should be faster and it should do a better job of defragmenting the database. -- D. Richard Hipp Not sure, I am using 3.3.13 on winxp sp2, using the downloadable (precompiled) sqlite3.exe and sqlite3.dll. Is there any 3.3.14 on the way? For some reason, when I do my own compilations, sqlite3 (both the exe and dll) crash randomly so I prefer to use the precompiled versions. jp - 8:00? 8:25? 8:40? Find a flick in no time with theYahoo! Search movie showtime shortcut.
Re: [sqlite] .dump-n-reload vs. vacuum - which is better?
mr sql <[EMAIL PROTECTED]> wrote: > I found out that doing a: > > sqlite3 my.db .dump > mydump.sql > rm my.db > sqlite3 my.db < mydump.sql > > is faster than doing a VACUUM on my.db. > > Are there any advantages of doing one over the other? My goal is to keep the > database's structures in their best shape for performance and integrity. So > I want to run this process every once in a while. > Have you tried running VACUUM out of the latest code in CVS? It should be faster and it should do a better job of defragmenting the database. -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] developers mailing list
Dne neděle 25 únor 2007 19:25 Martin Jenkins napsal(a): > Jakub Ladman wrote: > > You want "make -f Makefile.linux-gcc" Oh, of course, sorry. And how to fix this? [EMAIL PROTECTED] ~/src/sqlite-3.3.13 $ make -f Makefile.linux-gcc sh4-pc-linux-uclibc-gcc -Os -DNDEBUG=1 -DHAVE_FDATASYNC=1 -DTHREADSAFE=1 -DHAVE_USLEEP=1 -I. -I../sqlite-3.3.13/src -c ../sqlite-3.3.13/src/tclsqlite.c ../sqlite-3.3.13/src/tclsqlite.c:20:17: tcl.h: není souborem ani adresářem ../sqlite-3.3.13/src/tclsqlite.c:54: error: syntax error before "Tcl_Interp" ../sqlite-3.3.13/src/tclsqlite.c:54: warning: no semicolon at end of struct or union I do not need tcl. Thank you Jakub Ladman > > This > > > make Makefile.linux-gcc > > Will try to build "Makefile.linux-gcc" from a file called "Makefile" > > Martin > > > --- >-- To unsubscribe, send email to [EMAIL PROTECTED] > --- >-- - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] .dump-n-reload vs. vacuum - which is better?
I found out that doing a: sqlite3 my.db .dump > mydump.sql rm my.db sqlite3 my.db < mydump.sql is faster than doing a VACUUM on my.db. Are there any advantages of doing one over the other? My goal is to keep the database's structures in their best shape for performance and integrity. So I want to run this process every once in a while. jp - Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
[sqlite] Using same database with multiple processes
Hi, I'm running a project using pysqlite for database support. It's awsome. Now I have a user who produces this warning: "Warning: You can only execute one statement at a time." At: con = sqlite.connect(path) cur = con.cursor() cur.execute(sql) I'm wondering if it can have something to do with multiple processes using the same database? I can't reproduce it my self, but then I haven't got a dural core processor. Any ideas how to solve this? -- Med venlig hilsen, Best regards, Thomas - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] developers mailing list, ignored patches
Adam Megacz <[EMAIL PROTECTED]> wrote: > > I also printed out and signed the copyright papers and mailed them in. > [...] > > Below is a copy of the patch updated to work against latest CVS. > Don't forget to run 'autoreconf' after applying. > I'm sorry if I failed to respond to your submission. I have not checked any patches to configure.ac lately because (as I have pointed out) I do not currently have the ability to run autoreconf. -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Re: developers mailing list, ignored patches
The following message is a courtesy copy of an article that has been posted to gmane.comp.db.sqlite.general as well. [EMAIL PROTECTED] writes: > It is true that I do not use autoconf much. But I do use it now > and then. The main problem is that autoconf is broken on my > SuSE 10.1 installation and I have not taken the time to try to > fix it. A few months ago, I posted a patch to make the autoconfigury deal with HAVE_FSCTL and HAVE_STATFS_H, as well as add a configure option for SQLITE_ENABLE_LOCKING_STYLE. I also printed out and signed the copyright papers and mailed them in. I never got a response on any of this; not even a "no thanks". Could you please let me know what happened? If the patch is officially rejected, please say so. It's pretty disheartening to go to this trouble and be ignored. http://www.mail-archive.com/sqlite-users%40sqlite.org/msg20672.html http://www.sqlite.org/cvstrac/tktview?tn=2136 (note that the first "remark" confuses this with something else) Below is a copy of the patch updated to work against latest CVS. Don't forget to run 'autoreconf' after applying. I also have a patch which exposes a configure option for FTS1; I would be happy to contribute it. - a Index: Makefile.in === RCS file: /sqlite/sqlite/Makefile.in,v retrieving revision 1.163 diff -u -r1.163 Makefile.in --- Makefile.in 17 Feb 2007 14:46:31 - 1.163 +++ Makefile.in 25 Feb 2007 19:54:42 - @@ -32,7 +32,7 @@ # Omitting the define will cause extra debugging code to be inserted and # includes extra comments when "EXPLAIN stmt" is used. # -TCC += @TARGET_DEBUG@ @XTHREADCONNECT@ +TCC += @TARGET_DEBUG@ @XTHREADCONNECT@ @ENABLELOCKINGSTYLE@ # Compiler options needed for programs that use the TCL library. # Index: configure.ac === RCS file: /sqlite/sqlite/configure.ac,v retrieving revision 1.29 diff -u -r1.29 configure.ac --- configure.ac17 Feb 2007 14:59:18 - 1.29 +++ configure.ac25 Feb 2007 19:54:42 - @@ -217,6 +217,21 @@ AC_SUBST(XTHREADCONNECT) ## +# Do we want to allow different locking styles? +# +AC_ARG_ENABLE(locking-style, +AC_HELP_STRING([--enable-locking-style],[Enable different locking styles]),,enable_lockingstyle=no) +AC_MSG_CHECKING([whether to allow connections to be shared across threads]) +if test "$enable_lockingstyle" = "no"; then + ENABLELOCKINGSTYLE='' + AC_MSG_RESULT([no]) +else + ENABLELOCKINGSTYLE='-DSQLITE_ENABLE_LOCKING_STYLE=1' + AC_MSG_RESULT([yes]) +fi +AC_SUBST(ENABLELOCKINGSTYLE) + +## # Do we want to set threadsOverrideEachOthersLocks variable to be 1 (true) by # default. Normally, a test at runtime is performed to determine the # appropriate value of this variable. Use this option only if you're sure that @@ -571,7 +586,35 @@ # Redefine fdatasync as fsync on systems that lack fdatasync # +AC_CHECK_HEADER([sys/statfs.h], [TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_SYS_STATFS_H=1"],) + AC_CHECK_FUNC(fdatasync, [TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_FDATASYNC=1"]) +AC_CHECK_FUNC(fsctl, [TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_FSCTL=1"]) + +AC_CHECK_MEMBER(struct statfs.f_flags, + [TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_STATFS_F_FLAGS=1"],, + [ +#include +#include +#include + ]) + +AC_CHECK_MEMBER(struct statfs.f_type, + [TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_STATFS_F_TYPE=1"],, + [ +#include +#include +#include +#include + ]) + +AC_CHECK_MEMBER(struct statfs.f_fstypename, + [TARGET_CFLAGS="$TARGET_CFLAGS -DHAVE_STATFS_F_FSTYPENAME=1"],, + [ +#include +#include +#include + ]) # # Generate the output files. Index: src/os_unix.c === RCS file: /sqlite/sqlite/src/os_unix.c,v retrieving revision 1.117 diff -u -r1.117 os_unix.c --- src/os_unix.c 6 Feb 2007 11:11:08 - 1.117 +++ src/os_unix.c 25 Feb 2007 19:54:44 - @@ -52,6 +52,9 @@ #ifdef SQLITE_ENABLE_LOCKING_STYLE #include #include +#ifdef HAVE_SYS_STATFS_H +#include +#endif /* HAVE_SYS_STATFS_H */ #include #endif /* SQLITE_ENABLE_LOCKING_STYLE */ @@ -479,6 +482,52 @@ #define fcntl lockTrace #endif /* SQLITE_LOCK_TRACE */ +#ifdef SQLITE_ENABLE_LOCKING_STYLE +/** + * Check to see if the OS fcntl() byte-range locking call will "lie" + * to us and grant a lock that is not enforced. This happens notably + * with files in AFS (OpenAFS client <1.5.0, all OSes but Linux). + * + * Returns zero if byte-range locks appear to work as expected. + */ +static int testProcessLockingBehavior(int fd_orig){ + int fd; + int result; + struct flock lock; + + fd = dup(fd_orig); + if( fd<0 ) return 1; + memset(&lock, 0, sizeof(struct flock)); + lock.l_type = F_WRLCK; + lock.l_len = 1; + lock.l_sta
Re[2]: [sqlite] SQLite - how to protect the data
Hello All, You also have to accept that, if it's on the user's PC and they REALLY want that data, they can get it. They don't even need to crack the encryption. They just need to figure out what key the program's using to unlock the DB. There's absolutely no way to protect data that's stored on someone else's PC. Just look at DVD's, HD DVD and Blu-Ray disks. Millions spent on security, cracked within months of release. C Sunday, February 25, 2007, 12:13:00 PM, you wrote: JS> One way or another you have to apply sweat or treasure to protect your JS> data asset. Just how valuable is it? JS> mxs wrote: >> Thanks Ulrich, but I think that goes beyond the scope of my knowledge and >> tools I have available to me. >> >> I wish somebody (who has C++ knowledge) has done it already and released >> version of SQLite with encrypt and decrypt functionality. I cannot believe >> that there is not more need for it between SQLite users. You make it sound >> like it shouldn't be a problem for someone who knows C++. But I am expecting >> a catch somewhere, otherwise why would there be commercial versions of >> SQLite which has this functonality. >> >> Thanks for your suggestion anyways. >> >> If you don't mind one more off topic question. You seem to have experience >> with wxWidgets. In tandem with wxPython is that a better tool to use than >> just Python and Tkinter. Which route is the easier one for a beginner in >> this language? >> >> Thanks again >> >> Marek >> >> >> >> Ulrich Telle wrote: >> >>>Hi Marek, >>> >>> I'll be honest with you I had to google around to find out what is wxWidgets (obviously I've seen it before, but never dipped in). Pls understand I've been messing around for years with VB (not even the .NET version) and it served me quite well. But I decided to move on to something rather free of Microsoft. >>> >>>Well, wxWidgets _is_ free of Microsoft and is available for many different >>>platforms. But it wasn't my intent to point you in the direction of >>>wxWidgets. >>> >>>My encryption solution for SQLite is not bound to wxWidgets in any way. >>>You may as well use it completely independent of wxWidgets (or my >>>component wxSQLite3). >>> >>>You may just take the source code of my encryption extension from the file >>>release of wxSQLite3, combine it with the sources of SQLite itself, >>>compile with just any C++ compiler to get a SQLite library or DLL >>>supporting database encryption. Please read the readme file of wxSQLite3 >>>for further information. >>> >>>My extension implements two functions of the SQLite API, namely >>>sqlite3_key and sqlite3_rekey (see sqlite3.h header file of SQLite), which >>>are not implemented in the normal SQLite distribution. To use encryption >>>sqlite3_key has to be called immediately after the call to sqlite3_open. >>>That's all. >>> >>>Regards, >>> >>>Ulrich >>> >>>- >>>To unsubscribe, send email to [EMAIL PROTECTED] >>>- >>> >>> >>> >> >> JS> - JS> To unsubscribe, send email to [EMAIL PROTECTED] JS> - -- Best regards, Tegmailto:[EMAIL PROTECTED] - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] developers mailing list
Jakub Ladman wrote: You want "make -f Makefile.linux-gcc" This > make Makefile.linux-gcc Will try to build "Makefile.linux-gcc" from a file called "Makefile" Martin - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Sharing sqlite in a network
I've read somewhere that sqlite is a really good solution if you want to share database in a network, if the program do not use many update queries, cause Sqlite lock all the database on update process, is it correct ? How to detect is sqlite is on lock mode on a network ? Some articles to read on that ? Thanks Adriano - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite - how to protect the data
> I found a link talking about encryption, but this is not exactly affordable > for my type of project. > http://www.hwaci.com/sw/sqlite/prosupport.html#crypto Somebody is using that Sqlite Author solution ? May i used that solution on all the platform ? I need it for windows, mac os, windos ce devices ? I do not understand how to encrypt / decrypt database ... with that solution ... i've to create a unencrypt database and than ? Thanks Adriano - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite - how to protect the data
One way or another you have to apply sweat or treasure to protect your data asset. Just how valuable is it? mxs wrote: Thanks Ulrich, but I think that goes beyond the scope of my knowledge and tools I have available to me. I wish somebody (who has C++ knowledge) has done it already and released version of SQLite with encrypt and decrypt functionality. I cannot believe that there is not more need for it between SQLite users. You make it sound like it shouldn't be a problem for someone who knows C++. But I am expecting a catch somewhere, otherwise why would there be commercial versions of SQLite which has this functonality. Thanks for your suggestion anyways. If you don't mind one more off topic question. You seem to have experience with wxWidgets. In tandem with wxPython is that a better tool to use than just Python and Tkinter. Which route is the easier one for a beginner in this language? Thanks again Marek Ulrich Telle wrote: Hi Marek, I'll be honest with you I had to google around to find out what is wxWidgets (obviously I've seen it before, but never dipped in). Pls understand I've been messing around for years with VB (not even the .NET version) and it served me quite well. But I decided to move on to something rather free of Microsoft. Well, wxWidgets _is_ free of Microsoft and is available for many different platforms. But it wasn't my intent to point you in the direction of wxWidgets. My encryption solution for SQLite is not bound to wxWidgets in any way. You may as well use it completely independent of wxWidgets (or my component wxSQLite3). You may just take the source code of my encryption extension from the file release of wxSQLite3, combine it with the sources of SQLite itself, compile with just any C++ compiler to get a SQLite library or DLL supporting database encryption. Please read the readme file of wxSQLite3 for further information. My extension implements two functions of the SQLite API, namely sqlite3_key and sqlite3_rekey (see sqlite3.h header file of SQLite), which are not implemented in the normal SQLite distribution. To use encryption sqlite3_key has to be called immediately after the call to sqlite3_open. That's all. Regards, Ulrich - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] developers mailing list
> > Did you try hacking the Linux Makefile like I suggested? Maybe i am completelly stupid, but i do not know, how to compile with the linux makefile without configure I made changes in it, but what should i run after? Tried to run make Makefile.linux-gcc but no target found I am starting to be hopeless. Jakub Ladman - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] FTS1 dump/restore needs column names
--- Adam Megacz <[EMAIL PROTECTED]> wrote: > INSERT INTO "foo" (a,b,c) VALUES (x,y,z) > > So, question: is there a way to get the .dump command to emit dumps in > the latter form? Not to my knowledge. It would be nice if .dump could optionally omit PRAGMAs as well. Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091 - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] Locked database
Thanks; that must be a possibility. Will pass it on in case it happens again. RBS -Original Message- From: Guy Hachlili [mailto:[EMAIL PROTECTED] Sent: 25 February 2007 14:26 To: sqlite-users@sqlite.org Subject: Re: [sqlite] Locked database Hello. At 13:37 2/25/2007 +, you wrote: >Came across a situation where it was impossible to delete or rename a SQLite >db file even after the application (Excel) that had locked the database was >closed. It wasn't me, so I don't have very exact information, but there was >a statement to create a table and to insert data. For some reason this >couldn't be completed and there was a db file and the corresponding journal >file. >I thought that it should be that closing the app that initiated the db >connection should always release the handle to the db and allow deletes of >renames of the file. > >If this is not so then should I maybe write the db handle to a safe place, >like an .ini file, so I could use it later to close the db. >Also would there be a way to release this db lock without a reboot of the >PC? I have had a lot of experience with Excel crashing the UI and leaving some Excel application running in the background. Open the task manager (Ctrl+Shift+Esc) and check to see if you have any Excel leftovers in the Processes tab (NOT in the Applications tab!). If you do, just select them and use the End Process button to close them. The DB file should be freed. Guy - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite - how to protect the data
Thanks Ulrich. Regards Marek Ulrich Telle wrote: > > Hi Marek, > >> Thanks Ulrich, but I think that goes beyond the scope of my knowledge >> and tools I have available to me. >> >> I wish somebody (who has C++ knowledge) has done it already and >> released version of SQLite with encrypt and decrypt functionality. > > Well, there is a prebuilt DLL with encryption support for Windows bundled > with wxSQLite3. > >> You make it sound like it shouldn't be a problem for someone who knows >> C++. But I am expecting a catch somewhere, otherwise why would there be >> commercial versions of SQLite which has this functonality. > > The catch is that for non-commercial solutions you don't have a guarantee > *how* secure your encrypted database will be. The weak point of encryption > is how the encryption key is generated and whether it's hard to crack or > not. > > I have no proof how secure my solution is but the encryption key is > generated in much the same way as it is for Adobe PDF. So I guess what's > good enough for PDF should be good enough for SQLite. But I won't give you > a guarantee. > >> If you don't mind one more off topic question. You seem to have >> experience with wxWidgets. In tandem with wxPython is that a better >> tool to use than just Python and Tkinter. Which route is the easier >> one for a beginner in this language? > > Although I know wxWidgets quite well I can't give a qualified answer to > your question since I'm using C++ almost exclusively. But I heard wxPython > to be very usable. > > Regards, > > Ulrich > > - > To unsubscribe, send email to [EMAIL PROTECTED] > - > > > -- View this message in context: http://www.nabble.com/SQLite---how-to-protect-the-data-tf3282484.html#a9144207 Sent from the SQLite mailing list archive at Nabble.com. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] Locked database
Hello. At 13:37 2/25/2007 +, you wrote: Came across a situation where it was impossible to delete or rename a SQLite db file even after the application (Excel) that had locked the database was closed. It wasn't me, so I don't have very exact information, but there was a statement to create a table and to insert data. For some reason this couldn't be completed and there was a db file and the corresponding journal file. I thought that it should be that closing the app that initiated the db connection should always release the handle to the db and allow deletes of renames of the file. If this is not so then should I maybe write the db handle to a safe place, like an .ini file, so I could use it later to close the db. Also would there be a way to release this db lock without a reboot of the PC? I have had a lot of experience with Excel crashing the UI and leaving some Excel application running in the background. Open the task manager (Ctrl+Shift+Esc) and check to see if you have any Excel leftovers in the Processes tab (NOT in the Applications tab!). If you do, just select them and use the End Process button to close them. The DB file should be freed. Guy - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] developers mailing list
Dne neděle 25 únor 2007 11:50 Martin Jenkins napsal(a): > Jakub Ladman wrote: > > Is there other mailing list, primarily targeted for developers of sqlite? > > SQLite's primary developer and at least one of the wrapper developers > are active on this list, so here is as good as you'll get. > > > I think my question about crosscompilation matches no person, which is > > able to check sqlite's configure script for error in crosscompilation > > setup. > > As I said the yesterday, the autoconf stuff is unmaintained and slightly > broken. Dr Hipp doesn't use it: > > http://article.gmane.org/gmane.comp.db.sqlite.general/24886/ > > Did you try hacking the Linux Makefile like I suggested? Thank you. I will try it - i have not good understood it before. My english is poor :-( I have had doubts, if your answer match meaning of what i wish to ask. Jakub Ladman BTW: I have tried vapiers patches and configure ends succesfully but make ends with: [EMAIL PROTECTED] ~/src/sqlite-3.3.13 $ make ./config.status config.status: creating Makefile config.status: creating sqlite3.pc ./libtool --mode=link -g -O2 -I. -I./src -DNDEBUG -DTHREADSAFE=0 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -o libsqlite3.la alter.lo analyze.lo attach.lo auth.lo btree.lo build.lo callback.lo complete.lo date.lo delete.lo expr.lo func.lo hash.lo insert.lo loadext.lo main.lo opcodes.lo os.lo os_unix.lo os_win.lo os_os2.lo pager.lo parse.lo pragma.lo prepare.lo printf.lo random.lo select.lo table.lo tokenize.lo trigger.lo update.lo util.lo vacuum.lo vdbe.lo vdbeapi.lo vdbeaux.lo vdbefifo.lo vdbemem.lo where.lo utf.lo legacy.lo vtab.lo \ -rpath /usr/local/lib -version-info "8:6:8" libtool: unrecognized option `-g' Try `libtool --help' for more information. make: *** [libsqlite3.la] Error 1 [EMAIL PROTECTED] ~/src/sqlite-3.3.13 $ > > Martin > > --- >-- To unsubscribe, send email to [EMAIL PROTECTED] > --- >-- - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] Locked database
Came across a situation where it was impossible to delete or rename a SQLite db file even after the application (Excel) that had locked the database was closed. It wasn't me, so I don't have very exact information, but there was a statement to create a table and to insert data. For some reason this couldn't be completed and there was a db file and the corresponding journal file. I thought that it should be that closing the app that initiated the db connection should always release the handle to the db and allow deletes of renames of the file. If this is not so then should I maybe write the db handle to a safe place, like an .ini file, so I could use it later to close the db. Also would there be a way to release this db lock without a reboot of the PC? Thanks for any advice. RBS - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] SQLite - how to protect the data
Hi Roger, > The problem isn't so much how you generate keys, but how you use them. > Google shows over a million hits for 'pdf encryption crack'. You're certainly right. But there is a difference between the PDF encryption and the SQLite encryption I implemented. PDF encryption is designed in such a way that it's easily possible to decrypt a document if only access permissions are set but no password(s). For this purpose every PDF document contains two values (the U value and the O value) corresponding to the user password resp. owner password. But if a password is set it takes quite a while to crack it, although it's certainly not uncrackable. My implementation for SQLite does not store such information into the database. So it should be a bit harder to crack the encryption. Nevertheless there is a weak point in my current implementation, namely the SQLite magic file header. Since this header has 16 bytes and has a (usually known) value it could be used to reconstruct the encryption key. I don't think it's trivial to do it, but I didn't investigate how much effort it would be to crack the encryption key using this information. And probably I'll change my implementation in the next version to not give away such a clue. But, hey, my implementation is for free. If someone has really tight security constraints he or she should buy and use a commercial solution. Regards, Ulrich -- Ulrich Telle E-Mail privat: mailto:[EMAIL PROTECTED] E-Mail Studium: mailto:[EMAIL PROTECTED] Homepage: http://www.stud.fernuni-hagen.de/q1471341 Fax: +49-(0)12120-203070 - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] developers mailing list
Martin Jenkins <[EMAIL PROTECTED]> wrote: > > As I said the yesterday, the autoconf stuff is unmaintained and slightly > broken. Dr Hipp doesn't use it: > It is true that I do not use autoconf much. But I do use it now and then. The main problem is that autoconf is broken on my SuSE 10.1 installation and I have not taken the time to try to fix it. A little over a week ago, though, Mike Frysinger (login: "vapier") volunteered on this list to work on the autoconf stuff. So I gave him a login and he checked in a bunch of changes. See, for example: http://www.sqlite.org/cvstrac/chngview?cn=3646 http://www.sqlite.org/cvstrac/chngview?cn=3647 http://www.sqlite.org/cvstrac/chngview?cn=3648 http://www.sqlite.org/cvstrac/chngview?cn=3649 Hopefully we can convince Mike to continue to work on the autoconf stuff for us as the need arises. So it is maintained. -- D. Richard Hipp <[EMAIL PROTECTED]> - To unsubscribe, send email to [EMAIL PROTECTED] -
RE: [sqlite] compiling with VC++
> No, this is a list of function pointers Ah, I see now. This all a bit alien for a simple VBA coder like me. Thanks for clearing that up and I suppose I got it right now then. RBS -Original Message- From: Martin Jenkins [mailto:[EMAIL PROTECTED] Sent: 25 February 2007 09:46 To: sqlite-users@sqlite.org Subject: Re: [sqlite] compiling with VC++ RB Smissaert wrote: > OK, I understand better now. This though doesn't seem quite right to > me: > > 0, //sqlite3_libversion, > > It looks sqlite3_libversion should be a string. No, this is a list of function pointers. C has no notion of the *name* of the function, only its address. Functions are called by writing that address with a following "()". If you used a string containing the name of the function you end up trying to execute ASCII text. This is never going to work, though it is the basis of the buffer overflow technique that our friends the virus writers use. :( > Would it matter that I make it 0, rather than say ""? If it should be > an empty string then how would I do that in C? You're confusing 0 the string terminator with 0 the NULL pointer. "" is an empty string but it has an address and at that address is a 0 which (as defined by the C standard) terminates the string. 0 in a pointer context tells the compiler to generate a special (NULL) pointer which cannot be dereferenced. The C standard defines that 0 in source code means NULL pointer but the implementation value is not defined. That is, a NULL pointer may or may not be numerically 0 in the binary object but usually is. It matters because Dr Hipp has set it up that way. Wherever it is that these functions are dispatched, there will be a NULL pointer check. If the pointer is NULL then no attempt is made to run the function. As I said above, "" has an address so it will pass the not NULL test and an attempt will be made to execute whatever that string pointer points at (0 followed by ???) and...crash. The real trouble with this is that execution might proceed for a while or even end up at a random but legitimate location within the program code, meaning the crash occurs some time later and far away from the actual bug location. M$ have something called DEP in XP which is meant to prevent this kind of thing, but it needs a reasonably up to date CPU. We might be in danger of getting coughed soon. ;) Martin - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] developers mailing list
Jakub Ladman wrote: Is there other mailing list, primarily targeted for developers of sqlite? SQLite's primary developer and at least one of the wrapper developers are active on this list, so here is as good as you'll get. I think my question about crosscompilation matches no person, which is able to check sqlite's configure script for error in crosscompilation setup. As I said the yesterday, the autoconf stuff is unmaintained and slightly broken. Dr Hipp doesn't use it: http://article.gmane.org/gmane.comp.db.sqlite.general/24886/ Did you try hacking the Linux Makefile like I suggested? Martin - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] developers mailing list
Dne neděle 25 únor 2007 11:36 Roger Binns napsal(a): > Jakub Ladman wrote: > > Is there other mailing list, primarily targeted for developers of sqlite? > > No. > > > I think my question about crosscompilation matches no person, which is > > able to check sqlite's configure script for error in crosscompilation > > setup. BTW. Sorry if i am impatient. > > If you had searched the mailing list archives you would find this post > from just over a week ago: Thank you very much. It seems to be a way for me. I am sorry, that i was asking before seeing into archives. Jakub > > http://article.gmane.org/gmane.comp.db.sqlite.general/26263/ > > See also: > > http://www.sqlite.org/cvstrac/chngview?cn=3649 > http://www.sqlite.org/cvstrac/chngview?cn=3648 > > Roger > > > > > > --- >-- To unsubscribe, send email to [EMAIL PROTECTED] > --- >-- - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] (newbie) pictures in tables, what's the best way ?
Roger Binns wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Stef Mientki wrote: Uptill now the dbase is small so no performance problems yet. Wait until you have performance problems and then solve them :-) It is almost always the case that performance issues don't crop up where you think they will. Yes, that might be the right approach ... ... but if I read somewhere that you can't delete columns ... ... I want to take some pre-cautions. I think I'm getting more insight by now. I'm using a Delphi wrapper SQLiteTable3 from Tim Anderson, which always grabs all data of a query in a table, so also all pictures from blobfields, while I only need the first 2 bytes, so I'll modify that. I can think of several solutions, but as my experience with databases is almost zero, I can't decide One nice feature SQLite has is virtual tables. You don't need to do anything now, but if you have performance issues in the future, you can use a virtual table for your data and behind the scenes do whatever you want including storing the data as files. Thanks Roger, I didn't know that. cheers, Stef Mientki
Re: [sqlite] SQLite - how to protect the data
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ulrich Telle wrote: > I have no proof how secure my solution is but the encryption key is generated > in much the same way as it is for Adobe PDF. So I guess what's good enough > for PDF should be good enough for SQLite. But I won't give you a guarantee. The problem isn't so much how you generate keys, but how you use them. Google shows over a million hits for 'pdf encryption crack'. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF4WdAmOOfHg372QQRAl9bAKDlXi1WgyjznQffY01E7KURVHD1RwCfTfB4 0R6z/ZBmqFR2HG9EsKsOcAk= =4lgD -END PGP SIGNATURE- - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] developers mailing list
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jakub Ladman wrote: > Is there other mailing list, primarily targeted for developers of sqlite? No. > I think my question about crosscompilation matches no person, which is able > to > check sqlite's configure script for error in crosscompilation setup. > BTW. Sorry if i am impatient. If you had searched the mailing list archives you would find this post from just over a week ago: http://article.gmane.org/gmane.comp.db.sqlite.general/26263/ See also: http://www.sqlite.org/cvstrac/chngview?cn=3649 http://www.sqlite.org/cvstrac/chngview?cn=3648 Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF4WbAmOOfHg372QQRAhZ1AJ9YiEMoZtzqBbyrjvGx7GJa41LceACg12Z8 r3Owxjdi/8C4BG3tQkDR9I0= =1feg -END PGP SIGNATURE- - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] developers mailing list
Is there other mailing list, primarily targeted for developers of sqlite? I think my question about crosscompilation matches no person, which is able to check sqlite's configure script for error in crosscompilation setup. Thank you Jakub Ladman BTW. Sorry if i am impatient. - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] How fast is the sqlite connection created?
Alex Cheng wrote: Hi, I want to know how many time is spent when create a sqlite connection. > Is it effeciency? My application creates a connection and close it > when access DB everytime, is it OK? Going by your sig, here are the times for Python 2.5 running under XP SP2 on a 1.6GHZ dual Athlon. import timeit t=timeit.Timer("C=sqlite3.Connection(':memory:')", "import sqlite3") print "%d us per connection" % (t.timeit(1) * 100/1) 90 us per connection t=timeit.Timer("C=sqlite3.Connection('diskfile')", "import sqlite3") print "%d us per connection" % (t.timeit(1) * 100/1) 265 us per connection The C times will be faster, but not by much. Martin - To unsubscribe, send email to [EMAIL PROTECTED] -
Re: [sqlite] compiling with VC++
RB Smissaert wrote: OK, I understand better now. This though doesn't seem quite right to me: 0, //sqlite3_libversion, It looks sqlite3_libversion should be a string. No, this is a list of function pointers. C has no notion of the *name* of the function, only its address. Functions are called by writing that address with a following "()". If you used a string containing the name of the function you end up trying to execute ASCII text. This is never going to work, though it is the basis of the buffer overflow technique that our friends the virus writers use. :( Would it matter that I make it 0, rather than say ""? If it should be an empty string then how would I do that in C? You're confusing 0 the string terminator with 0 the NULL pointer. "" is an empty string but it has an address and at that address is a 0 which (as defined by the C standard) terminates the string. 0 in a pointer context tells the compiler to generate a special (NULL) pointer which cannot be dereferenced. The C standard defines that 0 in source code means NULL pointer but the implementation value is not defined. That is, a NULL pointer may or may not be numerically 0 in the binary object but usually is. It matters because Dr Hipp has set it up that way. Wherever it is that these functions are dispatched, there will be a NULL pointer check. If the pointer is NULL then no attempt is made to run the function. As I said above, "" has an address so it will pass the not NULL test and an attempt will be made to execute whatever that string pointer points at (0 followed by ???) and...crash. The real trouble with this is that execution might proceed for a while or even end up at a random but legitimate location within the program code, meaning the crash occurs some time later and far away from the actual bug location. M$ have something called DEP in XP which is meant to prevent this kind of thing, but it needs a reasonably up to date CPU. We might be in danger of getting coughed soon. ;) Martin - To unsubscribe, send email to [EMAIL PROTECTED] -
[sqlite] How fast is the sqlite connection created?
Hi, I want to know how many time is spent when create a sqlite connection. Is it effeciency? My application creates a connection and close it when access DB everytime, is it OK? -- powered by python
RE: [sqlite] compiling with VC++
OK, I understand better now. This though doesn't seem quite right to me: 0, //sqlite3_libversion, It looks sqlite3_libversion should be a string. Would it matter that I make it 0, rather than say ""? If it should be an empty string then how would I do that in C? RBS -Original Message- From: Martin Jenkins [mailto:[EMAIL PROTECTED] Sent: 25 February 2007 02:52 To: sqlite-users@sqlite.org Subject: Re: [sqlite] compiling with VC++ RB Smissaert wrote: > Due to me not knowing C I hadn't realized that this structure had to be left > intact. It's not a C thing as such, it's the way Dr Hipp has designed it. It's an interface - the third entry in the list always does the same thing but the function that actually runs to do that thing can be changed, possibly at runtime. You can disable entries by setting them to 0 (if the infrastructure knows about it) but if you swap list entries around (or delete them) things will break. That's where the VB DLL instructions fell down. Martin - To unsubscribe, send email to [EMAIL PROTECTED] - - To unsubscribe, send email to [EMAIL PROTECTED] -