Re: [sqlite] SQLite 3.6.8+ breaks YUM

2009-01-19 Thread Robert L Cochran
D. Richard Hipp wrote:
> On Jan 19, 2009, at 2:59 PM, Tuan Hoang wrote:
>
>   
>> Tuan Hoang wrote:
>> 
>>> Hi,
>>> I've been back-porting SQLite 3.x to CentOS 4.7 for some  
>>> development work.  I've been taking the SRPMS from  
>>> koji.fedoraproject.org and rebuilding them.
>>> All has been fine through v3.6.7 but when I tried to recently  
>>> upgrade to 3.6.10 (by just updating the SPEC file and rebuilding),  
>>> the YUM updater no longer works.  In particular the python-sqlite  
>>> package exits with an error when it tries to read it's cache file  
>>> (I assume that it's a SQLite DB).  I checked the in-between builds  
>>> and one of the changes in v3.6.8 has triggered this error.
>>> Is there anyone else with a similar problem?  FWIW, I've also done  
>>> this under CentOS 5.2 and it also breaks its YUM too.
>>> Thanks,
>>> Tuan
>>> P.S.  Please reply all since I'm not subscribed to the mailing list.
>>>   
>> I did a little more debugging with the yum and it's use of python- 
>> sqlite.  It appears that the database is not corrupt, but rather  
>> that the database can't be created at all.
>>
>> The attached CREATE TABLE statements work fine with v3.6.7 and  
>> before (at least the ones that I've tried).  As of v3.6.8 up through  
>> v3.6.10, YUM can no longer create these tables.
>>
>> Did the string "release" suddenly become a keyword?  If so, why?
>> 
>
> RELEASE is a command name assocated with SAVEPOINTs.  SAVEPOINT  
> support was added for version 3.6.8.
>
> The current CVS contains a work-around in the parser.  The next  
> release (3.6.11) will allow "release" to be used as a column name  
> without quoting.  See ticket #3590 for details. 
> http://www.sqlite.org/cvstrac/tktview?tn=3590
>
> D. Richard Hipp
> d...@hwaci.com
>
>   
I too am experiencing this problem with sqlite-3.6.10 on yum as
installed on CentOS 5.2. Thank you Tuan, Noah, and Richard for finding
and addressing this.

Bob Cochran
Greenbelt, Maryland, USA


> ___
> 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] SQLite version 3.6.10

2009-01-15 Thread Robert L Cochran
Please keep up the great work. I appreciate your fixing major,
identified bugs as fast as possible.

Bob Cochran


D. Richard Hipp wrote:
> SQLite version 3.6.10 is now available on the website.  Upgrading is  
> recommended for all users.
>
> http://www.sqlite.org/
> http://www.sqlite.org/news.html
> http://www.sqlite.org/download.html
>
> SQLite version 3.6.10 fixes a cache coherency bug (Ticket #3584)  
> introduced by check-in [5864]  which was part of version 3.6.5. This  
> bug might lead to database corruption, hence we felt it was important  
> to get it out as quickly as possible, even though there had already  
> been two prior releases this week.
>
> Some concern has been expressed that we are releasing too frequently.  
> (Three releases in one week is a lot!) The concern is that this  
> creates the impression of volatility and unreliability. We have been  
> told that we should delay releases in order to create the impression  
> of stability. But the SQLite developers feel that truth is more  
> important than perception, not the other way around. We think it is  
> important to make the highest quality and most stable version of  
> SQLite available to users at all times. This week has seen two  
> important bugs being discovered shortly after a major release, and so  
> we have issued two emergency patch releases after the regularly  
> scheduled major release. This makes us look bad. This puts "egg on our  
> face." We do not like that. But, three releases also ensures that the  
> best quality SQLite code base is available available to you at all  
> times.
>
> It has been suggested that "beta" releases might find these kinds of  
> bugs prior to a major release. But our experience indicates otherwise.  
> The two issues that prompted releases 3.6.9 and 3.6.10 were both  
> discovered by internal testing and review - not by external users.  
> And, indeed, most the problems found in SQLite these days are  
> discovered by our rigorous internal testing protocol, not bug reports  
> from the field.
>
> It has also been argued that we should withhold releases "until  
> testing is finished." The falacy there is that we never finish  
> testing. We are constantly writing new test cases for SQLite and  
> thinking of new ways to stress and potentially break the code. This is  
> a continuous, never-ending, and on-going process. All existing tests  
> pass before each release. But we will always be writing new tests the  
> day after a release, regardless of how long we delay that release. And  
> sometimes those new tests will uncover new problems.
>
> All this is to say that we believe that SQLite version 3.6.10 is the  
> most stable, most thoroughly tested, and bug-free version of SQLite  
> that has ever existed. Please do not be freaked out by three releases  
> occurring in one week.
>
> 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-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] malloc.c compile error on Fedora 9

2008-10-09 Thread Robert L Cochran
While attempting to compile sqlite 3.6.3 on a Fedora 9 system which was
freshly built (the system is based on the 20081004 Fedora Unity respin),
I got this error in malloc.c. Can anyone suggest a fix? I'm wondering if
I forgot to install a needed RPM package? I installed the "software
development" packages.



./libtool --mode=compile --tag=CC gcc -g -O2 -DSQLITE_OS_UNIX=1 -I.
-I../src -D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1
-DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1
-DSQLITE_TEMP_STORE=1 -c ../src/malloc.c
libtool: compile: gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I../src
-D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1
-DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1
-DSQLITE_TEMP_STORE=1 -c ../src/malloc.c -fPIC -DPIC -o .libs/malloc.o
../src/malloc.c: In function ‘sqlite3_memory_highwater’:
../src/malloc.c:178: warning: call to ‘sqlite3_status’ declared with
attribute warning: is experimental
../src/malloc.c: In function ‘sqlite3_memory_used’:
../src/malloc.c:165: warning: call to ‘sqlite3_status’ declared with
attribute warning: is experimental
libtool: compile: gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I../src
-D_HAVE_SQLITE_CONFIG_H -DNDEBUG -DSQLITE_THREADSAFE=1
-DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1
-DSQLITE_TEMP_STORE=1 -c ../src/malloc.c -o malloc.o >/dev/null 2>&1

[Note: compile goes into a hang at the line above and is stuck there.
Then when you press CTRL-C, you get the output which appears below.]

^Cmake: *** [malloc.lo] Error 1


Thanks

Bob Cochran
Greenbelt, Maryland, USA

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


Re: [sqlite] a suggestion to write tutorial for sqlite

2008-04-19 Thread Robert L Cochran

D. Richard Hipp wrote:
> On Apr 19, 2008, at 5:44 PM, Jay A. Kreibich wrote:
>   
>>  This is a bit off-topic for the mailing list, so please feel free
>>  to send stuff directly to the address below.
>>
>> 
>
> It would be good, I think, to have a public record of this
> conversation.  We can create an [EMAIL PROTECTED]
> mailing list if you think it would help.
>
> D. Richard Hipp
> [EMAIL PROTECTED]
>
>   
I agree with DRH. I too would like to see a public record so that
everyone can contribute and discuss. I see great value in a tutorial not
just for myself (I'm no great database expert...yet!), but also for
other members of my project team at my place of employment, and the
students I try to introduce databases to.

Also...I just recieved an Amazon Kindle reader. I am still learning how
to use it but I'd like the page design of any tutorial to take in mind
someone like me might pop it on an e-book reader like the Kindle. So
far, Amazon seems to be having trouble converting pdf documents to
Kindle format. The conversion process "mixes up" text on a short sample
PDF document I'm testing with. It could be due to the way the PDF is
designed (the author may have made mistakes during the conversion to PDF
which got amplified by my subsequent conversion to Amazon Kindle
format). Any errors that can be traced to Amazon's conversion software
will probably get fixed fast, especially if the company open sources it.
But anyhow folks, let's keep in mind that a tutorial should have a page
design that is e-book friendly.

Thanks

Bob Cochran
Greenbelt, Maryland, USA


>
> ___
> 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] Where To Put SQLite3.exe or SQLite3.dll for Windows Version of PHP?

2008-04-16 Thread Robert L Cochran
Where exactly do I install the sqlite3.exe (or should I use sqlite3.dll)
file for Microsoft Windows such that the Windows version of PHP  5.x
will find it and make use of it? Is it sufficient to create a C:\Program
Files\SQLite3 folder and put the SQLite 3.5.8 module(s) there, then edit
my path variable to point to it?

Thanks

Bob Cochran
Greenbelt, Maryland, USA
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] 3.5.7 Compile Fails On sqlite3.c

2008-04-03 Thread Robert L Cochran
Robert L Cochran wrote:
> Here is what I did:
>
> tar -xvzf sqlite-3.5.7.tar.gz
> cd sqlite-3.5.7
> mkdir bld
> cd !$
> ../configure --prefix=/usr/local/sqlite-3.5.7 --disable-tcl
> --enable-threadsafe
> make
>
> --
> (output of make is shown below)
>  
> [EMAIL PROTECTED] bld]$ make
> sed -e s/--VERS--/3.5.7/ ../src/sqlite.h.in | \
> sed -e s/--VERSION-NUMBER--/3005007/ >sqlite3.h
> gcc -g -O2 -o mkkeywordhash  ../tool/mkkeywordhash.c
> ./mkkeywordhash >keywordhash.h
> gcc -g -O2 -o lemon ../tool/lemon.c
> cp ../tool/lempar.c .
> cp ../src/parse.y .
> ./lemon  parse.y
> mv parse.h parse.h.temp
> gawk -f ../addopcodes.awk parse.h.temp >parse.h
> cat parse.h ../src/vdbe.c | gawk -f ../mkopcodeh.awk >opcodes.h
> sort -n -b -k 3 opcodes.h | gawk -f ../mkopcodec.awk >opcodes.c
> rm -rf tsrc
> mkdir -p tsrc
> cp ../src/alter.c ../src/analyze.c ../src/attach.c ../src/auth.c
> ../src/bitvec.c ../src/btmutex.c ../src/btree.c ../src/btree.h
> ../src/btreeInt.h ../src/build.c ../src/callback.c ../src/complete.c
> ../src/config.h ../src/date.c ../src/delete.c ../src/expr.c
> ../src/fault.c ../src/func.c ../src/hash.c ../src/hash.h ../src/insert.c
> ../src/journal.c ../src/legacy.c ../src/loadext.c ../src/main.c
> ../src/malloc.c ../src/mem1.c ../src/mem2.c ../src/mem3.c ../src/mem4.c
> ../src/mem5.c ../src/mutex.c ../src/mutex.h ../src/mutex_os2.c
> ../src/mutex_unix.c ../src/mutex_w32.c ../src/os.c ../src/os.h
> ../src/os_common.h ../src/os_unix.c ../src/os_win.c ../src/os_os2.c
> ../src/pager.c ../src/pager.h ../src/parse.y ../src/pragma.c
> ../src/prepare.c ../src/printf.c ../src/random.c ../src/select.c
> ../src/shell.c ../src/sqlite.h.in ../src/sqlite3ext.h ../src/sqliteInt.h
> ../src/sqliteLimit.h ../src/table.c ../src/tclsqlite.c ../src/tokenize.c
> ../src/trigger.c ../src/utf.c ../src/update.c ../src/util.c
> ../src/vacuum.c ../src/vdbe.c ../src/vdbe.h ../src/vdbeapi.c
> ../src/vdbeaux.c ../src/vdbeblob.c ../src/vdbefifo.c ../src/vdbemem.c
> ../src/vdbeInt.h ../src/vtab.c ../src/where.c keywordhash.h opcodes.c
> opcodes.h parse.c parse.h sqlite3.h ../ext/fts1/fts1.c
> ../ext/fts1/fts1.h ../ext/fts1/fts1_hash.c ../ext/fts1/fts1_hash.h
> ../ext/fts1/fts1_porter.c ../ext/fts1/fts1_tokenizer.h
> ../ext/fts1/fts1_tokenizer1.c ../ext/fts2/fts2.c ../ext/fts2/fts2.h
> ../ext/fts2/fts2_hash.c ../ext/fts2/fts2_hash.h ../ext/fts2/fts2_icu.c
> ../ext/fts2/fts2_porter.c ../ext/fts2/fts2_tokenizer.h
> ../ext/fts2/fts2_tokenizer.c ../ext/fts2/fts2_tokenizer1.c
> ../ext/fts3/fts3.c ../ext/fts3/fts3.h ../ext/fts3/fts3_hash.c
> ../ext/fts3/fts3_hash.h ../ext/fts3/fts3_icu.c ../ext/fts3/fts3_porter.c
> ../ext/fts3/fts3_tokenizer.h ../ext/fts3/fts3_tokenizer.c
> ../ext/fts3/fts3_tokenizer1.c ../ext/icu/icu.c tsrc
> rm tsrc/sqlite.h.in tsrc/parse.y
> touch .target_source
> tclsh8.4 ../tool/mksqlite3c.tcl
> ./libtool --mode=compile --tag=CC gcc  -g -O2 -DOS_UNIX=1 -I. -I../src
> -DNDEBUG   -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1
> -DSQLITE_OMIT_LOAD_EXTENSION=1 -c ../sqlite3.c
> mkdir .libs
>  gcc -g -O2 -DOS_UNIX=1 -I. -I../src -DNDEBUG -DSQLITE_THREADSAFE=1
> -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -c
> ../sqlite3.c  -fPIC -DPIC -o .libs/sqlite3.o
> gcc: ../sqlite3.c: No such file or directory
> gcc: no input files
> make: *** [sqlite3.lo] Error 1
> 
>
> I looked at the Makefile and it seems to me the problem is in the
> definition of TOP which is set to '..'. All the source files are
> apparently copied to the current directory '.' not '../'.
>
> Is there some new recommended way to build the source code than the one
> given in the README file?
>
> Thanks
>
>
> Bob Cochran
> Greenbelt, Maryland, USA
>
>
>
>   
Fixed with this change to Makefile...the line starting with < is what
works.

[EMAIL PROTECTED] bld]$ diff Makefile Makefile~
430c430
<   $(LTCOMPILE) -c ./sqlite3.c
---
>   $(LTCOMPILE) -c $(TOP)/sqlite3.c



Bob


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


[sqlite] 3.5.7 Compile Fails On sqlite3.c

2008-04-03 Thread Robert L Cochran
Here is what I did:

tar -xvzf sqlite-3.5.7.tar.gz
cd sqlite-3.5.7
mkdir bld
cd !$
../configure --prefix=/usr/local/sqlite-3.5.7 --disable-tcl
--enable-threadsafe
make

--
(output of make is shown below)
 
[EMAIL PROTECTED] bld]$ make
sed -e s/--VERS--/3.5.7/ ../src/sqlite.h.in | \
sed -e s/--VERSION-NUMBER--/3005007/ >sqlite3.h
gcc -g -O2 -o mkkeywordhash  ../tool/mkkeywordhash.c
./mkkeywordhash >keywordhash.h
gcc -g -O2 -o lemon ../tool/lemon.c
cp ../tool/lempar.c .
cp ../src/parse.y .
./lemon  parse.y
mv parse.h parse.h.temp
gawk -f ../addopcodes.awk parse.h.temp >parse.h
cat parse.h ../src/vdbe.c | gawk -f ../mkopcodeh.awk >opcodes.h
sort -n -b -k 3 opcodes.h | gawk -f ../mkopcodec.awk >opcodes.c
rm -rf tsrc
mkdir -p tsrc
cp ../src/alter.c ../src/analyze.c ../src/attach.c ../src/auth.c
../src/bitvec.c ../src/btmutex.c ../src/btree.c ../src/btree.h
../src/btreeInt.h ../src/build.c ../src/callback.c ../src/complete.c
../src/config.h ../src/date.c ../src/delete.c ../src/expr.c
../src/fault.c ../src/func.c ../src/hash.c ../src/hash.h ../src/insert.c
../src/journal.c ../src/legacy.c ../src/loadext.c ../src/main.c
../src/malloc.c ../src/mem1.c ../src/mem2.c ../src/mem3.c ../src/mem4.c
../src/mem5.c ../src/mutex.c ../src/mutex.h ../src/mutex_os2.c
../src/mutex_unix.c ../src/mutex_w32.c ../src/os.c ../src/os.h
../src/os_common.h ../src/os_unix.c ../src/os_win.c ../src/os_os2.c
../src/pager.c ../src/pager.h ../src/parse.y ../src/pragma.c
../src/prepare.c ../src/printf.c ../src/random.c ../src/select.c
../src/shell.c ../src/sqlite.h.in ../src/sqlite3ext.h ../src/sqliteInt.h
../src/sqliteLimit.h ../src/table.c ../src/tclsqlite.c ../src/tokenize.c
../src/trigger.c ../src/utf.c ../src/update.c ../src/util.c
../src/vacuum.c ../src/vdbe.c ../src/vdbe.h ../src/vdbeapi.c
../src/vdbeaux.c ../src/vdbeblob.c ../src/vdbefifo.c ../src/vdbemem.c
../src/vdbeInt.h ../src/vtab.c ../src/where.c keywordhash.h opcodes.c
opcodes.h parse.c parse.h sqlite3.h ../ext/fts1/fts1.c
../ext/fts1/fts1.h ../ext/fts1/fts1_hash.c ../ext/fts1/fts1_hash.h
../ext/fts1/fts1_porter.c ../ext/fts1/fts1_tokenizer.h
../ext/fts1/fts1_tokenizer1.c ../ext/fts2/fts2.c ../ext/fts2/fts2.h
../ext/fts2/fts2_hash.c ../ext/fts2/fts2_hash.h ../ext/fts2/fts2_icu.c
../ext/fts2/fts2_porter.c ../ext/fts2/fts2_tokenizer.h
../ext/fts2/fts2_tokenizer.c ../ext/fts2/fts2_tokenizer1.c
../ext/fts3/fts3.c ../ext/fts3/fts3.h ../ext/fts3/fts3_hash.c
../ext/fts3/fts3_hash.h ../ext/fts3/fts3_icu.c ../ext/fts3/fts3_porter.c
../ext/fts3/fts3_tokenizer.h ../ext/fts3/fts3_tokenizer.c
../ext/fts3/fts3_tokenizer1.c ../ext/icu/icu.c tsrc
rm tsrc/sqlite.h.in tsrc/parse.y
touch .target_source
tclsh8.4 ../tool/mksqlite3c.tcl
./libtool --mode=compile --tag=CC gcc  -g -O2 -DOS_UNIX=1 -I. -I../src
-DNDEBUG   -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1
-DSQLITE_OMIT_LOAD_EXTENSION=1 -c ../sqlite3.c
mkdir .libs
 gcc -g -O2 -DOS_UNIX=1 -I. -I../src -DNDEBUG -DSQLITE_THREADSAFE=1
-DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1 -c
../sqlite3.c  -fPIC -DPIC -o .libs/sqlite3.o
gcc: ../sqlite3.c: No such file or directory
gcc: no input files
make: *** [sqlite3.lo] Error 1


I looked at the Makefile and it seems to me the problem is in the
definition of TOP which is set to '..'. All the source files are
apparently copied to the current directory '.' not '../'.

Is there some new recommended way to build the source code than the one
given in the README file?

Thanks


Bob Cochran
Greenbelt, Maryland, USA



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


Re: [sqlite] can't find libsqlite3.so.0 on RHEL

2008-03-13 Thread Robert L Cochran
That's funny to me...the only other person I know who used the word
'copacetic' was a former team leader in my office, in an email he wrote
years ago. I had to check the dictionary to find out what 'copacetic'
means. I think it's very funny to see the word used again in a software
context.

Bob


P Kishor wrote:
> On 3/13/08, Lloyd <[EMAIL PROTECTED]> wrote:
>   
>> Hi Punkish,
>>
>>  I think after installing the library, and making the path entry in
>>  the /etc/ld.so.conf (If it is not there), simply running the "ldconfig"
>>  command will serve your need.
>> 
>
> Ya, thanks. That did it. Knowing nothing about Linux, I had no idea
> where ldconfig was hiding. Well, it was in /sbin, and of course, /sbin
> is not in the path.
>
> Anyway, it all is copacetic now. And, thankfully, I am back in the
> more comfortable arms of my Mac for now.
>
>
>
>   
>>  Regards,
>>   Lloyd
>>
>>
>>  On Thu, 2008-03-13 at 12:09 -0500, P Kishor wrote:
>>  > I am not at all conversant with RH Linux (RHEL-es3). I have just
>>  > compiled sqlite3.5.6 from amalgamation, and I get the error that
>>  > libsqlite3.so.0 can't be found. I did the following
>>  >
>>  > ../configure
>>  > make && make install
>>  >
>>  > sqlite3 is place in /usr/local/bin
>>  > and libsqlite3.so.0 is placed in /usr/local/lib
>>  >
>>  > [12:07 PM] /usr/local/lib$ ls -l libsql*
>>  > -rw-r--r--1 root   765640 Mar 13 11:51 libsqlite3.a
>>  > -rwxr-xr-x1 root  828 Mar 13 11:51 libsqlite3.la*
>>  > lrwxrwxrwx1 root   19 Mar 13 11:51 libsqlite3.so ->
>>  > libsqlite3.so.0.8.6*
>>  > lrwxrwxrwx1 root   19 Mar 13 11:51 libsqlite3.so.0 ->
>>  > libsqlite3.so.0.8.6*
>>  > -rwxr-xr-x1 root   679734 Mar 13 11:51 libsqlite3.so.0.8.6*
>>  >
>>  >
>>  > of course ldd -v does say
>>  >
>>  > [12:03 PM] ~$ ldd -v /usr/local/bin/sqlite3
>>  > libsqlite3.so.0 => not found
>>  >
>>  > What extra step do I have to take on this computer to make sqlite3
>>  > work properly?
>>  >
>>
>>
>>
>> __
>>  Scanned and protected by Email scanner
>>
>> 
>
>
>   
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] can't find libsqlite3.so.0 on RHEL

2008-03-13 Thread Robert L Cochran

Zbigniew Baniewski wrote:
> On Thu, Mar 13, 2008 at 01:03:01PM -0500, P Kishor wrote:
>
>   
>> why is it the I had to do the above? Why is LD_LIBRARY_PATH not set
>> automatically? And, since it wasn't set, how come other programs were
>> working fine (assuming that other programs in the /usr/local/bin space
>> were looking for libs in /usr/local/lib as well
>>
>> And, what can I do to make LD_LIBRARY_PATH permanent?
>> 
>
> You don't have to.
>
>
> If you run "./configure --help" before any compilation, it'll show you its
> switches. For example:
>
> #v+
> [..]
>
> Installation directories:
>   --prefix=PREFIX install architecture-independent files in PREFIX
>   [/usr/local]
> [..]
>   --libdir=DIR   object code libraries [EPREFIX/lib]
>
> ...and some "influential environment variables" as well:
>
>   LDFLAGS linker flags, e.g. -L if you have libraries in a
>   nonstandard directory 
>   LIBSlibraries to pass to the linker, e.g. -l
> #v-
>
> So, you can set it all *before*.
>   
I agree with Zbigniew. When I compile SQLite in CentOS 5, I use
something like the following `configure` line:

(First unpack the source code, then create an sqlite-x.x.x/bld
directory, then cd into that)

../configure --prefix=/usr/local/sqlite-x.x.x --enable-threadsafe
--disable-tcl
make
su
make install

You could put '3.5.6' where you see x.x.x and get a
/usr/local/sqlite-3.5.6 binary directory when you `make install`.

After `make install` I like to edit /etc/ld.so.conf to point to the
/usr/local/sqlite-x.x.x/lib directory and then run `ldconfig`.

However I don't know if this is a best practice or what others would
recommend. I know I can run into trouble if I have multiple sqlite
version libraries in /etc/ld.so.conf:

/usr/local/sqlite-3.5.3/lib
/usr/local/sqlite-3.5.6/lib

What happens here is the running `sqlite3` results in version 3.5.3
being run, even if my path is set to point to
/usr/local/sqlite-3.5.6/bin. I'm not sure what I'll do if the day comes
when I need to access earlier versions of sqlite. I have a bunch of
those in /usr/local now.

The final step I do after building SQLite is to change my path to point
to /usr/local/sqlite-x.x.x/bin. Again, understand that x.x.x refers to
the version you are building.

Thanks

Bob Cochran
Greenbelt, Maryland, USA


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


Re: [sqlite] can't find libsqlite3.so.0 on RHEL

2008-03-13 Thread Robert L Cochran
Did you change your path (in $HOME/.bash_profile) to point to
/usr/local/bin, then log out and log back in again? I think the path
setting may be the real issue.

After changing /etc/ld.so.conf did you run `ldconfig` as root?

Thanks

Bob Cochran
Greenbelt, Maryland, USA


P Kishor wrote:
> the following solved it
>
> [01:00 PM] ~$ export LD_LIBRARY_PATH=/usr/local/lib
> [01:00 PM] ~$ echo $LD_LIBRARY_PATH
> /usr/local/lib
> [01:00 PM] ~$ sqlite3
> SQLite version 3.5.6
> Enter ".help" for instructions
> sqlite> .q
> [01:00 PM] ~$
>
> why is it the I had to do the above? Why is LD_LIBRARY_PATH not set
> automatically? And, since it wasn't set, how come other programs were
> working fine (assuming that other programs in the /usr/local/bin space
> were looking for libs in /usr/local/lib as well
>
> And, what can I do to make LD_LIBRARY_PATH permanent?
>
> On Thu, Mar 13, 2008 at 12:12 PM, P Kishor <[EMAIL PROTECTED]> wrote:
>   
>> fwiw, my /etc/ld.so.conf is like so
>>
>>  /usr/kerberos/lib
>>  /usr/X11R6/lib
>>  /usr/lib/pgsql
>>  /usr/lib
>>  /usr/local/lib
>>  /usr/local/arcsde/sdeexe83/lib
>>  /usr/lib/qt-3.1/lib
>>  ld.so.conf (END)
>>
>>
>>  in other words, /usr/local/lib is in it.
>>
>>
>>
>>  On Thu, Mar 13, 2008 at 12:09 PM, P Kishor <[EMAIL PROTECTED]> wrote:
>>  > I am not at all conversant with RH Linux (RHEL-es3). I have just
>>  >  compiled sqlite3.5.6 from amalgamation, and I get the error that
>>  >  libsqlite3.so.0 can't be found. I did the following
>>  >
>>  >  ./configure
>>  >  make && make install
>>  >
>>  >  sqlite3 is place in /usr/local/bin
>>  >  and libsqlite3.so.0 is placed in /usr/local/lib
>>  >
>>  >  [12:07 PM] /usr/local/lib$ ls -l libsql*
>>  >  -rw-r--r--1 root   765640 Mar 13 11:51 libsqlite3.a
>>  >  -rwxr-xr-x1 root  828 Mar 13 11:51 libsqlite3.la*
>>  >  lrwxrwxrwx1 root   19 Mar 13 11:51 libsqlite3.so ->
>>  >  libsqlite3.so.0.8.6*
>>  >  lrwxrwxrwx1 root   19 Mar 13 11:51 libsqlite3.so.0 ->
>>  >  libsqlite3.so.0.8.6*
>>  >  -rwxr-xr-x1 root   679734 Mar 13 11:51 libsqlite3.so.0.8.6*
>>  >
>>  >
>>  >  of course ldd -v does say
>>  >
>>  >  [12:03 PM] ~$ ldd -v /usr/local/bin/sqlite3
>>  > libsqlite3.so.0 => not found
>>  >
>>  >  What extra step do I have to take on this computer to make sqlite3
>>  >  work properly?
>>  >
>>  >  --
>>  >  Puneet Kishor
>>  >
>>
>>
>>
>> 
> ___
> 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] PHP Code That Can Store and Retrieve Images

2008-03-11 Thread Robert L Cochran
Is there open source PHP code (PHP 5.x compatible) that can store and
retrieve images from an SQLite 3.5.6 database?

For SQLite version 3.5.x, I need to use the PHP PDO functions if I am
using PHP 5.2.5, right?

I want to show a group of people about 45 photos which I would like to
store on an SQLite database and then retrieve.

Thanks

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


Re: [sqlite] Beginners bad luck

2008-03-09 Thread Robert L Cochran
When you call phpinfo(); do you see that the PDO functionality is enabled?

Is SQLite listed as one of the databases?

http://us.php.net/manual/en/function.phpinfo.php

Also look at your /etc/php.ini file. Assuming your binary of php is
using extensions, are the extensions for sqlite being loaded? You have
to enable them from php.ini.

Finally, you need to use the pdo syntax -- another poster pointed you to
that.

Instead of PHP, you might want to try using the Catalyst framework to
help you get an SQLite-enabled website going. http://catalyst.perl.org/
for further info, and be sure to follow the Catalyst tutorial. One
problem here is that Catalyst itself is very difficult to install and
the plugins needed for the Catlyst Tutorial are harder. In fact I think
PHP might be easier to compile, but then using Zend Framework is
terribly difficult.

Best Regards

Bob Cochran
Greenbelt, Maryland, USA



Aharon (Rony) Shapira wrote:
> I created a simple table named "books" in "library.db".
> After entering "select * from books" I saw the data that I put into it.
>
> When trying to access it through php:
> $file = "library.db";
> // open database file
>
> $handle = sqlite_open($db) or die("Could not open database");
>
> I got the following:
>
> "Could not open database"
>
>
>
> When I tried the following:
>
> $file = "library.db";
>
> // create database object
>
> $db = new SQLiteDatabase($file) or die("Could not open database");
>
> I got the following:
>
> Fatal error: Uncaught exception 'SQLiteException' with message 
> 'SQLiteDatabase::__construct() [ href='function.SQLiteDatabase---construct'>function.SQLiteDatabase---construct]:
>  file is encrypted or is not a database' in 
> /home/zbfckla/public_html/Ocx.php:17 Stack trace: #0 
> /home/zbfckla/public_html/Ocx.php(17): 
> SQLiteDatabase->__construct('library.db') #1 {main} thrown in 
> /home/zbfckla/public_html/Ocx.php on line 17
>
>
>
> Once again I apologies for these silly questions.
>
> Aharon
> ___
> 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] Database Commoditization and SQLite

2008-01-07 Thread Robert L Cochran
I think SQLite is an epochal leap in the development, dissemination, use 
and support of databases in general. Richard has a product that moves 
the whole field ahead. Sometimes other players are kicking and 
screaming, but SQLite has still pushed them ahead because now their 
product is competing with SQLite. They had better improve their own 
product so it regains some eye catching shine!


Bob Cochran

[EMAIL PROTECTED] wrote:

Says Brian Aker, Director of Architecture at MySQL AB:

   "SQLite has commoditized the entire low end of the database
market out of existence."

http://www.linuxworld.com/community/?q=node/2106

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


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



  



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



Re: [sqlite] Compiling Problem With SQLite 3.5.4

2007-12-16 Thread Robert L Cochran

Zbigniew Baniewski wrote:

On Sat, Dec 15, 2007 at 12:48:44PM -0500, Robert L Cochran wrote:

  
I did a poor job of explaining this issue. GCC builds of 3.5.4 seem to 
fail. I've sent Richard a bunch of log files comparing source code 
builds of versions 3.5.3 and 3.5.4 showing what I believe are symptoms 
of the alleged failure. If anyone wants copies of the same set of files, 
feel free to contact me.



Just out of curiosity made a compilation of 3.5.4: apart of some warnings
(below) no errors at all.

cp: uwaga: plik źródłowy `./src/btree.h' pojawił się więcej niż raz
cp: uwaga: plik źródłowy `./src/hash.h' pojawił się więcej niż raz
cp: uwaga: plik źródłowy `./src/sqliteInt.h' pojawił się więcej niż raz
cp: uwaga: plik źródłowy `./src/vdbe.h' pojawił się więcej niż raz
cp: uwaga: plik źródłowy `./ext/fts1/fts1.h' pojawił się więcej niż raz
cp: uwaga: plik źródłowy `./ext/fts1/fts1_hash.h' pojawił się więcej niż raz
cp: uwaga: plik źródłowy `./ext/fts1/fts1_tokenizer.h' pojawił się więcej niż 
raz

(it means: "cp: warning: source file `..' appears more than once")

Compiled on:
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Linux with kernel 2.6.22
Pentium II


One additional comment:

Tcl's 8.5 "package require" isn't as tollerant about version marks, as in
8.4.x line it used to. So, the proper pgIndex.tcl contents should contain the
subversion digit as well, instead of just "3.5" - I mean:

package ifneeded sqlite3 3.5.4 [list load 
/usr/local/lib/tcl8.5/sqlite3/libtclsqlite3.so sqlite3]

  
Yes, I agree completely. 'make' wasn't issuing the 'creating sqlite3' 
message I've been so accustomed to, and the cp messages about duplicates 
concerned me. Christian supplied me some patches to get rid of the size 
messages and Richard told me they got rid of the creating message, 'make 
install' worked fine, and I have version 3.5.4 (with Christian's 
patches) running.


Bob

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



Re: [sqlite] Compiling Problem With SQLite 3.5.4

2007-12-15 Thread Robert L Cochran

[EMAIL PROTECTED] wrote:

Robert L Cochran <[EMAIL PROTECTED]> wrote:
  
While compiling version 3.5.4 using gcc, I got these messages from 
'make' on my CentOS 5 host. It looks to me like the 'make' step failed. 
I can post the config.log if that would help.


How can I fix this to get a successful compile?




I don't see any errors in your make output, only warnings.
Did I overlook something, or are you concerned about the
warnings.

The warnings all have to do with the fact that you are
compiling on a machine with 64-bit pointers and 32-bit
integers.  The warnings are all harmless and the code
works as intended as long as

 sizeof(int) <= sizeof(void*)

Perhaps a reader can suggest ways of eliminating these
warnings.

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


  
I did a poor job of explaining this issue. GCC builds of 3.5.4 seem to 
fail. I've sent Richard a bunch of log files comparing source code 
builds of versions 3.5.3 and 3.5.4 showing what I believe are symptoms 
of the alleged failure. If anyone wants copies of the same set of files, 
feel free to contact me.


Bob


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



  



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



[sqlite] Compiling Problem With SQLite 3.5.4

2007-12-15 Thread Robert L Cochran
While compiling version 3.5.4 using gcc, I got these messages from 
'make' on my CentOS 5 host. It looks to me like the 'make' step failed. 
I can post the config.log if that would help.


How can I fix this to get a successful compile?

Bob Cochran





./libtool --mode=link gcc -g -O2 -I. -I../src -DNDEBUG   -DSQLITE_THREADSAFE=1 -DSQLITE_THREAD_OVERRIDE_LOCK=-1 -DSQLITE_OMIT_LOAD_EXTENSION=1  -o libsqlite3.la alter.lo analyze.lo attach.lo auth.lo btmutex.lo btree.lo build.lo callback.lo complete.lo date.lo delete.lo expr.lo func.lo hash.lo journal.lo insert.lo loadext.lo main.lo malloc.lo mem1.lo mem2.lo mem3.lo mem4.lo mutex.lo mutex_os2.lo mutex_unix.lo mutex_w32.lo opcodes.lo os.lo os_unix.lo os_win.lo os_os2.lo pager.lo parse.lo pragma.lo prepare.lo printf.lo random.lo select.lo table.lo tokenize.lo trigger.lo update.lo util.lo vacuum.lo vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbefifo.lo vdbemem.lo where.lo utf.lo legacy.lo vtab.lo -lpthread  \
 -rpath /usr/local/sqlite-3.5.4/lib -version-info "8:6:8"
gcc -shared  .libs/alter.o .libs/analyze.o .libs/attach.o .libs/auth.o .libs/btmutex.o .libs/btree.o .libs/build.o .libs/callback.o .libs/complete.o .libs/date.o .libs/delete.o .libs/expr.o .libs/func.o .libs/hash.o .libs/journal.o .libs/insert.o .libs/loadext.o .libs/main.o .libs/malloc.o .libs/mem1.o .libs/mem2.o .libs/mem3.o .libs/mem4.o .libs/mutex.o .libs/mutex_os2.o .libs/mutex_unix.o .libs/mutex_w32.o .libs/opcodes.o .libs/os.o .libs/os_unix.o .libs/os_win.o .libs/os_os2.o .libs/pager.o .libs/parse.o .libs/pragma.o .libs/prepare.o .libs/printf.o .libs/random.o .libs/select.o .libs/table.o .libs/tokenize.o .libs/trigger.o .libs/update.o .libs/util.o .libs/vacuum.o .libs/vdbe.o .libs/vdbeapi.o .libs/vdbeaux.o .libs/vdbeblob.o .libs/vdbefifo.o .libs/vdbemem.o .libs/where.o .libs/utf.o .libs/legacy.o .libs/vtab.o  -lpthread  -Wl,-soname -Wl,libsqlite3.so.0 -o .libs/libsqlite3.so.0.8.6
(cd .libs && rm -f libsqlite3.so.0 && ln -s libsqlite3.so.0.8.6 libsqlite3.so.0)
(cd .libs && rm -f libsqlite3.so && ln -s libsqlite3.so.0.8.6 libsqlite3.so)
ar cru .libs/libsqlite3.a  alter.o analyze.o attach.o auth.o btmutex.o btree.o build.o callback.o complete.o date.o delete.o expr.o func.o hash.o journal.o insert.o loadext.o main.o malloc.o mem1.o mem2.o mem3.o mem4.o mutex.o mutex_os2.o mutex_unix.o mutex_w32.o opcodes.o os.o os_unix.o os_win.o os_os2.o pager.o parse.o pragma.o prepare.o printf.o random.o select.o table.o tokenize.o trigger.o update.o util.o vacuum.o vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbefifo.o vdbemem.o where.o utf.o legacy.o vtab.o
ranlib .libs/libsqlite3.a
creating libsqlite3.la
(cd .libs && rm -f libsqlite3.la && ln -s ../libsqlite3.la libsqlite3.la)
rm -rf tsrc
mkdir -p tsrc
cp ../src/alter.c ../src/analyze.c ../src/attach.c ../src/auth.c ../src/btmutex.c ../src/btree.c ../src/btree.h ../src/build.c ../src/callback.c ../src/complete.c ../src/date.c ../src/delete.c ../src/expr.c ../src/func.c ../src/hash.c ../src/hash.h ../src/insert.c ../src/journal.c ../src/legacy.c ../src/loadext.c ../src/main.c ../src/malloc.c ../src/mem1.c ../src/mem2.c ../src/mem3.c ../src/mem4.c ../src/mutex.c ../src/mutex_os2.c ../src/mutex_unix.c ../src/mutex_w32.c ../src/os.c ../src/os_unix.c ../src/os_win.c ../src/os_os2.c ../src/pager.c ../src/pager.h ../src/parse.y ../src/pragma.c ../src/prepare.c ../src/printf.c ../src/random.c ../src/select.c ../src/shell.c ../src/sqlite.h.in ../src/sqliteInt.h ../src/table.c ../src/tclsqlite.c ../src/tokenize.c ../src/trigger.c ../src/utf.c ../src/update.c ../src/util.c ../src/vacuum.c ../src/vdbe.c ../src/vdbe.h ../src/vdbeapi.c ../src/vdbeaux.c ../src/vdbeblob.c ../src/vdbefifo.c ../src/vdbemem.c ../src/vdbeInt.h ../src/vtab.c ../src/where.c ../ext/fts1/fts1.c ../ext/fts1/fts1.h ../ext/fts1/fts1_hash.c ../ext/fts1/fts1_hash.h ../ext/fts1/fts1_porter.c ../ext/fts1/fts1_tokenizer.h ../ext/fts1/fts1_tokenizer1.c sqlite3.h ../src/btree.h ../src/btreeInt.h ../src/hash.h ../src/sqliteLimit.h ../src/mutex.h opcodes.h ../src/os.h ../src/os_common.h ../src/sqlite3ext.h ../src/sqliteInt.h ../src/vdbe.h parse.h ../ext/fts1/fts1.h ../ext/fts1/fts1_hash.h ../ext/fts1/fts1_tokenizer.h ../src/vdbeInt.h tsrc
cp: warning: source file `../src/btree.h' specified more than once
cp: warning: source file `../src/hash.h' specified more than once
cp: warning: source file `../src/sqliteInt.h' specified more than once
cp: warning: source file `../src/vdbe.h' specified more than once
cp: warning: source file `../ext/fts1/fts1.h' specified more than once
cp: warning: source file `../ext/fts1/fts1_hash.h' specified more than once
cp: warning: source file `../ext/fts1/fts1_tokenizer.h' specified more than once
cp: warning: source file `../src/vdbeInt.h' specified more than once
rm tsrc/sqlite.h.in tsrc/parse.y
cp parse.c opcodes.c keywordhash.h tsrc
tclsh ../tool/mksqlite3c.tcl
./libtool --mode=link gcc -g -O2 -I. -I../src -DNDEBUG   -DSQLITE_THREADSAFE=1 

Re: [sqlite] Should the next release be 3.5.4 or 3.6.0?

2007-12-13 Thread Robert L Cochran

Trey Mack wrote:



3.6.0 in the next release?  Or can we call the change
a "bug fix" and number the next release 3.5.4?


I guess I'm in the minority, but I'd find a change in the meaning of  
my queries surprising in a bug fix release. That sounds like a 3.6 
to  me.


You may be in the minority, but you're not alone. +1.


And I agree, this is a 3.6.0 kind of release.

Bob


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



Re: [sqlite] SQLite 64-Bit

2007-07-04 Thread Robert L. Cochran
Of course, you also need a 64-bit capable processor. I've been compiling SQLite 
on AMD Athlon 64 boxes using Fedora Core and CentOS x86_64 operating systems 
(and that means the gcc toolchain) for ages.

Bob Cochran

> -Original Message-
> From: Ahmed Sulaiman [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 4, 2007 07:38 PM
> To: sqlite-users@sqlite.org
> Subject: RE: [sqlite] SQLite 64-Bit
>
> Thanks Ian,.. I will give it a try :)
>
> -Original Message-
> From: Ian Frosst [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 04, 2007 3:26 PM
> To: sqlite-users@sqlite.org
> Subject: Re: [sqlite] SQLite 64-Bit
>
> I build SQLite's code using Visual Studio 2005 using the 64 bit tool
> chain,
> and it runs without a hitch.  I haven't seen a pre-compiled library for
> it,
> so you may have to get your hands a bit dirty.  Building it is a snap
> though; add the sqlite3.c and sqlite3.h files to a project, define
> NO_TCL
> and THREADSAFE in the preprocessor for your various configurations, and
> voila.
>
> On 7/4/07, Ahmed Sulaiman <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >
> >
> >
> > We are interested in using the SQLite in our project. I wonder if
> there
> > a version that works in 64-Bit machine? I have looked in the download
> > page and noticed that only Win32 (x86) builds are available.
> >
> >
> >
> > Regards
> >
> >
> >
> > Ahmed
> >
> >
>
>
> -
> To unsubscribe, send email to [EMAIL PROTECTED]
> -
>
>



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



Re: [sqlite] Issue with trailing blanks

2007-03-27 Thread Robert L Cochran

Hi Joel,

It's been a while since I've had to code DB2 and my memory might be 
faulty. But the SQL standard says char(n) has to be padded with trailing 
spaces, right? See this http://troels.arvin.dk/db/rdbms/

under the heading "The CHAR type".

Thanks

Bob Cochran

Joel Cochran wrote:

Hi Bob, always nice to meet a fellow Cochran!

This is DB2/400 for V5R1 of OS/400, and yes it is stored in EBCDIC.  I am
using the IBM supplied .Net Managed Provider to read the data into a C#
program, (which I believe automatically converts it to ASCII) and then 
using
the SQLite Managed Provider to insert the records into SQLite.  The 
SQLite
version is the most recent (1.0.40?) and the platform is Windows.  The 
data

file is then shipped to a Compact Framework application and is used on a
Windows Mobile device, so there is that platform as well.

Thanks,



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



Re: [sqlite] Abuse of the SQLite website

2007-01-31 Thread Robert L Cochran

Peter James wrote:

On 1/30/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Thoughts anyone?  Are there less drastic measures that might
be taken to prevent this kind of abuse?



A couple of people here mentioned CAPTCHA's.  This is sort of the 
standard
for preventing automated abuse (intentional or unintentional), and 
there are

lots of example implementations out there, maybe even in whatever "custom
software" you use. :-)

http://en.wikipedia.org/wiki/Captcha

Even if you don't go the CAPTCHA route, just forcing an HTTP POST to 
begin a

download will probably filter out a large proportion of errant traffic or
web bots.  I see your robots.txt file is in order for the downloads area,
but of course that's just a gentleman's agreement...

I would be really careful about using these. A significant number of 
people are visually impaired -- I work directly with one person who is 
(he uses powerful magnifiers to read normal sized 10-12 point text) and 
a second person who sits across from me in the office is blind. I don't 
know how they deal with captcha verification, I will have to ask. Notice 
what the wikipedia text has to say on accessibility issues. A maptcha is 
probably a better solution but if you don't understand you are looking 
at a math problem, you are also blocked out.


Bob Cochran


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



Re: [sqlite] Abuse of the SQLite website

2007-01-30 Thread Robert L Cochran
I fix computers for customers during evenings and weekends and I have 
only have 2 customers (so far) using Windows 98. Nearly everyone, even 
the many seniors among my clients, use Windowx XP and/or OS X.


I feel that banning Win 98 machines is therefore appropriate. Serious 
developers wouldn't be using or developing on Windows 98 any more than 
Windows 3.1. If someone truly needs to download from your site, that 
person can contact you or post to this list and I'm sure some happy 
arrangement can be made. Give them the dump. That's what I would do.


I'm still the only Linux user in my circle of associates but then...the 
Linux folks would probably fix their machines themselves rather than pay 
me to do it. So they'd never think of contacting me to begin with.


Bob Cochran
Greenbelt, Maryland, USA

[EMAIL PROTECTED] wrote:

Last night, a single user (or, at least, a single IP address)
in China that self-identified as running windows98 and
Mozilla 4.0 attempted to download sqlite-3.3.12.tar.gz
24980 times and  sqlite-source-3_3_12.zip 25044 times
over about a 5 hour period, sucking up significant
bandwidth in the process.

I've seen this type of thing before and have on occasion
banned specific IP addresses from the website using

   iptables -A INPUT -s  -j DROP

But lately, there have been so many problems coming from
win98 and moz4 that I'm thinking of banning all traffic
that self-identifies as such in the User-Agent string of
the HTTP header.

Thoughts anyone?  Are there less drastic measures that might
be taken to prevent this kind of abuse?

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


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



  



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



[sqlite] PHP 5.2.0 pdo_sqlite SQLITE Version

2006-11-02 Thread Robert L Cochran

I just did a compile of PHP 5.2.0 with (in part) this configure string:

--with-pdo-sqlite=/usr/local/sqlite-3.3.8/lib \

on a Fedora Core 5 machine.

Running phpinfo() lists the SQLite library version as 3.3.3 for PDO 
SQLite. That puzzles me. The path information I passed to PHP's 
configure is for version 3.3.8. Am I doing something wrong here?


Thanks

Bob Cochran
Greenbelt, MD, USA



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



[sqlite] Did I Corrupt My Fedora Core 5 Yum Database?

2006-10-31 Thread Robert L Cochran
I believe I overwrote my Fedora Core 5 version of sqlite (that's 
3.3.3-1.2.x86_64) for the second time this year. I downloaded 
sqlite-3.3.8 and compiled it with this configure string:


../configure --prefix=/usr/local/sqlite-3.3.8 --libdir=/usr/lib64 
--includedir=/usr/include --disable-tcl --enable-threadsafe --enable-utf8


and because of the libdir option shown above, I overwrote the version 
3.3.3 sqlite libraries that the Fedora Core installer put in for me.


Then I ran yum as 'yum update' to see if yum would still work properly. 
I canceled the update before it could install packages, but that was 
probably still dumb to do since by then yum had started updating its 
sqlite database, right? And it did that with sqlite version 3.3.8?


To fix this, I downloaded the sqlite-3.3.3-1.2 and 
sqlite-devel-3.3.3-1.2 rpm packages for Fedora Core 5 and used 'rpm -ivh 
--force ...' to force them to install.


Did I corrupt the database of Fedora Core 5 package information the yum 
program keeps by doing this? Can anyone tell me which files I need to 
back up to preserve the yum database? /var/cache/yum?


Thanks

Bob Cochran
Greenbelt, MD, USA




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



Re: [sqlite] SQLite Path Problem On Fedora Core 5

2006-06-26 Thread Robert L Cochran

DJ Anubis wrote:


Robert L Cochran a écrit :
 


However, on Fedora Core 5, my path is set so that objects on
/usr/local/bin are found before those on /usr/bin. I'm not sure how this
is happening; perhaps /etc/profile? The result seems to be that even if
sqlite 3.3.3 was installed by yum, executing /usr/bin/sqlite3 will yeild
a command line stating its version is 3.2.7  which is one of the
versions I believe I installed to /usr/local myself.
   


Yes FC5 uses the following default path:
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
which means your binaries in /usr/local/bin will be accessed before
those in /usr/bin.

 


How do I fix my sqlite version mess so that I can have multiple
installed versions: the one used by yum (and possibly other modules) and
the latest and greatest release, which I want to link into PHP for my
own purposes. (Yes I compile PHP on my own.)
   


With an up to date yum install, FC5 default SQlite is 3.3.3
You can clean up thethings in the following way.

Instaed of using /usr/local for prefix when configuring a sqlite build
you could pass:
./configure --prefix=/usr/local/sqlite-3.3.6 (for 3.3.6 version)
This will install each of your multiple sqlite versions (except de
default used by yum) in its own envronment.

To build an application with a particular sqlite build, you'll have to
add, ie for PHP 5.1.4:

--with-sqlite=/usr/local/sqlite-3.3.6
--with-pdo-sqlite=/usr/local/sqlite-3.3.6

As PHP configuration system uses the --rpath which tells the binaries
the full path of used libraries, this will work.
For applications where you're not sure --rpath is used, you can add it
to configure options.




 


Thank you very much for your help!

Bob




[sqlite] SQLite Path Problem On Fedora Core 5

2006-06-25 Thread Robert L Cochran

For a long time, I've been playing with the Sqlite product from
http://www.sqlite.org .  I started doing this before Fedora Core 4, and
would compile the source code to the default install directories of
/usr/local/bin and /usr/local/lib, etc. This worked great until Fedora
Core started packaging Sqlite and installing it by default, I think
mainly because yum uses it. And for good reason too.

This is where I got in trouble. The Fedora Core rpm package installs to
/usr/bin and /usr/lib and /usr/include.

However, on Fedora Core 5, my path is set so that objects on
/usr/local/bin are found before those on /usr/bin. I'm not sure how this
is happening; perhaps /etc/profile? The result seems to be that even if
sqlite 3.3.3 was installed by yum, executing /usr/bin/sqlite3 will yeild
a command line stating its version is 3.2.7  which is one of the
versions I believe I installed to /usr/local myself.

currently, /etc/ld.so.conf points at /usr/local/lib.

Yum seems to work fine.

How do I fix my sqlite version mess so that I can have multiple
installed versions: the one used by yum (and possibly other modules) and
the latest and greatest release, which I want to link into PHP for my
own purposes. (Yes I compile PHP on my own.)

Thanks

Bob Cochran
Maryland, USA



Re: [sqlite] Fedora Core 4 RPM Version of SQLite And A Sad Tale of PHP Configure Error In v3.3.3

2006-02-07 Thread Robert L Cochran


Dan Kennedy wrote:


configure:79872: checking for sqlite_open in -lsqlite
   



It might be looking for sqlite version 2, not 3. Grep the
configure script for the string "sqlite3_open", and then
"sqlite_open". If you find the latter and not the former,
it's version 2 you need to install.



 



You were exactly right. I compiled 2.8.17 and that let PHP 6 configure, 
make, and make install.


However I think I blew away Fedora's yum (yellowdog updater) program 
when I compiled and installed 3.3.3...or maybe 2.8.17 did it...yum seems 
to have gone haywire. But there was also a raft of Fedora updates so 
I'll not point fingers at SQLite. I was just recalling that yum uses 
SQLite now and my own misconfiguration could have caused a problem.


Bob Cochran



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



 





[sqlite] Fedora Core 4 RPM Version of SQLite And A Sad Tale of PHP Configure Error In v3.3.3

2006-02-03 Thread Robert L Cochran
In one of my less-than-brilliant moments, I compiled and installed 
Sqlite 3.3.3 on my Fedora Core 4 (x86_64) system without checking 
whether an earlier version had been installed by the distro's anaconda 
installation program. It appears that SQLite 3.1.2 comes with Fedora 
Core 4. Ooops. In fact, it looks like I've been doing this since 
December 23 with earlier builds of SQLite such as 3.2.7 and later.


Here is one result of such folly:

I'm getting this configure error while attempting to compile the 
snapshot-of-the-moment of PHP6 (200602040133 from snaps.php.net) with 
SQLite 3.3.3:


configure:79644: checking for sqlite support
configure:79690: checking whether to enable UTF-8 support in sqlite 
(default: ISO-8859-1)

configure:79721: checking for PDO includes
configure:79872: checking for sqlite_open in -lsqlite
configure:79891: gcc -o conftest -I/usr/include -g -O2  
-Wl,-rpath,/usr/lib64/lib64 -L/usr/lib64/lib64 -L/usr/lib64 
-L/usr/lib64  -Wl,-rpath,/usr/local/lib -L/usr/local/lib 
-Wl,-rpath,/usr/kerberos/lib -L/usr/kerberos/lib 
-Wl,-rpath,/usr/kerberos/lib64 -L/usr/kerberos/lib64 -lm conftest.c 
-lsqlite  -laspell -lpspell -lrt -lgmp -lfreetype -lpng -lz -ljpeg 
-ldb-4.3 -ldb-4.3 -lgdbm -lcurl -lbz2 -lz -lresolv -lm -ldl -lnsl  -lm 
-licui18n -licuuc -licudata -lm -licuio -lxml2 -lz -lm -lgssapi_krb5 
-lkrb5 -lk5crypto -lcom_err -lssl -lcrypto -lgssapi_krb5 -lkrb5 
-lcom_err -lk5crypto -lresolv -ldl -lz -lcurl -lssl -lcrypto 
-lgssapi_krb5 -lkrb5 -lcom_err -lk5crypto -lresolv -ldl -lz 
-lgssapi_krb5 -lkrb5 -lk5crypto -lkrb5support -lcom_err -lresolv -lidn 
-lssl -lcrypto -lz -lxml2 -lz -lm -lssl -lcrypto -lgssapi_krb5 -lkrb5 
-lcom_err -lk5crypto -lresolv -ldl -lz -lxml2 -lz -lm -lxml2 -lz -lm 1>&5

/usr/bin/ld: cannot find -lsqlite
collect2: ld returned 1 exit status
configure: failed program was:
#line 79880 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error.  */
/* We use char because int might match the return type of a gcc2
   builtin and then its argument prototype would still apply.  */
char sqlite_open();

int main() {
sqlite_open()
; return 0; }

The configure script emits this message:

configure: error: wrong sqlite lib version or lib not found

I built SQLite 3.3.3 using these configure options:

../configure --libdir=/usr/lib64 --includedir=/usr/include 
--with-tcl=/usr/lib64 --enable-threadsafe --with-utf8



/usr/lib64 contains these SQLite libraries:

[EMAIL PROTECTED] php6.0-200602040133]$ ls -al /usr/lib64/*sqlit*
-rw-r--r--  1 root root 2371476 Feb  3 17:54 /usr/lib64/libsqlite3.a
-rwxr-xr-x  1 root root 831 Feb  3 17:54 /usr/lib64/libsqlite3.la
lrwxrwxrwx  1 root root  19 Feb  3 17:54 /usr/lib64/libsqlite3.so -> 
libsqlite3.so.0.8.6
lrwxrwxrwx  1 root root  19 Feb  3 17:54 /usr/lib64/libsqlite3.so.0 
-> libsqlite3.so.0.8.6

-rwxr-xr-x  1 root root 1365463 Feb  3 17:54 /usr/lib64/libsqlite3.so.0.8.6

Here is /usr/bin:

[EMAIL PROTECTED] php6.0-200602040133]$ ls -al /usr/bin/sqlite3
-rwxr-xr-x  1 root root 37480 Apr 10  2005 /usr/bin/sqlite3

And here is /usr/local/bin:

[EMAIL PROTECTED] php6.0-200602040133]$ ls -al /usr/local/bin/sqlite3
-rwxr-xr-x  1 root root 76092 Feb  3 17:54 /usr/local/bin/sqlite3

What is the best way to fix this problem? Build a new rpm package 
containing SQLite-3.3.3 and install that, or find the binary modules 
from version 3.1.2 and manually overwrite them with the same 3.3.3 binaries?


Thanks

Bob Cochran



[sqlite] Conversion of SQLite 3.2.5 database to 3.3.1

2006-01-18 Thread Robert L Cochran
I have a database I created in SQLite 3.2.5, then updated with 
subsequent versions up to 3.2.7. There are several tables.


Version 3.3.1 has a new file format and I'd like to convert the database 
file to this new format. How do I do that?


Thanks

Bob Cochran
Greenbelt, Maryland, USA



Re: [sqlite] SQLite 3.3.1

2006-01-17 Thread Robert L Cochran

Ken & Deb Allen wrote:

Hmmm. The number of warnings compiling the 3.3.1 source is up to 10 
from 6 in the 3.3.0 source. All of them appear to be related to 
inappropriate sign comparisons/assignments.


-ken


So your compiler is blowing smoke. GCC 4.02 which I use under Linux 
coughs up warnings for every compile of almost all my favorite software 
such as PHP 6. The software still works fine.


Bob


Re: [sqlite] Problem executing SQLite 3.3.0 under MacOS

2006-01-16 Thread Robert L Cochran
You can search your Makefile to see if a module is set to compile an 
os.c. For example:

[EMAIL PROTECTED] bld]$ egrep 'os' Makefile
# This makefile is suppose to be configured automatically using the
# same unless your are cross-compiling.)
main.lo opcodes.lo os.lo os_unix.lo os_win.lo \
$(TOP)/src/os.c \
$(TOP)/src/os_unix.c \
$(TOP)/src/os_win.c \
$(TOP)/src/os_unix.c \
$(TOP)/src/os_win.c \
$(TOP)/src/os.h \
$(TOP)/src/os_common.h \
# of the most recently modified source code file
os.lo: $(TOP)/src/os.c $(HDR)
$(LTCOMPILE) -c $(TOP)/src/os.c
os_unix.lo: $(TOP)/src/os_unix.c $(HDR)
$(LTCOMPILE) -c $(TOP)/src/os_unix.c
os_win.lo: $(TOP)/src/os_win.c $(HDR)
$(LTCOMPILE) -c $(TOP)/src/os_win.c
#make Borland C++ and/or Microsoft VC import library for the dll

and you should have the expected binary output:

[EMAIL PROTECTED] bld]$ ls -al os*
-rw-rw-r-- 1 rlc rlc 309 Jan 11 15:27 os.lo
-rw-rw-r-- 1 rlc rlc 13640 Jan 11 15:27 os.o
-rw-rw-r-- 1 rlc rlc 324 Jan 11 15:27 os_unix.lo
-rw-rw-r-- 1 rlc rlc 50360 Jan 11 15:27 os_unix.o
-rw-rw-r-- 1 rlc rlc 321 Jan 11 15:27 os_win.lo
-rw-rw-r-- 1 rlc rlc 4248 Jan 11 15:27 os_win.o


and a careful examination of the linkeditor output should show you it 
was linked in, too.


So what I'm getting at is that if your attention focuses on a specific 
module, ask yourself if it was compiled and linked to begin with. As you 
can see, the checking process is simple.


Bob Cochran


Ken & Deb Allen wrote:

Thank you, kind sir. Sometimes it is difficult to see the individual 
ferns on the floor of the massive forest!


Oddly enough, the problem seems to have been caused by the lack of the 
os.c file being compiled into the project at all? Some files that were 
in the 3.2.8 code stream are no longer present and this new os.c file 
was added to the 3.3.0 code tree. I had copied to the files from the 
3.3.0 code stream into the project subdirectory, but I had missed the 
fact that there was a new file, and the compilation did not report the 
problem!


I added this file and adjusted the optimization level, and the problem 
disappeared -- the code is working as before!


I have adjusted the code so that the debug mode has optimization 
turned off, but that it is still enabled in release mode.


Thanks once again.

-ken

On 13-Jan-06, at 8:40 PM, [EMAIL PROTECTED] wrote:


Try recompiling with all optimization turned off. Optimizers
tend to reorder code which makes single-stepping confusing - both
for you and your debugger.









Re: [sqlite] Final Year Project/Dissertation help required!!!!

2005-12-12 Thread Robert L Cochran

m christensen wrote:


But, I'd presume the intent here is 'Experience' a software 
development process.


Design and build in a vacuum and see what the users think after it's 
done, as suggested above, is an all too common and WRONG

approach IMHO.
I don't think you are INTENDING to 'ask us to do your homework' but I 
don't think you have yet done the work you need to
do before asking opinions. Final project or real-world-work the issues 
are the same.


Mr. Newby you appear to have failed to do basic research into your 
market or users needs.

First assess the need for your project.
It would appear you are under the assumption there are no GUI tools 
for sqlite.

A Google search like "sqlite GUI" shows otherwise.

I DO think your general approach of asking people what they need or 
want is a good one and could be
quite enlightening although probably not entirely along the lines you 
probably first expected.


Do your research, figure out what YOU think the requirements and 
options are.


Ask some direct and possibly leading questions but be open to answers 
that may not be what you expect.


General open-ended questions may very well not spur any real discussion.
They often indicate you have not done your homework so-to-speak.
This applies even more in the 'Real World'.
I also see such questions in the real world as in indication of a  
lack of  commitment to the proposed project.
In short if YOU don't have the commitment to do your part FIRST why 
should I spend a lot of time and effort on a response

you may or may not even look at before you flitter off to something else.

Just like in the real world some people may support your pet project, 
some may be hostile, some couldn't care less and some
people think you 'shouldn't bother them with the details or 
questions'. You will need to learn to deal with this too, it's part of 
the job.


Let's say you take this advice and look at "SQLite Analyzer"

You then come back to this group with an intelligent question such as...

"I noticed SQLite Analyzer has a drag-and-drop qry builder. Is this a 
Feature anybody here would actually use?"


Due to the fact most people here are developers I'd ASSume the answer 
would be a resounding
"NO. If you can't write a SQL Qry, you'd probably be better off using 
Access or something..."


Then someone may chip in "You know I have no need, but the end users 
for my app sure COULD use a nice

PDF-Generating  GUI Report Builder with a drag-and-drop Qry Builder..."

I'd sure Hope the intent of your project is NOT 'Write a PROGRAM to do 
X' but to truly 'Learn how to develop an application
from inception thru needs analysis to development, debugging, and 
final release and to provide a usable tool.'


This may not be an answer to the questions you thought you asked, but 
IMHO it does provide

"other information 'I' feel would help YOU on YOUR journey"

Marc


This is a nice response to the issue. I still remember my own student 
days when I'd put much effort into my papers. There was no internet back 
then. To do my research, I hoofed it from library to library, lab to 
lab, office to office. I'm a lot older now, and have the incredible 
power of the internet to help me. I still am a student and still try to 
learn new things. It's not easy, and won't always offer instant 
gratification. But in the long run it counts for something. It's better 
to learn something new than to sit in a lawn chair swatting flies!


Bob Cochran
Greenbelt, Maryland, USA


Re: [sqlite] Can't commit transaction - SQL statements in progress

2005-12-12 Thread Robert L Cochran
Show your prepared statements and the code you are using to execute 
them. There is always a simple cause to seemingly complex problems.


Bob

Eric Scouten wrote:

If it were easy to boil down to a simple code snippet, I would have 
happily done so. :-) Unfortunately, the error is probably caused 
somewhere inside a relatively complex home-grown wrapper for SQLite 
and is not easily distilled into something I can share here.


The question really boils down to "can SQLite offer enough information 
to help me diagnose the problem it's telling me I have?"


Or to put it another way, this is essentially a memory leak problem. 
SQLite obviously knows that I've lost track of one or more prepared 
statements that haven't run to completion, it isn't telling me *what* 
statements those are. I'm wondering if there is any way of getting 
that information. Armed with that knowledge, I can probably fix my 
code fairly quickly.


At this point, I don't have any reason to suspect that SQLite itself 
is failing.


-Eric


Robert L Cochran wrote:

You really need to post specific code snippets, you can't expect a 
definitive solution including the complete diagnosis and corrected 
code from an 11-word problem statement and then a 2-line guess as to 
the cause. Please show your code. Others on this forum will help you. 
(I lack the expertise.)


Bob Cochran
Greenbelt, Maryland, USA


Eric Scouten wrote:

I'm getting this error periodically when attempting to commit a 
transaction.


What I believe is happening is that my database abstraction layer 
has lost track of one or more compiled statements that it created at 
some earlier time. Is there any way to find out *what* transactions 
are still operating at the time this error is issued?


That would help my debugging efforts greatly.

-Eric










Re: [sqlite] Can't commit transaction - SQL statements in progress

2005-12-12 Thread Robert L Cochran
You really need to post specific code snippets, you can't expect a 
definitive solution including the complete diagnosis and corrected code 
from an 11-word problem statement and then a 2-line guess as to the 
cause. Please show your code. Others on this forum will help you. (I 
lack the expertise.)


Bob Cochran
Greenbelt, Maryland, USA


Eric Scouten wrote:

I'm getting this error periodically when attempting to commit a 
transaction.


What I believe is happening is that my database abstraction layer has 
lost track of one or more compiled statements that it created at some 
earlier time. Is there any way to find out *what* transactions are 
still operating at the time this error is issued?


That would help my debugging efforts greatly.

-Eric





Re: [sqlite] how can I import CSV file into SQLite quickly

2005-12-06 Thread Robert L Cochran

I create an SQL file that has contents like this:

[EMAIL PROTECTED] elections]$ cat insert_precinct.sql
BEGIN TRANSACTION;
INSERT INTO "precinct" VALUES(1, 'Community Center 15 Crescent Road', 3, 
'Greenbelt', 'Maryland', 0);
INSERT INTO "precinct" VALUES(2, 'Police Station 550 Crescent Road', 6, 
'Greenbelt', 'Maryland', 0);
INSERT INTO "precinct" VALUES(3, 'Springhill Lake Recreation Center 6111 
Cherrywood Lane', 8, 'Greenbelt', 'Maryland', 0);

COMMIT;

Then I fire up sqlite3 on the command line, and issue

.read insert_precinct.sql

I realize this will probably make you unhappy because it means editing 
your CSV file so that each line is transformed into an sql statement. 
This can be done most easily with sed (if you are a Linux or Unix 
person), but you need to know sed commands and you need to be willing to 
patiently experiment until the sed script applies exactly the right edits. 


Bob Cochran


ronggui wong wrote:


I have a very large CSV file with 1 rows and 100 columns.and the
file looks like the following:
"a","b","c","d",
"1","2","1","3" ,
"3","2","2","1",
..

If I use .import,It seems I have to set the variable names manually .
Is there any way to import the whole data file into SQLite quickly?
Thank you!

ronggui


 





Re: [sqlite] problem with blobs (perl code)

2005-12-01 Thread Robert L Cochran
A very interesting discussion thread! Thanks to everyone who posted for 
adding to my knowledge.


Bob Cochran

[EMAIL PROTECTED] wrote:


Matt Sergeant <[EMAIL PROTECTED]> wrote:
 


Perl has no concept of blobs. A scalar variable can be one of:

IV (integer)
UV (unsigned integer)
NV (double)
PV (string)

so a blob is just a string - but perl carries a length around with it 
so you can have binary data in there.


   



SQLite does has a separate BLOB type.  But for TEXT types, SQLite 
still works like Perl and carries around a length so that the string

can have embedded '\000' characters.  I just added a test to the
test suite to verify that this works.

Suppose you do this:

  sqlite3_bind_text(pVm, 1, "abc\000xyz\000pq", 10, SQLITE_STATIC);

If this is part of an INSERT, say, then you will insert a 10-character
string that happens to contain a couple of extra \000 characters.
The statement:

  SELECT length(x) FROM table;

will return 3 because the length() function is counting UTF-8 characters,
not bytes, and it will stop at the first '\000'.  But if you say this:

  SELECT length(cast(x AS blob)) FROM table;

you will get 10, because length() returns the number of bytes in a blob.

Similarly, if you say:

  SELECT quote(x) FROM table;

you will get 'abc' as a reply.  But if you say:

  SELECT quote(cast(x AS blob)) FROM table;

then you will get X'6162630078797A007071' as the result.  So you see,
all 10 bytes of the original string are still there.

So as far as I can tell, both SQLite and Perl are doing exactly what
they ought to be.

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



 





[sqlite] SQL For Producing Subtotaled Rows

2005-11-14 Thread Robert L Cochran
I have a simple table containing 3 columns: a political candidate code, 
a precinct code, and the number of votes that candidate recieved for 
that precinct. Here is a sample:


sqlite> select rc_cd, rp_cd, votes from results order by rc_cd asc, 
rp_cd asc;

ivy000|1|266
ivy000|2|252
ivy000|3|30
ivy000|4|219
ivy000|5|38
put000|1|494
put000|2|472
put000|3|39
put000|4|385
put000|5|88

When a candidate code changes, I want to insert a subtotal of the 
candidate's total votes across all precincts in the result set:


...
ivy000|5|38
<--- subtotal for 'ivy000' goes here in the results stream
put000|1|494
...
put000|5|88
<--- subtotal for 'put000' goes here in the results stream

How can I do this in SQLite? It doesn't look to me like the group by 
functionality exists yet for it, but then again my SQL crafting skills 
need a lot of polishing and I could be wrong.


Thanks

Bob Cochran



[sqlite] Group By Rollup and Build Date

2005-11-14 Thread Robert L Cochran

I tried using the 'group by rollup' clause like so:

[EMAIL PROTECTED] elections]$ sqlite3 elections.db
SQLite version 3.2.7
Enter ".help" for instructions
sqlite> select rc_cd, rp_cd, votes from results where rc_cd in 
('ivy000', 'put000') group by rollup (rc_cd) order by rc_cd, rp_cd;

SQL error: no such function: rollup
sqlite>

Are there any plans to support this in the future? I realize that 
whether or not there are, it doesn't excuse me for using erroneous or 
bad SQL.


Secondly, as you can see above I use the SQLite command line a fair bit. 
I'd like to see the build date show up on the command line when I start 
it. For example

SQLite version 3.2.7 built on 2005-11-02 02:00:35
...

Thanks

Bob Cochran
Greenbelt, Maryland, USA





Re: [sqlite] Request for comment: Proposed SQLite API changes

2005-11-03 Thread Robert L Cochran
API changes for SQLite are fine with me as long as the PHP folks keep up 
with SQLite in terms of implementing SQLite hooks.


I'm not real experienced with SQLite, but I'm starting to learn a lot. I 
use it with PHP 5.1 and PDOs. I find myself compiling the latest SQLite 
CVS and the latest snapshot of PHP 5.1 about once a week. Can't live 
without 'em.


Bob Cochran
Greenbelt, Maryland, USA

[EMAIL PROTECTED] wrote:


As currently implemented, when an error occurs during
sqlite3_step(), the function returns SQLITE_ERROR.  Then
you have to call either sqlite3_reset() or sqlite3_finalize()
to find the actual error code.  Suppose this where to
change in version 3.3.0 so that the actual error code
was returned by sqlite3_step().  That would mean that
moving from version 3.2.7 to 3.3.0 might involve some
minor code changes. The API would not be 100% backwards
compatible.  But the API would be cleaner.  


What does the community think about such a change?

Another proposal:  Suppose that when creating an
sqlite3_stmt using sqlite3_prepare, the original SQL
text was stored in the sqlite3_stmt.  Then when a
schema change occurred, the statement was automatically
recompiled and rebound.  There would no more SQLITE_SCHEMA
errors.  But sqlite3_stmts would use a little more
memory.  And sqlite3_step might take a little longer
to initialize sometimes if it found it needed to rerun
the parser.  


What about this change?  Is it a worth-while tradeoff?

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



 





Re: [sqlite] Newbie Question

2005-10-15 Thread Robert L Cochran

John,

The configure script is looking for the location of a file named 
tclConfig.sh. On Fedora Core 4, that file is provided when you install 
the tcl-devel package.


Here is the ../configure incantation (taken from ../configure --help):

--with-tcl=DIR  directory containing tcl configuration 
(tclConfig.sh)


alternatively, you could compile with this:

--disable-tcl

You may want to recompile with the --disable-tcl option.

If you decide to install the tcl-devel package, you can also recompile 
SQLite and point it at the directory that has tclConfig.sh.


Bob

JohnD wrote:


Bob,

I was able to compile on Linux after removing tclsqlite.c from the 
build.  It appears as though that was causing my errors.  Once I 
removed that, by changing


HAVE_TCL = 1
to
HAVE_TCL =

It compiled without errors.  I found this in another thread which 
indicated, to me at least, that it  wouldn't be needed unless I wanted 
to use the TCL shell, which I don't.


Thanks,
John

Robert L Cochran wrote:

Post the error messages and someone will help you. I'll also check 
for messages after work tonight. There are others on this forum who 
are far more knowledgable than I.










Re: [sqlite] Newbie Question

2005-10-14 Thread Robert L Cochran
Post the error messages and someone will help you. I'll also check for 
messages after work tonight. There are others on this forum who are far 
more knowledgable than I.



Bob

JohnD wrote:


Bob,

Thanks for the information.  Are the required dependencies for Sqlite 
listed anywhere?  I'm unable to compile on Linux and it appears as 
though I'm missing a dependency or two.  Any idea where I can check 
those?


Thanks,
John

Robert L Cochran wrote:

I think sqlite3.h is generated for you automatically as part of the 
build process from source code and it will be later installed for you 
in the include directory. You must actually compile sqlite from the 
source code.


For Linux, why not just download sqlite-3.2.7.tar.gz (the linux 
source code), untar it, and build from that?


wget http://www.sqlite.org/sqlite-3.2.7.tar.gz
tar -xvzf sqlite-3.2.7.tar.gz
cd sqlite-3.2.7
mkdir bld
cd !$
../configure --enable-utf8 --includedir=/usr/include
[fix any errors...you might need to install the readline development 
package, etc...if you get an error, fix it, then rerun ./configure...]

make
[fix any errors if make doesn't finish successfully. Warnings about 
signedness differences under gcc4 are okay.]

su
make install
exit
su -
ldconfig
exit

At this point you should be ready to build your own C/C++ programs 
that include sqlite3. You'll see the sqlite files in 
/usr/local/include if you compiled with the default installation path 
options.


Bob Cochran
Greenbelt, Maryland, USA


JohnD wrote:


Hello,

I'm new to Sqlite and am trying to create a simple C/C++ program.  
I've downloaded both the binary and the CVS source but can't seem to 
locate the sqlite3.h header file.


Is there any document that details what I need to do in order to set 
up an environment to be able to write and compile my own C/C++ 
programs on either Windows or Linux?










Re: [sqlite] Newbie Question

2005-10-13 Thread Robert L Cochran
Compiling the CVS checkout is really the same -- just cd into the 
'sqlite' directory and follow the instructions below from the 'mkdir' 
onwards.


Bob


Robert L Cochran wrote:

I think sqlite3.h is generated for you automatically as part of the 
build process from source code and it will be later installed for you 
in the include directory. You must actually compile sqlite from the 
source code.


For Linux, why not just download sqlite-3.2.7.tar.gz (the linux source 
code), untar it, and build from that?


wget http://www.sqlite.org/sqlite-3.2.7.tar.gz
tar -xvzf sqlite-3.2.7.tar.gz
cd sqlite-3.2.7
mkdir bld
cd !$
../configure --enable-utf8 --includedir=/usr/include
[fix any errors...you might need to install the readline development 
package, etc...if you get an error, fix it, then rerun ./configure...]

make
[fix any errors if make doesn't finish successfully. Warnings about 
signedness differences under gcc4 are okay.]

su
make install
exit
su -
ldconfig
exit

At this point you should be ready to build your own C/C++ programs 
that include sqlite3. You'll see the sqlite files in 
/usr/local/include if you compiled with the default installation path 
options.


Bob Cochran
Greenbelt, Maryland, USA


JohnD wrote:


Hello,

I'm new to Sqlite and am trying to create a simple C/C++ program.  
I've downloaded both the binary and the CVS source but can't seem to 
locate the sqlite3.h header file.


Is there any document that details what I need to do in order to set 
up an environment to be able to write and compile my own C/C++ 
programs on either Windows or Linux?


Thanks,
John











Re: [sqlite] Left Outer Joins

2005-10-07 Thread Robert L Cochran

Jay Sprenkle wrote:


You might also consider NOT saving the image data in the database.
I've always found it better to save a path or URL in the database and store
the image in the file system. (Unless you're searching for things
in the image data itself and not just searching for an image using other
fields as keys)

 

Thanks Jay. I think I found another solution that works -- see my post 
in reply to Peter. As to not saving the image data in the database, that 
is what we are doing on the production server. The images are in the web 
server's document root. This exercise is for my benefit, to play with 
multimedia databases and learn PHP and web application building. It is 
tough work for me, but I'm learning and I know I have a long way to go.


Bob



Re: [sqlite] Left Outer Joins

2005-10-07 Thread Robert L Cochran
Thanks very much for your help, Peter. Here is a variation that seems to 
be working for me:


select sa.lg_abbr, sa.dbsource, sa.signid, sa.recid, sa.majorlvl, 
sa.lvl6, j.imgfn from sampsign as sa left outer join sgnphoto as j on 
sa.recid = j.recid where sa.dbsource = 'Smith' and sa.majorlvl = 
'photograph';


Notice that I added j.imgfn to the join. As I think you are trying to 
tell me below, every record from the left table which does not match on 
the right table is going to have NULL returned in the column that is 
j.imgfn. All I need to do is test for IS NULL in that column of the 
result set, and I have what I want! The rows that did not match.


So, being new to working with left joins, I didn't think to test for IS 
NULL in the appropriate column to detect a non-matching record. I have 
the correction working now, and I can go on to the next step in the 
processing.


By the way, SQLite 3.2.7 does not support RIGHT or FULL joins.

Bob



Peter Wullinger wrote:


In epistula a Robert L Cochran, die horaque Thu, Oct 06, 2005 at 10:56:03PM 
-0400:
 


Hi --

I'm inexperienced with joining tables and need help.

I'm using SQLite v3.2.7 and the tables discussed below are part of an 
SQLite database.


There are 2 tables: A contains some text columns and an integer primary 
key. B contains an integer primary key and a LONGBLOB column to hold 
image data like jpegs. The primary key in B should match one and only 
one primary key in A. At this point, table B has 2 rows and needs to be 
updated with several hundred more.
I want to craft an SQL query that will return every row in A having a 
primary key that does not match the keys in the rows in B. Then display 
these rows on a web page form. I eventually tried doing a left outer 
join of A and B:
   



Does

SELECT sa.dbsource, sa.signid, sa.recid, sa.majorlvl, sa.lvl6
FROM sampsign AS sa
LEFT OUTER JOIN sgnphoto AS j
ON sa.recid = j.recid
WHERE
sa.recid IS NULL
AND sa.dbsource = 'Smith'
AND sa.majorlvl = 'photograph'

do, what you want?

For explanation: 


Outer joins return the same data set as inner joins
with the following rows added:
- For left outer joins: Every row from the left table that
 did not match any row in the right table. Since there is
 no matchin data row in the left table, these fields
 are set to NULL.
- Same goes for right outer joins but with tables roles
 reversed.
- full outer joins return the combination of both left and
 right outer joins.

So, if you want all the data in your right table that did not match
anything on your left table, just check, if the corresponding key
column (use those, since primary keys cannot be null) is null.

Cheers,
Peter

PS.: "= NULL" does not work "IS NULL" does work. And don't
laugh, last time I've seen this error was in code from an
 experienced database programmer ... ;-).

 





Re: [sqlite] Please Need Advice on 64 Bits Platform

2005-10-07 Thread Robert L Cochran
I have an AMD 64 machine myself. Do I need to pass any special to 
compile in 64 bit mode?


Bob

[EMAIL PROTECTED] wrote:


Hamid Benhocine <[EMAIL PROTECTED]> wrote:
 

I want just to know if the Engine is 64 
bits ready 
   



SQLite is designed to work on 64-bit machines.  There
have been a few alignment problems in the past but those
have all been worked out now, I believe.  I do not have
a 64-bit machine to test on, but reports from users are
that SQLite works when compiled in 64-bit mode.
--
D. Richard Hipp <[EMAIL PROTECTED]>



 





Re: [sqlite] wondering about sqlite and webhosts

2005-10-06 Thread Robert L Cochran
I have no experience with webhosts in this context, but I'm currently 
using beta snapshots of PHP 5.1, SQLite 3.2.7, and Apache server, and it 
is working great for me. I'm using the PHP Data Objects (PDO) 
functionality that comes with PHP 5.1, it has hooks for SQLite. So what 
is happening here is that I'm learning SQL itself, querying tables, 
using new PHP extensions, building a web application, and learning a lot 
from it all.


SQLite is not secure, but you can contact Dr. Hipp to discuss solutions 
to this that you can license.


One thing I'm noticing is that my table inserts on SQLite are very fast. 
I'm not sure if this is partly because of new PHP optimizations, the 
fact that I statically built PHP instead of using shared extensions, 
SQLite's optimizations or all these things. But things work fast.


I won't call myself an experienced database programmer just right now, 
but I'm getting there. And SQLite is giving me a great education.


Bob Cochran


Jim McNamara wrote:


hi-

when thinking about software to use on my next website
i came up with sqlite,
http://www.freeguppy.org/articles.php?lng=en=55044
,
php5, abyss webserver, and phpedit.

i dont see many webhosts that advertise sqlite
availability.  are webhosts excluding support for
sqlite for any reason
i.e. is it a security concern?
it is suppose to be an internal extension.  i am not
sure what that means yet.

do webhosts think it is easy to offer sqlite support?
is it less of an administrative headache for them to
offer it.  i know there is less administration for a
user.

i hope this information can help me when i approach a
webhost when i am out shopping.

thanks for any tips.
jim





__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



 





[sqlite] Left Outer Joins

2005-10-06 Thread Robert L Cochran

Hi --

I'm inexperienced with joining tables and need help.

I'm using SQLite v3.2.7 and the tables discussed below are part of an 
SQLite database.


There are 2 tables: A contains some text columns and an integer primary 
key. B contains an integer primary key and a LONGBLOB column to hold 
image data like jpegs. The primary key in B should match one and only 
one primary key in A. At this point, table B has 2 rows and needs to be 
updated with several hundred more.


I want to craft an SQL query that will return every row in A having a 
primary key that does not match the keys in the rows in B. Then display 
these rows on a web page form. I eventually tried doing a left outer 
join of A and B:


select sa.dbsource, sa.signid, sa.recid, sa.majorlvl, sa.lvl6 from 
sampsign as sa left outer join sgnphoto as j on sa.recid = j.recid where 
sa.dbsource = 'Smith' and sa.majorlvl = 'photograph';


The result set comes extremely close to what I want. The trouble is, it 
includes the 2 rows from A which match the rows in B. I'd like to get 
rid of them and see only the non-matching rows.


Thanks a lot for your help!

Bob Cochran
Greenbelt, Maryland, USA



Re: [sqlite] Speed Test Done !

2005-10-06 Thread Robert L Cochran
Can you post a link to the source of the text data. That is, a link to 
the web site where you got the data from.


Bob Cochran


Richard wrote:


Hey,

I be more than happy to uploaded to anyone web site, for all to download.
its just a test database based on the National Geological Study, its 
there  data,

however its huge. 175 MB text file.

Richard



On Thu, 06 Oct 2005 14:06:47 -0400, Robert L Cochran  
<[EMAIL PROTECTED]> wrote:



select * from T where A = '32.0833';

(quote the 32.0833...'32.0833')

If you happen to have the sqtest4.txt file available for downloading  
(via wget or http), I might try doing this myself.


Bob Cochran

Richard wrote:


Well, Did the correction,
and still the results text was nothing (zero)
there should be over 2000 hits...

cron import time: 3 min 20 second
and index time: 16 min 6 second.

Again, correct the last part:
 select * from T where A >= 32.0833 and A < 32.0834;
no results show in file.

Richard


On Thu, 06 Oct 2005 12:25:53 -0400, Dennis Cote  
<[EMAIL PROTECTED]>  wrote:



Richard wrote:


Well, There must be something wrong with the test,
you wanted me to run:

Welcome to Darwin!
G4:~ rn$ sqlite3
SQLite version 3.2.5
Enter ".help" for instructions
sqlite> create table T (A, B, C );
sqlite> .separator ,
sqlite> .import 'sqtest4.txt' T
sqlite> create index I on T (A) ;
sqlite> .output results.txt
sqlite> select * from T where A=32.0833;
sqlite> .output stdout
sqlite>


As you can see its the exact code, you wanted me to test.
however, the results.txt was empty.

But do have import time: 3 min 14 second
and Over 12 Mins to index field A


Richard,

I suspect that the problem is due to the use of equality tests 
and   floating point values (a common problem). Repeat the test 
with the   following select statement instead;


select * from T where A >= 32.0833 and A < 32.0834;

I'm noticed that your import time is 194 seconds (3 min 14 sec)  
versus  the value of 148 seconds you reported earlier, that's 31%  
slower. Did  something else change on your machine? It might just 
be  due to swapping,  since I these 10M records will require quite 
a large  amount of ram.  Creating the index will require even more 
ram. Can you  check the memory  usage for sqlite3 after you have 
imported the data  and again after you  create the index?


Dennis Cote


















Re: [sqlite] Speed Test Done !

2005-10-06 Thread Robert L Cochran

select * from T where A = '32.0833';

(quote the 32.0833...'32.0833')

If you happen to have the sqtest4.txt file available for downloading 
(via wget or http), I might try doing this myself.


Bob Cochran

Richard wrote:


Well, Did the correction,
and still the results text was nothing (zero)
there should be over 2000 hits...

cron import time: 3 min 20 second
and index time: 16 min 6 second.

Again, correct the last part:
 select * from T where A >= 32.0833 and A < 32.0834;
no results show in file.

Richard


On Thu, 06 Oct 2005 12:25:53 -0400, Dennis Cote 
<[EMAIL PROTECTED]>  wrote:



Richard wrote:


Well, There must be something wrong with the test,
you wanted me to run:

Welcome to Darwin!
G4:~ rn$ sqlite3
SQLite version 3.2.5
Enter ".help" for instructions
sqlite> create table T (A, B, C );
sqlite> .separator ,
sqlite> .import 'sqtest4.txt' T
sqlite> create index I on T (A) ;
sqlite> .output results.txt
sqlite> select * from T where A=32.0833;
sqlite> .output stdout
sqlite>


As you can see its the exact code, you wanted me to test.
however, the results.txt was empty.

But do have import time: 3 min 14 second
and Over 12 Mins to index field A


Richard,

I suspect that the problem is due to the use of equality tests and  
floating point values (a common problem). Repeat the test with the  
following select statement instead;


select * from T where A >= 32.0833 and A < 32.0834;

I'm noticed that your import time is 194 seconds (3 min 14 sec) 
versus  the value of 148 seconds you reported earlier, that's 31% 
slower. Did  something else change on your machine? It might just be 
due to swapping,  since I these 10M records will require quite a 
large amount of ram.  Creating the index will require even more ram. 
Can you check the memory  usage for sqlite3 after you have imported 
the data and again after you  create the index?


Dennis Cote











[sqlite] Recognizing v3.2.6 In PHP Snapshots

2005-09-18 Thread Robert L Cochran
I'm playing with snapshots of PHP 5.1 from http://snaps.php.net. I have 
a build from 20050916 that doesn't recognize Sqlite 3.2.6 in phpinfo(). 
Does anyone know how I can get the snapshot to "see" the new Sqlite 
version?


Thanks

Bob Cochran



[sqlite] PHP 5.1 PDO Objects

2005-09-05 Thread Robert L Cochran
I compiled one of the snapshots of PHP 5.1 available at 
http://snaps.php.net/ and I notice that phpinfo() recognizes that I have 
Sqlite 3.2.5 installed for PHP Data Objects (PDO) purposes. I have not 
experimented to see whether it actually works for Sqlite databases. Is 
anyone using PDOs with 3.2.5?


Thanks

Bob Cochran





Re: [sqlite] Training opportunity: The Inner Workings Of SQLite

2005-06-19 Thread Robert L Cochran
I'd like to ask about this too. I'd be very happy to pay for DVDs. I'd 
like to go to OSCON but the costs involved make it tough for me, 
especially with 2 kids in university.


Bob Cochran


Klint Gore wrote:


On Sun, 19 Jun 2005 15:04:19 -0400, "D. Richard Hipp" <[EMAIL PROTECTED]> wrote:
 


I will be giving a 3-hour lecture on how SQLite works at
the O'Reilly Open Source Conference in Portland, OR on
2005-Aug-01.  
   



Is there any chance that this will be webcast or recorded
(slides/audio/video)?  I found presentation notes on O'Reilly's website

from previous events but can't see any from tutorials (and no audio yet).


klint.

+---+-+
: Klint Gore: "Non rhyming:
: EMail   : [EMAIL PROTECTED]   :  slang - the:
: Snail   : A.B.R.I.:  possibilities  :
: Mail  University of New England   :  are useless"   :
:   Armidale NSW 2351 Australia : L.J.J.  :
: Fax : +61 2 6772 5376 : :
+---+-+


 





[sqlite] Database File Structure

2005-02-27 Thread Robert L Cochran
I've been fooling with 3.1.3 tonight and hex dumped one of my database 
files:

[EMAIL PROTECTED] itemlist]$ hexdump -C -n 16 wishlist
  53 51 4c 69 74 65 20 66  6f 72 6d 61 74 20 33 00  |SQLite 
format 3.|
0010

Only the first 16 bytes are shown here. Is there a published file 
structure for the database?

Bob Cochran
Greenbelt, Maryland, USA


Re: [sqlite] SQLite Tutorial: Request For Comments

2005-02-21 Thread Robert L Cochran
[EMAIL PROTECTED] wrote:
The html has been cleaned up on the tutorial:
http://prdownloads.sourceforge.net/souptonuts/README_sqlite_tutorial.html?download
 

Has this been updated recently for the 3.1.x series?
Thanks
Bob Cochran



Re: [sqlite] Version 3.1.0

2005-01-22 Thread Robert L Cochran
Yes -- this is what I'm talking about.
Bob
Roger Binns wrote:
I think all this discussion has missed the original question.
Quite simply, is there any way in which the SQLite *source code* could 
be changed in order to get better performance on 64 bit machines. If 
there is then following questions should be answered:

- Has it already been done (or should it be done)
- Can the changes also be used on a 32 bit machine, or is the codebase 
forked

One thing you can do on 64 bit machines is memory map entire files, so 
there is no explicit need for page caches and things like that. This 
is possible due to the larger address space available which would need 
to be larger than the file size. (On 32 bit machines programs 
typically can only memory map files under 2GB in size).

Roger




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [sqlite] Version 3.1.0

2005-01-21 Thread Robert L Cochran
I should have indicated in my earlier post that magazines which do 
side-by-side hardware testing are saying that the AMD Athlon 64 is 
indeed faster than the Pentium 4; for example look in the January issue 
of Maximum PC magazine. they have a followup test supplementing an 
earlier review of Athlon vs. Pentium systems. Their testing results 
speak better than my faltering around with words. Tom's Hardware Guide 
has also compared Socket 939 Athlon systems to the latest that Intel 
has; I can't remember THG's exact judgement but it was overall more 
favorable to the Athlon systems.

Bob
Cory Nelson wrote:
You should see an increase automatically due to more registers being
available (assuming the compiler makes good use of them).  Other than
that, I suspect the only increase you will see is in parts that use
"long long" or __int64.
Also keep in mind, compilers are very new to 64bit compiling - it will
take a while for them to optimize to the full potential.
On Fri, 21 Jan 2005 20:23:44 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
 

As for SQLite, it is unlikely that you will see any performance
difference between a 32 bit or 64 bit compile of SQLite unless you are
specifically working with working sets that are larger than 4GB -- that
is, working sets that would not fit in a 32 bit process.
When compiled to run as a 64 bit process, any program will use more
memory simply because data alignments are typically on a wider boundary
and pointer sizes are that much larger.
"64 bit computing" is one of the great myths of marketing foisted upon
the computing industry.  Now that "ghz ghz ghz" seems to be largely
dead as a marketing myth, it would seem that "64 bits or die" is the
next great frontier.
There are real advantages to 64 bit, but "everything is just faster
with a recompile" is definitely not one of them.
b.bum
   


 




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [sqlite] Version 3.1.0

2005-01-21 Thread Robert L Cochran
D. Richard Hipp wrote:
On Fri, 2005-01-21 at 20:56 -0500, Robert L Cochran wrote:
 

Does this version take advantage of 64-bit cpu's like the AMD Athlon 64? 
   

I don't know.  What do you mean by "take advantage of"?
What does a 64-bit CPU do that you can't do with a 32-bit CPU?
There are a few limits in SQLite that are based on the number of
bits in an integer.  For example, you can't have more than 32
tables in a join.  Except on a 64-bit machine where you can have
64 tables in a join.  Is that what you mean by taking advantage
of a 64-bit CPU?  But note that we could get 32-bit CPUs to 
provide 64 tables in a join just by changing a single line of
code, namely changing

   typedef unsigned int Bitmask;
into
   typedef unsigned long long int Bitmask;
So how does that really "take advantage of" the 64-bitness of
some CPUs?
I hear a lot of excitement about 64-bit CPUs which I really
do not understand.  Please explain this to me.
 

I don't know how to explain this "excitement" myself, except through 
examples that might bore you because I don't know the details of how to 
write a program that takes advantage of a 64 bit cpu. The excitement is 
mainly about speed, I would say. To make compiled software harness that 
speed, it may be that only a compiler flag has to be turned on; I'm not 
real sure and should research it. But here are some examples:

1. My wife, on her 32 bit Intel laptop, running Microsoft Access, finds 
her system slowed down to a crawl whenever she works with one table that 
has 109,000 rows. This is just the beginning of the huge tables she 
creates. She has a bunch of others.

I moved this table to my Athlon 64 machine and converted it to the Linux 
x86_64 version of MySQL version 4.1.7.  Then I queried the database 
using a PHP script to "select distinct" from 3 different columns and 
stuff the result sets into HTML select tags so that the client can pick 
valid column values for those columns. 3 queries, 109,000 rows...and 
they executed so fast the web page seems to come up instantly.

I plan to try this same query with SQLite as soon as I have time.
2. I can install Fedora Core x86_64 in about 25 minutes on my Athlon 
machine. On a 32 bit Intel machine, I can take a lunch hour break and 
the install still might not be finished, depending on the machine's 
resources. And these are all NFS image installs. I don't do them from CD 
or DVD any longer. Using the network is faster.

3. I generally enjoy blindingly fast compile times when I have to do 
compiles of large codebases such as PHP from source. I haven't yet tried 
compiling Mozilla on this machine, but I'll get there -- I've done it on 
my Pentium machines and it takes a minimum of 45 minutes to complete.

The sum total is that speaking for myself, I won't go back to an Intel 
32 bit system if I can help it. 64 bit systems are fast! They save a lot 
of time.

Perhaps I'm making a stupid point, but perhaps there is a compiler 
switch you can turn on somewhere (or maybe the configure script in the 
*tar.gz source code already does it) that optimizes for a 64 bit system. 
Hmmm, perhaps I can rerun autoconf and libtool and get this magic to happen.

Bob Cochran
Greenbelt, Maryland




smime.p7s
Description: S/MIME Cryptographic Signature


Re: [sqlite] Version 3.1.0

2005-01-21 Thread Robert L Cochran
D. Richard Hipp wrote:
Version 3.1.0 (alpha) of SQLite is now available on the website.
Release notes are available from a link on the homepage.
This released is labeled "alpha" but it is still very well
tested.  By being "alpha" it means that there is still a
small window of opportunity during when users can suggest
API changes.  Once we go to beta (in about a week) no more
changes will be accepted.  So if you want to suggest changes,
please do so quickly.
 

Does this version take advantage of 64-bit cpu's like the AMD Athlon 64? 
I just compiled it successfully on Fedora Core 3 x86_64, which is 
running on an Athlon 64 3500+, but I'm puzzled as to whether I'm 
generating a 64-bit aware version or not.

Bob Cochran
Greenbelt, Maryland, USA


[sqlite] Compiling 3.0.8 On AMD 64 Platform

2004-10-17 Thread Robert L Cochran
I have the source code for sqlite-3.0.8 and just compiled it on my AMD 
64 3500+ machine. Are there any special configure options I can use to 
take advantage of the 64 bit addressing capabilities -- or will the 
configure script set all the needed options for me?

I'm using a 90 nanometer 'Winchester' core AMD processor. This thing is 
mighty fast -- but I'm sure I'm helped by having 2 Gb of memory too.

Thanks
Bob Cochran
Greenbelt, Matryland, USA