[ic] Possible bug with [query]

Mike Heins interchange-users@lists.akopia.com
Tue Jul 17 13:51:01 2001


Quoting Mike Heins (mikeh@minivend.com):
> Quoting interch (interch@web3.valley-internet.com):
> > 
> > Hmmm this might possibly be a bug, since I can't see how it should do this
> > regardless of whether I have the query right or not.  Ic version 4.7.6
> > from cvs on 7/14.
> > 
> > Here is the code:
> > 
> > [tag flag write]country[/tag]
> > 
> > 
> > [query sql="update country set shipmodes = 'TEST' where code =
> > 'US'" table=country]
> > [/query]
> > [export country]
> > 
> > Here is the line in the database (default dbm) for code US.  I have the
> > type set to PIPE in country.dbm.
> > 
> > US|0||US|GNDRES FEG 1DA|United States|USA|840 
> > 
> > 
> > After running the query the line above is not changed, but at the end of
> > country.txt this line has been inserted:
> > 
> > ||||GNDRES FEG 1DA
> > 
> 
> This must be a GDBM type, works fine on MySQL and Pg. Yup, that is it.
> I don't think I have looked at the GDBM update stuff since MV3.15, so
> it is not surprising that it doesn't work.
> 
> You must be exporting the database somewhere, because it won't write
> the text file unless you do.
> 
> I will log it into Bugzilla.

This is now fixed in CVS. I need to document the operations that
are supported with DBM, I guess. They are limited to:


	update table set ( foo = 'literal', bar = 'literal') where ....
	insert into table ( foo, bar) values ('literal', 'literal') where ....
	delete from table where ....

In other words, you cannot use column references, just literals for
the target values.

-- 
Red Hat, Inc., 3005 Nichols Rd., Hamilton, OH  45013
phone +1.513.523.7621      <mheins@redhat.com>

I have a cop friend who thinks he ought be able to give a new ticket;
"too dumb for conditions".