зеркало из https://github.com/github/vitess-gh.git
feat: show query to not invoke reserve conn and show variables should be able to return the updated value
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
This commit is contained in:
Родитель
1870b9bc28
Коммит
55882f465f
|
@ -260,5 +260,11 @@ func GetInterestingVariables() []string {
|
|||
res = append(res, Version.Name)
|
||||
res = append(res, VersionComment.Name)
|
||||
res = append(res, Socket.Name)
|
||||
|
||||
for _, variable := range UseReservedConn {
|
||||
if variable.SupportSetVar {
|
||||
res = append(res, variable.Name)
|
||||
}
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
|
|
@ -1036,7 +1036,7 @@ func prepareSetVarComment(vcursor *vcursorImpl, stmt sqlparser.Statement) (strin
|
|||
switch stmt.(type) {
|
||||
// If the statement is a transaction statement or a set no reserved connection / SET_VAR is needed
|
||||
case *sqlparser.Begin, *sqlparser.Commit, *sqlparser.Rollback, *sqlparser.Savepoint,
|
||||
*sqlparser.SRollback, *sqlparser.Release, *sqlparser.Set:
|
||||
*sqlparser.SRollback, *sqlparser.Release, *sqlparser.Set, *sqlparser.Show:
|
||||
return "", nil
|
||||
case sqlparser.SupportOptimizerHint:
|
||||
break
|
||||
|
|
Загрузка…
Ссылка в новой задаче