Re: [sqlite] fast acces to one memory located table from two threads

2010-03-24 Thread Jakub Ladman
One process, two threads.
I have found in documentation, that is not recommended to pass one connection 
from one thread to second one.

A partial succes, relative fast function, is proven with database file stored 
in ramdisk.
Hard disk file storage 16 inserts per second.
Ramdisk file storage 150 inserts per second.
Temporary table in ram 1500 inserts per second.

I have tried the one shared connection before i found the part in doc, that 
not recommends it, but there was some problems with locking in one 
configuration and segment violation in the second case.

Jakub Ladman
> Are you talking about two processes? If not, why these two threads have to
> have separated connections? If it's not necessary, I'd opened disk db,
> attach memory database to it (see http://www.sqlite.org/inmemorydb.html )
> and pass this db handle to both threads. One of them in this case will use
> only memory part of the base (fast appending), another one will do
>  necessary selects and inserts to disk db part. After the db is closed, you
>  will only have disk part left. I don't know more about locking logic in
>  this case, because for performance reasons, it would be better for
>  example, if memory part only locked its part not affecting the disk part.
> 
> Max
> ___
> 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] fast acces to one memory located table from two threads

2010-03-23 Thread Jakub Ladman
Dne úterý 23 března 2010 19:22:35 Pavel Ivanov napsal(a):
> I'd suggest you to use any kind of memory structure (like deque or

:-) I do not know what is deque.

> whatever you prefer) for transferring data from one thread to another.
> Besides anything else it will be faster than using SQLite for this
> particular task.

For better understanding, i need not only to transfer data between threads, 
but store fast in first thread and read sorted data in the second.
Sorting have to be done via some complex SELECTs.

If it is not possible, i will think about completely different schema, but i 
have no idea at this time, how to do it different way.

Jakub Ladman

> 
> As you have already understood there's no way you can make 2
> connections to one in-memory database. Although you can use one
> connection from both thread so that threads will naturally block each
> other while they're doing their piece of job.
> 
> 
> Pavel
> 
> On Tue, Mar 23, 2010 at 1:55 PM, Jakub Ladman <ladm...@volny.cz> wrote:
> > Hello to all
> >
> > I am back here to mailing list after about two years and also back to
> > programming with sqlite in general.
> >
> > I have new task and i do not know how to do it.
> >
> > I need an application consisting two threads.
> > In one of them i need to store incomming "messages" (one message is 1 to
> > 8 bytes of data) to temporary table existing only in memory.
> > It needs to be fast, storing hundreds of messages per second.
> > There i have a trigger deleting old rows and creating some sort of
> > circular buffer.
> > In separate thread there should be done some selects (read only) on this
> > table sorting the informations and storing them into separate table(s)
> > located on disk (jffs2 filesystem).
> >
> > I do not know how to do two connections to memory stored table(fast, and
> > not wasting the flash memory writes).
> > The database opened as :memory: is separate for every thread, same as
> > temporary table with pragma temp_store = MEMORY.
> >
> > Do you have any clue?
> > Is it completely stupid way?
> >
> > Thank You
> >
> > Jakub Ladman
> > ___
> > 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-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] fast acces to one memory located table from two threads

2010-03-23 Thread Jakub Ladman
Hello to all

I am back here to mailing list after about two years and also back to 
programming with sqlite in general.

I have new task and i do not know how to do it.

I need an application consisting two threads. 
In one of them i need to store incomming "messages" (one message is 1 to 8 
bytes of data) to temporary table existing only in memory. 
It needs to be fast, storing hundreds of messages per second.
There i have a trigger deleting old rows and creating some sort of circular 
buffer.
In separate thread there should be done some selects (read only) on this table 
sorting the informations and storing them into separate table(s) located on 
disk (jffs2 filesystem).

I do not know how to do two connections to memory stored table(fast, and not 
wasting the flash memory writes).
The database opened as :memory: is separate for every thread, same as 
temporary table with pragma temp_store = MEMORY.

Do you have any clue?
Is it completely stupid way?

Thank You

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


Re: [sqlite] How SQLite may work on AVR or similar mcu?

2007-06-17 Thread Jakub Ladman
Dne pátek 15 červen 2007 13:57 Eduardo Morras napsal(a):
> At 14:18 13/06/2007, you wrote:
> >I do not need it actually, but i am so inquisitive.
> >
> >I have heard that sqlite has been ported to AVR too.
> >How may be solved the main storage solved on it?
> >So for example, i have system with ATmega64 with 128KB of external SRAM.
> >The whole ram is organized as static 60KB and 18 pages of 4KB (the last
> > 4KB page lays in the internal RAM shadow), but it can be simlply
> > reconfigured because the memory address logic is provided by programmable
> > logic device (CPLD)
> >
> >As the firm data storage memory is there 1MB spi dataflash, but there is a
> >possibility to replace it with 16MB chip with the same interface for an
> >example.
> >
> >I am at 230th page of Mike Owen's book The definitive Guide to
> >SQLite and with
> >every next page, my image of SQL on a chip w/o OS  disappears in haze.
> >
> >Is i wrote before, i do not need it actually, i use sqlite in linux
> >environment.
> >
> >Thank you for let you make me a picture.
> >
> >Jakub Ladman
>
> 128KB RAM is very low. I have run it on powerpc 440 device with

Yes and that is the reason, why i am asking.

Somebody wrote here at mailing list, that he has ported sqlite to some 
architectures and the given list contains AVR eight bit risc microcontroller.
At the moment, when i understood how sqlite works, i have started to have 
doubts that's it even possible.

Jakub Ladman

> uclinux but with more ram (1GB). There is minimalist os that can be
> fit on a few KB, check contiki and contiki mail-list
> http://www.sics.se/contiki/
> https://lists.sourceforge.net/lists/listinfo/contiki-developers it's
> used on commodore 64 and other relics. I used it before in a
> development card (Virtex II Pro - xupv2p). You can cut down contiki
> and sqlite features. The problem will be the stack/heap that sqlite
> needs for run. I don't know about ATmega64 but can't you add a fpga
> with dram controller? Perhaps using a free i/o port or changing the
> cpld with the fpga?
>
> HTH
>
> --
> "General error, hit any user to continue."
>
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] How SQLite may work on AVR or similar mcu?

2007-06-13 Thread Jakub Ladman
I do not need it actually, but i am so inquisitive.

I have heard that sqlite has been ported to AVR too.
How may be solved the main storage solved on it?
So for example, i have system with ATmega64 with 128KB of external SRAM.
The whole ram is organized as static 60KB and 18 pages of 4KB (the last 4KB 
page lays in the internal RAM shadow), but it can be simlply reconfigured 
because the memory address logic is provided by programmable logic device 
(CPLD)

As the firm data storage memory is there 1MB spi dataflash, but there is a 
possibility to replace it with 16MB chip with the same interface for an 
example.

I am at 230th page of Mike Owen's book The definitive Guide to SQLite and with 
every next page, my image of SQL on a chip w/o OS  disappears in haze.

Is i wrote before, i do not need it actually, i use sqlite in linux 
environment.

Thank you for let you make me a picture.

Jakub Ladman

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] How can I change big-endian to little-endian in the database file

2007-04-03 Thread Jakub Ladman
I think there is no need to change endianess.
Sqlite is shadowing out this and similar low level aspects.
If you need to get data from database and use it in something what needs it in 
other endianess, you may use something like this.

int change_endianess(unsigned char *data, int length)
{
unsigned char *buffer;
int i;
buffer = malloc(length);
for(i=0;i> 8;
*((unsigned char *)&(buffer[1])) = addr & 0xff;

If i understand it correctly, changing physical representation of data in the 
database conflicts with SQL and relational databases principle.

Jakub

Dne úterý 03 duben 2007 09:49 Martin Pfeifle napsal(a):
> Dear all,
> in an upcoming project, it is required to store all integer values as
> little endian instead of big endian (don't ask why).
> Nevertheless, I would like to use SQLite in that project.
> What do we have to change in the sqlite library,
> if we store the integers as little endian.
> I came across some functions in B-tree.c and pager.c.
>
> In B-tree.c
> /* Read or write a two- and four-byte big-endian integer values.*/
> get2byte,
> get4byte,
> put2byte,
> put4byte
> /* pager.c*/
> ** All values are stored on disk as big-endian.
> */
> read32bits,
> write32bits
>
> Is that enough.
> Another question, what do we have to change if we would
> also store the utf-chars as little endian?
> I appreciate your help.
> Martin
>
>
>
>
>
>
> ___
> Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:
> http://mail.yahoo.de

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] how it works

2007-03-22 Thread Jakub Ladman
Dne čtvrtek 22 březen 2007 13:16 [EMAIL PROTECTED] napsal(a):
> Jakub Ladman <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > I need to know how this works in detail:
> > I have sqlite3 database file stored on SD/MMC FLASH card and i would to
> > insert rows to some tables often. There will be triggers to clean old and
> > obsolete data.
> > How often it will write to database file? After every INSERT command, or
> > it goes to some buffer in ram and file is updated as late as multiple
> > inserts are done?
>
> The database file is written when you COMMIT (either implicitly or
> explicitly) or when the internal cache overflows.
>
> The rollback journal file on the same flash card is written
> continuously as you make changes.

Thank you for answer.
Is there a possibility to store journal at some other place instead of the 
directory where main file stays?
Flash memory is not so good for "random access", because its limited number of 
writing cycles.
I think ramdisk is not a best place to store journal :-), but i have also 8KB 
of  non-volatile ferroelectric ram accessible through i2c bus (character 
device).
 But 8KB is not too much. May it be enough in some specific configuration, or 
is it completely wrong idea?

Thank you

Jakub

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] how it works

2007-03-22 Thread Jakub Ladman
Hi

I need to know how this works in detail:
I have sqlite3 database file stored on SD/MMC FLASH card and i would to insert 
rows to some tables often. There will be triggers to clean old and obsolete 
data.
How often it will write to database file? After every INSERT command, or it 
goes to some buffer in ram and file is updated as late as multiple inserts 
are done?
Do you understand me?
I do not know how to conceive this question in English exactly.

Best regards

Jakub Ladman

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Re: multithread problem

2007-03-20 Thread Jakub Ladman
Dne úterý 20 březen 2007 12:42 Igor Tandetnik napsal(a):
> Rafi Cohen <[EMAIL PROTECTED]> wrote:
> > 1. Should I open the database explicitly in the amin part and also in
> > the thread?
>
> In my experience, SQLite works best when every thread opens its own
> connection.

How should I understand it?
It is faster? Much secure or what?

I have multithreaded program, where some  threads are inserting data into 
tables (in random moments), two of them are retrieving subsets of data to 
send it via udp protocol over internet in short data length, and one thread 
operates as terminal for human users, where (single) user can fed sql 
statements and retrieve data in human readable format.
The architecture looks like this: Single thread locks a common mutex just 
before and then calls an sqlite api, when it receives excepted data, the 
mutex is unlocked.

Do you think that is there a better method?

Thank You

Jakub Ladman

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] notice: embedded system and locked database

2007-03-14 Thread Jakub Ladman
Dne pondělí 12 březen 2007 18:04 Martin Jenkins napsal(a):
> Jakub Ladman wrote:
> > Problem is, that this is pretty obscure system. Renesas SuperH SH4
> > CPU Heavily patched 2.4.18 kernel. (patches will be presented on
> > internet, but not at this time) Gentoo-embedded linux, based on
> > uclibc 0.9.28 and busybox . Main storage is SD flash card.
> >
> > I must confess, that i do not know, how to check the nfs version. (it
> > is binary distributed kernel and i have not the actual .config of it)
> > Dmesg shows it not.
>
> Hmm. I see your problem. 2.4.18 is quite old but if it's been patched
> about... It's possible to build the .config into the Linux kernel so
> that it appears under /proc (/proc/config.gz?) - I don't suppose they've
> done that?
>
> Martin

I will try it.
Yes i know, that this kernelis old, but our hardware and drivers supplier does 
not support any newer one :-(
It should be better in near future, i hope, but not at this time.

Jakub Ladman

>
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] additional functions in C

2007-03-12 Thread Jakub Ladman
I think i do understand it now.

Thank you


Dne pondělí 12 březen 2007 16:08 Dennis Cote napsal(a):
> Jakub Ladman wrote:
> > Cause i am really blockheaded - is there somebody so good-hearted, who
> > could write simple step by step directions how to add one simple function
> > to SQLite?
> >
> > I have found so many inspirations and documentation seems to be very
> > precise, but i do not understand it at its width.
> >
> > For example.
> >
> > 1) compile sqlite sources with  -DBLAHBLAH
> > 2) write your own functions to myfunctions.c as described here
> > www.blahblah.org
> > 3) to register new functions write this and do that ...
> > 4) use your functions like select * from tb1 where a = blahblah(b,c,d);
>
> Jakub,
>
> See the sample in a previous post at
> http://www.mail-archive.com/sqlite-users@sqlite.org/msg18608.html
>
> You might also want to search the list for "user defined function".
>
> You really would be well served by reading sqlite's func.c source file.
> It offers many sample functions written using the same APIs you will use.
>
> HTH
> Dennis Cote
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] additional functions in C

2007-03-12 Thread Jakub Ladman
Hi Friends

Cause i am really blockheaded - is there somebody so good-hearted, who could 
write simple step by step directions how to add one simple function to 
SQLite?

I have found so many inspirations and documentation seems to be very precise, 
but i do not understand it at its width.

For example.

1) compile sqlite sources with  -DBLAHBLAH
2) write your own functions to myfunctions.c as described here 
www.blahblah.org
3) to register new functions write this and do that ...
4) use your functions like select * from tb1 where a = blahblah(b,c,d);


Thank you

Jakub

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sin and similar functions

2007-03-11 Thread Jakub Ladman
Hi Dear Friens
I have found this advice in mailing list history:

I think you can compile the functions into a loadable
library (follow the instructions on creating a sqlite
loadable extension), and then load them in the console
app.  In linux:

  gcc myLoadableLibs.c -shared -o myLoadableLibs.so

then

  sqlite3> .load /home/jp/myLoadableLibs.so


Do someone knows which files from Mikey C's zip archive needs to be compiled 
into loadable extension?

Where are the instructions on creating loadable extension?

Thank You

Jakub Ladman


Dne sobota 10 březen 2007 00:48 Clark Christensen napsal(a):
> A poster here, "Mikey C", wrote some math functions and posted them a month
> or so ago.  You might have a look at
> http://www.mail-archive.com/sqlite-users@sqlite.org/msg21791.html
>
>  -Clark
>
> ----- Original Message 
> From: Jakub Ladman <[EMAIL PROTECTED]>
> To: sqlite-users@sqlite.org
> Sent: Friday, March 9, 2007 3:00:22 PM
> Subject: Re: [sqlite] sin and similar functions
>
> Thank you very much.
> Not only my english is poor, but my coordinated geometry too :-(
> But my software will make much more geometrical computations, so probably
> some in queries too.
> Please let You (or someone) direct me to the relevant part of documentation
> for defining new functions.
>
> Thank You
> Jakub
>
> Dne pátek 09 březen 2007 23:35 Dennis Cote napsal(a):
> > Jakub Ladman wrote:
> > > I will have table with sequence of coordinates (two dimensional space)
> > > and corresponding radiuses, so sequence of circles. And i need to use a
> > > sqlite query to detect if a actual coordinates (after their
> > > measurement) match some of the circle's square or not. And which
> > > circle, if match. And this must be for low CPU consumption optimised,
> > > so i am not sure, if separate sin table queries will be enough as fast
> > > as i need at needed precission.
> > >
> > > The whole algorithm is proven on mssql by my colegue, but he is using
> > > the native math functions.
> >
> > Jakub,
> >
> > I may not understand your problem completely, but it seems to me you can
> > solve your problem without using any trigonometric functions.
> >
> > If you have a table of circles like this
> >
> > create table circle (
> > id  integer primary key,
> > cx  real,
> > cy  real,
> > r   real
> > );
> >
> > You can find all the circles that contain a given point (px,py) using a
> > simple query based in the distance between the point and the center of
> > the circle.
> >
> > select id from circle
> > where (px-cx)*(px-cx)+(py-cy)*(py-cy) < r*r;
> >
> > If you want to create a user defined distance function you could
> > possibly speed up the calculation somewhat. You could then use a query
> > like:
> >
> > select id from circle
> > where distance(cx, cy, px, py) < r;
> >
> > where
> >
> > distance(cx, cy, px, py) = sqrt((px-cx)^2 + (py-cy)^2)
> >
> > HTH
> > Dennis Cote
> >
> >
> > -
> >-- -- To unsubscribe, send email to [EMAIL PROTECTED]
> > -
> >-- --
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--
>
>
>
>
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sin and similar functions

2007-03-10 Thread Jakub Ladman
Thank you very much.
I am new to this mailing list, so i missed it.
Jakub Ladman


Dne sobota 10 březen 2007 00:48 Clark Christensen napsal(a):
> A poster here, "Mikey C", wrote some math functions and posted them a month
> or so ago.  You might have a look at
> http://www.mail-archive.com/sqlite-users@sqlite.org/msg21791.html
>
>  -Clark
>
> - Original Message 
> From: Jakub Ladman <[EMAIL PROTECTED]>
> To: sqlite-users@sqlite.org
> Sent: Friday, March 9, 2007 3:00:22 PM
> Subject: Re: [sqlite] sin and similar functions
>
> Thank you very much.
> Not only my english is poor, but my coordinated geometry too :-(
> But my software will make much more geometrical computations, so probably
> some in queries too.
> Please let You (or someone) direct me to the relevant part of documentation
> for defining new functions.
>
> Thank You
> Jakub
>
> Dne pátek 09 březen 2007 23:35 Dennis Cote napsal(a):
> > Jakub Ladman wrote:
> > > I will have table with sequence of coordinates (two dimensional space)
> > > and corresponding radiuses, so sequence of circles. And i need to use a
> > > sqlite query to detect if a actual coordinates (after their
> > > measurement) match some of the circle's square or not. And which
> > > circle, if match. And this must be for low CPU consumption optimised,
> > > so i am not sure, if separate sin table queries will be enough as fast
> > > as i need at needed precission.
> > >
> > > The whole algorithm is proven on mssql by my colegue, but he is using
> > > the native math functions.
> >
> > Jakub,
> >
> > I may not understand your problem completely, but it seems to me you can
> > solve your problem without using any trigonometric functions.
> >
> > If you have a table of circles like this
> >
> > create table circle (
> > id  integer primary key,
> > cx  real,
> > cy  real,
> > r   real
> > );
> >
> > You can find all the circles that contain a given point (px,py) using a
> > simple query based in the distance between the point and the center of
> > the circle.
> >
> > select id from circle
> > where (px-cx)*(px-cx)+(py-cy)*(py-cy) < r*r;
> >
> > If you want to create a user defined distance function you could
> > possibly speed up the calculation somewhat. You could then use a query
> > like:
> >
> > select id from circle
> > where distance(cx, cy, px, py) < r;
> >
> > where
> >
> > distance(cx, cy, px, py) = sqrt((px-cx)^2 + (py-cy)^2)
> >
> > HTH
> > Dennis Cote
> >
> >
> > -
> >-- -- To unsubscribe, send email to [EMAIL PROTECTED]
> > -
> >-- --
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--
>
>
>
>
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sin and similar functions

2007-03-09 Thread Jakub Ladman
Thank you very much.
Not only my english is poor, but my coordinated geometry too :-(
But my software will make much more geometrical computations, so probably some 
in queries too.
Please let You (or someone) direct me to the relevant part of documentation 
for defining new functions.

Thank You
Jakub


Dne pátek 09 březen 2007 23:35 Dennis Cote napsal(a):
> Jakub Ladman wrote:
> > I will have table with sequence of coordinates (two dimensional space)
> > and corresponding radiuses, so sequence of circles. And i need to use a
> > sqlite query to detect if a actual coordinates (after their measurement)
> > match some of the circle's square or not. And which circle, if match.
> > And this must be for low CPU consumption optimised, so i am not sure, if
> > separate sin table queries will be enough as fast as i need at needed
> > precission.
> >
> > The whole algorithm is proven on mssql by my colegue, but he is using the
> > native math functions.
>
> Jakub,
>
> I may not understand your problem completely, but it seems to me you can
> solve your problem without using any trigonometric functions.
>
> If you have a table of circles like this
>
> create table circle (
> id  integer primary key,
> cx  real,
> cy  real,
> r   real
> );
>
> You can find all the circles that contain a given point (px,py) using a
> simple query based in the distance between the point and the center of
> the circle.
>
> select id from circle
> where (px-cx)*(px-cx)+(py-cy)*(py-cy) < r*r;
>
> If you want to create a user defined distance function you could
> possibly speed up the calculation somewhat. You could then use a query
> like:
>
> select id from circle
> where distance(cx, cy, px, py) < r;
>
> where
>
> distance(cx, cy, px, py) = sqrt((px-cx)^2 + (py-cy)^2)
>
> HTH
> Dennis Cote
>
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sin and similar functions

2007-03-09 Thread Jakub Ladman
But the question was "how"

Probably i am asking time after time stupid questions only - It is because my 
english is not half good to orientate oneself easily in the documentation, so 
quick summary in someones answer makes more than hours of reading docs.
Usualy i am asking if i understand not to some paragraph in docs.
Sometime it is enough to read it in other words.
(Something you consider as absolutely simple, may be difficult to understand, 
not technicaly, but as english text, or easy to overlook.

If you feel my questions  incommodious, please ignore it.

Thank You
Jakub Ladman




Dne pátek 09 březen 2007 22:57 John Stanton napsal(a):
> Just add a sine function in the normal manner of adding a function.  It
> is very simple.
>
> Jakub Ladman wrote:
> > Hi Friends
> >
> > Is there a possibility to have sin cos an acos, functions in sqlite?
> > How to write it in?
> > I really need it and i have fear, that sinus values table will be so slow
> > and so big for critical precission.
> >
> > I will need to select coordinates which are laying in circle of known
> > center and radius.
> > Unfortunately at small time intervals and on a slow machine.
> >
> > Thanks
> >
> > Jakub
> >
> > -
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > -
> >
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] sin and similar functions

2007-03-09 Thread Jakub Ladman
I am sorry, it seems to be unreadable bacause of my very bad english.
I try to correct it little bit.

Hi Friends :-)

Is there a possibility to have sin, cos anD acos, functions in sqlite?
How to write it in? I have read (Mike Owens article at LinuxJournal), that it 
is possible to write new function to expand standard set of functions as 
avg(), min(), sum() etc.

I will have table with sequence of coordinates (two dimensional space) and 
corresponding radiuses, so sequence of circles. And i need to use a sqlite 
query to detect if a actual coordinates (after their measurement) match some 
of the circle's square or not. And which circle, if match.
And this must be for low CPU consumption optimised, so i am not sure, if 
separate sin table queries will be enough as fast as i need at needed 
precission.

The whole algorithm is proven on mssql by my colegue, but he is using the 
native math functions.

Thanks

Jakub

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] sin and similar functions

2007-03-09 Thread Jakub Ladman
Hi Friends

Is there a possibility to have sin cos an acos, functions in sqlite?
How to write it in?
I really need it and i have fear, that sinus values table will be so slow and 
so big for critical precission.

I will need to select coordinates which are laying in circle of known center 
and radius.
Unfortunately at small time intervals and on a slow machine.

Thanks

Jakub

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] notice: embedded system and locked database

2007-03-09 Thread Jakub Ladman
Dne čtvrtek 08 březen 2007 17:02 Martin Jenkins napsal(a):
> Jakub Ladman wrote:
> > Now i have discovered, that this appears only if the database file is
> > stored on the nfs filesystem (posibly too slow, or something similar)
>
> There have been many threads on this list about NFS locking being
> broken, but few reports of it actually happening. Could you post a few
> details about the OS versions and file systems in your environment for
> future reference?
>
> > I will try to togle some nfs parameters as sync/async and so...
>
> Judging by earlier threads this may not help. :( The basic problem is
> that some NFS implementations have faulty locking, so tweaking might
> just mask the problem until later.
>
> Martin

Problem is, that this is pretty obscure system.
Renesas SuperH SH4 CPU
Heavily patched 2.4.18 kernel. (patches will be presented on internet, but not 
at this time)
Gentoo-embedded linux, based on uclibc 0.9.28 and busybox .
Main storage is SD flash card.

I must confess, that i do not know, how to check the nfs version. (it is 
binary distributed kernel and i have not the actual .config of it)
Dmesg shows it not.

Jakub Ladman

>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] stupid man's manual to sqlite?

2007-03-08 Thread Jakub Ladman
So i will try it.

But what to do before the book will be here?

  rc = sqlite3_exec(db, argv[2], callback, 0, );
  if( rc!=SQLITE_OK ){
fprintf(stderr, "SQL error: %s\n", zErrMsg);
sqlite3_free(zErrMsg);
  }


What does the code if argument is 'select * from tbl1'?
I see, that the results are printed on the screen, but how to fill variables 
from the found values for example.

Is there some  well arranged manual on the internet?

Thank you

Jakub


Dne čtvrtek 08 březen 2007 16:08 Anderson, James H (IT) napsal(a):
> You won't be disappointed , it's a terrific book!
>
> -Original Message-
> From: Jakub Ladman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 08, 2007 9:51 AM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] stupid man's manual to sqlite?
>
> Thank you i will try my possibilities buying from amazon, while i am based
> in the Czech republic.
> Unfortunately it is little bit expensive for me, to buy it without looking
> into it before.
> Jakub
>
> Dne čtvrtek 08 březen 2007 15:25 Samuel R. Neff napsal(a):
> > I'd suggest Mike Owens book "The Definitive Guid to SQLite".  We just
> > started working with SQLite and are very impressed by the book.  It's a
> > very easy read, well written, and covers a ton of details of internals on
> > SQLite. There are several chapters with examples on using the C API (as
> > well as other language extensions).
> >
> > http://www.amazon.com/Definitive-Guide-SQLite/dp/1590596730/ref=pd_bbs_sr
> >_1 / 002-0953141-3838416
> >
> > HTH,
> >
> > Sam
> >
> >
> >
> > ---
> > We're Hiring! Seeking a passionate developer to join our team building
> > products. Position is in the Washington D.C. metro area. If interested
> > contact [EMAIL PROTECTED]
> >
> > -Original Message-
> > From: Jakub Ladman [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 08, 2007 7:26 AM
> > To: sqlite-users@sqlite.org
> > Subject: [sqlite] stupid man's manual to sqlite?
> >
> > Hi (much smarter) friends.
> > I need to start with sqlite (interfaced via C language) very quickly,
> > unfortunately.
> > I have not any experiences with any SQL, only some books.
> > I am searching for some "stupid man's manual to sqlite".
> > I can not found any basic's in documentation section of sqlite.org
> >
> >
> > -
> >-- -- To unsubscribe, send email to [EMAIL PROTECTED]
> > -
> >-- --
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>-- 
>
> NOTICE: If received in error, please destroy and notify sender. Sender does
> not intend to waive confidentiality or privilege. Use of this email is
> prohibited when received in error.
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] notice: embedded system and locked database

2007-03-08 Thread Jakub Ladman
Few days ago i have had problem with "SQL error: database is locked"
Now i have discovered, that this appears only if the database file is stored 
on the nfs filesystem (posibly too slow, or something similar)

I will try to togle some nfs parameters as sync/async and so...

Jakub

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] stupid man's manual to sqlite?

2007-03-08 Thread Jakub Ladman
Thank you i will try my possibilities buying from amazon, while i am based in 
the Czech republic.
Unfortunately it is little bit expensive for me, to buy it without looking 
into it before.
Jakub


Dne čtvrtek 08 březen 2007 15:25 Samuel R. Neff napsal(a):
> I'd suggest Mike Owens book "The Definitive Guid to SQLite".  We just
> started working with SQLite and are very impressed by the book.  It's a
> very easy read, well written, and covers a ton of details of internals on
> SQLite. There are several chapters with examples on using the C API (as
> well as other language extensions).
>
> http://www.amazon.com/Definitive-Guide-SQLite/dp/1590596730/ref=pd_bbs_sr_1
>/ 002-0953141-3838416
>
> HTH,
>
> Sam
>
>
>
> ---
> We're Hiring! Seeking a passionate developer to join our team building
> products. Position is in the Washington D.C. metro area. If interested
> contact [EMAIL PROTECTED]
>
> -Original Message-
> From: Jakub Ladman [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 08, 2007 7:26 AM
> To: sqlite-users@sqlite.org
> Subject: [sqlite] stupid man's manual to sqlite?
>
> Hi (much smarter) friends.
> I need to start with sqlite (interfaced via C language) very quickly,
> unfortunately.
> I have not any experiences with any SQL, only some books.
> I am searching for some "stupid man's manual to sqlite".
> I can not found any basic's in documentation section of sqlite.org
>
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] crosscompiling dynamic library

2007-03-08 Thread Jakub Ladman
Now i have complete answer, every object file must be compiled with -fPIC 
parameter, now it seems to be good.
Jakub

Dne čtvrtek 08 březen 2007 15:33 Jakub Ladman napsal(a):
> I have found that it may be problem with something called TEXTREL
> I do not know what is it, but:
>
> [EMAIL PROTECTED] ~/src/shsqlite $ sh4-pc-linux-uclibc-gcc -shared *.o -o
> libsqlite3.so
> /usr/libexec/gcc/sh4-pc-linux-uclibc/ld: warning: creating a DT_TEXTREL in
> object.
> [EMAIL PROTECTED] ~/src/shsqlite $
>
> How do I disable creation of DT_TEXTREL?
>
> Thank You
>
> Jakub
>
> Dne čtvrtek 08 březen 2007 15:03 Jakub Ladman napsal(a):
> > Hi there
> >
> > I have discovered problem while trying to run crosscompiled simple test
> > program for my target embedded system.
> >
> >
> >
> > /mnt/nfs/home/jakub/shsqlite $ ./testsql test.db 'create table tbl1(one
> > varchar(10), two smallint)'
> > Can't modify /usr/lib/libsqlite3.so's text section. Use GCC option -fPIC
> > for shared objects, please.
> > /mnt/nfs/home/jakub/shsqlite $
> >
> > program was compiled as:
> > ~/src/shsqlite/testsql $
> > sh4-pc-linux-uclibc-gcc -lpthread -lsqlite3 -ldl -L../ testsql.c -fPIC -o
> > testsql
> >
> > library was linked as:
> > sh4-pc-linux-uclibc-gcc -fPIC -shared *.o -o libsqlite3.so
> > from directory with .o files from linux makefile
> >
> >
> > What's wrong?
> >
> > I tried both -fPIC enabled and disablen on even library and executable.
> >
> > Thank you for your help
> >
> > Jakub
> >
> > -
> >-- -- To unsubscribe, send email to [EMAIL PROTECTED]
> > -
> >-- --
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] crosscompiling dynamic library

2007-03-08 Thread Jakub Ladman
I have found that it may be problem with something called TEXTREL
I do not know what is it, but:

[EMAIL PROTECTED] ~/src/shsqlite $ sh4-pc-linux-uclibc-gcc -shared *.o -o 
libsqlite3.so
/usr/libexec/gcc/sh4-pc-linux-uclibc/ld: warning: creating a DT_TEXTREL in 
object.
[EMAIL PROTECTED] ~/src/shsqlite $ 

How do I disable creation of DT_TEXTREL?

Thank You

Jakub


Dne čtvrtek 08 březen 2007 15:03 Jakub Ladman napsal(a):
> Hi there
>
> I have discovered problem while trying to run crosscompiled simple test
> program for my target embedded system.
>
>
>
> /mnt/nfs/home/jakub/shsqlite $ ./testsql test.db 'create table tbl1(one
> varchar(10), two smallint)'
> Can't modify /usr/lib/libsqlite3.so's text section. Use GCC option -fPIC
> for shared objects, please.
> /mnt/nfs/home/jakub/shsqlite $
>
> program was compiled as:
> ~/src/shsqlite/testsql $
> sh4-pc-linux-uclibc-gcc -lpthread -lsqlite3 -ldl -L../ testsql.c -fPIC -o
> testsql
>
> library was linked as:
> sh4-pc-linux-uclibc-gcc -fPIC -shared *.o -o libsqlite3.so
> from directory with .o files from linux makefile
>
>
> What's wrong?
>
> I tried both -fPIC enabled and disablen on even library and executable.
>
> Thank you for your help
>
> Jakub
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] crosscompiling dynamic library

2007-03-08 Thread Jakub Ladman
Hi there

I have discovered problem while trying to run crosscompiled simple test 
program for my target embedded system.



/mnt/nfs/home/jakub/shsqlite $ ./testsql test.db 'create table tbl1(one 
varchar(10), two smallint)'
Can't modify /usr/lib/libsqlite3.so's text section. Use GCC option -fPIC for 
shared objects, please.
/mnt/nfs/home/jakub/shsqlite $

program was compiled as:
~/src/shsqlite/testsql $ 
sh4-pc-linux-uclibc-gcc -lpthread -lsqlite3 -ldl -L../ testsql.c -fPIC -o 
testsql

library was linked as:
sh4-pc-linux-uclibc-gcc -fPIC -shared *.o -o libsqlite3.so
from directory with .o files from linux makefile


What's wrong?

I tried both -fPIC enabled and disablen on even library and executable.

Thank you for your help

Jakub 

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] stupid man's manual to sqlite?

2007-03-08 Thread Jakub Ladman
Dne čtvrtek 08 březen 2007 13:34 Pavan napsal(a):
> Hi Jakub,
>
> Check this link
> http://sqlite.org/quickstart.html
> There is a sample program. compile it and run executable in this form
>
> $./a.out test.db 'create table tbl1(one varchar(10), two smallint)'
> $./a.out test.db 'insert into tbl1 values('hello!',10)'
> $./a.out test.db 'select * from tbl1'
>
Thank you, very very very much.
Jakub

> Thanks,
> Pavan.
>
> On 3/8/07, Jakub Ladman <[EMAIL PROTECTED]> wrote:
> > Hi (much smarter) friends.
> > I need to start with sqlite (interfaced via C language) very quickly,
> > unfortunately.
> > I have not any experiences with any SQL, only some books.
> > I am searching for some "stupid man's manual to sqlite".
> > I can not found any basic's in documentation section of sqlite.org
> >
> > For example: I do understand this:
> >
> > $ sqlite3 ex1
> > SQLite version 3.3.10
> > Enter ".help" for instructions
> > sqlite> create table tbl1(one varchar(10), two smallint);
> > sqlite> insert into tbl1 values('hello!',10);
> > sqlite> insert into tbl1 values('goodbye', 20);
> > sqlite> select * from tbl1;
> > hello!|10
> > goodbye|20
> > sqlite>
> >
> >
> > but not this:
> > rc = sqlite3_exec(db, argv[2], callback, 0, );
> >
> > What format of the command line argument should i write?
> >
> > Thank you for any advice.
> >
> > Jakub Ladman
> >
> >
> > -
> > To unsubscribe, send email to [EMAIL PROTECTED]
> >
> > -
> >

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] stupid man's manual to sqlite?

2007-03-08 Thread Jakub Ladman
Oh, wikipedia says " It also serves as an example for writing applications 
that use the SQLite library." 
Of course, why do i not get it myself?
Jakub

Dne čtvrtek 08 březen 2007 13:26 Jakub Ladman napsal(a):
> Hi (much smarter) friends.
> I need to start with sqlite (interfaced via C language) very quickly,
> unfortunately.
> I have not any experiences with any SQL, only some books.
> I am searching for some "stupid man's manual to sqlite".
> I can not found any basic's in documentation section of sqlite.org
>
> For example: I do understand this:
>
> $ sqlite3 ex1
>  SQLite version 3.3.10
>  Enter ".help" for instructions
>  sqlite> create table tbl1(one varchar(10), two smallint);
>  sqlite> insert into tbl1 values('hello!',10);
>  sqlite> insert into tbl1 values('goodbye', 20);
>  sqlite> select * from tbl1;
>  hello!|10
>  goodbye|20
>  sqlite>
>
>
> but not this:
>  rc = sqlite3_exec(db, argv[2], callback, 0, );
>
> What format of the command line argument should i write?
>
> Thank you for any advice.
>
> Jakub Ladman
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] stupid man's manual to sqlite?

2007-03-08 Thread Jakub Ladman
Hi (much smarter) friends.
I need to start with sqlite (interfaced via C language) very quickly, 
unfortunately.
I have not any experiences with any SQL, only some books.
I am searching for some "stupid man's manual to sqlite".
I can not found any basic's in documentation section of sqlite.org

For example: I do understand this: 

$ sqlite3 ex1
 SQLite version 3.3.10
 Enter ".help" for instructions
 sqlite> create table tbl1(one varchar(10), two smallint);
 sqlite> insert into tbl1 values('hello!',10);
 sqlite> insert into tbl1 values('goodbye', 20);
 sqlite> select * from tbl1;
 hello!|10
 goodbye|20
 sqlite> 


but not this:
 rc = sqlite3_exec(db, argv[2], callback, 0, );

What format of the command line argument should i write?

Thank you for any advice.

Jakub Ladman

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Sqlite for Embedded Devices

2007-03-01 Thread Jakub Ladman
Dne čtvrtek 01 březen 2007 13:11 Pavan napsal(a):
> Hi,
>
> Could anyone share their observations/comments on having used sqlite as DB
> for embedded linux environment.

I have just started.
Now i have sqlite compiled for embedded linux based on kernel 2.4.18 and 
uclibc library on Renesas SuperH cpu SH7760, it seems to be working good, but 
i am thorough beginner in SQL technology generally.
Maybe later ...

Jakub

>
> Thanks,
> Pavan.

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Jakub Ladman
Dne úterý 27 únor 2007 20:47 Martin Jenkins napsal(a):
> Jakub Ladman wrote:
> > Problem is, that i do not know tcl. I know only that it exist.
> > Jakub
>
> That's OK, it's just another target (make test) in the Makefile. You
> don't need to know any Tcl, you just have to install the source code and
> know where you've installed it.
>
> make test builds a program (called testfixture) which drives the sqlite
> library you've just built from tiny Tcl programs. Dr Hipp has written
> lots of these programs over the years. You might have to tweak the tool
> chain but as you've already built the library you should be OK. The test
> suite has over 20,000 tests in it, so it's well worth getting it going
> on a port to a new platform.
>
> Martin

But there is not tcl library at the time and when I tried to build sqlite 
without -DNO_TCL it failed.
I can test it on the sh4 cpu for the community, of course, if you think it 
will be usefull.

Jakub
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Jakub Ladman
My target is sh4-pc-linux-uclibc

And now i have .so too.

sh4-pc-linux-uclibc-gcc -shared *.o -o sqlite3.so

Dne úterý 27 únor 2007 16:39 Jakub Ladman napsal(a):
> Dne úterý 27 únor 2007 16:31 anis chaaba napsal(a):
> > you need the libsqlite.so.0... or the libsqlite3.so crosscompiled
> >
> :-( there is no .so file :-(
>
> Jakub
>
> > if you need the commande line copy sqlite3 or sqlite to your target
> >
> > 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>:
> > > Hi everybody
> > > Which files do i need at target (small embedded linux system)?
> > >
> > > after make i have these files
> > >
> > > alter.ohash.o opcodes.o  pragma.o   utf.o
> > > analyze.o  insert.o   os.o   prepare.o  util.o
> > > attach.o   keywordhash.h  os_os2.o   printf.o   vacuum.o
> > > auth.o legacy.o   os_unix.o  random.o   vdbe.o
> > > btree.olemon  os_win.o   select.o   vdbeapi.o
> > > build.olempar.c   pager.osqlite3vdbeaux.o
> > > callback.o libsqlite3.a   parse.csqlite3.h  vdbefifo.o
> > > complete.o loadext.o  parse.htable.ovdbemem.o
> > > date.o main.o parse.h.temp   tclsqlite.ovtab.o
> > > delete.o   mkkeywordhash  parse.otokenize.o where.o
> > > expr.o opcodes.c  parse.out  trigger.o
> > > func.o opcodes.h  parse.yupdate.o
> > > /mnt/nfs/home/jakub/shsqlite $
> > >
> > >
> > > Which files are necessary for running, and which for linking to my own
> > > C programs?
> > >
> > > And what should i do with this?
> > >
> > > SQLite version 3.3.13
> > > Enter ".help" for instructions
> > > sqlite> create table tbl1(one varchar(10), two smallint);
> > > SQL error: database is locked
> > > sqlite>
> > >
> > >
> > > Thank you
> > > Jakub Ladman
> > >
> > >
> > >
> > >
> > > ---
> > >--  To unsubscribe, send email to
> > > [EMAIL PROTECTED]
> > >
> > > ---
> > >-- 
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Jakub Ladman
Dne úterý 27 únor 2007 16:46 Martin Jenkins napsal(a):
> Jakub Ladman wrote:
> > And what should i do with this?
> >
> > SQLite version 3.3.13
> > Enter ".help" for instructions
> > sqlite> create table tbl1(one varchar(10), two smallint);
> > SQL error: database is locked
> > sqlite>
>
> What was the command line? Can you get Tcl running on your machine? As
> you've effectively made a effectively new port it would be a good idea
> to try and get the tests working - they should pinpoint any areas which
> aren't working. A list of failing tests should make it easier to track
> the problem down than a "database locked" from the shell.

Problem is, that i do not know tcl. I know only that it exist.
Jakub


>
> Martin
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] SQL error: database is locked

2007-02-27 Thread Jakub Ladman
Dne úterý 27 únor 2007 16:44 anis chaaba napsal(a):
> there's another process using the data base or executing a transaction
No there's not. :-(

I have fear, that is some bug in croscompilation.

Jakub Ladman

>
> 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>:
> > Dear Friends
> > Please let me know what should i do with this?
> >
> > SQLite version 3.3.13
> > Enter ".help" for instructions
> > sqlite> create table tbl1(one varchar(10), two smallint);
> > SQL error: database is locked
> > sqlite>
> >
> > (sqlite is launched by root)
> >
> > Jakub Ladman
> >
> >
> > -
> > To unsubscribe, send email to [EMAIL PROTECTED]
> >
> > -
> >

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Jakub Ladman
Dne úterý 27 únor 2007 16:31 anis chaaba napsal(a):
> you need the libsqlite.so.0... or the libsqlite3.so crosscompiled
:-( there is no .so file :-(

Jakub
> if you need the commande line copy sqlite3 or sqlite to your target
>
> 2007/2/27, Jakub Ladman <[EMAIL PROTECTED]>:
> > Hi everybody
> > Which files do i need at target (small embedded linux system)?
> >
> > after make i have these files
> >
> > alter.ohash.o opcodes.o  pragma.o   utf.o
> > analyze.o  insert.o   os.o   prepare.o  util.o
> > attach.o   keywordhash.h  os_os2.o   printf.o   vacuum.o
> > auth.o legacy.o   os_unix.o  random.o   vdbe.o
> > btree.olemon  os_win.o   select.o   vdbeapi.o
> > build.olempar.c   pager.osqlite3vdbeaux.o
> > callback.o libsqlite3.a   parse.csqlite3.h  vdbefifo.o
> > complete.o loadext.o  parse.htable.ovdbemem.o
> > date.o main.o parse.h.temp   tclsqlite.ovtab.o
> > delete.o   mkkeywordhash  parse.otokenize.o where.o
> > expr.o opcodes.c  parse.out  trigger.o
> > func.o opcodes.h  parse.yupdate.o
> > /mnt/nfs/home/jakub/shsqlite $
> >
> >
> > Which files are necessary for running, and which for linking to my own C
> > programs?
> >
> > And what should i do with this?
> >
> > SQLite version 3.3.13
> > Enter ".help" for instructions
> > sqlite> create table tbl1(one varchar(10), two smallint);
> > SQL error: database is locked
> > sqlite>
> >
> >
> > Thank you
> > Jakub Ladman
> >
> >
> >
> >
> > -
> > To unsubscribe, send email to [EMAIL PROTECTED]
> >
> > -
> >

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] SQL error: database is locked

2007-02-27 Thread Jakub Ladman
Dear Friends
Please let me know what should i do with this?

SQLite version 3.3.13
Enter ".help" for instructions
sqlite> create table tbl1(one varchar(10), two smallint);
SQL error: database is locked
sqlite>

(sqlite is launched by root)
 
Jakub Ladman

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



[sqlite] Crosscompiled sqlite was: developer mailing list

2007-02-27 Thread Jakub Ladman
Hi everybody
Which files do i need at target (small embedded linux system)?

after make i have these files

alter.ohash.o opcodes.o  pragma.o   utf.o
analyze.o  insert.o   os.o   prepare.o  util.o
attach.o   keywordhash.h  os_os2.o   printf.o   vacuum.o
auth.o legacy.o   os_unix.o  random.o   vdbe.o
btree.olemon  os_win.o   select.o   vdbeapi.o
build.olempar.c   pager.osqlite3vdbeaux.o
callback.o libsqlite3.a   parse.csqlite3.h  vdbefifo.o
complete.o loadext.o  parse.htable.ovdbemem.o
date.o main.o parse.h.temp   tclsqlite.ovtab.o
delete.o   mkkeywordhash  parse.otokenize.o where.o
expr.o opcodes.c  parse.out  trigger.o
func.o opcodes.h  parse.yupdate.o
/mnt/nfs/home/jakub/shsqlite $


Which files are necessary for running, and which for linking to my own C 
programs?

And what should i do with this?

SQLite version 3.3.13
Enter ".help" for instructions
sqlite> create table tbl1(one varchar(10), two smallint);
SQL error: database is locked
sqlite>    


Thank you
Jakub Ladman



-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] developers mailing list

2007-02-26 Thread Jakub Ladman
Ok, now is it linked together, i will try, if it is functional.

Jakub Ladman



Dne pondělí 26 únor 2007 20:23 Martin Jenkins napsal(a):
> Jakub Ladman wrote:
> > but after correction of this i get:
> >
> > libsqlite3.a   -lpthread
> > libsqlite3.a(os_unix.o): In function `sqlite3UnixDlopen':
> > os_unix.c:(.text+0x848): undefined reference to `dlopen'
> > libsqlite3.a(os_unix.o): In function `sqlite3UnixDlsym':
> > os_unix.c:(.text+0x85c): undefined reference to `dlsym'
> > libsqlite3.a(os_unix.o): In function `sqlite3UnixDlclose':
> > os_unix.c:(.text+0x870): undefined reference to `dlclose'
> > collect2: ld returned 1 exit status
> > make: *** [sqlite3] Error 1
> > [EMAIL PROTECTED] ~/src/sqlite-3.3.13 $
>
> You're nearly there. The compile has completed, and it's failed at the
> link stage. You need to add "-ldl" to the end of the recipe so the
> linker can find dlopen et al.
>
> Martin
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] developers mailing list

2007-02-26 Thread Jakub Ladman
more accurately

ranlib libsqlite3.a
sh4-pc-linux-uclibc-gcc -Os -DNDEBUG=1 -DHAVE_FDATASYNC=1 -DNO_TCL 
-DTHREADSAFE=1 -DHAVE_USLEEP=1 -I. -I../sqlite-3.3.13/src  -o 
sqlite3 ../sqlite-3.3.13/src/shell.c \
libsqlite3.a   -lpthread
libsqlite3.a(os_unix.o): In function `sqlite3UnixDlopen':
os_unix.c:(.text+0x848): undefined reference to `dlopen'
libsqlite3.a(os_unix.o): In function `sqlite3UnixDlsym':
os_unix.c:(.text+0x85c): undefined reference to `dlsym'
libsqlite3.a(os_unix.o): In function `sqlite3UnixDlclose':
os_unix.c:(.text+0x870): undefined reference to `dlclose'
collect2: ld returned 1 exit status
make: *** [sqlite3] Error 1
[EMAIL PROTECTED] ~/src/sqlite-3.3.13 $   

Jakub Ladman

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] developers mailing list

2007-02-26 Thread Jakub Ladman
Dne pondělí 26 únor 2007 12:25 Gunnar Roth napsal(a):
> Jakub Ladman schrieb:
> >> 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
Yes, i am idiot!!

but after correction of this i get:

libsqlite3.a   -lpthread
libsqlite3.a(os_unix.o): In function `sqlite3UnixDlopen':
os_unix.c:(.text+0x848): undefined reference to `dlopen'
libsqlite3.a(os_unix.o): In function `sqlite3UnixDlsym':
os_unix.c:(.text+0x85c): undefined reference to `dlsym'
libsqlite3.a(os_unix.o): In function `sqlite3UnixDlclose':
os_unix.c:(.text+0x870): undefined reference to `dlclose'
collect2: ld returned 1 exit status
make: *** [sqlite3] Error 1
[EMAIL PROTECTED] ~/src/sqlite-3.3.13 $   

> >>
> >>
> >>
> >> Dan.
> >>
> > :-(
> >
> > This i get when i use makefile which is attached to this mail.
> >
> > Jakub Ladman
> >
> > [EMAIL PROTECTED] ~/src/sqlite-3.3.13 $ make -f mymakefile
> > sed -e s/--VERS--/`cat ../sqlite-3.3.13/VERSION`/ \
> > -e s/--VERSION-NUMBER--/`cat ../sqlite-3.3.13/VERSION |
> > sed 's/[^0-9]/ /g' | awk '{printf "%d%03d%03d",$1,$2,$3}'`/ \
> >  ../sqlite-3.3.13/src/sqlite.h.in >sqlite3.h
> > gcc -g -O2 -o lemon ../sqlite-3.3.13/tool/lemon.c
> > cp ../sqlite-3.3.13/tool/lempar.c .
> > cp ../sqlite-3.3.13/src/parse.y .
> > ./lemon -DNDEBUG=1 -DHAVE_FDATASYNC=1 -DNOTCL parse.y
>
> NOTCL != NO_TCL
>
> you see?
>
> regards,
> gunnar
>
>
> ---
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---
>--

-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] developers mailing list

2007-02-25 Thread Jakub Ladman
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]
-



Re: [sqlite] developers mailing list

2007-02-25 Thread Jakub Ladman
> > 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] developers mailing list

2007-02-25 Thread Jakub Ladman
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]
-



[sqlite] developers mailing list

2007-02-25 Thread Jakub Ladman
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]
-



[sqlite] Problem with crosscompiler and sqlite - was subject mismatch Re: [sqlite] sqlite ebuild - my problem, i have half year ago, is still here.

2007-02-24 Thread Jakub Ladman
Dne sobota 24 únor 2007 18:33 Jakub Ladman napsal(a):
> Hi Friends
> Please help me
> I need crosscompile sqlite for my sh4 cpu based linux system, but configure
> script (any version of sqlite i have tryed, even the actual one from sqlite
> homepage) fails if crosscompilation is selected.
> Crosscompiler works good in other cases.
> Thank you very much.
>
> Jakub Ladman
>
> ./configure --build=i686-pc-linux-gnu --host=sh4-pc-linux-uclibc
> --disable-tcl checking build system type... i686-pc-linux-gnu
> checking host system type... sh4-pc-linux-uclibc
> checking for sh4-pc-linux-uclibc-gcc... sh4-pc-linux-uclibc-gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... yes
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether sh4-pc-linux-uclibc-gcc accepts -g... yes
> checking for sh4-pc-linux-uclibc-gcc option to accept ANSI C... none needed
> checking for a sed that does not truncate output... /bin/sed
> checking for egrep... grep -E
> checking for ld used by sh4-pc-linux-uclibc-gcc... sh4-pc-linux-uclibc-ld
> checking if the linker (sh4-pc-linux-uclibc-ld) is GNU ld... yes
> checking for sh4-pc-linux-uclibc-ld option to reload object files... -r
> checking for BSD-compatible nm... /usr/bin/sh4-pc-linux-uclibc-nm -B
> checking whether ln -s works... yes
> checking how to recognise dependent libraries... pass_all
> checking how to run the C preprocessor... sh4-pc-linux-uclibc-gcc -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking dlfcn.h usability... yes
> checking dlfcn.h presence... yes
> checking for dlfcn.h... yes
> checking for sh4-pc-linux-uclibc-g++... sh4-pc-linux-uclibc-g++
> checking whether we are using the GNU C++ compiler... yes
> checking whether sh4-pc-linux-uclibc-g++ accepts -g... yes
> checking how to run the C++ preprocessor... sh4-pc-linux-uclibc-g++ -E
> checking for sh4-pc-linux-uclibc-g77... sh4-pc-linux-uclibc-g77
> checking whether we are using the GNU Fortran 77 compiler... yes
> checking whether sh4-pc-linux-uclibc-g77 accepts -g... yes
> checking the maximum length of command line arguments... 32768
> checking command to parse /usr/bin/sh4-pc-linux-uclibc-nm -B output from
> sh4-pc-linux-uclibc-gcc object... ok
> checking for objdir... .libs
> checking for sh4-pc-linux-uclibc-ar... sh4-pc-linux-uclibc-ar
> checking for sh4-pc-linux-uclibc-ranlib... sh4-pc-linux-uclibc-ranlib
> checking for sh4-pc-linux-uclibc-strip... sh4-pc-linux-uclibc-strip
> checking if sh4-pc-linux-uclibc-gcc static flag  works... yes
> checking if sh4-pc-linux-uclibc-gcc supports -fno-rtti -fno-exceptions...
> no checking for sh4-pc-linux-uclibc-gcc option to produce PIC... -fPIC
> checking if sh4-pc-linux-uclibc-gcc PIC flag -fPIC works... yes
> checking if sh4-pc-linux-uclibc-gcc supports -c -o file.o... yes
> checking whether the sh4-pc-linux-uclibc-gcc linker
> (sh4-pc-linux-uclibc-ld) supports shared libraries... yes
> checking whether -lc should be explicitly linked in... no
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... yes
> configure: creating libtool
> appending configuration tag "CXX" to libtool
> checking for ld used by sh4-pc-linux-uclibc-g++... sh4-pc-linux-uclibc-ld
> checking if the linker (sh4-pc-linux-uclibc-ld) is GNU ld... yes
> checking whether the sh4-pc-linux-uclibc-g++ linker
> (sh4-pc-linux-uclibc-ld) supports shared libraries... yes
> checking for sh4-pc-linux-uclibc-g++ option to produce PIC... -fPIC
> checking if sh4-pc-linux-uclibc-g++ PIC flag -fPIC works... yes
> checking if sh4-pc-linux-uclibc-g++ supports -c -o file.o... yes
> checking whether the sh4-pc-linux-uclibc-g++ linker
> (sh4-pc-linux-uclibc-ld) supports shared libraries... yes
> checking dynamic linker characteristics... GNU/Linux ld.so
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> appending configuration tag "F77" to libtool
> checking if libtool supports shared libraries.

[sqlite] sqlite ebuild - my problem, i have half year ago, is still here.

2007-02-24 Thread Jakub Ladman
Hi Friends
Please help me
I need crosscompile sqlite for my sh4 cpu based linux system, but configure 
script (any version of sqlite i have tryed, even the actual one from sqlite 
homepage) fails if crosscompilation is selected.
Crosscompiler works good in other cases.
Thank you very much.

Jakub Ladman

./configure --build=i686-pc-linux-gnu --host=sh4-pc-linux-uclibc --disable-tcl
checking build system type... i686-pc-linux-gnu
checking host system type... sh4-pc-linux-uclibc
checking for sh4-pc-linux-uclibc-gcc... sh4-pc-linux-uclibc-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether sh4-pc-linux-uclibc-gcc accepts -g... yes
checking for sh4-pc-linux-uclibc-gcc option to accept ANSI C... none needed
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by sh4-pc-linux-uclibc-gcc... sh4-pc-linux-uclibc-ld
checking if the linker (sh4-pc-linux-uclibc-ld) is GNU ld... yes
checking for sh4-pc-linux-uclibc-ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/sh4-pc-linux-uclibc-nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... sh4-pc-linux-uclibc-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for sh4-pc-linux-uclibc-g++... sh4-pc-linux-uclibc-g++
checking whether we are using the GNU C++ compiler... yes
checking whether sh4-pc-linux-uclibc-g++ accepts -g... yes
checking how to run the C++ preprocessor... sh4-pc-linux-uclibc-g++ -E
checking for sh4-pc-linux-uclibc-g77... sh4-pc-linux-uclibc-g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether sh4-pc-linux-uclibc-g77 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/sh4-pc-linux-uclibc-nm -B output from 
sh4-pc-linux-uclibc-gcc object... ok
checking for objdir... .libs
checking for sh4-pc-linux-uclibc-ar... sh4-pc-linux-uclibc-ar
checking for sh4-pc-linux-uclibc-ranlib... sh4-pc-linux-uclibc-ranlib
checking for sh4-pc-linux-uclibc-strip... sh4-pc-linux-uclibc-strip
checking if sh4-pc-linux-uclibc-gcc static flag  works... yes
checking if sh4-pc-linux-uclibc-gcc supports -fno-rtti -fno-exceptions... no
checking for sh4-pc-linux-uclibc-gcc option to produce PIC... -fPIC
checking if sh4-pc-linux-uclibc-gcc PIC flag -fPIC works... yes
checking if sh4-pc-linux-uclibc-gcc supports -c -o file.o... yes
checking whether the sh4-pc-linux-uclibc-gcc linker (sh4-pc-linux-uclibc-ld) 
supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by sh4-pc-linux-uclibc-g++... sh4-pc-linux-uclibc-ld
checking if the linker (sh4-pc-linux-uclibc-ld) is GNU ld... yes
checking whether the sh4-pc-linux-uclibc-g++ linker (sh4-pc-linux-uclibc-ld) 
supports shared libraries... yes
checking for sh4-pc-linux-uclibc-g++ option to produce PIC... -fPIC
checking if sh4-pc-linux-uclibc-g++ PIC flag -fPIC works... yes
checking if sh4-pc-linux-uclibc-g++ supports -c -o file.o... yes
checking whether the sh4-pc-linux-uclibc-g++ linker (sh4-pc-linux-uclibc-ld) 
supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for sh4-pc-linux-uclibc-g77 option to produce PIC... -fPIC
checking if sh4-pc-linux-uclibc-g77 PIC flag -fPIC works... yes
checking if sh4-pc-linux-uclibc-g77 supports -c -o file.o... yes
checking whether the sh4-pc-linux-uclibc-g77 linker (sh4-pc-linux-uclibc-ld) 
supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how