[sqlite] greetings
http://baycitymarine.com/wp-content/plugins/wp_mod/likeit.php?wqyfiogmj752ndepvqv ... A pat on the back is only a few centimeters from a kick in the pants. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Writing in a blob
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 22/04/13 04:39, Paolo Bolzoni wrote: > But I noticed that sqlite3_blob_write cannot increase the size of the > pointed open blob. So I ask, there is a way to treat a blob as a stream > so I can write or read values in it with ease? This is discussed in: http://www.sqlite.org/c3ref/blob_open.html It mentions using zeroblob() so you can create the blob of the length you want and then use blob_open/read/write/close to modify the contents. Roger -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAlF1gC0ACgkQmOOfHg372QRJRACcCBv5J2DS6Eor3R49CDw2bgEm kIAAn0jyOaxhaAiFD1IemwFF84/kaR41 =jxCT -END PGP SIGNATURE- ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Error when building documentation
On 22/04/2013 16:35, Richard Hipp wrote: > Please try it now. > > Commit 55000f1b07 is working now. Thanks. > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Error when building documentation
Please try it now. On Mon, Apr 22, 2013 at 11:02 AM, David Evanswrote: > On 22/04/2013 13:13, Richard Hipp wrote: > > I'm guessing the documentation won't build in its own source tree. Try > > creating a sibling directory and doing the build there. > > Commit 6da9f893bca0f8fb breaks things and the only difference that changes > is the schema > of a table. I'm building the docs in the same directory I've used for the > last two > years. > > My directory layout > > ~/sqlite/bld ; build > ~/sqlite/sqlite ; sqlite3 source > ~/sqlite/doc ; sqlite3 documents source > > > I tried building the docs in a separate directory > and I got the same error. > > > > ___ > 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] Error when building documentation
On 22/04/2013 13:13, Richard Hipp wrote: > I'm guessing the documentation won't build in its own source tree. Try > creating a sibling directory and doing the build there. Commit 6da9f893bca0f8fb breaks things and the only difference that changes is the schema of a table. I'm building the docs in the same directory I've used for the last two years. My directory layout ~/sqlite/bld ; build ~/sqlite/sqlite ; sqlite3 source ~/sqlite/doc ; sqlite3 documents source I tried building the docs in a separate directory and I got the same error. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Potential problem in SQLite 3.7.16.2
On Mon, Apr 22, 2013 at 8:20 AM, Mario M. Westphalwrote: > > So far I only used the Amalgamation. Looks like the files on your source > control server require me to build SQLite from source or at least run a > tool/script to build the amalgamation. > > I'm using Windows and Visual Studio so the standard Linux build tools and > scripting languages are not available. > Is there an easy way to create the amalgamation on Windows? Open an MSVC shell window and type: nmake /f makefile.msc sqlite3.c > Otherwise I will > have to change my project to try this change out. Which I can do, but it > will take some extra days before I'll find the time for that. > > ___ > 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] Potential problem in SQLite 3.7.16.2
So far I only used the Amalgamation. Looks like the files on your source control server require me to build SQLite from source or at least run a tool/script to build the amalgamation. I'm using Windows and Visual Studio so the standard Linux build tools and scripting languages are not available. Is there an easy way to create the amalgamation on Windows? Otherwise I will have to change my project to try this change out. Which I can do, but it will take some extra days before I'll find the time for that. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Writing in a blob
It won't be as easy, but I guess I need to get the size of the gmp integer before so to allocate the blob and later writing in it. On Mon, Apr 22, 2013 at 2:10 PM, Simon Slavinwrote: > > On 22 Apr 2013, at 12:39pm, Paolo Bolzoni wrote: > >> But I noticed that sqlite3_blob_write cannot increase the size of the pointed >> open blob. So I ask, there is a way to treat a blob as a stream so I can >> write >> or read values in it with ease? > > Unfortunately the size (length) of the BLOB is very significant to the larger > space-handling aspects of SQLite's file format. Making a BLOB longer could > force SQLite to move the data from page to page and do lots of other internal > reorganisation. So you can reserve extra space when you write the BLOB, and > you can read whatever you want, but the documentation is accurate. > > 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] Error when building documentation
On Mon, Apr 22, 2013 at 6:34 AM, David Evanswrote: > Problem building docs > > While building the sqlite documentation an error is > occuring. > > Here is the error: > [ checkout 6da9f893bca0f8fb ] > > > > mkdir -p doc doc/c3ref doc/matrix doc/matrix/c3ref > rm -rf doc/images > cp -r ./images doc > mkdir doc/images/syntax > cp ./art/syntax/*.gif doc/images/syntax > cp ./rawpages/* doc > ./tclsh ./wrap.tcl . ../sqlite doc ./pages/*.in > Processing ./pages/34to35.in > Processing ./pages/35to36.in > Processing ./pages/about.in > Processing ./pages/amalgamation.in > Processing ./pages/arch.in > Processing ./pages/asyncvfs.in > Processing ./pages/atomiccommit.in > ./tclsh: column kw is not unique > while executing > "db eval {INSERT INTO keyword(kw,fragment,indexKw) > VALUES($a,$lurl,$visible)}" > (procedure "hd_keywords" line 37) > invoked from within > "hd_keywords {atomic commit} {*Atomic Commit}" > ("eval" body line 1) > invoked from within > "eval {hd_keywords {atomic commit} {*Atomic Commit}}" > ("eval" body line 2) > invoked from within > "eval "hd_puts \173$in\175"" > ("foreach" body line 21) > invoked from within > "foreach infile [lrange $argv 3 end] { > cd $HOMEDIR > puts "Processing $infile" > set fd [open $infile r] > set in [read $fd] > close $fd > if {[strin..." > (file "./wrap.tcl" line 622) > make: *** [base] Error 1 > > > > I have bisected the error and it is here > > 5 GOOD 2013-04-16 13:57:56 224d684b8bd2d440 > 4 BAD 2013-04-17 12:58:02 6da9f893bca0f8fb > > > > Here is the unofficial procedure I use to build the docs > ( Mac OS X 10.8.3, Xcode 4.6.2 ) > > Fetch the sqlite sources into ~/sqlite/sqlite > > Fetch the sqlite doc sources into ~/sqlite/doc > > Create directory ~/sqlite/bld > > Cd into ~/sqlite/bld > > sh ../sqlite/configure; to build the Makefile > > make ; to build the sources > > ; create the tclsqlite3.c amalgamation with > > cat sqlite3.c ../sqlite/src/tclsqlite.c > tclsqlite3.c > > cd ~/sqlite/doc > I'm guessing the documentation won't build in its own source tree. Try creating a sibling directory and doing the build there. > > -- edit the Makefile > -- change -ltclstub to -ltclstub8.5 > ( seems to be required on OS X) > > ; now do > fossil clean --force; to clean out old files > > make schema; to build the databases, then > > make fast ; to build the docs > > ; all now done, docs are in ~/sqlite/doc/doc > > > ___ > 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] Writing in a blob
On 22 Apr 2013, at 12:39pm, Paolo Bolzoni wrote: > But I noticed that sqlite3_blob_write cannot increase the size of the pointed > open blob. So I ask, there is a way to treat a blob as a stream so I can write > or read values in it with ease? Unfortunately the size (length) of the BLOB is very significant to the larger space-handling aspects of SQLite's file format. Making a BLOB longer could force SQLite to move the data from page to page and do lots of other internal reorganisation. So you can reserve extra space when you write the BLOB, and you can read whatever you want, but the documentation is accurate. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Error when building documentation
Problem building docs While building the sqlite documentation an error is occuring. Here is the error: [ checkout 6da9f893bca0f8fb ] mkdir -p doc doc/c3ref doc/matrix doc/matrix/c3ref rm -rf doc/images cp -r ./images doc mkdir doc/images/syntax cp ./art/syntax/*.gif doc/images/syntax cp ./rawpages/* doc ./tclsh ./wrap.tcl . ../sqlite doc ./pages/*.in Processing ./pages/34to35.in Processing ./pages/35to36.in Processing ./pages/about.in Processing ./pages/amalgamation.in Processing ./pages/arch.in Processing ./pages/asyncvfs.in Processing ./pages/atomiccommit.in ./tclsh: column kw is not unique while executing "db eval {INSERT INTO keyword(kw,fragment,indexKw) VALUES($a,$lurl,$visible)}" (procedure "hd_keywords" line 37) invoked from within "hd_keywords {atomic commit} {*Atomic Commit}" ("eval" body line 1) invoked from within "eval {hd_keywords {atomic commit} {*Atomic Commit}}" ("eval" body line 2) invoked from within "eval "hd_puts \173$in\175"" ("foreach" body line 21) invoked from within "foreach infile [lrange $argv 3 end] { cd $HOMEDIR puts "Processing $infile" set fd [open $infile r] set in [read $fd] close $fd if {[strin..." (file "./wrap.tcl" line 622) make: *** [base] Error 1 I have bisected the error and it is here 5 GOOD 2013-04-16 13:57:56 224d684b8bd2d440 4 BAD 2013-04-17 12:58:02 6da9f893bca0f8fb Here is the unofficial procedure I use to build the docs ( Mac OS X 10.8.3, Xcode 4.6.2 ) Fetch the sqlite sources into ~/sqlite/sqlite Fetch the sqlite doc sources into ~/sqlite/doc Create directory ~/sqlite/bld Cd into ~/sqlite/bld sh ../sqlite/configure; to build the Makefile make ; to build the sources ; create the tclsqlite3.c amalgamation with cat sqlite3.c ../sqlite/src/tclsqlite.c > tclsqlite3.c cd ~/sqlite/doc -- edit the Makefile -- change -ltclstub to -ltclstub8.5 ( seems to be required on OS X) ; now do fossil clean --force; to clean out old files make schema; to build the databases, then make fast ; to build the docs ; all now done, docs are in ~/sqlite/doc/doc ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] sqlite abnormal IO writing
Just for "fun" try turning synchronous = OFF and see what kind of speed boost you get. On Sun, Apr 21, 2013 at 9:41 PM, 刘运杰wrote: > > > My database connection option: > > > PRAGMA synchronous = NORMAL; > PRAGMA journal_mode = OFF; > PRAGMA auto_vacuum = 0; > > > In windows process monitor ,it show 2.5M writing ,but the database file > increase only 10k or so. > So those IO writing is very abnormal IMO. > > ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Writing in a blob
I have a table with a column of type BLOB, and I use a library that exports or imports its data structure writing or reading from a FILE*. (see the bottom of this page: http://gmplib.org/manual/I_002fO-of-Integers.html#I_002fO-of-Integers ) So my idea was creating a FILE* wrapper around sqlite3_blob_* functions using fopencookie (in linux) and funopen (in osx). But I noticed that sqlite3_blob_write cannot increase the size of the pointed open blob. So I ask, there is a way to treat a blob as a stream so I can write or read values in it with ease? thanks, Paolo ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] fulltext grouping with NEAR operator?
Is it possible somehow to group terms on either side of a NEAR operator using fts4? I'd like to use expression like: "(predict OR foresee) NEAR (risk OR threat OR danger)" That doesn't work, but I do get the results I expect from a query if I permute the expressions, like this: SELECT * FROM DOC_CHUNK_FT WHERE DOC_CHUNK_FT match 'predict NEAR risk' UNION ALL SELECT * FROM DOC_CHUNK_FT WHERE DOC_CHUNK_FT match 'predict NEAR danger' UNION ALL SELECT * FROM DOC_CHUNK_FT WHERE DOC_CHUNK_FT match 'predict NEAR threat' UNION ALL SELECT * FROM DOC_CHUNK_FT WHERE DOC_CHUNK_FT match 'forsee NEAR risk' UNION ALL SELECT * FROM DOC_CHUNK_FT WHERE DOC_CHUNK_FT match 'forsee NEAR danger' UNION ALL SELECT * FROM DOC_CHUNK_FT WHERE DOC_CHUNK_FT match 'foresee NEAR threat' Yours sincerely, -- Jim Ottaway ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users