Re: [sqlite] implementing busy_handler callback

2006-08-22 Thread Ritesh Kapoor
I think a good way of using sqlite in a multithreaded app is to have
your own mutex lock for the DB.

Everytime you need to execute a query just call the lock() function for
your mutex and then proceed with sqlite3_exec() calls.  Followed by a
unlock() call.

Your mutex wouldn't return if the another thread is executing queries. 
The only thing you need to do is to remember to lock and then unlock the
mutex.  You could again put all this in a function and call that
function whenever you need to execute a query.

However if you really insist on using the busy handlers then I guess
someone on this mailing list would help you.  However my experience with
these handlers was that they made a mess of the code and later on the
code was incomprehensible to someone looking at the code for the first
time.

-- 
Regards,
Ritesh Kapoor

"living in interesting times..."
--- Begin Message ---
Hi All,

I am trying to integrate SQLite in a multithreaded C++ application which 
runs on Linux.  I have gone through the SQLIte documentation, but it's not 
clear whether the sqlite3_exec() will retry the query when the busy 
handler callback is implemented and returns a non-zero value.

>From the sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*) 
definition it says "This routine identifies a callback function that might 
be invoked whenever an attempt is made to open a database table that 
another thread or process has locked. If the busy callback is NULL, then 
SQLITE_BUSY is returned immediately upon encountering the lock. If the 
busy callback is not NULL, then the callback will be invoked with two 
arguments. The second argument is the number of prior calls to the busy 
callback for the same lock. If the busy callback returns 0, then no 
additional attempts are made to access the database and SQLITE_BUSY is 
returned. If the callback returns non-zero, then another attempt is made 
to open the database for reading and the cycle repeats.

Does it mean the sqlite3_exec() internally takes care of invoking the 
query multiple times until the callback returns 0?  Can someone provide 
sample implementation for busy_handler callback and how the query is 
retried?

thanks,
Vadivel




***  FSS- Confidential   ***

***  FSS- Confidential   ***
"DISCLAIMER: This message is proprietary to Flextronics Software Systems (FSS) 
and is intended solely for the use of 
the individual to whom it is addressed. It may contain privileged or 
confidential information and should not be 
circulated or used for any purpose other than for what it is intended. If you 
have received this message in error, 
please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly
prohibited from using, copying, altering, or disclosing the contents of this 
message. FSS accepts no responsibility for 
loss or damage arising from the use of the information transmitted by this 
email including damage from virus."
--- End Message ---
-
To unsubscribe, send email to [EMAIL PROTECTED]
-

[sqlite] implementing busy_handler callback

2006-08-22 Thread vadivel . subramaniam
Hi All,

I am trying to integrate SQLite in a multithreaded C++ application which 
runs on Linux.  I have gone through the SQLIte documentation, but it's not 
clear whether the sqlite3_exec() will retry the query when the busy 
handler callback is implemented and returns a non-zero value.

From the sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*) 
definition it says "This routine identifies a callback function that might 
be invoked whenever an attempt is made to open a database table that 
another thread or process has locked. If the busy callback is NULL, then 
SQLITE_BUSY is returned immediately upon encountering the lock. If the 
busy callback is not NULL, then the callback will be invoked with two 
arguments. The second argument is the number of prior calls to the busy 
callback for the same lock. If the busy callback returns 0, then no 
additional attempts are made to access the database and SQLITE_BUSY is 
returned. If the callback returns non-zero, then another attempt is made 
to open the database for reading and the cycle repeats.

Does it mean the sqlite3_exec() internally takes care of invoking the 
query multiple times until the callback returns 0?  Can someone provide 
sample implementation for busy_handler callback and how the query is 
retried?

thanks,
Vadivel




***  FSS- Confidential   ***

***  FSS- Confidential   ***
"DISCLAIMER: This message is proprietary to Flextronics Software Systems (FSS) 
and is intended solely for the use of 
the individual to whom it is addressed. It may contain privileged or 
confidential information and should not be 
circulated or used for any purpose other than for what it is intended. If you 
have received this message in error, 
please notify the originator immediately. If you are not the intended 
recipient, you are notified that you are strictly
prohibited from using, copying, altering, or disclosing the contents of this 
message. FSS accepts no responsibility for 
loss or damage arising from the use of the information transmitted by this 
email including damage from virus."


[sqlite] crystal report.net with sqlite

2006-08-22 Thread sourav

Hi,

Can any body help how can i connect crystal report to sqlite for exporting
the data.

Thanks
-- 
View this message in context: 
http://www.nabble.com/crystal-report.net-with-sqlite-tf2150380.html#a5938119
Sent from the SQLite forum at Nabble.com.


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



Re: [sqlite] Seems like a bug in the parser

2006-08-22 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote:
> "Alexei Alexandrov" <[EMAIL PROTECTED]> wrote:
> > I noticed something like a bug in the SQLite parser: queries with
> > "group by" expression should accept only fields listed in the "group
> > by" clause or aggregated fields (with sum(), max() etc). For example,
> > given the table
> > 
> > create table qqq (a text, b integer);
> > 
> > the following query should not be accepted:
> > 
> > select a from qqq group by b;
> > 
> > but it is.
> 
> SQLite accepts the above and does the right thing with it.
> It is the equivalent of saying:
> 
>SELECT a FROM (SELECT a,b FROM qqq GROUP BY b);

Not sure what you mean by the "right thing". It's not obvious 
why the rows returned by this GROUP BY are significant.

The SQLite query above is equivalent to this query:

  -- works in both SQLite and Oracle
  select qqq.a 
  from qqq, (select distinct b from qqq) d 
  where qqq.rowid = (select max(rowid) from qqq where qqq.b = d.b)
  order by qqq.b;

which essentially returns the entry "a" for the rows corresponding 
to each unique "b" with the highest rowid.  The "a" values returned 
are basically governed by initial insert order.

CREATE TABLE qqq(a,b);
INSERT INTO "qqq" VALUES(1, 10);
INSERT INTO "qqq" VALUES(2, 10);
INSERT INTO "qqq" VALUES(3, 10);
INSERT INTO "qqq" VALUES(4, 11);
INSERT INTO "qqq" VALUES(5, 11);
INSERT INTO "qqq" VALUES(6, 10);
INSERT INTO "qqq" VALUES(-7, 10);
INSERT INTO "qqq" VALUES(3, 10);
INSERT INTO "qqq" VALUES(-3, 11);
INSERT INTO "qqq" VALUES(4, 9);
INSERT INTO "qqq" VALUES(2, 9);

sqlite> select * from qqq group by b;

a|b
2|9
3|10
-3|11

sqlite> select qqq.* from qqq, (select distinct b from qqq) d where
qqq.rowid = (select max(rowid) from qqq where qqq.b = d.b) order by
qqq.b;

a|b
2|9
3|10
-3|11

The same data, populated in different order:

sqlite> drop table qqq;
sqlite> CREATE TABLE qqq(a,b);
sqlite> INSERT INTO "qqq" VALUES(2, 9);
sqlite> INSERT INTO "qqq" VALUES(1, 10);
sqlite> INSERT INTO "qqq" VALUES(3, 10);
sqlite> INSERT INTO "qqq" VALUES(2, 10);
sqlite> INSERT INTO "qqq" VALUES(-3, 11);
sqlite> INSERT INTO "qqq" VALUES(3, 10);
sqlite> INSERT INTO "qqq" VALUES(4, 9);
sqlite> INSERT INTO "qqq" VALUES(4, 11);
sqlite> INSERT INTO "qqq" VALUES(5, 11);
sqlite> INSERT INTO "qqq" VALUES(6, 10);
sqlite> INSERT INTO "qqq" VALUES(-7, 10);

sqlite> select * from qqq group by b;
4|9
-7|10
5|11

sqlite> select qqq.* from qqq, (select distinct b from qqq) d where qqq.rowid = 
(select max(rowid)
from qqq where qqq.b = d.b) order by qqq.b;
4|9
-7|10
5|11

Does anyone have a real world use for this GROUP BY extension?


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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



[sqlite] Stop multiple simultaneous users

2006-08-22 Thread Dr Gerard Hammond

Hi,

How can I stop multiple simultaneous users accessing a SQLite database?
Is there a SQLite function that tells me how many people/applications 
have the database open?

I am using REALbasic on a OSX, Win32 and Linux.
--

Cheers,

Dr Gerard Hammond
MacSOS Solutions Pty Ltd, 505/176 Glenmore Rd, Paddington, NSW, Australia
[EMAIL PROTECTED]  http://www.macsos.com.au

It might look like I'm doing nothing, but at the cellular level I'm 
really quite busy.


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



[sqlite] Re: how can i optimize this query

2006-08-22 Thread Cesar David Rodas Maldonado

The query SQL query that I sent represents the next search : word1 word2
"word3 word4"



On 8/22/06, Cesar David Rodas Maldonado <[EMAIL PROTECTED]> wrote:


I have the next table with about 10.000.000 of records-

CREATE TABLE ft_index (
  docid int(11) NOT NULL default '0',
  wordid int(11) NOT NULL default '0',
  posicion int(11) NOT NULL default '0',
  ranking float NOT NULL default '0',
  lang int(11) NOT NULL default '0',
  KEY docid (docid,wordid,posicion,ranking),
  KEY lang (lang)
);

How can i optimize the next query, couse i need velocity (this is for a
fulltext search project):


select
t0.*,
t0.ranking + t1.ranking + t2.ranking + t3.ranking + t4.ranking as ranking
from ft_index as t0
inner join ft_index as t1 on (t0.docid = t1.docid)
inner join ft_index as t2 on (t0.docid = t2.docid)
inner join ft_index as t3 on (t0.docid = t3.docid)
inner join ft_index as t4 on (t0.docid = t4.docid)
where (t0.wordid = '18929') AND (t1.wordid = '27283') AND( t2.wordid =
'4351' and t2.posicion + 1 = t3.posicion and t3.wordid = '9418' and
t3.posicion + 1 = t4.posicion ) group by t0.docid order by ranking;

Every inner join is for search a word that i save in another table (with
the number of words).




[sqlite] how can i optimize this query

2006-08-22 Thread Cesar David Rodas Maldonado

I have the next table with about 10.000.000 of records-

CREATE TABLE ft_index (
 docid int(11) NOT NULL default '0',
 wordid int(11) NOT NULL default '0',
 posicion int(11) NOT NULL default '0',
 ranking float NOT NULL default '0',
 lang int(11) NOT NULL default '0',
 KEY docid (docid,wordid,posicion,ranking),
 KEY lang (lang)
);

How can i optimize the next query, couse i need velocity (this is for a
fulltext search project):


select
t0.*,
t0.ranking + t1.ranking + t2.ranking + t3.ranking + t4.ranking as ranking
from ft_index as t0
inner join ft_index as t1 on (t0.docid = t1.docid)
inner join ft_index as t2 on (t0.docid = t2.docid)
inner join ft_index as t3 on (t0.docid = t3.docid)
inner join ft_index as t4 on (t0.docid = t4.docid)
where (t0.wordid = '18929') AND (t1.wordid = '27283') AND( t2.wordid =
'4351' and t2.posicion + 1 = t3.posicion and t3.wordid = '9418' and
t3.posicion + 1 = t4.posicion ) group by t0.docid order by ranking;

Every inner join is for search a word that i save in another table (with the
number of words).


Re: [sqlite] Re: database locked

2006-08-22 Thread Laura Longo



Do you have the 'fuser' command in your flavor of linux/unix?

http://linux.about.com/library/cmd/blcmdl1_fuser.htm



Yes! Could this help?

Sorry for this stupid question, I've read the man pages... it's a wonderful 
command!

Thank you Jay!

Laura 


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



Re: [sqlite] Re: database locked

2006-08-22 Thread Jay Sprenkle

On 8/22/06, Laura Longo <[EMAIL PROTECTED]> wrote:

> Do you have the 'fuser' command in your flavor of linux/unix?
>
> http://linux.about.com/library/cmd/blcmdl1_fuser.htm
>

Yes! Could this help?


If some other program has the file open it will tell you.
When you get a lockup use it to figure out who is locking the file.

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



Re: [sqlite] Re: database locked

2006-08-22 Thread Laura Longo

Do you have the 'fuser' command in your flavor of linux/unix?

http://linux.about.com/library/cmd/blcmdl1_fuser.htm



Yes! Could this help?

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



Re: [sqlite] libsqlite3.so

2006-08-22 Thread Laura Longo

"Laura Longo" <[EMAIL PROTECTED]> wrote:


Hi Richard,
I've tried with mkso.sh but an error has immediately stopped me:

make: *** No rule to make target `target_source'.  Stop.



You need to make a copy of Makefile.linux-gcc into your
build directory, change the name to just "Makefile", and
edit the macros at the top to suite your particular
setup.  Or, you can run "configure" at let it build a
Makefile for you.  Either way should work to generate a
Makefile that understands the "target_source" target.




but I don't gave up! I've tried with sqlite-3_3_7-tea.tar.gz as you 
have
suggested... but the result is not very good, already in the 
'configure'...


checking for correct TEA configuration... ok (TEA 3.5)
checking for Tcl configuration... configure: WARNING: Can't find Tcl
configuration definitions




Install Tcl.  http://www.tcl.tk/
Shame on CentOS for not installing it by default!
--
D. Richard Hipp   <[EMAIL PROTECTED]>


Ok, with your help I have installed Tcl and I have built sqlite-3_3_7-tea, 
whith the shared library! Now I can begin to study the source code to try 
solve my problem in this way!


Thank you very much!

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



Re: [sqlite] Seems like a bug in the parser

2006-08-22 Thread drh
"Alexei Alexandrov" <[EMAIL PROTECTED]> wrote:
> I noticed something like a bug in the SQLite parser: queries with
> "group by" expression should accept only fields listed in the "group
> by" clause or aggregated fields (with sum(), max() etc). For example,
> given the table
> 
> create table qqq (a text, b integer);
> 
> the following query should not be accepted:
> 
> select a from qqq group by b;
> 
> but it is.
> 

SQLite accepts the above and does the right thing with it.
It is the equivalent of saying:

   SELECT a FROM (SELECT a,b FROM qqq GROUP BY b);

--
D. Richard Hipp   <[EMAIL PROTECTED]>


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



[sqlite] Seems like a bug in the parser

2006-08-22 Thread Alexei Alexandrov

I noticed something like a bug in the SQLite parser: queries with
"group by" expression should accept only fields listed in the "group
by" clause or aggregated fields (with sum(), max() etc). For example,
given the table

create table qqq (a text, b integer);

the following query should not be accepted:

select a from qqq group by b;

but it is.

--
Alexei Alexandrov

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



Re: [sqlite] Re: database locked

2006-08-22 Thread Jay Sprenkle

In the source code at the begin of the two processes that execute queries on
the database I've used the code:

srand(time(NULL));

to avoid collisions...

(I never started the two processes at the same instant)


That should work great.



>>
>> http://www.sqlite.org/capi3ref.html#sqlite3_busy_timeout
>>
>> If this does not fix your problem, it is possible that an application has
>> a read lock permanently open. Check that your readers are not doing a
>> begin without a commit.
>
> That was my thought too. It sounds like something else has the file
> locked.
>
> Laura is there a backup program that might be reading your database
> and locking it?

Only my two processes execute queries on the database and no other
program...
Is there any other way to be sure of this? Can you suggest me a test to do
when the lock will happen again to have more info?


Do you have the 'fuser' command in your flavor of linux/unix?

http://linux.about.com/library/cmd/blcmdl1_fuser.htm

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



Re: [sqlite] Re: database locked

2006-08-22 Thread Laura Longo


- Original Message - 
From: "Jay Sprenkle" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, August 22, 2006 6:06 PM
Subject: Re: [sqlite] Re: database locked



On 8/22/06, Christian Smith <[EMAIL PROTECTED]> wrote:

Laura Longo uttered:

>
>
>> On 8/21/06, Laura Longo <[EMAIL PROTECTED]> wrote:
>>> I've tried also executing the query "begine exclusive" before the
>>> "update",
>>> and "commit" to end the entire routine, and the query that now 
>>> returns the
>>> exit code 5 (database locked) is "begin exclusive", I don't know if 
>>> this

>>> can be meaningful...
>>
>> It sounds like some other application has locked the database file.
>> Do you have a virus scanner? This can sometimes cause problems.
>> It will lock the file you use for the database.
>
> My applications are running under Linux (CentOS, kernel 2.6.16) and I 
> have no

> virus scanner.


Try using sqlite3_busy_timeout(), to get round the temporary locks if
possible. SQLite will retry locked database access until the command
either succeeds or times out.


She already has a nice variable delay retry in her code.
As long as she seeds the random number generator with a different
seed for each process It should eliminate problems with synchronized
retry collisions.




In the source code at the begin of the two processes that execute queries on 
the database I've used the code:


srand(time(NULL));

to avoid collisions...

(I never started the two processes at the same instant)



http://www.sqlite.org/capi3ref.html#sqlite3_busy_timeout

If this does not fix your problem, it is possible that an application has
a read lock permanently open. Check that your readers are not doing a
begin without a commit.


That was my thought too. It sounds like something else has the file
locked.

Laura is there a backup program that might be reading your database
and locking it?


Only my two processes execute queries on the database and no other 
program...
Is there any other way to be sure of this? Can you suggest me a test to do 
when the lock will happen again to have more info?


Laura 


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



Re: [sqlite] Re: database locked

2006-08-22 Thread Rob Sciuk

On Tue, 22 Aug 2006, Laura Longo wrote:

> Date: Tue, 22 Aug 2006 08:51:34 +0200
> From: Laura Longo <[EMAIL PROTECTED]>
> Reply-To: sqlite-users@sqlite.org
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] Re: database locked
>
> > Laura,
> >
> > 'df -h' should give you some hints, or 'showmount'.  I run on BSD not
> > Linux,
> > but most unix like OS's will tell you if the mount point is a hard drive
> > or a remote mount, in which case, it will have a hostname:/path instead of
> > a /dev/dsk device file as the device/partition information.
> >
> > HTH.
> > Rob.
> >
>
> Hi Rob,
> sorry for the delay, the result of df -h is this:
>
> FilesystemSize  Used Avail Use% Mounted on
> /dev/sda1 3.9G  1.6G  2.2G  42% /
> none  504M 0  504M   0% /dev/shm
> /dev/sda4 9.7G  2.5G  6.7G  27% /home
> /dev/sda3 136G   32G   97G  25% /var
>
> Then, if I've understood well, my filesystem is not residing on an NFS
> mounted disk...

That looks to be true.  The NFS mount would look different than the
/dev/sda? mounts.  Sorry, your problem is something else.

Cheers,
Rob.

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



Re: [sqlite] libsqlite3.so

2006-08-22 Thread drh
"Laura Longo" <[EMAIL PROTECTED]> wrote:
> 
> Hi Richard,
> I've tried with mkso.sh but an error has immediately stopped me:
> 
> make: *** No rule to make target `target_source'.  Stop.

You need to make a copy of Makefile.linux-gcc into your
build directory, change the name to just "Makefile", and
edit the macros at the top to suite your particular
setup.  Or, you can run "configure" at let it build a
Makefile for you.  Either way should work to generate a
Makefile that understands the "target_source" target.

> 
> but I don't gave up! I've tried with sqlite-3_3_7-tea.tar.gz as you have 
> suggested... but the result is not very good, already in the 'configure'...
> 
> checking for correct TEA configuration... ok (TEA 3.5)
> checking for Tcl configuration... configure: WARNING: Can't find Tcl 
> configuration definitions
> 

Install Tcl.  http://www.tcl.tk/  
Shame on CentOS for not installing it by default!
--
D. Richard Hipp   <[EMAIL PROTECTED]>


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



Re: [sqlite] Re: database locked

2006-08-22 Thread Jay Sprenkle

On 8/22/06, Christian Smith <[EMAIL PROTECTED]> wrote:

Laura Longo uttered:

>
>
>> On 8/21/06, Laura Longo <[EMAIL PROTECTED]> wrote:
>>> I've tried also executing the query "begine exclusive" before the
>>> "update",
>>> and "commit" to end the entire routine, and the query that now returns the
>>> exit code 5 (database locked) is "begin exclusive", I don't know if this
>>> can be meaningful...
>>
>> It sounds like some other application has locked the database file.
>> Do you have a virus scanner? This can sometimes cause problems.
>> It will lock the file you use for the database.
>
> My applications are running under Linux (CentOS, kernel 2.6.16) and I have no
> virus scanner.


Try using sqlite3_busy_timeout(), to get round the temporary locks if
possible. SQLite will retry locked database access until the command
either succeeds or times out.


She already has a nice variable delay retry in her code.
As long as she seeds the random number generator with a different
seed for each process It should eliminate problems with synchronized
retry collisions.



http://www.sqlite.org/capi3ref.html#sqlite3_busy_timeout

If this does not fix your problem, it is possible that an application has
a read lock permanently open. Check that your readers are not doing a
begin without a commit.


That was my thought too. It sounds like something else has the file
locked.

Laura is there a backup program that might be reading your database
and locking it?

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



Re: [sqlite] Re: database locked

2006-08-22 Thread Laura Longo


Try using sqlite3_busy_timeout(), to get round the temporary locks if 
possible. SQLite will retry locked database access until the command 
either succeeds or times out.


http://www.sqlite.org/capi3ref.html#sqlite3_busy_timeout

If this does not fix your problem, it is possible that an application has 
a read lock permanently open. Check that your readers are not doing a 
begin without a commit.


Christian


Hi Christian,
the strange thing is that two processes are doing query on the same sqlite3 
database, but if the two processes begin to fail the queries 'update' and I 
restart only one of them, the process that I have restarted executes the 
queries 'update' in the correct way for some days, while the other continues 
to fail... Now I'm tryng to get more info about the library libsqlite3.so... 
I don't know what to think... I've checked for 'begin' without 'commit', but 
my processes are in a loop of 10 seconds and they go on for some days before 
having problems, the queries are about the same, with small differeces...


Laura 


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



[sqlite] importing csv files into a sqlite db?

2006-08-22 Thread John Salerno

Let's say I have many csv files (25, to be exact) and want to create a
sqlite database out of them? How do I do that?

Furthermore, in addition to the 25 text files of data, there are 25
corresponding sql files that define the tables, so does this mean
those would have to be rewritten in sqlite? Are the text files
themselves useless with the definition files?

Thanks,
John

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



Re: [sqlite] Re: database locked

2006-08-22 Thread Christian Smith

Laura Longo uttered:





On 8/21/06, Laura Longo <[EMAIL PROTECTED]> wrote:
I've tried also executing the query "begine exclusive" before the 
"update",

and "commit" to end the entire routine, and the query that now returns the
exit code 5 (database locked) is "begin exclusive", I don't know if this
can be meaningful...


It sounds like some other application has locked the database file.
Do you have a virus scanner? This can sometimes cause problems.
It will lock the file you use for the database.


My applications are running under Linux (CentOS, kernel 2.6.16) and I have no
virus scanner.



Try using sqlite3_busy_timeout(), to get round the temporary locks if 
possible. SQLite will retry locked database access until the command 
either succeeds or times out.


http://www.sqlite.org/capi3ref.html#sqlite3_busy_timeout

If this does not fix your problem, it is possible that an application has 
a read lock permanently open. Check that your readers are not doing a 
begin without a commit.


Christian

--
/"\
\ /ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
 X   - AGAINST MS ATTACHMENTS
/ \

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



Re: [sqlite] libsqlite3.so

2006-08-22 Thread Laura Longo

Hi Clay,
I'm workink under Linux (CentOS), kernel 2.6.16...


That's the right file.

It might be helpful to know what platform you're building on, and if that
platform supports shared libraries.  Shared libraries are usually built by
default on platforms that support them.

As for the source to sqlite3_get_table, it will be visible in your source.
You will probably have to go through the configure process first, because
a lot of the source files aren't built until after the configure process.

Clay Dowling


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



Re: [sqlite] libsqlite3.so

2006-08-22 Thread drh
"Laura Longo" <[EMAIL PROTECTED]> wrote:
> Hi all,
> I would like to view the source code of libsqlite3.so because of a problem 
> with sqlite3_get_table function... I have a question: in the file 
> sqlite-3.3.7.tar.gz that I find at http://www.sqlite.org/download.html, are 
> there also the source code of the library? If the answer is no, where can I 
> find them? Instead, if the answer is yes, what is the option of the 
> 'configure' command to build the shared library? (I've tried with 
> './configure --enable-shared' but without any result... I only build the 
> binary sqlite3)
> 

All of the sources are available in that tarball.

The shared library building mechanism in autoconf is really
goofy and hardly works.  The libsqlite3.so library that appears
on the SQLite website is built by first manually configuring
the makefile Makefile.linux-gcc then running the shell script
"mkso.sh".

The configure script and makefile in the TEA version of the
source code (sqlite-3_3_7-tea.tar.gz) also works pretty well.
That's the version I used to build shared libraries on OS X.

--
D. Richard Hipp   <[EMAIL PROTECTED]>


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



Re: [sqlite] libsqlite3.so

2006-08-22 Thread Clay Dowling
That's the right file.

It might be helpful to know what platform you're building on, and if that
platform supports shared libraries.  Shared libraries are usually built by
default on platforms that support them.

As for the source to sqlite3_get_table, it will be visible in your source.
 You will probably have to go through the configure process first, because
a lot of the source files aren't built until after the configure process.

Clay Dowling

Laura Longo said:
> Hi all,
> I would like to view the source code of libsqlite3.so because of a problem
> with sqlite3_get_table function... I have a question: in the file
> sqlite-3.3.7.tar.gz that I find at http://www.sqlite.org/download.html,
> are
> there also the source code of the library? If the answer is no, where can
> I
> find them? Instead, if the answer is yes, what is the option of the
> 'configure' command to build the shared library? (I've tried with
> './configure --enable-shared' but without any result... I only build the
> binary sqlite3)
>
> Laura
>
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
> -
>
>


-- 
Simple Content Management
http://www.ceamus.com


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



[sqlite] libsqlite3.so

2006-08-22 Thread Laura Longo

Hi all,
I would like to view the source code of libsqlite3.so because of a problem 
with sqlite3_get_table function... I have a question: in the file 
sqlite-3.3.7.tar.gz that I find at http://www.sqlite.org/download.html, are 
there also the source code of the library? If the answer is no, where can I 
find them? Instead, if the answer is yes, what is the option of the 
'configure' command to build the shared library? (I've tried with 
'./configure --enable-shared' but without any result... I only build the 
binary sqlite3)


Laura

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



Re: [sqlite] Re: database locked

2006-08-22 Thread Laura Longo

Laura,

'df -h' should give you some hints, or 'showmount'.  I run on BSD not 
Linux,

but most unix like OS's will tell you if the mount point is a hard drive
or a remote mount, in which case, it will have a hostname:/path instead of
a /dev/dsk device file as the device/partition information.

HTH.
Rob.



Hi Rob,
sorry for the delay, the result of df -h is this:

FilesystemSize  Used Avail Use% Mounted on
/dev/sda1 3.9G  1.6G  2.2G  42% /
none  504M 0  504M   0% /dev/shm
/dev/sda4 9.7G  2.5G  6.7G  27% /home
/dev/sda3 136G   32G   97G  25% /var

Then, if I've understood well, my filesystem is not residing on an NFS 
mounted disk...


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