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

Corrects the comment handling in vitess #7581

Merged
merged 1 commit into from
Mar 2, 2021

Conversation

GuptaManan100
Copy link
Member

Description

Vitess treats everything after -- as a comment just like MySQL. This means that the query SET @S = 1--4 is valid on both MySQL and Vitess. Refer to https://dev.mysql.com/doc/refman/8.0/en/ansi-diff-comments.html for MySQL documentation regarding the same

Related Issue(s)

Checklist

  • Should this PR be backported? No
  • Tests were added or are not required Yes
  • Documentation was added or is not required Documentation not required.

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build/CI
  • VTAdmin

Comment on lines -67 to -75
// NewTokenizer creates a new Tokenizer reading a sql
// string from the io.Reader.
func NewTokenizer(r io.Reader) *Tokenizer {
return &Tokenizer{
InStream: r,
buf: make([]byte, defaultBufSize),
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@harshit-gangal harshit-gangal merged commit 6493f55 into vitessio:master Mar 2, 2021
@askdba askdba added this to the v10.0 milestone Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Comment handling in vitess
3 participants