[cvsnt] sessionid as foreign key
bwhicks at aep.com
bwhicks at aep.com
Thu Jul 19 16:43:47 BST 2007
cvsnt-bounces at cvsnt.org wrote on 07/18/2007 05:23:32 PM:
> It gets the session id from a 'select identity_val_local()' appended to
> the session insert string (the whole string is something like 'begin
> atomic; insert into xxxxx; select identity_val_local(); end').
>
> I can't think of a reason why that would suddenly stop working if it
> worked before unless there's a way to switch that functionality off
> globally.
Our DB2 admin (Kristi) submitted a query using the above info and had
success. Here's the full text of her results:
Insert Into cvsuser.SessionLog (Command, Date, Hostname, Username,
SessionId, VirtRepos, PhysRepos, Client)
Values
('tag','2007-07-20 20:40:21',
'P3038356.aepsc.com','s188253','7a5b469e7ab524f0','/usr/local/cvs/caf','/usr/local/cvs/caf',
'Kristi Test')
DB20000I The SQL command completed successfully.
db2 select identity_val_local() from cvsuser.sessionlog fetch first 1 row
only
1
------
68855.
db2 select id, client from cvsuser.sessionlog where id = 68855
ID CLIENT
----- -----------
68855 Kristi Test
So the function works as expected. The return value just seems to get lost
before the next query happens (to insert something like taglog data).
Thanks for your help, Tony...
Brian
More information about the cvsnt
mailing list