Issues

ZF-7821: Unquoted identifier in sqlite pdo adapter

Issue Type: Bug Created: 2009-09-10T05:12:58.000+0000 Last Updated: 2009-09-17T22:31:08.000+0000 Status: Resolved Fix version(s): - 1.9.3 (22/Sep/09)

Reporter: Fabien NAUD (fabien) Assignee: Ralph Schindler (ralph) Tags: - Zend_Db

Related issues: Attachments:

Description

In file Db/Adapter/Pdo/Sqlite.php, in the describeTable method, schema and table names are not quoted (as it is done in Mysql pdo adaptor).

code :

<pre class="highlight">
if ($schemaName) {
            $sql = "PRAGMA $schemaName.table_info($tableName)";
        } else {
            $sql = "PRAGMA table_info($tableName)";
        }

shoulb be

<pre class="highlight">
if ($schemaName) {
            $sql = 'PRAGMA '.$this->quoteIdentifier($schemaName).'.table_info('.$this->quoteIdentifier($tableName).')';
        } else {
            $sql = 'PRAGMA table_info('.$this->quoteIdentifier($tableName).')';
        }

Comments

Posted by Ralph Schindler (ralph) on 2009-09-17T22:30:57.000+0000

Fixed in trunk at r18213 and in release 1.9 at r18214

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