Skip to content

Loading…

DBAL-744: [GH-477] [DBAL-552] Fix parsing backtick quoted statement fragments in SQLParserUtils #1971

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of deeky666:

Url: #477

Message:

MySQL uses backtick for identifier quotation. The SQLParserUtils treats statements with quoted identifiers that contain a colon as named parameter which is wrong.

Example

SELECT `d.ns:col*name` FROM my*table d WHERE `d.date` >= :param1

Throws exception

An exception occurred while executing 'SELECT `d.ns:col*name` FROM my_table d WHERE `d.date` >= :param1' with params ["2013-06-24 14:22:18"]: Value for :col_name not found in params array. Params array key should be "col*name"

This PR adds the backtick character to the recognized quote characters when retrieving unquoted statement fragments.

@doctrinebot

Comment created by @doctrinebot:

A related Github Pull-Request [GH-477] was closed:
#477

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot doctrinebot added the Bug label
@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.4.2 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.