Uploaded image for project: 'Doctrine DBAL'
  1. Doctrine DBAL
  2. DBAL-206

OraclePlatform causes problems with more schemas with same table names


    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.5
    • Fix Version/s: 2.1.6, 2.2
    • Component/s: Platforms
    • Security Level: All
    • Labels:
    • Environment:
      Oracle database


      OraclePlatform is using the ALL_* tables to fetch schema information but is only supplying the table name in the where condition. This causes problems when you have multiple schemas with tables that have the same name. Their columns/FK get mixed up.

      My colleague and I have traced the problem down to the OraclePlatform class and replaced the ALL_* tables with USER_*. The fix for that is on github https://github.com/FranPregernik/dbal/commit/c70bc462b49a168105304cdff0086dcd15cc347d.

      As mentioned in the comment message the other fix would be to fetch the schema name (user) of the table and add it to the where part of the queries. Something like this:

      t.owner = user

      A pull request has been made on github for this.


        franpregernik Fran Pregernik created issue -
        beberlei Benjamin Eberlei added a comment -


        beberlei Benjamin Eberlei added a comment - Fixed.
        beberlei Benjamin Eberlei made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.1.6 [ 10181 ]
        Fix Version/s 2.2 [ 10142 ]
        Resolution Fixed [ 1 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira [ 13376 ] jira-feedback2 [ 17783 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 17783 ] jira-feedback3 [ 20138 ]

        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={expand=changesets[0:20].revisions[0:29],reviews, query=DBAL-206}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)


          • Assignee:
            beberlei Benjamin Eberlei
            franpregernik Fran Pregernik
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: