Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1019

Double quotation mark mysql query error on orm:convert-mapping --from-database

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.1
    • Component/s: Tools
    • Security Level: All
    • Labels:
      None
    • Environment:
      ubuntu 10.10 32bit; PHP Version => 5.3.3-1ubuntu9.3; mysql Ver 14.14 Distrib 5.1.49, for debian-linux-gnu (i686) using readline 6.1; Doctrine 2.0.1 git version

      Description

      By executing this command php doctrine orm:convert-mapping --from-database yml yaml/ I get this error:

       
      PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[42S22]: Column not found: 1054 Unknown column 'BASE TABLE' in 'where clause'' in doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php:577
      Stack trace:
      #0 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php(577): PDO->query('SHOW FULL TABLE...')
      #1 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php(532): Doctrine\DBAL\Connection->executeQuery('SHOW FULL TABLE...', Array)
      #2 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(194): Doctrine\DBAL\Connection->fetchAll('SHOW FULL TABLE...')
      #3 doctrine2-orm/lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php(76): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableNames()
      #4 doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php on line 577
      

      After var_dump the $query variable doctrine2-orm/lib/vendor/doctrine-dbal/lib/Doctrine/DBAL/Connection.php on line 577 string(48) "SHOW FULL TABLES WHERE Table_type = "BASE TABLE"" you can see that BASE TABLE is in double quotations marks.
      I replaced them with single quotation marks SHOW FULL TABLES WHERE Table_type = 'BASE TABLE' and executed the statement on the mysql server, no error!

      Please replace the double quotation marks in the query with single quotation marks.

        Issue Links

          Activity

          Bernhard Schlas created issue -
          Hide
          Benjamin Eberlei added a comment -

          This is a duplicate of DBAL-85

          Show
          Benjamin Eberlei added a comment - This is a duplicate of DBAL-85
          Benjamin Eberlei made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Duplicate [ 3 ]
          Benjamin Eberlei made changes -
          Link This issue duplicates DBAL-85 [ DBAL-85 ]
          Benjamin Eberlei made changes -
          Workflow jira [ 12361 ] jira-feedback [ 14754 ]
          Benjamin Eberlei made changes -
          Workflow jira-feedback [ 14754 ] jira-feedback2 [ 16618 ]
          Benjamin Eberlei made changes -
          Workflow jira-feedback2 [ 16618 ] jira-feedback3 [ 18871 ]

          This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

          • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=DDC-1019, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Bernhard Schlas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: