Skip to content

Fixes ordering in SELECT INTO and printing of strings#7655

Merged
systay merged 6 commits intovitessio:masterfrom
planetscale:select-into
Mar 15, 2021
Merged

Fixes ordering in SELECT INTO and printing of strings#7655
systay merged 6 commits intovitessio:masterfrom
planetscale:select-into

Conversation

@GuptaManan100
Copy link
Copy Markdown
Contributor

@GuptaManan100 GuptaManan100 commented Mar 10, 2021

Description

The query select * from t1 into outfile '/tmp/foo.csv' fields escaped by '\\' terminated by '\n'; works on MySQL but was failing on Vitess. This is because we were parsing strings with escape characters but were not emitting it correctly, i.e. '\\' gets converted to '\'. This PR fixes this issue. Also, any ordering of TERMINATED BY, ENCLOSED BY and ESCAPED BY is permitted in MySQL. This is also addressed in this PR.

Checklist

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

Impacted Areas in Vitess

Components that this PR will affect:

  • Query Serving

Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
@GuptaManan100 GuptaManan100 requested a review from systay March 10, 2021 13:32
Signed-off-by: GuptaManan100 <manan@planetscale.com>
Signed-off-by: GuptaManan100 <manan@planetscale.com>
@systay systay merged commit de902e5 into vitessio:master Mar 15, 2021
@systay systay deleted the select-into branch March 15, 2021 13:15
@askdba askdba added this to the v10.0 milestone Mar 18, 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.

3 participants