Subject | Re: [ib-support] Ignorance or ancient bug? |
---|---|
Author | Jason Chapman (JAC2) |
Post date | 2002-01-22T09:25:42Z |
Sounds sensible to me both the results and your answer, for you to get a
consisant view, the engine would have to continually restart the query
anytime a commit happened on any table that was involved in the query,
either that or the engine would have to implement reads blocking writes.
Either way, one of your test apps would just hang.
Much better to use snapshot for stability and consistency of results.
Cheers,
JAC.
""alex_vnru"" wrote in message news:a27fc3+bv4t@......
consisant view, the engine would have to continually restart the query
anytime a commit happened on any table that was involved in the query,
either that or the engine would have to implement reads blocking writes.
Either way, one of your test apps would just hang.
Much better to use snapshot for stability and consistency of results.
Cheers,
JAC.
""alex_vnru"" wrote in message news:a27fc3+bv4t@......
> create table test (ID integer)
>
> and in one application (app1) in read_commited transaction
>
> C:=0; P:=0;
> ibquery.sql.text:='Select count(*) from test'
> While C<500000 Do
> Begin
> ibquery1.open;
> C:=ibquery1.Fields[0].asinteger;
> if C<>P then
> begin
> P:=C; RichEdit1.Lines.Add(IntToStr(P));
> end;
> ibquery1.Close;
> end;
>
> and in another application (app2)
>
> j:=0; IBTransaction1.starttransaction;
> For I:=1 to 600000 do
> begin ibquery1.Params[0].asinteger:=I;
> ibquery1.execsql;
> inc(j); if j=30000 then
> begin j:=0;
> IBTransaction1.commit;
> IBTransaction1.starttransaction;
> end;
> end;
> IBTransaction1.commit;
>
> started app1, then started app2, waiting
>
> 30000
> 60000
> 90000
> ...
>
> but see:
>
> 5568
> 30000
> 60000
> 90000
> 116866
> 120000
> 134731
>
> and so on
>
> Thinking some time I understand what is it - some commited records
> are placed on the pages which are already passed by current count(*)
> execution, some not. But is it as designed? I can't remember on what
> was based my inshurance about another behavior, and when one of us
> asked this in bpi.bugdiscussions, Jeff Overcash, who is respected by
> me as specialist regardless of all confrontations, answered in
> the sense I had before this experiment.
> We tested it on RC2 and IB 5.1 - the same behavior. So what is it -
> widespread mistake or old unnoticed bug?
>
> Thanks for your patience to read this long post.
>
> Best regards, Alexander V.Nevsky.
>
>
>
> 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/
>
>
>