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 fix: Off-by-one error when parsing multiple statements #356

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

fulghum
Copy link

@fulghum fulghum commented Jul 9, 2024

An off-by-one error in multistatement parsing prevents us from parsing multistatements without a space between the delimiter and the next statement. For example: "SELECT 1;SELECT 2;" would previously be parsed as "SELECT 1;S" and "ELECT 2;".

Found while testing changes for dolthub/driver#28

@fulghum fulghum requested a review from zachmu as a code owner July 9, 2024 19:43
@fulghum fulghum requested review from macneale4 and removed request for zachmu July 9, 2024 20:05
Copy link

@macneale4 macneale4 left a comment

Choose a reason for hiding this comment

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

wow. amazing that hasn't come up before. And the test which has the "+1". double wow.

                               _
                              (_)
               --""-------   0/      ^^
     .___...../ /__| |__\ \_/H__,      ^^
      \                        /
    #####^~^~^~^~^~^~^~^~^~^~^~^~^~^~^~\O/~~\Q/~^~^~

@fulghum fulghum merged commit 9938efd into main Jul 9, 2024
4 checks passed
@fulghum fulghum deleted the fulghum/parseone branch July 9, 2024 20:53
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

Successfully merging this pull request may close these issues.

2 participants