[ic] database transactions problem in log_transaction
Duane Hinkley
duane at downhomewebdesign.com
Tue Jun 28 22:52:49 EDT 2005
david yee wrote:
> I'm having what I believe to be a transactional mySQL issue in
> log_transaction. I must first admit that I am not sure whether
> transactions are crucial in the case of a straightforward foundation-
> style store, but here goes nonetheless...
>
> I have tried using both a [query] tag and perl Db objects in
> log_transaction to make updates to a set of rows in the
> "transactions" table, after the current transaction row is created.
> The query in question is:
>
> UPDATE transactions SET value='0' WHERE username LIKE '$username' AND
> hold = 1;
>
> That query is never passed to mySQL, and the following error lines
> appear in error.log:
>
> /process Bad SQL statement: Can't locate object method "new" via
> package "Vend::SQL_Parser" (perhaps you forgot to load
> "Vend::SQL_Parser"?) at /usr/lib/interchange/lib/Vend/Scan.pm line 597.
> >
> > Query was: UPDATE transactions SET value='0' WHERE username LIKE
> 'userx' AND hold = 1
>
> /process Unable to find base table in query: UPDATE transactions SET
> value='0' WHERE username LIKE 'userx' AND hold = 1
>
> Now, since this only happens on tables that are marked in their route
> directive as transactional tables, I imagine that's the cause. Is
> there something that would prevent a SQL query from working inside,
> for example, log_transaction? What might I be able to do to update
> those rows, besides waiting for the route to complete?
>
> Thanks in advance; if there's anything I can provide to make this
> clearer, please let me know.
>
> Best
> David
> _______________________________________________
> interchange-users mailing list
> interchange-users at icdevgroup.org
> http://www.icdevgroup.org/mailman/listinfo/interchange-users
>
David,
I update records all the time in log_transactions using the straight
query tag (i.e. [query sql="update transactions.....). So I know that
works. My guess is if you're using transactions, the records may be
locked until their committed, or something like that.
--
Sincerely,
Duane Hinkley
Down Home Web Design, Inc.
(208) 424-0572 Fax(208) 587-0738
duane at downhomewebdesign.com
www.downhomewebdesign.com
More information about the interchange-users
mailing list