Zend Framework

Unquoted identifier in sqlite pdo adapter

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.7.8, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.9.0, 1.9.1, 1.9.2
  • Fix Version/s: 1.9.3
  • Component/s: Zend_Db
  • Labels:
    None

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 :

if ($schemaName) {
            $sql = "PRAGMA $schemaName.table_info($tableName)";
        } else {
            $sql = "PRAGMA table_info($tableName)";
        }

shoulb be

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

Activity

Hide
Ralph Schindler added a comment -

Fixed in trunk at r18213 and in release 1.9 at r18214

Show
Ralph Schindler added a comment - Fixed in trunk at r18213 and in release 1.9 at r18214

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: