[sqlite] 100% CPU utilization sqlite running in VMWare
Have a market data extractor running tick tapes and saving data to sqlite db. All coded in C++ and previously ran fine and fast on bare metal. Processes tick tapes from NAS and saved to local sqlite db's on c drive. We moved program onto VMWare VM's... same nas tick tapes. Writing db's to a share. On a 4 core vm we can run 3 extractors concurrently at 25 - 75% CPU utilization. The 4th pegs the CPU at 100% Same on an 8 core VM ... seems we can run Cores - 1 without pegging the CPU. The memory footprint for the program is a tiny 9mb... On bare metal we can run 20 extractors concurrently. Looking for suggestions on how to optimize for VMware. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Select into outfile C API
On 6/4/2012 3:48 PM, Patrick wrote: Is their a syntax similar to mysql's 'SELECT INTO OUTFILE' in the C API? No. But in your C program, you can always write code that reads results from SQLite, then writes them to a file in the format of your choice. I see the sqlite3 binary has an interactive .output parameter. It contains code that does exactly what I've described. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Select into outfile C API
On 4 Jun 2012, at 8:48pm, Patrickwrote: > Is their a syntax similar to mysql's 'SELECT INTO OUTFILE' in the C API? > I see the sqlite3 binary has an interactive .output parameter. Anything > similar in the C API? Nope. Sorry. You have to write your own C code to output to a file. The '.output' depends on code in the shell tool, it doesn't trigger a part of the API. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Select into outfile C API
Is their a syntax similar to mysql's 'SELECT INTO OUTFILE' in the C API? I see the sqlite3 binary has an interactive .output parameter. Anything similar in the C API? TIA Pat... ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] group_concat() on a JOIN problem
On Mon, Jun 04, 2012 at 09:13:51PM +0200, Gert Van Assche scratched on the wall: > SELECT DISTINCT > group_concat( [TB].[F2],' ') AS [Groep] > FROM [TA] JOIN [TB] ON [TA].[Groep] = [TB].[Groep]; > > I get this as a result: > Groep > 1 2 *3 3* > > but I would like to get > Groep > 1 2 *3* > > I'm sure the JOIN is causing this doubling of elements in the grouped > result. Yes, there will be two "3" rows returned, which are then fed into the group_concat() aggregate. The result is only one row, however, so it is always distinct. > Is there a way I could achieve this? You want the DISTINCT on the aggregate, not the result set: SELECT group_concat( DISTINCT TB.F2, ' ' ) AS -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] group_concat() on a JOIN problem
> SELECT DISTINCT > group_concat( [TB].[F2],' ') AS [Groep] > FROM [TA] JOIN [TB] ON [TA].[Groep] = [TB].[Groep]; You probably want to do the following here: SELECT group_concat([F2],' ') AS [Groep] FROM ( SELECT DISTINCT [TB].[F2] AS [F2] FROM [TA] JOIN [TB] ON [TA].[Groep] = [TB].[Groep] ); Pavel On Mon, Jun 4, 2012 at 3:13 PM, Gert Van Asschewrote: > All, > > I'm sure this is not an SQLite bug, but I hope I can get rid of it: > > CREATE TABLE "TA"([Groep], F1); > CREATE TABLE "TB"([Groep], F2); > > INSERT INTO [TA]([Groep], [F1]) VALUES('1', 'ABC'); > INSERT INTO [TA]([Groep], [F1]) VALUES('2', 'DE'); > INSERT INTO [TA]([Groep], [F1]) VALUES('3', 'F'); > INSERT INTO [TA]([Groep], [F1]) VALUES('3', 'G'); > > INSERT INTO [TB]([Groep], [F2]) VALUES('1', '1'); > INSERT INTO [TB]([Groep], [F2]) VALUES('2', '2'); > INSERT INTO [TB]([Groep], [F2]) VALUES('3', '3'); > > SELECT DISTINCT > group_concat( [TB].[F2],' ') AS [Groep] > FROM [TA] JOIN [TB] ON [TA].[Groep] = [TB].[Groep]; > > I get this as a result: > Groep > 1 2 *3 3* > > but I would like to get > Groep > 1 2 *3* > > I'm sure the JOIN is causing this doubling of elements in the grouped > result. > Is there a way I could achieve this? > > > thanks > > > Gert > ___ > 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] group_concat() on a JOIN problem
All, I'm sure this is not an SQLite bug, but I hope I can get rid of it: CREATE TABLE "TA"([Groep], F1); CREATE TABLE "TB"([Groep], F2); INSERT INTO [TA]([Groep], [F1]) VALUES('1', 'ABC'); INSERT INTO [TA]([Groep], [F1]) VALUES('2', 'DE'); INSERT INTO [TA]([Groep], [F1]) VALUES('3', 'F'); INSERT INTO [TA]([Groep], [F1]) VALUES('3', 'G'); INSERT INTO [TB]([Groep], [F2]) VALUES('1', '1'); INSERT INTO [TB]([Groep], [F2]) VALUES('2', '2'); INSERT INTO [TB]([Groep], [F2]) VALUES('3', '3'); SELECT DISTINCT group_concat( [TB].[F2],' ') AS [Groep] FROM [TA] JOIN [TB] ON [TA].[Groep] = [TB].[Groep]; I get this as a result: Groep 1 2 *3 3* but I would like to get Groep 1 2 *3* I'm sure the JOIN is causing this doubling of elements in the grouped result. Is there a way I could achieve this? thanks Gert ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] (no subject)
On 4 Jun 2012, at 6:39pm, Jörgen Hägglundwrote: > What I am trying to accomplish is an update from the source data. If the > entry is already there, just ignore it. Otherwise add the new data. If any unique key (including the primary key) of the existing row and the new entry match, then you can avoid getting an error by using INSERT OR IGNORE … This means that if the INSERT would normally result in an error message about duplicate key values, SQLite does not do the new INSERT, but returns an 'OK' result code, as if the INSERT had worked. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Trigger, syntax question
Am 04.06.12 19:36, schrieb Igor Tandetnik: > > http://sqlite.org/lang.html > http://sqlite.org/syntaxdiagrams.html > I just found the case expression. I did not know it before. Thank you for pointing me to that direction! Wolfgang ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] (no subject)
Hi! Thank You for replying Stefanos! Unfortunately, the errors were typos on my part. Sorry about that. As I wrote, everything works fine the first time around. What I am trying to accomplish is an update from the source data. If the entry is already there, just ignore it. Otherwise add the new data. I'm using version 3.7.12. Theories anyone? Regards, /Jörgen skrev 1970-01-01 01:00: You are missing parentheses here: create table if not exists a (id integer primary key autoincrement, a text unique, b default current_timestamp); create table if not exists b (id integer primary key autoincrement, a integer references a(id) on update cascade on delete cascade, b text, c text, d text, e text, f real, g text, h text, unique (a, b) on conflict ignore); create table if not exists c (id integer primary key autoincrement, a integer, b integer references b(id) on update cascade on delete cascade, c integer, d text, e integer, f text, g blob, unique (a, b, c) on conflict ignore); Also here you miss 'a' insert into c (a, b, c, d, e, f, g) values (:a, :b, :c, :d, :e, :f, :g); Also what sqlite version are you using? I have run this with the latest available version (3.7.12.1) under SQLite Manager (Firefox / Iceweasel extension). If you need any further help, please let me know. Cheers. Stefanos From: Jörgen Hägglund jor...@sirlucifer.mine.nu To: sqlite-users@sqlite.org Sent: Sunday, June 3, 2012 11:10 PM Subject: [sqlite] Foreign key constraint failed Hi all! I have just recently discovered the strengths of foreign keys but now, I've been banging my head against the wall for a couple of days. I just can't figure out what is causing the error or how to get around it. Here's the specs (simplified) of my DB; create table if not exists a (id integer primary key autoincrement, a text unique, b default current_timestamp); create table if not exists b (id integer primary key autoincrement, a integer references a(id) on update cascade on delete cascade, b text, c text, d text, e text, f real, g text, h text, unique (a, b) on conflict ignore; create table if not exists c (id integer primary key autoincrement, a integer, b integer references b(id) on update cascade on delete cascade, c integer, d text, e integer, f text, g blob, unique (a, b, c) on conflict ignore; And the insert query; insert into c (b, c, d, e, f, g) values (:a, :b, :c, :d, :e, :f, :g); The problem is that I get a "Foreign key constraint failed" error when I try to insert the same data twice. The first time it works as it should and the data is inserted correctly. But, the second time, I get the exception. Is there anyone out there who's willing (and able) to help me? And hopefully explain what I'm doing wrong. Regards, /Jörgen ___ 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] Trigger, syntax question
Am 04.06.12 19:31, schrieb Michael Schlenker: > Am 04.06.2012 19:25, schrieb Wolfgang Meiners: >> Am 04.06.12 18:59, schrieb Igor Tandetnik: >>> On 6/4/2012 12:33 PM, Wolfgang Meiners wrote: this trigger does work but i think it is not in accordance with the syntax diagram of TRIGGER on http://sqlite.com/lang_createtrigger.html >>> >>> Which part do you feel is in violation of the diagram? >> >> I cant find anything about >> SELECT CASE >>... >> END; >> >> in the diagram and i dont understand, how it works. > Have a look at: > http://sqlite.org/lang_expr.html > > Michael > OK. I found it. I thougt, CASE ... END belonged to TRIGGER, but it belongs to SQL. I just found http://www.sqlite.org/lang_expr.html#case Thank you for pointing me in that direction. Wolfgang ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Trigger, syntax question
On 6/4/2012 1:25 PM, Wolfgang Meiners wrote: Am 04.06.12 18:59, schrieb Igor Tandetnik: On 6/4/2012 12:33 PM, Wolfgang Meiners wrote: this trigger does work but i think it is not in accordance with the syntax diagram of TRIGGER on http://sqlite.com/lang_createtrigger.html Which part do you feel is in violation of the diagram? I cant find anything about SELECT CASE ... END; in the diagram The diagram allows a select-stmt. So looking at http://sqlite.org/lang_select.html, we can have "SELECT result-column ..." and result-column could be an expr. Looking at http://sqlite.org/lang_expr.html, one possibility for expr is a CASE ... END clause. and i dont understand, how it works. Can there be just one WHEN ... THEN ... part or more then one? More than one. Is it possible to have something like IF ... THEN ... too? No. This seems to be an programming language, but i have not found the rules for this language. http://sqlite.org/lang.html http://sqlite.org/syntaxdiagrams.html -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Trigger, syntax question
Am 04.06.2012 19:25, schrieb Wolfgang Meiners: > Am 04.06.12 18:59, schrieb Igor Tandetnik: >> On 6/4/2012 12:33 PM, Wolfgang Meiners wrote: >>> this trigger does work but i think it is not in accordance with the >>> syntax diagram of TRIGGER on >>> http://sqlite.com/lang_createtrigger.html >> >> Which part do you feel is in violation of the diagram? > > I cant find anything about > SELECT CASE >... > END; > > in the diagram and i dont understand, how it works. Have a look at: http://sqlite.org/lang_expr.html Michael -- Michael Schlenker Software Architect CONTACT Software GmbH Tel.: +49 (421) 20153-80 Wiener Straße 1-3 Fax:+49 (421) 20153-41 28359 Bremen http://www.contact.de/ E-Mail: m...@contact.de Sitz der Gesellschaft: Bremen Geschäftsführer: Karl Heinz Zachries, Ralf Holtgrefe Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Trigger, syntax question
Am 04.06.12 18:59, schrieb Igor Tandetnik: > On 6/4/2012 12:33 PM, Wolfgang Meiners wrote: >> this trigger does work but i think it is not in accordance with the >> syntax diagram of TRIGGER on >> http://sqlite.com/lang_createtrigger.html > > Which part do you feel is in violation of the diagram? I cant find anything about SELECT CASE ... END; in the diagram and i dont understand, how it works. Can there be just one WHEN ... THEN ... part or more then one? Is it possible to have something like IF ... THEN ... too? This seems to be an programming language, but i have not found the rules for this language. Wolfgang ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Trigger, syntax question
On 6/4/2012 12:33 PM, Wolfgang Meiners wrote: this trigger does work but i think it is not in accordance with the syntax diagram of TRIGGER on http://sqlite.com/lang_createtrigger.html Which part do you feel is in violation of the diagram? -- Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Query runs in SQLite Database Browser but not in iPad app
Hi Simon… project was cancelled… if it get's resurrected, and I still have the problem, I'll get back to you. Thank you for your time… Regards, Rolf On Jun 4, 2012, at 7:29 AM, Simon Slavin wrote: > > On 4 Jun 2012, at 3:24pm, Rolf Marshwrote: > >> "Could you possibly reduce your database to just a few records -- just >> enough that it correctly reproduces your problem ? You can use the SQLite >> shell tool to .dump the database which will let you post a complete copy for >> our testing. " >> >> Sorry, but I don't know how to do this… can you give me the syntax? > > Make a copy of your database, and use the SQList shell tool (see the SQLite > download page) to delete TABLEs, VIEWs, INDEXes and rows from it until you > have a very small database (perhaps just a few rows) which still demonstrates > the problem you have. Try and remove absolutely everything you can until the > problem goes away, then go back one step until you have a tiny database which > still demonstrates your problem. > >> and where will the output go? and do you want me to put the output on >> PasteBin? > > You can use the '.dump' command from the SQList shell tool (see the SQLite > download page) to turn any SQLite database into SQL commands. Then you can > include that text in a post to the list. > > 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] Trigger, syntax question
Hi, I have written the following trigger with ideas from stackoverflow: (OSX 10.6.8, SQLite 3.6.12) This is for a book library. If i delete a bookexemplar from the library, this should not be possible if this bookexemplar is on loan, which means ausleihen.rueckgabe IS NULL. Otherwise every information on loans should be deleted, too. CREATE TRIGGER buchexemplare_delete AFTER DELETE ON buchexemplare FOR EACH ROW BEGIN SELECT CASE WHEN EXISTS (SELECT beid FROM ausleihen WHERE (ausleihen.beid = OLD.beid) AND\ (ausleihen.rueckgabe IS NULL)) THEN RAISE(ROLLBACK, 'Es sind noch Buchexemplare\ ausgeliehen') END; DELETE FROM ausleihen WHERE ausleihen.beid = OLD.beid; END; this trigger does work but i think it is not in accordance with the syntax diagram of TRIGGER on http://sqlite.com/lang_createtrigger.html So where can i find the exact actual syntax for triggers and maybe some examples? Thank you for any help Wolfgang ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] The "sessions" branch
On Mon, Jun 4, 2012 at 10:50 AM, Marco Bambiniwrote: > I am sorry Dr. Hipp, I am probably doing something wrong, but I just > retried and no sessions code is in-line in the final sqlite3.c file. > > I downloaded: > > http://www.sqlite.org/src/zip/SQLite-d07b7b67d1b3bf65.zip?uuid=d07b7b67d1b3bf65cfe8d96d45a7f1d387bea7ce > I'm mistaken. Session code is in ext/session. The configure script does not access it though. You'll have to do the manually-edited Makefile that calls main.mk. > > then > cd SQLite-d07b7b67d1b3bf65 > ./configure; make sqlite3.c > > preupdate_hook code is in-line but no sessions related code. > -- > Marco Bambini > http://www.sqlabs.com > > > On Jun 4, 2012, at 4:38 PM, Richard Hipp wrote: > > > On Mon, Jun 4, 2012 at 10:34 AM, Marco Bambini wrote: > > > >> I just tried to download: > >> http://www.sqlite.org/src/info/d07b7b67d1 > >> from the session branch. > >> > >> Then: > >> ./configure; make sqlite3.c > >> but no session module is included in the amalgamation sqlite3.c file. > >> > > > > All of the sessions code is in-line in the core. Enable it using > > -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_SESSION. > > > > > >> > >> From the executed cp command: > >> cp -f ./src/alter.c ./src/analyze.c ./src/attach.c ./src/auth.c > >> ./src/backup.c ./src/bitvec.c ./src/btmutex.c ./src/btree.c > ./src/btree.h > >> ./src/btreeInt.h ./src/build.c ./src/callback.c ./src/complete.c > >> ./src/ctime.c ./src/date.c ./src/delete.c ./src/expr.c ./src/fault.c > >> ./src/fkey.c ./src/func.c ./src/global.c ./src/hash.c ./src/hash.h > >> ./src/hwtime.h ./src/insert.c ./src/journal.c ./src/legacy.c > >> ./src/loadext.c ./src/main.c ./src/malloc.c ./src/mem0.c ./src/mem1.c > >> ./src/mem2.c ./src/mem3.c ./src/mem5.c ./src/memjournal.c ./src/mutex.c > >> ./src/mutex.h ./src/mutex_noop.c ./src/mutex_os2.c ./src/mutex_unix.c > >> ./src/mutex_w32.c ./src/notify.c ./src/os.c ./src/os.h ./src/os_common.h > >> ./src/os_os2.c ./src/os_unix.c ./src/os_win.c ./src/pager.c > ./src/pager.h > >> ./src/parse.y ./src/pcache.c ./src/pcache.h ./src/pcache1.c > ./src/pragma.c > >> ./src/prepare.c ./src/printf.c ./src/random.c ./src/resolve.c > >> ./src/rowset.c ./src/select.c ./src/status.c ./src/shell.c ./src/ > >> sqlite.h.in ./src/sqlite3ext. > >> h ./src/sqliteInt.h ./src/sqliteLimit.h ./src/table.c ./src/tclsqlite.c > >> ./src/tokenize.c ./src/trigger.c ./src/utf.c ./src/update.c ./src/util.c > >> ./src/vacuum.c ./src/vdbe.c ./src/vdbe.h ./src/vdbeapi.c ./src/vdbeaux.c > >> ./src/vdbeblob.c ./src/vdbemem.c ./src/vdbesort.c ./src/vdbetrace.c > >> ./src/vdbeInt.h ./src/vtab.c ./src/wal.c ./src/wal.h ./src/walker.c > >> ./src/where.c ./ext/fts1/fts1.c ./ext/fts1/fts1.h ./ext/fts1/fts1_hash.c > >> ./ext/fts1/fts1_hash.h ./ext/fts1/fts1_porter.c > ./ext/fts1/fts1_tokenizer.h > >> ./ext/fts1/fts1_tokenizer1.c ./ext/fts2/fts2.c ./ext/fts2/fts2.h > >> ./ext/fts2/fts2_hash.c ./ext/fts2/fts2_hash.h ./ext/fts2/fts2_icu.c > >> ./ext/fts2/fts2_porter.c ./ext/fts2/fts2_tokenizer.h > >> ./ext/fts2/fts2_tokenizer.c ./ext/fts2/fts2_tokenizer1.c > ./ext/fts3/fts3.c > >> ./ext/fts3/fts3.h ./ext/fts3/fts3Int.h ./ext/fts3/fts3_aux.c > >> ./ext/fts3/fts3_expr.c ./ext/fts3/fts3_hash.c ./ext/fts3/fts3_hash.h > >> ./ext/fts3/fts3_icu.c ./ext/fts3/fts3_porter.c ./ext/fts3/fts3_snippet.c > >> ./ext/fts3/fts3_tokeni > >> zer.h ./ext/fts3/fts3_tokenizer.c ./ext/fts3/fts3_tokenizer1.c > >> ./ext/fts3/fts3_write.c ./ext/icu/sqliteicu.h ./ext/icu/icu.c > >> ./ext/rtree/rtree.h ./ext/rtree/rtree.c keywordhash.h opcodes.c > opcodes.h > >> parse.c parse.h config.h sqlite3.h tsrc > >> > >> no ./ext/session/ folder is included. > >> Any help? > >> -- > >> Marco Bambini > >> http://www.sqlabs.com > >> > >> > >> On May 31, 2012, at 9:27 PM, Richard Hipp wrote: > >> > >>> On Thu, May 31, 2012 at 2:55 PM, Charles Samuels >>> wrote: > >>> > >>> If you are on the sessions branch, then you have the changes just do: > >>> > >>> ./configure; make sqlite3.c > >>> > >>> Then compile your application with -DSQLITE_ENABLE_SESSION to get the > >>> functionality. Documentation on the session extensions is thin but can > >> be > >>> seen here: http://www.sqlite.org/sessions/session.html > >> ___ > >> 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 > > ___ > 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
Re: [sqlite] The "sessions" branch
I am sorry Dr. Hipp, I am probably doing something wrong, but I just retried and no sessions code is in-line in the final sqlite3.c file. I downloaded: http://www.sqlite.org/src/zip/SQLite-d07b7b67d1b3bf65.zip?uuid=d07b7b67d1b3bf65cfe8d96d45a7f1d387bea7ce then cd SQLite-d07b7b67d1b3bf65 ./configure; make sqlite3.c preupdate_hook code is in-line but no sessions related code. -- Marco Bambini http://www.sqlabs.com On Jun 4, 2012, at 4:38 PM, Richard Hipp wrote: > On Mon, Jun 4, 2012 at 10:34 AM, Marco Bambiniwrote: > >> I just tried to download: >> http://www.sqlite.org/src/info/d07b7b67d1 >> from the session branch. >> >> Then: >> ./configure; make sqlite3.c >> but no session module is included in the amalgamation sqlite3.c file. >> > > All of the sessions code is in-line in the core. Enable it using > -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_SESSION. > > >> >> From the executed cp command: >> cp -f ./src/alter.c ./src/analyze.c ./src/attach.c ./src/auth.c >> ./src/backup.c ./src/bitvec.c ./src/btmutex.c ./src/btree.c ./src/btree.h >> ./src/btreeInt.h ./src/build.c ./src/callback.c ./src/complete.c >> ./src/ctime.c ./src/date.c ./src/delete.c ./src/expr.c ./src/fault.c >> ./src/fkey.c ./src/func.c ./src/global.c ./src/hash.c ./src/hash.h >> ./src/hwtime.h ./src/insert.c ./src/journal.c ./src/legacy.c >> ./src/loadext.c ./src/main.c ./src/malloc.c ./src/mem0.c ./src/mem1.c >> ./src/mem2.c ./src/mem3.c ./src/mem5.c ./src/memjournal.c ./src/mutex.c >> ./src/mutex.h ./src/mutex_noop.c ./src/mutex_os2.c ./src/mutex_unix.c >> ./src/mutex_w32.c ./src/notify.c ./src/os.c ./src/os.h ./src/os_common.h >> ./src/os_os2.c ./src/os_unix.c ./src/os_win.c ./src/pager.c ./src/pager.h >> ./src/parse.y ./src/pcache.c ./src/pcache.h ./src/pcache1.c ./src/pragma.c >> ./src/prepare.c ./src/printf.c ./src/random.c ./src/resolve.c >> ./src/rowset.c ./src/select.c ./src/status.c ./src/shell.c ./src/ >> sqlite.h.in ./src/sqlite3ext. >> h ./src/sqliteInt.h ./src/sqliteLimit.h ./src/table.c ./src/tclsqlite.c >> ./src/tokenize.c ./src/trigger.c ./src/utf.c ./src/update.c ./src/util.c >> ./src/vacuum.c ./src/vdbe.c ./src/vdbe.h ./src/vdbeapi.c ./src/vdbeaux.c >> ./src/vdbeblob.c ./src/vdbemem.c ./src/vdbesort.c ./src/vdbetrace.c >> ./src/vdbeInt.h ./src/vtab.c ./src/wal.c ./src/wal.h ./src/walker.c >> ./src/where.c ./ext/fts1/fts1.c ./ext/fts1/fts1.h ./ext/fts1/fts1_hash.c >> ./ext/fts1/fts1_hash.h ./ext/fts1/fts1_porter.c ./ext/fts1/fts1_tokenizer.h >> ./ext/fts1/fts1_tokenizer1.c ./ext/fts2/fts2.c ./ext/fts2/fts2.h >> ./ext/fts2/fts2_hash.c ./ext/fts2/fts2_hash.h ./ext/fts2/fts2_icu.c >> ./ext/fts2/fts2_porter.c ./ext/fts2/fts2_tokenizer.h >> ./ext/fts2/fts2_tokenizer.c ./ext/fts2/fts2_tokenizer1.c ./ext/fts3/fts3.c >> ./ext/fts3/fts3.h ./ext/fts3/fts3Int.h ./ext/fts3/fts3_aux.c >> ./ext/fts3/fts3_expr.c ./ext/fts3/fts3_hash.c ./ext/fts3/fts3_hash.h >> ./ext/fts3/fts3_icu.c ./ext/fts3/fts3_porter.c ./ext/fts3/fts3_snippet.c >> ./ext/fts3/fts3_tokeni >> zer.h ./ext/fts3/fts3_tokenizer.c ./ext/fts3/fts3_tokenizer1.c >> ./ext/fts3/fts3_write.c ./ext/icu/sqliteicu.h ./ext/icu/icu.c >> ./ext/rtree/rtree.h ./ext/rtree/rtree.c keywordhash.h opcodes.c opcodes.h >> parse.c parse.h config.h sqlite3.h tsrc >> >> no ./ext/session/ folder is included. >> Any help? >> -- >> Marco Bambini >> http://www.sqlabs.com >> >> >> On May 31, 2012, at 9:27 PM, Richard Hipp wrote: >> >>> On Thu, May 31, 2012 at 2:55 PM, Charles Samuels >> wrote: >>> >>> If you are on the sessions branch, then you have the changes just do: >>> >>> ./configure; make sqlite3.c >>> >>> Then compile your application with -DSQLITE_ENABLE_SESSION to get the >>> functionality. Documentation on the session extensions is thin but can >> be >>> seen here: http://www.sqlite.org/sessions/session.html >> ___ >> 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 ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] The "sessions" branch
On Mon, Jun 4, 2012 at 10:34 AM, Marco Bambiniwrote: > I just tried to download: > http://www.sqlite.org/src/info/d07b7b67d1 > from the session branch. > > Then: > ./configure; make sqlite3.c > but no session module is included in the amalgamation sqlite3.c file. > All of the sessions code is in-line in the core. Enable it using -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_SESSION. > > From the executed cp command: > cp -f ./src/alter.c ./src/analyze.c ./src/attach.c ./src/auth.c > ./src/backup.c ./src/bitvec.c ./src/btmutex.c ./src/btree.c ./src/btree.h > ./src/btreeInt.h ./src/build.c ./src/callback.c ./src/complete.c > ./src/ctime.c ./src/date.c ./src/delete.c ./src/expr.c ./src/fault.c > ./src/fkey.c ./src/func.c ./src/global.c ./src/hash.c ./src/hash.h > ./src/hwtime.h ./src/insert.c ./src/journal.c ./src/legacy.c > ./src/loadext.c ./src/main.c ./src/malloc.c ./src/mem0.c ./src/mem1.c > ./src/mem2.c ./src/mem3.c ./src/mem5.c ./src/memjournal.c ./src/mutex.c > ./src/mutex.h ./src/mutex_noop.c ./src/mutex_os2.c ./src/mutex_unix.c > ./src/mutex_w32.c ./src/notify.c ./src/os.c ./src/os.h ./src/os_common.h > ./src/os_os2.c ./src/os_unix.c ./src/os_win.c ./src/pager.c ./src/pager.h > ./src/parse.y ./src/pcache.c ./src/pcache.h ./src/pcache1.c ./src/pragma.c > ./src/prepare.c ./src/printf.c ./src/random.c ./src/resolve.c > ./src/rowset.c ./src/select.c ./src/status.c ./src/shell.c ./src/ > sqlite.h.in ./src/sqlite3ext. > h ./src/sqliteInt.h ./src/sqliteLimit.h ./src/table.c ./src/tclsqlite.c > ./src/tokenize.c ./src/trigger.c ./src/utf.c ./src/update.c ./src/util.c > ./src/vacuum.c ./src/vdbe.c ./src/vdbe.h ./src/vdbeapi.c ./src/vdbeaux.c > ./src/vdbeblob.c ./src/vdbemem.c ./src/vdbesort.c ./src/vdbetrace.c > ./src/vdbeInt.h ./src/vtab.c ./src/wal.c ./src/wal.h ./src/walker.c > ./src/where.c ./ext/fts1/fts1.c ./ext/fts1/fts1.h ./ext/fts1/fts1_hash.c > ./ext/fts1/fts1_hash.h ./ext/fts1/fts1_porter.c ./ext/fts1/fts1_tokenizer.h > ./ext/fts1/fts1_tokenizer1.c ./ext/fts2/fts2.c ./ext/fts2/fts2.h > ./ext/fts2/fts2_hash.c ./ext/fts2/fts2_hash.h ./ext/fts2/fts2_icu.c > ./ext/fts2/fts2_porter.c ./ext/fts2/fts2_tokenizer.h > ./ext/fts2/fts2_tokenizer.c ./ext/fts2/fts2_tokenizer1.c ./ext/fts3/fts3.c > ./ext/fts3/fts3.h ./ext/fts3/fts3Int.h ./ext/fts3/fts3_aux.c > ./ext/fts3/fts3_expr.c ./ext/fts3/fts3_hash.c ./ext/fts3/fts3_hash.h > ./ext/fts3/fts3_icu.c ./ext/fts3/fts3_porter.c ./ext/fts3/fts3_snippet.c > ./ext/fts3/fts3_tokeni > zer.h ./ext/fts3/fts3_tokenizer.c ./ext/fts3/fts3_tokenizer1.c > ./ext/fts3/fts3_write.c ./ext/icu/sqliteicu.h ./ext/icu/icu.c > ./ext/rtree/rtree.h ./ext/rtree/rtree.c keywordhash.h opcodes.c opcodes.h > parse.c parse.h config.h sqlite3.h tsrc > > no ./ext/session/ folder is included. > Any help? > -- > Marco Bambini > http://www.sqlabs.com > > > On May 31, 2012, at 9:27 PM, Richard Hipp wrote: > > > On Thu, May 31, 2012 at 2:55 PM, Charles Samuels >wrote: > > > > If you are on the sessions branch, then you have the changes just do: > > > > ./configure; make sqlite3.c > > > > Then compile your application with -DSQLITE_ENABLE_SESSION to get the > > functionality. Documentation on the session extensions is thin but can > be > > seen here: http://www.sqlite.org/sessions/session.html > ___ > 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] The "sessions" branch
I just tried to download: http://www.sqlite.org/src/info/d07b7b67d1 from the session branch. Then: ./configure; make sqlite3.c but no session module is included in the amalgamation sqlite3.c file. >From the executed cp command: cp -f ./src/alter.c ./src/analyze.c ./src/attach.c ./src/auth.c ./src/backup.c ./src/bitvec.c ./src/btmutex.c ./src/btree.c ./src/btree.h ./src/btreeInt.h ./src/build.c ./src/callback.c ./src/complete.c ./src/ctime.c ./src/date.c ./src/delete.c ./src/expr.c ./src/fault.c ./src/fkey.c ./src/func.c ./src/global.c ./src/hash.c ./src/hash.h ./src/hwtime.h ./src/insert.c ./src/journal.c ./src/legacy.c ./src/loadext.c ./src/main.c ./src/malloc.c ./src/mem0.c ./src/mem1.c ./src/mem2.c ./src/mem3.c ./src/mem5.c ./src/memjournal.c ./src/mutex.c ./src/mutex.h ./src/mutex_noop.c ./src/mutex_os2.c ./src/mutex_unix.c ./src/mutex_w32.c ./src/notify.c ./src/os.c ./src/os.h ./src/os_common.h ./src/os_os2.c ./src/os_unix.c ./src/os_win.c ./src/pager.c ./src/pager.h ./src/parse.y ./src/pcache.c ./src/pcache.h ./src/pcache1.c ./src/pragma.c ./src/prepare.c ./src/printf.c ./src/random.c ./src/resolve.c ./src/rowset.c ./src/select.c ./src/status.c ./src/shell.c ./src/sqlite.h.in ./src/sqlite3ext. h ./src/sqliteInt.h ./src/sqliteLimit.h ./src/table.c ./src/tclsqlite.c ./src/tokenize.c ./src/trigger.c ./src/utf.c ./src/update.c ./src/util.c ./src/vacuum.c ./src/vdbe.c ./src/vdbe.h ./src/vdbeapi.c ./src/vdbeaux.c ./src/vdbeblob.c ./src/vdbemem.c ./src/vdbesort.c ./src/vdbetrace.c ./src/vdbeInt.h ./src/vtab.c ./src/wal.c ./src/wal.h ./src/walker.c ./src/where.c ./ext/fts1/fts1.c ./ext/fts1/fts1.h ./ext/fts1/fts1_hash.c ./ext/fts1/fts1_hash.h ./ext/fts1/fts1_porter.c ./ext/fts1/fts1_tokenizer.h ./ext/fts1/fts1_tokenizer1.c ./ext/fts2/fts2.c ./ext/fts2/fts2.h ./ext/fts2/fts2_hash.c ./ext/fts2/fts2_hash.h ./ext/fts2/fts2_icu.c ./ext/fts2/fts2_porter.c ./ext/fts2/fts2_tokenizer.h ./ext/fts2/fts2_tokenizer.c ./ext/fts2/fts2_tokenizer1.c ./ext/fts3/fts3.c ./ext/fts3/fts3.h ./ext/fts3/fts3Int.h ./ext/fts3/fts3_aux.c ./ext/fts3/fts3_expr.c ./ext/fts3/fts3_hash.c ./ext/fts3/fts3_hash.h ./ext/fts3/fts3_icu.c ./ext/fts3/fts3_porter.c ./ext/fts3/fts3_snippet.c ./ext/fts3/fts3_tokeni zer.h ./ext/fts3/fts3_tokenizer.c ./ext/fts3/fts3_tokenizer1.c ./ext/fts3/fts3_write.c ./ext/icu/sqliteicu.h ./ext/icu/icu.c ./ext/rtree/rtree.h ./ext/rtree/rtree.c keywordhash.h opcodes.c opcodes.h parse.c parse.h config.h sqlite3.h tsrc no ./ext/session/ folder is included. Any help? -- Marco Bambini http://www.sqlabs.com On May 31, 2012, at 9:27 PM, Richard Hipp wrote: > On Thu, May 31, 2012 at 2:55 PM, Charles Samuelswrote: > > If you are on the sessions branch, then you have the changes just do: > > ./configure; make sqlite3.c > > Then compile your application with -DSQLITE_ENABLE_SESSION to get the > functionality. Documentation on the session extensions is thin but can be > seen here: http://www.sqlite.org/sessions/session.html ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Query runs in SQLite Database Browser but not in iPad app
On 4 Jun 2012, at 3:24pm, Rolf Marshwrote: > "Could you possibly reduce your database to just a few records -- just enough > that it correctly reproduces your problem ? You can use the SQLite shell > tool to .dump the database which will let you post a complete copy for our > testing. " > > Sorry, but I don't know how to do this… can you give me the syntax? Make a copy of your database, and use the SQList shell tool (see the SQLite download page) to delete TABLEs, VIEWs, INDEXes and rows from it until you have a very small database (perhaps just a few rows) which still demonstrates the problem you have. Try and remove absolutely everything you can until the problem goes away, then go back one step until you have a tiny database which still demonstrates your problem. > and where will the output go? and do you want me to put the output on > PasteBin? You can use the '.dump' command from the SQList shell tool (see the SQLite download page) to turn any SQLite database into SQL commands. Then you can include that text in a post to the list. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Query runs in SQLite Database Browser but not in iPad app
Simon… did you get my response to your last question? "Could you possibly reduce your database to just a few records -- just enough that it correctly reproduces your problem ? You can use the SQLite shell tool to .dump the database which will let you post a complete copy for our testing. " Sorry, but I don't know how to do this… can you give me the syntax? and where will the output go? and do you want me to put the output on PasteBin? Rolf On Jun 3, 2012, at 10:40 AM, Simon Slavin wrote: > > On 3 Jun 2012, at 5:28pm, Rolf Marshwrote: > >> Simon… what happened to my images and the attachment? I can put them on >> Dropbox, or do you have somewhere else I can put them so you can access them? > > Attachments don't work on this list. We don't want everyone sending us their > homework. > > Just type in the version numbers you get, and tell us what result the SQLite > shell tool gives. > > 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] Query runs in SQLite Database Browser but not in iPad app
On 4 Jun 2012, at 6:14am, YAN HONG YEwrote: > I have a sqlite db file in my pc, and now I wanna to copy my db file to my > ipad. The format of SQLite databases is identical on every platform. You can make a database on one platform and read it on another. > I need open db files in ipad,but I don't know how to open the file. You will need an iPad app which uses that database. Or perhaps an iPad app which can read/write all SQLite databases. > and where should I copy my db files to my ipad. On iDevices, each application has access only to its own files. There's no 'user filespace' which all applications can access. You can A) include the database file as part of the application you want to open it, or B) put the file in that application's filespace, or C) if the application is correctly written, you can use the Apps pane in iTunes to copy its data files between your computer and your iDevice. Simon. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users