[GRASS5] [bug #4056] (grass) db.test fails on sqlite driver

this bug's URL: http://intevation.de/rt/webrt?serial_num=4056
-------------------------------------------------------------------------

Subject: db.test fails on sqlite driver

Platform: GNU/Linux/x86
grass obtained from: Trento Italy site
grass binary for platform: Compiled from Sources
GRASS Version: CVS 2005.02.03

Using Grass 6.1 cvs 2005.02.03 anbd sqlite 3.3.3 i get a following error:

$ db.test test=test1
create table grass_test1 (i1 integer, d1 double precision, c1 varchar(20))
EXECUTE: OK
insert into grass_test1 values ( 1, 123.456, 'abcd' )
EXECUTE: OK
insert into grass_test1 values ( 2, null, 'xxx' )
EXECUTE: OK
select * from grass_test1
EXECUTE: OK
RESULT: OK
select c1 from grass_test1 where d1 < 500 / 2 and i1 <> 2 and c1 ~ 'bc'
DBMI-SQLite driver error:
Error in sqlite3_prepare():select c1 from grass_test1 where d1 < 500 / 2 and i1 <> 2 and c1 ~ 'bc'

near "~": syntax error

EXECUTE: ******** ERROR ********
0a1

abcd

RESULT: ******** ERROR ********
insert into grass_test1 values ( 3, 0.0, '_''_' )
EXECUTE: OK
alter table grass_test1 add column i2 integer
EXECUTE: OK
update grass_test1 set d1 = 18.6, i2 = 987 where i1 = 2
EXECUTE: OK
select * from grass_test1
EXECUTE: OK
RESULT: OK
drop table grass_test1
EXECUTE: OK

My database connection is as follows:

$ db.connect -p
driver:sqlite
database:$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite.db
schema:(null)
group:(null)

Maciek

-------------------------------------------- Managed by Request Tracker