Skip to content

Bug: incomplete join in CodeIgniter\Database\MySQLi\Connection::_foreignKeyData() #4996

@lukemim

Description

@lukemim

the join in CodeIgniter\Database\MySQLi\Connection::_foreignKeyData() is joining over CONSTRAINT_NAME only, but not over CONSTRAINT_SCHEMA, so if there are multiple databases (schemas) containing constraints with the same names _foreignKeyData() will return duplicated rows with metadata also from the other databases (schemas).

I guess this is where the bug was created: 12ea7ba

CI 4.1.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugVerified issues on the current code behavior or pull requests that will fix themdatabaseIssues or pull requests that affect the database layer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions