Re: [sqlite] How to link the packet in C file then store in sqlite database?

2013-05-02 Thread Newbie89
Fehmi Noyan ISI wrote > I cannot understand "So I need to create a table Packet right?", but you > do need to create a table first. > > You may need to bother yourself by reading the API reference for the > functions I gave. ok...can help me check my code?some part I not sure...thanks link.c >

[sqlite] ORDER of export on a SELECT

2013-05-02 Thread Gert Van Assche
All, I I have a table with 2 fields that need to be exported to 2 TXT files but the order of the lines in the export should be exactly the same as in the table. I tried to do it like this: SELECT [FieldA] FROM [T1] ORDER BY rowid; and SELECT [FieldB] FROM [T1] ORDER BY rowid;

[sqlite] Interrupting SQLite execution (mainly FTS)

2013-05-02 Thread Jan Slodicka
I was testing various ways how to interrupt rebuilding of an FTS index. Ability to abort is vital as the app is running on a smartphone and has to meet responsivity requirements. Here is what SQLite offers (AFAIK): - Progress handler (with low nOps value): Relatively good with only occasional

Re: [sqlite] Bug report: query parser should trigger an error if a subquery selects unknown columns from table

2013-05-02 Thread Thomas Krueger
I ran into a similar issue: DELETE FROM ATable WHERE EXISTS(SELECT 1 FROM TMPTable AS t WHERE id = t.id) ; Syntactically I was expecting id to be the ATable.id as I had aliased the TMPTable with t. But the result was a non-correlated subquery, id = t.id was always true. The fix is clear, yet

Re: [sqlite] Potential problem in SQLite 3.7.16.2

2013-05-02 Thread Mario M. Westphal
Thank you for providing this pre-release amalgamation ;-) I downloaded it immediately and compiled it into my software. The problem has been ++resolved++ and the performance is at least as good as with previous versions of SQLite. It even feels a bit faster, although I only could try it with a

Re: [sqlite] Bug report: query parser should trigger an error if a subquery selects unknown columns from table

2013-05-02 Thread Hick Gunter
Because then you would lose automatic matching of unique field names everywhere else... -Ursprüngliche Nachricht- Von: Thomas Krueger [mailto:tom.krue...@gmail.com] Gesendet: Donnerstag, 02. Mai 2013 13:15 An: General Discussion of SQLite Database Betreff: Re: [sqlite] Bug report: query

Re: [sqlite] Version 3.7.17 Preview

2013-05-02 Thread Ralf Junker
Current trunk still does not compile with SQLITE_OMIT_WAL #defined. Details here: http://www.mail-archive.com/sqlite-users@sqlite.org/msg76672.html Ralf On 26.04.2013 17:34, Richard Hipp wrote: > Please visit http://www.sqlite.org/draft/releaselog/3_7_17.html to see the > proposed

[sqlite] amatch extension

2013-05-02 Thread Ralf Junker
I am unsure about how the amatch extension works. According to the documentation, I believe that the SQL below should return at least one record, but it does not. No errors are reported either. I compiled the shell executable with the 201304290917 draft amalgamation and today's amatch.c from

Re: [sqlite] ORDER of export on a SELECT

2013-05-02 Thread Richard Hipp
On Thu, May 2, 2013 at 4:26 AM, Gert Van Assche wrote: > All, I > > I have a table with 2 fields that need to be exported to 2 TXT files but > the order of the lines in the export should be exactly the same as in the > table. > I tried to do it like this: > SELECT

Re: [sqlite] Interrupting SQLite execution (mainly FTS)

2013-05-02 Thread Simon Slavin
On 2 May 2013, at 10:16am, "Jan Slodicka" wrote: > I was testing various ways how to interrupt rebuilding of an FTS index. > Ability to abort is vital as the app is running on a smartphone and has to > meet responsivity requirements. Sorry, I don't know an answer to your

Re: [sqlite] ORDER of export on a SELECT

2013-05-02 Thread Simon Slavin
On 2 May 2013, at 9:26am, Gert Van Assche wrote: > I have a table with 2 fields that need to be exported to 2 TXT files but > the order of the lines in the export should be exactly the same as in the > table. Tables do not have order. Really. A table is a set of rows,

Re: [sqlite] How people test db failures

2013-05-02 Thread Michael Black
There are several ways people handle errors. #1 Path of least resistanceyou assume all is well and ignore thembad idea but too common #2 Catch as catch can...you put in error handling as you experience themalso a bad idea as it's too similar to #1 #3 Catch with careful thought about

Re: [sqlite] Interrupting SQLite execution (mainly FTS)

2013-05-02 Thread Jan Slodicka
Hi Simon. > I have much love for FTS but it chews up storage space, processing power, and therefore battery life, something fierce. You may end up with a working app but your users will find it reduces their battery life to an hour. Sounds unbelievable. Can you bring some example, please? In

Re: [sqlite] Interrupting SQLite execution (mainly FTS)

2013-05-02 Thread Dan Kennedy
On Thu, 2 May 2013 11:16:06 +0200 "Jan Slodicka" wrote: > I was testing various ways how to interrupt rebuilding of an FTS > index. Ability to abort is vital as the app is running on a > smartphone and has to meet responsivity requirements. > > Here is what SQLite offers

Re: [sqlite] Interrupting SQLite execution (mainly FTS)

2013-05-02 Thread Simon Slavin
On 2 May 2013, at 2:57pm, Jan Slodicka wrote: > LIKE is used at the moment, but it has its perf limits as well. To prove it, > here is a desktop benchmark: > > Desktop: W7, x64, Intel i5, 2.4 GHz > 116 MB email table containing 1 html-formatted emails. > SELECT ...

[sqlite] Performance HELP

2013-05-02 Thread peter korinis
Thank you for your responses. I was hoping for an easy hardware solution, like more memory or a faster HD . but it looks like indices and table design are where I need to focus. peterK ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] Feature request: Generate 'INSERT' command

2013-05-02 Thread Simon Slavin
I know of the reluctance among the SQLite programmers to add features to the intentionally 'lite' product, but I am coming to the conclusion that having this feature in the standard code base will be of great convenience to a lot of users. I would like the introduction of a command which

Re: [sqlite] Feature request: Generate 'INSERT' command

2013-05-02 Thread Jay A. Kreibich
On Thu, May 02, 2013 at 03:45:16PM +0100, Simon Slavin scratched on the wall: > I would like the introduction of a command which changes a SELECT the > same way EXPLAIN QUERY PLAN changes a SELECT. This one should take > the SELECT and instead of producing a table, sometimes with many > columns,

Re: [sqlite] Feature request: Generate 'INSERT' command

2013-05-02 Thread Igor Tandetnik
On 5/2/2013 10:45 AM, Simon Slavin wrote: I know of the reluctance among the SQLite programmers to add features to the intentionally 'lite' product, but I am coming to the conclusion that having this feature in the standard code base will be of great convenience to a lot of users. I would

Re: [sqlite] ORDER of export on a SELECT

2013-05-02 Thread Gert Van Assche
Thanks for the advice, both. In the mean time we know that it indeed something else causing the problem. gert 2013/5/2 Simon Slavin > > On 2 May 2013, at 9:26am, Gert Van Assche wrote: > > > I have a table with 2 fields that need to be exported to 2

Re: [sqlite] Interrupting SQLite execution (mainly FTS)

2013-05-02 Thread Jan Slodicka
Hi Dan > What are your settings for pragmas "cache_size", "journal_mode" and > "synchronous"? cache_size/synchronous - default values Don't remember, which journal_mode was used for testing. Should be WAL, but I might have been lazy to write needed code. The source code was meanwhile

Re: [sqlite] Interrupting SQLite execution (mainly FTS)

2013-05-02 Thread Dan Kennedy
On Thu, 2 May 2013 16:58:01 +0200 "Jan Slodicka" wrote: > Hi Dan > > > What are your settings for pragmas "cache_size", "journal_mode" and > > "synchronous"? > > cache_size/synchronous - default values > > Don't remember, which journal_mode was used for testing. Should be >

Re: [sqlite] Opening an in-memory database in two connections, one read-write, one read-only.

2013-05-02 Thread Scott Hess
No comment? Do I need to recast the problem or something? Thanks, scott On Fri, Apr 26, 2013 at 9:54 PM, Scott Hess wrote: > Someone over here was trying to use a shared-cache in-memory database with > two connections, one a read-write connection for purposes of populating >

Re: [sqlite] Opening an in-memory database in two connections, one read-write, one read-only.

2013-05-02 Thread Richard Hipp
On Sat, Apr 27, 2013 at 12:54 AM, Scott Hess wrote: > Someone over here was trying to use a shared-cache in-memory database with > two connections, one a read-write connection for purposes of populating > things, the other a read-only connection for purposes of letting a >

Re: [sqlite] sequential row numbers from query

2013-05-02 Thread Yongil Jang
Hi, all. How about this approach? I just implemented a simple code(User Defined Function) that returns a number as like as row number. It was worked pretty good with my simple SQL test cases. sqlite> insert into test values ('first record'); sqlite> insert into test values ('second record');

Re: [sqlite] How people test db failures

2013-05-02 Thread Keith Medcalf
> My pet peeve is the lousy error message like Microsoft used to produce > "dll not found". What DLL? What error? E.g. File not found or permission > problem? My favorite is from the service manager: "The Service could not be started because the file could not be found". Wouldn't it be nice

Re: [sqlite] How people test db failures

2013-05-02 Thread Simon Slavin
On 3 May 2013, at 1:49am, Keith Medcalf wrote: >> My pet peeve is the lousy error message like Microsoft used to produce >> "dll not found". What DLL? What error? E.g. File not found or permission >> problem? > > My favorite is from the service manager: > > "The

Re: [sqlite] sequential row numbers from query

2013-05-02 Thread Simon Slavin
On 3 May 2013, at 2:22am, James K. Lowden wrote: > I considered writing such a function, too. I didn't because relations > have no order. > > One might be tempted to say that's solved by ORDER BY. But > > 1. It's not clear that the rows are presented to the UDF

Re: [sqlite] How people test db failures

2013-05-02 Thread Keith Medcalf
> >> My pet peeve is the lousy error message like Microsoft used to produce > >> "dll not found". What DLL? What error? E.g. File not found or > permission > >> problem? > > > > My favorite is from the service manager: > > > > "The Service could not be started because the file could not be

Re: [sqlite] How people test db failures

2013-05-02 Thread Igor Korot
Hi, guys, On Thu, May 2, 2013 at 6:52 PM, Keith Medcalf wrote: > > >> My pet peeve is the lousy error message like Microsoft used to produce > > >> "dll not found". What DLL? What error? E.g. File not found or > > permission > > >> problem? > > > > > > My favorite is

Re: [sqlite] How people test db failures

2013-05-02 Thread Keith Medcalf
> My question was a little different. > I am developing desktop application which utilizes SQLite. At some point > in time my customer will want to know what happen when the DB operation > breaks. This depends on your definition of "breaks". > How do people prove to their customers that no

Re: [sqlite] How people test db failures

2013-05-02 Thread Igor Korot
Keith, On Thu, May 2, 2013 at 9:44 PM, Keith Medcalf wrote: > > > My question was a little different. > > > I am developing desktop application which utilizes SQLite. At some point > > in time my customer will want to know what happen when the DB operation > > breaks. > >

Re: [sqlite] How people test db failures

2013-05-02 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/05/13 20:03, Igor Korot wrote: > How do people prove to their customers that no matter what the > software will either finish gracefully or will not break, crash or > anything to that matter? That is easy - use SQLite. Put your work inside

Re: [sqlite] How people test db failures

2013-05-02 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/05/13 22:31, Igor Korot wrote: > Or the simplest one - the database is moved ... That is sufficient to break the database. A SQLite database is not just the database file, it is also the journal and WAL. If you don't move all as a single unit

Re: [sqlite] How people test db failures

2013-05-02 Thread Stephen Chrzanowski
You'll have to explain to the customer that "no matter what" carries too much weight. Are you going to protect against hardware failures? Fire? Floods? Under what level would an acceptable failure be, or an unacceptable failure? What specifically is the user looking to break? If the user gets