[sqlite] SQLite spawns multiple processes?

2009-05-18 Thread jkimble

Thanks for all the great responses.

Disabling threads in SQLite (and removing the pthreads lib from the
application build) seemed to fix things. We're still testing but we went
from crashing constantly to not being able to make it fail. Clearly
something's amiss with threads on this platform. We may or may not get to
the bottom of that but at the moment things are looking up.

Thanks again to all that contributed!

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


[sqlite] SQLite spawns multiple processes?

2009-05-15 Thread jkimble

I'm running a embedded SQL C application (SQLite v3.6.13) on an embedded
platform (Coldfire) running Linux 2.6.25 kernel. Something odd I've
noticed is that when my application reaches the point of calling dbopen it
spawns a new process, with the same name as my application, so that the
process list always shows two of my application running.

Why is this? Is this normal behaviour?

My application talks (via a socket) to a "backend" process that is
multithreaded and also reads/writes to the database and each thread
creates two processes.

Am I doing something wrong here or is this just something SQLite does
normally? I'm having problems with my application that seem to jump around
and are definately memory corruption related so I'm wondering if I'm doing
something wrong with the DB and causing this.

Any help or suggestions would be much appreciated...

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


[sqlite] Update in one process and Select in another (dumb question??)

2008-04-21 Thread jkimble


I've got two processes running. Each has it's own instance of the database
open. When I update the database from process 1 the select on that data
from process 2 doesn't see the change.

Of course if I close and re-open I see the change but surely that's not
how this has to work.

I'm reading an SPI bus for my data and updating a table that is then read
and the updated data is displayed on a GUI (different processes).

What am I doing wrong here? Tried to do a commit but that doesn't seem to
work either.

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


[sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread jkimble


>Does the value of the field really contain the single quotation marks, as
>opposed to being just a delimiter?  That would explain it.
>
>Brad

It appears I am stupid (hopefully not contagious)...

Select * from PerfTable1 where name = '''key5000''';

Works.  I thought "'" were delimiters. I expected to see them in the
hex call because they are part of what is returned by the query... Oh
well, mystery solved.

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


[sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread jkimble

>What about this:

>select name, length(name), hex(name)
>from PerfTest1
>where name like '%key5000%';

>hex(name) should dump raw bytes, in hexadecimal, stored in name column.
>See if there's anything unusual (perhaps a trailing NUL byte?)

Returns:  'key5000'|9|276B65793530303027

Nothing weird there. I feel stupid (and contagious) but I sure don't see
why  this doesn't work!

Table structure is:

sqlite3 test.db 'create table PerfTest1 (name TEXT ,  value1 INTEGER,
value2 INTEGER,
value3  INTEGER, value4  INTEGER, value5  INTEGER, value6  INTEGER,
value7  INTEGER,
value8  INTEGER, value9  INTEGER, value10 INTEGER, value11 INTEGER,
value12 INTEGER,
value13 INTEGER, value14 INTEGER, value15 INTEGER, value16 INTEGER,
value17 INTEGER,
value18 INTEGER, value19 INTEGER, value20 INTEGER, value21 INTEGER,
value22 INTEGER,
value23 INTEGER, value24 INTEGER, value25 INTEGER, value26 INTEGER,
value27 INTEGER,
value28 INTEGER, value29 INTEGER, value30 INTEGER, value31 INTEGER,
value32 INTEGER,
value33 INTEGER, value34 INTEGER, value35 INTEGER, value36 INTEGER,
value37 INTEGER,
value38 INTEGER, value39 INTEGER, PRIMARY KEY(name, value1))'


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


[sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread jkimble


>> Simple select and I cannot make it work:
>>
>>Select name from PerfTest1 where name = trim('key5000');

>Since 'key5000' doesn't have any leading or trailing spaces, applying
>trim() to it is pointless. Did you perhaps mean trim(name) = 'key5000' ?

Sorry, typo. I was doing trim(name)

>> This works:
>>
>>Select name from PerfTest1 where name like '%key5000%';

>This does suggest the value of "name" column has extraneous characters
>(possibly but not necessarily whitespace) surrounding the text
>'key5000'.

>See if this statement returns any rows. Any whitespace should be clearly
>visible:

>select '!' || name || '!' from PerfTest1
>where name != trim(name);

0 rows so it's not spaces. Could be unprintable characters I suppose. I've
tried a lot of different things and I still get no matches. I can do a
where with "like" all day long but no "=". Frustrating.

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


[sqlite] Why doesn't "where =" work for text field

2008-03-12 Thread jkimble


Simple select and I cannot make it work:

Select name from PerfTest1 where name = trim('key5000');

This works:

Select name from PerfTest1 where name like '%key5000%';

I don't see any spaces in the text field. Do you ALWAYS have to use a LIKE
to get a match for TEXT strings? If not, what am I missing here?


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


[sqlite] Odd problem with select on large table

2008-03-07 Thread jkimble

I created a 40 column table with 10,000 rows as a test database
for a reader and a writer process to bang on (performance proof).

The table is as so:

sqlite3 test.db 'create table PerfTest1 (name varchar(20),  value1 int,
value2 int, value3 int, value4 int, value5 int, value6 int, value7 int,
value8 int, value9 int, value10 int, value11 int, value12 int, value13
int,
value14 int, value15 int, value16 int, value17 int, value18 int, value19
int, value20 int, value21 int, value22 int, value23 int, value24 int,
value25 int,
value26 int, value27 int, value28 int, value29 int, value30 int, value31
int,
value32 int, value33 int, value34 int, value35 int, value36 int, value37
int,
value38 int, value39 int)'


The data is repetitive junk. Just: "key1", 1, 2, ,3 .  "key2", 1, 2,
3

What's driving me mad is that when I do a select from the command line
like so:

sqlite3 test.db `select name from PerfTest1 where name = "key5000"'

0 rows are returned. However if I do a simple:

sqlite3 test.db 'select name from PerfTest1'

and just let it go it prints all 1 rows!! Is this due to the type of
query prepartion done from the command line interface? Maybe limits the
size of something? That doesn't make a lot of sense either though
because if I query the specific row I want it returns nothing.


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


[sqlite] Performance.....

2008-03-05 Thread jkimble


I'm in the process of architecting the software for an embedded Linux system
that functions as a remote and local user interface to a control system.
There
will be a lot of analog (fast) data arriving via SPI bus and I'm thinking of
using SQLite to store this data in a well organized and easy to access
manner.

My main concern is performance. Has anyone had any similar application
experience they could comment on? I want to be able to insert data arriving
on the SPI bus and then query the data to update a GUI at a very high rate
(less than 250Ms). This is not real time so 250Ms is desirable but does not
have to be guaranteed.

Any thoughts or experience would be appreciated...




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


[sqlite] Compiling sources for Coldfire embedded platform

2008-03-01 Thread jkimble


I've downloaded and built the sources for the standard Intel Linux
platform but I want to run this on Linux on a Coldfire (MCF5484) platform.
How do I modify the compiler the build uses (short of just modifying the
Makefile)? I've looked at the Makefile.in but there's nothing obvious
about how to change it.

Didn't see any docs on this. Any help appreciated.

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