Bug #59220 [Asn->Opn]: Binding a NULL value to a numeric column with a foreign key constraint fails

From: Date: Tue, 24 Oct 2017 07:57:11 +0000
Subject: Bug #59220 [Asn->Opn]: Binding a NULL value to a numeric column with a foreign key constraint fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-212191@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=59220&edit=1

 ID:                 59220
 Updated by:         kalle@php.net
 Reported by:        ethernet dot zero at gmail dot com
 Summary:            Binding a NULL value to a numeric column with a
                     foreign key constraint fails
-Status:             Assigned
+Status:             Open
 Type:               Bug
 Package:            OCI8 related
 Operating System:   Debian GNU/Linux 5.04 "Lenny"
 PHP Version:        5.3.1
-Assigned To:        sixd
+Assigned To:        
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2010-06-10 04:28:45] ethernet dot zero at gmail dot com

How is that so? The only thing the patch does is convert to long only non-NULL bound values.

Not that I'm getting defensive or anything, of course. I really would love to know if the
patched driver, which we are using right now without any issues at all so far, is going to crash and
burn when we least expect it. :-)

------------------------------------------------------------------------
[2010-06-09 12:52:21] christopher dot jones at oracle dot com

The suggested patch breaks a bunch of other functionality.

------------------------------------------------------------------------
[2010-05-18 09:14:14] ethernet dot zero at gmail dot com

Description:
------------
When using oci_bind_by_name to set the value of a field which has a foreign key constraint, the
statement fails with a ORA-02291 error (foreign key constraint violation) if the field is of a
numeric type and the parameter is given a NULL value.

Reproduce code:
---------------
Steps to reproduce: http://pastie.org/965413

The following patch solves the problem: http://pastie.org/965425

Expected result:
----------------
The field should be given a NULL value without violating the foreign key constraint.

Actual result:
--------------
The statement fails with a ORA-02291 error (integrity constraint ([constraint name]) violated -
parent key not found).


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=59220&edit=1


Thread (1 message)

  • kalle@php.net
  • Unknown Message
    • kalle@php.net
« previous php.bugs (#212191) next »