zend-db
zend-db copied to clipboard
ORA-01745: Ungültiger Host-/Bindevariablenname caused by :table
In /src/Metadata/Source/OracleMetadata.php#L127 :table is a reserved word and therefore the query fails
The query does also contain additional line breaks (#125, #128) and a semicolon at the end (#129)
Linking sources: https://github.com/zendframework/zend-db/blob/790123893c01ad597b28652b2a382ac86186c6c8/src/Metadata/Source/OracleMetadata.php
@lkainers what oracle version are you testing against? Also, got an example of a generated query?
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit
There is no generated query https://github.com/zendframework/zend-db/blob/790123893c01ad597b28652b2a382ac86186c6c8/src/Metadata/Source/OracleMetadata.php#L107 is the query
$params = array( 'driver' => 'Oci8', 'hostname' => 'host', 'username' => 'user', 'password' => pass', 'port' => '', );
$connection = new Zend\Db\Adapter\Driver\Oci8\Connection($params); $driver = new Zend\Db\Adapter\Driver\Oci8\Oci8($connection); $adapter = new Zend\Db\Adapter\Adapter($driver);
$metadata = new Zend\Db\Metadata\Metadata($adapter); $metadata->getConstraints('tablename');
Here's a PR https://github.com/zendframework/zend-db/pull/34 that would fix this issue
This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at https://github.com/laminas/laminas-db/issues/142.