From: Patrick J. P. G. <Pat...@wo...> - 2000-10-19 03:55:59
|
Hello! I've been contemplating a potential bug in jrd/cmp.c If you can, would you please enter the test shown below and see if you get the correct results. ...pat /* ** Name: genid_arguments_01 ** Series: cf_isql ** Meta-Series: ** Dependencies: None ** Description: This test is a test for the proper handling of gen_id arguments ** ** This test calls gen_id with a computed field as an argument. ** ** Expected result: see comments in isql coding below ** ** Author: Patrick J. P. Griffin based on cf_isql_10 by Ravil A. Desai ** Bugs: ** Change history: ** */ $ CREATE cf_test.sql create database "WHERE_GDB:cf.gdb"; create generator gen1; set generator gen1 to 999; show generator gen1; create generator gen2; set generator gen2 to 199; show generator gen2; create generator gen3; set generator gen3 to 29; show generator gen3; create table t0 ( a integer, genid_field1 computed by (gen_id(gen1, 1)), genid_field2 computed by (gen_id(gen2, genid_field1)), genid_field3 computed by (gen_id(gen3, genid_field2)) ); show table t0; insert into t0(a) values(4); insert into t0(a) values(1); /* first row: a: 4 genid_field3:=genid3+(genid2+(genid1+1)) :=29+(199+(999+1) :=29+(199+1000) :=29+1199 :=1228 second row: a: 1 genid_field3:=genid3+(genid2+(genid1+1)) :=1228+(1199+(1000+1) :=1228+(1199+1001) :=1228+(2200) :=3428 */ select a,genid_field3 from t0; /* first row: a: 4 genid_field3:=genid3+(genid2+(genid1+1)) :=3428+(2200+(1001+1) :=3428+(2200+1002) :=3429+3202 :=6630 genid_field2:=genid2+(genid1+1) :=3202+(1002+1) :=3202+1003 :=4205 genid_field1:=genid1+1 :=1003+1 :=1004 second row: a: 1 genid_field3:=genid3+(genid2+(genid1+1)) :=6630+(4205+(1004+1)) :=6630+(4205+1005) :=6630+5210 :=11840 genid_field2:=genid2+(genid1+1) :=5210+(1005+1) :=5210+1006 :=6216 genid_field1:=genid1+1 :=1006+1 :=1007 */ select * from t0; exit; $ ISQL -e -m -input cf_test.sql $ DELETE cf_test.sql $ RUN drop_gdb WHERE_GDB:cf.gdb |
From: <Sch...@t-...> - 2000-10-19 05:37:25
|
"Patrick J. P. Griffin" schrieb: > > Hello! > > I've been contemplating a potential bug in jrd/cmp.c > > If you can, would you please enter the test shown below and see if you get > the correct results. > ...pat Passed :-) On a firebird Superserver build on Linux from yesterday. Frank -- "Fascinating creature, phoenixes, They can carry immensely heavy loads, their tears have healing powers and they make highly faithful pets." - J.K. Rowling |
From: <Sch...@t-...> - 2000-10-19 08:24:38
|
"Patrick J. P. Griffin" schrieb: > > Hello! > > I've been contemplating a potential bug in jrd/cmp.c > > If you can, would you please enter the test shown below and see if you get > the correct results. > ...pat Here is the result against an original Inprise IB60SS: Running global test CF_ISQL_17 ... *** failed **** Test CF_ISQL_17 failed on 19-OCT-2000: initialized by frank on 19-OCT-2000 with boilerplate BP_FB ------------------- 59,61 c 59,61 < 4 1228 < 1 3428 < --------------------------------------------- > 4 4 > 1 20 > ++++++++++++++++++++++++++++++++++++++++++++++++++ 107,110 c 107,111 < < 4 1004 4205 6630 < 1 1007 6216 11840 < --------------------------------------------- > Statement failed, SQLCODE = -902 > > database file appears corrupt () > -wrong page type > -page 0 is of wrong type (expected 9, found 1) ++++++++++++++++++++++++++++++++++++++++++++++++++ ------------------- Frank |
From: Patrick J. P. G. <Pat...@wo...> - 2000-10-19 11:11:37
|
Frank, Thanks for trying those two combinations. As I thought more and more about the current firebird build I became convinced that it was only a coincidence that it didn't abort. The internal generator ID was being passed to the next routine as if it was a valid pointer - but in this case the pointer field is used to hold that ID. I've sent in a change that prevents this. ...pat My family sits at dinner and the conversation gets thinner. My thoughts are over yonder for on this C code I do ponder. -----Original Message----- From: fir...@li... [mailto:fir...@li...] On Behalf Of Frank Schlottmann-Goedde Sent: Thursday, October 19, 2000 4:14 AM To: fir...@li... Subject: Re: [Firebird-test] Please try this new test "Patrick J. P. Griffin" schrieb: > > Hello! > > I've been contemplating a potential bug in jrd/cmp.c > > If you can, would you please enter the test shown below and see if you get > the correct results. > ...pat Here is the result against an original Inprise IB60SS: Running global test CF_ISQL_17 ... *** failed **** Test CF_ISQL_17 failed on 19-OCT-2000: initialized by frank on 19-OCT-2000 with boilerplate BP_FB ------------------- 59,61 c 59,61 < 4 1228 < 1 3428 < --------------------------------------------- > 4 4 > 1 20 > ++++++++++++++++++++++++++++++++++++++++++++++++++ 107,110 c 107,111 < < 4 1004 4205 6630 < 1 1007 6216 11840 < --------------------------------------------- > Statement failed, SQLCODE = -902 > > database file appears corrupt () > -wrong page type > -page 0 is of wrong type (expected 9, found 1) ++++++++++++++++++++++++++++++++++++++++++++++++++ ------------------- Frank _______________________________________________ Firebird-test mailing list Fir...@li... http://lists.sourceforge.net/mailman/listinfo/firebird-test |