We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In trunk now function prepareBatch trying to parse INSERT statement by regexp:
var splitInsertRe = regexp.MustCompile(`(?i)\sVALUES\s*\(`) var columnMatch = regexp.MustCompile(`.*\((?P<Columns>.+)\)$`) func (c *connect) prepareBatch(...) query = splitInsertRe.Split(query, -1)[0] colMatch := columnMatch.FindStringSubmatch(query)
so, the problem is - user can create any columnName into backticks, which also makes possible to match part of regexp.
Example (any column_name with parentheses as part of name):
INSERT INTO `my_schema`.`my_table` (`__primary_key`,`ColumnNameWithParentheses(something)`) VALUES (1,1);
I see good solution here - at least use tokenizer from Clickhouse antlr grammar instead of regexp.
I have PR with fix & test
The text was updated successfully, but these errors were encountered:
damn, don't know how to allocate issue number, and link PR into issue. So, the PR is into #1248 can anybody link that PR into this issue?)
Sorry, something went wrong.
@timmyb32r you already referenced it. GitHub does it automatically when you post a link/issue number.
Successfully merging a pull request may close this issue.
In trunk now function prepareBatch trying to parse INSERT statement by regexp:
so, the problem is - user can create any columnName into backticks, which also makes possible to match part of regexp.
Example (any column_name with parentheses as part of name):
I see good solution here - at least use tokenizer from Clickhouse antlr grammar instead of regexp.
I have PR with fix & test
The text was updated successfully, but these errors were encountered: