Skip to content

Fix for malformed query leading to CLI hanging. #140

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

Merged
merged 7 commits into from
Jan 11, 2018

Conversation

MrMeemus
Copy link
Contributor

A query execute string request would not mark itself as finished when receiving a query execute error response event, leaving mssqlcliclient infinitely looping for a response.

If a error is returned during execute_single_batch_query, immediately return rather.

Fix for #136

@MrMeemus MrMeemus self-assigned this Jan 11, 2018
Copy link
Member

@pensivebrian pensivebrian left a comment

Choose a reason for hiding this comment

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

Can you add a regression test?

yield self.tabular_results_generator(column_info=None, result_rows=None,
query=query, message=query_response.error_message,
is_error=True)
elif isinstance(query_response, queryservice.QueryMessageEvent):
Copy link
Contributor

@abhisheksinha89 abhisheksinha89 Jan 11, 2018

Choose a reason for hiding this comment

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

We are we deleting this? We need it to hamdle Error response events #Closed

Copy link
Contributor

Choose a reason for hiding this comment

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

Ahh ok I see now what happened. Thanks


In reply to: 161077826 [](ancestors = 161077826)

Copy link
Contributor

@abhisheksinha89 abhisheksinha89 left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Member

@pensivebrian pensivebrian left a comment

Choose a reason for hiding this comment

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

:shipit:

@MrMeemus MrMeemus merged commit 0469e7e into master Jan 11, 2018
@MrMeemus MrMeemus deleted the ron/malformed_query_fix branch January 30, 2018 20:08
hejack0207 pushed a commit to hejack0207/osql-cli that referenced this pull request Apr 27, 2018
* Fixing queryexecution service to handle error during query execution.

* Fixing format of for statement.

* Fixing pep8 space after comma.

* Adding 2 second sleep after connection.

* Adding regression test.

* Updating baseline.

* Fixing baseline.
hejack0207 pushed a commit to hejack0207/osql-cli that referenced this pull request Apr 27, 2018
* Fixing queryexecution service to handle error during query execution.

* Fixing format of for statement.

* Fixing pep8 space after comma.

* Adding 2 second sleep after connection.

* Adding regression test.

* Updating baseline.

* Fixing baseline.
hejack0207 pushed a commit to hejack0207/osql-cli that referenced this pull request Apr 27, 2018
* Fixing queryexecution service to handle error during query execution.

* Fixing format of for statement.

* Fixing pep8 space after comma.

* Adding 2 second sleep after connection.

* Adding regression test.

* Updating baseline.

* Fixing baseline.
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.

3 participants