Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Queryparser for SQLite #183

Closed
r4ndsen opened this issue Jun 26, 2019 · 3 comments
Closed

Bug in Queryparser for SQLite #183

r4ndsen opened this issue Jun 26, 2019 · 3 comments

Comments

@r4ndsen
Copy link

r4ndsen commented Jun 26, 2019

in sqlite a columnname containing : is valid, however the queryparser currently does not support this.

adjusting the $skip and $split fixed it for us

PR: 3.x...r4ndsen:patch-2

@r4ndsen
Copy link
Author

r4ndsen commented Jun 26, 2019

$query = 'select "a:A", \'B:b\', `c:c`, :d from table', 
$bind = ['d' => 'foo'];

^ this how works, previously it was trying to bind the non-existing :c param

@r4ndsen
Copy link
Author

r4ndsen commented Apr 26, 2020

as you can see in the example
"a:A" is a string and is treated as such
'B:b' is a string and is treated as such
c:c refers to the column c:c directly and should not be part of the prepared statement. however this is where the bug in the query parser hits.

by adding backtick to the "specially treated characters" this problem is avoided

koriym added a commit that referenced this issue Feb 26, 2022
harikt added a commit that referenced this issue Feb 27, 2022
@harikt
Copy link
Member

harikt commented Feb 28, 2022

This has been fixed. Closing for now.

@harikt harikt closed this as completed Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants