Skip to content

Escape character not updated when switching database driver #417

@tenzap

Description

@tenzap

I have a test that uses a phpunit dataprovider having 3 values, each being the database driver to use. The 3 engines are PostgreSQL, MySQL, and sqlite.

It appears that when the test is run with 2nd case, MySQL, the escape char used to build the queries it's not updated to the one for MySQL which is `. It still is the one of PostgreSQL wich is ".

The cause is in this line of ci3.
https://github.com/bcit-ci/CodeIgniter/blob/3.1.13/system/database/DB_driver.php#L1417
If I remove the static from the $preg_ec variable, the escape char is correctly set for MySQL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions