-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: CANCEL QUERY error tweaks, SHOW SESSIONS semicolon removal #17739
sql: CANCEL QUERY error tweaks, SHOW SESSIONS semicolon removal #17739
Conversation
ee4adad
to
8c470c2
Compare
pkg/sql/crdb_internal.go
Outdated
@@ -697,9 +697,12 @@ func populateSessionsTable( | |||
var oldestStart time.Time | |||
var oldestStartDatum parser.Datum | |||
|
|||
for _, query := range session.ActiveQueries { | |||
numQueries := len(session.ActiveQueries) | |||
for idx, query := range session.ActiveQueries { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for i, query := range ...{
if i > 0 {
WriteString("; ")
}
WriteString(sql)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
8c470c2
to
924a00b
Compare
924a00b
to
5b113bf
Compare
LGTM modulo clean up in test. Reviewed 4 of 4 files at r1, 2 of 2 files at r4. pkg/sql/logictest/testdata/logic_test/show_source, line 158 at r4 (raw file):
Remove the trailing whitespaces. Comments from Reviewable |
5b113bf
to
c8b8611
Compare
Review status: all files reviewed at latest revision, 1 unresolved discussion. pkg/sql/logictest/testdata/logic_test/show_source, line 158 at r4 (raw file): Previously, knz (kena) wrote…
Done. Comments from Reviewable |
This is to unify the outputs of SHOW SESSIONS and SHOW QUERIES for single-query sessions.
c8b8611
to
6441300
Compare
active_queries
inSHOW SESSIONS
, to make the output match that of thequery
field inSHOW QUERIES
.