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

SQL Messages need to persist and be accurate #1753

Closed
cdchild opened this issue Sep 30, 2020 · 5 comments · Fixed by #17999
Closed

SQL Messages need to persist and be accurate #1753

cdchild opened this issue Sep 30, 2020 · 5 comments · Fixed by #17999

Comments

@cdchild
Copy link

cdchild commented Sep 30, 2020

  • MSSQL Extension Version: 1.9.0
  • VSCode Version: 1.49.2
  • OS Version: Windows 10

Steps to Reproduce:

  1. Open two SQL Scripts
  2. Execute both SQL Scripts and note: the Messages section with the Total Row Count, any other message output, & Total Execution Time in the results window after each one is executed.
  3. Switch between the results tabs of the two scripts.
    Notice that the messages disappear (the Total Rows, statistics, Print output, etc.) disappears and the Total Execution Time increases by the original amount of time each time tabs are switched.
@cdchild
Copy link
Author

cdchild commented Sep 30, 2020

image
First Results

image
Looks good so far

image
Original execution time was 00:00:00.021, now it's 00:00:00.042.
Row affected disappeared.

image
Original execution time was 00:00:00.018, now it's 00:00:00.036...
Row affected is no longer there either.

image
It'll keep going the more times you switch.

For simplicity in reporting/recreating I've omitted examples where the number of rows affected and even the execution time is helpful and relevant.
However, these needs to be persistent especially when multi-tasking, waiting for longer/larger queries, etc.
We'll need to be able to switch between multiple results without worrying about the stats changing.

@cdchild
Copy link
Author

cdchild commented Sep 30, 2020

This also affects other statistics like the output from SET STATISTICS IO (https://docs.microsoft.com/en-us/sql/t-sql/statements/set-statistics-io-transact-sql).
Now you see it:
image

Now you don't (after switching between tabs):
image

@abist abist added the Bug label Oct 1, 2020
@kburtram kburtram added this to the Backlog milestone Aug 27, 2021
@RandomGHUser
Copy link

RandomGHUser commented Dec 30, 2021

It seems like tabbing to a different result tab (or, say, closing the active result tab which makes another one active) actually re-executes the underlying query of the newly active result tab. This is very dangerous behavior to be happening by default, if true. Can anybody confirm this, and/or a way to resolve this related issue? When any result tab becomes active, it should show the last queried results and messages, not re-execute the query.

@Brian-Keith
Copy link

Just want to add my support to this issue since it has been open for over 2 years. It's very frustrating that the message history is not retained when switching between windows, which is not behavior that happens in SSMS.

This is especially frustrating as the author mentioned when executing multiple queries since any debugging information will be lost. Would really appreciate a fix for this issue.

@simonsabin
Copy link

Just came across this, can't quite believe messages aren't maintained between tab switching

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants