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
executor, infoschema: return a pseudo profiling table when system var profiling is set to 1 #5960
Conversation
… profiling is set to 1
Conflicts: executor/executor_test.go
infoschema/tables.go
Outdated
@@ -1033,6 +1060,9 @@ func (it *infoschemaTable) getRows(ctx sessionctx.Context, cols []*table.Column) | |||
fullRows = dataForTableConstraints(dbs) | |||
case tableFiles: | |||
case tableProfiling: | |||
if v, ok := ctx.GetSessionVars().GetSystemVar("profiling"); ok && v == "1" { |
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.
use tidbOptOn
.
PTAL @coocood |
sessionctx/variable/varsutil.go
Outdated
@@ -123,8 +123,8 @@ func SetSessionSystemVar(vars *SessionVars, name string, value types.Datum) erro | |||
return vars.SetSystemVar(name, sVal) | |||
} | |||
|
|||
// tidbOptOn could be used for all tidb session variable options, we use "ON"/1 to turn on those options. | |||
func tidbOptOn(opt string) bool { | |||
// TIDBOptOn could be used for all tidb session variable options, we use "ON"/1 to turn on those options. |
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.
s/TIDBOptOn/TiDBOptOn ?
LGTM |
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.
LGTM
/run-all-tests |
fix #5666
Navicat autorun sql
to get the QUERY_ID.
This commit returns a pseudo profiling table when profiling is set to 1.
PTAL @coocood