From: Patrick J. P. G. <pat...@us...> - 2000-10-19 10:57:42
|
Update of /cvsroot/firebird/interbase/jrd In directory slayer.i.sourceforge.net:/tmp/cvs-serv18552/interbase/jrd Modified Files: cmp.c Log Message: Please consider this contrived example: 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)); While I don't consider this to be an example of real-word SQL coding, it does show that the second argument of the gen_id function can be something other than a simple constant. As jrd/cmp.c is coded now this statement will get processed properly, but there is a serious problem: The routine 'pass1' will attempt to parse the internal generator ID as if it was a pointer to an execution node. This change corrects 'pass1' processing to only pass the second argument on for further processing. pat Index: cmp.c =================================================================== RCS file: /cvsroot/firebird/interbase/jrd/cmp.c,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** cmp.c 2000/10/13 05:15:12 1.7 --- cmp.c 2000/10/19 10:57:39 1.8 *************** *** 3259,3262 **** --- 3259,3265 ---- case nod_gen_id: + case nod_gen_id2: + node->nod_arg [e_gen_value] = + pass1 (tdbb, csb, node->nod_arg [e_gen_value], view, view_stream, validate_expr); return node; |