Skip to content

OracleMetadataProvider uses USER_* views while legacy OracleSchemaManager uses ALL_* views, causing introspectTableByUnquotedName() to fail when session user ≠ schema owner #7328

@k0n3r

Description

@k0n3r

Bug Report

Q A
Version 4.4.1
Previous Version if the bug is a regression N/A

Summary

Inconsistent behavior between deprecated SchemaManager API and the new
introspectTableByUnquotedName() when Oracle session user differs from schema owner.

Current behavior

introspectTableByUnquotedName() queries USER_* views and fails with
TableDoesNotExist when session user ≠ schema owner.

Steps to reproduce

  1. Oracle DB with schema owner user SCHEMA_OWNER.
  2. Connect DBAL with a different session user (e.g., DBA proxy or application user) that has privileges on SCHEMA_OWNER's tables, with dbname = 'SCHEMA_OWNER'.
  3. Call $schemaManager->tablesExist(['my_table']) → returns true (uses ALL_TABLES WHERE OWNER = 'SCHEMA_OWNER').
  4. Call $schemaManager->introspectTableByUnquotedName('my_table') → throws TableDoesNotExist (uses USER_TAB_COLUMNS which only sees the session user's own tables)

Expected behavior

Should use ALL_* views scoped by OWNER, consistent with tablesExist() and
introspectTable().

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions