Re: [sqlite] sqlite documents in pdf format

2010-06-24 Thread Peng Yu
On Thu, Jun 24, 2010 at 2:32 PM, Roger Binns  wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 06/24/2010 06:08 AM, Peng Yu wrote:
>> It is very common that software provide
>> document in many different format. For example, python, GNU make.
>
> Not really the case.  The software that provides documentation in PDF has
> usually done so because the help is authored in Latex or a very similar
> format.  The GNU standard for documentation (info) was Latex compatible
> which is why you'll find most GNU tools do have PDF documentation.
>
> For Python, documentation is authored using Sphinx (and was historically
> something similar to Latex).  Sphinx has a way of generating Latex output
> which can then be processed into PDF although it is enough of a pain that
> most Sphinx projects do not both with PDF.
>
> The documentation for SQLite is not authored in a Latex compatible format
> and so isn't trivial to turn into PDF.  You are of course welcome to provide
> a tool that does the conversion.
>
> Instead it targets HTML output like pretty much everyone else out there.
> You are going to have to get used to this new reality.  If you like PDF
> because it gives you a single self contained file that is searchable and
> usable offline then I suggest looking into the CHM format.
>
> Note you can download the HTML docs for local offline access.  You can
> create a CHM file by creating a small project file and compiling it.  There
> is a CHM compiler for Windows, and you can also do so under Linux (google
> HHW4Wine).
>
> If you want the PDF for printing then that is a really bad idea as the
> documentation is not authored or intended for dead tree - eg it doesn't have
> physical pages, and isn't intended to be read with a beginning, middle and
> end.  In HTML format it works with any screen size, big or small.  Use your
> HTML viewer tools to print it as you see fit.

I'm using pdf because I can comment and bookmark it to facilitate my
reading process. I'm open to any other options. But it seems that
there is no way to comment on chm (Let me know if I'm wrong). Then
probably the solution is to convert html into pdf.

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


Re: [sqlite] Oracle joins the SQLite Consortium

2010-06-24 Thread Ted Rolle, Jr.
On Fri, 25 Jun 2010 01:46:08 +0100
Simon Slavin  wrote:

> 
> On 24 Jun 2010, at 10:38pm, Ted Rolle, Jr. wrote:
> 
> > I can't see anything good coming out of this if there are lawyers
> > involved.
> 
> Big North American companies like Oracle don't do /anything/ without
> lawyers.  It can't be helped in a country like the USA.  Not all
> lawyers are evil: almost all of them are employed to make sure
> nothing ever has to go to trial.
> 
> Simon.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Well...I tried BRB a long time ago.  The lack of a SQL interface was a
show-stopper for me.  Perhaps this will result in a better product.
And that can't be all bad! :-)

-- 
__
3.14159265358979323846264338327950  Let the spirit of pi
2884197169399375105820974944592307   spread all over the world!
8164062862089986280348253421170679 http://pi314.at  PI VOBISCUM!
==
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Oracle joins the SQLite Consortium

2010-06-24 Thread Simon Slavin

On 24 Jun 2010, at 10:38pm, Ted Rolle, Jr. wrote:

> I can't see anything good coming out of this if there are lawyers
> involved.

Big North American companies like Oracle don't do /anything/ without lawyers.  
It can't be helped in a country like the USA.  Not all lawyers are evil: almost 
all of them are employed to make sure nothing ever has to go to trial.

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


Re: [sqlite] Oracle joins the SQLite Consortium

2010-06-24 Thread Ted Rolle, Jr.
I can't see anything good coming out of this if there are lawyers
involved.

-- 
__
3.14159265358979323846264338327950  Let the spirit of pi
2884197169399375105820974944592307   spread all over the world!
8164062862089986280348253421170679 http://pi314.at  PI VOBISCUM!
==
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why is there no test suite for ''make check' ?

2010-06-24 Thread Ted Rolle, Jr.
Does the TEA tarball have the tests?

-- 
__
3.14159265358979323846264338327950  Let the spirit of pi
2884197169399375105820974944592307   spread all over the world!
8164062862089986280348253421170679 http://pi314.at  PI VOBISCUM!
==
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] What is the sqlite3 script suffix?

2010-06-24 Thread Kees Nuyt
On Wed, 23 Jun 2010 22:41:55 -0500, Peng Yu
 wrote:

>I'm trying to following the convention. If I'm going to save sql
>commands in a script and run them as needed, could you let me know
>what suffix people in general use? I'm thinking of the suffix '.sql',
>but I'm not sure what the most common one in sqlite community.

I use .sql for sql scripts, and .db3 for SQLite3 databases.
-- 
  (  Kees Nuyt
  )
c[_]
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why is there no test suite for ''make check' ?

2010-06-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 06/24/2010 12:38 PM, Darren Duncan wrote:
> The test suite being AFAIK 
> essentially an application that links against the already-compiled SQLite,

Not quite the case.  The test suite includes large amounts of code to induce
various faults, track memory, reset various things back to pre-initialized
values etc.  This requires recompiling the SQLite library to get those
various hooks and tweaks.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwjv+MACgkQmOOfHg372QQm6QCfWjN2mmIjAibKGtKTLVH3sine
5HUAn0iVK3aZmPwrgg8XQQ+YVATuWSSF
=rVZK
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] understanding the logic of licensing various parts of the sqlite family

2010-06-24 Thread P Kishor
On Thu, Jun 24, 2010 at 3:19 PM, Richard Hipp  wrote:
> On Thu, Jun 24, 2010 at 4:15 PM, P Kishor  wrote:
>
>>
>> Right then. That explains #3 above. Are you saying that #5 is
>> available for a fee? And, is there a description of #5 and how it
>> differs from #4? Not that I will understand the differences, nor will
>> I ever need it. I just didn't realize #5 (the "Compleat Tests of
>> SQLite") was available.
>>
>> Thanks for the answer.
>>
>
> http://www.sqlite.org/th3.html
>

Lovely. Thorough, clear and effective. Like sqlite3 itself.


> --
> -
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] understanding the logic of licensing various parts of the sqlite family

2010-06-24 Thread Richard Hipp
On Thu, Jun 24, 2010 at 4:15 PM, P Kishor  wrote:

>
> Right then. That explains #3 above. Are you saying that #5 is
> available for a fee? And, is there a description of #5 and how it
> differs from #4? Not that I will understand the differences, nor will
> I ever need it. I just didn't realize #5 (the "Compleat Tests of
> SQLite") was available.
>
> Thanks for the answer.
>

http://www.sqlite.org/th3.html

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


Re: [sqlite] understanding the logic of licensing various parts of the sqlite family

2010-06-24 Thread P Kishor
On Thu, Jun 24, 2010 at 3:04 PM, Richard Hipp  wrote:
> On Thu, Jun 24, 2010 at 3:58 PM, P Kishor  wrote:
>
>> I am simply curious, and want to expand my knowledge of this --
>>
>> 1. sqlite3 code is in public domain.
>> 2. sqlite mark is trademarked.
>> 3. sqlite3 encryption extension is licensed and for a fee, and comes
>> with a contract to not distribute it further.
>> 4. sqlite code tests are available as long as they are in the
>> non-amalgamated source tree.
>> 5. other "more complete" code tests are proprietary and closed source.
>>
>>
>> I am curious about the reason for #5 being the way it is.
>>
>
> No mystery there:  Sales of licenses for the non-free parts of SQLite is
> (one way) that we make money in order to pay people to work full-time on the
> free parts.
>
>

Right then. That explains #3 above. Are you saying that #5 is
available for a fee? And, is there a description of #5 and how it
differs from #4? Not that I will understand the differences, nor will
I ever need it. I just didn't realize #5 (the "Compleat Tests of
SQLite") was available.

Thanks for the answer.


>
> --
> -
> D. Richard Hipp
> d...@sqlite.org
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] understanding the logic of licensing various parts of the sqlite family

2010-06-24 Thread Richard Hipp
On Thu, Jun 24, 2010 at 3:58 PM, P Kishor  wrote:

> I am simply curious, and want to expand my knowledge of this --
>
> 1. sqlite3 code is in public domain.
> 2. sqlite mark is trademarked.
> 3. sqlite3 encryption extension is licensed and for a fee, and comes
> with a contract to not distribute it further.
> 4. sqlite code tests are available as long as they are in the
> non-amalgamated source tree.
> 5. other "more complete" code tests are proprietary and closed source.
>
>
> I am curious about the reason for #5 being the way it is.
>

No mystery there:  Sales of licenses for the non-free parts of SQLite is
(one way) that we make money in order to pay people to work full-time on the
free parts.



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


[sqlite] understanding the logic of licensing various parts of the sqlite family

2010-06-24 Thread P Kishor
I am simply curious, and want to expand my knowledge of this --

1. sqlite3 code is in public domain.
2. sqlite mark is trademarked.
3. sqlite3 encryption extension is licensed and for a fee, and comes
with a contract to not distribute it further.
4. sqlite code tests are available as long as they are in the
non-amalgamated source tree.
5. other "more complete" code tests are proprietary and closed source.


I am curious about the reason for #5 being the way it is. Simply
curious, not judgmental.

Fwiw, I never 'make test' sqlite... I just download and install it.
Same with the version that comes with DBD::SQLite other than any tests
that the Perl installation might do.


-- 
Puneet Kishor http://www.punkish.org
Carbon Model http://carbonmodel.org
Charter Member, Open Source Geospatial Foundation http://www.osgeo.org
Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor
Nelson Institute, UW-Madison http://www.nelson.wisc.edu
---
Assertions are politics; backing up assertions with evidence is science
===
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why is there no test suite for ''make check' ?

2010-06-24 Thread Darren Duncan
Replying to an earlier post, I remember "make test" working for SQLite when I 
tried it in the past.  I'm actually used to running that, this practice 
ingrained as standard behaviour with Perl and Perl modules, and I usually 
expect 
any other projects to have a "make test" too.  Besides Perl, I know that Git, 
Python, PHP, and SQLite, "make test" works for.

Richard Hipp wrote:
> I see.  You are building from the amalgamation.  And you should be too.  But
> you are right - we do not ship test suites with the amalgamation.  To use
> the free test suite for SQLite, you have to build from canonical source
> code.  We have a separate test harness for the amalgamation (the one that
> provides 100% branch test coverage) but that one is not free, I'm afraid.

Why is that?  I would have thought that with respect to users of SQLite the 
amalgamation is drop-in-substitutable for the separate files, with the test 
suite mainly testing the collection as a whole.  The test suite being AFAIK 
essentially an application that links against the already-compiled SQLite, at 
which point differences may have gone away.  What subtleties does the test 
suite 
depend on that the same one doesn't work for both versions.

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


Re: [sqlite] Force Database Corruption

2010-06-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 06/24/2010 05:10 AM, Israel Lins Albuquerque wrote:
> I'm needing a corrupted database for test purpose, someone can help me? 
> I want an database with corruption on index like: 
> "rowid [%ld] missing from index %s" or "wrong # of entries in index %s" 

Create the database without indices.  Note the size.  Then add the indices.
 It will be the case that almost all new data is part of the indices.

Read about the file format and pick how to corrupt an index.  Putting
several zero bytes at the beginning of some pages should go a long way.

  http://www.sqlite.org/fileformat.html#database_file_format

If SQLite crashes in any way other than reporting an error, then firstly
congratulations on finding a bug, and secondly save the database for DRH and
team to have a look.

Roger

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwjtB8ACgkQmOOfHg372QQ1wgCfX0D+cUnA4L2Teet0u0w3tmFW
O1gAn1cawQ9P/eFRmjd6DdFapo4Dkg8j
=Cl7v
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite documents in pdf format

2010-06-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 06/24/2010 06:08 AM, Peng Yu wrote:
> It is very common that software provide
> document in many different format. For example, python, GNU make.

Not really the case.  The software that provides documentation in PDF has
usually done so because the help is authored in Latex or a very similar
format.  The GNU standard for documentation (info) was Latex compatible
which is why you'll find most GNU tools do have PDF documentation.

For Python, documentation is authored using Sphinx (and was historically
something similar to Latex).  Sphinx has a way of generating Latex output
which can then be processed into PDF although it is enough of a pain that
most Sphinx projects do not both with PDF.

The documentation for SQLite is not authored in a Latex compatible format
and so isn't trivial to turn into PDF.  You are of course welcome to provide
a tool that does the conversion.

Instead it targets HTML output like pretty much everyone else out there.
You are going to have to get used to this new reality.  If you like PDF
because it gives you a single self contained file that is searchable and
usable offline then I suggest looking into the CHM format.

Note you can download the HTML docs for local offline access.  You can
create a CHM file by creating a small project file and compiling it.  There
is a CHM compiler for Windows, and you can also do so under Linux (google
HHW4Wine).

If you want the PDF for printing then that is a really bad idea as the
documentation is not authored or intended for dead tree - eg it doesn't have
physical pages, and isn't intended to be read with a beginning, middle and
end.  In HTML format it works with any screen size, big or small.  Use your
HTML viewer tools to print it as you see fit.

Roger
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwjsr0ACgkQmOOfHg372QRYbwCfVWhc4blpj1cKjk98BGWU00I8
d5IAn20aWo33YwxEOq6HSAhJw43+Cqic
=ZXHc
-END PGP SIGNATURE-
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why is there no test suite for ''make check' ?

2010-06-24 Thread Dr. David Kirkby
On 06/24/10 05:13 PM, Richard Hipp wrote:
> On Thu, Jun 24, 2010 at 12:03 PM, Dr. David Kirkby
> wrote:
>
>> On 06/24/10 04:20 PM, Black, Michael (IS) wrote:
>>> Try one directory up.   It's not in the src directory Makefile.
>>
>>
>> There is only one directory - there is no 'src' directory at all. If you
>> look at
>> the path what I posted below, you do see 'src' but that is part of the
>> directory
>> structure in Sage. In other words
>>
>>
>> ~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src
>>
>> IS the top level directory in sqlite. (That's assuming some idiot has not
>> screwed something up in Sage). I guess I'll need to double check this, but
>> it
>> seems unlikely. The 'configure' script creates a Makefile, but that
>> Makefile has
>> no test/check/fulltest targets.
>>
>> Dave
>>
>>
> I see.  You are building from the amalgamation.  And you should be too.  But
> you are right - we do not ship test suites with the amalgamation.

Is there a a good reason for that? To say I'm building from the right source 
code, but then to not have the test packages seems a bit odd. One might 
reasonably expect some way to test the software no matter what source code one 
uses.

> To use
> the free test suite for SQLite, you have to build from canonical source
> code.

But by implication of what you said earlier, I should be building from the 
amalgamation source code.

> We have a separate test harness for the amalgamation (the one that
> provides 100% branch test coverage) but that one is not free, I'm afraid.

I'm not looking for 100% branch coverage. I would like something that I can use 
to be reasonably confident the code is working correctly.

Dave

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


Re: [sqlite] Why null is not printed?

2010-06-24 Thread Jay A. Kreibich
On Thu, Jun 24, 2010 at 12:34:18PM -0500, Peng Yu scratched on the wall:
> According to The Definitive Guide to SQLite (page 120), if I type
> "select null=null;" in a sqlite3 session, I should get 'NULL' printed.
> 
> http://apress.com/book/view/9781590596739
> 
> But I tried it in sqlite3, only an empty line is printed. Is it the
> cases that sqlite3 change the way to show null after the book was
> published?

  Likely.   See sqlite3 command ".nullvalue".


   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] Why null is not printed?

2010-06-24 Thread Richard Hipp
On Thu, Jun 24, 2010 at 1:34 PM, Peng Yu  wrote:

> According to The Definitive Guide to SQLite (page 120), if I type
> "select null=null;" in a sqlite3 session, I should get 'NULL' printed.
>
> http://apress.com/book/view/9781590596739
>
> But I tried it in sqlite3, only an empty line is printed. Is it the
> cases that sqlite3 change the way to show null after the book was
> published?
>
>
No.  The reason is that you missed the instructions on how to get SQLite to
display NULL as "NULL".  See the top of page 77.



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



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


[sqlite] Why null is not printed?

2010-06-24 Thread Peng Yu
According to The Definitive Guide to SQLite (page 120), if I type
"select null=null;" in a sqlite3 session, I should get 'NULL' printed.

http://apress.com/book/view/9781590596739

But I tried it in sqlite3, only an empty line is printed. Is it the
cases that sqlite3 change the way to show null after the book was
published?

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


Re: [sqlite] How accept sqlite3 commands from stdin

2010-06-24 Thread Peng Yu
On Thu, Jun 24, 2010 at 9:19 AM, Eric Smith  wrote:
> Peng Yu wrote:
>
>> On Thu, Jun 24, 2010 at 5:05 AM, Simon Slavin  wrote:
>> >
>> > On 24 Jun 2010, at 4:50am, Peng Yu wrote:
>> >
>> >> Is there a way to use Shebang for sqlite3 script?
>> >>
>> >> http://en.wikipedia.org/wiki/Shebang_%28Unix%29
>> >
>> > SQLite comes with a command-line tool.  You can feed it with individual 
>> > commands on a Unix command-line or tell it to read commands from a file.
>>
>> I was asking whether it is possible to use Shebang with sqlite script.
>> If it is possible, would you please show me how to modify the
>> following script to do so?
>>
>> $ ./main.sql
>> Error: unknown command or invalid arguments:  "/main.sql". Enter
>> ".help" for help
>> $ cat main.sql
>> #!/usr/bin/sqlite3 main.db
>>
>> create table tbl1(one varchar(10), two smallint);
>> .quit
>
> You want to pretend a .sql file is an executable and send commands to
> sqlite3?  Try something like this:
>
> [hudson:~] $ cat foo.sql
> #!/bin/sh
>
> sqlite3 main.db <
> create table tbl1(col1 text);
> insert into tbl1 values('foobar');
>
> EOF
> [hudson:~] $ chmod +x foo.sql
> [hudson:~] $ ./foo.sql
> [hudson:~] $ lh main.db
> -rw-r--r--. 1 eas eas 2.0K Jun 24 10:18 main.db
> [hudson:~] $ sqlite3 main.db "select * from tbl1"
> foobar
> [hudson:~] $

This is helpful. Thank you!

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


Re: [sqlite] Why is there no test suite for ''make check' ?

2010-06-24 Thread Richard Hipp
On Thu, Jun 24, 2010 at 12:03 PM, Dr. David Kirkby
wrote:

> On 06/24/10 04:20 PM, Black, Michael (IS) wrote:
> > Try one directory up.   It's not in the src directory Makefile.
>
>
> There is only one directory - there is no 'src' directory at all. If you
> look at
> the path what I posted below, you do see 'src' but that is part of the
> directory
> structure in Sage. In other words
>
>
> ~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src
>
> IS the top level directory in sqlite. (That's assuming some idiot has not
> screwed something up in Sage). I guess I'll need to double check this, but
> it
> seems unlikely. The 'configure' script creates a Makefile, but that
> Makefile has
> no test/check/fulltest targets.
>
> Dave
>
>
I see.  You are building from the amalgamation.  And you should be too.  But
you are right - we do not ship test suites with the amalgamation.  To use
the free test suite for SQLite, you have to build from canonical source
code.  We have a separate test harness for the amalgamation (the one that
provides 100% branch test coverage) but that one is not free, I'm afraid.


>
>
>
>
>
>
> > Michael D. Black
> > Senior Scientist
> > Northrop Grumman Mission Systems
> >
> >
> > 
> >
> > From: sqlite-users-boun...@sqlite.org on behalf of Dr. David Kirkby
> > Sent: Thu 6/24/2010 10:10 AM
> > To: General Discussion of SQLite Database
> > Subject: Re: [sqlite] Why is there no test suite for ''make check' ?
> >
> >
> >
> > On 06/24/10 02:55 PM, Richard Hipp wrote:
> >> On Thu, Jun 24, 2010 at 9:33 AM, Dr. David Kirkby
> >> wrote:
> >>
> >>> I know the SQlite developers take testing quite seriously
> >>>
> >>> http://www.sqlite.org/testing.html
> >>>
> >>> with 679 times as much test code as actual code in the database.
> >>>
> >>> In fact, I've often pointed to the above page when trying to get the
> >>> developers
> >>> of the Sage maths software to pay a bit more attention to testing.
> >>>
> >>>
> >>>
> http://groups.google.co.uk/group/sage-devel/browse_thread/thread/eba06b53be7cd176/e938667e199bfce4?lnk=gst=sqlite#e938667e199bfce4
> >>>
> >>> However, I was somewhat surprised when I run 'make check' to see there
> is
> >>> no
> >>> test suite shipped as part of sqlite. Whilst I realise you do  a lot of
> >>> testing
> >>> and it's impractical for an end user to do all this, I would have
> thought a
> >>> minimal test suite that tests 100 or so things would be useful. Often
> bugs
> >>> in
> >>> compilers or operating systems display bugs that are not seen by the
> >>> developers.
> >>> That would be especially useful if someone is using a rarer platform
> like
> >>> AIX,
> >>> HP-UX, or building in a less common way (like forcing 64-bit builds on
> >>> Solaris,
> >>> as someone was asking about).
> >>>
> >>>
> >> Try instead:
> >>
> >>   make test
> >
> >
> > Thank you.
> >
> > Is this quite new? I don't see it in version 3.6.22.
> >
> > drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$
> make test
> > make: *** No rule to make target `test'.  Stop.
> >
> >
> >> Or, to keep your server busy all afternoon:
> >>
> >>   make fulltest
> >
> > drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$
> make fulltest
> > make: *** No rule to make target `fulltest'.  Stop.
> >
> > drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$
> uname -a
> > SunOS hawk 5.11 snv_134 i86pc i386 i86pc
> >
> >
> > Dave
> > ___
> > 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
>



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


Re: [sqlite] Why is there no test suite for ''make check' ?

2010-06-24 Thread Dr. David Kirkby
On 06/24/10 04:20 PM, Black, Michael (IS) wrote:
> Try one directory up.   It's not in the src directory Makefile.


There is only one directory - there is no 'src' directory at all. If you look 
at 
the path what I posted below, you do see 'src' but that is part of the 
directory 
structure in Sage. In other words


~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src

IS the top level directory in sqlite. (That's assuming some idiot has not 
screwed something up in Sage). I guess I'll need to double check this, but it 
seems unlikely. The 'configure' script creates a Makefile, but that Makefile 
has 
no test/check/fulltest targets.

Dave







> Michael D. Black
> Senior Scientist
> Northrop Grumman Mission Systems
>
>
> 
>
> From: sqlite-users-boun...@sqlite.org on behalf of Dr. David Kirkby
> Sent: Thu 6/24/2010 10:10 AM
> To: General Discussion of SQLite Database
> Subject: Re: [sqlite] Why is there no test suite for ''make check' ?
>
>
>
> On 06/24/10 02:55 PM, Richard Hipp wrote:
>> On Thu, Jun 24, 2010 at 9:33 AM, Dr. David Kirkby
>> wrote:
>>
>>> I know the SQlite developers take testing quite seriously
>>>
>>> http://www.sqlite.org/testing.html
>>>
>>> with 679 times as much test code as actual code in the database.
>>>
>>> In fact, I've often pointed to the above page when trying to get the
>>> developers
>>> of the Sage maths software to pay a bit more attention to testing.
>>>
>>>
>>> http://groups.google.co.uk/group/sage-devel/browse_thread/thread/eba06b53be7cd176/e938667e199bfce4?lnk=gst=sqlite#e938667e199bfce4
>>>
>>> However, I was somewhat surprised when I run 'make check' to see there is
>>> no
>>> test suite shipped as part of sqlite. Whilst I realise you do  a lot of
>>> testing
>>> and it's impractical for an end user to do all this, I would have thought a
>>> minimal test suite that tests 100 or so things would be useful. Often bugs
>>> in
>>> compilers or operating systems display bugs that are not seen by the
>>> developers.
>>> That would be especially useful if someone is using a rarer platform like
>>> AIX,
>>> HP-UX, or building in a less common way (like forcing 64-bit builds on
>>> Solaris,
>>> as someone was asking about).
>>>
>>>
>> Try instead:
>>
>>   make test
>
>
> Thank you.
>
> Is this quite new? I don't see it in version 3.6.22.
>
> drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$ make test
> make: *** No rule to make target `test'.  Stop.
>
>
>> Or, to keep your server busy all afternoon:
>>
>>   make fulltest
>
> drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$ make 
> fulltest
> make: *** No rule to make target `fulltest'.  Stop.
>
> drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$ uname -a
> SunOS hawk 5.11 snv_134 i86pc i386 i86pc
>
>
> Dave
> ___
> 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


Re: [sqlite] Why is there no test suite for ''make check' ?

2010-06-24 Thread Black, Michael (IS)
Try one directory up.   It's not in the src directory Makefile.
 
 
 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 



From: sqlite-users-boun...@sqlite.org on behalf of Dr. David Kirkby
Sent: Thu 6/24/2010 10:10 AM
To: General Discussion of SQLite Database
Subject: Re: [sqlite] Why is there no test suite for ''make check' ?



On 06/24/10 02:55 PM, Richard Hipp wrote:
> On Thu, Jun 24, 2010 at 9:33 AM, Dr. David Kirkby
> wrote:
>
>> I know the SQlite developers take testing quite seriously
>>
>> http://www.sqlite.org/testing.html
>>
>> with 679 times as much test code as actual code in the database.
>>
>> In fact, I've often pointed to the above page when trying to get the
>> developers
>> of the Sage maths software to pay a bit more attention to testing.
>>
>>
>> http://groups.google.co.uk/group/sage-devel/browse_thread/thread/eba06b53be7cd176/e938667e199bfce4?lnk=gst=sqlite#e938667e199bfce4
>>
>> However, I was somewhat surprised when I run 'make check' to see there is
>> no
>> test suite shipped as part of sqlite. Whilst I realise you do  a lot of
>> testing
>> and it's impractical for an end user to do all this, I would have thought a
>> minimal test suite that tests 100 or so things would be useful. Often bugs
>> in
>> compilers or operating systems display bugs that are not seen by the
>> developers.
>> That would be especially useful if someone is using a rarer platform like
>> AIX,
>> HP-UX, or building in a less common way (like forcing 64-bit builds on
>> Solaris,
>> as someone was asking about).
>>
>>
> Try instead:
>
>  make test


Thank you.

Is this quite new? I don't see it in version 3.6.22.

drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$ make test
make: *** No rule to make target `test'.  Stop.


> Or, to keep your server busy all afternoon:
>
>  make fulltest

drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$ make 
fulltest
make: *** No rule to make target `fulltest'.  Stop.

drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$ uname -a
SunOS hawk 5.11 snv_134 i86pc i386 i86pc


Dave
___
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] Why is there no test suite for ''make check' ?

2010-06-24 Thread Dr. David Kirkby
On 06/24/10 02:55 PM, Richard Hipp wrote:
> On Thu, Jun 24, 2010 at 9:33 AM, Dr. David Kirkby
> wrote:
>
>> I know the SQlite developers take testing quite seriously
>>
>> http://www.sqlite.org/testing.html
>>
>> with 679 times as much test code as actual code in the database.
>>
>> In fact, I've often pointed to the above page when trying to get the
>> developers
>> of the Sage maths software to pay a bit more attention to testing.
>>
>>
>> http://groups.google.co.uk/group/sage-devel/browse_thread/thread/eba06b53be7cd176/e938667e199bfce4?lnk=gst=sqlite#e938667e199bfce4
>>
>> However, I was somewhat surprised when I run 'make check' to see there is
>> no
>> test suite shipped as part of sqlite. Whilst I realise you do  a lot of
>> testing
>> and it's impractical for an end user to do all this, I would have thought a
>> minimal test suite that tests 100 or so things would be useful. Often bugs
>> in
>> compilers or operating systems display bugs that are not seen by the
>> developers.
>> That would be especially useful if someone is using a rarer platform like
>> AIX,
>> HP-UX, or building in a less common way (like forcing 64-bit builds on
>> Solaris,
>> as someone was asking about).
>>
>>
> Try instead:
>
>  make test


Thank you.

Is this quite new? I don't see it in version 3.6.22.

drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$ make test
make: *** No rule to make target `test'.  Stop.


> Or, to keep your server busy all afternoon:
>
>  make fulltest

drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$ make 
fulltest
make: *** No rule to make target `fulltest'.  Stop.

drkir...@hawk:~/parallel/sage-4.4.4/spkg/standard/sqlite-3.6.22/src$ uname -a
SunOS hawk 5.11 snv_134 i86pc i386 i86pc


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


Re: [sqlite] How accept sqlite3 commands from stdin

2010-06-24 Thread Jay A. Kreibich
On Thu, Jun 24, 2010 at 10:36:20AM -0400, Pavel Ivanov scratched on the wall:
> > I was asking whether it is possible to use Shebang with sqlite script.
> > If it is possible, would you please show me how to modify the
> > following script to do so?
> 
> If you don't mind one error message then you can do it like this:
> 
> > cat test.sql
> #!/usr/bin/sqlite3 -init

  This works, but you must give the database file on the command line
  (or use an anonymous database).  You might also want to add -batch.

  As best I can figure, the style the OP asked about (where the
  database file is part of the script) can't be done without a
  wrapper.

  This is still pretty useful, however.  

> Otherwise it's impossible to it because '#' is not a comment-starting
> symbol in sqlite command line utility.

  I wonder if it would be worth creating a -initcli or something that
  simply ignored the first line of input.  It could also imply -batch.

   -j

-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] How accept sqlite3 commands from stdin

2010-06-24 Thread Simon Slavin

On 24 Jun 2010, at 3:13pm, Peng Yu wrote:

> I was asking whether it is possible to use Shebang with sqlite script.
> If it is possible, would you please show me how to modify the
> following script to do so?
> 
> $ ./main.sql
> Error: unknown command or invalid arguments:  "/main.sql". Enter
> ".help" for help
> $ cat main.sql
> #!/usr/bin/sqlite3 main.db
> 
> create table tbl1(one varchar(10), two smallint);
> .quit

This is how to send a single command to sqlite3:

$ sqlite3 mydatabase.db 'CREATE TABLE myTable (name TEXT, value INTEGER);'

Put as many commands as you like in the quotes:

$ sqlite3 mydatabase.db "CREATE TABLE myTable (name TEXT, value INTEGER);INSERT 
INTO myTable VALUES ('fred', 3);SELECT * FROM myTable"
fred|3

and put as many commands like that as you like in your shell script.

But it's not a neat way of scripting the command-line tool because it requires 
you to create a shellscript with SQL commands in: two languages in the same 
file.  It's neater to make up a proper .sql file with just the SQL commands in, 
then tell the command-line tool to execute the commands from the file.  Here is 
one way to send multiple commands to sqlite3:

$ cat makemydb.sql
CREATE TABLE myTable (name TEXT, value INTEGER);
INSERT INTO myTable VALUES ('fred', 3);
SELECT * FROM myTable;

$ sqlite3 mydatabase.db '.read makemydb.sql'

Here's how you would do it if you didn't know about the '.read' command:

$ cat makemydb.sql | sqlite3 mydatabase.db

Save the output in an output file:

$ cat makemydb.sql | sqlite3 mydatabase.db > saved.txt

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


Re: [sqlite] How accept sqlite3 commands from stdin

2010-06-24 Thread Pavel Ivanov
> I was asking whether it is possible to use Shebang with sqlite script.
> If it is possible, would you please show me how to modify the
> following script to do so?

If you don't mind one error message then you can do it like this:

> cat test.sql
#!/usr/bin/sqlite3 -init
;
create table tbl1(one varchar(10), two smallint);
.h on
pragma table_info('tbl1');
.quit
> ./test.sql
-- Loading resources from ./test.sql
Error: near line 1: unrecognized token: "#"
cid|name|type|notnull|dflt_value|pk
0|one|varchar(10)|0||0
1|two|smallint|0||0
>

Otherwise it's impossible to it because '#' is not a comment-starting
symbol in sqlite command line utility.


Pavel

On Thu, Jun 24, 2010 at 10:13 AM, Peng Yu  wrote:
> On Thu, Jun 24, 2010 at 5:05 AM, Simon Slavin  wrote:
>>
>> On 24 Jun 2010, at 4:50am, Peng Yu wrote:
>>
>>> Is there a way to use Shebang for sqlite3 script?
>>>
>>> http://en.wikipedia.org/wiki/Shebang_%28Unix%29
>>
>> SQLite comes with a command-line tool.  You can feed it with individual 
>> commands on a Unix command-line or tell it to read commands from a file.
>
> I was asking whether it is possible to use Shebang with sqlite script.
> If it is possible, would you please show me how to modify the
> following script to do so?
>
> $ ./main.sql
> Error: unknown command or invalid arguments:  "/main.sql". Enter
> ".help" for help
> $ cat main.sql
> #!/usr/bin/sqlite3 main.db
>
> create table tbl1(one varchar(10), two smallint);
> .quit
>
>
> --
> Regards,
> Peng
> ___
> 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] How accept sqlite3 commands from stdin

2010-06-24 Thread Jay A. Kreibich
On Thu, Jun 24, 2010 at 09:13:01AM -0500, Peng Yu scratched on the wall:

> I was asking whether it is possible to use Shebang with sqlite script.
> If it is possible, would you please show me how to modify the
> following script to do so?

  Not possible.  Shebang assumes the input file can be given as the
  last argument.  sqlite3's options structure is not setup that way.
  Even if it was, shebang generally only works on systems that
  understand "#" as a comment.

  You can get around the first issue with a small wrapper shell
  script, but I don't think you can fix the second problem without
  modifications to sqlite3.

   -j


-- 
Jay A. Kreibich < J A Y  @  K R E I B I.C H >

"Intelligence is like underwear: it is important that you have it,
 but showing it to the wrong people has the tendency to make them
 feel uncomfortable." -- Angela Johnson
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] vim highlight for sqlite script

2010-06-24 Thread Peng Yu
Hi,

The default vim syntax highlight doesn't highlight command like .help
that is specific to sqlite3. Does anybody use a vim script that can
hightlight those sqlite specific commands?

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


Re: [sqlite] How accept sqlite3 commands from stdin

2010-06-24 Thread Eric Smith
Peng Yu wrote:

> On Thu, Jun 24, 2010 at 5:05 AM, Simon Slavin  wrote:
> >
> > On 24 Jun 2010, at 4:50am, Peng Yu wrote:
> >
> >> Is there a way to use Shebang for sqlite3 script?
> >>
> >> http://en.wikipedia.org/wiki/Shebang_%28Unix%29
> >
> > SQLite comes with a command-line tool.  You can feed it with individual 
> > commands on a Unix command-line or tell it to read commands from a file.
> 
> I was asking whether it is possible to use Shebang with sqlite script.
> If it is possible, would you please show me how to modify the
> following script to do so?
> 
> $ ./main.sql
> Error: unknown command or invalid arguments:  "/main.sql". Enter
> ".help" for help
> $ cat main.sql
> #!/usr/bin/sqlite3 main.db
> 
> create table tbl1(one varchar(10), two smallint);
> .quit

You want to pretend a .sql file is an executable and send commands to
sqlite3?  Try something like this:

[hudson:~] $ cat foo.sql
#!/bin/sh

sqlite3 main.db 

Re: [sqlite] How accept sqlite3 commands from stdin

2010-06-24 Thread Peng Yu
On Thu, Jun 24, 2010 at 5:05 AM, Simon Slavin  wrote:
>
> On 24 Jun 2010, at 4:50am, Peng Yu wrote:
>
>> Is there a way to use Shebang for sqlite3 script?
>>
>> http://en.wikipedia.org/wiki/Shebang_%28Unix%29
>
> SQLite comes with a command-line tool.  You can feed it with individual 
> commands on a Unix command-line or tell it to read commands from a file.

I was asking whether it is possible to use Shebang with sqlite script.
If it is possible, would you please show me how to modify the
following script to do so?

$ ./main.sql
Error: unknown command or invalid arguments:  "/main.sql". Enter
".help" for help
$ cat main.sql
#!/usr/bin/sqlite3 main.db

create table tbl1(one varchar(10), two smallint);
.quit


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


Re: [sqlite] Why is there no test suite for ''make check' ?

2010-06-24 Thread Richard Hipp
On Thu, Jun 24, 2010 at 9:33 AM, Dr. David Kirkby
wrote:

> I know the SQlite developers take testing quite seriously
>
> http://www.sqlite.org/testing.html
>
> with 679 times as much test code as actual code in the database.
>
> In fact, I've often pointed to the above page when trying to get the
> developers
> of the Sage maths software to pay a bit more attention to testing.
>
>
> http://groups.google.co.uk/group/sage-devel/browse_thread/thread/eba06b53be7cd176/e938667e199bfce4?lnk=gst=sqlite#e938667e199bfce4
>
> However, I was somewhat surprised when I run 'make check' to see there is
> no
> test suite shipped as part of sqlite. Whilst I realise you do  a lot of
> testing
> and it's impractical for an end user to do all this, I would have thought a
> minimal test suite that tests 100 or so things would be useful. Often bugs
> in
> compilers or operating systems display bugs that are not seen by the
> developers.
> That would be especially useful if someone is using a rarer platform like
> AIX,
> HP-UX, or building in a less common way (like forcing 64-bit builds on
> Solaris,
> as someone was asking about).
>
>
Try instead:

make test

Or, to keep your server busy all afternoon:

make fulltest


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



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


[sqlite] Why is there no test suite for ''make check' ?

2010-06-24 Thread Dr. David Kirkby
I know the SQlite developers take testing quite seriously

http://www.sqlite.org/testing.html

with 679 times as much test code as actual code in the database.

In fact, I've often pointed to the above page when trying to get the developers 
of the Sage maths software to pay a bit more attention to testing.

http://groups.google.co.uk/group/sage-devel/browse_thread/thread/eba06b53be7cd176/e938667e199bfce4?lnk=gst=sqlite#e938667e199bfce4

However, I was somewhat surprised when I run 'make check' to see there is no 
test suite shipped as part of sqlite. Whilst I realise you do  a lot of testing 
and it's impractical for an end user to do all this, I would have thought a 
minimal test suite that tests 100 or so things would be useful. Often bugs in 
compilers or operating systems display bugs that are not seen by the 
developers. 
That would be especially useful if someone is using a rarer platform like AIX, 
HP-UX, or building in a less common way (like forcing 64-bit builds on Solaris, 
as someone was asking about).


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


Re: [sqlite] sqlite documents in pdf format

2010-06-24 Thread Peng Yu
Hi Artur,

I could use acrobat to convert the whole website to pdf. Do you know
if there is any particular advantage to use PDF Creator, besides the
latter is free?

Although I could use a software to convert html to pdf, I'd prefer to
have a document in pdf directly. As the pdf file converted from html
has a lot of shortcomings. It is very common that software provide
document in many different format. For example, python, GNU make.

If it is possible, I think that it is making sense to generate pdf
version document as well.

On Thu, Jun 24, 2010 at 7:35 AM, Artur Reilin  wrote:
> HI Peng,
>
> you could install PDFCreator (http://en.pdfforge.org/pdfcreator) then open
> the site and print it with PDFCreator. Then you have a pdf-file.
>
> with best wishes
>
> Artur
>
> -
>
>> I only find html format document but not pdf format. In case I miss
>> anything, could you please let me know if there are pdf format of the
>> complete document of sqlite3?
>>
>> http://www.sqlite.org/docs.html
>>
>> --
>> Regards,
>> Peng
>> ___
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
>
>
> Artur Reilin
> sqlite.yuedream.de
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


Re: [sqlite] 64 bit libsqlite for AIX and Solaris

2010-06-24 Thread Dr. David Kirkby
On 06/24/10 09:07 AM, Sushil wrote:
> Hi,
>
> I am looking for 64 bit libsqlite for AIX and Solaris. Is there a place from
> where I can
> get them pre-built ?
>
> I have downloaded sqlite-amalgamation-3.6.23.1.tar and building it. But I
> don't see any
> option in configure to build it for 64 bits. Will the default library built
> be 64 bits. ?
> If not, then how to build them ?
>
>
> Thanks,
> Sushil.

I did send a reply to this a few hours ago, but I see it has not appeared. 
Perhaps it got lost in the ether. Here it is again. I've copied it to you 
personally now, in case for some reason I'm banned from posting to the list, 
but 
I suggest you put any replies on the list.

Dave
---

I can't speak for AIX, but building sqlite 64-bit on OpenSolairs on x64 or 
Solaris 10 on SPARC is quite easy. Just add -m64 to the compiler options 
(CFLAGS).

I know 'sqlite' is used in the Sage maths project, and that is how it is build 
there.

This is a Sun Ultra 27 (quad core Xeon) running OpenSolaris 06/2009

drkir...@hawk:~/parallel/sage-4.4.4$ file local/bin/sqlite3
local/bin/sqlite3:ELF 64-bit LSB executable AMD64 Version 1, dynamically 
linked, not stripped

drkir...@hawk:~/parallel/sage-4.4.4$ file local/lib/libsqlite3.so.0.8.6
local/lib/libsqlite3.so.0.8.6:ELF 64-bit LSB dynamic lib AMD64 Version 1, 
dynamically linked, not stripped


This is a Sun Blade 2000 SPARC running Solaris 10 update 8


drkir...@swan:~/64/sage-4.4.4$ file local/lib/libsqlite3.so.0.8.6 
local/bin/sqlite3
local/lib/libsqlite3.so.0.8.6:  ELF 64-bit MSB dynamic lib SPARCV9 Version 1, 
dynamically linked, not stripped
local/bin/sqlite3:  ELF 64-bit MSB executable SPARCV9 Version 1, 
dynamically 
linked, not stripped

IMPORTANT

'sqlite' does not appear to have any test suite shipped with it (surprisingly, 
as I know the developers take testing very seriously). I've not actually used 
sqlite, so I don't know if it works when built like this.

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


Re: [sqlite] 64 bit libsqlite for AIX and Solaris

2010-06-24 Thread Eric Smith
Black, Michael (IS) wrote: 

> Though I'm not sure if there's any advantage/disadvantage to 64-bit 
> binaries for sqlite3, is there?  

64-bit SQLite can cache more than 4Gb of your db.

Eric

-- 
Eric A. Smith

Finagle's First Law: If an experiment works, something has gone wrong.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] sqlite documents in pdf format

2010-06-24 Thread Artur Reilin
HI Peng,

you could install PDFCreator (http://en.pdfforge.org/pdfcreator) then open
the site and print it with PDFCreator. Then you have a pdf-file.

with best wishes

Artur

-

> I only find html format document but not pdf format. In case I miss
> anything, could you please let me know if there are pdf format of the
> complete document of sqlite3?
>
> http://www.sqlite.org/docs.html
>
> --
> Regards,
> Peng
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>


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


[sqlite] Force Database Corruption

2010-06-24 Thread Israel Lins Albuquerque
Hello, 

I'm needing a corrupted database for test purpose, someone can help me? 
I want an database with corruption on index like: 
"rowid [%ld] missing from index %s" or "wrong # of entries in index %s" 

-- 

Atenciosamente/Regards, 

Israel Lins Albuquerque 
Desenvolvimento/Development 
Polibrás Brasil Software Ltda. 


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


[sqlite] Development snapshots for SQLite 3.7.0 available

2010-06-24 Thread D. Richard Hipp
On the download page of the draft website:

 http://www.sqlite.org/draft/download.html

you can now find amalgamations (the sqlite3.c source file) for  
development snapshots.  These snapshots are intended for beta-testing  
only.  Interfaces and file formats in these snapshots are subject to  
change.  Nevertheless, these snapshots should be reasonably stable in  
the sense that they pass our internal tests.

It will be a great help to our testing efforts if you will give one of  
these amalgamations a try in your software and report any problems you  
encounter to this mailing list.  Thanks.

D. Richard Hipp
d...@hwaci.com



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


Re: [sqlite] 64 bit libsqlite for AIX and Solaris

2010-06-24 Thread Igor Sereda

What compiler are you using? With GCC, you can use -m64 option. There must be
a similar option in other compilers.

-- Igor


Sushil-15 wrote:
> 
> Hi,
> 
> I am looking for 64 bit libsqlite for AIX and Solaris. Is there a place
> from
> where I can
> get them pre-built ?
> 
> I have downloaded sqlite-amalgamation-3.6.23.1.tar and building it. But I
> don't see any
> option in configure to build it for 64 bits. Will the default library
> built
> be 64 bits. ?
> If not, then how to build them ?
> 
> 
> Thanks,
> Sushil.
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://old.nabble.com/64-bit-libsqlite-for-AIX-and-Solaris-tp28981139p28981590.html
Sent from the SQLite mailing list archive at Nabble.com.

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


Re: [sqlite] 64 bit libsqlite for AIX and Solaris

2010-06-24 Thread Black, Michael (IS)
You get the default for whatever platform you're compiling on.
 
Though I'm not sure if there's any advantage/disadvantage to 64-bit binaries 
for sqlite3, is there?
 
 
Michael D. Black
Senior Scientist
Northrop Grumman Mission Systems
 



From: sqlite-users-boun...@sqlite.org on behalf of Sushil
Sent: Thu 6/24/2010 3:07 AM
To: sqlite-users@sqlite.org
Cc: sushi...@gmail.com
Subject: [sqlite] 64 bit libsqlite for AIX and Solaris



Hi,

I am looking for 64 bit libsqlite for AIX and Solaris. Is there a place from
where I can
get them pre-built ?

I have downloaded sqlite-amalgamation-3.6.23.1.tar and building it. But I
don't see any
option in configure to build it for 64 bits. Will the default library built
be 64 bits. ?
If not, then how to build them ?


Thanks,
Sushil.
___
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] Fwd: CRITICAL bug in sqlite3VdbeExec() code

2010-06-24 Thread Richard Hipp
On Thu, Jun 24, 2010 at 6:45 AM, D. Richard Hipp  wrote:

> -- Forwarded message --
> From: jur...@ramzes.net
> To: sqlite-users@sqlite.org
> Date: Thu, 24 Jun 2010 11:15:20 +0200
> Subject: CRITICAL bug in sqlite3VdbeExec() code
> Dear friends,
>
> This is my bug report.
>
> sqlite version: 3.6.23.1, Check-in [2e6a462ceb]
> file: vdbe.c
> line: 971
> function: sqlite3VdbeExec()
>
> description:
>
> Local variable "pOut is not properly initialized in some cases.
> For example:
>
>
Do you have an actual test cases where pOut is uninitialized?  Or are you
basing your claim on the output of a static analysis tool?


>
> ...
> /* Opcode: Variable P1 P2 * P4 *
> **
> ** Transfer the values of bound parameter P1 into register P2
> **
> ** If the parameter is named, then its name appears in P4 and P3==1.
> ** The P4 value is used by sqlite3_bind_parameter_name().
> */
> case OP_Variable: {/* out2-prerelease */
>  Mem *pVar;   /* Value being transferred */
>
>  assert( pOp->p1>0 && pOp->p1<=p->nVar );
>  pVar = >aVar[pOp->p1 - 1];
>  if( sqlite3VdbeMemTooBig(pVar) ){
>goto too_big;
>  }
>  sqlite3VdbeMemShallowCopy(pOut, pVar, MEM_Static); <<<--- ***
> HERE***
>  UPDATE_MAX_BLOBSIZE(pOut);
>  break;
> }
> ...
>
> Function sqlite3VdbeMemShallowCopy() is called with pOut == NULL, of
> course with access violation (in Windows version).
> "case OP_Variable" I have checked under M$ debugger (not coverable
> errors in my PHP/PDO-Sqlite script with parameters binding), but
> possible other cases in massive switch statement, I think ...
>
> greetings from Poland,
>
> JureKL.
> --- End forwarded message -
>
> D. Richard Hipp
> d...@hwaci.com
>
>
>
> ___
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>



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


[sqlite] Fwd: CRITICAL bug in sqlite3VdbeExec() code

2010-06-24 Thread D. Richard Hipp
-- Forwarded message --
From: jur...@ramzes.net
To: sqlite-users@sqlite.org
Date: Thu, 24 Jun 2010 11:15:20 +0200
Subject: CRITICAL bug in sqlite3VdbeExec() code
Dear friends,

This is my bug report.

sqlite version: 3.6.23.1, Check-in [2e6a462ceb]
file: vdbe.c
line: 971
function: sqlite3VdbeExec()

description:

Local variable "pOut is not properly initialized in some cases.
For example:


...
/* Opcode: Variable P1 P2 * P4 *
**
** Transfer the values of bound parameter P1 into register P2
**
** If the parameter is named, then its name appears in P4 and P3==1.
** The P4 value is used by sqlite3_bind_parameter_name().
*/
case OP_Variable: {/* out2-prerelease */
  Mem *pVar;   /* Value being transferred */

  assert( pOp->p1>0 && pOp->p1<=p->nVar );
  pVar = >aVar[pOp->p1 - 1];
  if( sqlite3VdbeMemTooBig(pVar) ){
goto too_big;
  }
  sqlite3VdbeMemShallowCopy(pOut, pVar, MEM_Static); <<<--- ***  
HERE***
  UPDATE_MAX_BLOBSIZE(pOut);
  break;
}
...

Function sqlite3VdbeMemShallowCopy() is called with pOut == NULL, of  
course with access violation (in Windows version).
"case OP_Variable" I have checked under M$ debugger (not coverable  
errors in my PHP/PDO-Sqlite script with parameters binding), but  
possible other cases in massive switch statement, I think ...

greetings from Poland,

JureKL.
--- End forwarded message -

D. Richard Hipp
d...@hwaci.com



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


[sqlite] 64 bit libsqlite for AIX and Solaris

2010-06-24 Thread Sushil
Hi,

I am looking for 64 bit libsqlite for AIX and Solaris. Is there a place from
where I can
get them pre-built ?

I have downloaded sqlite-amalgamation-3.6.23.1.tar and building it. But I
don't see any
option in configure to build it for 64 bits. Will the default library built
be 64 bits. ?
If not, then how to build them ?


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


Re: [sqlite] Issue with locked journal file

2010-06-24 Thread Filip Navara
Ok, I'll expand on that suggestion, try PRAGMA journal_mode=truncate;

If you are using TortoiseSVN on the machine than the most likely cause
is the TSVNCache process. We had countless issues with it.

Best regards,
F.N.

On Wed, Jun 23, 2010 at 8:18 PM, Pavel Ivanov  wrote:
> Is it possible in your application to try journal_mode = PERSIST? I
> guess virus checkers wouldn't block writing to the file. But this way
> you should be sure that journal size wouldn't be so big as for you to
> want to truncate it...
>
>
> Pavel
>
> On Wed, Jun 23, 2010 at 7:02 AM, John Wood  wrote:
>> Hi all,
>>
>> I'm having real problems with locked sqlite journal files.
>>
>> (Win32, V 3.6.23.1).
>>
>> Very occasionaly, a commit fails with extended error code
>> SQLITE_IOERR_DELETE | SQLITE_IOERR.
>>
>> It seems that the most likely cause is another application locking the file
>> at that point (e.g. virus checker).
>>
>> Although it's surprising that this would happen (as the journal file is in a
>> hidden system directory (e.g. C:\users\john\AppData\Local\MyApp)) I guess
>> badly behaved apps may well briefly open and lock recently changed files.
>>
>> (As an aside, this is clearly an issue the sqlite team have tried to
>> address, as in winDelete() you can see it retries several times, and there
>> is a comment which refers to virus checkers).
>>
>> So anyway, instead I switched to using TRUNCATE journal mode instead.
>>
>> But, I'm just getting the same issue. This time the extended error code is
>> SQLITE_IOERR_TRUNCATE | SQLITE_IOERR.
>>
>> So, on some user's machines, very occasionaly SOMETHING is locking the
>> journal file.
>>
>> My question is this: is there a way to make sqlite open the journal file in
>> a locked manner, and keep the lock in effect while it's using it?
>>
>> That way, any naughty app would just not be able to open read handles.
>>
>> (This is certainly possible in Win32: you can specify what share mode you
>> require when opening a file handle).
>>
>> Any ideas?
>>
>> John
>> ___
>> 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


Re: [sqlite] How accept sqlite3 commands from stdin

2010-06-24 Thread Simon Slavin

On 24 Jun 2010, at 4:50am, Peng Yu wrote:

> Is there a way to use Shebang for sqlite3 script?
> 
> http://en.wikipedia.org/wiki/Shebang_%28Unix%29

SQLite comes with a command-line tool.  You can feed it with individual 
commands on a Unix command-line or tell it to read commands from a file.

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