Subject Re: [ib-support] TimeStamp
Author hans@hoogstraat.ca
Helen,

I never said the CURRENT_TIMESTAMP design concept is a BUG :)

But I did replaced the easier CALLS to TESTTIME with
a SELECT noted 'Avoid BUG' because it has been mentioned
repeated CALLs cause unpredicatable results (BUG) in IB6
and I haven't read yet that it has been fixed in FB1. Did You ?

It is at times very difficult to find documentation, specs
and how they are actually worked out and almost impossible
everytime I have a question to scan miles and years of
messages to see if it has been mentioned somewhere.

For that reason I really appreciate your efforts in putting
docs together :)

Best Regards
Hans

=======================================================



Helen Borrie wrote:
>
> Hans,
>
> AFAIK, it is not a bug - the CURRENT_TIMESTAMP behaviour is "as designed" - I believe its purpose is to timestamp the beginning of a physical transaction; as contrasted with 'NOW' which returns the timestamp at the moment of execution.
>
> Some months ago Charlie Caro posted a fairly detailed description of what's happening with these timestamps - try searching at mers.com or, failing that, try Google.
>
> Regards,
> Helen
>
> At 09:37 PM 25-08-01 -0600, you wrote:
> >Helen,
> >Thank You.
> >
> >You peeked at the docs :)
> >
> >I assumed Current_TimeStamp would mean Current as Now This Moment
> >
> >Now
> >
> >CREATE PROCEDURE TESTTIME
> >RETURNS (CTIME TIMESTAMP )
> >AS
> >BEGIN
> > CTIME = CURRENT_TIMESTAMP;
> > SUSPEND;
> >END
> >
> >along with
> >
> >CREATE PROCEDURE TEST
> >RETURNS ( T1 TIMESTAMP
> > , T2 TIMESTAMP )
> >AS
> >BEGIN
> > SELECT CTIME FROM TESTTIME INTO :T1; // Avoid BUG
> > T2 = T1;
> > WHILE (T1 >= T2) DO
> > SELECT CTIME FROM TESTTIME INTO :T2; // Avoid BUG
> >SUSPEND;
> >END
> >
> >works as great as your much shorter suggestion :)
> >
> >Finally I can time my Procedures by replacing the
> >WHILE (T1 >= T2) DO with what ever coding I want to time.
> >
> > > CREATE PROCEDURE TEST
> > > RETURNS ( T1 TIMESTAMP
> > > , T2 TIMESTAMP )
> > > AS
> > > BEGIN
> > > T1 = CURRENT_TIMESTAMP;
> > > T2 = T1
> > > /* Equal at start of loop
> > > WHILE (T1 >= T2) DO
> > > T2 = CURRENT_TIMESTAMP; /* No new value - T1 and T2 stay the same
> > >
> > > SUSPEND;
> > > END
> > >
> >
> >
> >To unsubscribe from this group, send an email to:
> >ib-support-unsubscribe@egroups.com
> >
> >
> >
> >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
> All for Open and Open for All
> InterBase Developer Initiative ยท http://www.interbase2000.org
> _______________________________________________________
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/