Skip to content

Corrects the comment handling in vitess#7581

Merged
harshit-gangal merged 1 commit intovitessio:masterfrom
GuptaManan100:comments-mysql
Mar 2, 2021
Merged

Corrects the comment handling in vitess#7581
harshit-gangal merged 1 commit intovitessio:masterfrom
GuptaManan100:comments-mysql

Conversation

@GuptaManan100
Copy link
Contributor

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

Signed-off-by: GuptaManan100 <manan@planetscale.com>
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