Re: [sqlite] Upcoming Conferences

2005-10-11 Thread Jolan Luff
On Wed, Oct 12, 2005 at 01:19:24PM +1000, Klint Gore wrote:
> > How about "Sidney" then? We're offended too! :)
> 
> It can't be any worse than what's his name anouncing the sydney
> olympics.
> 
> At $600, I don't think I'll be attending the tutorial no matter how
> Sydney is spelt.
> http://www.auug.org.au/events/2005/auug2005/AUUG-2005-Conf-Brochure.pdf
> 
> +---+-+
> : Klint Gore: "Non rhyming:
> : EMail   : [EMAIL PROTECTED]   :  slang - the:
> : Snail   : A.B.R.I.:  possibilities  :
> : Mail  University of New England   :  are useless"   :

Not that I really see how conferencing pricing is relevant on this list
but there is special pricing for full-time students/unemployed.


Re: [sqlite] Version 3.2.6

2005-09-17 Thread Jolan Luff
On Sat, Sep 17, 2005 at 03:41:21PM -0400, D. Richard Hipp wrote:
> Version 3.2.6 is now available on the website

3.2.6 does not compile on FreeBSD and OpenBSD because they do not have
fdatasync().  AFAICT, NetBSD's fdatasync implementation does the same
thing as fsync.


Re: [sqlite] Please test prior to version 3.1.5. Was: Delete crashes with Version 3.2.4 in Windows XP

2005-08-25 Thread Jolan Luff
On Wed, Aug 24, 2005 at 10:08:21AM -1000, Glen Nakamura wrote:
> On Wed, Aug 24, 2005 at 02:50:04PM -0500, Jolan Luff wrote:
> > OpenBSD/amd64 with gcc 3.3.5.  I noticed that with 3.2.2 it was possible
> > to run "make test" without having done "make" first and this is no
> > longer the case with CVS HEAD.
> 
> The problem could be the following lines in Makefile.in:
> 
> # In LIBOBJ but not TESTSRC
> COMMONOBJ = $(foreach obj,$(LIBOBJ),\
>   $(if $(findstring $(patsubst %.lo,%.c,$(obj)),$(TESTSRC)),,$(obj)))
> 
> This is the patch which added these lines:
> http://www.sqlite.org/cvstrac/filediff?f=sqlite/Makefile.in=1.130=1.131
> 
> Possible GNU-make-ism.  I don't think BSD make supports functions
> like foreach.  You'll need to build with gmake unless the above lines
> are rewritten to be compatible with BSD make.

Using GNU make instead of BSD make does let things work again.  Usually
BSD make is pretty good about detecting GNU make idioms and erroring out
gracefully but apparently not this time.

Thanks for the hint.


Re: [sqlite] Please test prior to version 3.1.5. Was: Delete crashes with Version 3.2.4 in Windows XP

2005-08-24 Thread Jolan Luff
On Wed, Aug 24, 2005 at 02:23:22PM -0400, D. Richard Hipp wrote:
> On Wed, 2005-08-24 at 13:08 -0500, Jolan Luff wrote:
> > I am trying to test this in my environment but it looks like the
> > build scripts were subtly broken as I can no longer run 'make test':
> > 
> 
> What is your environment?  The build scripts have hardly changed
> since 3.2.2 so it is hard to imagine what might have broken...

OpenBSD/amd64 with gcc 3.3.5.  I noticed that with 3.2.2 it was possible
to run "make test" without having done "make" first and this is no
longer the case with CVS HEAD.  My build logs can be found at the
following locations:

http://protection.cx/~jolan/sqlite_3_2_2.log
http://protection.cx/~jolan/sqlite_cvs.log

Thanks,

- Jolan


Re: [sqlite] Please test prior to version 3.1.5. Was: Delete crashes with Version 3.2.4 in Windows XP

2005-08-24 Thread Jolan Luff
On Wed, Aug 24, 2005 at 12:58:46PM -0400, D. Richard Hipp wrote:
> A bug introduced into the CVS tree on July 8 was causing
> malfunctions and segfaults when you attempt to DELETE or
> UPDATE more than 40960 rows in a single statement.  This
> bug has now been fixed and a test case has been added to
> the regression suite so that it will not go undetected
> again.  Version 3.2.5 will be forthcoming.
> 
> But I'm going to wait a few days for other bugs to emerge
> before I do the next release.  I would very much appreciate
> it if as many people as possible will try out version 3.2.4
> over the next few days and report any problems you run
> across.

I am trying to test this in my environment but it looks like the
build scripts were subtly broken as I can no longer run 'make test':

$ make test
./libtool --mode=link gcc -O0 -ggdb -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src 
-DNDEBUG -I/usr/local/include/tcl8.4 -DSQLITE_OMIT_CURSOR -DTCLSH=1 
-DSQLITE_TEST=1  -DTEMP_STORE=2 -o testfixture  ./src/btree.c  ./src/date.c  
./src/func.c  ./src/os_unix.c  ./src/os_win.c  ./src/pager.c  ./src/pragma.c  
./src/printf.c  ./src/test1.c  ./src/test2.c  ./src/test3.c  ./src/test4.c  
./src/test5.c  ./src/utf.c  ./src/util.c  ./src/vdbe.c  ./src/md5.c  
./src/where.c ./src/tclsqlite.c  -L/usr/local/lib -ltcl84   -lm
gcc -O0 -ggdb -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src -DNDEBUG 
-I/usr/local/include/tcl8.4 -DSQLITE_OMIT_CURSOR -DTCLSH=1 -DSQLITE_TEST=1 
-DTEMP_STORE=2 -o testfixture ./src/btree.c ./src/date.c ./src/func.c 
./src/os_unix.c ./src/os_win.c ./src/pager.c ./src/pragma.c ./src/printf.c 
./src/test1.c ./src/test2.c ./src/test3.c ./src/test4.c ./src/test5.c 
./src/utf.c ./src/util.c ./src/vdbe.c ./src/md5.c ./src/where.c 
./src/tclsqlite.c  -L/usr/local/lib -ltcl84 -lm
... lots of linker errors omitted
/tmp//cch10639.o(.text+0x3fda):src/tclsqlite.c:1836: undefined reference to 
`sqlite3_open'
/tmp//cch10639.o(.text+0x3fe9):src/tclsqlite.c:1837: undefined reference to 
`sqlite3_errcode'
/tmp//cch10639.o(.text+0x3ffc):src/tclsqlite.c:1838: undefined reference to 
`sqlite3_errmsg'
/tmp//cch10639.o(.text+0x401a):src/tclsqlite.c:1839: undefined reference to 
`sqlite3_close'
collect2: ld returned 1 exit status
*** Error code 1

'make test' with 3.2.2 properly links against the sqlite3 library:

./libtool --mode=link cc -O2 -pipe -Wall -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. 
-I./src -DNDEBUG -I/usr/local/include/tcl8.4 -DSQLITE_OMIT_CURSOR -DTCLSH=1 
-DSQLITE_TEST=1 -DTHREADSAFE=0 -DTEMP_STORE=2 -o testfixture ./src/btree.c  
./src/date.c  ./src/func.c  ./src/os_unix.c  ./src/os_win.c  ./src/pager.c  
./src/pragma.c  ./src/printf.c  ./src/test1.c  ./src/test2.c  ./src/test3.c  
./src/test4.c  ./src/test5.c  ./src/utf.c  ./src/util.c  ./src/vdbe.c  
./src/md5.c ./src/tclsqlite.c  libtclsqlite3.la -L/usr/local/lib -ltcl84   -lm
cc -O2 -pipe -Wall -DOS_UNIX=1 -DHAVE_USLEEP=1 -I. -I./src -DNDEBUG 
-I/usr/local/include/tcl8.4 -DSQLITE_OMIT_CURSOR -DTCLSH=1 -DSQLITE_TEST=1 
-DTHREADSAFE=0 -DTEMP_STORE=2 -o .libs/testfixture ./src/btree.c ./src/date.c 
./src/func.c ./src/os_unix.c ./src/os_win.c ./src/pager.c ./src/pragma.c 
./src/printf.c ./src/test1.c ./src/test2.c ./src/test3.c ./src/test4.c 
./src/test5.c ./src/utf.c ./src/util.c ./src/vdbe.c ./src/md5.c 
./src/tclsqlite.c  -L./.libs -ltclsqlite3 -L/usr/local/lib -ltclstub84 -ltcl84 
-lm -Wl,-rpath,/usr/local/lib/sqlite

It'd be a lot easier to test with this fixed.


Re: [sqlite] Did OSCON tutorial get accepted for AUUG in oct?

2005-08-09 Thread Jolan Luff
On Wed, Aug 10, 2005 at 12:35:27PM +1000, Klint Gore wrote:
> Anyone know if the OSCON tutorial was accepted for AUUG2005?

afaik it was but dr. hipp will not be the one giving it.


Re: [sqlite] sqlite server

2005-06-15 Thread Jolan Luff
On Wed, Jun 15, 2005 at 10:47:00AM -0700, [EMAIL PROTECTED] wrote:
> It would be nice to have a little server and client library which provided
> access to sqlite databases.  I wrote one for the purpose of serving
> databases, and left the interface open so it could easily be used for
> serving sqlite databases.
> 
> When the client connects (using telnet or the client library), then
> opens a database, the server does not close the database until a timeout
> occurs.  This allows many clients to use databases concurrently, without
> any opens or closes except the initial open and the close after timeout.
> 
> The server is open-source, and available at:
>   http://voydb.sourceforge.net/
>   http://sourceforge.net/projects/voydb/ has the source available.
> 
> I have a newer version which doesn't use Berkeley, but uses an in-memory
> hash table (which it writes to the disk every once in a while).
> 
> Anyhow, what do you think about the idea?

have a look at http://sqlrelay.sourceforge.net/


[sqlite] Re: sqlite 3.2.1 lock-2.8 test hangs

2005-04-28 Thread Jolan Luff
On Wed, Apr 27, 2005 at 04:55:00PM -0500, Jolan Luff wrote:
> hi,
> 
> when running the sqlite 3.2.1 regression tests, the lock-2.8 test hangs
> indefinitely.  if i disable that test, all others pass.
> 
> is this a bug in the regression test or is this something i should be
> concerned about?
> 
> thanks,
> 
> - jolan

i searched around on this and saw similar (ignored) reports.  there is
definitely a bug:

#0  0x08a1b915 in nanosleep () from /usr/lib/libc.so.35.1
#1  0x08a61727 in usleep () from /usr/lib/libc.so.35.1
#2  0x1c014349 in sqlite3OsSleep (ms=-32) at src/os_unix.c:1242
#3  0x0aa971c8 in sqliteDefaultBusyCallback (Timeout=0x190, count=0)
at src/main.c:640

-32, ouch.

the code in question is:

  static const char delays[] =
 { 1, 2, 5, 10, 15, 20, 25, 25,  25,  50,  50,  50, 100};
  static const short int totals[] =
 { 0, 1, 3,  8, 18, 33, 53, 78, 103, 128, 178, 228, 287};
# define NDELAY (sizeof(delays)/sizeof(delays[0]))
  ptr timeout = (ptr)Timeout;
  ptr delay, prior;

  if( count <= NDELAY ){
delay = delays[count-1];
prior = totals[count-1];
  }else{
delay = delays[NDELAY-1];
prior = totals[NDELAY-1] + delay*(count-NDELAY-1);
  }
  if( prior + delay > timeout ){
delay = timeout - prior;
if( delay<=0 ) return 0;
  }
  sqlite3OsSleep(delay);

if count is 0:

delay = delays[0-1];

this is obviously an invalid array access which is causing the -32.

patch follows.

- jolan


Index: src/main.c
===
RCS file: /sqlite/sqlite/src/main.c,v
retrieving revision 1.285
diff -u -r1.285 main.c
--- src/main.c  29 Mar 2005 23:34:58 -  1.285
+++ src/main.c  28 Apr 2005 08:39:15 -
@@ -626,9 +626,9 @@
   ptr timeout = (ptr)Timeout;
   ptr delay, prior;
 
-  if( count <= NDELAY ){
-delay = delays[count-1];
-prior = totals[count-1];
+  if( count < NDELAY ){
+delay = delays[count];
+prior = totals[count];
   }else{
 delay = delays[NDELAY-1];
 prior = totals[NDELAY-1] + delay*(count-NDELAY-1);


[sqlite] sqlite 3.2.1 lock-2.8 test hangs

2005-04-27 Thread Jolan Luff
hi,

when running the sqlite 3.2.1 regression tests, the lock-2.8 test hangs
indefinitely.  if i disable that test, all others pass.

is this a bug in the regression test or is this something i should be
concerned about?

thanks,

- jolan


Re: [sqlite] Syntax Error For 3.0.8 --> 3.2.1 Upgrade

2005-04-21 Thread Jolan Luff
On Thu, Apr 21, 2005 at 12:07:24PM -0500, William Hachfeld wrote:
> I've recently tried to upgrade from SQLite 3.0.8 to 3.2.1 and have run into a
> snag. This is probably something REAL simple that I'm just not seeing. I'm
> hoping someone can point out my stupid mistake...
> 
> When I rebuild our project with 3.2.1 instead of 3.0.8, I'm getting a syntax
> error, where none previously existed, while constructing a database. I've 
> found
> that I can reproduce this same behavior by executing the identical SQL
> statements using the "sqlite3" command interface:
> 
> sqlite> CREATE TABLE Statements (id INTEGER PRIMARY KEY, linked_object 
> INTEGER, file INTEGER, line INTEGER, column INTEGER);
> SQL error: near "column": syntax error
> 
> sqlite>
> 
> 
> 
> In the above, "tmp.db" did not exist prior to the execution of "sqlite3". 
> Where
> is the syntax error near "column" in the last line?

I wonder if 'column' is now reserved with the addition of ALTER TABLE
ADD COLUMN.


Re: [sqlite] time for timer...

2005-03-25 Thread Jolan Luff
On Fri, Mar 25, 2005 at 04:48:47PM -0800, Jay wrote:
> SQLite version 3.1.2
> Enter ".help" for instructions
> sqlite> select datetime('now');
> 2005-03-26 00:44:37
> sqlite> .quit
> zenobia # date
> Fri Mar 25 18:44:48 CST 2005
> zenobia #
> 
> Is this because I don't have the timezone set?

select datetime('now', 'localtime') will compensate for your timezone.


Re: [sqlite] Versions 2.8.16 and 3.1.2

2005-02-17 Thread Jolan Luff
On Tue, Feb 15, 2005 at 08:23:59AM -0500, D. Richard Hipp wrote:
> Version 3.1.2 is also (by coincidence) the first stable release
> of the 3.1 line.  SQLite 3.1 adds support for correlated subqueries,
> autovacuum, autoincrement, ALTER TABLE, and other features.
> 
> Please let me know if you find any problems with either release.

with 2.8.16 and 3.0.8, i had to set the following in the environment in
order for the tcl headers and library to be properly found:

config_TARGET_TCL_LIBS="-L${LOCALBASE}/lib -ltcl84 -lm"
config_TARGET_TCL_INC="-I${LOCALBASE}/include/tcl8.4"

(where ${LOCALBASE} is set to /usr/local)

now with 3.1.2 i use --with-tcl=${LOCALBASE}/lib/tcl8.4 as an
argument to configure and sqlite links to tcl properly, but it cant find
the headers.  somehow this gets set:

TCL_INCLUDE_SPEC='-I/usr/local/include'

but i couldn't figure out where or how to override it.  since configure
doesn't respect CPPFLAGS i've had to resort to appending
-I${LOCALBASE}/include/tcl8.4 to CFLAGS.  the above no longer works and
appending this to CFLAGS is rather hacky.  i'd be more than happy to
provide you with any information you need in order to get this working
in a sane way.

- jolan


Re: [sqlite] Versions 2.8.16 and 3.1.2

2005-02-15 Thread Jolan Luff
On Tue, Feb 15, 2005 at 08:23:59AM -0500, D. Richard Hipp wrote:
> Version 3.1.2 is also (by coincidence) the first stable release
> of the 3.1 line.  SQLite 3.1 adds support for correlated subqueries,
> autovacuum, autoincrement, ALTER TABLE, and other features.
> 
> Please let me know if you find any problems with either release.

one of the regression tests fail on 3.1.2:

alter-1.8.2...
Error: near ".": syntax error


Re: [sqlite] bug in btree code 3.0.8

2005-01-07 Thread Jolan Luff
On Fri, Jan 07, 2005 at 12:59:51AM -0800, Daniel K wrote:
> > sql below (it's fairly long).  We're using FreeBSD
> > 4.10 with gcc version
> > 2.95.4 20020320 [FreeBSD].
> >
> http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/lib/libc/stdlib/malloc.c?rev=1.70
> 
> > Adding the assertion that pCell is within the memory
> > region allocated to
> > apCell is correct is it not?  It should not be 4
> > bytes before.  If
> > that's wrong, I will go back to debugging this on my
> > own.
> 
> That assertion wouldn't work. pCell can be less
> than apCell if it points to a cell that was an
> overflow
> cell on entry to balance_nonroot().
> 
> I just checked in a fix to cvs. Can you check if this
> resolves the problem on your platform? Thanks.
> 
> http://www.sqlite.org/cvstrac/chngview?cn=2180

I backported your fix to 3.0.8 and the regression tests no longer
fail, thanks.


Re: [sqlite] sqlite/php - Having trouble getting started

2004-12-24 Thread Jolan Luff
On Fri, Dec 24, 2004 at 09:37:10PM -0500, Peter Jay Salzman wrote:
> I taught myself Perl DBI/sqlite yesterday.  Very cool.  Today I decided to
> play with sqlite using PHP.  Unfortuantely, I'm not having much success with
> the PHP implementation.

the code you pasted was for php5, not the php4 bolt-on which you appear
to be using.

try:

$db = sqlite_open("/tmp/sqlite.db");


Re: [sqlite] Sequences In SQLite

2004-12-08 Thread Jolan Luff
On Wed, Dec 08, 2004 at 04:40:02PM -0500, Jeff Flowers wrote:
> Is there anything like serial sequences in SQLite? What I want to do is
> have a primary interger key that auto-increments as records are added to
> a table.

does the first entry in the faq on the website not do what you want?