Update of /cvsroot/firebird/interbase/jrd
In directory usw-pr-cvs1:/tmp/cvs-serv1810/jrd
Modified Files:
evl.c
Log Message:
Firebird Bug 127375 Grouping on derived fields processing NULL data kills IB
Test the null flag before trying to expand a value (via pointer) which does
not exist when it is a NULL.
Index: evl.c
===================================================================
RCS file: /cvsroot/firebird/interbase/jrd/evl.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** evl.c 2000/11/30 14:23:44 1.2
--- evl.c 2001/01/07 18:18:12 1.3
***************
*** 20,23 ****
--- 20,24 ----
* All Rights Reserved.
* Contributor(s): ______________________________________.
+ * $Id$
*/
***************
*** 33,36 ****
--- 34,46 ----
* before the first fetch.
*/
+ /*
+ * Modified by: Neil McCalden
+ * Date: 05 Jan 2001
+ * Problem: Firebird bug: 127375
+ * Group by on a calculated expression would cause segv
+ * when it encountered a NULL value as the calculation
+ * was trying reference a null pointer.
+ * Change: Test the null flag before trying to expand the value.
+ */
#include <string.h>
***************
*** 1373,1379 ****
impure = (VLUX) ((SCHAR*) request + from->nod_impure);
desc = EVL_expr (tdbb, from);
- EVL_make_value (tdbb, desc, impure);
if (request->req_flags & req_null)
impure->vlu_desc.dsc_address = NULL;
}
--- 1383,1390 ----
impure = (VLUX) ((SCHAR*) request + from->nod_impure);
desc = EVL_expr (tdbb, from);
if (request->req_flags & req_null)
impure->vlu_desc.dsc_address = NULL;
+ else
+ EVL_make_value (tdbb, desc, impure);
}
***************
*** 1397,1401 ****
vtemp.vlu_desc.dsc_address = NULL;
desc = EVL_expr (tdbb, from);
- EVL_make_value (tdbb, desc, impure);
if (request->req_flags & req_null)
{
--- 1408,1411 ----
***************
*** 1406,1409 ****
--- 1416,1420 ----
else
{
+ EVL_make_value (tdbb, desc, impure);
if (!vtemp.vlu_desc.dsc_address ||
MOV_compare (&vtemp.vlu_desc, desc))
|