Issues

ZF-11099: ORA-24816: Expanded non LONG bind data supplied after actual LONG or LOB column

Issue Type: Bug Created: 2011-02-21T06:38:21.000+0000 Last Updated: 2011-02-21T06:40:05.000+0000 Status: Open Fix version(s): Reporter: Krzysztof Szatanik (diabl0) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db

Related issues: Attachments:

Description

Problem hit when using PDO_OCI and Oracle 10g. When inserting row a ORA-24816: Expanded non LONG bind data supplied after actual LONG or LOB column exception was (sometimes) thrown.

ORA-24816: Expanded non LONG bind data supplied after actual LONG or LOB column Cause: A Bind value of length potentially > 4000 bytes follows binding for LOB or LONG. Action: Re-order the binds so that the LONG bind or LOB binds are all at the end of the bind list.

As solution (or rather work-around) i modified Zend_Db_Table_Abstract::insert() adding this piece of code at top

<pre class="highlight">
        /**
         * 
         * ORA-24816: Expanded non LONG bind data supplied after actual LONG or LOB column - Oracle Errors  
         */
        foreach ($data as $key => $value) {
             if ($this->_metadata[$key]['DATA_TYPE'] == 'LONG' OR $this->_metadata[$key]['DATA_TYPE'] == 'LOB') {
                unset($data[$key]);
                $data[$key] = $value;
             }
        }

Comments

Posted by Krzysztof Szatanik (diabl0) on 2011-02-21T06:40:01.000+0000

fixed code quoting

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts